/* A.P.O.C site previews. One deliberate dark world (the game's own UI): ash ground, bone type, ember for danger,
   amber for the live broadcast, paper for anything that is a document (survivor files, notes, the chronicle).
   Layout: a broadcast strip on top, then wide cinematic plates and narrow working columns. */
:root {
    color-scheme: dark;
    --ground: #0d0b0a;
    --ground-2: #15120f;
    --ground-3: #1d1915;
    --line: rgba(232, 225, 211, .12);
    --line-2: rgba(232, 225, 211, .22);
    --bone: #e8e1d3;
    --bone-dim: #a39c8f;
    --ash: #6b655b;
    --ember: #d8352a;
    --ember-deep: #6d110b;
    --amber: #e0a33a;
    --ok: #7fa36a;
    --paper: #e9e2cf;
    --paper-2: #ddd4bd;
    --paper-ink: #2a2622;
    --paper-dim: #6f675b;
    --stamp: #a3261c;

    --display: 'Big Shoulders Display', 'Oswald', 'Arial Narrow', sans-serif;
    --body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
    --label: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --type: 'Special Elite', 'Courier New', monospace;
    --mono: 'Share Tech Mono', ui-monospace, Consolas, monospace;

    --gutter: clamp(16px, 4vw, 56px);
    --max: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); }
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; margin: 0; background: var(--ground); color: var(--bone); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { /* film grain, the game's wear */
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 0; text-wrap: balance; }
/* a big heading never sits on the line under it */
:is(.h-xl, .h-l, .h-m) + :is(p, .lede) { margin-top: clamp(6px, .9vw, 14px); }
p { margin: 0; text-wrap: pretty; }
body > main { flex: 1 0 auto; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- the broadcast strip ---- */
.strip { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: #000; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--bone-dim); }
.strip .wrap { display: flex; align-items: center; gap: 18px; min-height: 34px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.strip .wrap::-webkit-scrollbar { display: none; }
.strip b { color: var(--bone); font-weight: 400; }
.strip .live { color: var(--amber); display: inline-flex; align-items: center; gap: 8px; }
.strip .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: pulse 1.6s infinite; }
.strip .sep { width: 1px; height: 12px; background: var(--line-2); flex: none; }
.strip .sample { margin-left: auto; color: var(--ash); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- nav ---- */
.nav { border-bottom: 1px solid var(--line); background: rgba(13, 11, 10, .86); backdrop-filter: blur(8px); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 34px); z-index: 39; }
.nav .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; flex-wrap: wrap; }
.nav .mark { height: 22px; width: auto; }
.nav .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---- buttons: the survivor screen's glow-border button ---- */
.btn { --c: var(--bone); display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--c); background: rgba(0, 0, 0, .35); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); cursor: pointer; transition: box-shadow .2s, background .2s, border-color .2s; }
.btn:hover { border-color: var(--c); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 22px color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.btn.hot { --c: var(--ember); color: var(--bone); background: color-mix(in srgb, var(--ember) 22%, transparent); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---- labels and type scale ---- */
.eyebrow { font-family: var(--label); font-weight: 600; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--amber); }
.eyebrow.red { color: var(--ember); }
.h-xl { font-size: clamp(56px, 10vw, 148px); }
.h-l { font-size: clamp(40px, 6vw, 80px); }
.h-m { font-size: clamp(28px, 3.4vw, 44px); }
.h-s { font-size: 24px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--bone-dim); max-width: 62ch; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--bone-dim); }
.section { padding-block: clamp(56px, 8vw, 110px); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- plates (the game's key art) ---- */
.plate { position: relative; overflow: hidden; background: var(--ground-2); }
.plate > img { width: 100%; height: 100%; object-fit: cover; }
.plate::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 11, 10, 0) 40%, var(--ground) 100%); pointer-events: none; }
.vignette::after { background: radial-gradient(ellipse at center, rgba(13, 11, 10, 0) 35%, rgba(13, 11, 10, .9) 100%), linear-gradient(180deg, rgba(13, 11, 10, 0) 55%, var(--ground) 100%); }

/* ---- panels ---- */
.panel { background: var(--ground-2); border: 1px solid var(--line); padding: 22px; min-width: 0; }
.panel h3 { font-size: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.kv dt { font-family: var(--label); letter-spacing: .16em; text-transform: uppercase; font-size: 12.5px; color: var(--bone-dim); padding-top: 2px; }
.kv dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; font-family: var(--label); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--bone-dim); white-space: nowrap; }
.chip.red { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 50%, transparent); }
.chip.amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }

