/* koonixlabs.com
   Studio pages: "the lab". Ink-violet night with a faint dot grid, mint as the studio's
   own accent, Bricolage Grotesque for display, JetBrains Mono for small lab labels.
   Medusa pages (body.medusa) keep the game's own duel look (D-033): violet mat, gold, Lilita One.
   One dark theme by design; every colour is a token below. Fonts are self-hosted (static/fonts/OFL-*.txt). */
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('fonts/atkinson-hyperlegible-next-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Lilita One'; src: url('fonts/lilita-one-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* Studio */
  --ink: #0b0a14;
  --ink-2: #121021;
  --ink-3: #1b1832;
  --line: rgba(222, 216, 255, 0.11);
  --line-strong: rgba(222, 216, 255, 0.22);
  --text: #ece8fb;
  --soft: #b6aed6;
  --faint: #8a83ad;
  --mint: #6ff2c9;
  --mint-deep: #1d6b58;
  --on-mint: #06261e;
  --dot: rgba(222, 216, 255, 0.08);
  /* Medusa */
  --mat-glow: #33287a;
  --mat-mid: #1b1540;
  --mat-deep: #0f0c24;
  --panel-raised: #2c2368;
  --cream: #fff3d6;
  --lilac: #c9c0e8;
  --gold: #ffd45c;
  --attack: #e5484d;
  --defence: #3e86f5;
  --health: #46a758;
  --skip: #8e4ec6;
  --special: #f5a524;
  /* Type */
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --medusa: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --gutter: max(20px, 4vw);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ink); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
}
body.medusa { background: var(--mat-deep) radial-gradient(ellipse 120% 70% at 50% 0%, var(--mat-glow), var(--mat-mid) 45%, var(--mat-deep) 80%) no-repeat; }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
body.medusa a { color: var(--gold); }
body.medusa a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--text); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 0.45em; text-wrap: balance; }
h1 { font-size: clamp(44px, 7.4vw, 92px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4.2vw, 48px); }
h3 { font-size: 22px; letter-spacing: -0.01em; }
body.medusa h1, body.medusa h2, body.medusa h3 { font-family: var(--medusa); font-weight: 400; letter-spacing: 0.01em; color: var(--cream); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--mint); color: var(--on-mint); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.label { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); margin: 0 0 16px; }
body.medusa .label, .eyebrow { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--soft); max-width: 36em; line-height: 1.55; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(11, 10, 20, 0.78); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
body.medusa .site-header { background: rgba(15, 12, 36, 0.78); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--soft); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.header-cta { font-size: 15px !important; min-height: 40px !important; padding: 0 16px !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--mint); color: var(--on-mint); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 0 0 0 rgba(111, 242, 201, 0);
}
.btn:hover { color: var(--on-mint); transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(111, 242, 201, 0.55); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1.5px var(--soft); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
/* Medusa buttons keep the chunky game style */
body.medusa .btn, .btn.gold {
  border-radius: 14px; background: var(--gold); color: #0d0b18; font-family: var(--medusa); font-weight: 400; font-size: 21px; letter-spacing: 0.02em;
  border: 3px solid #0d0b18; box-shadow: 0 5px 0 #0d0b18;
}
body.medusa .btn:hover, .btn.gold:hover { color: #0d0b18; transform: translateY(-2px); box-shadow: 0 7px 0 #0d0b18; }
body.medusa .btn.secondary { background: var(--panel-raised); color: var(--cream); }
body.medusa .btn.secondary:hover { color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--soft); font-size: 14px; font-weight: 700; }
.pill b { color: var(--text); }
body.medusa .pill b { color: var(--cream); }

/* ---------- Studio home ---------- */
.lab-bg { position: relative; isolation: isolate; }
.lab-bg::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
}
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 .dim { color: var(--faint); }
.hero h1 .glow { color: var(--mint); }
.hero .lede { margin-bottom: 30px; }

