/* Seidr Awakening - site styles.
   Art direction: a carved stele under a star-night sky. Lapis night, bronze, verdigris, sandstone, gold.
   Everything below uses the tokens in :root. Fonts are self-hosted (assets/fonts). */

@font-face { font-family: "Metamorphous"; src: url("../assets/fonts/metamorphous-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Metamorphous"; src: url("../assets/fonts/metamorphous-latin-ext.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; src: url("../assets/fonts/literata-normal-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../assets/fonts/literata-italic-latin.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "SeidrRunes"; src: url("../assets/fonts/noto-runic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "SeidrHiero"; src: url("../assets/fonts/noto-hiero.woff2") format("woff2"); font-display: swap; }

:root {
  --night-0: #060818;
  --night-1: #0b1030;
  --night-2: #121a45;
  --night-3: #1a2560;
  --lapis: #2a4bb0;
  --lapis-hi: #8aa6f5;
  --bronze: #b9803f;
  --bronze-hi: #d9a15e;
  --verdigris: #5fb09c;
  --sand: #e3c79b;
  --sand-dim: #b7a583;
  --gold: #f2c35b;
  --gold-deep: #c8923a;
  --ink: #f0e8d6;
  --ink-2: #bcb7aa;
  --ink-3: #8f8b83;   /* large/decorative text only */
  --line: rgba(227, 199, 155, .22);
  --line-hi: rgba(242, 195, 91, .55);
  --oru: #4fd6c8;
  --oru-copper: #d98b4c;
  --thalm: #3fd9ee;
  --thalm-mag: #e0529f;
  --ok: #7fd8a6;
  --warn: #ffb55a;
  --f-display: "Metamorphous", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --f-body: "Literata", Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --f-glyph: "SeidrRunes", "SeidrHiero", "Segoe UI Historic", "Noto Sans Runic", "Noto Sans Egyptian Hieroglyphs", serif;
  --gutter: max(16px, 4vw);
  --maxw: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--night-0); }
body {
  margin: 0; min-height: 100vh; background: var(--night-0); color: var(--ink);
  font: 400 1.0625rem/1.72 var(--f-body); font-optical-sizing: auto;
  overflow-x: hidden; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: #ffe0a0; }
:focus-visible { outline: 3px solid var(--lapis-hi); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--gold); color: var(--night-0); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--night-0); padding: .6rem 1rem; border-radius: 4px; font-family: var(--f-display); }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 7.6vw, 6rem); line-height: 1; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); color: var(--sand); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: var(--sand); }
h4 { font-size: 1.1rem; color: var(--gold); }
p { margin: 0 0 1.1em; max-width: 66ch; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.6; color: var(--ink); max-width: 56ch; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; line-height: 1.6; }
.glyph { font-family: var(--f-glyph); font-style: normal; font-weight: 400; }
.nowrap { white-space: nowrap; }
em, i { font-style: italic; }
strong { font-weight: 650; color: var(--ink); }
code, kbd, samp { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .88em; }
kbd { display: inline-block; min-width: 1.7em; text-align: center; padding: .05em .45em; margin: 0 .05em; border: 1px solid var(--line-hi); border-bottom-width: 2px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--sand); line-height: 1.5; }
code { background: rgba(255,255,255,.06); padding: .08em .35em; border-radius: 4px; color: var(--sand); overflow-wrap: anywhere; }
pre { margin: 0; overflow-x: auto; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; max-width: 66ch; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: calc(820px + 2 * var(--gutter)); }
section { position: relative; }
.sec { padding-block: clamp(3.2rem, 7vw, 6rem); }
.sec.tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.sec.lapis { background: linear-gradient(180deg, var(--night-1), var(--night-2) 55%, var(--night-1)); }
.sec.dune { background: linear-gradient(180deg, var(--night-0), #1a1426 60%, var(--night-0)); }
.cols { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
@media (min-width: 900px) {
  .cols.c2 { grid-template-columns: 1fr 1fr; }
  .cols.c-7-5 { grid-template-columns: 7fr 5fr; }
  .cols.c-5-7 { grid-template-columns: 5fr 7fr; }
  .cols.c3 { grid-template-columns: repeat(3, 1fr); }
  .cols.center { align-items: center; }
}

/* section head: a ring with the section's glyph, then the title. The glyph tells which thread/topic the section belongs to. */
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 0 1.1rem; align-items: center; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.sec-head .ring { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-hi); display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle at 50% 35%, rgba(242,195,91,.18), transparent 70%); box-shadow: 0 0 0 5px rgba(242,195,91,.05), inset 0 0 0 4px var(--night-0), inset 0 0 0 5px var(--line); }
.sec-head .ring svg { width: 28px; height: 28px; }
.sec-head h2 { margin: 0; }
.sec-head p { grid-column: 2; margin: .5rem 0 0; color: var(--ink-2); }
@media (max-width: 520px) { .sec-head { grid-template-columns: 1fr; } .sec-head p { grid-column: 1; } .sec-head .ring { margin-bottom: .8rem; } }

.ico { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.22em; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(6, 8, 24, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-size: 1.28rem; white-space: nowrap; }
.brand svg { width: 38px; height: 38px; color: var(--gold); }
.brand:hover { color: var(--gold); }
.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav a { font-family: var(--f-display); font-size: .98rem; color: var(--ink-2); text-decoration: none; padding: .5rem .72rem; border-radius: 6px; position: relative; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a.btn.primary, .nav a.btn.primary[aria-current="page"] { color: #1b1305; }
.nav a.btn[aria-current="page"]::after { display: none; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: .72rem; right: .72rem; bottom: .12rem; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.nav .btn { margin-left: .5rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-hi); color: var(--gold); border-radius: 8px; width: 46px; height: 46px; cursor: pointer; place-items: center; }
.nav-toggle svg { width: 24px; height: 24px; }
@media (max-width: 1100px) {
  .nav-toggle { display: grid; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(6, 8, 24, .97); border-bottom: 1px solid var(--line); padding: .8rem var(--gutter) 1.4rem; flex-direction: column; align-items: stretch; gap: .1rem; margin: 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: .85rem .4rem; font-size: 1.1rem; border-bottom: 1px solid rgba(227,199,155,.1); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin: .8rem 0 0; justify-content: center; }
}
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav { position: static; flex-wrap: wrap; opacity: 1; visibility: visible; transform: none; background: none; border: 0; padding: 0; flex-direction: row; max-height: none; }
html:not(.js) .site-header { position: static; height: auto; padding-block: .6rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font-family: var(--f-display); font-size: 1.05rem; line-height: 1.1; padding: .85rem 1.5rem; min-height: 46px; border-radius: 8px; text-decoration: none; cursor: pointer; border: 1px solid var(--gold); color: var(--gold); background: rgba(242,195,91,.04); position: relative; transition: background .2s, color .2s, box-shadow .2s, transform .2s; box-shadow: inset 0 0 0 3px var(--night-0), inset 0 0 0 4px rgba(242,195,91,.35); }
.btn:hover { background: rgba(242,195,91,.14); color: #ffe6ae; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #f8d27a, #d9a03f); color: #1b1305; border-color: #ffe29a; box-shadow: inset 0 0 0 3px #d9a03f, inset 0 0 0 4px rgba(27,19,5,.5), 0 6px 24px -6px rgba(242,195,91,.55); font-weight: 400; }
.btn.primary:hover { background: linear-gradient(180deg, #ffe39a, #e8b450); color: #1b1305; box-shadow: inset 0 0 0 3px #e8b450, inset 0 0 0 4px rgba(27,19,5,.5), 0 8px 34px -4px rgba(242,195,91,.7); }
.btn.sm { padding: .55rem 1rem; min-height: 40px; font-size: .95rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 1.2em; height: 1.2em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }

/* cartouche: the oval with a closing bar, used for badges and tags */
.cart { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-display); font-size: .88rem; line-height: 1; padding: .38rem .95rem .38rem .8rem; border: 1.5px solid var(--gold-deep); border-radius: 999px; color: var(--sand); background: rgba(242,195,91,.06); position: relative; margin-right: 8px; white-space: nowrap; }
.cart::after { content: ""; position: absolute; right: -7px; top: 50%; height: 130%; width: 2px; transform: translateY(-50%); background: var(--gold-deep); border-radius: 2px; }
.cart.ok { color: var(--ok); border-color: #4c9a73; } .cart.ok::after { background: #4c9a73; }
.cart.warn { color: var(--warn); border-color: #c4833a; } .cart.warn::after { background: #c4833a; }
.cart.lapis { color: var(--lapis-hi); border-color: #4a63b8; } .cart.lapis::after { background: #4a63b8; }
.cart.sample { color: #ffd6a3; border-color: #e0893a; background: rgba(224,137,58,.12); } .cart.sample::after { background: #e0893a; }

/* slab: a carved panel with corner brackets (no uniform rounded cards) */
.slab { position: relative; padding: clamp(1.3rem, 3vw, 2.2rem); background: linear-gradient(160deg, rgba(26,37,96,.55), rgba(11,16,48,.75)); border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 24px 60px -30px rgba(0,0,0,.8); }
.slab::before { content: ""; position: absolute; inset: 7px; pointer-events: none; opacity: .85;
  background:
    linear-gradient(var(--line-hi), var(--line-hi)) top left / 16px 1px no-repeat, linear-gradient(var(--line-hi), var(--line-hi)) top left / 1px 16px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) top right / 16px 1px no-repeat, linear-gradient(var(--line-hi), var(--line-hi)) top right / 1px 16px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 16px 1px no-repeat, linear-gradient(var(--line-hi), var(--line-hi)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--line-hi), var(--line-hi)) bottom right / 16px 1px no-repeat, linear-gradient(var(--line-hi), var(--line-hi)) bottom right / 1px 16px no-repeat; }
.slab > :last-child { margin-bottom: 0; }
.slab h3 { margin-top: 0; }

/* the glyph frieze: runes and hieroglyphs that ignite when scrolled into view */
.frieze { display: flex; justify-content: center; align-items: center; gap: clamp(.5rem, 2vw, 1.4rem); padding: 1.4rem var(--gutter); overflow: hidden; color: rgba(227,199,155,.28); font-family: var(--f-glyph); font-size: clamp(1.1rem, 2.4vw, 1.7rem); user-select: none; }
.frieze::before, .frieze::after { content: ""; flex: 1 1 0; max-width: 28vw; height: 1px; background: linear-gradient(90deg, transparent, var(--line-hi)); }
.frieze::after { transform: scaleX(-1); }
.frieze span { transition: color .9s ease, text-shadow .9s ease; }
.frieze.lit span { color: var(--gold); text-shadow: 0 0 14px rgba(242,195,91,.65); }
.frieze.lit span:nth-child(2) { transition-delay: .12s; } .frieze.lit span:nth-child(3) { transition-delay: .24s; } .frieze.lit span:nth-child(4) { transition-delay: .36s; }
.frieze.lit span:nth-child(5) { transition-delay: .48s; } .frieze.lit span:nth-child(6) { transition-delay: .6s; } .frieze.lit span:nth-child(7) { transition-delay: .72s; } .frieze.lit span:nth-child(8) { transition-delay: .84s; } .frieze.lit span:nth-child(9) { transition-delay: .96s; }
html:not(.js) .frieze { color: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: min(100svh - var(--header-h), 940px); display: grid; align-items: center; isolation: isolate; background: var(--night-0) url("../assets/img/sky_static.webp") center / cover; }
.hero canvas#sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero .dunes { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(120px, 20vw, 260px); z-index: -1; pointer-events: none; }
.hero-grid { display: grid; gap: 2rem; align-items: end; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(5rem, 11vw, 9rem); }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; } }
.hero h1 { margin-bottom: .25em; color: var(--ink); text-shadow: 0 2px 40px rgba(6,8,24,.8); }
.hero h1 .l2 { display: block; color: var(--gold); }
.hero .tagline { font-family: var(--f-body); font-style: italic; font-size: clamp(1.2rem, 2.1vw, 1.6rem); line-height: 1.45; color: var(--sand); max-width: 30ch; margin-bottom: 1.4rem; }
.hero .pitch { max-width: 52ch; color: var(--ink); }
.hero .status { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; color: var(--ink-2); font-size: .95rem; }
.hero-art { position: relative; min-height: 360px; }
/* the arched window with real frames from the engine */
.gate { position: relative; width: min(84%, 500px); margin-left: auto; aspect-ratio: 4 / 3.4; border-radius: 50% 50% 6px 6px / 26% 26% 6px 6px; padding: 10px; background: linear-gradient(160deg, #e3c79b, #b9803f 40%, #6d4a26); box-shadow: 0 0 0 1px rgba(255,226,154,.5), 0 30px 80px -20px rgba(0,0,0,.9), 0 0 120px -20px rgba(242,195,91,.35); }
.gate-in { position: relative; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; background: #0b1030; box-shadow: inset 0 0 0 3px #1a1305, inset 0 0 0 4px rgba(242,195,91,.6); }
.gate-in video, .gate-in img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; image-rendering: auto; }
.gate-in::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(6,8,24,.55)), linear-gradient(180deg, rgba(42,75,176,.35), rgba(185,128,63,.25)); mix-blend-mode: soft-light; pointer-events: none; }
.gate-cap { text-align: right !important; padding-left: 36% !important; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.6rem 1rem .7rem; text-align: center; font-size: .82rem; color: var(--sand); background: linear-gradient(transparent, rgba(6,8,24,.88)); line-height: 1.35; }
.hero-nesh { position: absolute; z-index: 3; left: 0; bottom: -1.4rem; width: clamp(160px, 19vw, 260px); filter: drop-shadow(0 18px 30px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(242,195,91,.25)); pointer-events: none; }
@media (max-width: 959px) { .hero-art { min-height: 0; padding-bottom: 1.6rem; } .gate { width: min(82%, 440px); margin-left: auto; margin-right: 0; aspect-ratio: 4 / 3.1; } .hero-nesh { left: 0; width: clamp(120px, 30vw, 200px); bottom: 0; } }
html.js-intro .hero [data-awake] { opacity: 0; transform: translateY(14px); }
html.js-intro.awake .hero [data-awake] { opacity: 1; transform: none; transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * .14s); }
html.js-intro .gate { filter: brightness(.35) saturate(.6); }
html.js-intro.awake .gate { filter: none; transition: filter 1.6s ease .3s; }

/* ---------- peoples: hanging banners ---------- */
.banners { display: grid; gap: 1.4rem; }
@media (min-width: 860px) { .banners { grid-template-columns: 1.25fr 1fr 1fr; } }
.banner { position: relative; display: flex; flex-direction: column; padding: 1.8rem 1.5rem 3.2rem; color: var(--ink); text-decoration: none; background: linear-gradient(180deg, var(--b1), var(--b2)); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 50% 100%, 0 calc(100% - 28px)); transition: transform .3s; }
.banner:hover { color: var(--ink); transform: translateY(-4px); }
.banner::before { content: ""; position: absolute; inset: 0 0 28px 0; border: 1px solid var(--bc); border-bottom: 0; pointer-events: none; }
.banner .emb { width: 64px; height: 64px; color: var(--bc); margin-bottom: 1rem; }
.banner h3 { color: var(--ink); font-size: 1.7rem; margin-bottom: .2rem; }
.banner .thread { color: var(--bc); font-style: italic; margin-bottom: 1rem; }
.banner p { font-size: .98rem; line-height: 1.6; color: var(--ink); }
.banner .pal { display: flex; gap: .4rem; margin-top: auto; padding-top: .8rem; }
.banner .pal i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }
.banner.hesh { --b1: #1d2c78; --b2: #2d2a46; --bc: var(--gold); background: linear-gradient(180deg, #213386, #3a2d3d 85%, #5a3b24); }
.banner.oru { --b1: #0f2b33; --b2: #1b2326; --bc: var(--oru); }
.banner.thalm { --b1: #08182a; --b2: #120b25; --bc: var(--thalm); }
.banner.asleep .emb, .banner.asleep h3 { opacity: .92; }
.banner .state { align-self: flex-start; margin-bottom: 1rem; }

/* ---------- ledger rows (modes) ---------- */
.ledger { list-style: none; padding: 0; margin: 0; max-width: none; }
.ledger li { display: grid; grid-template-columns: 52px 1fr; gap: .2rem 1.2rem; padding: 1.15rem 0; border-top: 1px solid var(--line); margin: 0; align-items: start; }
.ledger li:last-child { border-bottom: 1px solid var(--line); }
.ledger .gl { width: 44px; height: 44px; color: var(--gold); }
.ledger h3 { margin: 0 0 .2rem; font-size: 1.35rem; }
.ledger p { margin: 0 0 .5rem; color: var(--ink-2); max-width: 60ch; }
.plat { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .88rem; color: var(--ink-2); }
.plat span { display: inline-flex; align-items: center; gap: .35rem; }
.plat span.no { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- readout plates (handheld numbers etc.) ---------- */
.readout { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 640px) { .readout { grid-template-columns: repeat(2, 1fr); } }
.readout > div { background: var(--night-1); padding: 1.1rem 1.3rem; }
.readout dt { color: var(--ink-2); font-size: .92rem; }
.readout dd { margin: .1rem 0 0; font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--gold); line-height: 1.15; font-variant-numeric: tabular-nums; }
.readout p { max-width: none; }
.readout dd small { font-family: var(--f-body); font-size: .85rem; color: var(--ink-2); display: block; margin-top: .15rem; line-height: 1.4; }
dl { margin: 0; }

/* ---------- figures ---------- */
figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .6rem; line-height: 1.5; max-width: 70ch; }
.frame { position: relative; border: 1px solid var(--line-hi); padding: 6px; background: linear-gradient(160deg, rgba(227,199,155,.2), rgba(185,128,63,.1)); }
.frame img { width: 100%; }
.bleed { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.bleed img { width: 100%; max-height: 780px; object-fit: cover; object-position: 50% 50%; }
.shot img { image-rendering: auto; width: 100%; }
.shot-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shot-grid.g3 { grid-template-columns: repeat(3, 1fr); } }

/* lineup captions */
.roster { display: grid; gap: .8rem 1.2rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.4rem; }
@media (min-width: 760px) { .roster { grid-template-columns: repeat(5, 1fr); } }
.roster div { border-top: 2px solid var(--gold-deep); padding-top: .55rem; }
.roster b { display: block; font-family: var(--f-display); font-weight: 400; color: var(--sand); font-size: 1.05rem; line-height: 1.2; }
.roster span { color: var(--ink-2); font-size: .9rem; line-height: 1.4; display: block; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); background: rgba(11,16,48,.6); -webkit-overflow-scrolling: touch; }
.tablewrap:focus-visible { outline-offset: 0; }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; padding: .9rem 1rem; color: var(--ink-2); font-size: .9rem; caption-side: bottom; }
table.data th, table.data td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-family: var(--f-display); font-weight: 400; color: var(--gold); background: rgba(26,37,96,.6); white-space: nowrap; position: sticky; top: 0; }
table.data tbody th { font-weight: 600; color: var(--ink); }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data .sortbtn { all: unset; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; color: inherit; font: inherit; }
table.data .sortbtn:focus-visible { outline: 3px solid var(--lapis-hi); outline-offset: 2px; }

/* ---------- tabs ---------- */
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.tabs [role="tab"] { font-family: var(--f-display); font-size: 1.02rem; background: none; border: 0; color: var(--ink-2); padding: .8rem 1.1rem; min-height: 46px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: .5rem; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.tabs [role="tabpanel"][hidden] { display: none; }
.keylist { display: grid; gap: .1rem 1.6rem; grid-template-columns: 1fr; margin: 0 0 1rem; max-width: none; }
@media (min-width: 700px) { .keylist { grid-template-columns: repeat(2, 1fr); } }
.keylist > div { display: grid; grid-template-columns: minmax(8.5rem, 11rem) 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid rgba(227,199,155,.1); align-items: baseline; }
.keylist dt { color: var(--sand); }
.keylist dd { margin: 0; color: var(--ink); line-height: 1.5; }

/* ---------- misc blocks ---------- */
.note { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: rgba(242,195,91,.07); max-width: 70ch; margin-bottom: 1.4rem; font-size: .98rem; line-height: 1.6; }
.note svg { width: 24px; height: 24px; flex: none; color: var(--gold); margin-top: .1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note p { margin: 0; }
.note.sample { border-color: #e0893a; background: rgba(224,137,58,.1); }
.note.sample svg { color: #ffb066; }
.note.placeholder { border-color: var(--lapis-hi); background: rgba(138,166,245,.08); }
.note.placeholder svg { color: var(--lapis-hi); }
.steps { list-style: none; counter-reset: step; padding: 0; max-width: none; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.6rem 3.6rem; margin: 0; border-left: 1px solid var(--line); margin-left: 1.3rem; }
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before { content: counter(step); position: absolute; left: -1.3rem; top: -.1rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--night-1); border: 1.5px solid var(--gold); color: var(--gold); font-family: var(--f-display); font-size: 1.1rem; }
.steps h3 { margin-bottom: .3rem; font-size: 1.3rem; }
.codeblock { position: relative; background: #05071a; border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.1rem; color: #d7e2ff; font-size: .9rem; line-height: 1.6; overflow-x: auto; max-width: 100%; }
.codeblock code { background: none; padding: 0; color: inherit; white-space: pre; overflow-wrap: normal; }
.copy { position: absolute; top: .45rem; right: .45rem; font-size: .8rem; padding: .3rem .7rem; min-height: 32px; border-radius: 6px; border: 1px solid var(--line-hi); background: var(--night-2); color: var(--sand); cursor: pointer; font-family: var(--f-body); }
.copy:hover { color: var(--gold); }
.codeblock.hascopy { padding-top: 2.6rem; }

details { border-top: 1px solid var(--line); padding: .9rem 0; max-width: 70ch; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--f-display); font-size: 1.1rem; color: var(--sand); list-style: none; display: flex; align-items: center; gap: .6rem; min-height: 32px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: .6rem; height: .6rem; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); transition: transform .2s; margin-left: .2rem; flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
details > :not(summary) { margin-top: .8rem; }

/* ---------- footer ---------- */
.site-footer { margin-top: 0; background: linear-gradient(180deg, var(--night-0), #0a0c20); border-top: 1px solid var(--line); padding: 0 0 2.5rem; }
.footer-grid { display: grid; gap: 2rem; padding-top: 2.2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.05rem; color: var(--gold); margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 .15rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: .25rem 0; }
.site-footer a.brand { display: flex; color: var(--ink); padding: 0; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.2rem; color: var(--ink-2); font-size: .88rem; line-height: 1.6; max-width: none; margin: 0; }
.site-footer .fine p { max-width: 100ch; margin-bottom: .6rem; }

/* ---------- page head (inner pages) ---------- */
.page-head { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem); overflow: hidden; isolation: isolate; background: radial-gradient(80% 120% at 85% 0%, rgba(42,75,176,.35), transparent 60%), linear-gradient(180deg, var(--night-1), var(--night-0)); border-bottom: 1px solid var(--line); }
.page-head::before { content: ""; position: absolute; right: -10%; top: -40%; width: 70vmin; height: 70vmin; z-index: -1; border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 28px rgba(227,199,155,.03), 0 0 0 29px var(--line), 0 0 0 70px rgba(227,199,155,.02), 0 0 0 71px rgba(227,199,155,.1); opacity: .7; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: .3em; }
.page-head .lead { margin-bottom: 0; }
.page-head .cart { margin-bottom: 1rem; }

/* ---------- scroll-lit helpers ---------- */
.rune-bg { position: absolute; inset: 0; z-index: -1; opacity: .5; background: radial-gradient(60% 60% at 50% 0%, rgba(42,75,176,.35), transparent 70%); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html.js-intro .hero [data-awake] { opacity: 1 !important; transform: none !important; }
  html.js-intro .gate { filter: none !important; }
}
@media print { .site-header, .site-footer, .frieze, canvas { display: none; } body { background: #fff; color: #000; } }

/* ---------- overflow guards: grid/flex children may shrink below their content ---------- */
.cols > *, .steps > li, .steps li > *, .ledger li > *, .page-head > *, .sec-head > *, .wrap > * { min-width: 0; }
.ledger li { grid-template-columns: 52px minmax(0, 1fr); }
.steps { min-width: 0; }
.tablewrap { max-width: 100%; }
.codeblock { max-width: 100%; }
@media (max-width: 420px) { .ledger li { grid-template-columns: 40px minmax(0, 1fr); gap: .2rem .8rem; } .ledger .gl { width: 36px; height: 36px; } }
.note + .sec-head { margin-top: 2.4rem; }
.cols > figure, .cols > .frame { align-self: start; }