.bar { height: 6px; background: var(--ground-3); position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--bone); }
.bar.red > i { background: var(--ember); }
.bar.amber > i { background: var(--amber); }

/* ---- paper: anything that is a document ---- */
.paper { background: var(--paper); color: var(--paper-ink); position: relative; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.paper::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55; mix-blend-mode: multiply;
    background: radial-gradient(ellipse at 15% 10%, rgba(120, 90, 50, .18), transparent 45%), radial-gradient(ellipse at 90% 95%, rgba(90, 60, 30, .22), transparent 50%); }
.paper .typed { font-family: var(--type); }
.stamp { display: inline-block; font-family: var(--label); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--stamp); border: 3px double var(--stamp); padding: 4px 12px; transform: rotate(-4deg); opacity: .85; mix-blend-mode: multiply; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding-block: 40px; font-size: 14px; color: var(--bone-dim); }
.foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.foot .mark { height: 18px; opacity: .7; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }

/* Motion is on by default; the footer's Motion switch sets html.calm (remembered per browser). */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
.motion-toggle { background: none; border: 1px solid var(--line-2); color: var(--bone-dim); font: 600 12px var(--label); letter-spacing: .18em; text-transform: uppercase; padding: 6px 10px; cursor: pointer; }
.motion-toggle:hover { color: var(--bone); border-color: var(--bone-dim); }
@media (max-width: 720px) {
        .nav .right .btn:not(.hot) { display: none; }
}


/* ---- grouped nav (dropdowns on desktop, a drawer on phones) ---- */
.nav .links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav .links > li { position: relative; }
.nav .top { display: block; padding: 8px 12px; font: 600 15px/1.2 var(--label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--bone-dim); border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; }
.nav .top:hover { color: var(--bone); }
.nav .top[aria-current='page'], .nav .top[data-here] { color: var(--bone); border-bottom-color: var(--ember); }
.nav .grp > .top::after { content: ''; display: inline-block; margin-left: 7px; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px; background: #0a0908; border: 1px solid var(--line-2); padding: 6px; box-shadow: 0 24px 50px rgba(0,0,0,.7); z-index: 5; }
.nav .grp.open .menu { display: grid; }
.nav .menu a { display: grid; gap: 1px; padding: 10px 12px; text-decoration: none; border-left: 2px solid transparent; }
.nav .menu a:hover, .nav .menu a[aria-current='page'] { background: var(--ground-2); border-left-color: var(--ember); }
.nav .menu b { font: 700 15px/1.2 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--bone); }
.nav .menu span { font-size: 13px; color: var(--bone-dim); }
.nav .burger { display: none; margin-left: auto; width: 42px; height: 38px; border: 1px solid var(--line-2); background: none; cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.nav .burger i { display: block; height: 2px; background: var(--bone); }
@media (max-width: 1180px) {
    .nav .burger { display: flex; }
    .nav .links { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
    /* the drawer drops over the page (never pushes the map or a pinned stage around) and scrolls on its own */
    .nav .wrap { position: relative; }
    .nav.open .links { display: flex; position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gutter) 16px; background: rgba(10, 9, 8, .97); border-bottom: 1px solid var(--line-2); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); max-height: calc(100svh - 110px); overflow-y: auto; overscroll-behavior: contain; animation: menu-in .28s cubic-bezier(.16,1,.3,1) both; }
    .nav .menu { position: static; box-shadow: none; border: 0; border-left: 1px solid var(--line-2); margin: 0 0 6px 12px; min-width: 0; }
    .nav .right { margin-left: 0; }
    .nav .wrap { gap: 14px; }
    .burger[aria-expanded='true'] i:nth-child(2) { opacity: 0; }
    .burger[aria-expanded='true'] i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger[aria-expanded='true'] i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .burger i { transition: transform .25s, opacity .2s; }
}