.showcase {
  position: relative; display: block; border-radius: 28px; overflow: hidden; text-decoration: none; color: var(--cream);
  background: radial-gradient(ellipse 90% 70% at 50% 15%, var(--mat-glow), var(--mat-mid) 55%, var(--mat-deep));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 212, 92, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.showcase:hover { color: var(--cream); transform: translateY(-4px) rotate(-0.3deg); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 212, 92, 0.5); }
.showcase .stage { position: relative; height: clamp(260px, 30vw, 360px); }
.showcase .stage img {
  position: absolute; left: 50%; bottom: -8%; width: 34%; border-radius: 12px; border: 4px solid #0d0b18;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); transform-origin: 50% 140%;
}
.showcase .stage img:nth-child(1) { transform: translateX(-50%) rotate(-24deg); }
.showcase .stage img:nth-child(2) { transform: translateX(-50%) rotate(-12deg); }
.showcase .stage img:nth-child(4) { transform: translateX(-50%) rotate(12deg); }
.showcase .stage img:nth-child(5) { transform: translateX(-50%) rotate(24deg); }
.showcase .stage img:nth-child(3) { transform: translateX(-50%) translateY(-8%); width: 40%; z-index: 1; border-color: var(--gold); }
.showcase .info { position: relative; z-index: 2; padding: 22px 26px 26px; background: linear-gradient(transparent, rgba(10, 8, 24, 0.85) 30%); margin-top: -40px; }
.showcase .status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mint); margin-bottom: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(111, 242, 201, 0.18); }
.showcase .name { font-family: var(--medusa); font-size: 44px; line-height: 1; color: var(--gold); text-shadow: 0 4px 0 #0d0b18; }
.showcase .tagline { color: var(--lilac); margin: 6px 0 0; font-size: 16px; }

.section { padding: clamp(56px, 7vw, 96px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head p { color: var(--soft); max-width: 30em; margin: 0; }

.games { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.game-row {
  display: grid; grid-template-columns: 56px 96px minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 24px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text);
  border-radius: 4px; transition: background 0.15s ease;
}
a.game-row:hover { background: rgba(255, 255, 255, 0.03); color: var(--text); }
.game-row .idx { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.game-row .thumb { width: 96px; height: 96px; border-radius: 22px; overflow: hidden; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6); }
.game-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-row h3 { font-size: 30px; margin: 0 0 4px; }
.game-row p { margin: 0 0 10px; color: var(--soft); max-width: 40em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--soft); }
.chip.live { background: rgba(111, 242, 201, 0.12); color: var(--mint); }
.game-row .go { font-family: var(--display); font-weight: 700; color: var(--mint); white-space: nowrap; }
.game-row.soon .thumb { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--ink-2), var(--ink-2) 8px, var(--ink-3) 8px, var(--ink-3) 16px); box-shadow: inset 0 0 0 1px var(--line); }
.game-row.soon .thumb img { width: 44px; height: 44px; opacity: 0.7; }
.game-row.soon h3 { color: var(--soft); }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.principle { padding: 26px 0; border-top: 1px solid var(--line); }
.principle h3 { margin-bottom: 8px; }
.principle p { margin: 0; color: var(--soft); max-width: 30em; }

.maker { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; padding: clamp(28px, 4vw, 44px); border-radius: 28px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.maker img { width: 72px; height: 72px; }
.maker h2 { font-size: clamp(26px, 3vw, 34px); }
.maker p { color: var(--soft); max-width: 40em; }
.maker p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(64px, 8vw, 112px); border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--soft); font-size: 15px; background: rgba(0, 0, 0, 0.18); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid .brand { margin-bottom: 10px; }
.footer-grid p { margin: 0; max-width: 22em; color: var(--faint); }
.footer-col h4 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 6px 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--soft); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--faint); font-size: 14px; }

