/* tolkara.org — night sky, gilded mark. No external requests. */

:root {
  color-scheme: dark;

  --night-0: #050a1c;
  --night-1: #0a1330;
  --night-2: #0e1b44;
  --night-3: #16296a;
  --panel: rgba(20, 36, 84, 0.42);
  --panel-solid: #0e1a40;
  --line: rgba(146, 174, 255, 0.16);
  --line-strong: rgba(146, 174, 255, 0.3);

  --text: #edf0fa;
  --muted: #a9b6d8;
  --faint: #7d8cb4;

  --gold-hi: #ffe39a;
  --gold: #f2b84e;
  --gold-deep: #c48a38;
  --gem-hi: #9fe6ff;
  --gem: #4aa8ff;
  --moon: #f0b48e;

  --ok: #6fdc9f;
  --warn: #f2b84e;
  --exp: #c4a3ff;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--gem-hi); text-decoration-color: rgba(159, 230, 255, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: rgba(146, 174, 255, 0.12); padding: 0.12em 0.4em; border-radius: 5px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: #1b1203; padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.gold {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 48%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 9px; height: 9px; transform: rotate(45deg) scaleY(1.35);
  background: linear-gradient(135deg, var(--gem-hi), var(--gem) 55%, #1c5bd8);
  flex: none;
}

.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 62ch; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 10, 28, 0.72);
  backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.01em; }
.brand img { width: 36px; height: 36px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(146, 174, 255, 0.1); }
.nav .nav-gh { display: inline-flex; align-items: center; gap: 8px; color: var(--text); border: 1px solid var(--line-strong); margin-left: 8px; }
.nav .nav-gh svg { width: 17px; height: 17px; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 64px; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gutter) 16px;
    background: #050a1c; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav .nav-gh { margin: 8px 0 0; justify-content: center; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 11px; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #221603;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #d99a36);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 30px -10px rgba(242, 184, 78, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 14px 34px -10px rgba(242, 184, 78, 0.7); }
.btn-ghost { color: var(--text); border-color: var(--line-strong); background: rgba(146, 174, 255, 0.06); }
.btn-ghost:hover { background: rgba(146, 174, 255, 0.14); border-color: rgba(146, 174, 255, 0.5); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% 30%, rgba(47, 134, 255, 0.26), transparent 62%),
    radial-gradient(700px 420px at 12% 0%, rgba(68, 113, 196, 0.22), transparent 70%),
    linear-gradient(180deg, #081232 0%, #0d1d4c 58%, #14296a 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px);
  align-items: center; padding-block: clamp(48px, 8vw, 104px) clamp(150px, 17vw, 230px);
}
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 30px; }
.hero-qual { margin-top: 22px; font-size: 0.94rem; line-height: 1.55; color: var(--muted); max-width: 52ch; padding-left: 14px; border-left: 2px solid rgba(242, 184, 78, 0.6); }
.hero-watch { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 0.96rem; color: var(--gold-hi); text-decoration: none; }
.hero-watch svg { width: 18px; height: 18px; }
.hero-watch:hover { text-decoration: underline; }

.stars { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0.55; animation: twinkle 5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.6; } }

.horizon { position: absolute; left: 0; right: 0; bottom: -1px; z-index: -1; width: 100%; height: clamp(130px, 17vw, 240px); pointer-events: none; }

