/* Lunchtime — Miso Studio. Palette from the Miso brand guide v1.0. */
:root {
  --paper: #FEF5E5;        /* warm highlight: page background */
  --cream: #FEE7CA;        /* lunch cream: fills, media holders */
  --cream-2: #FBDDB6;
  --peach: #EF9A58;        /* brand band colour; dark text only on it */
  --terracotta: #E47C3D;
  --cocoa: #985935;        /* outlines, brand anchor */
  --olive: #A9A05A;
  --olive-ink: #5F5A26;    /* olive dark enough for text */
  --ink-strong: #52220E;   /* deep outline: headings */
  --ink: #3B1A0C;          /* body text */
  --muted: #7A5440;
  --link: #8A4B27;
  --line: rgba(82, 34, 14, 0.14);
  --line-strong: rgba(82, 34, 14, 0.28);
  --footer: #2F140A;

  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 92px;          /* pill + its top margin */

  /* Spacing scale: use these, nothing off-scale. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(64px, 10vw, 128px);

  /* Motion. Breakpoints (not tokens, CSS can't): 560 sm · 860 md · 960 nav · 1180 lg. */
  --t-fast: 180ms;
  --t-base: 250ms;
  --t-reveal: 700ms;
  --t-words: 900ms;
}

/* Cross-page fade where the browser supports it; plain navigation elsewhere. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-group(root), ::view-transition-new(root) { animation-duration: 200ms; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--peach); color: var(--ink-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; text-wrap: pretty; }

/* Big uppercase headline used on marketing pages. */
/* Sentence case: Fredoka's capital V is lopsided and crowds its neighbours (SERVERS). */
.display { font-size: clamp(2.3rem, 6.2vw, 4.6rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.01em; margin-bottom: clamp(28px, 4vw, 48px); }
.center { text-align: center; }
.center-text { text-align: center; margin-inline: auto; }
.center-row { display: flex; justify-content: center; margin-top: 40px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink-strong); color: var(--paper); padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- Header: floating pill, logo centred ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 14px var(--gutter) 0; pointer-events: none; }
.home .site-header { margin-bottom: calc(-1 * var(--header-h)); }
.header-pill {
  pointer-events: auto;
  max-width: calc(var(--max) - 2 * var(--gutter)); margin-inline: auto; height: 64px; padding: 0 12px 0 28px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--paper); border: 1.5px solid var(--cocoa); border-radius: var(--r-lg);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled .header-pill { box-shadow: 0 10px 30px rgba(47, 20, 10, 0.08); }
.brand { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 10px; margin-inline: 20px; text-decoration: none; color: var(--ink-strong); }
.brand img { border-radius: 10px; transition: transform 0.4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand span { font: 700 1.45rem/1 var(--font-display); letter-spacing: 0.01em; color: var(--ink-strong); }
.brand:hover { color: var(--ink-strong); }
.site-nav { display: contents; }
.site-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-left { grid-column: 1; grid-row: 1; }
.nav-right { grid-column: 3; grid-row: 1; justify-content: flex-end; gap: 20px !important; }
.site-nav ul a:not(.btn) {
  position: relative; display: block; padding: 6px 0; white-space: nowrap;
  font: 600 0.86rem/1 var(--font-display); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-strong); text-decoration: none;
}
.site-nav ul a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--peach);
  transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.site-nav ul a:not(.btn):hover::after, .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle { display: none; grid-column: 3; grid-row: 1; justify-self: end; width: 44px; height: 44px; border: 1.5px solid var(--cocoa); border-radius: var(--r); background: transparent; cursor: pointer; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink-strong); margin: auto; position: relative; transition: transform 0.3s var(--ease), background-color 0.2s; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -6px; }
.menu-toggle .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  :root { --header-h: 84px; }
  .header-pill { grid-template-columns: auto 1fr; padding: 0 10px 0 14px; height: 60px; position: relative; }
  .brand { grid-column: 1; margin-inline: 0; }
  .brand span { font-size: 1.25rem; }
  .menu-toggle { display: block; grid-column: 2; }
  .site-nav {
    display: block; position: absolute; left: -1.5px; right: -1.5px; top: calc(100% + 8px);
    background: var(--paper); border: 1.5px solid var(--cocoa); border-radius: var(--r-lg); padding: 8px 20px 20px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s 0.25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0 !important; }
  .site-nav ul a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav ul a:not(.btn)::after { display: none; }
  .nav-right li:last-child { padding-top: 16px; }
  .site-nav.is-open li { animation: panel-in 0.35s var(--ease) both; }
  .site-nav.is-open li:nth-child(2) { animation-delay: 40ms; } .site-nav.is-open li:nth-child(3) { animation-delay: 80ms; } .site-nav.is-open li:nth-child(4) { animation-delay: 120ms; }
  .site-nav.is-open .nav-right li { animation-delay: 160ms; } .site-nav.is-open .nav-right li + li { animation-delay: 200ms; }
}

/* ---------- Buttons: flat fill, hard offset shadow ---------- */
.btn {
  --shadow: var(--peach);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--r);
  font: 600 0.98rem/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border: 1.5px solid var(--ink-strong); cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.2s, color 0.2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); text-decoration: none; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.btn-primary { background: var(--ink-strong); color: var(--paper); }
.btn-primary:hover { color: var(--paper); }
.btn-light, .btn-ghost { background: var(--paper); color: var(--ink-strong); --shadow: var(--ink-strong); }
.btn-ghost { background: transparent; }
.btn-light:hover, .btn-ghost:hover { color: var(--ink-strong); }
.band-peach .btn-primary { --shadow: var(--paper); }
.btn-sm { padding: 11px 16px; font-size: 0.86rem; box-shadow: 3px 3px 0 var(--shadow); }
.btn-sm:hover { box-shadow: 5px 5px 0 var(--shadow); }
.site-nav .btn-sm { padding: 10px 16px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---------- Shared bits ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 0.82rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--link); margin: 0 0 14px; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 40em; }
.lede-lg { font: 500 clamp(1.25rem, 2.1vw, 1.65rem)/1.4 var(--font-display); color: var(--ink-strong); }
.section { padding-block: var(--section-y); }
.section-tight { padding-top: 0; }
.section-cream { background: var(--cream); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.split-head .section-head { margin-bottom: 0; }

.frame { position: relative; overflow: hidden; border-radius: var(--r); background: var(--cream-2); }
figure { margin: 0; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; }

/* Empty image / video holder. Put an <img> or <video> inside and the label hides. */
.media-slot {
  position: relative; overflow: hidden; display: grid; place-items: center;
  aspect-ratio: 16 / 10; min-height: 120px; border-radius: var(--r); background: var(--cream);
}
.media-slot::after {
  content: attr(data-label); padding: 7px 12px; border: 1.5px dashed var(--line-strong); border-radius: 999px; background: var(--paper);
  font: 600 0.74rem/1.2 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; max-width: 80%;
}
.media-slot > img, .media-slot > video, .media-slot > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.media-slot:has(> img, > video, > iframe)::after { display: none; }
.media-slot-fill { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; background: var(--cream-2); }

kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 7px; text-align: center;
  font: 600 0.85em var(--font-mono); color: var(--ink-strong);
  background: var(--paper); border: 1px solid var(--line-strong); border-bottom-width: 3px; border-radius: var(--r-sm);
}
code { font: 0.88em var(--font-mono); background: var(--cream); padding: 2px 6px; border-radius: var(--r-sm); color: var(--ink-strong); }
.tag { display: inline-block; font: 600 0.68rem/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--cream); color: var(--muted); vertical-align: 2px; }

.specs { margin: 0; padding: 0; list-style: none; }
.specs-note { margin: var(--s-3) 0 0; font-size: 0.88rem; color: var(--muted); }
.specs li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.specs li::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--line-strong); transform: translateY(-4px); }
.specs .k { order: 0; color: var(--muted); }
.specs .v { order: 2; color: var(--ink-strong); font-weight: 600; text-align: right; }

.pixel-edge {
  height: 16px; width: 100%;
  background-color: var(--edge, var(--paper));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='16'%3E%3Cpath d='M0 8h16V0h16v8h16v8H0zM48 16V8h24V0h24v16z'/%3E%3C/svg%3E") repeat-x bottom / 96px 16px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='16'%3E%3Cpath d='M0 8h16V0h16v8h16v8H0zM48 16V8h24V0h24v16z'/%3E%3C/svg%3E") repeat-x bottom / 96px 16px;
}
.footer-edge { --edge: var(--footer); margin-top: -16px; position: relative; }