/* ---------- Text pages: privacy, terms, support, press ---------- */
.page-head { padding: clamp(44px, 7vw, 88px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(40px, 6vw, 68px); }
.page-head .meta { color: var(--faint); font-family: var(--mono); font-size: 13px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 92px; display: grid; gap: 2px; font-size: 14.5px; }
.toc .label { margin-bottom: 10px; color: var(--faint); }
.toc a { color: var(--soft); text-decoration: none; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); border-left-color: var(--mint); }
.prose { max-width: 68ch; min-width: 0; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.8em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text); }
body.medusa .prose strong { color: var(--cream); }
.in-short { padding: 22px 24px; border-radius: 18px; background: linear-gradient(135deg, rgba(111, 242, 201, 0.10), rgba(111, 242, 201, 0.03)); box-shadow: inset 0 0 0 1px rgba(111, 242, 201, 0.28); margin: 0 0 2em; }
.in-short .label { margin-bottom: 8px; }
.in-short p:last-child, .in-short ul:last-child { margin-bottom: 0; }
body.medusa .callout { padding: 18px 22px; border-radius: 14px; background: rgba(111, 242, 201, 0.08); box-shadow: inset 0 0 0 1px rgba(111, 242, 201, 0.3); margin: 0 0 1.5em; }
body.medusa .callout p:last-child { margin: 0; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px 26px; border-radius: 22px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 2.5em; }
.contact-card .addr { font-family: var(--mono); font-size: clamp(16px, 2.2vw, 20px); color: var(--text); user-select: all; word-break: break-all; }
.contact-card .note { color: var(--faint); font-size: 14px; margin: 4px 0 0; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; color: var(--text); padding: 16px 32px 16px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-family: var(--mono); font-size: 22px; color: var(--faint); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); color: var(--mint); }
details > p { margin: 0 0 16px; color: var(--soft); }
.toc-chips { display: none; }

