:root {
  --paper: #f2ede2;
  --paper-2: #e9e2d3;
  --paper-3: #ddd3bf;
  --card: #f8f4eb;
  --ink: #1c1b16;
  --ink-2: #47433b;
  --muted: #7a7365;
  --line: rgba(28, 27, 22, 0.12);
  --line-2: rgba(28, 27, 22, 0.24);
  --accent: #b4532a;
  --accent-2: #d06a3a;
  --accent-ink: #fff8ef;
  --moss: #4b6337;
  --water: #2c6675;
  --topo: rgba(28, 27, 22, 0.2);
  --topo-major: rgba(180, 83, 42, 0.55);
  --shadow: 0 1px 0 rgba(28, 27, 22, 0.04), 0 24px 48px -28px rgba(60, 40, 15, 0.38);
  --veil: rgba(242, 237, 226, 0.86);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geologica", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --t-water-b: #dbe8eb; --t-water-f: #1f5361;
  --t-moss-b: #e1e8d4; --t-moss-f: #3c5228;
  --t-clay-b: #f1ded0; --t-clay-f: #8a3f1d;
  --t-plum-b: #ecdfea; --t-plum-f: #6b3a62;
  --t-slate-b: #e2e2de; --t-slate-f: #4a4c50;
  --t-teal-b: #d8eae4; --t-teal-f: #1f5c4c;
  --t-amber-b: #f3e5c3; --t-amber-f: #7a5510;
  --t-rose-b: #f4dbdb; --t-rose-f: #8e2f37;
  --t-ink-b: #dcd8ce; --t-ink-f: #2b2a25;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121310; --paper-2: #1a1b17; --paper-3: #26271f; --card: #181915;
    --ink: #ece6d6; --ink-2: #c6bfad; --muted: #8f887a;
    --line: rgba(236, 230, 214, 0.11); --line-2: rgba(236, 230, 214, 0.22);
    --accent: #e48b53; --accent-2: #f0a272; --accent-ink: #1b120a;
    --moss: #9db783; --water: #7db3bd;
    --topo: rgba(236, 230, 214, 0.16); --topo-major: rgba(228, 139, 83, 0.6);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 28px 56px -30px rgba(0, 0, 0, 0.8);
    --veil: rgba(18, 19, 16, 0.84);
    --t-water-b: rgba(125, 179, 189, 0.16); --t-water-f: #9fd0d9;
    --t-moss-b: rgba(157, 183, 131, 0.16); --t-moss-f: #b9d39d;
    --t-clay-b: rgba(228, 139, 83, 0.17); --t-clay-f: #f0aa7c;
    --t-plum-b: rgba(196, 140, 186, 0.17); --t-plum-f: #ddb0d4;
    --t-slate-b: rgba(190, 192, 198, 0.14); --t-slate-f: #c2c4ca;
    --t-teal-b: rgba(110, 190, 165, 0.16); --t-teal-f: #92d6c0;
    --t-amber-b: rgba(224, 180, 80, 0.17); --t-amber-f: #ecc773;
    --t-rose-b: rgba(230, 120, 128, 0.17); --t-rose-f: #f0a3a9;
    --t-ink-b: rgba(236, 230, 214, 0.12); --t-ink-f: #e2dccb;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #121310; --paper-2: #1a1b17; --paper-3: #26271f; --card: #181915;
  --ink: #ece6d6; --ink-2: #c6bfad; --muted: #8f887a;
  --line: rgba(236, 230, 214, 0.11); --line-2: rgba(236, 230, 214, 0.22);
  --accent: #e48b53; --accent-2: #f0a272; --accent-ink: #1b120a;
  --moss: #9db783; --water: #7db3bd;
  --topo: rgba(236, 230, 214, 0.16); --topo-major: rgba(228, 139, 83, 0.6);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 28px 56px -30px rgba(0, 0, 0, 0.8);
  --veil: rgba(18, 19, 16, 0.84);
  --t-water-b: rgba(125, 179, 189, 0.16); --t-water-f: #9fd0d9;
  --t-moss-b: rgba(157, 183, 131, 0.16); --t-moss-f: #b9d39d;
  --t-clay-b: rgba(228, 139, 83, 0.17); --t-clay-f: #f0aa7c;
  --t-plum-b: rgba(196, 140, 186, 0.17); --t-plum-f: #ddb0d4;
  --t-slate-b: rgba(190, 192, 198, 0.14); --t-slate-f: #c2c4ca;
  --t-teal-b: rgba(110, 190, 165, 0.16); --t-teal-f: #92d6c0;
  --t-amber-b: rgba(224, 180, 80, 0.17); --t-amber-f: #ecc773;
  --t-rose-b: rgba(230, 120, 128, 0.17); --t-rose-f: #f0a3a9;
  --t-ink-b: rgba(236, 230, 214, 0.12); --t-ink-f: #e2dccb;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 1.0625rem/1.65 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.eyebrow {
  font: 500 0.7rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before { content: ""; width: 1.6em; height: 1px; background: currentColor; opacity: 0.7; flex: none; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }

.arrow { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform 0.35s var(--ease); }
.btn {
  display: inline-flex; align-items: center; gap: 0.65em;
  padding: 0.86em 1.4em; border-radius: 999px; border: 1px solid var(--ink);
  font: 500 0.92rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:hover .arrow, .more:hover .arrow { transform: translateX(4px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.more { display: inline-flex; align-items: center; gap: 0.5em; font: 500 0.9rem/1.2 var(--sans); text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color 0.3s; }
.more:hover { border-color: var(--accent); color: var(--accent); }

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.masthead-in { max-width: var(--max); margin-inline: auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.mark { width: 34px; height: 34px; flex: none; }
.mark path { fill: none; stroke: currentColor; stroke-width: 1.3; }
.mark circle { fill: var(--accent); }
.brand:hover .mark path { stroke: var(--accent); }
.brand .mark path { transition: stroke 0.4s; }
.brand-t { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-t b { font: 400 1.32rem/1 var(--serif); white-space: nowrap; }
.brand-t small { font: 400 0.62rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { position: relative; padding: 8px 12px; text-decoration: none; font-size: 0.9rem; font-weight: 400; color: var(--ink-2); border-radius: 999px; transition: color 0.25s, background 0.25s; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.theme-t { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; transition: border-color 0.3s, transform 0.5s var(--ease); }
.theme-t:hover { border-color: var(--ink); transform: rotate(40deg); }
.theme-t svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
:root[data-theme="dark"] .theme-t circle { fill: currentColor; }
:root[data-theme="dark"] .theme-t .sun { opacity: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-t circle { fill: currentColor; } :root:not([data-theme="light"]) .theme-t .sun { opacity: 0; } }

.contour-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--topo);
  -webkit-mask: url(/img/contours.svg) center / cover no-repeat;
  mask: url(/img/contours.svg) center / cover no-repeat;
}

.topo { width: 100%; height: 100%; background: var(--paper-2); }
.topo path { fill: none; stroke: var(--topo); stroke-width: 1; vector-effect: non-scaling-stroke; }
.topo path.major { stroke: var(--topo-major); stroke-width: 1.3; }
.topo .pin { fill: var(--accent); }

.js .rv { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

.hero { position: relative; min-height: min(calc(100svh - 63px), 1000px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); z-index: -2; }
.hero-canvas.on { opacity: 1; }
.hero-fallback { z-index: -3; transition: opacity 1.2s; }
.hero.live .hero-fallback { opacity: 0; }
.hero-veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 40%, var(--paper) 100%), radial-gradient(120% 70% at 0% 100%, var(--veil) 0%, transparent 60%); }
.hero-in { padding-block: 18vh 12vh; position: relative; }
.hero-eb { margin-bottom: 26px; }
.hero-h { font-size: clamp(4.2rem, 14vw, 13.5rem); line-height: 0.84; letter-spacing: -0.035em; }
.hero-h span { display: inline-block; }
.hero-h em { font-style: italic; color: var(--accent); display: inline-block; }
.disc { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 0; font: 400 0.78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); }
.disc li { display: flex; align-items: center; }
.disc li + li::before { content: ""; width: 22px; height: 1px; background: var(--line-2); margin: 0 12px; }
.hero-intro { margin-top: 22px; max-width: 44ch; font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--ink-2); }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-readout { position: absolute; right: var(--gutter); bottom: 32px; display: flex; gap: 18px; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted); }
.hero-readout b { color: var(--ink); font-weight: 500; display: inline-block; min-width: 5ch; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 1px; height: 56px; background: var(--line); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }
.js .hero-h span, .js .hero-h em, .js .hero-eb, .js .disc, .js .hero-intro, .js .hero-cta { animation: rise 1.2s var(--ease) both; }
.js .hero-h em { animation-delay: 0.08s; }
.js .disc { animation-delay: 0.2s; }
.js .hero-intro { animation-delay: 0.28s; }
.js .hero-cta { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marq 60s linear infinite; }
.marquee-track span, .marquee-track .dup { display: flex; align-items: center; }
.marquee span { font: italic 400 clamp(1.4rem, 2.6vw, 2.1rem)/1 var(--serif); white-space: nowrap; padding-inline: 0.5em; }
.marquee i { font-style: normal; color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }

.section { padding-block: clamp(72px, 11vw, 150px); }
.shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 64px); }
.shead h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); margin-top: 14px; }