.device {
  position: relative; margin: 0;
  background: linear-gradient(145deg, #2b2e38, #0b0c10 40%, #1a1c23);
  padding: 2.1%; border-radius: 4.2% / 6%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 120px -20px rgba(47, 134, 255, 0.5);
}
.device img { width: 100%; border-radius: 2.2% / 3.2%; aspect-ratio: 2420 / 1668; object-fit: cover; background: #000; }
.hero .device { transform: perspective(1600px) rotateY(-5deg) rotateX(2deg); transform-origin: 60% 50%; }
.device-caption { margin-top: 18px; font-size: 0.84rem; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 36px 116px; }
  .hero .device { transform: none; }
  .hero h1 { margin-bottom: 16px; }
  .hero .lede { margin-bottom: 22px; }
  .horizon { height: 100px; }
  .stars { display: none; }
}

/* ---------- facts strip ---------- */

.facts { background: #14296a; border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 0 0 clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.facts li { padding: 6px clamp(12px, 2vw, 28px); border-left: 1px solid var(--line-strong); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 600; line-height: 1.1; }
.facts span { display: block; margin-top: 6px; font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 860px) {
  .facts ul { grid-template-columns: repeat(2, 1fr); gap: 26px 0; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section.alt { background: linear-gradient(180deg, var(--night-1), var(--night-0)); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: 16px; }

.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 700px) { .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px); position: relative;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.97rem; }
.card li + li { margin-top: 6px; }

/* ---------- games ---------- */

.games { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.game { grid-column: span 2; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game.wide { grid-column: span 3; }
.game picture, .game > img { display: block; }
.game img { width: 100%; aspect-ratio: 2420 / 1668; object-fit: cover; border-bottom: 1px solid var(--line); background: #000; }
.game-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.game-body .game-meta { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 0.76rem; line-height: 1.6; color: var(--muted); letter-spacing: 0.02em; }
@media (max-width: 960px) { .game, .game.wide { grid-column: span 3; } }
@media (max-width: 640px) { .game, .game.wide { grid-column: span 6; } }

.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(111, 220, 159, 0.08); }
.pill.early { color: var(--warn); background: rgba(242, 184, 78, 0.08); }
.pill.exp { color: var(--exp); background: rgba(196, 163, 255, 0.08); }
.pill.no { color: #ff9d9d; background: rgba(255, 157, 157, 0.08); }

.more { margin-top: 28px; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--gold-hi); }
.arrow-link::after { content: "→"; transition: transform 0.15s ease; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- stack diagram ---------- */

.stacks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 800px) { .stacks { grid-template-columns: minmax(0, 1fr); } }
.stack { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; }
.stack h3 { margin-bottom: 6px; }
.stack > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; flex: 1; }
.layers .os { margin-top: auto; }
.layers li {
  position: relative; border-radius: 10px; padding: 13px 16px; border: 1px solid var(--line-strong);
  background: rgba(10, 19, 48, 0.7);
}
.layers li + li::before {
  content: attr(data-via); position: absolute; left: 22px; top: -23px; height: 20px; padding-left: 14px;
  font: 0.72rem/20px var(--mono); color: var(--faint); border-left: 1px dashed var(--line-strong);
}
.layers b { display: block; font-weight: 600; }
.layers span { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.layers .guest { border-style: dashed; }
.layers .tk { border-color: rgba(242, 184, 78, 0.65); background: linear-gradient(180deg, rgba(242, 184, 78, 0.13), rgba(242, 184, 78, 0.04)); }
.layers .tk b { color: var(--gold-hi); }
.layers .os { background: rgba(74, 168, 255, 0.1); border-color: rgba(74, 168, 255, 0.45); }

/* ---------- modes ---------- */

.mode .tag { font: 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; display: block; }
.mode dl { margin: 16px 0 0; display: grid; gap: 12px; font-size: 0.93rem; }
.mode dt { font: 600 0.8rem/1.3 var(--sans); color: var(--text); margin-bottom: 2px; }
.mode.untested { border-style: dashed; background: transparent; }
.mode.untested .tag { color: var(--exp); }
.mode dd { margin: 0; color: var(--muted); }

/* ---------- get started ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 600 0.9rem var(--mono); color: var(--gold-hi);
  border: 1px solid rgba(242, 184, 78, 0.6); background: rgba(242, 184, 78, 0.08);
}
.steps li::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 2px; width: 1px; background: var(--line-strong); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 0.95rem; }

.need { border-color: rgba(242, 184, 78, 0.4); }
.need h3 { font-size: 1.15rem; }
.check { list-style: none; padding: 0 !important; }
.check li { position: relative; padding-left: 26px; }
.check li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; transform: rotate(45deg) scaleY(1.3); background: linear-gradient(135deg, var(--gold-hi), var(--gold-deep)); }

.codeblock { position: relative; margin: 16px 0 0; background: #060b1f; border: 1px solid var(--line); border-radius: 10px; }
.codeblock-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px 7px 16px; border-bottom: 1px solid var(--line); font: 0.74rem var(--mono); color: var(--faint); }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; line-height: 1.7; color: #d6def5; }
.codeblock pre code { background: none; padding: 0; border-radius: 0; font-size: 0.84rem; }
.codeblock .c { color: var(--faint); }
.codeblock button {
  font: 600 0.72rem var(--mono); color: var(--muted);
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 9px; cursor: pointer;
}
.codeblock button:hover { color: var(--text); }

/* ---------- principles ---------- */

.principles { counter-reset: p; }
.principle { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.principle::before { counter-increment: p; content: "0" counter(p); font: 0.78rem var(--mono); color: var(--gold); letter-spacing: 0.1em; display: block; margin-bottom: 10px; }
.principle h3 { margin-bottom: 8px; font-size: 1.2rem; }
.principle p { color: var(--muted); font-size: 0.96rem; }

.wont { margin-top: 40px; }
.wont h3 { margin-bottom: 12px; }
.wont ul { list-style: none; padding: 0; }
.wont li { position: relative; padding-left: 26px; }
.wont li::before { content: "×"; position: absolute; left: 4px; top: -1px; color: #ff8f8f; font-weight: 700; }

.notice {
  border: 1px solid rgba(242, 184, 78, 0.45); border-radius: var(--radius); box-shadow: inset 4px 0 0 var(--gold);
  background: linear-gradient(180deg, rgba(242, 184, 78, 0.1), rgba(242, 184, 78, 0.03));
  padding: clamp(22px, 3vw, 34px);
}
.notice h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 14px; }
.notice p { color: #d9dff2; max-width: 68ch; }
.notice strong { color: var(--gold-hi); }

/* ---------- media ---------- */

.feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature + .feature { margin-top: clamp(48px, 7vw, 88px); }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 12px; }
.feature p { color: var(--muted); }
@media (max-width: 800px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature.flip > :first-child { order: 0; } }
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), 0 0 90px -30px rgba(47, 134, 255, 0.45); background: #000; }
.shot img { width: 100%; }
.shot.mac { border-radius: 12px; }
.device.phone { padding: 1.5%; border-radius: 3.4% / 4.8%; }
.device.phone img { aspect-ratio: 2854 / 2008; border-radius: 2.2% / 3.1%; }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 760px) { .videos { grid-template-columns: minmax(0, 1fr); } }
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: #000; }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-frame button {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer; padding: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 10, 28, 0.7));
  display: grid; place-items: center;
}
.video-frame .play {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #221603;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55); transition: transform 0.15s ease;
}
.video-frame button:hover .play { transform: scale(1.07); }
.video-frame .play svg { width: 28px; height: 28px; margin-left: 4px; }
.video figcaption { margin-top: 14px; }
.video figcaption b { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.video figcaption span { color: var(--muted); font-size: 0.92rem; }
.video-privacy { margin-top: 22px; font-size: 0.84rem; color: var(--faint); }

/* ---------- faq ---------- */

.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: 400 1.6rem/1 var(--sans); color: var(--gold); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 72ch; }

/* ---------- cta ---------- */

.cta {
  text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(700px 320px at 50% 0%, rgba(47, 134, 255, 0.28), transparent 70%), var(--night-1);
  border-top: 1px solid var(--line);
}
.cta img { width: 112px; height: 112px; margin: 0 auto 24px; filter: drop-shadow(0 18px 40px rgba(47, 134, 255, 0.45)); }
.cta h2 { margin-bottom: 14px; }
.cta .lede { margin: 0 auto 30px; }
.cta .btn-row { justify-content: center; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: #040817; padding-block: 48px 40px; font-size: 0.9rem; color: var(--faint); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 36px; }
@media (max-width: 800px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-top > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { font: 600 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-about p { max-width: 40ch; margin-top: 14px; }
.legal { border-top: 1px solid var(--line); padding-top: 24px; font-size: 0.8rem; line-height: 1.6; max-width: 84ch; }

/* ---------- compatibility page ---------- */

.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); background: linear-gradient(180deg, #081232, var(--night-0)); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 18px; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 0.88rem; color: var(--muted); align-items: center; }
.legend div { display: inline-flex; align-items: center; gap: 9px; }

.filters { display: grid; gap: 10px; margin: 0 0 14px; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-group > span { font: 600 0.84rem var(--sans); color: var(--muted); min-width: 5.2em; }
.filter-count { font-size: 0.88rem; color: var(--faint); margin: 0 0 22px; }
.filters button {
  font: 600 0.82rem var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer;
}
.filters button[aria-pressed="true"] { color: #221603; background: var(--gold); border-color: var(--gold); }

.entries { display: grid; gap: 16px; }
.entry { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 28px); }
.entry[hidden] { display: none; }
.entry-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.entry-head h3 { font-size: 1.28rem; }
.entry-head small { display: block; font: 0.8rem var(--mono); color: var(--faint); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 0; list-style: none; }
.chips li { font: 0.76rem var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 9px; }
.entry-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
@media (max-width: 760px) { .entry-cols { grid-template-columns: minmax(0, 1fr); } }
.entry-cols h4 { font: 600 0.84rem var(--sans); margin: 0 0 6px; color: var(--ok); }
.entry-cols div + div h4 { color: var(--warn); }
.entry-cols p { color: var(--muted); font-size: 0.95rem; }

.prose { max-width: 76ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 48px 0 14px; }
.prose p { color: var(--muted); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- setup ---------- */

.setup-note { margin-top: 16px; font-size: 0.9rem; color: var(--muted); max-width: 48ch; }
.disclosure { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.disclosure summary { cursor: pointer; list-style: none; padding: 20px 52px 20px 24px; position: relative; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--sans); color: var(--gold); transition: transform 0.2s ease; }
.disclosure[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.disclosure .steps { padding: 4px 24px 24px; }
.below-split { margin-top: clamp(28px, 4vw, 44px); align-items: start; }

/* ---------- compatibility summary ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 clamp(32px, 5vw, 48px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.summary { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 620px; }
.summary th { text-align: left; font: 600 0.8rem var(--sans); color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.summary td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.summary tr:last-child td { border-bottom: 0; }
.summary td:first-child { font-weight: 600; }
.summary td:first-child a { color: var(--text); text-decoration: none; }
.summary td:first-child a:hover { text-decoration: underline; }
.summary td:not(:first-child) { color: var(--muted); }
.summary .pill { font-size: 0.66rem; padding: 5px 8px; }
.group-title { font-size: 1.5rem; margin: clamp(28px, 4vw, 40px) 0 14px; }
.group-title[hidden] { display: none; }
.entries { scroll-margin-top: 84px; }
.entry { scroll-margin-top: 84px; }