/* ---------- Medusa page ---------- */
.m-hero { padding: clamp(40px, 7vw, 88px) 0 24px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.m-hero h1 { font-size: clamp(56px, 11vw, 112px); color: var(--gold) !important; text-shadow: 0 5px 0 #0d0b18; margin-bottom: 0.08em; }
.m-hero .sub { font-family: var(--medusa); font-size: clamp(22px, 3.4vw, 32px); color: var(--lilac); margin-bottom: 18px; }
.m-hero .lede { color: var(--lilac); }
.m-hero .btn-row { margin: 26px 0 18px; }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.fan { position: relative; height: clamp(300px, 42vw, 460px); }
.fan img { position: absolute; left: 50%; bottom: 0; width: 38%; border-radius: 14px; border: 4px solid #0d0b18; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); transform-origin: 50% 130%; }
.fan img:nth-child(1) { transform: translateX(-50%) rotate(-30deg); }
.fan img:nth-child(2) { transform: translateX(-50%) rotate(-15deg); }
.fan img:nth-child(4) { transform: translateX(-50%) rotate(15deg); }
.fan img:nth-child(5) { transform: translateX(-50%) rotate(30deg); }
.fan img:nth-child(3) { transform: translateX(-50%) translateY(-6%); z-index: 1; width: 44%; border-color: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .fan img:nth-child(3) { animation: float 5s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateX(-50%) translateY(-9%); } }
}
body.medusa .section { padding: 40px 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.feature { padding: 22px; border-radius: 18px; background: rgba(15, 12, 36, 0.7); border: 1px solid var(--line); }
.feature .ico { font-size: 28px; line-height: 1; margin-bottom: 10px; }
.feature h3 { font-size: 21px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--lilac); font-size: 16px; }
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 8px var(--gutter) 22px; margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 min(64vw, 250px); scroll-snap-align: center; }
.shots img { border-radius: 26px; border: 4px solid #0d0b18; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); }
.shots figcaption { text-align: center; color: var(--faint); font-size: 14px; margin-top: 10px; }
.band { margin-top: 40px; padding: 32px; border-radius: 26px; background: linear-gradient(135deg, var(--panel-raised), var(--mat-mid)); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.band h2 { margin: 0 0 6px; }
.band p { margin: 0; color: var(--lilac); }

/* How to play */
.lesson { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.lesson .num { font-family: var(--medusa); color: var(--gold); font-size: 18px; }
.lesson .mini { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; max-width: 300px; }
.lesson .mini img { width: 92px; border-radius: 8px; border: 2px solid #0d0b18; }
.type-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.type-legend span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px; color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(15, 12, 36, 0.7); border: 1px solid var(--line); border-left: 5px solid var(--t, var(--lilac)); }
.card-row img { width: 84px; border-radius: 8px; border: 2px solid #0d0b18; }
.card-row h3 { font-size: 20px; margin: 0 0 2px; }
.card-row .facts { font-size: 13px; color: var(--faint); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.card-row p { margin: 0; font-size: 15px; color: var(--lilac); line-height: 1.45; }
.t-attack { --t: var(--attack); } .t-defence { --t: var(--defence); } .t-health { --t: var(--health); } .t-skip { --t: var(--skip); } .t-special { --t: var(--special); }
body.medusa .toc-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
body.medusa .toc-row a { font-size: 14px; font-weight: 700; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--lilac); }
body.medusa .toc-row a:hover { color: var(--gold); }

/* Press kit */
.facts-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.facts-table th, .facts-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-table th { width: 34%; color: var(--faint); font-weight: 700; padding-right: 16px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; margin-bottom: 1.5em; }
.download { display: block; padding: 14px; border-radius: 16px; background: rgba(15, 12, 36, 0.7); border: 1px solid var(--line); text-decoration: none; color: var(--lilac) !important; font-size: 14px; }
.download img { border-radius: 10px; margin-bottom: 10px; background: var(--mat-mid); }
.download b { display: block; color: var(--cream); }

/* 404 */
.lost { text-align: center; padding: 100px 0 40px; }
.lost .lede { margin: 0 auto 28px; }
.lost .btn-row { justify-content: center; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .hero-grid, .m-hero { grid-template-columns: 1fr; }
  .m-hero .fan { order: -1; height: 300px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .toc .label { width: 100%; margin-bottom: 2px; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { width: 100%; order: 3; margin: 0 -12px; }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .game-row { grid-template-columns: 64px minmax(0, 1fr); gap: 6px 16px; padding: 20px 0; }
  .game-row .idx { grid-column: 1 / -1; }
  .game-row .thumb { width: 64px; height: 64px; border-radius: 16px; align-self: start; }
  .game-row h3 { font-size: 24px; }
  .game-row .go { grid-column: 2; }
  .principles { grid-template-columns: 1fr; }
  .maker { grid-template-columns: 1fr; }
  .lesson { grid-template-columns: 1fr; }
  .lesson .mini img { width: 72px; }
  .band { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Get Medusa */
.get-head { display: flex; gap: 22px; align-items: center; }
.get-icon { width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--ink); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); flex: none; }
.get-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-top: 12px; }
.get-card { padding: 22px; border-radius: var(--radius); background: rgba(15, 12, 36, 0.75); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.get-card h2 { font-size: 28px; margin: 0; }
.get-card .btn { text-align: center; font-size: 19px; padding: 6px 14px; line-height: 1.15; }
.get-card ol { margin: 0; padding-left: 1.2em; color: var(--lilac); font-size: 15px; }
.get-card li { margin-bottom: 0.4em; }
.get-card strong { color: var(--cream); }
.btn.disabled { opacity: 0.6; cursor: default; box-shadow: none; transform: none; }
button.btn { cursor: pointer; }
@media (max-width: 520px) { .get-head { flex-direction: column; align-items: flex-start; } .get-icon { width: 72px; height: 72px; } }