.arrow-link { font: 600 0.95rem var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-strong); }
.arrow-link::after { content: "→"; transition: transform 0.25s var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }
.code-chip { display: inline-flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px; border: 1.5px dashed var(--cocoa); border-radius: var(--r); background: var(--paper); font: 600 1.1rem var(--font-mono); color: var(--ink-strong); letter-spacing: 0.08em; }
.code-chip button { font: 600 0.78rem var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; border: 0; background: var(--ink-strong); color: var(--paper); padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; }
.cta-final { text-align: center; }
.cta-final > img { width: 112px; margin: 0 auto 20px; }
.cta-final .btn-row { justify-content: center; }
/* A call-out at the end of a section: one gap above it, not two stacked section paddings. */
.cta-after { margin-top: clamp(64px, 9vw, 112px); }

/* Word-by-word headline rise ([data-split], wrapped by site.js). */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.w > span { display: inline-block; }
.js [data-split] .w > span { opacity: 0; transition: opacity 0.6s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.motion [data-split] .w > span { opacity: 1; transform: translateY(105%); }
.js [data-split].is-in .w > span { opacity: 1; transform: none; }


/* ---------- Bands (solid brand colour) ---------- */
.band { padding-block: clamp(88px, 12vw, 168px); }
.band-peach { background: var(--peach); color: var(--ink-strong); }
.band-peach .display, .band-peach h2, .band-peach h3 { color: var(--ink-strong); }
.band-peach a:not(.btn) { color: var(--ink-strong); }
.band-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.sticky-head { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.band-body { padding-top: clamp(0px, 14vw, 200px); }
.band-body p { font-size: 1.1rem; }
.band-body .btn-row { margin-top: 32px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); }
.card {
  display: block; padding: 16px 16px 24px; border: 1.5px solid var(--cocoa); border-radius: var(--r-lg);
  background: var(--paper); color: inherit; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.card:hover { transform: translate(-4px, -4px); box-shadow: 6px 6px 0 var(--cocoa); color: inherit; }
.card-wide { grid-column: 1 / -1; }
.card-wide .media-slot { aspect-ratio: 21 / 9; }
.card .media-slot { margin-bottom: 18px; }
.card-body { padding: 0 6px; }
.card h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--link); margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
a.card:hover h3 { color: var(--ink-strong); }
.card-flat { padding: 24px; }
.card-flat img { width: 56px; height: 56px; margin-bottom: 14px; transition: transform 0.4s var(--ease); }
.card-flat:hover img { transform: rotate(-6deg) translateY(-3px); }
.card-flat .kind { font: 600 0.75rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--olive-ink); margin-bottom: 4px; }
.card-flat h3 { font-size: 1.2rem; }
.originals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }

.scoreboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.scoreboard li { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: clamp(18px, 3vw, 30px) clamp(22px, 4vw, 44px); background: var(--paper); border-radius: var(--r-lg); }
.score { font: 700 clamp(3rem, 9vw, 6.2rem)/0.9 var(--font-display); color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.score-label { text-align: right; font: 600 clamp(0.8rem, 1.4vw, 0.95rem) var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); padding-bottom: 6px; }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.gallery .media-slot { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
.gallery .g-a { grid-column: span 7; aspect-ratio: auto; }
.gallery .g-b { grid-column: span 5; }
.gallery .g-c, .gallery .g-d, .gallery .g-e { grid-column: span 4; }

.partner-card { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; padding: clamp(20px, 3vw, 32px); border: 1.5px solid var(--cocoa); border-radius: var(--r-lg); max-width: 1000px; margin: 0 auto; }
.partner-card h3 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.partner-card p { color: var(--muted); }

.about-card { position: relative; max-width: 980px; margin: 0 auto; padding: clamp(32px, 6vw, 72px); background: var(--paper); border-radius: var(--r-lg); }
.about-card .display { font-size: clamp(2rem, 4.4vw, 3.2rem); color: var(--link); margin-bottom: 24px; }
.about-card p { font-size: 1.12rem; max-width: 46em; }
.about-miso { position: absolute; top: -48px; right: clamp(20px, 5vw, 56px); width: 96px; animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(3deg); } }

.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.contact h3 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.contact p { color: var(--muted); }
.socials-head { margin: 64px 0 16px; font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.social { display: grid; gap: 2px; padding: 12px 18px; min-width: 150px; border: 1.5px solid var(--cocoa); border-radius: var(--r); text-decoration: none; color: var(--ink-strong); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.social:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--cocoa); color: var(--ink-strong); }
.social strong { font: 600 1.05rem var(--font-display); letter-spacing: 0.02em; }
.social span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-bottom: 0; }
.page-head-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: end; }

/* ---------- Modpack page ---------- */
.two-col > * { min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature-list li::before { content: ""; width: 10px; height: 10px; margin-top: 9px; background: var(--peach); box-shadow: 4px 4px 0 var(--olive); }
.feature-list strong { display: block; color: var(--ink-strong); font-size: 1.05rem; }
.feature-list span { color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 24px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; display: grid; place-items: center; font: 600 1rem var(--font-display); color: var(--ink-strong); border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px; width: 1px; background: var(--line-strong); }
.steps strong { color: var(--ink-strong); }



/* ---------- Home: before you play ---------- */
.link-stack { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; gap: var(--s-3); }


/* ---------- Home: community rail ---------- */
.rail-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); }
.rail-nav { display: flex; gap: var(--s-2); margin-bottom: clamp(28px, 4vw, 48px); }
.rail-btn { width: 44px; height: 44px; font: 600 1.4rem/1 var(--font-display); color: var(--ink-strong); background: var(--paper); border: 1.5px solid var(--cocoa); border-radius: var(--r); cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.rail-btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--cocoa); }
.rail-btn:disabled { opacity: 0.35; cursor: default; }
/* The arrows, swipe, trackpad and arrow keys move the rail, so its scrollbar is hidden (scrolling still works). */
.rail { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding: var(--s-2) var(--s-1) var(--s-3); scroll-padding-inline: var(--s-1); margin-inline: calc(-1 * var(--s-1)); }
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: 6px; }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-4); }
.rail-list > li { flex: 0 0 clamp(200px, 22vw, 250px); scroll-snap-align: start; }
.rail-card { position: relative; display: grid; gap: 4px; text-decoration: none; color: var(--ink-strong); }
.rail-thumb { aspect-ratio: 9 / 16; margin-bottom: var(--s-2); border: 1.5px solid var(--line-strong); }
a.rail-card:hover .rail-thumb, a.rail-card:focus-visible .rail-thumb { border-color: var(--cocoa); box-shadow: 4px 4px 0 var(--peach); }
.rail-platform { font: 600 0.75rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive-ink); }
.rail-title { font-weight: 600; line-height: 1.3; }
.rail-views { font-size: 0.85rem; color: var(--muted); }

/* ---------- Home: stats ---------- */
.score-source { display: block; margin-top: 2px; font-size: 0.75rem; letter-spacing: 0; text-transform: none; opacity: 0.8; }
.score-source a { color: inherit; }
.stats-note { margin: var(--s-5) 0 0; font-size: 0.85rem; color: var(--ink-strong); }


/* ---------- Studio ---------- */
.narrow { max-width: 820px; }
.ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--s-7); }
.ways li { padding: var(--s-5) 0; border-top: 1px solid var(--line-strong); }
.ways h3 { margin-bottom: var(--s-2); }
.ways p { margin: 0; color: var(--muted); }
.notice { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s-4); }


/* ---------- Projects ---------- */
.project-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.project-row {
  position: relative; display: grid; grid-template-columns: 1fr auto 32px; align-items: center; gap: var(--s-5);
  padding: var(--s-5) var(--s-2); border-bottom: 1px solid var(--line-strong); text-decoration: none; color: var(--ink-strong);
  transition: background-color var(--t-fast), padding var(--t-base) var(--ease);
}
.project-name { font: 600 clamp(1.3rem, 2.4vw, 1.9rem)/1.1 var(--font-display); }
.project-meta { font-size: 0.9rem; color: var(--muted); }
.project-arrow { font-size: 1.4rem; transition: transform var(--t-base) var(--ease); }
.project-row:hover, .project-row:focus-visible { background: var(--cream); padding-inline: var(--s-4); color: var(--ink-strong); }
.project-row:hover .project-arrow, .project-row:focus-visible .project-arrow { transform: translateX(4px); }
/* Desktop: a preview floats in beside the row on hover or keyboard focus. */
.project-preview {
  position: absolute; right: 72px; top: 50%; width: 220px; z-index: 2; pointer-events: none;
  opacity: 0; transform: translateY(-50%) scale(0.96); transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  border: 1.5px solid var(--cocoa); box-shadow: 6px 6px 0 var(--peach);
}
.project-preview::after { display: none; }
.project-row:hover .project-preview, .project-row:focus-visible .project-preview { opacity: 1; transform: translateY(-50%) scale(1); }
.project-row:hover .project-meta, .project-row:focus-visible .project-meta { visibility: hidden; }
.project-actions { margin-top: var(--s-5); align-items: center; }
.project-media { display: grid; gap: var(--s-5); }
.eyebrow a { color: inherit; }