.srows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); counter-reset: s; }
.srow { border-bottom: 1px solid var(--line-2); }
.srow a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 28px; align-items: center; gap: 28px; padding: 30px 8px; text-decoration: none; position: relative; transition: padding 0.5s var(--ease), background 0.4s; }
.srow a::before { content: ""; position: absolute; inset: 0; background: var(--paper-2); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease); z-index: -1; }
.srow { position: relative; isolation: isolate; }
.srow a:hover::before { transform: scaleY(1); }
.srow a:hover { padding-inline: 22px; }
.srow-n { font-size: 0.8rem; color: var(--muted); }
.srow-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.srow-t b { font: 400 clamp(1.7rem, 3.4vw, 2.9rem)/1.02 var(--serif); }
.srow-t span { color: var(--ink-2); max-width: 60ch; font-size: 0.98rem; }
.srow-img { width: 0; height: 96px; overflow: hidden; border-radius: 4px; transition: width 0.6s var(--ease); }
.srow-img img, .srow-img svg { width: 160px; height: 96px; object-fit: cover; }
.srow a:hover .srow-img { width: 160px; }
.srow-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 280px; }
.srow-tags em { font: 400 0.7rem/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); }
.srow .arrow { width: 26px; height: 26px; }
.srow a:hover .arrow { transform: translateX(6px); color: var(--accent); }

