/* FQ, fq.pkd.cloud: carved stone, bronze, gold leaf, parchment and leather.
   Three faces: IM Fell English SC (engraved display), Alegreya (reading text),
   Jersey 10 (only what the game itself would print). One stylesheet, no framework. */

@font-face { font-family: 'IM Fell English SC'; src: url(/fonts/im-fell-english-sc.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya-700.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Jersey 10'; src: url(/fonts/jersey-10.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* materials (design A, unchanged) */
  --deepstone: #1d1915;      /* the cavern behind every panel */
  --basalt: #322c26;         /* carved panel face */
  --basalt-hi: #433a31;
  --basalt-lo: #231f1b;
  --bronze: #a0733a;
  --bronze-hi: #e6c77f;
  --bronze-lo: #4a3014;
  --gold: #efc964;
  --parchment: #e9dab0;
  --parchment-lo: #d3bd88;
  --ink: #3a2616;
  --ink-soft: #574029;       /* 4.5:1 or better on the darkest parchment shading (#c0b08b) */
  --leather: #5b2a1d;
  --leather-lo: #3a1a12;
  --text: #eadfc4;           /* text on stone */
  --text-dim: #b5a687;
  --outline: #0e0b08;
  --oxblood: #6e340c;        /* A's drop caps and parchment links, darkened to hold 4.5:1 on shaded parchment */
  --road: #8a2c12;           /* A's journey road and selection ring */

  /* consider colours, the classic danger scale */
  --con-green: #4bb54f;
  --con-lblue: #71c6f2;
  --con-blue: #3c68dc;
  --con-white: #f3efe2;
  --con-yellow: #f0d43c;
  --con-red: #d9412f;
  --con-scale: linear-gradient(90deg,
      var(--con-green) 0 18%, var(--con-lblue) 18% 36%, var(--con-blue) 36% 55%,
      var(--con-white) 55% 73%, var(--con-yellow) 73% 87%, var(--con-red) 87% 100%);

  /* chat channel colours */
  --c-sys: #f2e34f;
  --c-say: #f1ede0;
  --c-zone: #f2e34f;
  --c-tell: #d38cf5;
  --c-ooc: #7ee06f;

  /* additions (SPEC 5.2), built from the same materials */
  --st-open: radial-gradient(circle at 35% 35%, #fff4c8, #e9c33c 45%, #8a5f14);
  --st-testing: linear-gradient(to bottom right, transparent 50%, #f0c95a 50%, #8a5f14);
  --st-building: transparent;
  --lantern-halo: radial-gradient(#ffcf5a 0, rgba(255, 207, 90, .45) 30%, transparent 70%);
  --tl-well: #0b0906;
  --tl-bar: #8a6a3e;
  --tl-bar-hi: #c89a4c;
  --tl-tick: #e6c77f;
  --ver-current: #7ee06f;
  --ver-other: #b5a687;
  --gem-build: radial-gradient(circle at 35% 35%, #f0d0ff, #a45bc8 50%, #4a1f5c);

  --display: 'IM Fell English SC', 'Iowan Old Style', Georgia, serif;
  --serif: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --pixel: 'Jersey 10', 'Lucida Console', monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --topbar: 56px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deepstone) var(--grain);
  color: var(--text);
  font: 400 18px/1.55 var(--serif);
  font-feature-settings: 'onum' 1, 'kern' 1;
  overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff0bf; }
button, select, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* on parchment the gold ring is too faint (about 1.5:1): the ring turns road-red there (7:1),
   and back to gold inside the dark carved windows that sit on parchment */
.parchment :focus-visible, .page :focus-visible, .rel-page :focus-visible, .zh-inset :focus-visible { outline-color: var(--road); }
.parchment .window :focus-visible { outline-color: var(--gold); }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.px { font-family: var(--pixel); font-feature-settings: normal; letter-spacing: .02em; font-weight: 400; font-style: normal; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--outline); padding: 8px 12px; font-weight: 700; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* the footer starts below the fold on every route: views fill in after the data arrives, and
   a footer at the top of an empty page would jump away (CLS) */
#main { min-height: 100vh; }
main:focus, h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus, h4[tabindex="-1"]:focus { outline: none; }

/* ---------- carved window: bronze frame with gold studs ---------- */
.window {
  position: relative;
  background: var(--basalt) var(--grain);
  border: 8px solid transparent;
  border-image: url(/img/frame.svg) 8 / 8px / 0 stretch;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7);
}
.window-title {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: -2px -2px 0; padding: 5px 12px 6px;
  background: linear-gradient(#4a4036, #2c261f);
  border-bottom: 1px solid var(--outline);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, .14), 0 1px 0 rgba(255, 236, 190, .06);
  font: 400 17px/1.1 var(--display);
  color: var(--gold);
  text-shadow: 0 1px 0 #000;
}
.window-title::before, .window-title::after {
  content: ''; flex: 1; height: 3px; max-width: 120px;
  border-top: 1px solid var(--bronze-lo); border-bottom: 1px solid var(--bronze);
}

/* ---------- bevelled stone buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 20px;
  background: linear-gradient(#4b4137, #2f2821);
  color: var(--text);
  font: 500 17px/1.1 var(--serif);
  text-decoration: none; cursor: pointer;
  border: 2px solid; border-color: #75664f #19140f #19140f #75664f;
  outline: 1px solid var(--outline); outline-offset: 0;
  text-shadow: 0 1px 0 #000;
}
.btn:hover { color: var(--gold); background: linear-gradient(#55493d, #342c24); }
.btn:active, .btn[aria-pressed="true"] { border-color: #19140f #75664f #75664f #19140f; background: linear-gradient(#262019, #3a3129); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: linear-gradient(#c89a4c, #8a5f2a); color: #1c1207; border-color: #f4dc9c #4a3014 #4a3014 #f4dc9c; text-shadow: 0 1px 0 rgba(255, 240, 200, .5); font-weight: 700; }
.btn-gold:hover { color: #000; background: linear-gradient(#dcad5c, #9a6b31); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 16px; }
.btn .px { font-size: 20px; line-height: 1; }

/* gold leaf and ink display type */
.h-gold, .wordmark, .brand-mark, .footer-mark, .s-day {
  font-family: var(--display); font-weight: 400;
  background: linear-gradient(180deg, #fff4c8 0%, #f3cf6a 34%, #9b6a1c 52%, #e7b84a 70%, #6e4510 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #1a0e03) drop-shadow(0 0 1px #000);
}
.h-ink { font-family: var(--display); font-weight: 400; color: var(--ink); }
h1.h-gold, h2.h-gold, h2.h-ink { font-size: clamp(40px, 5.6vw, 64px); line-height: 1; margin: 0 0 14px; letter-spacing: .005em; }
.h-small { font: 400 21px/1.2 var(--display); color: var(--gold); margin: 0 0 8px; }
.section-head { max-width: 46em; margin-bottom: 26px; }
.section-sub { margin: 0; font-size: 19px; }
.stone .section-sub, .progress .section-sub { color: var(--text-dim); }
.parchment .section-sub { color: var(--ink-soft); }

/* status gems: full gold (open), lower half gold (in testing), hollow (being built) */
.st { display: inline-block; flex: none; width: 11px; height: 11px; transform: rotate(45deg); border: 1.5px solid var(--ink); background: var(--st-building); vertical-align: 1px; }
.st-open { background: var(--st-open); border-color: #4a2e08; }
.st-testing { background: var(--st-testing); }
.stone .st, .window .st, .timeline .st, .zone-head .st { border-color: #8c7650; }
.stone .st-open, .window .st-open, .zone-head .st-open { border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; }

/* the level bar: con colours, dark outside the range */
.lvl { position: relative; display: block; height: 10px; background: var(--con-scale); border: 1px solid #000; outline: 1px solid #5b4a33; }
.lvl::before, .lvl::after { content: ''; position: absolute; top: 0; bottom: 0; background: rgba(14, 11, 8, .86); }
.lvl::before { left: 0; width: var(--lo); }
.lvl::after { right: 0; width: calc(100% - var(--hi)); }

/* status chips in the pixel face */
.chip-st { display: inline-block; font: 400 18px/1 var(--pixel); letter-spacing: .02em; padding: 3px 8px 2px; vertical-align: 2px; white-space: nowrap; }
.chip-st.open, .chip-st.current { color: #1c1207; background: var(--gold); }
.chip-st.testing, .chip-st.in-build { color: var(--c-tell); border: 1px solid #6a4a7a; background: #1a1319; }
.chip-st.building, .chip-st.planned { color: var(--text-dim); border: 1px solid #5b4a33; background: #14110e; }
.chip-st.released { color: var(--text); border: 1px solid #5b4a33; background: #14110e; }
.vchip { font-family: var(--pixel); font-size: 17px; line-height: 1; padding: 2px 5px 1px; color: var(--ver-current); border: 1px solid #3f5a33; background: #14110e; white-space: nowrap; }
.vchip.old { color: var(--ver-other); border-color: #5b4a33; }

/* pixel time-of-day icons */
.tod { width: 22px; height: 22px; display: grid; place-items: center; background: rgba(10, 8, 6, .82); border: 1px solid #5b4a33; }
.tod svg { width: 14px; height: 14px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: var(--topbar); padding: 0 var(--gutter);
  background: linear-gradient(#3a3229, #241f1a);
  border-bottom: 2px solid var(--bronze-lo);
  box-shadow: 0 1px 0 var(--bronze), 0 2px 0 var(--outline), 0 8px 18px rgba(0, 0, 0, .45);
}
.brand { text-decoration: none; line-height: 1; display: block; padding: 4px 0; }
.brand-mark { font-size: 34px; display: block; transform: translateY(2px); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 17px; white-space: nowrap; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -2px 0 var(--bronze); }
.nav-toggle { display: none; }
.build { text-decoration: none; }
.build .px { display: inline-block; white-space: nowrap; padding: 1px 9px 2px; font-size: 20px; line-height: 1.1; color: var(--c-ooc); background: #14110e; border: 1px solid #5c4b33; box-shadow: inset 0 1px 0 #000; }
.build:hover .px { border-color: var(--bronze); }

/* Off the landing the server starts the page as data-route="other" (nginx, dev server):
   the landing view stays hidden until the script shows the route's own view. */
main[data-route="other"] > .view-home { display: none; }

/* ---------- hero: the zone viewport ---------- */
.hero { position: relative; min-height: min(calc(100vh - var(--topbar)), 940px); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.viewport { position: absolute; inset: 0; z-index: -1; background: #3d4a55; overflow: hidden; }
.vp-scale { position: absolute; inset: 0; transform: scale(1.14); transform-origin: 62% 100%; }
.vp-scale img, .vp-scale canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 100%; }
.vp-low { image-rendering: pixelated; }
.vp-img { transition: opacity .25s steps(3); }
.vp-img.loading { opacity: 0; }
.viewport-shade { position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 13, 8, .72) 0%, rgba(18, 13, 8, 0) 16%),
    linear-gradient(90deg, rgba(18, 13, 8, .9) 0%, rgba(18, 13, 8, .84) 36%, rgba(18, 13, 8, .35) 52%, rgba(18, 13, 8, 0) 64%),
    linear-gradient(0deg, rgba(18, 13, 8, .75) 0%, rgba(18, 13, 8, 0) 32%),
    radial-gradient(ellipse at 60% 40%, transparent 50%, rgba(0, 0, 0, .35) 100%); }
.hero-inner { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: end; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 40px var(--gutter) 28px; }
.hero-copy { max-width: 600px; align-self: center; }
.wordmark { font-size: clamp(112px, 15vw, 212px); line-height: .8; margin: 0 0 4px -.04em; padding-bottom: .12em; letter-spacing: -.01em; }
.hero-lede { font: 500 clamp(24px, 2.3vw, 31px)/1.22 var(--serif); color: #fff5dc; margin: 0 0 14px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); max-width: 20em; }
.hero-text { color: #e8dcc0; margin: 0 0 26px; max-width: 34em; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-fine { margin: 18px 0 0; font-size: 15px; color: var(--text-dim); text-shadow: 0 1px 3px #000; }

/* chat window */
.chat { background: rgba(20, 16, 12, .84) var(--grain); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.chat-log { list-style: none; margin: 0; padding: 10px 12px 8px; height: 196px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 20px; line-height: 1.12; }
.chat-log li { margin: 2px 0; text-shadow: 1px 1px 0 #000; flex: none; }
.c-sys { color: var(--c-sys); }
.c-say { color: var(--c-say); }
.c-zone { color: var(--c-zone); }
.c-ooc { color: var(--c-ooc); }
.c-tell { color: var(--c-tell); }
.chat-log li.new { animation: chatIn .4s steps(4) both; }
@keyframes chatIn { from { opacity: 0; } to { opacity: 1; } }
.xp { padding: 8px 12px 10px; border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .08); }
.xp-label, .xp-sub { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; line-height: 1.1; color: var(--text-dim); }
.xp-label b { color: var(--text); font-weight: 400; }
.xp-sub { margin-top: 5px; color: var(--text-dim); }
/* the experience bar: five bubbles */
.xp-bar { position: relative; height: 12px; margin-top: 5px; background: var(--tl-well); border: 1px solid #5b4a33; box-shadow: inset 0 1px 2px #000; }
.xp-bar span { position: absolute; inset: 1px auto 1px 1px; width: calc(var(--v, 0%) - 2px); background: linear-gradient(#fff0a8, #e9c33c 45%, #a07a14); }
.xp-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), var(--tl-well) calc(20% - 1px) 20%); }
.chat-caption { margin: 0; padding: 6px 12px 8px; min-height: 34px; font-size: 18px; line-height: 1.1; color: var(--c-say); background: rgba(0, 0, 0, .28); border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .06); overflow-wrap: anywhere; }
/* two lines reserved on wide screens, so scrubbing rarely changes the window's height */
@media (min-width: 961px) { .chat-caption { min-height: 54px; } }
.chat-caption b { color: var(--gold); font-weight: 400; }

/* ---------- build timeline: "Scrub through the build" ---------- */
.timeline {
  position: relative; z-index: 2;
  padding: 14px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))) 18px;
  background: linear-gradient(#302922, #1e1a16);
  border-top: 2px solid var(--bronze-lo);
  box-shadow: 0 -1px 0 var(--bronze), 0 -2px 0 var(--outline);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin-bottom: 4px; }
.tl-title { margin: 0; font: italic 400 21px/1.2 var(--serif); color: var(--gold); text-shadow: 0 1px 0 #000; }
.tl-hint { margin: 0; font-size: 15px; line-height: 1.4; color: var(--text-dim); }
.tl-track { position: relative; height: 118px; cursor: ew-resize; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.tl-track:focus-visible { outline-offset: 4px; }
.tl-flags, .tl-well, .tl-ticks, .tl-axis { position: absolute; left: 0; right: 0; }
.tl-flags { top: 0; bottom: 26px; pointer-events: none; }
.tl-flag { position: absolute; top: 12px; bottom: 0; width: 0; border-left: 1px dashed var(--tl-bar); }
.tl-flag b { position: absolute; top: -12px; left: -12px; width: 24px; height: 24px; display: grid; place-items: center; isolation: isolate; font: 400 17px/1 var(--pixel); color: #1c1207; }
.tl-flag b::before { content: ''; position: absolute; inset: 4px; z-index: -1; transform: rotate(45deg); background: var(--st-open); border: 1px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.tl-well { top: 30px; height: 50px; background: var(--tl-well); border: 1px solid #5b4a33; box-shadow: inset 0 1px 3px #000, 0 1px 0 rgba(255, 236, 190, .06); }
.tl-bar { position: absolute; bottom: 0; background: var(--tl-bar); min-width: 1px; }
.tl-bar:hover { background: var(--tl-bar-hi); }
.tl-ticks { top: 31px; height: 48px; pointer-events: none; }
.tl-tick { position: absolute; bottom: 0; width: 2px; height: 7px; margin-left: -1px; background: var(--tl-tick); opacity: .85; }
.tl-tick.on { height: 100%; width: 3px; margin-left: -1.5px; opacity: 1; box-shadow: 0 0 6px rgba(255, 220, 140, .6); }
.tl-head-line { position: absolute; top: 20px; bottom: 30px; left: 0; width: 0; pointer-events: none; z-index: 2; }
.tl-head-line::before { content: ''; position: absolute; top: 8px; bottom: 0; left: -1.5px; width: 3px; background: linear-gradient(90deg, #6e4510, #f3cf6a, #6e4510); box-shadow: 0 0 0 1px #000; }
.tl-head-line::after { content: ''; position: absolute; top: 0; left: -8px; width: 16px; height: 16px; transform: rotate(45deg); background: var(--st-open); border: 2px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.tl-track:focus-visible .tl-head-line::after { outline: 2px solid #fff; }
.tl-axis { top: 86px; height: 32px; pointer-events: none; }
.tl-ax { position: absolute; top: 2px; padding-left: 6px; border-left: 1px solid #5b4a33; white-space: nowrap; line-height: 20px; }
.tl-ax.day { font: italic 400 16px/20px var(--serif); color: var(--gold); }
.tl-ax.hour { font: 400 17px/20px var(--pixel); color: var(--text-dim); }
.tl-ax .short { display: none; }
.tl-ver { position: absolute; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; font: 400 17px/1 var(--pixel); color: var(--c-ooc); }
.tl-ver::before { content: ''; width: 10px; height: 10px; transform: rotate(45deg); background: var(--st-open); outline: 1px solid #000; }
.tl-preview { position: absolute; bottom: calc(100% - 14px); left: 0; z-index: 5; width: 164px; will-change: transform; background: #000; border: 2px solid; border-color: #e6c77f #4a3014 #4a3014 #e6c77f; outline: 2px solid var(--outline); box-shadow: 0 10px 22px rgba(0, 0, 0, .7); pointer-events: none; }
.tl-preview canvas { width: 160px; height: 90px; }
.tl-preview span { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 5px 0; font-size: 17px; line-height: 1.1; color: var(--c-say); background: rgba(10, 8, 6, .84); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-milestones { list-style: none; margin: 12px 0 0; padding: 12px 0 0; min-height: 76px; /* reserved before the data arrives: no layout shift */ border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .06); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 24px; }
.tl-milestones li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 10px; align-items: start; font-size: 15px; line-height: 1.35; color: var(--text); }
.tl-milestones .tl-n { grid-row: span 2; position: relative; width: 24px; height: 24px; display: grid; place-items: center; isolation: isolate; font: 400 17px/1 var(--pixel); color: #1c1207; }
.tl-milestones .tl-n::before { content: ''; position: absolute; inset: 4px; z-index: -1; transform: rotate(45deg); background: var(--st-open); border: 1px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.tl-milestones time { font: 400 17px/1.1 var(--pixel); color: var(--text-dim); }

/* ---------- releases: the login screen's news window ---------- */
.releases { padding-bottom: 72px; overflow-x: clip; }
.rel-list { list-style: none; margin: 44px 0 0; padding: 0; }
.rel { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; padding: 0 0 64px; }
.rel::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 0; border-left: 2px dashed var(--tl-bar); opacity: .8; }
.rel:last-child { padding-bottom: 8px; }
.rel:last-child::before { bottom: 40%; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.rel-rail { position: sticky; top: 88px; align-self: start; padding-left: 52px; min-width: 0; }
.rel-gem { position: absolute; left: 3px; top: 10px; width: 22px; height: 22px; transform: rotate(45deg); background: #2a231c; border: 2px solid; border-color: #8c7650 #120e0a #120e0a #8c7650; outline: 1px solid #000; }
.rel.current .rel-gem { background: var(--st-open); border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; box-shadow: 0 0 18px rgba(255, 207, 90, .45); }
.rel.in-build .rel-gem { background: var(--gem-build); border-color: #f0d0ff #4a1f5c #4a1f5c #f0d0ff; }
.rel.planned .rel-gem, .rel.released .rel-gem { background: transparent; }
.rel.planned .rel-gem { border-color: #8c7650; box-shadow: inset 0 0 0 1px #000; }
.rel.released .rel-gem { background: radial-gradient(circle at 35% 35%, #e8dcc0, #8c7650 55%, #3a2f22); }
.rel-ver { margin: 0; font: 400 44px/1 var(--pixel); color: var(--text); text-shadow: 2px 2px 0 #000; }
.rel.current .rel-ver { color: var(--gold); }
.rel-name { margin: 8px 0 0; font: 400 30px/1.05 var(--display); color: #fff3d0; }
.rel-state { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 16px; font-style: italic; color: var(--text-dim); }
.rel-facts { margin: 22px 0 0; padding: 4px 14px 6px; max-width: 300px; background: rgba(0, 0, 0, .22); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .06); }
.rel-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px solid rgba(0, 0, 0, .5); box-shadow: 0 1px 0 rgba(255, 236, 190, .05); }
.rel-facts div:last-child { border: 0; box-shadow: none; }
.rel-facts dt { color: var(--text-dim); font-size: 16px; }
.rel-facts dd { margin: 0; font: 400 21px/1 var(--pixel); color: var(--gold); text-align: right; }
.rel-body { min-width: 0; }
.rel-page {
  color: var(--ink); padding: 30px clamp(18px, 3.2vw, 44px) 34px;
  border: 8px solid transparent; border-image: url(/img/frame.svg) 8 / 8px / 0 stretch;
  background:
    radial-gradient(ellipse 60% 45% at 30% 15%, rgba(255, 250, 232, .45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 75% 90%, rgba(140, 95, 40, .14), transparent 70%),
    var(--grain-soft), linear-gradient(#ecdfb9, #dfca98);
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .8);
}
.rel-page a:not(.btn) { color: var(--oxblood); }
.rel-sum p { margin: 0 0 .9em; font-size: 18px; line-height: 1.62; max-width: 40em; }
.rel-sum p:first-child::first-letter { float: left; font: 400 68px/.8 var(--display); color: var(--oxblood); padding: 6px 10px 0 0; }
.rel-block { margin-top: 26px; padding-top: 20px; border-top: 1px dotted rgba(58, 38, 22, .5); }
.rel-block-h { margin: 0 0 14px; font: 400 24px/1.1 var(--display); color: var(--ink); }
.rel.planned .rel-body { color: var(--text-dim); -webkit-mask-image: linear-gradient(180deg, #000 10%, rgba(0, 0, 0, .78) 100%); mask-image: linear-gradient(180deg, #000 10%, rgba(0, 0, 0, .78) 100%); }
.rel.planned .rel-rail { -webkit-mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .35) 100%); mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .35) 100%); }
.rel.planned .rel-sum p { font-size: 19px; line-height: 1.6; max-width: 36em; }
.rel.planned .rel-sum p:first-child::first-letter { color: var(--text-dim); }
.rel.planned .rel-ver { color: var(--text-dim); }
.rel-fog { position: absolute; z-index: -1; left: -10%; right: -10%; bottom: -30px; height: 140px; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(29, 25, 21, .9), transparent 70%); }

/* the journey strip, drawn in ink on the release page */
.route-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #8a6a3e transparent; margin: 0 -10px; padding: 0 clamp(14px, 2.4vw, 34px); }
.route { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(11, minmax(48px, 1fr)); min-width: 540px; }
.route::before { content: ''; position: absolute; left: calc(100% / 22); right: calc(100% / 22); top: 50%; margin-top: -1px; border-top: 2px dashed rgba(58, 38, 22, .65); }
.route li { position: relative; }
.route button { position: relative; display: block; width: 100%; height: 128px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink); font: 500 15px/1.15 var(--serif); }
.route .pip { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); background: #f3e7c4; border: 2px solid var(--ink); outline: 1px solid rgba(58, 38, 22, .3); }
.route .open .pip { background: var(--st-open); border-color: #4a2e08; }
.route .nm { position: absolute; left: -24%; right: -24%; text-align: center; }
.route .n { display: block; font: 400 17px/1 var(--pixel); color: var(--ink-soft); }
.route li:nth-child(odd) .nm { bottom: calc(50% + 14px); }
.route li:nth-child(even) .nm { top: calc(50% + 14px); }
.route button:hover .nm, .route button:focus-visible .nm { color: var(--road); text-decoration: underline; text-underline-offset: 3px; }
.route button:hover .pip { outline: 2px solid var(--road); }
.route button:focus-visible { outline: none; }
.route button:focus-visible .pip { outline: 2px solid var(--road); outline-offset: 3px; }

/* zone lists in the index style */
.zlist { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 40px; }
.zlist li { break-inside: avoid; display: grid; grid-template-columns: auto minmax(12px, 1fr) auto; align-items: baseline; gap: 0 8px; padding: 4px 0 5px; }
.zlist a { font-weight: 500; text-decoration: none; color: var(--ink); }
.zlist a:hover { color: var(--road); text-decoration: underline; }
.zlist li.open a { font-weight: 700; }
.zlist .leader { border-bottom: 2px dotted rgba(58, 38, 22, .38); transform: translateY(-5px); }
.zlist .px { font-size: 18px; line-height: 1; color: var(--ink-soft); }
.zlist .note { grid-column: 1 / -1; font-size: 15px; font-style: italic; line-height: 1.35; color: var(--ink-soft); }

/* per-continent cells: experience-bar cells in ink */
.cbars { display: grid; gap: 14px; }
.cbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.cbar-name { font: 400 20px/1.1 var(--display); color: var(--ink); }
.cbar-cells { display: flex; flex-wrap: wrap; gap: 5px 7px; margin: 0; padding: 4px 3px; list-style: none; }
.cbar-cells a { display: block; width: 16px; height: 16px; padding: 2px; }
.cbar-cells a:hover .st, .cbar-cells a:focus-visible .st { outline: 2px solid var(--road); outline-offset: 2px; }
.cbar-cells a:focus-visible { outline: none; }
.cbar-cells .st { width: 13px; height: 13px; display: block; }
.cbar-n { font: 400 18px/1 var(--pixel); color: var(--ink-soft); white-space: nowrap; }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.blist li { position: relative; padding-left: 22px; font-size: 17px; line-height: 1.45; }
.blist li::before { content: ''; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px; transform: rotate(45deg); background: linear-gradient(135deg, #e6c77f, #a0733a 55%, #4a3014); outline: 1px solid rgba(58, 38, 22, .6); }

/* bevel-framed thumbnail strips */
.shot-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.strip-item { display: grid; gap: 6px; justify-items: start; width: 100%; padding: 0; background: none; border: 0; cursor: zoom-in; text-align: left; color: var(--ink); font-size: 15px; line-height: 1.25; }
.strip-item .im { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid; border-color: #f7eccb #6b5234 #6b5234 #f7eccb; outline: 1px solid var(--ink); background: #000; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.strip-item:hover .im, .strip-item[aria-pressed="true"] .im { outline: 2px solid var(--road); }
.strip-item:focus-visible { outline: none; }
.strip-item:focus-visible .im { outline: 2px solid var(--road); outline-offset: 2px; }
.strip-item .cap { font-style: italic; color: var(--ink-soft); }
.strip-item.ph { cursor: default; }
/* a fixed slot for the count: chips keep their width whatever the number (no reflow when the
   counts arrive or change) */
.chip .n { display: inline-block; min-width: 4.5ch; text-align: right; }

/* ---------- parchment ---------- */
.parchment {
  position: relative; color: var(--ink);
  background:
    radial-gradient(ellipse 45% 40% at 14% 22%, rgba(150, 105, 45, .13), transparent 70%),
    radial-gradient(ellipse 40% 55% at 88% 64%, rgba(140, 95, 40, .12), transparent 70%),
    radial-gradient(ellipse 30% 25% at 58% 88%, rgba(120, 80, 30, .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 62% 18%, rgba(255, 250, 232, .45), transparent 70%),
    radial-gradient(ellipse 110% 90% at 50% 50%, transparent 60%, rgba(110, 70, 25, .20) 100%),
    var(--grain-soft),
    linear-gradient(#ecdfb9, #e2cea0);
}
.parchment::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: linear-gradient(rgba(60, 35, 10, .35), transparent); pointer-events: none; }
.parchment a:not(.btn) { color: var(--oxblood); }
.about { padding: 88px 0 72px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-text { max-width: 36em; }
.about-text p { font-size: 19px; line-height: 1.62; margin: 0 0 1em; }
.about-text p:first-of-type::first-letter { float: left; font: 400 76px/.8 var(--display); color: var(--oxblood); padding: 6px 10px 0 0; }
.sheet { color: var(--text); margin-top: 12px; }
.sheet-list { margin: 0; padding: 10px 16px 14px; }
.sheet-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px solid rgba(0, 0, 0, .45); box-shadow: 0 1px 0 rgba(255, 236, 190, .06); }
.sheet-list div:last-child { border: 0; box-shadow: none; }
.sheet-list dt { color: var(--text-dim); font-size: 16px; }
.sheet-list dd { margin: 0; text-align: right; font-size: 16px; }
.sheet-list dd.px { color: var(--gold); font-size: 21px; line-height: 1; }

/* ---------- zone atlas ---------- */
.atlas { padding: 24px 0 96px; }
.atlas-controls { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 0; }
.segbtn { min-height: 38px; padding: 6px 14px; background: transparent; border: 1px solid var(--ink); margin-left: -1px; cursor: pointer; font-size: 16px; color: var(--ink); }
.segbtn:first-child { margin-left: 0; }
@media (hover: hover) { .segbtn:hover { background: rgba(58, 38, 22, .08); } }
.segbtn[aria-pressed="true"] { background: var(--ink); color: var(--parchment); }
.segbtn .px { font-size: 18px; line-height: 1; margin-left: 6px; opacity: .8; }
.segbtn:focus-visible { outline-color: var(--road); position: relative; z-index: 1; }
.map-jump { display: none; gap: 0; align-items: center; margin-bottom: 10px; }
.map-jump-l { margin-right: 10px; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.map-jump-l + .segbtn { margin-left: 0; }
.map-jump .segbtn { min-height: 36px; font-style: italic; }
.map-frame { position: relative; margin: 0; padding: 6px; border: 3px double var(--ink); background: rgba(255, 248, 225, .25); }
.map-scroll { position: relative; overflow: auto hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #8a6a3e transparent; }
#atlas-map { display: block; width: 100%; height: auto; }
.map-hint { display: none; margin: 8px 0 0; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px 6px 4px; border-top: 1px solid rgba(58, 38, 22, .35); font-size: 15px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { width: 20px; height: 20px; overflow: visible; }

/* map drawing (SVG) */
.m-sea { fill: #e6d6aa; }
.m-waves path { fill: none; stroke: #2c5a78; stroke-width: 1.1; opacity: .28; stroke-linecap: round; }
.m-coast { fill: none; stroke: var(--ink); stroke-opacity: .7; stroke-width: 1.4; stroke-linejoin: round; }
.m-contour { fill: none; stroke: #2c5a78; stroke-width: .9; opacity: .32; }
.m-island-rim { fill: none; stroke: var(--ink); stroke-opacity: .6; stroke-width: 1.1; stroke-linejoin: round; }
.m-continent { font: 400 40px var(--display); letter-spacing: .18em; fill: var(--ink); fill-opacity: .22; pointer-events: none; }
.m-seaname { font: italic 400 20px var(--serif); letter-spacing: .08em; fill: #2c5a78; fill-opacity: .5; pointer-events: none; }
.m-planes { font: italic 400 20px var(--serif); letter-spacing: .06em; fill: var(--ink); fill-opacity: .45; pointer-events: none; }
.m-compass text { font: 400 20px var(--display); fill: var(--ink); fill-opacity: .7; }
.m-link { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-opacity: .5; }
.m-link.ship { stroke: #2c5a78; stroke-dasharray: 7 5; stroke-width: 1.6; stroke-opacity: .8; }
.m-link.portal { stroke: #6b2a7a; stroke-dasharray: 2 4; stroke-linecap: round; stroke-width: 2; stroke-opacity: .75; }
.m-journey { fill: none; stroke: var(--road); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.m-link.hot { stroke: #b8860b; stroke-opacity: 1; stroke-width: 2.2; }
.m-link.dim, .m-journey.dim, .m-node.dim { opacity: .12; }
.m-node { cursor: pointer; }
.m-node .hit { fill: transparent; }
.m-node .shape { stroke: var(--ink); stroke-width: 1.6; }
.m-node:not(.open) .shape { fill: #f3e7c4; }
.m-node.open .shape { stroke: #3a2616; stroke-width: 1.8; }
/* 10% over the spec's 15 units: the map is always drawn below its 1600-unit width (1206 px
   at 1440, 1180 px on phones), and the labels still clear each other at this size */
.m-lbl { font: 500 16.5px var(--serif); fill: var(--ink); paint-order: stroke; stroke: rgba(236, 222, 180, .92); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.m-lbl.open { font-weight: 700; }
.m-lbl.dungeon { font-style: italic; font-size: 15.5px; }
.m-lbl.dim { opacity: .12; }
.m-node:hover .shape, .m-node:focus-visible .shape, .m-node.lit .shape { fill: #fff; }
.m-node.open:hover .shape, .m-node.open:focus-visible .shape, .m-node.open.lit .shape { fill: #ffe9a6; }
.map-static .m-node:hover .shape { fill: #f3e7c4; }
.map-static a:hover .m-node .shape, .map-static a:focus-visible .m-node .shape { fill: #fff; }
.m-node:focus { outline: none; }
.m-node .ring { fill: none; stroke: var(--road); stroke-width: 2; stroke-dasharray: 3 3; opacity: 0; }
.m-node:focus-visible .ring, .m-node.sel .ring, .m-node.lit .ring { opacity: 1; }
.m-node .dot { fill: var(--road); stroke: #f3e7c4; stroke-width: .8; }
.map-static .m-node { cursor: default; }
.map-static a .m-node { cursor: pointer; }

/* the hover tooltip: a small window */
.map-tip { position: absolute; z-index: 6; transform: translate(-50%, calc(-100% - 16px)); border-width: 6px; border-image-width: 6px; padding: 5px 10px 6px; white-space: nowrap; box-shadow: 0 10px 20px rgba(0, 0, 0, .55); }
.map-tip.below { transform: translate(-50%, 12px); }
.map-tip b { display: block; font: 400 18px/1.15 var(--display); color: #fff3d0; }
.map-tip span { display: block; font: 400 17px/1.1 var(--pixel); color: var(--text-dim); }

/* zone card */
.zone-card { color: var(--text); position: absolute; top: 18px; right: 18px; z-index: 5; width: 360px; max-height: calc(100% - 36px); overflow: auto; scrollbar-width: thin; scrollbar-color: #6b5634 #1a1612; }
.zone-card.at-left { right: auto; left: 18px; }
.zc-close { position: absolute; right: 2px; top: 2px; width: 30px; height: 26px; display: grid; place-items: center; padding: 0; cursor: pointer; background: linear-gradient(#4b4137, #2f2821); border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; z-index: 2; }
.zc-close svg, .lb-close svg { width: 11px; height: 11px; fill: var(--gold); }
.zc-close:hover svg, .lb-close:hover svg { fill: #fff0bf; }
.zc-body { padding: 14px 16px 16px; }
.zc-name { font: 400 32px/1.02 var(--display); margin: 0 0 6px; color: #fff3d0; }
.zc-kind { margin: 0 0 12px; color: var(--text-dim); font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.zc-note { font-size: 16px; line-height: 1.5; margin: 0 0 12px; }
.zc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; font-style: italic; color: var(--text-dim); margin: 12px 0 5px; }
.zc-row .px { color: var(--text); font-size: 20px; line-height: 1; }
.zc-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; padding: 0; list-style: none; }
.zc-links button, .zc-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 3px 10px; background: #211c17; border: 1px solid #5b4a33; color: var(--text); cursor: pointer; font-size: 15px; text-decoration: none; }
.zc-links button:hover, .zc-links a:hover { color: var(--gold); border-color: var(--bronze); }
.zc-links .how { font-style: italic; color: var(--text-dim); }
.zc-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 14px; padding: 0; list-style: none; }
.zc-shots button { display: block; width: 100%; padding: 0; border: 1px solid #000; outline: 1px solid #5b4a33; cursor: zoom-in; background: #000; aspect-ratio: 16 / 10; overflow: hidden; }
.zc-shots button:hover { outline-color: var(--gold); }
.zc-shots img { width: 100%; height: 100%; object-fit: cover; }
.zc-empty { font-size: 15px; color: var(--text-dim); margin: 4px 0 14px; }
.zc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------- the zone list: overview gems and the ledger ---------- */
.zones { margin-top: 44px; }
.zones-h { margin: 0 0 12px; font: 400 34px/1 var(--display); color: var(--ink); }
.overview { display: flex; flex-wrap: wrap; gap: 18px 40px; padding: 16px 0 18px; border-top: 3px double var(--ink); border-bottom: 1px solid rgba(58, 38, 22, .35); }
.ov-group { display: grid; gap: 8px; align-content: start; }
.ov-name { margin: 0; font: 400 20px/1 var(--display); color: var(--ink); }
.ov-name .px { font-size: 18px; margin-left: 8px; color: var(--ink-soft); }
.ov-cells { display: flex; flex-wrap: wrap; gap: 8px 9px; max-width: 520px; margin: 0; padding: 3px; list-style: none; }
.ov-cells a { display: block; width: 15px; height: 15px; padding: 1px; }
.ov-cells .st { display: block; width: 13px; height: 13px; }
.ov-cells a:hover .st, .ov-cells a:focus-visible .st { outline: 2px solid var(--road); outline-offset: 2px; }
.ov-cells a:focus-visible { outline: none; }
.ov-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }
.ov-key span { display: inline-flex; align-items: center; gap: 8px; }
.ledger-group { margin-top: 34px; }
.ledger-group h4 { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font: 400 30px/1.05 var(--display); color: var(--oxblood); }
.ledger-group h4 small { font: italic 400 16px/1.3 var(--serif); color: var(--ink-soft); }
/* fixed layout: the columns line up from one continent's table to the next */
.ledger-t { width: 100%; border-collapse: collapse; font-size: 16px; table-layout: fixed; }
.ledger-t th { padding: 6px 8px; font: italic 400 15px/1.2 var(--serif); color: var(--ink-soft); text-align: left; border-bottom: 1px solid rgba(58, 38, 22, .55); }
.ledger-t td { padding: 7px 8px; border-bottom: 1px dotted rgba(58, 38, 22, .38); vertical-align: middle; overflow-wrap: break-word; }
.ledger-t .c-st { width: 34px; text-align: center; line-height: 0; }
.ledger-t .c-sh { width: 21%; }
.ledger-t .c-kd { width: 15%; }
.ledger-t .st { width: 13px; height: 13px; vertical-align: middle; }
.ledger-t .c-lv { width: 230px; }
.ledger-t .c-n { width: 110px; text-align: right; }
.ledger-t tbody tr:hover, .ledger-t tbody tr.lit { background: rgba(58, 38, 22, .07); }
.ledger-t a { color: var(--ink); text-decoration: none; font-weight: 500; }
.ledger-t a:hover { color: var(--road); text-decoration: underline; }
.ledger-t tr.open a { font-weight: 700; }
.ledger-t .zshort { font: 400 18px/1 var(--pixel); color: var(--ink-soft); }
.ledger-t .zkind { color: var(--ink-soft); }
.ledger-t .zmeta { display: none; }
.lv { display: flex; align-items: center; gap: 10px; }
.lv .lvl { flex: none; width: 128px; height: 9px; }
.lv .px { font-size: 18px; line-height: 1; color: var(--ink); white-space: nowrap; }
.ledger-t .c-n .px { font-size: 18px; color: var(--ink); }
.ledger-t .none { color: var(--ink-soft); }
.fogline { margin: 0; padding: 12px 8px 4px 44px; font-size: 16px; line-height: 1.7; font-style: italic; color: var(--ink-soft); border-top: 1px dashed rgba(58, 38, 22, .4); }
.fogline a { color: var(--ink-soft); }
.fogline a:hover { color: var(--road); }

/* ---------- stone sections ---------- */
.stone { position: relative; padding: 88px 0 96px; box-shadow: inset 0 14px 20px -12px rgba(0, 0, 0, .8);
  background:
    radial-gradient(ellipse 50% 35% at 20% 10%, rgba(255, 230, 180, .05), transparent 70%),
    radial-gradient(ellipse 45% 40% at 85% 60%, rgba(0, 0, 0, .25), transparent 70%),
    var(--grain), linear-gradient(#29241f, #1e1a16); }

/* tiles: the landing grid and the archive */
.grid, .s-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-flow: dense; gap: 24px 18px; }
.grid > li, .s-grid > li { min-width: 0; }
.grid > li.wide, .s-grid > li.wide { grid-column: span 2; }
.tile { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; color: var(--text); cursor: zoom-in; font: inherit; }
.tile .im { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid #000; outline: 1px solid #4d3f2d; }
.tile .im img { width: 100%; height: 100%; object-fit: cover; }
.tile .tod { position: absolute; right: 6px; bottom: 6px; }
@media (hover: hover) { .tile:hover .im { outline-color: var(--gold); } }
.tile:focus-visible { outline: none; }
.tile:focus-visible .im { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile .pl { display: block; margin-top: 9px; font: 400 18px/1.15 var(--display); color: var(--gold); }
.tile .tt { display: block; margin-top: 2px; font-size: 16px; line-height: 1.3; color: var(--text); }
.tile .mt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 5px; font-size: 15px; color: var(--text-dim); }
.tile .mt .px { font-size: 17px; line-height: 1; }
.gallery-more { margin: 36px 0 0; }

/* ---------- the archive ---------- */
.page-head { padding-top: 48px; }
.page-head h1.h-gold { font-size: clamp(44px, 6vw, 72px); }
.page-head .section-head { margin-bottom: 22px; }
.filters { margin-bottom: 18px; }
.filters-toggle { display: none; }
/* compact on purpose: with every facet open the window must still leave the first row of
   tiles above the fold at 1440 x 900 */
.filter-body { display: grid; grid-template-columns: minmax(0, 1fr); padding: 4px 18px 8px; }
.frow { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 5px 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid #000; box-shadow: 0 1px 0 rgba(255, 236, 190, .06); }
.frow-tests { border: 0; box-shadow: none; }
.flegend { font: italic 400 18px/1.15 var(--serif); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 3px 10px; background: linear-gradient(#433a31, #2c251f); border: 1px solid; border-color: #6d5e49 #15110d #15110d #6d5e49; color: var(--text); cursor: pointer; font-size: 16px; line-height: 1.1; }
.chip .n { font-family: var(--pixel); font-size: 18px; line-height: 1; color: var(--text-dim); }
@media (hover: hover) { .chip:hover { color: var(--gold); } }
/* pressed: sunk into the stone (inverted bevel), a gold hairline inside, gold lettering */
.chip[aria-pressed="true"] { background: linear-gradient(#1b1713, #2a241e); border-color: #15110d #8c7650 #8c7650 #15110d; box-shadow: inset 0 0 0 1px rgba(239, 201, 100, .38), inset 0 2px 3px rgba(0, 0, 0, .6); color: var(--gold); }
.chip[aria-pressed="true"] .n { color: var(--gold); }
.chip:disabled { opacity: .45; cursor: default; color: var(--text-dim); }
.chip:disabled:hover { color: var(--text-dim); }
.chip .vt { font-family: var(--pixel); font-size: 19px; line-height: 1; color: var(--ver-current); }
.chip .vt.old { color: var(--ver-other); }
.fselect, .pick select, .sort select { min-height: 38px; padding: 5px 8px; background: #16120f; border: 1px solid; border-color: #15110d #6d5e49 #6d5e49 #15110d; color: var(--text); font-size: 16px; max-width: 100%; }
.fselect { width: 100%; max-width: 380px; }
.filters-foot { display: none; }
@media (min-width: 961px) {
  /* the zone select and the tests toggle share the last row */
  .filter-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; }
  .frow, .filters-foot { grid-column: 1 / -1; }
  .frow-zone { grid-column: 1; border: 0; box-shadow: none; }
  .frow-tests { grid-column: 2; grid-template-columns: auto auto; }
  .frow-zone[hidden] + .frow-tests { grid-column: 1 / -1; grid-template-columns: 132px minmax(0, 1fr); }
}
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 6px; }
.results-count { margin: 0; min-height: 28px; font-size: 18px; color: var(--text-dim); }
/* while the shot files load, the footer stays below the fold */
.sessions { display: flow-root; } /* the loading line's margin stays inside: no jump when tiles replace it */
.sessions:has(> .loading-line) { min-height: 100vh; }
.results-count b { color: var(--text); font-weight: 500; }
.results-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-style: italic; color: var(--text-dim); }
.session { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 26px; padding-top: 30px; content-visibility: auto; contain-intrinsic-size: auto 560px; }
.s-rail { position: sticky; top: 72px; align-self: start; padding-top: 10px; border-top: 2px solid var(--bronze-lo); box-shadow: inset 0 1px 0 var(--bronze); }
.s-rail h2 { margin: 0; font-weight: 400; font-size: inherit; }
.s-day { display: block; font-size: 23px; line-height: 1.1; }
.s-hour { display: block; font: 400 34px/1 var(--pixel); color: var(--text); margin-top: 4px; }
.s-n { display: block; margin-top: 4px; font-size: 16px; font-style: italic; color: var(--text-dim); }
.s-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 24px 16px; }
.sentinel { height: 1px; }
.empty { margin-top: 26px; padding: 44px 24px; text-align: center; border: 1px dashed #5b4a33; background: rgba(0, 0, 0, .18); }
.empty p { margin: 0 0 16px; font-size: 19px; }
.loading-line { margin: 30px 0; font: 400 20px/1.2 var(--pixel); color: var(--c-sys); }

/* ---------- lightbox: an inspect window ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1440px, calc(100vw - 32px)); width: 100%; max-height: calc(100vh - 32px); overflow: visible; color: var(--text); }
.lightbox::backdrop { background: rgba(8, 6, 4, .88); }
.lb-window { background: var(--basalt) var(--grain); border: 8px solid transparent; border-image: url(/img/frame.svg) 8 / 8px / 0 stretch; box-shadow: 0 30px 80px rgba(0, 0, 0, .8); }
.lightbox[open] .lb-window { animation: lbOpen .22s steps(4) both; }
@keyframes lbOpen { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lb-titlebar { position: relative; padding-right: 48px; padding-left: 48px; }
.lb-title { margin: 0; font: 400 20px/1.1 var(--display); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-close { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 28px; display: grid; place-items: center; padding: 0; cursor: pointer; background: linear-gradient(#4b4137, #2f2821); border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; }
.lb-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.lb-stage { position: relative; background: #000; display: grid; place-items: center; min-height: 240px; max-height: calc(100vh - 100px); overflow: hidden; }
.lb-frame { position: relative; width: 100%; max-height: calc(100vh - 100px); aspect-ratio: var(--ar, 16 / 9); background: center / contain no-repeat; }
.lb-frame img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
#lb-img:not(.ready) { opacity: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 58px; display: grid; place-items: center; padding: 0; cursor: pointer; background: rgba(28, 23, 18, .85); border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; }
.lb-nav svg { width: 10px; height: 14px; fill: var(--gold); }
.lb-nav:hover { background: rgba(60, 50, 40, .95); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-inspect { padding: 16px 18px 18px; border-left: 1px solid #000; box-shadow: inset 1px 0 0 rgba(255, 236, 190, .07); display: flex; flex-direction: column; gap: 12px; overflow: auto; max-height: calc(100vh - 100px); }
.lb-caption { margin: 0; font-size: 20px; line-height: 1.3; color: #fff3d0; }
.inspect { margin: 0; font-size: 19px; line-height: 1.05; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; }
.inspect dt { color: var(--text-dim); }
.inspect dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.inspect dd .ver { color: var(--ver-current); }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lb-pos { margin: auto 0 0; font-size: 18px; color: var(--text-dim); }

/* ---------- progress: the spell book ---------- */
.progress { position: relative; padding: 88px 0 104px; background: var(--grain), radial-gradient(ellipse at 50% 0%, #3b1f16, #1d1915 70%); }
.versions { list-style: none; display: flex; align-items: flex-start; margin: 0 0 28px; padding: 0; max-width: 720px; }
.versions li { position: relative; flex: 1; }
.versions li + li::before { content: ''; position: absolute; left: -50%; right: 50%; top: 20px; height: 2px; background: repeating-linear-gradient(90deg, #8a6a3e 0 6px, transparent 6px 10px); z-index: 0; }
.vbtn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; padding: 8px 4px; color: var(--text-dim); text-decoration: none; text-align: center; }
.vbtn .gem { width: 20px; height: 20px; transform: rotate(45deg); background: #2a231c; border: 2px solid; border-color: #8c7650 #120e0a #120e0a #8c7650; outline: 1px solid #000; }
.vbtn.current .gem { background: var(--st-open); border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; }
.vbtn.in-build .gem { background: var(--gem-build); }
.vbtn.released .gem { background: radial-gradient(circle at 35% 35%, #e8dcc0, #8c7650 55%, #3a2f22); }
.vbtn .px { font-size: 22px; line-height: 1; color: var(--text); }
.vbtn .d { font-size: 15px; line-height: 1.3; font-style: italic; }
a.vbtn:hover .px { color: var(--gold); }
.book {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  padding: 22px; background: var(--grain), linear-gradient(135deg, #6a3222, #4a2016 60%, #3a1810);
  border: 1px solid #000; box-shadow: inset 0 0 0 1px #8a5a3a, inset 0 0 0 6px #4a2016, inset 0 0 0 7px var(--bronze), 0 30px 60px -20px rgba(0, 0, 0, .9);
}
.book::after { content: ''; position: absolute; top: 14px; bottom: 14px; left: calc(22px + (100% - 44px) * 5 / 13); width: 24px; transform: translateX(-12px);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(40, 20, 8, .45) 45%, rgba(0, 0, 0, .55) 50%, rgba(40, 20, 8, .45) 55%, rgba(0, 0, 0, 0)); pointer-events: none; }
.page { position: relative; color: var(--ink); padding: 26px 28px 24px; min-width: 0;
  background:
    radial-gradient(ellipse 60% 45% at 30% 20%, rgba(255, 250, 232, .4), transparent 70%),
    radial-gradient(ellipse 60% 50% at 70% 85%, rgba(140, 95, 40, .12), transparent 70%),
    var(--grain-soft), linear-gradient(#ecdfb9, #dfca98); }
.page a:not(.btn) { color: var(--oxblood); }
.page-left { box-shadow: inset -18px 0 24px -16px rgba(80, 50, 20, .55); display: flex; flex-direction: column; }
.page-right { box-shadow: inset 18px 0 24px -16px rgba(80, 50, 20, .55); }
.page-title { font: 400 28px/1.1 var(--display); margin: 0 0 14px; color: var(--ink); }
.pick { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-style: italic; font-size: 16px; color: var(--ink-soft); }
.pick select { min-width: 0; flex: 0 1 auto; }
.page .pick select { background: #f6ecd0; color: var(--ink); border-color: #9c8660 #f7eccb #f7eccb #9c8660; outline: 1px solid rgba(58, 38, 22, .45); }
.pick-zone { margin: 0 0 12px; }
.pick-zone select { max-width: 240px; }
.views { list-style: none; margin: 0; padding: 0 4px 0 0; }
.view-progress .views { max-height: 820px; min-height: 820px; overflow: auto; scrollbar-width: thin; scrollbar-color: #8a6a3e transparent; }
.views li + li { border-top: 1px dotted rgba(58, 38, 22, .4); }
.vw { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 8px 4px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.vw-icon { width: 56px; height: 42px; border: 2px solid; border-color: #f7eccb #6b5234 #6b5234 #f7eccb; outline: 1px solid var(--ink); overflow: hidden; background: #000; }
.vw-icon img { width: 100%; height: 100%; object-fit: cover; }
.vw-name { display: block; font: 400 18px/1.15 var(--display); }
.vw-title { display: block; font-size: 16px; line-height: 1.3; }
.vw-meta { display: block; font-size: 14px; font-style: italic; color: var(--ink-soft); }
.vw:hover .vw-title { color: var(--road); }
.vw[aria-pressed="true"] { background: rgba(58, 38, 22, .1); }
.vw[aria-pressed="true"] .vw-title { color: var(--road); }
.vw[aria-pressed="true"] .vw-icon { outline: 2px solid var(--road); }
.vw:focus-visible { outline-color: var(--road); outline-offset: -2px; }
.page-keys { margin-top: 12px; }
.page-keys + .page-note { margin-top: 10px; }
.page-note { margin: 18px 0 0; padding-top: 12px; border-top: 1px dotted rgba(58, 38, 22, .4); font-size: 15px; font-style: italic; line-height: 1.45; color: var(--ink-soft); }
.compare-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.compare-head .page-title { min-height: 57px; }
.compare-head .page-title small { display: block; margin-top: 4px; font: 400 17px/1.3 var(--serif); color: var(--ink-soft); }
.seg-ink .segbtn { min-height: 36px; font-size: 15px; }
.compare { position: relative; margin: 6px 3px 0; background: #000; border: 1px solid var(--ink); outline: 3px double var(--ink); outline-offset: 3px; aspect-ratio: 16 / 9; overflow: hidden; --pos: 50%; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
.compare figure { margin: 0; position: absolute; inset: 0; }
.compare img { width: 100%; height: 100%; object-fit: cover; }
.compare img:not(.ready) { opacity: 0; }
.compare figcaption { position: absolute; bottom: 8px; padding: 2px 8px 1px; font-size: 19px; line-height: 1; background: rgba(10, 8, 6, .84); border: 1px solid #5b4a33; color: var(--c-ooc); }
.cmp-a figcaption { left: 8px; }
.cmp-b figcaption { right: 8px; color: var(--c-sys); }
.compare[data-mode="wipe"] .cmp-b { clip-path: inset(0 0 0 var(--pos)); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; pointer-events: none; }
.cmp-handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: linear-gradient(90deg, #6e4510, #f3cf6a, #6e4510); box-shadow: 0 0 0 1px #000; }
.cmp-handle::after { content: ''; position: absolute; top: 50%; left: -13px; width: 26px; height: 26px; margin-top: -13px; transform: rotate(45deg); background: var(--st-open); border: 2px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(.cmp-range:focus-visible) .cmp-handle::after { outline: 3px solid #fff; }
.compare[data-mode="side"] { aspect-ratio: 32 / 9; }
.compare[data-mode="side"] .cmp-a { right: calc(50% + 2px); }
.compare[data-mode="side"] .cmp-b { left: calc(50% + 2px); }
.compare[data-mode="side"] .cmp-handle, .compare[data-mode="side"] .cmp-range { display: none; }
.cmp-picks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 0; }
.cmp-picks select { max-width: 280px; }
.cmp-meta { margin: 12px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink-soft); }
.strip { margin-top: 18px; padding-top: 14px; border-top: 1px dotted rgba(58, 38, 22, .45); }
.strip-title { margin: 0 0 8px; font-style: italic; font-size: 16px; color: var(--ink-soft); }
.strip-list { list-style: none; margin: 0; padding: 4px 3px 8px; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #8a6a3e transparent; }
.strip-list li { flex: none; width: 136px; }
.strip-list .strip-item { font-size: 14px; }
.strip-list .vchip { font-size: 17px; }
.progress-more { margin: 28px 0 0; }
.book-empty { margin: 0; font-style: italic; color: var(--ink-soft); }

/* ---------- zone page ---------- */
.zone-head { padding: 52px 0 64px; }
.zh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 32px 56px; align-items: start; }
.zh-crumb { margin: 0 0 10px; font-size: 16px; font-style: italic; color: var(--text-dim); }
.zh-crumb a { color: var(--text-dim); }
.zh-crumb a:hover { color: var(--gold); }
.zone-head h1.h-gold { font-size: clamp(46px, 6.4vw, 84px); line-height: .95; margin: 0 0 14px; padding-bottom: .06em; }
.zh-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; font-size: 19px; color: var(--text-dim); }
.zh-kind .px { color: var(--text); font-size: 21px; }
.zh-blurb { margin: 0 0 20px; font-size: 20px; line-height: 1.55; max-width: 32em; color: var(--text); }
.zh-levels { max-width: 380px; margin-bottom: 22px; }
.zh-levels .zc-row { margin-top: 0; }
.zh-inset { margin: 0; padding: 6px; border: 3px double var(--ink); color: var(--ink);
  background: var(--grain-soft), linear-gradient(#ecdfb9, #e2cea0); box-shadow: 0 0 0 6px #2a2019, 0 0 0 7px var(--bronze-lo), 0 20px 40px -12px rgba(0, 0, 0, .8); }
.zh-inset svg { display: block; width: 100%; height: auto; }
.zh-inset-map { aspect-ratio: 8 / 5; }
.zh-inset figcaption { padding: 6px 4px 2px; font-size: 15px; font-style: italic; color: var(--ink-soft); border-top: 1px solid rgba(58, 38, 22, .35); }
.zh-kit { margin-top: 36px; }
.zh-kit h2 { margin: 0 0 12px; font: 400 26px/1.1 var(--display); color: #fff3d0; }
.zh-kit .shot-strip .strip-item { color: var(--text); }
.zh-kit .strip-item .cap { color: var(--text-dim); }
.zh-kit .strip-item .im { border-color: #75664f #19140f #19140f #75664f; outline-color: #000; }
.zh-kit .strip-item:hover .im, .zh-kit .strip-item:focus-visible .im, .zh-kit .strip-item[aria-pressed="true"] .im { outline: 2px solid var(--gold); outline-offset: 2px; }
.zone-shots { padding-top: 56px; }
.zone-shots h2.h-gold { font-size: clamp(34px, 4.2vw, 48px); }
.archive.scoped .tile .pl { display: none; }
.archive.scoped .tile .tt { margin-top: 9px; }
.zone-empty { padding: 36px 28px; border: 1px dashed #5b4a33; background: rgba(0, 0, 0, .18); }
.zone-empty p { margin: 0 0 14px; font-size: 19px; max-width: 40em; }
.zone-empty .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.zone-views { padding: 72px 0 88px; background: var(--grain), radial-gradient(ellipse at 50% 0%, #3b1f16, #1d1915 70%); }
.zv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 22px; }
.zv-list a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; color: var(--ink); text-decoration: none; background: var(--grain-soft), linear-gradient(#ecdfb9, #dfca98); border: 1px solid #000; box-shadow: inset 0 0 0 1px #f7eccb, 0 10px 22px -10px rgba(0, 0, 0, .8); }
.zv-list a:hover .vw-title { color: var(--road); text-decoration: underline; }
.zv-list .vw-icon { width: 96px; height: 54px; }

/* ---------- not found ---------- */
.notfound .chat { max-width: 560px; margin: 28px 0 24px; }
.notfound .chat-log { height: auto; min-height: 0; }
.notfound p.lead { font-size: 20px; margin: 0 0 18px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.footer { padding: 56px 0 64px; background: #15120f var(--grain); border-top: 2px solid var(--bronze-lo); box-shadow: 0 -1px 0 var(--bronze), 0 -2px 0 var(--outline); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.2fr); gap: 32px 56px; }
.footer .footer-mark { font-size: 64px; line-height: .9; margin: 0 0 12px; }
.footer-line { margin: 0; color: var(--text-dim); max-width: 22em; }
.footer p { font-size: 16px; line-height: 1.55; }
.disclaimer p, .howmade p { margin: 0 0 10px; color: var(--text-dim); max-width: 46em; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .tl-milestones { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 146px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .howmade { grid-column: 2; }
}
@media (max-width: 1100px) {
  /* releases stack: the rail becomes a header over a full-width page, and the road runs on
     down the left edge beside it */
  .rel { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rel-rail { position: relative; top: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); column-gap: 32px; align-content: start; }
  .rel-rail > :not(.rel-facts):not(.rel-gem) { grid-column: 1; }
  .rel-facts { grid-column: 2; grid-row: 1 / span 4; align-self: start; margin-top: 4px; max-width: none; }
  .rel-body { padding-left: 52px; }
  /* below the map, in the flow; relative (not static) so its close button stays on the card */
  .zone-card, .zone-card.at-left { position: relative; inset: auto; width: auto; max-height: none; margin-top: 16px; }
  .ledger-t .c-lv { width: 190px; }
  .lv .lvl { width: 96px; }
  .zh-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 28px 36px; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  /* the card spans the map's width here: the zone on the left, its pictures on the right */
  .zc-body { columns: 2; column-gap: 36px; column-rule: 1px solid rgba(0, 0, 0, .45); }
  .zc-body > * { break-inside: avoid; }
  .zc-row-shots { break-before: column; margin-top: 0; }
}
@media (max-width: 860px) {
  .zh-grid { grid-template-columns: minmax(0, 1fr); }
  .zh-inset { max-width: 640px; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .filters .window-title { display: none; }
  .filters-toggle { display: flex; width: 100%; border: 0; outline: 0; }
  .filter-body { display: none; }
  .filters.open .filter-body { display: block; }
  .filters.open .filters-foot { display: block; padding: 12px 0 4px; }
  .filters-done { width: 100%; }
  .frow { grid-template-columns: 1fr; gap: 8px; }
  .book { grid-template-columns: 1fr; padding: 14px; }
  .book::after { display: none; }
  .page-left, .page-right { box-shadow: none; }
  .page-left { border-bottom: 1px solid rgba(58, 38, 22, .4); }
  .view-progress .views { max-height: 420px; min-height: 420px; }
  .lb-body { grid-template-columns: 1fr; }
  .lb-inspect { border-left: 0; border-top: 1px solid #000; max-height: none; }
  .lb-stage, .lb-frame { max-height: 62vh; }
  .lb-stage { min-height: 0; }
  .lightbox { max-height: calc(100vh - 16px); overflow: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .howmade { grid-column: auto; }
  .session { grid-template-columns: 1fr; gap: 12px; }
  .s-rail { position: sticky; top: var(--topbar); z-index: 4; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 0; background: linear-gradient(#26211c, #1f1b17); }
  .s-day { font-size: 21px; }
  .s-hour { font-size: 26px; margin: 0; }
  .s-n { margin: 0; }
}
/* six links need about 900 px on one line: below 960 px they fold behind the Menu button
   (the static 404 topbar wraps them onto a second row instead) */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; background: linear-gradient(#4b4137, #2f2821); border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; cursor: pointer; font-size: 16px; }
  .nav ul { display: none; position: absolute; left: 0; right: 0; top: var(--topbar); flex-direction: column; gap: 0; padding: 6px var(--gutter) 12px; background: #241f1a; border-bottom: 2px solid var(--bronze-lo); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
  .nav.open ul { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid #000; font-size: 18px; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .topbar { gap: 12px; }
  .topbar-static { height: auto; min-height: var(--topbar); flex-wrap: wrap; row-gap: 0; padding-top: 6px; padding-bottom: 4px; }
  .topbar-static .nav { margin-left: 0; width: 100%; }
  .topbar-static .nav ul { display: flex; position: static; flex-direction: row; flex-wrap: wrap; gap: 0 2px; padding: 0; background: none; border: 0; box-shadow: none; }
  .topbar-static .nav a { padding: 8px 8px 8px 0; margin-right: 8px; border: 0; font-size: 16px; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero { min-height: 0; background: var(--deepstone) var(--grain); }
  .viewport { position: relative; inset: auto; z-index: 0; order: 0; aspect-ratio: 5 / 4; }
  .vp-scale { transform: scale(1.16); transform-origin: 72% 100%; }
  .vp-scale img, .vp-scale canvas { object-position: 72% 100%; }
  .viewport-shade { background: linear-gradient(0deg, rgba(29, 25, 21, .9) 0%, rgba(29, 25, 21, 0) 34%), linear-gradient(180deg, rgba(18, 13, 8, .55) 0%, rgba(18, 13, 8, 0) 18%); }
  .timeline { order: 1; }
  .hero-inner { order: 2; padding-top: 28px; padding-bottom: 36px; }
  .wordmark { font-size: 124px; margin-bottom: 6px; }
  .chat-log { height: auto; max-height: 214px; font-size: 18px; }
  .tl-hint { font-size: 14px; }
  .tl-ax .long { display: none; }
  .tl-ax .short { display: inline; }
  .tl-ax.hour { display: none; }
  .tl-milestones { display: flex; overflow-x: auto; gap: 18px; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; min-height: 92px; }
  .tl-milestones::-webkit-scrollbar { display: none; }
  .tl-milestones li { flex: none; width: 230px; scroll-snap-align: start; }
  .about { padding: 64px 0 56px; }
  .about-text p:first-of-type::first-letter { font-size: 62px; }
  .map-hint { display: block; }
  .map-jump { display: flex; flex-wrap: wrap; }
  .map-scroll #atlas-map { width: 1180px; max-width: none; }
  .ledger-t thead { display: none; }
  .ledger-t .c-sh, .ledger-t .c-kd { display: none; }
  .ledger-t .c-lv { width: 84px; }
  .ledger-t td { padding: 8px 4px; }
  .ledger-t .c-st { width: 24px; }
  .ledger-t .zmeta { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
  .ledger-t .zmeta .px { font-size: 17px; margin-right: 6px; }
  .lv { flex-direction: column; align-items: flex-end; gap: 4px; }
  .lv .lvl { width: 64px; }
  .ledger-t .c-n { width: 52px; }
  .fogline { padding-left: 4px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .tile .pl { font-size: 16px; }
  .tile .tt { font-size: 15px; }
  .tile .mt { font-size: 14px; gap: 2px 8px; }
  .results-bar { align-items: flex-start; flex-direction: column; }
  .stone, .progress { padding: 64px 0 72px; }
  .page-head { padding-top: 40px; }
  .page { padding: 20px 16px; }
  .compare[data-mode="side"] { aspect-ratio: auto; display: grid; gap: 4px; background: none; }
  .compare[data-mode="side"] figure { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .versions { max-width: none; }
  .rel-ver { font-size: 38px; }
  .rel-rail { grid-template-columns: minmax(0, 1fr); }
  .rel-facts { grid-column: 1; grid-row: auto; margin-top: 22px; max-width: 420px; }
  .rel-body { padding-left: 0; }
  .rel::before { display: none; }
  .rel-page { padding: 22px 16px 26px; }
  .rel-sum p:first-child::first-letter { font-size: 56px; }
  .shot-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbar { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .cbar-cells { grid-column: 1 / -1; grid-row: 2; }
  .zlist { columns: 1; }
  .lb-nav { width: 36px; height: 48px; }
  .zone-head { padding-top: 36px; }
}
@media (max-width: 420px) {
  .grid, .s-grid { gap: 16px 10px; }
  .tile .mt .tod-word { display: none; }
}

@media (forced-colors: active) {
  .chip[aria-pressed="true"], .segbtn[aria-pressed="true"], .vw[aria-pressed="true"], .strip-item[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .chip[aria-pressed="true"] .n, .segbtn[aria-pressed="true"] .px { color: HighlightText; }
  .st, .rel-gem, .vbtn .gem, .tl-head-line::after, .tl-flag b::before, .tl-milestones .tl-n::before, .cmp-handle::after { forced-color-adjust: none; border-color: CanvasText; }
  /* the histogram, the zones-built bar and the level bars are pictures of numbers: keep their colours */
  .tl-well, .tl-bar, .tl-tick, .xp-bar, .xp-bar span, .lvl, .cbar-cells .st { forced-color-adjust: none; }
  .st-building { background: Canvas; }
  .st-open { background: CanvasText; }
  .st-testing { background: linear-gradient(to bottom right, Canvas 50%, CanvasText 50%); }
  .wordmark { line-height: 1; padding-bottom: 0; background: none; color: CanvasText; filter: none; }
  .h-gold, .brand-mark, .footer-mark, .s-day { background: none; color: CanvasText; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.zh-plan { margin: 0 0 18px; font-size: 17px; font-style: italic; color: var(--text-dim); }
.zh-plan .px { font-style: normal; font-size: 20px; }

/* ---------- how it is built (landing, #how-built; SPEC 5.4) ----------
   The section is stone, between the About and atlas parchment sheets. Its drawings are inline
   SVG written by tools/build-howbuilt.js; everything here is scoped to .howbuilt / .hb-* / .pk-*
   and the SVG classes under .hb-svg. After the rules it overrides on purpose: .hb-log .chat-log
   (the hero log is fixed height) and .hb-note .st (ink gems on the parchment note). */

/* ---------- layout ---------- */
.howbuilt { overflow-x: clip; }
.hb-top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 6vw, 96px); align-items: start; }
.hb-lead { max-width: 40em; }
.hb-lead .section-sub { margin-bottom: 24px; }
.hb-prose p { font-size: 19px; line-height: 1.62; margin: 0 0 1em; max-width: 36em; }
.hb-sheet { margin-top: 12px; }
.hb-sheet-note { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.4; font-style: italic; color: var(--text-dim); }

.hb-parts { list-style: none; margin: 0; padding: 0; }
.hb-part { margin-top: clamp(64px, 8vw, 108px); }
.hb-h { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; font: 400 clamp(30px, 3.4vw, 40px)/1.05 var(--display); color: #fff3d0; text-shadow: 0 2px 0 #000; }
.hb-n { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; isolation: isolate; font-size: 22px; line-height: 1; color: #1c1207; text-shadow: none; }
.hb-n::before { content: ''; position: absolute; inset: 6px; z-index: -1; transform: rotate(45deg); background: var(--st-open); border: 1px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.hb-copy p { font-size: 18px; line-height: 1.6; margin: 0 0 1em; max-width: 38em; }
.hb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 4vw, 56px); }
.hb-cols .hb-h { grid-column: 1 / -1; }
.hb-cols p { max-width: none; }
.hb-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px clamp(32px, 4vw, 64px); align-items: start; }
.hb-split-note { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* ---------- parchment plates holding the drawings ---------- */
.hb-plate {
  margin: 22px 0 0; padding: 18px clamp(8px, 2vw, 26px) 12px; color: var(--ink);
  border: 8px solid transparent; border-image: url(/img/frame.svg) 8 / 8px / 0 stretch;
  background:
    radial-gradient(ellipse 60% 45% at 30% 15%, rgba(255, 250, 232, .45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 75% 90%, rgba(140, 95, 40, .14), transparent 70%),
    var(--grain-soft), linear-gradient(#ecdfb9, #dfca98);
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .8);
}
.hb-split .hb-plate { margin-top: 6px; }
.hb-plate figcaption { margin: 10px 2px 0; padding-top: 9px; border-top: 1px solid rgba(58, 38, 22, .3); font-size: 15px; font-style: italic; line-height: 1.45; color: var(--ink-soft); }
.hb-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hb-svg.v-narrow { display: none; margin: 0 auto; }
.hb-contracts .v-wide { max-width: 760px; margin: 0 auto; }
.hb-contracts .v-narrow { max-width: 420px; }
.hb-quest .v-narrow { max-width: 400px; }
.hb-roads .v-narrow { max-width: 420px; }

/* SVG type: the site's three faces and roles */
.hb-svg text { fill: var(--ink); }
.hb-svg .t-disp { font-family: var(--display); }
.hb-svg .t-px { font-family: var(--pixel); letter-spacing: .02em; }
.hb-svg .t-note { font: italic 400 17px var(--serif); fill: var(--ink-soft); }
.hb-svg .t-ring { font: italic 400 17px var(--serif); letter-spacing: .14em; fill: var(--ink-soft); }
.hb-svg .t-ring-n { font-size: 18px; letter-spacing: .06em; }
.hb-svg .t-note-n { font-size: 18px; }
.hb-svg .t-note-s { font-size: 15px; }
.hb-svg .t-scroll { font-size: 17px; }
.hb-svg .t-scrollcount { font-size: 18px; fill: var(--oxblood); }
.hb-svg .t-wax { font-size: 15px; fill: #f3dcae; }
.hb-svg .t-plq { font-size: 20px; }
.hb-svg .t-uses { font-size: 18px; fill: var(--oxblood); }
.hb-svg .t-ngem { font-size: 19px; fill: #1c1207; }
.hb-svg .t-qtitle { font-size: 22px; }
.hb-svg .t-qcount { font-size: 21px; fill: var(--oxblood); }
.hb-svg .t-qdet { font-size: 16px; }
.hb-svg .t-qtitle-n { font-size: 25px; }
.hb-svg .t-qcount-n { font-size: 22px; fill: var(--oxblood); }
.hb-svg .t-qdet-n { font-size: 18px; }
.hb-svg .t-rtitle { font-size: 23px; }
.hb-svg .t-rsub { font-size: 21px; fill: var(--oxblood); }
.hb-svg .t-rtitle-n { font-size: 22px; }
.hb-svg .t-rsub-n { font-size: 20px; fill: var(--oxblood); }
.hb-svg .t-master { font-size: 22px; fill: var(--ink-soft); }
.hb-svg .t-day { font-size: 17px; }
.hb-svg .t-day-n { font-size: 16px; }
.hb-svg .halo { paint-order: stroke; stroke: #e8d9b0; stroke-width: 6px; stroke-linejoin: round; }

/* SVG shapes: ink on parchment, gold gems, bronze figures */
.hb-svg .gem { stroke: #4a2e08; stroke-width: 1.1; }
.hb-svg .tok path, .hb-svg .tok circle { stroke: var(--ink); stroke-width: .9; }
.hb-svg .spoke { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .55; }
.hb-svg .spoke-dot { fill: var(--ink); opacity: .7; }
.hb-svg .ring-o { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.hb-svg .ring-i { fill: rgba(255, 248, 225, .35); stroke: var(--ink); stroke-width: .6; }
.hb-svg .ring-ticks path { stroke: var(--ink); stroke-width: .8; opacity: .55; }
.hb-svg .arcpath { fill: none; stroke: none; }
.hb-svg .scr-body { fill: #f5ead0; stroke: var(--ink); stroke-width: 1.3; }
.hb-svg .scr-roll { fill: #d9c08a; stroke: var(--ink); stroke-width: 1.3; }
.hb-svg .scr-write { stroke: var(--ink-soft); stroke-width: .9; opacity: .55; }
.hb-svg .ribbon { fill: #7a2410; stroke: #3a1208; stroke-width: .8; }
.hb-svg .wax { stroke: #3a1208; stroke-width: .8; }
.hb-svg .wax-ring { fill: none; stroke: #e0b27a; stroke-width: .8; opacity: .55; }
.hb-svg .plq-o { fill: #f3e7c4; stroke: var(--ink); stroke-width: 1.4; }
.hb-svg .plq-i { fill: none; stroke: var(--ink); stroke-width: .6; opacity: .5; }
.hb-svg .share, .hb-svg .share-head { fill: none; stroke: var(--road); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hb-svg .note-bg { fill: #ebdcb2; }
.hb-svg .road { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; opacity: .7; }
.hb-svg .road.win { stroke: var(--road); stroke-dasharray: none; stroke-width: 2.8; opacity: .95; }
.hb-svg .tw-body, .hb-svg .tw-cren rect { fill: #e3d2a4; stroke: var(--ink); stroke-width: 1.3; }
.hb-svg .tw-line { fill: none; stroke: var(--ink); stroke-width: .7; opacity: .5; }
.hb-svg .tw-pole { stroke: var(--ink); stroke-width: 1.4; }
.hb-svg .tw-flag { stroke: #3a1208; stroke-width: .8; }
.hb-svg .rd-edge { fill: none; stroke: var(--ink); stroke-linecap: round; opacity: .85; }
.hb-svg .rd-main.rd-edge { stroke-width: 17; }
.hb-svg .rd-br.rd-edge { stroke-width: 12.5; }
.hb-svg .rd-fill { fill: none; stroke: #f1e5c3; stroke-linecap: round; }
.hb-svg .rd-main.rd-fill { stroke-width: 13; }
.hb-svg .rd-br.rd-fill { stroke-width: 9; }
.hb-svg .rd-dash { fill: none; stroke: var(--road); stroke-width: 1.6; stroke-dasharray: 8 7; opacity: .8; }
.hb-svg .rd-br.rd-dash { stroke: var(--ink-soft); stroke-width: 1.2; }
.hb-svg .dayline { fill: none; stroke: var(--ink); stroke-width: .8; stroke-dasharray: 2 5; opacity: .45; }

/* ---------- the ten stops, in words ---------- */
.hb-steps { list-style: none; counter-reset: hbstep; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px clamp(28px, 4vw, 56px); }
.hb-steps li { counter-increment: hbstep; position: relative; padding-left: 40px; font-size: 16px; line-height: 1.5; color: var(--text); }
.hb-steps li::before { content: counter(hbstep); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; font: 400 17px/1 var(--pixel); color: #1c1207; z-index: 1; }
.hb-steps li::after { content: ''; position: absolute; left: 5px; top: 5px; width: 16px; height: 16px; transform: rotate(45deg); background: var(--st-open); border: 1px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }
.hb-steps b { font-weight: 500; color: var(--gold); }

/* ---------- tests ---------- */
.hb-trials { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hb-trial { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; background: rgba(0, 0, 0, .22); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .06); }
.hb-big { font-size: 46px; line-height: 1; color: var(--gold); text-shadow: 2px 2px 0 #000; white-space: nowrap; }
.hb-trial b { margin-top: 8px; font: 400 22px/1.15 var(--display); color: #fff3d0; }
.hb-trial > span:last-child { font-size: 16px; line-height: 1.45; color: var(--text-dim); }
.hb-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 28px clamp(32px, 4vw, 64px); align-items: start; margin-top: 32px; }
.hb-log .chat-log { height: auto; display: block; font-size: 20px; line-height: 1.15; padding: 12px 14px 12px; }
.hb-log .chat-log li { margin: 3px 0; }

/* ---------- the three site prototypes ---------- */
.hb-pickfig { margin: 26px 0 0; display: grid; grid-template-columns: minmax(0, 3fr) 56px minmax(0, 1.2fr); gap: 18px; align-items: center; }
.hb-pick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pk { min-width: 0; }
.pk p { margin: 9px 0 0; font-size: 16px; line-height: 1.3; color: var(--text); }
.pk p b { margin-right: 6px; font: 400 21px/1 var(--pixel); color: var(--gold); }
.pk p span { display: block; margin-top: 2px; font-size: 15px; font-style: italic; color: var(--text-dim); }
.pk-frame { line-height: 0; background: #000; border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; }
.pk-svg { display: block; width: 100%; height: auto; }
.pk-final .pk-frame { border: 8px solid transparent; border-image: url(/img/frame.svg) 8 / 8px / 0 stretch; outline: 0; box-shadow: 0 18px 36px -12px rgba(0, 0, 0, .8); }
.pk-final p b { display: block; margin: 0 0 2px; font: 400 22px/1.15 var(--display); color: #fff3d0; }
.pk-arrow { position: relative; justify-self: center; width: 52px; height: 3px; background: linear-gradient(90deg, #6e4510, #f3cf6a); box-shadow: 0 0 0 1px #000; }
.pk-arrow::after { content: ''; position: absolute; right: -4px; top: 50%; width: 12px; height: 12px; margin-top: -6px; transform: rotate(45deg); background: var(--st-open); border: 1px solid; border-color: #fff0c0 #5b3b0f #5b3b0f #fff0c0; outline: 1px solid #000; }

/* ---------- the to-do note ---------- */
.hb-note { color: var(--ink); padding: 22px 24px 18px; margin-top: 6px;
  background: radial-gradient(ellipse 60% 45% at 30% 15%, rgba(255, 250, 232, .45), transparent 70%), var(--grain-soft), linear-gradient(#ecdfb9, #dfca98);
  border: 1px solid #000; box-shadow: inset 0 0 0 1px #f7eccb, inset 0 0 0 5px rgba(0, 0, 0, 0), inset 0 0 0 6px rgba(58, 38, 22, .45), 0 18px 36px -12px rgba(0, 0, 0, .8); }
.hb-note h4 { margin: 0 0 10px; font: 400 26px/1.1 var(--display); color: var(--ink); }
.hb-note ul { list-style: none; margin: 0; padding: 0; }
.hb-note li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 8px 0; font-size: 16px; line-height: 1.45; border-top: 1px dotted rgba(58, 38, 22, .4); }
.hb-note li:first-child { border-top: 0; }
.hb-note .st { margin-top: 6px; border-color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hb-split, .hb-split-note { grid-template-columns: minmax(0, 1fr); }
  .hb-split .hb-copy p { max-width: 42em; }
  .hb-trials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .hb-quest .v-wide, .hb-roads .v-wide { display: none; }
  .hb-quest .v-narrow, .hb-roads .v-narrow { display: block; }
}
@media (min-width: 721px) and (max-width: 1024px) {
  .hb-quest-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 0 36px; align-items: start; }
  .hb-quest-wrap .hb-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hb-roadpart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 0 36px; align-items: start; }
  .hb-roadpart .hb-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .hb-top { grid-template-columns: minmax(0, 1fr); }
  .hb-sheet { max-width: 460px; }
  .hb-cols { grid-template-columns: minmax(0, 1fr); }
  .hb-cols p { max-width: 42em; }
  .hb-duo { grid-template-columns: minmax(0, 1fr); }
  .hb-log { max-width: 520px; }
  .hb-pickfig { grid-template-columns: minmax(0, 1fr); }
  .pk-arrow { transform: rotate(90deg); margin: 14px 0; }
  .pk-final { max-width: 440px; width: 100%; justify-self: center; }
  .hb-note { max-width: 560px; }
}
@media (max-width: 720px) {
  .hb-contracts .v-wide { display: none; }
  .hb-contracts .v-narrow { display: block; }
  .hb-steps { grid-template-columns: minmax(0, 1fr); }
  .hb-plate { padding: 12px 6px 10px; }
  .hb-plate figcaption { margin: 8px 6px 0; }
  .hb-copy p, .hb-prose p { font-size: 17px; }
  .hb-log .chat-log { font-size: 19px; }
}
@media (max-width: 560px) {
  .hb-trials { grid-template-columns: minmax(0, 1fr); }
  .hb-pick { gap: 8px; }
  .pk p { font-size: 14px; }
  .pk p b { display: block; margin: 0 0 2px; }
  .pk p span { font-size: 13px; }
  .hb-note { padding: 18px 16px 14px; }
}

/* ---------- kits and models (/kits; SPEC 5.4) ----------
   The view's markup comes with /data/kits.json (tools/import-kits.js); js/ui/kits.js wires it up.
   Built from the site's own parts (.window, .stone, .parchment, .seg, .chip, .sheet, .inspect,
   the lightbox); new classes start with k- (plus .sw swatches, .seg-stone and .chip-st.soon).
   The inspect window is .kits-lb, a second .lightbox: its differences are scoped to it. */

/* hero: title, the at-a-glance sheet and the lineup render */
.k-hero { position: relative; padding: 56px 0 64px; background: radial-gradient(ellipse 70% 60% at 30% 0%, rgba(255, 220, 160, .07), transparent 70%), var(--grain), linear-gradient(#231e19, #1d1915); }
.k-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 32px 56px; align-items: start; }
.k-eyebrow { margin: 0 0 6px; font: italic 400 19px/1.3 var(--serif); color: var(--text-dim); }
.k-hero h1.h-gold { font-size: clamp(48px, 7.5vw, 92px); margin-bottom: 18px; padding-bottom: .06em; }
.k-lede { margin: 0 0 12px; max-width: 36em; font: 500 clamp(19px, 1.6vw, 22px)/1.45 var(--serif); color: #fff5dc; }
.k-text { margin: 0 0 22px; max-width: 36em; color: var(--text-dim); }
.k-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.k-lineup { margin: 40px 0 0; }
.k-lineup-frame { position: relative; background: #1d1915; border: 2px solid; border-color: #75664f #19140f #19140f #75664f; outline: 1px solid #000; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .9); overflow: hidden; }
.k-lineup-frame img { width: 100%; height: auto; aspect-ratio: 1800 / 660; object-fit: cover; }
.k-lineup-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(0, 0, 0, .45); }
.k-lineup figcaption { margin-top: 10px; font-size: 16px; font-style: italic; color: var(--text-dim); max-width: 60em; }
.view-kits .window-title h3 { margin: 0; font: inherit; color: inherit; }

/* kit selection */
.k-wip { margin: -6px 0 24px; max-width: 52em; font-size: 16px; color: var(--text-dim); }
.k-wip .chip-st { margin-right: 6px; }
.k-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 14px; }
.k-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.seg-stone .segbtn { border-color: #6d5e49; color: var(--text); background: rgba(0, 0, 0, .15); }
.seg-stone .segbtn[aria-pressed="true"] { background: linear-gradient(#c89a4c, #8a5f2a); color: #1c1207; border-color: #c89a4c; }
@media (hover: hover) { .seg-stone .segbtn:hover { background: rgba(255, 236, 190, .06); color: var(--gold); } .seg-stone .segbtn[aria-pressed="true"]:hover { background: linear-gradient(#dcad5c, #9a6b31); color: #000; } }
.seg-stone .segbtn:focus-visible { outline-color: var(--gold); }
.k-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin: 0 0 22px; }
.k-tab { position: relative; display: grid; gap: 2px; justify-items: start; min-height: 88px; padding: 10px 12px 18px; text-align: left; cursor: pointer; color: var(--text); background: linear-gradient(#3b332b, #28221c); border: 2px solid; border-color: #6d5e49 #15110d #15110d #6d5e49; outline: 1px solid #000; }
.k-tab-name { font: 400 21px/1.05 var(--display); color: #fff3d0; }
.k-tab-city { font-size: 15px; line-height: 1.25; font-style: italic; color: var(--text-dim); }
.k-tab-n { font-size: 17px; line-height: 1; color: var(--text-dim); margin-top: 2px; }
.k-tab-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; border-top: 1px solid #000; }
.k-tab[aria-selected="true"] { background: linear-gradient(#1b1713, #2a241e); border-color: #15110d #c89a4c #c89a4c #15110d; outline-color: #000; box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -8px rgba(239, 201, 100, .35); }
.k-tab[aria-selected="true"] .k-tab-name { color: var(--gold); }
.k-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { .k-tab:hover .k-tab-name { color: var(--gold); } }
.k-typebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; padding: 10px 12px; background: rgba(0, 0, 0, .2); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .05); }

/* a kit panel (one on show at a time) */
.k-panel { padding: 20px clamp(14px, 2.4vw, 28px) 26px; background: var(--basalt) var(--grain); border: 8px solid transparent; border-image: url(/img/frame.svg) 8 / 8px / 0 stretch; box-shadow: 0 22px 44px -16px rgba(0, 0, 0, .8); }
.k-panel:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.k-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid #000; box-shadow: 0 1px 0 rgba(255, 236, 190, .06); }
.k-name { margin: 0; font: 400 clamp(34px, 4vw, 46px)/1 var(--display); color: #fff3d0; }
.k-name small { font-size: .55em; color: var(--text-dim); }
.k-city { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-cont { font-style: italic; color: var(--text-dim); font-size: 16px; }
.k-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 26px clamp(20px, 3vw, 40px); align-items: start; }
.k-intro { min-width: 0; }
.k-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.k-shot { margin: 0; min-width: 0; }
.k-shot-main { grid-column: 1 / -1; }
.k-shotbtn { display: block; width: 100%; padding: 0; background: #000; border: 1px solid #000; outline: 1px solid #5b4a33; cursor: zoom-in; aspect-ratio: 16 / 9; overflow: hidden; }
.k-shotbtn img { width: 100%; height: 100%; object-fit: cover; }
.k-shotbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { .k-shotbtn:hover { outline-color: var(--gold); } }
.k-shot figcaption { margin-top: 5px; font-size: 14px; line-height: 1.35; font-style: italic; color: var(--text-dim); }
.k-char { margin: 0 0 8px; font-size: 18px; line-height: 1.55; color: var(--text); }
.k-where { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--text-dim); }
.k-where .zn { color: var(--text); }
.k-where .px { font-size: 18px; color: var(--gold); }
.k-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 16px 0 8px; font: 400 20px/1.15 var(--display); color: var(--gold); }
.k-types { font: italic 400 15px/1.3 var(--serif); color: var(--text-dim); }
.k-types .px { font-style: normal; font-size: 17px; color: var(--text); margin-right: 4px; }
.k-tc { white-space: nowrap; margin-right: 6px; }
.k-swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px 10px; }
.k-swatches li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: center; font-size: 15px; line-height: 1.15; }
.sw { display: inline-block; width: 26px; height: 26px; background: var(--c); border: 1px solid #000; outline: 1px solid rgba(255, 236, 190, .18); grid-row: span 2; }
.sw.sm { width: 16px; height: 16px; vertical-align: -2px; grid-row: auto; }
.swn { color: var(--text); }
.swv { color: var(--text-dim); font-size: 17px; }
.k-note { margin: 8px 0 0; font-size: 14px; font-style: italic; color: var(--text-dim); }
.k-surf { margin: 0; font-size: 16px; color: var(--text); }
.k-facts { margin: 16px 0 0; padding: 4px 14px 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; background: rgba(0, 0, 0, .22); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 236, 190, .06); }
.k-facts div { padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, .5); }
.k-facts dt { font-size: 14px; color: var(--text-dim); }
.k-facts dd { margin: 2px 0 0; font-size: 22px; line-height: 1; color: var(--gold); }
.k-pieces { min-width: 0; }
.k-pieces .k-sub:first-child { margin-top: 0; }
.k-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
.k-grid > li { min-width: 0; }
.k-piece { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; color: var(--text); cursor: zoom-in; }
.k-piece .im { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #1d1915; border: 1px solid #000; outline: 1px solid #4d3f2d; }
.k-piece .im img { width: 100%; height: 100%; object-fit: cover; }
.k-piece .pn { display: block; margin-top: 6px; font: 400 17px/1.15 var(--display); color: var(--gold); }
.k-piece .pm { display: block; font-size: 17px; line-height: 1.1; color: var(--text-dim); }
.k-piece:focus-visible { outline: none; }
.k-piece:focus-visible .im { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { .k-piece:hover .im { outline-color: var(--gold); } .k-piece:hover .pn { color: #fff0bf; } }
.k-empty { margin: 8px 0 0; padding: 20px; text-align: center; font-style: italic; color: var(--text-dim); border: 1px dashed #5b4a33; }

/* models, held items, bosses and mounts (on parchment) */
.k-models { padding: 88px 0 96px; }
.k-models .k-filter { margin-bottom: 20px; }
.k-mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 22px 16px; }
.k-mgrid > li { min-width: 0; }
.k-mgrid > li.race { grid-column: span 2; }
.k-model { display: grid; gap: 6px; justify-items: start; width: 100%; padding: 0; background: none; border: 0; cursor: zoom-in; text-align: left; color: var(--ink); }
.k-model .im { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; aspect-ratio: 1; overflow: hidden; border: 2px solid; border-color: #f7eccb #6b5234 #6b5234 #f7eccb; outline: 1px solid var(--ink); background: #1d1915; }
.k-model.pair .im { aspect-ratio: 2 / 1; }
.k-model .im img { width: 100%; height: 100%; object-fit: cover; }
.k-model .pn { font: 400 20px/1.1 var(--display); color: var(--ink); }
.k-model .pm { margin-top: -4px; font-size: 17px; line-height: 1.1; color: var(--ink-soft); }
.k-model .pz { margin-top: -4px; font-size: 15px; line-height: 1.2; font-style: italic; color: var(--ink-soft); }
.k-model:focus-visible { outline: none; }
.k-model:focus-visible .im { outline: 2px solid var(--road); outline-offset: 2px; }
@media (hover: hover) { .k-model:hover .im { outline: 2px solid var(--road); } .k-model:hover .pn { color: var(--road); } }
.k-mfoot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 56px; margin-top: 48px; padding-top: 28px; border-top: 3px double var(--ink); }
.k-mfoot.single { grid-template-columns: minmax(0, 1fr); }
.k-mfoot p { margin: 0 0 12px; font-size: 17px; line-height: 1.6; max-width: 38em; }
.k-h3 { margin: 0 0 10px; font: 400 28px/1.1 var(--display); color: var(--ink); }
.k-mblock + .k-mblock, .k-mblock + .k-mfoot { margin-top: 64px; }
.k-mfoot .k-mblock { margin-top: 0; }
.k-bhead { margin-bottom: 8px; padding-top: 26px; border-top: 3px double var(--ink); }
.k-bsub { margin: 0 0 12px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 46em; }
.k-flag { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 46em; }
.k-flag .chip-st { margin-right: 6px; }
.chip-st.soon { color: var(--ink); background: rgba(255, 248, 225, .45); border: 1px dashed var(--ink); font-size: 17px; }
.k-h4 { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 14px; font: 400 23px/1.1 var(--display); color: var(--ink); }
.k-h4 .px, .k-more-t + .px { font-size: 20px; color: var(--ink-soft); }
.k-boss .im { position: relative; }
/* bottom-left: the renders have empty floor there, the heads are at the top */
.k-tag { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px 0; font-size: 17px; line-height: 1.2; color: #efe3bf; background: rgba(20, 16, 12, .72); border: 1px solid rgba(239, 227, 191, .35); pointer-events: none; }
.k-soon { display: grid; gap: 6px; justify-items: start; color: var(--ink); }
.k-soon .im { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px dashed var(--ink); outline: 3px double rgba(58, 38, 22, .35); outline-offset: -8px; background: rgba(255, 248, 225, .22); }
.k-soon .chip-st { position: absolute; left: 8px; bottom: 8px; }
.k-soon .pn { font: 400 20px/1.1 var(--display); color: var(--ink); }
.k-soon .pm { margin-top: -4px; font-size: 17px; line-height: 1.1; color: var(--ink-soft); }
.k-soon .ps { font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
/* the inventory icons are pixel art */
.k-icons .im img, .kits-lb.lb-pixel #kl-img { image-rendering: pixelated; }
.k-eg { display: block; width: 78%; height: auto; }
.k-eg .eg-hl { stroke: var(--ink); stroke-width: 1.1; opacity: .55; }
.k-eg .eg-body { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.k-eg .eg-far { stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; opacity: .7; }
.k-eg .eg-ln { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.k-eg .eg-hi { stroke: #fff8e1; opacity: .9; stroke-width: 3; }
.k-eg .eg-dot { fill: var(--ink); }
.k-eg .eg-gr { fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: .6; }
.k-eg .eg-gr2 { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .35; stroke-dasharray: 3 5; }
.k-eg .eg-f0 { stop-color: #e9dab0; stop-opacity: 0; }
.k-eg .eg-f1 { stop-color: #e9dab0; stop-opacity: .9; }
.k-more { margin-top: 30px; }
.k-more > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px 12px 40px; position: relative; cursor: pointer; list-style: none; border: 1px solid var(--ink); background: rgba(255, 248, 225, .3); box-shadow: inset 0 0 0 3px rgba(233, 218, 176, .9), inset 0 0 0 4px rgba(58, 38, 22, .25); }
.k-more > summary::-webkit-details-marker { display: none; }
.k-more > summary::before { content: ''; position: absolute; left: 16px; top: 50%; width: 0; height: 0; margin-top: -6px; border-left: 9px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.k-more[open] > summary::before { transform: rotate(90deg); }
.k-more > summary:focus-visible { outline: 2px solid var(--road); outline-offset: 2px; }
@media (hover: hover) { .k-more > summary:hover { background: rgba(255, 248, 225, .55); } .k-more > summary:hover .k-more-t { color: var(--road); } }
.k-more-t { font: 400 23px/1.1 var(--display); color: var(--ink); }
.k-more-h { flex-basis: 100%; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.k-more[open] > .k-mgrid { margin-top: 22px; }
.segbtn .k-soonmark { margin-left: 6px; font-size: 14px; font-style: italic; opacity: .75; }
.k-mounts .k-h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.k-mounts .k-h3 .chip-st { vertical-align: 0; }
.k-engrave { margin: 6px 0 0; max-width: 460px; padding: 10px; border: 1px dashed var(--ink); outline: 3px double rgba(58, 38, 22, .3); outline-offset: -8px; background: rgba(255, 248, 225, .22); }
.k-engrave .k-eg { width: 100%; }
.k-engrave figcaption { margin-top: 4px; font-size: 15px; font-style: italic; color: var(--ink-soft); }

/* ships */
.k-shipgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.k-ship-body { padding: 14px 16px 18px; display: grid; gap: 14px; }
.k-ship-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.k-ship-pics .k-shotbtn { aspect-ratio: 4 / 3; }
.k-ship .inspect { font-size: 18px; }
.k-shipsea { margin: 0; min-width: 0; }
.k-shipsea figcaption { margin-top: 5px; font-size: 14px; font-style: italic; color: var(--text-dim); }

/* how the pictures were made */
.k-method { padding: 80px 0 88px; }
.k-method-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 56px; align-items: start; }
.k-method-text p { margin: 0 0 1em; font-size: 18px; line-height: 1.62; max-width: 38em; }
.k-method-text p:first-child::first-letter { float: left; font: 400 64px/.8 var(--display); color: var(--oxblood); padding: 6px 10px 0 0; }
.k-shapes-fig { margin: 0; padding: 12px; border: 3px double var(--ink); background: rgba(255, 248, 225, .25); }
.k-shapes { display: block; width: 100%; height: auto; }
.k-shapes .t { fill: #efe3bf; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.k-shapes .l { fill: #c9b27c; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.k-shapes .r { fill: #9d8452; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.k-shapes .nm { font: 400 20px var(--display); fill: var(--ink); text-anchor: middle; }
.k-shapes .ct { font: 400 20px var(--pixel); fill: var(--ink-soft); text-anchor: middle; }
.k-shapes-fig figcaption { margin-top: 6px; font-size: 15px; font-style: italic; color: var(--ink-soft); }

/* the kits inspect window: the site's lightbox, with a wider fact column, a picture that is not
   16:9, a note, the male/female pair and swatches */
.kits-lb .lb-body { grid-template-columns: minmax(0, 1fr) 340px; }
.kits-lb .lb-stage { background: #0f0d0b; }
.kits-lb .lb-stage img { max-width: 100%; max-height: calc(100vh - 100px); width: auto; height: auto; object-fit: contain; }
.kits-lb .lb-note { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-dim); }
.kits-lb .lb-note b { color: var(--text); font-weight: 500; }
.kits-lb .lb-note .lb-src { display: block; margin-top: 8px; font-style: italic; }
.kits-lb .lb-pair { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 6px; }
.kits-lb .inspect .sw.sm { margin-right: 4px; }
.kits-lb .lb-tints { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.kits-lb .lb-tints .sw.sm { margin: 0; }

@media (max-width: 1100px) {
  .k-body { grid-template-columns: minmax(0, 1fr); }
  .k-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .k-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .k-hero .sheet { max-width: 460px; }
  .k-shipgrid, .k-mfoot, .k-method-grid { grid-template-columns: minmax(0, 1fr); }
  .kits-lb .lb-body { grid-template-columns: 1fr; }
  .kits-lb .lb-stage, .kits-lb .lb-stage img { max-height: 58vh; }
}
@media (max-width: 720px) {
  .k-models { padding: 64px 0 72px; }
  .k-hero { padding: 36px 0 44px; }
  .k-lineup { margin-top: 28px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .k-lineup-frame { border-left: 0; border-right: 0; outline: 0; }
  .k-lineup-frame img { aspect-ratio: 1.6; object-position: 30% 60%; }
  .k-lineup figcaption { padding: 0 var(--gutter); font-size: 15px; }
  .k-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .k-tab { min-height: 78px; padding: 8px 10px 16px; }
  .k-tab-name { font-size: 19px; }
  .k-tab-city { font-size: 14px; }
  .k-shots { grid-template-columns: 1fr 1fr; }
  .k-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .k-piece .pn { font-size: 16px; }
  .k-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .k-mgrid > li.race { grid-column: 1 / -1; }
  .k-model .pn { font-size: 18px; }
  .k-model .pz { font-size: 14px; }
  .k-bsub { font-size: 17px; }
  .k-soon .ps { font-size: 14px; }
  .k-more > summary { padding-left: 36px; }
  .k-more-t, .k-h4 { font-size: 21px; }
  .k-panel { padding: 16px 12px 20px; }
  .k-typebar { padding: 8px; }
  .k-tag { left: 4px; bottom: 4px; padding: 0 4px; }
  .kits-lb .lb-titlebar { padding-left: 12px; }
  /* long names (bosses) wrap instead of being cut off */
  .kits-lb .lb-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; line-height: 1.15; padding: 2px 0; }
  /* wide pictures: the arrows sit in a row under the picture, off the outer figures */
  .kits-lb.lb-wide .lb-stage { max-height: none; padding-bottom: 58px; }
  .kits-lb.lb-wide .lb-stage img { max-height: 58vh; }
  .kits-lb.lb-wide .lb-nav { top: auto; bottom: 5px; transform: none; }
  .kits-lb.lb-wide .lb-prev { left: calc(50% - 44px); }
  .kits-lb.lb-wide .lb-next { right: calc(50% - 44px); }
  .kits-lb .inspect { font-size: 18px; }
}
@media (max-width: 420px) {
  .k-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-shapes .nm, .k-shapes .ct { font-size: 24px; }
  .view-kits .segbtn { padding: 6px 10px; font-size: 15px; }
}