/* ---------- Mods page ---------- */
.mods-tools { position: sticky; top: var(--header-h); z-index: 5; background: var(--paper); padding: 16px 0 14px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.search input, .wiki-search input {
  width: 100%; padding: 13px 16px 13px 44px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237A5440' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 15px 50%;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus, .wiki-search input:focus { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 3px rgba(239, 154, 88, 0.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.88rem var(--font-body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.chip span { color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--cocoa); }
.chip[aria-pressed="true"] { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--paper); }
.chip[aria-pressed="true"] span { color: var(--cream-2); }
.mods-count { font-size: 0.9rem; color: var(--muted); margin: 18px 0 4px; }
.mods { list-style: none; margin: 0; padding: 0; }
.mod-group-h { display: flex; align-items: baseline; gap: 10px; margin: var(--s-6) 0 0; padding-bottom: 10px; border-bottom: 2px solid var(--ink-strong); font-size: clamp(1.2rem, 2vw, 1.5rem); scroll-margin-top: calc(var(--header-h) + 140px); }
.mod-group-h span { font: 600 0.85rem var(--font-body); color: var(--muted); }
.mod { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; grid-template-areas: "name sum" "by sum"; column-gap: 32px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mod[hidden] { display: none; }
.mod-name { grid-area: name; font-weight: 600; color: var(--ink-strong); }
.mod-name a { color: var(--ink-strong); text-decoration: none; }
.mod-name a:hover { color: var(--link); text-decoration: underline; }
.mod-by { grid-area: by; font-size: 0.85rem; color: var(--muted); }
.mod-sum { grid-area: sum; margin: 0; color: var(--ink); font-size: 0.97rem; }
.mods-empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- Hosting ---------- */
.host-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.partner-logo { background: #10172a; border-radius: var(--r); padding: 28px; display: grid; place-items: center; }
.partner-logo img { max-height: 48px; width: auto; }
.price-note { font-size: 0.9rem; color: var(--muted); }

/* ---------- Staff / partners / links ---------- */
/* Team cards (home and Our Staff): picture, name, handle, role, centred so every row lines up. */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.person { display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; min-width: 0; }
.person .avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.person h3 { font-size: 1.2rem; margin: 0; overflow-wrap: anywhere; }
.person .role { margin: 2px 0 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive-ink); text-wrap: balance; }
.partner-row { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); align-items: center; }
.empty-note { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 32px; text-align: center; color: var(--muted); }

/* ---------- Wiki ---------- */
.wiki { display: grid; grid-template-columns: 232px minmax(0, 1fr) 200px; gap: clamp(28px, 4vw, 56px); padding-top: 40px; padding-bottom: 96px; align-items: start; }
.wiki-side { position: sticky; top: calc(var(--header-h) + 24px); z-index: 6; }
.wiki-search { position: relative; margin-bottom: 20px; }
.wiki-search input { padding-top: 10px; padding-bottom: 10px; font-size: 0.94rem; }
.wiki-results { position: absolute; z-index: 10; left: 0; width: min(420px, calc(100vw - 2 * var(--gutter))); top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 12px 32px rgba(47, 20, 10, 0.14); max-height: 60vh; overflow: auto; }
.wiki-results a { display: block; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.wiki-results a:hover, .wiki-results a[aria-selected="true"] { background: var(--cream); }
.wiki-results strong { display: block; color: var(--ink-strong); font-size: 0.95rem; }
.wiki-results small { color: var(--muted); font-size: 0.82rem; display: block; line-height: 1.4; }
.wiki-results mark { background: rgba(239,154,88,.4); color: inherit; border-radius: 2px; }
.wiki-results .none { padding: 12px; color: var(--muted); font-size: 0.9rem; }
.side-nav summary { display: none; }
.side-group { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
.side-group:first-of-type { margin-top: 0; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 6px 10px; margin-left: -10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 0.95rem; border-left: 2px solid transparent; }
.side-nav a:hover { background: var(--cream); }
.side-nav a[aria-current="page"] { color: var(--ink-strong); font-weight: 600; background: var(--cream); border-left-color: var(--peach); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 0.88rem; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
.toc p { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink-strong); }
.toc a.is-active { color: var(--ink-strong); border-left-color: var(--peach); }
.wiki-head { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.wiki-head img { flex: none; width: 64px; height: 64px; margin-top: 4px; }
.wiki-head h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 10px; }
.wiki-head .lede { font-size: 1.1rem; margin: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a { display: block; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; color: var(--ink-strong); font: 600 1.1rem var(--font-display); transition: border-color 0.2s, background-color 0.2s; }
.pager a:hover { border-color: var(--cocoa); background: var(--cream); }
.pager span { display: block; font: 500 0.8rem var(--font-body); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.pager .next { text-align: right; }

/* Long-form content */
.prose { min-width: 0; }
.prose > * { max-width: 72ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-top: 2.2em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.8em; }
.prose h4 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--cocoa); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose .table-wrap { max-width: none; overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--line); border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--cream); color: var(--ink-strong); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prose figure { max-width: none; margin: 1.8em 0; }
.prose figure .frame img { height: auto; }
.prose dl { margin: 0 0 1.2em; }
.prose dt { font-weight: 600; color: var(--ink-strong); margin-top: 0.9em; }
.prose dd { margin: 0.2em 0 0; color: var(--ink); }
.note { border-left: 3px solid var(--olive); background: var(--cream); padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 1.4em; font-size: 0.98rem; }
.note.warn { border-left-color: var(--terracotta); }
.note > :last-child { margin-bottom: 0; }
.note strong:first-child { color: var(--ink-strong); }
.faq details { border-bottom: 1px solid var(--line); max-width: 72ch; }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; color: var(--ink-strong); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem var(--font-body); color: var(--cocoa); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; }
.faq details > div > :last-child { margin-bottom: 0; }
.job-grid { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); max-width: none !important; }
.job-grid li { margin: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.job-grid a { display: block; padding: 12px 14px; text-decoration: none; color: var(--ink-strong); font-weight: 600; }
.job-grid a small { display: block; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.job-grid a:hover { background: var(--cream); }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.topic { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px 20px 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background-color 0.2s, padding 0.3s var(--ease); }
.topic:hover { background: var(--cream); padding-left: 14px; color: var(--ink); }
.topic img { width: 56px; height: 56px; }
.topic strong { display: block; font: 600 1.2rem var(--font-display); color: var(--ink-strong); margin-bottom: 4px; }
.topic span { font-size: 0.94rem; color: var(--muted); }

/* ---------- Studio direction (home sections, staff, media, wiki chrome) ---------- */
.release-line { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 var(--s-4); }


.rail-foot { margin-top: var(--s-5); gap: var(--s-5); }
@media (hover: hover) { .rail { cursor: grab; } }
.rail.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.rail.is-dragging .rail-card { pointer-events: none; }
.rail-card .rail-thumb { transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
a.rail-card:hover .rail-thumb, a.rail-card:focus-visible .rail-thumb { transform: translate(-3px, -3px); }
.rail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-gallery + .video-gallery { margin-top: var(--section-y); }
.video-gallery h2 { margin-bottom: var(--s-5); }
.video-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-6) var(--s-4); }

.project-group + .project-group { margin-top: var(--section-y); }
.project-group h2 { margin-bottom: var(--s-4); }

.person-h { margin: var(--s-4) 0 var(--s-1); font: 600 0.75rem var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-strong); }

.crumbs ol { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--link); }
.crumbs [aria-current] { color: var(--ink-strong); }
.wiki-version { margin: var(--s-3) 0 0; display: inline-block; padding: 4px 10px; font-size: 0.8rem; letter-spacing: 0.03em; color: var(--olive-ink); background: var(--cream); border-radius: 999px; }
.related { margin-top: var(--s-8); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }
.related a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; color: var(--ink-strong); transition: border-color var(--t-fast), background-color var(--t-fast); }
.related a:hover { border-color: var(--cocoa); background: var(--cream); }
.related strong { font: 600 1.02rem var(--font-display); }
.related span { font-size: 0.88rem; color: var(--muted); }