.band { position: relative; background: var(--ink); color: var(--paper); overflow: hidden; isolation: isolate; }
.band .contour-bg { background: color-mix(in srgb, var(--paper) 14%, transparent); z-index: -1; }
.band-in { padding-block: clamp(72px, 10vw, 130px); }
.band .eyebrow { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.band .more { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.band .more:hover { color: var(--accent-2); border-color: var(--accent-2); }
.bigstats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bigstats li { padding: 26px 24px 8px 0; border-top: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); display: flex; flex-direction: column; gap: 10px; }
.bigstats li + li { padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); }
.bigstats b { font: 400 clamp(2.6rem, 6vw, 5.2rem)/0.95 var(--serif); letter-spacing: -0.02em; }
.bigstats li:first-child b { color: var(--accent-2); }
.bigstats span { font-size: 0.86rem; color: color-mix(in srgb, var(--paper) 70%, transparent); }

.prod-band { background: var(--paper-2); border-block: 1px solid var(--line); }
.pscroll { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 12px 40px; }
.pscroll::-webkit-scrollbar { display: none; }
.pscroll-in { display: flex; gap: 22px; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); width: max-content; }
.pscroll .pcard { width: min(380px, 78vw); scroll-snap-align: start; }
.pcard {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform 0.6s var(--ease), border-color 0.3s;
}
.pcard.tilting { transition: transform 0.08s linear, border-color 0.3s; }
.pcard:hover { border-color: var(--line-2); }
.pcard-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(500px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.22), transparent 45%); mix-blend-mode: soft-light; }
.tilt:hover .pcard-glare, .tilting .pcard-glare { opacity: 1; }
.pcard-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
.pcard-media img, .pcard-media svg { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.pcard:hover .pcard-media img, .pcard:hover .pcard-media svg { transform: scale(1.05); }
.pcard-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; transform: translateZ(30px); }
.pcard-n { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.pcard-body b { font: 400 2rem/1 var(--serif); }
.pcard-s { color: var(--ink-2); font-size: 0.95rem; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-tags em, .caps li { font: 400 0.68rem/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 9px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.pcard-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.88rem; font-weight: 500; }
.pcard:hover .pcard-go { color: var(--accent); }
.pcard:hover .pcard-go .arrow { transform: translateX(4px); }

.masonry { columns: 3 300px; column-gap: 22px; }
.wcard { margin: 0 0 22px; break-inside: avoid; }
.wcard[hidden] { display: none; }
.wcard a { display: block; text-decoration: none; }
.wcard-media { display: block; overflow: hidden; border-radius: 8px; background: var(--paper-2); position: relative; }
.wcard-media img { width: 100%; height: auto; transition: transform 1.2s var(--ease), filter 0.6s; }
.wcard-media svg { width: 100%; aspect-ratio: 4 / 3; height: auto; transition: transform 1.2s var(--ease); }
.wcard:nth-child(3n + 1) .wcard-media svg { aspect-ratio: 4 / 5; }
.wcard:nth-child(4n + 2) .wcard-media svg { aspect-ratio: 1; }
.wcard a:hover .wcard-media img, .wcard a:hover .wcard-media svg { transform: scale(1.045); }
.wcard-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.wcard figcaption { display: flex; flex-direction: column; gap: 6px; padding: 14px 2px 6px; }
.wcard .meta { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.wcard b { font: 400 1.65rem/1.05 var(--serif); transition: color 0.3s; }
.wcard a:hover b { color: var(--accent); }
.wcard-s { color: var(--ink-2); font-size: 0.93rem; }
.wcard.is-feat b { font-size: 2.1rem; }
.wcard.pop { animation: pop 0.6s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(10px); } }

.ltick { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.ltick li { display: grid; grid-template-columns: 110px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) 110px; gap: 20px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); transition: background 0.3s; }
.ltick li:hover { background: var(--paper-2); }
.lt-d { font-size: 0.78rem; color: var(--muted); }
.lt-p { font-family: var(--serif); font-size: 1.35rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-c { color: var(--ink-2); font-size: 0.92rem; }
.lt-t { display: flex; gap: 6px; flex-wrap: wrap; }
.lt-a { text-align: right; font-size: 0.85rem; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 5px; font: 500 0.76rem/1.4 var(--sans); background: var(--tb, var(--line)); color: var(--tf, var(--ink-2)); white-space: nowrap; }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-water { --tb: var(--t-water-b); --tf: var(--t-water-f); }
.tone-moss { --tb: var(--t-moss-b); --tf: var(--t-moss-f); }
.tone-clay { --tb: var(--t-clay-b); --tf: var(--t-clay-f); }
.tone-plum { --tb: var(--t-plum-b); --tf: var(--t-plum-f); }
.tone-slate { --tb: var(--t-slate-b); --tf: var(--t-slate-f); }
.tone-teal { --tb: var(--t-teal-b); --tf: var(--t-teal-f); }
.tone-amber { --tb: var(--t-amber-b); --tf: var(--t-amber-f); }
.tone-rose { --tb: var(--t-rose-b); --tf: var(--t-rose-f); }
.tone-ink { --tb: var(--t-ink-b); --tf: var(--t-ink-f); }
svg rect[class^="tone-"] { fill: var(--tf); }

.about { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.about-prose { font-size: 1.2rem; }

.cta-band { position: relative; text-align: center; padding-block: clamp(80px, 12vw, 160px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta-k { font: 400 clamp(2.8rem, 8vw, 7rem)/0.95 var(--serif); letter-spacing: -0.02em; max-width: 14ch; }
.cta-s { color: var(--ink-2); max-width: 52ch; }

.foot { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: auto; }
.foot-in { max-width: var(--max); margin-inline: auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 28px; display: flex; flex-direction: column; gap: 56px; }
.foot-cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.foot-big { font: 400 clamp(2rem, 4.6vw, 3.6rem)/1.02 var(--serif); max-width: 18ch; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; padding-top: 40px; border-top: 1px solid var(--line-2); }
.foot-brand { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: start; }
.foot-brand p { font-size: 0.92rem; line-height: 1.4; }
.foot-brand b { font: 400 1.3rem/1.2 var(--serif); }
.foot-tag { grid-column: 2; color: var(--muted); font-size: 0.8rem !important; max-width: 40ch; margin-top: 8px; }
.foot-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 40px; align-content: start; }
.foot-nav a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.foot-nav a:hover { color: var(--accent); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }

.phead { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.phead .contour-bg { z-index: -1; -webkit-mask-position: 70% 40%; mask-position: 70% 40%; }
.phead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--paper) 15%, transparent 70%); }
.phead-in { padding-block: clamp(72px, 12vw, 170px) clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: 22px; }
.phead h1 { font-size: clamp(3.6rem, 12vw, 10.5rem); line-height: 0.86; letter-spacing: -0.035em; }
.phead-c h1 { font-size: clamp(3rem, 8.5vw, 7.6rem); max-width: 12ch; }
.nf h1 { font-size: clamp(3rem, 8vw, 7rem); max-width: 14ch; }
.empty-big { font: 400 clamp(1.8rem, 3.6vw, 2.8rem)/1.15 var(--serif); padding-block: 96px; max-width: 26ch; }
.empty-big a { color: var(--accent); }
.empty { color: var(--muted); padding: 32px 0; }

.sblocks { padding-block: clamp(56px, 8vw, 110px); display: flex; flex-direction: column; gap: clamp(72px, 10vw, 140px); }
.sblock { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.sblock.flip .sblock-media { order: 2; }
.sblock-media { display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 10px; box-shadow: var(--shadow); position: relative; }
.sblock-media img, .sblock-media svg { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.sblock:hover .sblock-media img, .sblock:hover .sblock-media svg { transform: scale(1.04); }
.sblock-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sblock-n { font-size: 0.8rem; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 6px 12px; }
.sblock h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.sblock h2 a { text-decoration: none; }
.sblock h2 a:hover { color: var(--accent); }
.sblock-s { font-size: 1.1rem; color: var(--ink-2); max-width: 44ch; }
.caps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.spot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 110px); }
.spot-media { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.7s var(--ease); border: 1px solid var(--line); }
.spot-media.tilting { transition: transform 0.08s linear; }
.spot-media img, .spot-media svg { width: 100%; height: 100%; object-fit: cover; }
.spot-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.spot-text h2 { font-size: clamp(2.8rem, 6vw, 5.4rem); }
.spot-text h2 a { text-decoration: none; }
.spot-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; padding-bottom: clamp(72px, 10vw, 130px); }

.pf { padding-block: 40px clamp(72px, 10vw, 130px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.fchip { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 8px 14px; font-size: 0.86rem; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.fchip i { font: 400 0.7rem/1 var(--mono); font-style: normal; color: var(--muted); }
.fchip:hover { border-color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fchip[aria-pressed="true"] i { color: inherit; opacity: 0.7; }

.ihero { position: relative; min-height: min(82svh, 820px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.ihero-media { position: absolute; inset: 0; z-index: -2; }
.ihero-media img, .ihero-media svg { width: 100%; height: 100%; object-fit: cover; }
.js .ihero-media img { animation: settle 2.2s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); opacity: 0.4; } }
.ihero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 25%, color-mix(in srgb, var(--paper) 70%, transparent) 70%, var(--paper) 100%); }
.ihero-in { padding-block: 120px 48px; display: flex; flex-direction: column; gap: 22px; }
.ihero h1 { font-size: clamp(3rem, 9vw, 8.4rem); line-height: 0.9; letter-spacing: -0.03em; max-width: 16ch; }
.crumb { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(8px); padding: 9px 14px 9px 10px; border-radius: 999px; align-self: flex-start; border: 1px solid var(--line); }
.crumb .arrow { transform: rotate(180deg); }
.crumb:hover .arrow { transform: rotate(180deg) translateX(4px); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin-block: 0; border-block: 1px solid var(--line-2); padding-block: 0; }
.facts div { padding: 22px 20px 22px 0; }
.facts div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.facts dt { font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 10px; }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 1rem; }
.facts dd a { color: var(--accent); }
.tag { font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--line); }
.ibody { padding-block: clamp(48px, 7vw, 96px); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-bottom: clamp(72px, 10vw, 120px); }
.pn { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: center; text-decoration: none; padding: 14px; border: 1px solid var(--line); border-radius: 10px; transition: border-color 0.3s, background 0.3s; }
.pn-next { grid-column: 2; }
.pn:hover { border-color: var(--line-2); background: var(--paper-2); }
.pn-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; }
.pn-media img, .pn-media svg { width: 100%; height: 100%; object-fit: cover; }
.pn-t { display: flex; flex-direction: column; gap: 10px; }
.pn-t b { font: 400 1.6rem/1.05 var(--serif); }