/* ---- live data states (api.js) ---- */
.strip .live.off { color: var(--ash); }
.strip .live.off::before { background: var(--ash); box-shadow: none; animation: none; }
.gate { display: grid; gap: 10px; max-width: 64ch; }
.gate h3 { font-size: 26px; }
.gate p, .gate ol { font-size: 15.5px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--ground-3); border: 1px solid var(--line-2); padding: 12px 18px; font-size: 15px; max-width: calc(100% - 32px); }
.toast.good { border-color: color-mix(in srgb, var(--ok) 70%, transparent); color: #cfe3c1; }
.toast.bad { border-color: color-mix(in srgb, var(--ember) 70%, transparent); color: #f4b4ac; }
.toast[hidden] { display: none; }
.wait { color: var(--bone-dim); font-family: var(--mono); font-size: 13px; letter-spacing: .06em; }
/* a sideways strip with more to scroll fades its cut edge (api.js) */
.edge-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.edge-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.edge-l.edge-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.nav .right #nav-signin.who span { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ===== Site-wide motion (motion.js; off under html.calm) ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .32s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: vt-in .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(4px); transform: scale(.992); } }
@keyframes vt-in { from { opacity: 0; filter: blur(6px); transform: translateY(14px); } }
html.calm::view-transition-old(root), html.calm::view-transition-new(root) { animation: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* headings rise out of a mask, word by word */
.rv-on [data-rv='head'] .mw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.rv-on [data-rv='head'] .mwi { display: inline-block; transform: translate3d(0, 105%, 0) rotate(2.5deg); transform-origin: 0 100%; transition: transform 1s cubic-bezier(.16,1,.3,1); will-change: transform; }
.rv-on [data-rv='head'].rv-in .mwi { transform: none; }

/* blocks fade up in staggered waves */
.rv-on [data-rv='block'] { opacity: 0; transform: translate3d(0, 28px, 0); filter: blur(3px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1) var(--rvd, 0s), transform 1.1s cubic-bezier(.16,1,.3,1) var(--rvd, 0s), filter .9s ease var(--rvd, 0s); }
.rv-on [data-rv='block'].rv-in { opacity: 1; transform: none; filter: none; }
/* pictures uncover from the bottom edge */
.rv-on [data-rv='block'].rv-img { clip-path: inset(100% 0 0 0); transform: none; filter: none; opacity: 1;
  transition: clip-path 1.25s cubic-bezier(.7,0,.2,1) var(--rvd, 0s); }
.rv-on [data-rv='block'].rv-img.rv-in { clip-path: inset(0 0 0 0); }
.rv-on [data-rv='block'].rv-img img { transform: scale(1.18); transition: transform 1.8s cubic-bezier(.16,1,.3,1) var(--rvd, 0s); }
.rv-on [data-rv='block'].rv-img.rv-in img { transform: scale(1); }
.rv-on [data-rv='block'].rv-img.rv-in img.rv-drift { transition: none; }
/* live rows that arrive later */
.rv-late { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.rv-late.rv-late-in { opacity: 1; transform: none; }
img.rv-drift { will-change: transform; transform: scale(1.14); }

/* smoother interactions everywhere */
.btn { transition: box-shadow .35s cubic-bezier(.2,.7,.2,1), background .35s, border-color .35s, transform .35s cubic-bezier(.2,.7,.2,1); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); transition-duration: .08s; }
.panel { transition: border-color .4s, transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s; }
.panel:hover { border-color: var(--line-2); }
.nav .top, .nav .menu a { transition: color .25s, background .25s, border-color .25s; }
.nav .grp.open .menu { animation: menu-in .28s cubic-bezier(.16,1,.3,1) both; transform-origin: 0 0; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
html.calm .rv-on [data-rv] { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }

/* The store link (docs/STORE.md): a plain top-level link out to Tebex, and its footer twin. */
.nav .links a.top.store { color: var(--amber); }
.foot-store { display: inline-flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.foot-link { color: var(--bone-dim); font-size: 14px; }
.foot-link:hover { color: var(--bone); }

/* ---- the footer's legal row (build.py foot()) ---- */
.foot { padding-block: 40px 28px; }
.foot .wrap.foot-base { margin-top: 26px; padding-top: 20px; gap: 14px 24px; background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.foot-legal { display: flex; gap: 6px 20px; flex-wrap: wrap; align-items: center; }
.foot-legal .foot-link { font: 600 13px var(--label); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.foot-legal .foot-mail { font: 13px var(--mono); letter-spacing: .04em; text-transform: none; color: var(--amber); }
.foot-legal .foot-mail:hover { color: var(--bone); }

/* ---- the cookie notice (consent.js): a plain notice, once; sits under the nav so the menus always cover it ---- */
.cookie-note { position: fixed; z-index: 38; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100% - 32px));
    display: grid; gap: 14px; padding: 18px 20px 16px; background: rgba(10, 9, 8, .96); border: 1px solid var(--line-2); border-left: 2px solid var(--ember);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .5); backdrop-filter: blur(10px);
    opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .45s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.16,1,.3,1); }
.cookie-note.in { opacity: 1; transform: none; }
.cookie-note.out { opacity: 0; transform: translate3d(0, 12px, 0); transition-duration: .3s; }
.cookie-note-text { display: grid; gap: 6px; }
.cookie-note .eyebrow { font-size: 12px; }
.cookie-note p { font-size: 14.5px; line-height: 1.5; color: var(--bone-dim); }
.cookie-note-act { display: flex; gap: 18px; align-items: center; justify-content: flex-end; }
.cookie-note-act .foot-link { font: 600 13px var(--label); letter-spacing: .16em; text-transform: uppercase; }
.cookie-note-act .btn { min-width: 84px; justify-content: center; }
html.calm .cookie-note { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cookie-note { transition: none; opacity: 1; transform: none; } }
@media (max-width: 560px) {
    .cookie-note { left: 16px; right: 16px; width: auto; padding: 16px; }
    .cookie-note-act { justify-content: space-between; }
}

/* ---- legal documents (terms.html, privacy.html, cookies.html): a contents rail and one readable column ---- */
.legal-top { padding-block: 48px 30px; display: grid; gap: 12px; }
.legal-meta { display: flex; gap: 8px 22px; flex-wrap: wrap; font: 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.legal-meta b { color: var(--bone-dim); font-weight: 400; }
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: 10px 100px; }
.legal-toc { position: sticky; top: 126px; display: grid; gap: 2px; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.legal-toc > span { font: 600 12.5px var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.legal-toc a { display: block; padding: 6px 0 6px 12px; border-left: 1px solid var(--line-2); color: var(--bone-dim); text-decoration: none; font-size: 14px; line-height: 1.35; transition: color .2s, border-color .2s; }
.legal-toc a:hover { color: var(--bone); border-left-color: var(--ember); }
.legal-doc { max-width: 74ch; display: grid; gap: 0; counter-reset: lsec; }
.legal-doc > section { padding-block: 26px; border-top: 1px solid var(--line); scroll-margin-top: 120px; display: grid; gap: 12px; }
.legal-doc > section:first-child { border-top: 0; padding-top: 0; }
.legal-doc h2 { font-size: clamp(24px, 2.4vw, 30px); display: flex; gap: 14px; align-items: baseline; }
.legal-doc > section.n > h2::before { counter-increment: lsec; content: counter(lsec, decimal-leading-zero); font: 400 14px var(--mono); color: var(--ember); letter-spacing: .06em; transform: translateY(-3px); }
.legal-doc h3 { font: 700 17px var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--bone); margin-top: 6px; }
.legal-doc p, .legal-doc li { color: var(--bone-dim); font-size: 15.5px; line-height: 1.65; }
.legal-doc strong { color: var(--bone); font-weight: 600; }
.legal-doc a { color: var(--bone); text-decoration-color: color-mix(in srgb, var(--amber) 60%, transparent); text-underline-offset: 3px; }
.legal-doc a:hover { color: var(--amber); }
.legal-doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal-doc li::marker { color: var(--ember); }
.legal-doc code { font: 13.5px var(--mono); color: var(--amber); background: rgba(0, 0, 0, .35); padding: 1px 6px; overflow-wrap: anywhere; }
.legal-sum { border-left: 2px solid var(--ember); padding: 4px 0 4px 18px; display: grid; gap: 8px; color: var(--bone-dim); font-size: 15px; max-width: 75ch; }
.legal-sum b { color: var(--bone); }
.legal-note { background: var(--ground-2); border: 1px solid var(--line); padding: 16px 18px; font-size: 15px; color: var(--bone-dim); }
.legal-note b { color: var(--bone); }
/* tables: a ruled ledger on wide screens, one card per row on phones */
.ltable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ltable th { text-align: left; font: 600 12px var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-2); vertical-align: bottom; }
.ltable td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--bone-dim); line-height: 1.5; }
.ltable td:first-child { color: var(--bone); }
.ltable td code { white-space: nowrap; }
@media (max-width: 960px) {
    .legal { grid-template-columns: 1fr; }
    .legal-toc { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); column-gap: 18px; padding: 16px 18px; background: var(--ground-2); border: 1px solid var(--line); }
    .legal-toc > span { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .ltable thead { display: none; }
    .ltable, .ltable tbody, .ltable tr, .ltable td { display: block; width: 100%; }
    .ltable tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .ltable td { border: 0; padding: 3px 0; }
    .ltable td[data-l]::before { content: attr(data-l); display: block; font: 600 11.5px var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--ash); margin-top: 6px; }
    .ltable td code { white-space: normal; }
}