/* ---------- Legal pages (wiki layout, legal side list) ---------- */
.legal-dates { margin: var(--s-3) 0 0; font-size: 0.9rem; color: var(--muted); }
.legal-index { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-3); max-width: none !important; }
.legal-index li { margin: 0; }
.legal-index a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; color: var(--ink-strong); transition: border-color var(--t-fast), background-color var(--t-fast); }
.legal-index a:hover { border-color: var(--cocoa); background: var(--cream); }
.legal-index strong { font: 600 1.05rem var(--font-display); }
.legal-index span { font-size: 0.9rem; color: var(--muted); }
.licence { padding-top: var(--s-2); }
.licence-status { display: inline-block; margin: 0 0 var(--s-3); padding: 4px 12px; font-size: 0.88rem; color: var(--ink-strong); background: var(--cream); border-radius: var(--r-sm); }
.licence-status.check, .licence-status.none { background: #FFE0BF; border-left: 3px solid var(--terracotta); }
.prose .licence-facts { display: grid; grid-template-columns: minmax(8.5rem, max-content) minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.prose .licence-facts dt, .prose .licence-facts dd { margin: 0; }
.licence-source { color: var(--muted); font-size: 0.9em; }
@media (max-width: 560px) {
  .prose .licence-facts { grid-template-columns: 1fr; gap: 2px; }
  .prose .licence-facts dd { margin-bottom: 10px; }
}

/* ---------- Video cards: cover, views and likes ---------- */
.rail-thumb { position: relative; overflow: hidden; }
.rail-thumb img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1), opacity 0.4s ease; }
.js .rail-thumb.is-loading { background: linear-gradient(100deg, var(--cream) 30%, var(--paper) 50%, var(--cream) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.js .rail-thumb.is-loading img { opacity: 0; }
@keyframes shimmer { to { background-position: -150% 0; } }
a.rail-card:hover .rail-thumb img, a.rail-card:focus-visible .rail-thumb img { transform: scale(1.05); }
.v-play { position: absolute; inset: auto auto 12px 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-strong); background: var(--paper); box-shadow: 2px 2px 0 var(--cocoa); transform: scale(.85); opacity: .9; transition: transform var(--t-fast), opacity var(--t-fast); }
.v-play svg { margin-left: 2px; }
a.rail-card:hover .v-play, a.rail-card:focus-visible .v-play { transform: scale(1); opacity: 1; }
.v-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; font-size: 0.95rem; color: var(--ink-strong); }
.v-platform { margin-right: auto; font: 600 0.72rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive-ink); }
.v-views, .v-likes { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.v-likes svg { color: var(--peach); }
a.rail-card:hover .v-likes svg { animation: beat 0.6s ease; }
@keyframes beat { 30% { transform: scale(1.3); } 60% { transform: scale(.95); } }

/* BisectHosting logo on its dark chip, small */
.partner-logo-sm { padding: 14px 16px; margin: 4px 0; }
.partner-logo-sm img { max-height: 26px; }
.section-lede { max-width: 60ch; margin-top: calc(-1 * var(--s-3)); }
.fact-list { list-style: none; padding: 0; margin: var(--s-3) 0 var(--s-4); display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-2) var(--s-4); }
.fact-list strong { font-family: var(--font-display); font-size: 1.25em; color: var(--cocoa); margin-right: 4px; }

/* Small interactions */
.btn { transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast); }
.btn:active { transform: translate(1px, 1px) scale(.98); }
.scoreboard li { transition: transform var(--t-fast), box-shadow var(--t-fast); }
.scoreboard li:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(82, 34, 14, 0.12); }
.score span[data-count] { font-variant-numeric: tabular-nums; }

@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
.small { font-size: 0.85rem; color: var(--muted); }

/* Motion details */
.site-header { view-transition-name: site-header; }
.mods > li:not([hidden]) { animation: panel-in 0.3s var(--ease) both; }
.rail-btn { transition: transform var(--t-fast), background-color var(--t-fast); }
.rail-btn:hover { transform: scale(1.08); }
.rail-btn svg { display: block; margin: auto; }
.project-card .media-slot { overflow: hidden; }

@media (max-width: 1180px) {
  .header-pill { padding-left: 20px; }
  .site-nav ul { gap: 18px; }
  .nav-right { gap: 16px !important; }
  .site-nav ul a:not(.btn) { font-size: 0.85rem; letter-spacing: 0.04em; }
  .wiki { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .wiki { grid-template-columns: 1fr; padding-top: 20px; gap: 20px; }
  .wiki-side { position: static; max-height: none; overflow: visible; }
  .wiki-results { right: 0; }
  .side-nav { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 16px; }
  .side-nav summary { display: block; padding: 12px 0; font-weight: 600; cursor: pointer; color: var(--ink-strong); }
  .side-nav[open] { padding-bottom: 12px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: rgba(254, 245, 229, 0.75); padding: 72px 0 28px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 0 32px; }
/* Each column shares the grid's two rows (heading, links), so every list starts at the same height even when a heading wraps. */
.footer-grid > :not(.footer-brand) { grid-row: span 2; display: grid; grid-template-rows: subgrid; align-content: start; }
.footer-brand { grid-row: span 2; display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { border-radius: 10px; }
.footer-brand strong { color: var(--paper); font: 600 1.25rem var(--font-display); }
.footer-h { color: var(--peach); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(254, 245, 229, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.footer-base { border-top: 1px solid rgba(254, 245, 229, 0.14); margin-top: 56px; padding-top: 24px; font-size: 0.82rem; color: rgba(254, 245, 229, 0.55); }
.footer-base p { margin: 0; }

/* ---------- Scroll reveal (only when JS is on) ----------
   Magic UI "Blur Fade" (MIT, via 21st.dev), ported to CSS: fade in always; rise 18px and unblur 6px only when motion is welcome. */
.js [data-reveal] { opacity: 0; transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease); transition-delay: var(--d, 0s); }
.motion [data-reveal] { transform: translateY(18px); filter: blur(6px); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
/* Hidden until the hero entrance runs; .entered is the fallback when Motion is missing. */
.js [data-enter], .js [data-hero-art] { opacity: 0; }
.js.entered [data-enter], .js.entered [data-hero-art] { opacity: 1; }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + clamp(24px, 5vw, 64px)) 0 clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero-kicker { font: 600 0.9rem var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--link); margin: 0 0 var(--s-4); }
.hero-title { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02; letter-spacing: -0.01em; margin: 0 0 var(--s-4); max-width: 13ch; text-wrap: balance; }
.hero-sub { font: 500 1.15rem/1.5 var(--font-display); color: var(--muted); max-width: 40ch; margin: 0 0 var(--s-5); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-art { --px: 0; --py: 0; position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; justify-self: center; }
.hero-art > * { position: absolute; transition: translate 0.9s var(--ease); translate: calc(var(--px) * var(--depth, 0) * 1px) calc(var(--py) * var(--depth, 0) * 1px); }
.hero-halo { inset: 3%; border: 2px dashed var(--peach); border-radius: 50%; --depth: 6; }
.hero-miso { left: 19%; top: 17%; width: 62%; height: auto; border: 2px solid var(--ink-strong); border-radius: 28%; box-shadow: 10px 10px 0 var(--cocoa); rotate: -3deg; z-index: 2; --depth: 10; }
.hero-card { width: 31%; margin: 0; z-index: 1; border: 2px solid var(--ink-strong); border-radius: 16px; overflow: hidden; background: var(--cream); box-shadow: 6px 6px 0 var(--peach); --depth: 22; }
.hero-card img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.hero-card figcaption { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: var(--paper); font: 700 0.78rem var(--font-body); color: var(--ink-strong); white-space: nowrap; }
.hero-card-1 { left: -2%; top: 4%; rotate: -8deg; }
.hero-card-1 figcaption { top: 8px; bottom: auto; }
.hero-card-2 { right: -2%; bottom: 0; rotate: 7deg; z-index: 3; --depth: 30; }
.hero-wave { right: 10%; top: 0; width: 24%; max-width: 128px; height: auto; z-index: 4; --depth: 36; }
.hero-spark { width: 18px; height: 18px; z-index: 4; background: var(--peach); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); --depth: 44; }
.hero-spark-1 { left: 10%; bottom: 14%; }
.hero-spark-2 { right: 4%; top: 42%; width: 13px; height: 13px; background: var(--olive); }
.hero-spark-3 { left: 42%; top: 3%; width: 14px; height: 14px; background: var(--cocoa); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
@keyframes bob { 50% { transform: translateY(10px); } }
@keyframes wave { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-12deg); } 75% { transform: rotate(9deg); } 85% { transform: rotate(-5deg); } }
@keyframes twinkle { 50% { transform: scale(0.55) rotate(45deg); opacity: 0.55; } }
@keyframes spin { to { transform: rotate(1turn); } }
.motion .hero-miso { animation: float 6s ease-in-out infinite; }
.motion .hero-card-1 { animation: bob 7s ease-in-out infinite; }
.motion .hero-card-2 { animation: bob 8s ease-in-out -3s infinite reverse; }
.motion .hero-wave { transform-origin: 35% 90%; animation: wave 4.5s ease-in-out 1.4s infinite; }
.motion .hero-spark { animation: twinkle 3.2s ease-in-out infinite; }
.motion .hero-spark-2 { animation-delay: -1.1s; } .motion .hero-spark-3 { animation-delay: -2.2s; }
.motion .hero-halo { animation: spin 80s linear infinite; }

/* ---------- Creator resources ---------- */
.resources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
.resource { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-4); background: var(--cream); border: 1.5px solid var(--cocoa); border-radius: var(--r-lg); }
.resource h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: var(--s-2) 0 0; }
.resource p { margin: 0 0 var(--s-2); color: var(--muted); }
.resource .btn { margin-top: auto; }
.resource-art { width: 100%; height: clamp(150px, 22vw, 220px); display: flex; align-items: center; justify-content: center; padding: var(--s-4); border-radius: 14px; background: repeating-conic-gradient(var(--paper) 0 25%, var(--cream-2) 0 50%) 0 0 / 20px 20px; }
.resource-art img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.theme-content .content-head .lede a { color: var(--paper); }
/* ---------- Featured pack: the supplied banner, shown whole (never cropped) ---------- */
.featured-art { display: block; overflow: hidden; border: 2px solid var(--ink-strong); border-radius: 14px; background: var(--peach); }
.featured-banner { display: block; width: 100%; height: auto; transition: filter var(--t-base) var(--ease); }
.featured-art:hover .featured-banner, .featured-art:focus-visible .featured-banner { filter: brightness(1.06) saturate(1.05); }
.fact-list strong[data-count] { display: inline-block; }