.prose { max-width: 72ch; margin-inline: auto; font-size: 1.1rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); color: var(--ink); margin-top: 1.8em; line-height: 1.05; }
.prose h3 { font-size: 1.7rem; color: var(--ink); margin-top: 1.5em; line-height: 1.1; }
.prose h4 { font: 500 0.78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 2em; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose a { color: var(--accent); }
.prose img { width: 100%; height: auto; border-radius: 8px; }
.prose [data-zoom] { cursor: zoom-in; transition: opacity 0.3s; }
.prose [data-zoom]:hover { opacity: 0.92; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.prose blockquote { margin-inline: 0; padding-left: 26px; border-left: 2px solid var(--accent); font: italic 400 1.6rem/1.35 var(--serif); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose hr { border: 0; height: 1px; background: var(--line-2); margin-block: 2.6em; }
.prose code { font: 0.88em var(--mono); background: var(--paper-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--paper-2); padding: 18px 20px; border-radius: 8px; overflow-x: auto; border: 1px solid var(--line); }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font: 500 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.prose > p:first-child { font-size: 1.28rem; color: var(--ink); line-height: 1.6; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }

.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(12, 12, 10, 0.94); color: #f2ede2; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: fade 0.35s var(--ease); }
.lb-stage { display: grid; place-items: center; padding: 56px 72px 12px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 4px; animation: lbin 0.45s var(--ease); }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 22px; gap: 16px; font: 400 0.8rem/1.3 var(--mono); }
.lb-btn { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 1px solid rgba(242, 237, 226, 0.3); background: rgba(0, 0, 0, 0.3); display: grid; place-items: center; cursor: pointer; color: inherit; }
.lb-btn:hover { border-color: #f2ede2; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lb-prev { left: 14px; }
.lb-prev svg { transform: rotate(180deg); }
.lb-next { right: 14px; }
.lb-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(242, 237, 226, 0.3); background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.lb-x svg, .cdialog-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@keyframes fade { from { opacity: 0; } }
@keyframes lbin { from { opacity: 0; transform: scale(0.97); } }

.rhero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.rhero .contour-bg { z-index: -1; }
.rhero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 80% at 10% 40%, var(--paper) 20%, transparent 75%); }
.rhero-in { padding-block: clamp(64px, 10vw, 140px) clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 24px; }
.rhero h1 { display: flex; flex-direction: column; gap: 10px; }
.huge { font-family: var(--serif) !important; font-size: clamp(4.4rem, 17vw, 15rem); line-height: 0.82; letter-spacing: -0.04em; color: var(--ink); }
.h1-sub { font: italic 400 clamp(1.8rem, 4.6vw, 3.8rem)/1 var(--serif); color: var(--accent); }
.statgrid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.statgrid li { padding: 22px 18px 10px 0; display: flex; flex-direction: column; gap: 8px; }
.statgrid li + li { border-left: 1px solid var(--line); padding-left: 18px; }
.statgrid b { font: 400 clamp(2rem, 4vw, 3.4rem)/1 var(--serif); }
.statgrid span { font-size: 0.85rem; color: var(--muted); }

.insights { padding-block: clamp(56px, 8vw, 110px); display: flex; flex-direction: column; gap: 28px; }
.chart, .panel { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 32px); }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chart-note { font: italic 400 1.25rem/1.2 var(--serif); color: var(--ink-2); }
.tl { width: 100%; height: auto; overflow: visible; }
.tl .grid line { stroke: var(--line); stroke-width: 1; }
.tl .tk { font: 400 11px var(--mono); fill: var(--muted); }
.tl .tk.yr { fill: var(--ink-2); font-weight: 500; }
.tl .b { fill: var(--ink-2); transition: fill 0.25s; }
.tl .is-peak .b { fill: var(--accent); }
.tl .bar:hover .b { fill: var(--accent-2); }
.tl .hit { fill: transparent; }
.tl .peak { font: 500 13px var(--mono); fill: var(--accent); }
.js .tl .b { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease), fill 0.25s; }
.js .chart.in .tl .b { transform: none; }
.insight-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.panel .eyebrow { margin-bottom: 20px; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 44px; gap: 14px; align-items: center; }
.hbars .chip { justify-self: start; }
.hbar svg { width: 100%; height: 8px; }
.hbars b { text-align: right; font-size: 0.9rem; }
.sbar { width: 100%; height: 14px; border-radius: 4px; overflow: hidden; }
.legend { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legend li { display: grid; grid-template-columns: minmax(0, 1fr) 50px 50px; gap: 10px; align-items: center; }
.legend b { text-align: right; }
.legend .pct { text-align: right; color: var(--muted); font-size: 0.85rem; }

.atlas { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; padding-bottom: clamp(56px, 8vw, 110px); }
.map-frame { height: 100%; min-height: 460px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); position: relative; }
.map-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.atlas-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 30px); }
.atlas-list .eyebrow { margin-bottom: 16px; }
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 70px 90px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.clist .rank { color: var(--muted); font-size: 0.72rem; }
.clist .cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clist .hbar svg { height: 4px; width: 100%; }
.clist .hbar rect { fill: var(--accent); }
.clist li > .mono:last-child { text-align: right; font-size: 0.8rem; }
.geo-dot { fill: var(--accent); fill-opacity: 0.42; stroke: var(--accent); stroke-width: 1.5; transition: fill-opacity 0.2s; }
.geo-dot:hover { fill-opacity: 0.8; }
.leaflet-container { font-family: var(--sans) !important; background: var(--paper-2) !important; }
.leaflet-tooltip.geo-tip { background: var(--ink); color: var(--paper); border: 0; border-radius: 6px; box-shadow: var(--shadow); font: 400 0.8rem/1.4 var(--sans); padding: 8px 12px; }
.leaflet-tooltip.geo-tip::before { display: none; }
.leaflet-tooltip.geo-tip b { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; display: block; }
.leaflet-bar a { background: var(--card) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--paper) 80%, transparent) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }

.ledger { padding-bottom: clamp(56px, 8vw, 110px); }
.ledger-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.ledger-head h2 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); margin-top: 14px; }
.ledger-count { font-size: 0.82rem; color: var(--muted); }
.ledger-count b { color: var(--ink); font-weight: 500; }
.ledger-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; position: sticky; top: 63px; z-index: 5; background: var(--paper); padding-block: 10px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 16px; background: var(--card); }
.search:focus-within { border-color: var(--ink); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: none; }
.search input { border: 0; outline: 0; background: transparent; padding: 11px 0; width: 100%; min-width: 0; }
.ledger-tools select { border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 34px 10px 16px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23888' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; appearance: none; cursor: pointer; font-size: 0.9rem; max-width: 100%; }
.tool { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 9px 15px; font-size: 0.86rem; cursor: pointer; transition: border-color 0.25s, background 0.25s, color 0.25s; }
.tool:hover { border-color: var(--ink); }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool:disabled { opacity: 0.45; cursor: default; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.ltable { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.ltable th { text-align: left; padding: 0; background: var(--paper-2); border-bottom: 1px solid var(--line-2); font-weight: 400; }
.ltable th:not(:has(button)) { padding: 12px 14px; font: 500 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ltable th button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 6px; align-items: center; padding: 12px 14px; cursor: pointer; font: 500 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ltable th button:hover { color: var(--ink); }
.ltable th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ltable th button svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.5; }
.ltable th[aria-sort] button { color: var(--ink); }
.ltable th[aria-sort] button svg { opacity: 1; stroke: var(--accent); }
.ltable th.num button { justify-content: flex-end; }
.ltable td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ltable tbody tr { transition: background 0.2s; }
.ltable tbody tr:hover { background: var(--paper-2); }
.ltable tbody tr:last-child td { border-bottom: 0; }
.td-date { white-space: nowrap; color: var(--muted); font-size: 0.8rem; }
.td-proj { font-weight: 400; color: var(--ink); }
.td-ctry { color: var(--ink-2); white-space: nowrap; }
.td-type { display: flex; flex-wrap: wrap; gap: 5px; }
.td-area { text-align: right; white-space: nowrap; }

.cdialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.6); overflow: auto; overscroll-behavior: contain; }
.cdialog::backdrop { background: rgba(14, 14, 11, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cdialog[open] { animation: dlg 0.5s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.cdialog-x { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.cdialog-x:hover { border-color: var(--ink); }
.cform { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.cform-inline { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.cform-head { display: flex; flex-direction: column; gap: 12px; }
.cform-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.cform-lead { color: var(--ink-2); max-width: 50ch; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field-k { font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.field i, .field-k i { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.75; margin-left: 4px; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 10px 0; font-size: 1.05rem; border-radius: 0; outline: 0; transition: border-color 0.25s; }
.field textarea { resize: vertical; min-height: 120px; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input.bad, .field textarea.bad { border-color: #c0392b; }
.cmap { display: flex; flex-direction: column; gap: 10px; }
.cmap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cmap-note { font-size: 0.86rem; color: var(--ink-2); }
.cmap-tools, .cmap-drawing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cmap-search { display: flex; gap: 6px; flex: 1 1 240px; }
.cmap-q { flex: 1; min-width: 0; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px; background: var(--card); font-size: 0.9rem; outline: 0; }
.cmap-q:focus { border-color: var(--ink); }
.seg { display: inline-flex; gap: 4px; }
.tool-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cmap-canvas { height: clamp(260px, 38vh, 380px); border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--paper-2); }
.cmap-canvas.drawing { cursor: crosshair; }
.cmap-canvas.drawing .leaflet-grab { cursor: crosshair; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list:empty { display: none; }
.file-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 0.9rem; animation: rise 0.4s var(--ease); }
.file-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list small { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.file-list button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; font-size: 1rem; line-height: 1; }
.file-list button:hover { background: var(--accent); color: var(--accent-ink); }
.cform-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed var(--line-2); border-radius: 999px; padding: 6px 18px 6px 6px; cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.drop.over, .drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop > span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }
.drop svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.drop small { color: var(--muted); font-size: 0.8rem; }
.cform-msg { font-size: 0.92rem; color: var(--moss); min-height: 1.4em; }
.cform-msg:empty { display: none; }
.cform-msg.bad { color: #c0392b; }
.notice { padding: 14px 18px; border-radius: 10px; font-size: 0.95rem; }
.notice.ok { background: var(--t-moss-b); color: var(--t-moss-f); }
.notice.err { background: var(--t-rose-b); color: var(--t-rose-f); }
.sent { padding: clamp(32px, 6vw, 64px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sent svg { width: 84px; height: 84px; fill: none; stroke: var(--accent); stroke-width: 1.2; }
.sent svg path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.6s var(--ease) forwards; }
.sent svg path:nth-child(2) { animation-delay: 0.15s; }
.sent svg path:nth-child(3) { animation-delay: 0.3s; stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent h2 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.sent .ref { font: 500 1.4rem/1 var(--mono); padding: 12px 18px; border: 1px dashed var(--accent); border-radius: 8px; color: var(--accent); letter-spacing: 0.06em; }

.cpage { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(48px, 7vw, 96px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; position: sticky; top: 100px; display: flex; flex-direction: column; }
.steps li { padding: 22px 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 44px 1fr; gap: 6px 10px; }
.steps .mono { color: var(--accent); font-size: 0.8rem; grid-row: span 2; padding-top: 6px; }
.steps b { font: 400 1.8rem/1 var(--serif); }
.steps p { color: var(--ink-2); font-size: 0.95rem; }

@media (max-width: 1000px) {
  .statgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statgrid li:nth-child(4) { border-left: 0; padding-left: 0; }
  .statgrid li:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .atlas { grid-template-columns: 1fr; }
  .map-frame { min-height: 380px; }
  .ltick li { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .lt-c, .lt-t { display: none; }
  .cpage { grid-template-columns: 1fr; }
  .steps { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 820px) {
  .masthead { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; justify-content: space-around; gap: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .nav a { padding: 8px 6px; font-size: 0.8rem; }
  body { padding-bottom: 60px; }
  .bigstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bigstats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .sblock, .spot { grid-template-columns: 1fr; }
  .sblock.flip .sblock-media { order: 0; }
  .insight-cols { grid-template-columns: 1fr; }
  .srow a { grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 16px; padding: 24px 0; }
  .srow a:hover { padding-inline: 8px; }
  .srow-img, .srow-tags { display: none; }
  .about { grid-template-columns: 1fr; gap: 16px; }
  .foot-cols { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pn-next { grid-column: auto; }
  .hero-readout { display: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand-t small { display: none; }
  .hero-in { padding-block: 12vh 10vh; }
  .disc { flex-direction: column; gap: 6px; }
  .disc li + li::before { display: none; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statgrid li, .statgrid li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .statgrid li:nth-child(even) { border-left: 1px solid var(--line); padding-left: 14px; }
  .bigstats li + li { border-left: 0; padding-left: 0; }
  .bigstats li:nth-child(even) { border-left: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); padding-left: 16px; }
  .cgrid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .hbars li { grid-template-columns: 112px minmax(0, 1fr) 36px; gap: 10px; }
  .clist li { grid-template-columns: 24px minmax(0, 1fr) 84px; }
  .clist .hbar { display: none; }
  .pn { grid-template-columns: 84px minmax(0, 1fr); }
  .facts div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .ltable thead { display: none; }
  .ltable, .ltable tbody { display: block; }
  .ltable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .ltable tr[hidden] { display: none; }
  .ltable td { padding: 0; border: 0; }
  .td-proj { grid-column: 1; grid-row: 1; font-family: var(--serif); font-size: 1.25rem; line-height: 1.1; }
  .td-area { grid-column: 2; grid-row: 1; }
  .td-date { grid-column: 1; grid-row: 2; }
  .td-ctry { grid-column: 2; grid-row: 2; text-align: right; font-size: 0.85rem; }
  .td-type { grid-column: 1; grid-row: 3; }
  .td-stat { grid-column: 2; grid-row: 3; text-align: right; }
  .ledger-tools { top: 59px; }
  .ledger-tools select { flex: 1 1 40%; }
  .lb-stage { padding: 56px 8px 8px; }
  .lb-btn { top: auto; bottom: 14px; margin: 0; }
  .cform-foot .btn { width: 100%; justify-content: center; }
  .seg { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .js .tl .b { transform: none; }
}

@media print {
  .masthead, .foot, .hero-canvas, .cdialog, .nav, .theme-t { display: none !important; }
}

.igallery { padding-bottom: clamp(56px, 8vw, 110px); }
.gmason { columns: 3 260px; column-gap: 16px; }
.gmason figure { margin: 0 0 16px; break-inside: avoid; }
.gmason img { width: 100%; height: auto; border-radius: 8px; background: var(--paper-2); }
.gmason figcaption { font-size: 0.84rem; color: var(--muted); padding-top: 8px; }
[data-gallery] img[data-zoom] { cursor: zoom-in; }
@media (max-width: 820px) {
  .nav a { padding: 13px 6px; }
  .theme-t { width: 44px; height: 44px; }
  .tool, .fchip { min-height: 44px; }
}
.legend .chip { justify-self: start; }
.ledger-more { display: flex; justify-content: center; padding: 18px; border-top: 1px solid var(--line); }
.ledger-more[hidden] { display: none; }