/* ---------- Project logos ---------- */
.project-badge { margin: 0; display: grid; place-items: center; gap: var(--s-3); padding: clamp(28px, 5vw, 56px); border-radius: var(--r-lg); text-align: center;
  background: repeating-linear-gradient(-45deg, rgba(254, 231, 202, 0.22) 0 14px, transparent 14px 28px), var(--peach); }
.project-badge img { width: min(240px, 70%); height: auto; border: 2px solid var(--ink-strong); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink-strong); rotate: -3deg; transition: rotate 0.5s var(--ease), scale 0.5s var(--ease); }
.project-badge:hover img { rotate: 2deg; scale: 1.04; }
.project-badge figcaption { color: var(--ink-strong); font-weight: 600; }
.project-preview { width: 150px; height: auto; aspect-ratio: 1; border-radius: 22px; border: 2px solid var(--ink-strong); box-shadow: 6px 6px 0 var(--peach); transform: translateY(-50%) rotate(-8deg) scale(0.9); }
.project-row:hover .project-preview, .project-row:focus-visible .project-preview { transform: translateY(-50%) rotate(-3deg) scale(1); }

/* ---------- Supplied social icons (pixel art, 200x200 shown small) ---------- */
.social-icon { width: 24px; height: 24px; flex: none; }
.footer-social { display: inline-flex; align-items: center; gap: 10px; }
.footer-social .social-icon { width: 22px; height: 22px; transition: transform var(--t-fast); }
.footer-social:hover .social-icon, .footer-social:focus-visible .social-icon { transform: translateY(-2px) rotate(-8deg); }
.social { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.social .social-icon { grid-row: span 2; width: 40px; height: 40px; }
.social:not(:has(.social-icon)) { grid-template-columns: 1fr; }
.platform-h { display: flex; align-items: center; gap: 12px; }
.platform-h .social-icon { width: 40px; height: 40px; }
.icon-link { display: inline-flex; align-items: center; gap: 8px; }
.icon-link .social-icon { width: 22px; height: 22px; }

/* ---------- Video cards and grids ---------- */
.v-meta { flex-wrap: nowrap; gap: 10px; white-space: nowrap; font-size: 0.9rem; }
.v-platform { display: inline-flex; }
.v-platform .social-icon { width: 20px; height: 20px; }
/* The platform name in a pixel font, to sit with the pixel-art icon. Only these letters are downloaded. */
.v-platform { align-items: center; gap: 6px; }
/* Minecraft Ten (fontspace.com/minecraft-ten-font-f40317), supplied by the studio; freeware, non-commercial. See THIRD-PARTY.md. */
@font-face { font-family: "Minecraft Ten"; src: url("../fonts/minecraft-ten.ttf") format("truetype"); font-display: swap; }
.v-platform-name { font: 400 0.92rem/1 "Minecraft Ten", var(--font-display); letter-spacing: 0.02em; text-transform: none; color: var(--ink-strong); }
.rail-card { transition: transform 0.35s var(--ease); }
.motion a.rail-card:hover, .motion a.rail-card:focus-visible { transform: translateY(-6px); }
.video-grid { --cols: 4; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); max-width: calc(var(--cols) * 250px + (var(--cols) - 1) * var(--s-4)); }
.rail-btn { display: grid; place-items: center; border-radius: 50%; transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast), color var(--t-fast); }
.rail-btn:hover:not(:disabled) { background: var(--ink-strong); color: var(--paper); }
.rail-btn:active:not(:disabled) { transform: scale(0.92); box-shadow: none; }

/* ---------- Buttons: fill on hover (after Magic UI "Interactive Hover Button", MIT, via 21st.dev) ---------- */
/* The fill always covers the whole button and the arrow's space is reserved, so the button never changes size.
   --fx is the fill colour and must contrast with whatever the button sits on. */
.btn-fx { --fx: var(--peach); position: relative; overflow: hidden; isolation: isolate; }
.btn-fx::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fx); border-radius: inherit; transform: scaleX(0); transform-origin: left center; transition: transform 0.35s var(--ease); }
.btn-fx > span { display: inline-flex; align-items: center; }
.btn-fx > span::after { content: "→"; display: inline-block; width: 1em; margin-left: 0.4em; text-align: center; opacity: 0; transform: translateX(-6px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.btn-fx:hover, .btn-fx:focus-visible { color: var(--ink-strong); }
.btn-fx:hover::before, .btn-fx:focus-visible::before { transform: scaleX(1); }
.btn-fx:hover > span::after, .btn-fx:focus-visible > span::after { opacity: 1; transform: none; }
.support-head .btn-fx, .band-peach .btn-fx, .btn-peach.btn-fx { --fx: var(--paper); }
/* The global focus ring squares corners off; buttons keep their own shape. */
.btn:focus-visible { border-radius: var(--r); }
.btn:active { transform: translate(1px, 1px) scale(0.97); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .originals { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > * { margin-bottom: 32px; }
}
@media (max-width: 860px) {
  .ways { grid-template-columns: 1fr; }
  .resources { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; order: -1; }
  .video-grid { --cols: 3 !important; }
  .rail-nav { display: none; }
  .project-row { grid-template-columns: 72px 1fr 24px; grid-template-areas: "thumb name arrow" "thumb meta arrow"; row-gap: 2px; }
  .project-name { grid-area: name; } .project-meta { grid-area: meta; } .project-arrow { grid-area: arrow; }
  .project-preview { grid-area: thumb; position: static; width: 72px; height: 72px; align-self: center; opacity: 1; transform: none; box-shadow: none; aspect-ratio: 1; }
  .project-row:hover .project-preview, .project-row:focus-visible .project-preview { transform: none; }
  .project-row:hover .project-meta, .project-row:focus-visible .project-meta { visibility: visible; }
  .two-col, .host-hero, .page-head-split, .band-split, .partner-card, .contact { grid-template-columns: 1fr; }
  .sticky-head { position: static; }
  .band-body { padding-top: 0; }
  .cards { grid-template-columns: 1fr; }
  .card-wide .media-slot { aspect-ratio: 16 / 10; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery > * { grid-column: span 1 !important; }
  .gallery .g-a { grid-column: 1 / -1 !important; aspect-ratio: 16 / 10; }
  .mod { grid-template-columns: 1fr; grid-template-areas: "name" "by" "sum"; row-gap: 2px; }
  .mod-sum { margin-top: 6px; }
  .partner-row { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  .hero-art { max-width: 320px; }
  /* Phones: each gallery scrolls sideways, so a short last row never happens. */
  .video-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-4); padding-bottom: var(--s-3); max-width: none; }
  .video-grid > li { flex: 0 0 62%; scroll-snap-align: start; }
  .originals { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .wiki-head img { width: 48px; height: 48px; }
  .mods-tools { position: static; }
  .scoreboard li { align-items: baseline; }
  .about-miso { width: 72px; top: -36px; }
}

/* ==========================================================================
   Section themes. One studio, seven rooms: each section keeps the Miso palette
   and fonts but gets its own surface. The class comes from the page address (build.mjs → THEMES).
   ========================================================================== */
.btn-peach { background: var(--peach); color: var(--ink-strong); --shadow: var(--ink-strong); }
.btn-peach:hover { color: var(--ink-strong); }
.band-tight { padding-block: clamp(40px, 6vw, 72px); }
.page-head { position: relative; }

/* Modpacks: a grass-and-dirt block edge, inventory-slot rows and a tooltip-style spec panel. */
.theme-modpacks .page-head { background: linear-gradient(var(--cream) 0 calc(100% - 14px), transparent 0); border-bottom: 0; padding-bottom: clamp(48px, 6vw, 72px); }
.theme-modpacks .page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: linear-gradient(90deg, var(--olive) 0 25%, #8f8748 25% 50%, var(--olive) 50% 75%, #b6ae6a 75%) 0 0 / 56px 6px repeat-x,
              linear-gradient(90deg, var(--cocoa) 0 25%, #7f4a2c 25% 50%, #a8673f 50% 75%, var(--cocoa) 75%) 0 6px / 56px 8px repeat-x; image-rendering: pixelated; }
.theme-modpacks .eyebrow { color: var(--olive-ink); }
.theme-modpacks .project-row { border-radius: 0; }
.theme-modpacks .project-preview { border-radius: 4px; box-shadow: 4px 4px 0 var(--olive), 8px 8px 0 var(--cocoa); image-rendering: pixelated; }
.theme-modpacks .specs { padding: var(--s-5); background: #2b1408; border: 3px solid #5a2f86; outline: 3px solid #1b0b03; color: var(--paper); }
.theme-modpacks .specs .k { color: #c9b7e8; }
.theme-modpacks .specs .v { color: var(--paper); }
.theme-modpacks .specs li::before { border-color: rgba(255, 255, 255, 0.18); }
.theme-modpacks .feature-list li { transition: transform var(--t-fast) var(--ease); }
.motion .theme-modpacks .feature-list li:hover { transform: translateX(6px); }
.project-group-h, .theme-modpacks .section h2 { position: relative; }

/* Modpacks page: the flagship pack up top, like a world-select card. */
/* Featured modpack: the same card as the rest of the site (paper, thin border, soft corners), banner on the left. */
.pack-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-6); align-items: center; margin-bottom: var(--s-8); padding: var(--s-4); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 28px; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base); }
.pack-feature:hover { border-color: var(--cocoa); box-shadow: 6px 6px 0 var(--peach); }
.motion .pack-feature:hover { transform: translate(-3px, -3px); }
.pack-feature .featured-art { text-decoration: none; border: 0; border-radius: 20px; }
.pack-feature-body { padding: var(--s-3) var(--s-4) var(--s-3) 0; }
.pack-feature-body > p:not(.eyebrow):not(.work-by) { color: var(--muted); }
.pack-feature h2, .pack-feature h3 { margin-bottom: var(--s-3); }
/* Pack facts: one quiet line split by dots, not a wall of pills. */
.pack-chips { list-style: none; margin: 0 0 var(--s-5) -22px; padding: 0; display: flex; flex-wrap: wrap; row-gap: 4px; clip-path: inset(0 0 0 22px); }
.pack-chips li { padding: 0; border: 0; background: none; font: 600 0.88rem var(--font-body); color: var(--muted); white-space: nowrap; }
/* Every fact starts with a dot; the list is shifted left and clipped, so a dot that starts a line is never seen. */
.pack-chips li::before { content: "·"; display: inline-block; width: 22px; text-align: center; color: var(--cocoa); }
.pack-feature .work-by { margin: calc(var(--s-2) * -1) 0 var(--s-3); font-size: 0.85rem; color: var(--muted); }
.pack-feature-body > p:not(.eyebrow):not(.work-by) { margin-bottom: var(--s-3); }
.pack-actions { gap: var(--s-3) var(--s-5); }
.pack-actions > * { white-space: nowrap; }

/* Content: a dark screening-room header, big covers, platform-coloured hover. */
.theme-content .content-head { background: var(--footer); color: var(--cream); border-bottom: 0; }
.theme-content .content-head h1 { color: var(--paper); }
.theme-content .content-head .lede, .theme-content .content-head .eyebrow { color: var(--cream-2); }
.theme-content .content-head .btn-ghost { color: var(--paper); border-color: var(--paper); --shadow: var(--peach); }
.theme-content .content-head .btn-ghost:hover { color: var(--paper); }
.theme-content .video-gallery + .video-gallery { margin-top: var(--s-8); }
.theme-content .platform-h { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.theme-content .video-grid { max-width: none; gap: var(--s-6) var(--s-5); }
.theme-content .rail-thumb { border-radius: var(--r-lg); }
.theme-content [data-platform="TikTok"] a.rail-card:hover .rail-thumb { box-shadow: 5px 5px 0 #25F4EE, -5px -5px 0 #FE2C55; border-color: var(--ink-strong); }
.theme-content [data-platform="Instagram"] a.rail-card:hover .rail-thumb { box-shadow: 6px 6px 0 #DD2A7B; border-color: var(--ink-strong); }

/* Our Staff: big friendly avatars with a peach ring that wobbles hello. */
.theme-staff .person { padding: var(--s-5) var(--s-4); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 28px; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.theme-staff .person:hover { box-shadow: 6px 6px 0 var(--peach); border-color: var(--cocoa); }
.motion .theme-staff .person:hover { transform: translate(-3px, -3px); }
.person .avatar img { width: 100%; height: 100%; object-fit: cover; }
.theme-staff .person .avatar { width: 112px; height: 112px; box-shadow: 0 0 0 5px var(--paper), 0 0 0 9px var(--peach); margin-bottom: var(--s-4); }
.motion .theme-staff .person:hover .avatar { animation: wobble 0.6s var(--ease); }
@keyframes wobble { 30% { transform: rotate(-6deg); } 60% { transform: rotate(4deg); } }
.theme-staff .person h3 { font-size: 1.35rem; }
.person-handle { display: inline-flex; align-items: center; gap: 6px; margin: 0; max-width: 100%; font-size: 0.85rem; font-weight: 600; color: var(--ink-strong); white-space: nowrap; }
.person-handle .social-icon { width: 18px; height: 18px; }
.theme-staff .section:first-of-type { background: var(--cream); }

/* Support Us: warm peach, Miso with floating hearts, picture cards. */
.theme-support .support-head { background: var(--peach); border-bottom: 0; }
.theme-support .support-head .lede { color: var(--ink-strong); }
.theme-support .support-head .btn-primary { --shadow: var(--paper); }
.support-hero { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--s-7); align-items: center; }
.support-art { position: relative; justify-self: center; width: min(260px, 60vw); aspect-ratio: 1; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--ink-strong); border-radius: 50%; box-shadow: 8px 8px 0 var(--ink-strong); box-sizing: border-box; }
.support-miso { width: 62%; height: auto; }
.motion .support-miso { animation: float 5s ease-in-out infinite; }
.support-heart { position: absolute; aspect-ratio: 1; height: auto; translate: -50% -50%; background: var(--terracotta); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Hearts sit on a ring inside the circle (radius 39% of its width), sized in % so they scale with it. */
.support-heart-1 { left: 20%; top: 25%; width: 10%; }
.support-heart-2 { left: 80%; top: 75%; width: 7%; background: var(--cocoa); }
.support-heart-3 { left: 20%; top: 75%; width: 6.5%; }
.motion .support-heart { animation: heart-rise 3.6s ease-in-out infinite; }
.motion .support-heart-2 { animation-delay: 1.2s; } .motion .support-heart-3 { animation-delay: 2.4s; }
@keyframes heart-rise { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(-14px) scale(1.15); opacity: 0.7; } }
.support-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-5); }
.support-grid li { padding: var(--s-5); background: var(--cream); border-radius: 24px; border: 1.5px solid transparent; transition: border-color var(--t-fast), transform var(--t-base) var(--ease); }
.support-grid li:hover { border-color: var(--cocoa); }
.motion .support-grid li:hover { transform: translateY(-4px); }
.support-grid img { width: 72px; height: 72px; margin-bottom: var(--s-3); }
.motion .support-grid li:hover img { animation: wobble 0.6s var(--ease); }
.support-grid h3 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.support-grid p { margin: 0; color: var(--muted); font-size: 0.95rem; }
/* Short card headings wrap where they run out of room instead of being balanced into two stubby lines. */
.support-grid h3, .host-perks h3 { text-wrap: wrap; }
.support-grid p, .host-perks p { line-height: 1.55; }
.support-people { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.support-people li { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); background: var(--paper); border-radius: 20px; }
.support-people img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 3px var(--peach); flex: none; }
.support-people strong { display: block; font: 600 1.2rem var(--font-display); color: var(--ink-strong); }
.support-people span { color: var(--muted); }
.support-free { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-4); }
.support-free a { display: grid; gap: var(--s-1); height: 100%; padding: var(--s-5); border: 1.5px solid var(--line-strong); border-radius: 20px; color: var(--ink); text-decoration: none; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.support-free a:hover, .support-free a:focus-visible { border-color: var(--cocoa); box-shadow: 4px 4px 0 var(--peach); color: var(--ink); }
.motion .support-free a:hover { transform: translate(-2px, -2px); }
.support-free .social-icon { width: 40px; height: 40px; margin-bottom: var(--s-2); }
.support-free strong { font: 600 1.15rem var(--font-display); color: var(--ink-strong); }
.support-free span { color: var(--muted); font-size: 0.95rem; }
.support-logo { display: block; width: max-content; padding: 10px 12px; margin-bottom: var(--s-2); background: #10172a; border-radius: 10px; }
.support-logo img { height: 20px; width: auto; }

/* BisectHosting: their navy and logo on a stage, with Miso's coupon ticket. */
.host-stage { padding-block: clamp(56px, 8vw, 112px); background: radial-gradient(120% 90% at 85% 10%, #1d2a4d 0, #10172a 60%); color: #dfe6f5; }
.host-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.host-stage h1 { color: #fff; max-width: 15ch; }
.host-stage h1 span { color: var(--peach); }
.host-stage .lede { color: #c3cde3; }
.host-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--s-4); padding: 6px 14px; border: 1.5px solid var(--peach); border-radius: 999px; font: 600 0.8rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--peach); }
.host-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--peach); }
.motion .host-badge::before { animation: twinkle 2.4s ease-in-out infinite; }
.host-stage .btn-peach { border-color: var(--peach); --shadow: #fff; }
.host-guide { color: #fff; }
.host-guide:hover { color: var(--peach); }
.host-card { position: relative; display: grid; gap: var(--s-5); padding: clamp(24px, 4vw, 40px); background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 28px; }
.host-logo { width: 100%; max-width: 360px; height: auto; }
.coupon { position: relative; padding: var(--s-5); background: var(--paper); color: var(--ink); border-radius: 18px; border: 2px dashed var(--cocoa); }
.coupon::before, .coupon::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #162140; }
.coupon::before { left: -12px; } .coupon::after { right: -12px; }
.coupon-k { margin: 0; font: 600 0.78rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.coupon-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-2) 0; }
.coupon-code strong { font: 700 clamp(2.4rem, 5vw, 3.4rem)/1 var(--font-display); letter-spacing: 0.08em; color: var(--ink-strong); }
.coupon-note { margin: 0; color: var(--muted); }
.host-miso { position: absolute; right: -18px; top: -40px; width: 88px; }
.motion .host-miso { animation: bob 3.6s ease-in-out infinite; }
.host-perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.host-perks li { padding: var(--s-6) var(--s-5); border: 1.5px solid var(--line-strong); border-radius: 20px; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
/* Hover: a dark shadow on the right and bottom only, no top bar. */
.step-copy { margin-top: var(--s-2); }
.host-perks li:hover { box-shadow: 6px 6px 0 #10172a; }
.motion .host-perks li:hover { transform: translate(-3px, -3px); }
.host-perks img { width: 64px; height: 64px; margin-bottom: var(--s-3); }
.host-perks h3 { margin-bottom: var(--s-2); }
.host-perks p { margin: 0; color: var(--muted); }

/* Contact: simple route cards. */
.theme-contact .page-head { border-bottom: 0; }
.contact-routes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5); }
.contact-routes > li { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-6); background: var(--cream); border-radius: 24px; }
.contact-routes h2 { font-size: 1.4rem; margin: 0; }
.contact-routes p { margin: 0 0 var(--s-3); color: var(--muted); }
.route-icon { width: 48px; height: 48px; margin-bottom: var(--s-2); }
.contact-routes > li > .btn { justify-self: start; }
.route-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }

/* Home: Support Us and BisectHosting side by side. */
.home-duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.duo-card { display: flex; gap: var(--s-5); align-items: center; padding: var(--s-6); background: var(--paper); border: 2px solid var(--ink-strong); border-radius: 24px; color: var(--ink); text-decoration: none; box-shadow: 6px 6px 0 var(--ink-strong); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.duo-card:hover, .duo-card:focus-visible { color: var(--ink); box-shadow: 9px 9px 0 var(--ink-strong); }
.motion .duo-card:hover { transform: translate(-3px, -3px); }
.duo-card > img { width: 88px; flex: none; }
.duo-body { display: grid; gap: var(--s-2); }
.duo-body strong { font: 600 1.4rem var(--font-display); color: var(--ink-strong); }
.duo-hosting { flex-direction: column; align-items: flex-start; }

@media (max-width: 960px) {
  .host-grid, .support-hero { grid-template-columns: 1fr; }
  .host-perks, .home-duo, .pack-feature { grid-template-columns: 1fr; }
  .pack-feature { gap: var(--s-4); }
  .pack-feature-body { padding: 0 var(--s-2) var(--s-2); }
  .support-art { order: -1; width: min(200px, 50vw); }
}
@media (max-width: 560px) {
  .duo-card { flex-direction: column; align-items: flex-start; padding: var(--s-5); }
  .host-miso { width: 64px; top: -28px; right: -6px; }
  /* Keeps "Download on CurseForge" on one line down to 360px. */
  .pack-feature { padding: var(--s-3); }
  .pack-feature-body { padding: 0 var(--s-1) var(--s-1); }
  .pack-feature .btn { width: 100%; justify-content: center; white-space: nowrap; padding-inline: 14px; letter-spacing: 0.02em; }
}

/* ---------- BisectHosting landing page ---------- */
.btn-lg { padding: 18px 28px; font-size: 1.05rem; }
.host-code-inline { color: var(--peach); letter-spacing: 0.06em; }
.coupon-off { margin: 0; font: 600 1.05rem var(--font-display); color: var(--ink-strong); }
.coupon-off strong { font-size: 2.6rem; line-height: 1; margin-right: 6px; color: var(--cocoa); }
.coupon-code .coupon-k { width: 100%; }
.host-pack { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); background: rgba(255, 255, 255, 0.06); border-radius: 16px; }
.host-pack img { width: 56px; height: 56px; border-radius: 12px; image-rendering: pixelated; flex: none; }
.host-pack p { margin: 0; display: grid; gap: 2px; color: #c3cde3; font-size: 0.86rem; }
.host-pack strong { color: #fff; font: 600 1rem var(--font-display); }
.host-facts { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: var(--s-5) 0 0; border-top: 1px solid rgba(255, 255, 255, 0.14); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.host-facts li { display: inline-flex; align-items: center; gap: 10px; font: 600 0.92rem var(--font-display); color: #fff; }
.host-facts li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--peach) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310172a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.host-perks-4 { grid-template-columns: repeat(4, 1fr); margin-top: var(--s-6); }
.faq details > p { margin: 0; padding: 0 0 18px; color: var(--ink); }
.faq summary:hover { color: var(--cocoa); }
.host-final { text-align: center; display: grid; justify-items: center; gap: var(--s-2); }
.host-final img { width: 96px; }
.motion .host-final img { animation: bob 3.6s ease-in-out infinite; }
.host-final .btn-row { justify-content: center; }
.host-source { margin-top: var(--s-5); font-size: 0.8rem; color: var(--muted); }
.host-sticky-left { display: grid; line-height: 1.1; }
.host-sticky-note { font-size: 0.7rem; color: #c3cde3; padding: 0 4px 4px; }
/* On phones the offer stays one tap away. */
.host-sticky { display: none; }
@media (max-width: 860px) {
  .theme-hosting { padding-bottom: 76px; }
  .host-sticky { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; background: #10172a; border-radius: 18px; box-shadow: 0 10px 30px rgba(16, 23, 42, 0.35); }
  .host-sticky-code { all: unset; cursor: pointer; white-space: nowrap; font: 600 0.88rem var(--font-display); letter-spacing: 0.06em; color: #fff; padding: 8px 4px; }
  .host-sticky-code:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; border-radius: 6px; }
  .host-sticky .btn-peach { --shadow: transparent; white-space: nowrap; }
}
@media (max-width: 960px) {
  .host-perks-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .host-perks-4 { grid-template-columns: 1fr; }
  .host-facts { gap: var(--s-3) var(--s-4); }
  .btn-lg { padding: 16px 18px; font-size: 0.92rem; justify-content: center; }
  .host-copy .btn-row > .btn { width: 100%; }
}

/* ---------- Our Staff: 4 columns, then 3, then 2 ---------- */
.avatar-letter { font: 700 2.2rem/1 var(--font-display); color: var(--ink-strong); background: var(--cream) !important; }
[id^="person-"] { scroll-margin-top: 110px; }
@media (max-width: 960px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } .people { gap: var(--s-3); } .theme-staff .person { padding: var(--s-4) var(--s-2); } .theme-staff .person .avatar { width: 88px; height: 88px; } .person-handle { font-size: 0.78rem; } }

/* ---------- Our Work: one card per project, with who made it ---------- */
.work-head { margin: clamp(48px, 7vw, 88px) 0 var(--s-5); }
.work-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-5); }
.work-card { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto auto; gap: var(--s-2); padding: var(--s-5); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 24px; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base); }
.work-card:hover, .work-card:focus-within { border-color: var(--cocoa); box-shadow: 6px 6px 0 var(--peach); }
.motion .work-card:hover { transform: translate(-3px, -3px); }
.work-logo { width: 88px; height: 88px; border-radius: 18px; image-rendering: pixelated; margin-bottom: var(--s-2); box-shadow: 0 0 0 1px var(--line); }
.work-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.work-chips li { padding: 3px 10px; border-radius: 999px; background: var(--cream); font: 600 0.72rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--olive-ink); }
.work-chips .work-status { background: var(--ink-strong); color: var(--paper); }
.work-card h3 { margin: var(--s-1) 0 0; font-size: 1.35rem; }
.work-link { color: var(--ink-strong); text-decoration: none; }
.work-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.work-sum { margin: 0; color: var(--muted); font-size: 0.95rem; }
.work-by { display: flex; align-items: center; gap: 8px; margin: var(--s-2) 0 0; font-size: 0.88rem; font-weight: 600; color: var(--ink-strong); }
.work-by img, .work-by > span { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--cream); font: 700 0.8rem var(--font-display); }
.work-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.work-soon { font-size: 0.85rem; font-weight: 600; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  /* Keyframe movement stops; fades and colour changes stay, so the page still responds. */
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero-art > *, .project-badge img, .btn-fx::before, .rail-card, .project-preview, .theme-staff .person, .support-grid li, .support-free a, .host-perks li, .duo-card, .work-card, .host-facts li, .pack-feature { transition: none !important; }
}
@page { size: A4; margin: 16mm; }
@media print {
  .site-header, .site-footer, .wiki-side, .toc, .pager, .pixel-edge, .skip, .no-print { display: none !important; }
  .wiki { display: block; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-head { padding-block: 10mm; }
  .section-cream, .band-peach { background: #fff; }
  .scoreboard li, .project-row { break-inside: avoid; }
  .project-preview { display: none; }
  .js [data-reveal], .js [data-split] .w > span, .js [data-enter] { opacity: 1 !important; transform: none !important; filter: none !important; }
  a { color: #000; }
  h1, h2, h3, .score { color: var(--ink-strong); }
}

/* Code blocks in the wiki (commands, file contents). Wrap long lines on small screens instead of scrolling the page. */
.prose pre { max-width: 72ch; margin: 0 0 1.4em; padding: 14px 18px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre code { background: none; padding: 0; font-size: 0.9rem; line-height: 1.6; }
.prose td code, .prose li code, .prose p code, .prose p a, .prose li a { overflow-wrap: anywhere; }

/* Release notes (data/releases.json): a version timeline, type filters and folded older releases. */
.releases { max-width: 72ch; margin: 8px 0 2em; }
.rel-timeline { margin: 0 0 18px; }
.rel-timeline ol { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.rel-timeline li { flex: none; margin: 0; }
.rel-timeline a { display: block; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; color: var(--ink); line-height: 1.25; transition: border-color var(--t-fast), background-color var(--t-fast); }
.rel-timeline a:hover { border-color: var(--cocoa); background: var(--cream); }
.rel-timeline a[aria-current="true"] { border-color: var(--peach); background: var(--cream); }
.rel-timeline strong { display: block; font: 600 1rem var(--font-display); color: var(--ink-strong); }
.rel-timeline span { font-size: 0.8rem; color: var(--muted); }
.rel-tools { display: grid; gap: 12px; margin: 0 0 20px; }
.rel-tools[hidden] { display: none; }
.rel-search input { width: 100%; font: inherit; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.rel-search input:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 2px; }
.rel-empty { margin: 0; color: var(--muted); }
.rel-list { display: grid; gap: 14px; }
.release { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); scroll-margin-top: calc(var(--header-h) + 16px); }
.release.is-latest { border-color: var(--peach); box-shadow: 0 0 0 3px var(--cream); }
.release summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; position: relative; display: grid; gap: 6px; }
.release summary::-webkit-details-marker { display: none; }
.release summary::after { content: "+"; position: absolute; right: 18px; top: 14px; font: 400 1.5rem var(--font-body); color: var(--cocoa); transition: transform var(--t-base) var(--ease); }
.release details[open] summary::after { transform: rotate(45deg); }
.release summary:focus-visible { outline: 2px solid var(--cocoa); outline-offset: -2px; border-radius: var(--r); }
.rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rel-version { font: 600 1.35rem var(--font-display); color: var(--ink-strong); }
.rel-latest { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--peach); color: var(--ink-strong); }
.rel-head time { font-size: 0.88rem; color: var(--muted); }
.rel-title { font-weight: 600; color: var(--ink); }
.rel-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-badge { display: inline-block; font-size: 0.74rem; font-weight: 600; line-height: 1.2; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; color: var(--ink-strong); background: var(--cream); }
.rel-added { background: #E6E2BC; border-color: rgba(95, 90, 38, 0.3); color: var(--olive-ink); }
.rel-removed { background: #F8D5BE; border-color: rgba(228, 124, 61, 0.45); color: #7A3412; }
.rel-changed { background: var(--cream-2); border-color: var(--line-strong); }
.rel-fixed { background: #DCE3CF; border-color: rgba(95, 90, 38, 0.3); color: #3F4A1C; }
.rel-updated { background: var(--paper); border-color: var(--line-strong); color: var(--muted); }
.rel-performance { background: #FBD2B0; border-color: rgba(152, 89, 53, 0.35); color: var(--ink-strong); }
.rel-config { background: var(--cocoa); color: var(--paper); }
.rel-body { padding: 0 20px 18px; border-top: 1px solid var(--line); }
.rel-summary { margin: 16px 0 12px; }
.rel-warn { margin: 12px 0 4px; }
.rel-warn p { margin: 0 0 0.6em; }
.rel-sec h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 8px; font: 600 0.95rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink-strong); }
.rel-sec ul { margin: 0 0 0.6em; padding-left: 1.2em; }
.rel-sec li { margin-bottom: 0.3em; overflow-wrap: anywhere; }
.rel-source { margin: 14px 0 0; font-size: 0.9rem; }
.rel-sec[hidden], .release[hidden], .rel-sec li[hidden] { display: none; }
.releases mark { background: var(--cream-2); color: inherit; padding: 0 2px; border-radius: 3px; }
@media (max-width: 560px) {
  .release summary { padding: 14px 44px 14px 16px; }
  .rel-body { padding: 0 16px 16px; }
  .rel-version { font-size: 1.2rem; }
}
