/* Tarkov Almanac — one stylesheet.
   World: a field almanac. Warm black ground, bone ink, brass as the one accent, serif display type;
   brass marks value and rank, rust is alarm only. Hairlines carry the hierarchy, not fills.
   Rule: status is meaning, kind is identity — the five --k-* colors only ever name an extract kind. */
:root {
  --ground: #0c0a08;
  --ground-2: #15120f;
  --ground-3: #201b16;
  --deep: #070605;
  --line: rgba(214, 192, 150, .13);
  --line-strong: rgba(214, 192, 150, .3);
  --ink: #e5dccb;
  --ink-soft: #b1a68f;
  --ink-faint: #877c68;
  --sand: #efe6d3;
  --accent: #c9a35e;      /* brass: links, eyebrows, focus, active rules, outline buttons */
  --accent-dim: #9c7d45;
  --brass: #c9a861;
  --rust: #d2502f;
  --k-pmc: #48c25a;
  --k-scav: #ef8a3c;
  --k-shared: #3fc3c0;
  --k-secret: #c39af0;
  --k-transit: #5aa2f0;
  --ui: "Barlow Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --sans: "Barlow", "Helvetica Neue", Helvetica, ui-sans-serif, system-ui, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "IM Fell English", Georgia, "Times New Roman", serif;
  --sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: min(1320px, calc(100vw - 32px));
  color-scheme: dark;
}
.k-pmc { --k: var(--k-pmc); color: var(--k-pmc); }
.k-scav { --k: var(--k-scav); color: var(--k-scav); }
.k-shared { --k: var(--k-shared); color: var(--k-shared); }
.k-secret { --k: var(--k-secret); color: var(--k-secret); }
.k-transit { --k: var(--k-transit); color: var(--k-transit); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
}
/* atmosphere: a fixed vignette and a fine grain, both inert */
.vignette, .grain { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.vignette { background: radial-gradient(ellipse at 50% 35%, transparent 55%, rgba(0, 0, 0, .45) 100%); z-index: 59; }
.grain { opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
main { flex: 1; }
html, body { overflow-x: clip; }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--deep); padding: 8px 14px; z-index: 80; font: 600 14px var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.skip:focus { left: 8px; }
.wrap { width: var(--wrap); margin: 0 auto; }

.eyebrow { font: 600 12px/1.2 var(--ui); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--sand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: -.005em; line-height: 1.02; margin: 0; color: var(--sand); }
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }
.h1 { font-size: clamp(44px, 6.4vw, 96px); margin-bottom: 18px; }
.h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 64px 0 12px; }
.lede { font: italic 400 clamp(18px, 1.5vw, 22px)/1.45 var(--serif); color: var(--ink-soft); max-width: 60ch; margin: 0 0 28px; }

/* .ticks: brass corner marks on a bordered card */
.ticks::before, .ticks::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--brass); opacity: .6; pointer-events: none; }
.ticks::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.ticks::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

/* ---------------------------------------------------------------- header / footer */
.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 28px;
  height: 60px; padding: 0 max(calc((100vw - 1240px) / 2), 20px); background: rgba(12, 10, 8, .9);
  backdrop-filter: blur(14px) saturate(1.1); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand .mark { width: 34px; height: 34px; color: var(--rust); }
.brand .bt { display: grid; gap: 3px; }
.brand .bt b { font: 400 25px/1 var(--sc); letter-spacing: .02em; color: var(--sand); }
.brand .bt small { font: 600 9.5px/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-faint); }
.top nav { display: flex; height: 100%; margin-left: auto; margin-right: auto; }
.top nav a {
  position: relative; display: flex; align-items: center; text-decoration: none; height: 100%;
  font: 600 12.5px/1 var(--ui); letter-spacing: .26em; text-transform: uppercase; padding: 0 20px; color: var(--ink-soft);
  transition: color .2s var(--ease);
}
.top nav a::after { content: ""; position: absolute; left: 20px; right: calc(20px + .26em); bottom: 14px; height: 1.5px; background: var(--accent); transform: scaleX(0); transition: transform .35s var(--ease); }
.top nav a:hover { color: var(--sand); }
.top nav a:hover::after { transform: scaleX(1); }
.brand .mark { transition: transform .8s var(--ease); }
.brand:hover .mark { transform: rotate(90deg); }
.top nav a[aria-current] { color: var(--sand); }
.top nav a[aria-current]::after { transform: scaleX(1); }

.foot { border-top: 1px solid var(--line); background: var(--deep); color: var(--ink-soft); font-size: 12px; }
.foot-in { width: min(1240px, calc(100vw - 40px)); margin: 0 auto; padding: 26px 0; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 0; margin: 0 auto; }
.foot-nav a { color: var(--ink-soft); text-decoration: none; padding: 0 18px; font: 600 11.5px/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; }
.foot-nav a:hover { color: var(--accent); }
.foot-note { margin: 0; max-width: 34ch; text-align: right; color: var(--ink-faint); font-size: 11.5px; line-height: 1.45; }
.foot-note b { display: block; font: 600 11px/1.6 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
body.is-map .foot { display: none; }

/* ---------------------------------------------------------------- buttons */
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px; text-decoration: none;
  font: 400 19px/1 var(--serif); letter-spacing: .01em; text-transform: none;
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--deep); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { color: var(--sand); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; font: 400 17px/1.2 var(--serif); padding-bottom: 3px; border-bottom: 1px solid var(--accent-dim); }
.link-arrow svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-caps { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; font: 600 12px/1 var(--ui); letter-spacing: .26em; text-transform: uppercase; }
.link-caps svg { width: 16px; height: 16px; }
.link { color: var(--accent); text-underline-offset: 4px; }

/* ---------------------------------------------------------------- shared */
/* pins pop in on the cover sheets; stroke drawing is shared by the charts */
.hp { opacity: 0; animation: pop .6s var(--ease) forwards; animation-delay: var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* page heads: a cover with the section's own art fading out behind the title */
.pagehead { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); }
.pagehead .bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .3; filter: saturate(.6) contrast(1.05);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%); mask-image: linear-gradient(180deg, #000 0%, transparent 92%); }
.pagehead .mesh { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); }
.pagehead .wrap { position: relative; }
.pagehead .lede { margin-bottom: 0; }
.headstats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 28px 0 0; padding: 0; list-style: none; }
.headstats li { display: grid; gap: 4px; }
.headstats b { font: 600 34px/1 var(--ui); color: var(--sand); font-variant-numeric: tabular-nums; }
.headstats span { font: 600 11px/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------------------------------------------------------------- sections */
.band { padding: clamp(56px, 8vw, 110px) 0; }
.band.first { padding-top: clamp(40px, 6vw, 80px); }
.band h2 { font-size: clamp(32px, 4vw, 54px); margin-bottom: 36px; }

.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 22px; }
.map-card { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)); border: 1px solid var(--line);
  transition: border-color .25s var(--ease), transform .35s var(--ease), background .25s var(--ease); }
.map-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); background: linear-gradient(180deg, rgba(201, 163, 94, .05), rgba(255, 255, 255, .01)); }
.map-card-link { display: grid; text-decoration: none; height: 100%; }
.map-card-art { aspect-ratio: 16 / 10; background: var(--deep); border-bottom: 1px solid var(--line); overflow: hidden; }
.thumb { width: 100%; height: 100%; display: block; transition: transform .6s var(--ease), filter .4s var(--ease); filter: saturate(.75); }
.map-card:hover .thumb { transform: scale(1.04); filter: saturate(1); }
.thumb .dot { opacity: 0; animation: pop .5s var(--ease) forwards; animation-delay: calc(400ms + var(--d)); animation-play-state: paused; }
.map-card.in .thumb .dot { animation-play-state: running; }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
.map-card-body { padding: 22px 24px 24px; }
.map-card h3 { font-size: clamp(30px, 2.6vw, 40px); margin-bottom: 10px; }
.map-card p { color: var(--ink-soft); margin: 0 0 16px; max-width: 52ch; font-size: 15px; }
.stats { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 13px var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.stats b { font-size: 20px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.go { display: inline-flex; align-items: center; gap: 10px; font: 700 14px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.go svg { width: 22px; height: 11px; }
.floors { color: var(--ink-faint); }


/* ---------------------------------------------------------------- overlay table (ledger) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent); }
.ov { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 760px; }
.ov th, .ov td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ov thead th, .ov thead th.num { font: 600 12px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); background: var(--ground-2); border-bottom-color: var(--line-strong); }
.ov tbody th { font: 600 17px var(--ui); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: var(--sand); }
.ov td { color: var(--ink-soft); }
.ov .num { text-align: right; font: 500 17px var(--ui); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.ov tbody tr:hover { background: rgba(255, 255, 255, .02); }
.status { display: inline-block; font: 600 12px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; padding: 6px 8px; border: 1px solid currentColor; white-space: nowrap; }
.st-live .status { color: var(--k-scav); }
.st-next .status { color: var(--brass); }
.st-mapped .status { color: var(--accent); }
.st-survey .status { color: var(--ink-faint); }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 28px; margin: 24px 0 0; }
.legend div { display: flex; gap: 12px; align-items: baseline; }
.legend dd { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* ---------------------------------------------------------------- map viewer */
body.is-map { height: 100vh; height: 100dvh; overflow: hidden; }
.mapview { display: grid; grid-template-columns: 360px 1fr; height: calc(100dvh - 64px); }
.panel { overflow-y: auto; border-right: 1px solid var(--line); background: var(--ground-2); padding: 24px 22px 32px; scrollbar-width: thin; scrollbar-color: var(--ground-3) transparent; }
.panel h1 { font-size: 46px; margin-bottom: 10px; }
.lede-s { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; }
.floors-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-strong); margin-bottom: 18px; }
.floors-tabs button {
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  background: none; border: 0; padding: 11px 6px; cursor: pointer;
}
.floors-tabs button + button { border-left: 1px solid var(--line-strong); }
.floors-tabs button[aria-selected="true"] { background: var(--accent); color: var(--deep); }
.layers { display: grid; gap: 4px; margin-bottom: 8px; }
.layer {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; text-align: left;
  background: none; border: 1px solid transparent; color: var(--ink); padding: 7px 8px; cursor: pointer; font: 14px var(--sans);
}
.layer svg { width: 20px; height: 20px; }
.layer b { font: 12px var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.layer:hover { border-color: var(--line); }
.layer[aria-pressed="false"] { opacity: .45; }
.layer[aria-pressed="false"] span { text-decoration: line-through; text-decoration-color: var(--ink-soft); }
.base-layers { padding-top: 8px; border-top: 1px solid var(--line); margin-bottom: 18px; }
.layer.base { grid-template-columns: 22px 1fr; }
.layer.base::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--ink-soft); margin-left: 3px; }
.layer.base[aria-pressed="true"]::before { background: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--ground-2); }

.detail { border: 1px solid var(--line-strong); border-left: 3px solid var(--k, var(--accent)); padding: 14px 16px; margin-bottom: 18px; background: var(--ground); }
.detail h2 { font-size: 24px; margin: 4px 0 10px; }
.detail .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px 5px 5px; border: 1px solid currentColor; }
.chip svg { width: 15px; height: 15px; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.detail dt { color: var(--ink-soft); font: 11px/1.8 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.detail dd { margin: 0; font-variant-numeric: tabular-nums; }
.detail .warn { color: var(--ink-soft); font-size: 13px; margin: 10px 0 0; }

.grp h3 { font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 6px; display: flex; justify-content: space-between; }
.grp ul { list-style: none; margin: 0; padding: 0; }
.poi-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; color: var(--ink); padding: 7px 8px; cursor: pointer; font: 15px var(--sans);
}
.poi-btn svg { width: 18px; height: 18px; flex: none; }
.poi-btn .nm { flex: 1; }
.poi-btn sup { color: var(--ink-soft); font: 10px var(--mono); margin-left: 3px; }
.poi-btn .lv { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.poi-btn i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.poi-btn:hover, .poi-btn[aria-current="true"] { background: var(--ground-3); }
.poi-btn[aria-current="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.poi-btn.off { opacity: .35; }
.note { color: var(--ink-soft); font-size: 12.5px; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }

.stage { position: relative; overflow: hidden; background: var(--ground); cursor: grab; touch-action: none; outline: none; }
.stage.dragging { cursor: grabbing; }
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.sheets image { image-rendering: auto; }
.bld path { fill: none; stroke: var(--ink); stroke-opacity: .5; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.contours path { fill: none; stroke: var(--ink); stroke-opacity: .13; stroke-width: .9; vector-effect: non-scaling-stroke; }
.contours path.maj { stroke-opacity: .28; }
.zones .z { fill: var(--k); fill-opacity: .16; stroke: var(--k); stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; transition: fill-opacity .2s var(--ease); }
.zones .z.sel { fill-opacity: .32; stroke-width: 2; stroke-dasharray: 7 4; animation: march .9s linear infinite; }
@keyframes march { to { stroke-dashoffset: -11; } }
.zones .z.other { fill-opacity: .05; stroke-opacity: .35; }
.pin { cursor: pointer; }
.pin .leader { stroke: var(--ink); stroke-opacity: .6; stroke-width: 1; }
.pin use { transition: transform .25s var(--ease); }
.pin:hover use, .pin.sel use, .pin.hover use { transform: scale(1.18); }
.pin.other { opacity: .38; }
.pin .ring { fill: none; stroke: var(--k); stroke-width: 2; opacity: 0; }
.pin.sel .ring { animation: ring 1.8s var(--ease) infinite; }
@keyframes ring { 0% { r: 12px; opacity: .9; } 100% { r: 34px; opacity: 0; } }
.pin text {
  font: 600 12.5px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--ground); stroke-width: 4px; stroke-linejoin: round;
  pointer-events: none;
}
.pin text.hide { display: none; }
.pin .fl { font: 600 9.5px var(--mono); letter-spacing: .1em; fill: var(--ink-soft); }

.hud { position: absolute; z-index: 2; pointer-events: none; color: var(--ink); }
.hud > * { pointer-events: auto; }
.tl { left: 14px; top: 12px; }
.tr { right: 14px; top: 12px; }
.bl { left: 14px; bottom: 10px; }
.br { right: 14px; bottom: 14px; }
.readout { font: 12px var(--mono); letter-spacing: .08em; color: var(--ink-soft); background: rgba(12, 10, 8, .78); padding: 6px 9px; font-variant-numeric: tabular-nums; }
.readout { opacity: 0; transition: opacity .2s var(--ease); }
.readout.on { opacity: 1; }
.compass { width: 46px; height: 46px; overflow: visible; }
.compass text { font: 700 10px var(--mono); fill: var(--ink-soft); }
.scalebar { overflow: visible; }
.scalebar text { font: 11px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
.scalebar path { stroke-width: 1.5; }
.zoom { display: grid; gap: 4px; }
.zoom button {
  width: 40px; height: 40px; font: 20px/1 var(--sans); color: var(--ink); background: rgba(21, 18, 15, .92);
  border: 1px solid var(--line-strong); cursor: pointer;
}
.zoom button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .mapview { grid-template-columns: 1fr; grid-template-rows: 58vh 1fr; height: calc(100dvh - 55px); }
  .stage { order: -1; border-bottom: 1px solid var(--line); }
  .panel { border-right: 0; padding: 18px 16px 28px; }
  .panel h1 { font-size: 34px; }
  .lede-s { display: none; }
}
@media (max-width: 640px) {
  .map-card-body { padding: 18px; }
  .hud .readout { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-card, .thumb, .top nav a::after { transition: none; }
  .map-card:hover { transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .thumb .dot, .hp { animation: none; opacity: 1; }
  .pin.sel .ring { animation: none; opacity: .8; r: 20px; }
  .zones .z.sel { animation: none; stroke-dasharray: none; }
  .brand .mark { transition: none; }
  .pin use, .go svg, .btn { transition: none; }
}

/* ---------------------------------------------------------------- ammo */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.cal-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 40px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.cal-strip a {
  text-decoration: none; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); padding: 8px 10px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.cal-strip a:hover { color: var(--ink); border-color: var(--line-strong); }
.cal-strip a[aria-current] { color: var(--deep); background: var(--accent); border-color: var(--accent); }

.cal-group { margin-bottom: 52px; }
.band .grp-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font: 600 11px/1.3 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 0 0 20px;
}
.band .grp-h b { color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.cal-card {
  display: block; text-decoration: none; background: var(--ground-2); border: 1px solid var(--line);
  padding: 18px 18px 16px; transition: border-color .25s var(--ease), background .25s var(--ease);
}
.cal-card:hover { border-color: var(--accent); background: var(--ground-3); }
.cal-card .eyebrow { margin-bottom: 8px; color: var(--ink-soft); }
.cal-card h3 { font-size: 22px; margin-bottom: 14px; }
.cal-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 14px; font-size: 13px; }
.cal-card dt { color: var(--ink-soft); font: 10px/1.8 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.cal-card dd { margin: 0; font-variant-numeric: tabular-nums; }
.cal-card dd.nm { font-variant-numeric: normal; }
.cal-card .go { font-size: 11px; }

.cal-top { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); font: 10px/1.8 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding-top: 10px; }
.facts dd { margin: 0 0 10px; font-size: 17px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); padding-bottom: 10px; }

/* entrance: the grid draws itself in, armor-class rules follow, then the points */
/* range-finder (chart.js): guides to both axes with the exact figure tagged on each */

/* table */
.ammo-wrap { margin-bottom: 14px; }
.ammo-t { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1120px; font-variant-numeric: tabular-nums; }
.ammo-t thead th { background: var(--ground-2); border-bottom: 1px solid var(--line-strong); padding: 0; text-align: left; vertical-align: bottom; position: sticky; top: 0; z-index: 1; }
.ammo-t thead th button {
  display: flex; align-items: center; gap: 5px; width: 100%; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font: 600 10px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 10px; text-align: left;
}
.ammo-t thead th.num button { justify-content: flex-end; }
.ammo-t thead th button:hover { color: var(--ink); }
.ammo-t thead th .u { text-transform: none; letter-spacing: 0; opacity: .7; }
.sortmark { width: 8px; height: 10px; flex: none; fill: currentColor; opacity: .35; }
.ammo-t th[aria-sort="ascending"] button, .ammo-t th[aria-sort="descending"] button { color: var(--accent); }
.ammo-t th[aria-sort="ascending"] .sortmark { opacity: 1; }
.ammo-t th[aria-sort="ascending"] .sortmark .dn { opacity: .25; }
.ammo-t th[aria-sort="descending"] .sortmark { opacity: 1; }
.ammo-t th[aria-sort="descending"] .sortmark .up { opacity: .25; }
.ammo-t tbody th, .ammo-t tbody td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.ammo-t tbody td { color: var(--ink-soft); white-space: nowrap; }
.ammo-t tbody .num { text-align: right; color: var(--ink); }
.ammo-t tbody th { padding: 0; font-weight: 400; }
.r-name {
  display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; cursor: pointer;
  color: var(--ink); font: 14px var(--sans); text-align: left; padding: 7px 10px; white-space: nowrap;
}
.r-no { font: 600 10px/1 var(--mono); color: var(--ink-soft); background: var(--ground-3); padding: 4px 5px; min-width: 20px; text-align: center; flex: none; }
.ammo-t tbody tr:hover, .ammo-t tbody tr.hl { background: var(--ground-2); }
.ammo-t tbody tr.hl th, .ammo-t tbody tr.hl td { border-bottom-color: var(--line-strong); }
.ammo-t tbody tr.hl .r-no { background: var(--accent); color: var(--deep); }
.ammo-t tbody tr.hl td { color: var(--ink); }

.pager { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 36px 0 0; border-top: 1px solid var(--line); padding-top: 18px; }
.pager a { color: var(--accent); text-decoration: none; font: 600 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.pager a:hover { text-decoration: underline; }
.pager a:only-child:last-child { margin-left: auto; }

@media (max-width: 900px) {
  .cal-top { grid-template-columns: 1fr; gap: 20px; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); column-gap: 18px; }
}
@media (max-width: 640px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-strip { gap: 3px; }
  .cal-strip a { padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-card, .cal-strip a { transition: none; }
}

/* ---------------------------------------------------------------- guns */
/* The weapons section reuses the ammunition furniture (.pagehead, .cal-strip, .facts) and
   adds the ledger table the items pages share with it. */
.h2.tight { margin-top: 0; }
.pagehead .headstats { margin-top: 24px; }

/* ledger table: the sortable grid behind both new sections */
.led-wrap { margin-bottom: 14px; }
.led { width: 100%; border-collapse: collapse; font-size: 14px; min-width: var(--led-min, 820px); font-variant-numeric: tabular-nums; }
.led thead th { background: var(--ground-2); border-bottom: 1px solid var(--line-strong); padding: 0; text-align: left; vertical-align: bottom; position: sticky; top: 0; z-index: 1; }
.led thead th button {
  display: flex; align-items: center; gap: 5px; width: 100%; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font: 600 10px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 10px; text-align: left;
}
.led thead th.num button { justify-content: flex-end; }
.led thead th button:hover { color: var(--ink); }
.led thead th .u { text-transform: none; letter-spacing: 0; opacity: .7; }
.led th[aria-sort="ascending"] button, .led th[aria-sort="descending"] button { color: var(--accent); }
.led th[aria-sort="ascending"] .sortmark, .led th[aria-sort="descending"] .sortmark { opacity: 1; }
.led th[aria-sort="ascending"] .sortmark .dn { opacity: .25; }
.led th[aria-sort="descending"] .sortmark .up { opacity: .25; }
.led tbody th, .led tbody td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.led tbody td { color: var(--ink-soft); white-space: nowrap; }
.led tbody .num { text-align: right; color: var(--ink); }
.led tbody th { font-weight: 400; color: var(--ink); white-space: nowrap; display: table-cell; }
.led tbody th .r-t { display: inline-flex; align-items: center; gap: 9px; }
.led tbody th .r-no { font: 600 10px/1 var(--ui); color: var(--ink-soft); background: var(--ground-3); padding: 4px 5px; min-width: 20px; text-align: center; flex: none; margin-right: 9px; }
.led tbody th a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.led tbody td a { color: var(--accent); text-decoration-color: rgba(201, 163, 94, .4); text-underline-offset: 3px; }
.led tbody tr:hover, .led tbody tr.hl { background: var(--ground-2); }
.led tbody tr.hl th, .led tbody tr.hl td { border-bottom-color: var(--line-strong); }
.led tbody tr.hl .r-no { background: var(--accent); color: var(--deep); }
.led tbody tr.hl td { color: var(--ink); }
.led-empty { margin: 0 0 14px; padding: 18px 2px; color: var(--ink-soft); font-size: 14px; }

/* filter: one input, a clear button and a live count */
.filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; font: 600 11px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }
.filter label { color: var(--ink-soft); }
.fbox { position: relative; display: inline-flex; }
.filter input {
  width: min(320px, 70vw); background: var(--ground-2); border: 1px solid var(--line-strong);
  color: var(--ink); font: 400 14px var(--sans); padding: 9px 34px 9px 11px; letter-spacing: 0; text-transform: none;
}
.filter input::placeholder { color: var(--ink-faint); }
.filter input:focus-visible { border-color: var(--accent); }
.filter [data-clear] { position: absolute; right: 0; top: 0; bottom: 0; width: 30px; background: none; border: 0; color: var(--ink-faint); font: 18px/1 var(--sans); cursor: pointer; }
.filter [data-clear]:hover { color: var(--accent); }
.filter output { color: var(--sand); font-size: 15px; font-variant-numeric: tabular-nums; }

/* class overview ledger: a glyph beside each class name */
.gun-ov tbody th a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sand); }
.gun-ov tbody th a:hover span { color: var(--accent); }
.gun-ov .gl { width: 58px; height: 26px; flex: none; color: var(--accent); }
.gun-ov .gl path { fill: rgba(201, 163, 94, .12); stroke: currentColor; stroke-width: 1.1; stroke-linejoin: round; transition: fill .3s var(--ease); }
.gun-ov tbody tr:hover .gl path { fill: rgba(201, 163, 94, .3); animation: gl-trace 1s var(--ease); }
@keyframes gl-trace { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
.gun-ov tbody td { white-space: normal; }
.gun-ov td.num { white-space: nowrap; }
/* class ranges: one shared scale per column, so the bars compare down the table */
.rng { display: inline-flex; align-items: center; gap: 12px; }
.rng > span { min-width: 5.2em; text-align: right; }
.rbar { width: 120px; height: 12px; flex: none; overflow: visible; }
.rbar .trk { stroke: var(--line-strong); stroke-width: 1; }
.rbar .rb { fill: var(--brass); opacity: .8; transform-box: fill-box; transform-origin: center; animation: rgrow .8s var(--ease) both; animation-delay: calc(150ms + var(--i) * 60ms); }
.rbar .cap { stroke: var(--sand); stroke-width: 1.4; }
.gun-ov tbody tr:hover .rb { opacity: 1; }
@keyframes rgrow { from { transform: scaleX(0); } }

@media (max-width: 640px) {
  .rbar { display: none; }
  .filter { gap: 8px; }
  .filter input { width: 100%; }
  .fbox { flex: 1 1 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-card, .filter input { transition: none; }
  .rbar .rb, .gun-ov tbody tr:hover .gl path { animation: none; }
}

/* ---------------------------------------------------------------- items */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.cat-card {
  position: relative; display: block; text-decoration: none; background: var(--ground-2);
  border: 1px solid var(--line); padding: 20px 20px 18px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.cat-card:hover { border-color: var(--accent); background: var(--ground-3); }
.cat-card .cat-gl { width: 40px; height: 40px; color: var(--accent); opacity: .9; margin-bottom: 12px; display: block; }
.cat-card h3 { font-size: 24px; margin-bottom: 10px; }
.cat-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.cat-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 14px; font-size: 13px; }
.cat-card dt { color: var(--ink-soft); font: 10px/1.8 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.cat-card dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--sand); }
.cat-card .go { font-size: 11px; }

/* mods: counts with a hairline share bar */
.mod-ov tbody th { color: var(--sand); }
.mod-ov .bar { width: 46%; }
.mod-ov .bar span { display: block; height: 8px; width: var(--p); background: var(--brass); opacity: .75; border: 0; }
.mod-ov tbody tr:hover .bar span { opacity: 1; }

@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  .mod-ov .bar { display: none; }
  .mod-ov thead th:last-child { display: none; }
}

/* ---------------------------------------------------------------- header, responsive */
@media (max-width: 1000px) {
  .top { gap: 14px; }
  .top nav a { padding: 0 11px; letter-spacing: .18em; }
  .top nav a::after { left: 11px; right: calc(11px + .18em); }
  .brand .bt small { display: none; }
}
@media (max-width: 720px) {
  .top { height: 56px; padding: 0 12px; }
  .brand .bt { display: none; }
  .top nav { margin-right: 0; }
  .top nav a { padding: 0 7px; font-size: 11.5px; letter-spacing: .12em; }
  .top nav a::after { left: 7px; right: calc(7px + .12em); bottom: 12px; }
  .mapview { height: calc(100dvh - 56px); }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot-nav { margin: 0; flex-wrap: wrap; row-gap: 10px; }
  .foot-nav a:first-child { padding-left: 0; }
  .foot-note { text-align: left; }
}

/* ---------------------------------------------------------------- home */
.home main { width: min(1240px, calc(100vw - 40px)); margin: 0 auto; }
.hero3 { position: relative; margin: 0 calc((min(1240px, calc(100vw - 40px)) - 100vw) / 2); padding: 0 calc((100vw - min(1240px, calc(100vw - 40px))) / 2); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero3-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% 58%; }
.hero3::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(12, 10, 8, .92) 0%, rgba(12, 10, 8, .62) 32%, rgba(12, 10, 8, .08) 58%, rgba(12, 10, 8, .5) 100%), linear-gradient(0deg, var(--ground) 0%, transparent 20%); }
.hero3-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; padding: 44px 0 34px; align-items: start; }
.hero3 h1 { font-size: clamp(52px, 6.2vw, 86px); line-height: .98; margin: 6px 0 26px; max-width: 12.5ch; }
.hero3 .lede { max-width: 42ch; color: var(--ink); }
.hero3 .cta { gap: 28px; align-items: center; margin-bottom: 34px; }
.hero3-stats { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; gap: 0; max-width: 560px; }
.hero3-stats li { display: flex; align-items: center; gap: 14px; padding: 0 30px; border-left: 1px solid var(--line); }
.hero3-stats li:first-child { padding-left: 0; border-left: 0; }
.hero3-stats b { font: 400 40px/1 var(--serif); color: var(--sand); }
.hero3-stats span { font: 600 11px/1.3 var(--ui); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft); }
.hero3-stats svg { width: 30px; height: 30px; color: var(--ink-soft); }
.hero3-atlas { border: 1px solid var(--line-strong); background: rgba(12, 10, 8, .82); padding: 18px 18px 16px; backdrop-filter: blur(3px); }
.hero3-atlas .eyebrow { margin-bottom: 6px; }
.hero3-atlas h2 { font-size: 40px; margin-bottom: 8px; }
.ha-meta { margin: 0 0 14px; font: 600 10.5px/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.ha-frame { display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line); margin-bottom: 16px; overflow: hidden; background: var(--deep); }
.ha-map { width: 100%; height: 100%; display: block; }
/* extract tour (home.js): reticle, the leg it just walked, and the stop's name under the frame */
.ha-frame { position: relative; }
.ha-ret { opacity: 0; pointer-events: none; transition: transform 1.15s cubic-bezier(.65, 0, .35, 1), opacity .4s var(--ease); }
.ha-ret.live { opacity: 1; }
.ha-ret circle, .ha-ret path { fill: none; stroke: var(--sand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ha-ret path { stroke: var(--accent); }
.ha-ret .ha-pulse { stroke: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.ha-ret.hit .ha-pulse { animation: ha-pulse 1.3s var(--ease) 1s; }
@keyframes ha-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
.ha-route { fill: none; stroke: var(--accent); stroke-width: calc(var(--s) * 1.6); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.ha-route.run { opacity: .85; animation: ha-leg 1.15s cubic-bezier(.65, 0, .35, 1) forwards, ha-fade 1.6s ease-in 1.4s forwards; }
@keyframes ha-leg { to { stroke-dashoffset: 0; } }
@keyframes ha-fade { to { opacity: 0; } }
.ha-map .hp { transition: filter .4s var(--ease); }
.ha-map .hp.on { filter: drop-shadow(0 0 calc(var(--s) * 3px) rgba(239, 230, 211, .9)); }
.ha-now { display: flex; align-items: baseline; gap: 10px; margin: -6px 0 14px; min-height: 1.4em; font: 400 17px/1.25 var(--serif); color: var(--sand); }
.ha-now .ha-k { flex: none; font: 600 10px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.ha-now .ha-n { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sect { padding: 40px 0 16px; border-top: 1px solid var(--line); }
.hero3 + .sect { border-top: 0; }
.sect-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sect-head h2 { font-size: clamp(38px, 4.2vw, 56px); }
.atlas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.atl { position: relative; display: grid; grid-template-rows: auto auto; text-decoration: none; border: 1px solid var(--line-strong); background: var(--ground-2); transition: border-color .25s var(--ease); }
.atl:hover { border-color: var(--accent-dim); }
.atl:hover .go-arrow { transform: translateX(3px); }
.atl-art { width: 100%; aspect-ratio: 2.3 / 1; height: auto; display: block; filter: sepia(.25) saturate(.8) brightness(.92); transition: filter .4s var(--ease); }
.atl:hover .atl-art { filter: none; }
.atl-t { display: grid; gap: 5px; padding: 10px 46px 12px 13px; }
.atl-t b { font: 400 22px/1.05 var(--serif); color: var(--sand); }
.atl-t small { font: 600 10.5px/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-faint); }
/* atlas cards: hovering surveys the sheet, a sweep passes and the exits come up */
.atl-art .ap { opacity: 0; transition: opacity .35s var(--ease); transition-delay: 0ms; }
.atl:hover .atl-art .ap, .atl:focus-visible .atl-art .ap { opacity: 1; transition-delay: calc(180ms + var(--d)); }
.atl-scan { opacity: 0; }
.atl:hover .atl-scan, .atl:focus-visible .atl-scan { animation: atl-sweep 1.1s var(--ease) forwards; }
@keyframes atl-sweep { 0% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(125%); } }
.atl-scan { transform-box: view-box; }
.atl-mix { display: block; width: 100%; max-width: 180px; height: 4px; margin-top: 4px; }
.atl-mix rect { fill: var(--k); opacity: .75; transform-box: fill-box; transform-origin: left; transition: opacity .3s var(--ease); }
.atl:hover .atl-mix rect { opacity: 1; }
.go-arrow { position: absolute; right: 14px; bottom: 18px; width: 18px; height: 18px; color: var(--accent); transition: transform .3s var(--ease); }

.carry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.carry { border: 1px solid var(--line-strong); background: linear-gradient(180deg, #0b0907, #100d0a); padding: 18px 20px 20px; display: grid; grid-template-rows: auto 1fr auto auto; }
.carry h3 { font-size: 27px; margin-bottom: 8px; }
.carry img { width: 100%; height: 150px; object-fit: contain; display: block; margin: 4px 0 12px; }
.carry p { margin: 0 0 14px; color: var(--ink-soft); font: 400 15.5px/1.45 var(--serif); }
.carry .link-arrow { justify-self: start; }

.layer-row { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); }
.layer-row li { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.layer-row li + li { border-left: 1px solid var(--line); }
.layer-row li > svg { width: 34px; height: 34px; flex: none; }
.lr-ico { color: var(--ink-soft); }
.layer-row b { display: block; font: 400 19px/1.1 var(--serif); color: var(--sand); margin-bottom: 7px; }
.badge-ok, .badge-soon { display: inline-block; font: 600 9.5px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; padding: 4px 7px; border: 1px solid; }
.badge-ok { color: var(--accent); border-color: var(--accent-dim); background: rgba(201, 163, 94, .1); }
.badge-soon { color: var(--ink-soft); border-color: var(--line-strong); }

@media (max-width: 1000px) {
  .hero3-in { grid-template-columns: 1fr; }
  .hero3-atlas { max-width: 420px; }
  .atlas-grid, .carry-grid { grid-template-columns: repeat(2, 1fr); }
  .layer-row { grid-template-columns: repeat(2, 1fr); }
  .layer-row li:nth-child(3) { border-left: 0; }
  .layer-row li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .home main { width: calc(100vw - 24px); }
  .hero3 { margin: 0 -12px; padding: 0 12px; }
  .hero3-bg { height: 420px; object-position: 64% 45%; }
  .hero3::after { background: linear-gradient(180deg, rgba(12, 10, 8, .25) 0, rgba(12, 10, 8, .7) 230px, var(--ground) 420px); }
  .hero3-in { padding-top: 150px; }
  .hero3-stats { flex-wrap: wrap; row-gap: 14px; }
  .hero3-stats li { padding: 0 16px; }
  .hero3-stats li:nth-child(3) { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .hero3-stats b { font-size: 32px; }
  .atlas-grid, .carry-grid, .layer-row { grid-template-columns: 1fr; }
  .layer-row li + li { border-left: 0; border-top: 1px solid var(--line); }
  .sect-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .atl, .atl-art, .link-arrow svg, .go-arrow, .atl-art .ap { transition: none; }
  .atl:hover .atl-scan, .atl:focus-visible .atl-scan { animation: none; }
  .atl:hover .go-arrow { transform: none; }
}

/* ================================================================ plates
   Rendered rounds and weapons, always at a stated scale. Drawing in is armed by plates.js
   (.rv) and fired as each piece scrolls into view (.in); without the script everything is
   simply drawn. Hover and focus change paint only, never size or position in the flow. */

/* faint drafting grid behind a plate */
.specimen, .gr-plate, .cw-scroll {
  --grid: rgba(214, 192, 150, .045);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------------------------------------------------------------- specimen */
.cal-top { grid-template-columns: 210px minmax(0, 1fr); align-items: stretch; }
.specimen {
  margin: 0; position: relative; overflow: hidden; border: 1px solid var(--line);
  background-color: var(--ground-2); padding: 30px clamp(18px, 4vw, 54px) 16px;
  display: flex; flex-direction: column; justify-content: center; min-height: 100%;
}
.specimen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 62%, rgba(201, 163, 94, .1), transparent 70%);
}
.sp-in { position: relative; width: min(100%, 620px); margin: 0 auto; padding-top: 52px; }
.sp-in img { display: block; width: 100%; height: auto; position: relative;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .65)); }
.dim { position: absolute; left: 0; top: 0; width: 100%; height: calc(52px + 50%); overflow: visible; }
.dim line { vector-effect: non-scaling-stroke; stroke: var(--accent); stroke-width: 1; fill: none; }
.dim .ext { stroke-opacity: .45; stroke-dasharray: 3 3; }
.dim .run { stroke-dasharray: 1; stroke-dashoffset: 0; }
.dim-l {
  position: absolute; left: 50%; top: 9px; transform: translateX(-50%); padding: 0 10px;
  background: var(--ground-2); font: 600 13px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap;
}
.dim-l b { font-size: 22px; color: var(--sand); letter-spacing: 0; margin-right: 3px; }
.specimen figcaption {
  position: relative; margin-top: 16px; text-align: center; color: var(--ink-soft);
  font: 600 12px var(--ui); letter-spacing: .16em; text-transform: uppercase;
}
.specimen figcaption b { color: var(--accent); font-weight: 600; }
.specimen.rv .run { stroke-dashoffset: 1; }
.specimen.rv .ext, .specimen.rv .dim-l { opacity: 0; }
.specimen.rv img { opacity: 0; transform: translateX(-28px); }
.specimen.in .run { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) .55s; }
.specimen.in .ext { opacity: 1; transition: opacity .5s var(--ease) .35s; }
.specimen.in .dim-l { opacity: 1; transition: opacity .5s var(--ease) 1.1s; }
.specimen.in img { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform 1s var(--ease); }

/* ---------------------------------------------------------------- round board */
.rboard { --rw: clamp(120px, 22vw, 250px); --lab: 46px; --no: 30px; margin: 34px 0 30px; }
.rb-head, .rbr {
  display: grid; grid-template-columns: var(--no) minmax(0, 1fr) var(--rw) minmax(0, 1fr);
  column-gap: 16px; align-items: center;
}
.rb-head { padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.rb-head em {
  font: 600 11px var(--ui); letter-spacing: .24em; text-transform: uppercase; font-style: normal;
  color: var(--ink-soft); display: block; margin-bottom: 22px;
}
.rb-hd { position: relative; text-align: right; }
.rb-hp { position: relative; }
.rb-ticks, .rb-acs { position: absolute; bottom: 0; height: 16px; }
.rb-ticks { left: var(--lab); right: 0; }
.rb-acs { left: 0; right: var(--lab); }
.rb-ticks span, .rb-acs span { position: absolute; bottom: 0; font: 11px var(--mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.rb-ticks span { right: var(--x); transform: translateX(50%); }
.rb-acs span { left: var(--x); transform: translateX(-50%); }
.rb-acs b { font: 600 11px var(--ui); letter-spacing: .08em; color: var(--accent-dim); }
.rb-list { list-style: none; margin: 0; padding: 0; }
.rbr { position: relative; min-height: 50px; padding: 5px 0; border-bottom: 1px solid var(--line); outline: none; }
.rbr::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 163, 94, .08) 30%, rgba(201, 163, 94, .08) 70%, transparent);
  transition: opacity .25s var(--ease);
}
.rbr:hover::before, .rbr.hl::before, .rbr:focus-visible::before { opacity: 1; }
.rbr:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.rb-no {
  width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong);
  font: 600 11px var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.rbr.hl .rb-no, .rbr:hover .rb-no { background: var(--accent); color: var(--deep); border-color: var(--accent); }
.rb-d, .rb-p { position: relative; height: 26px; }
.rb-bar { position: absolute; top: 50%; height: 8px; margin-top: -4px; }
.rb-d .rb-bar { left: var(--lab); right: 0; }
.rb-p .rb-bar { left: 0; right: var(--lab); }
.rb-bar i { position: absolute; top: 0; bottom: 0; display: block; transition: transform .9s var(--ease), filter .2s; }
.rb-d .rb-bar i {
  right: 0; width: calc(var(--dv) * 100%); transform-origin: right;
  background: linear-gradient(270deg, #d9cdb4, rgba(217, 205, 180, .22));
}
.rb-p .rb-bar i {
  left: 0; width: calc(var(--pv) * 100%); transform-origin: left;
  background: linear-gradient(90deg, rgba(201, 163, 94, .25), var(--accent));
}
/* armor class rules run through every row on the penetration side */
.rb-p .rb-bar::before {
  --c: rgba(201, 163, 94, .3);
  content: ""; position: absolute; left: 0; right: 0; top: -21px; bottom: -21px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(var(--a1) - .5px), var(--c) 0, var(--c) calc(var(--a1) + .5px), transparent 0),
    linear-gradient(90deg, transparent calc(var(--a2) - .5px), var(--c) 0, var(--c) calc(var(--a2) + .5px), transparent 0),
    linear-gradient(90deg, transparent calc(var(--a3) - .5px), var(--c) 0, var(--c) calc(var(--a3) + .5px), transparent 0),
    linear-gradient(90deg, transparent calc(var(--a4) - .5px), var(--c) 0, var(--c) calc(var(--a4) + .5px), transparent 0),
    linear-gradient(90deg, transparent calc(var(--a5) - .5px), var(--c) 0, var(--c) calc(var(--a5) + .5px), transparent 0),
    linear-gradient(90deg, transparent calc(var(--a6) - .5px), var(--c) 0, var(--c) calc(var(--a6) + .5px), transparent 0);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 6px);
  mask: repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 6px);
}
.rb-d b, .rb-p b {
  position: absolute; top: 50%; transform: translateY(-50%); font: 600 16px/1 var(--ui);
  color: var(--sand); font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .5s var(--ease);
}
.rb-d b { right: calc(var(--dv) * (100% - var(--lab)) + 8px); }
.rb-p b { left: calc(var(--pv) * (100% - var(--lab)) + 8px); color: var(--accent); }
.rbr.hl .rb-bar i, .rbr:hover .rb-bar i { filter: brightness(1.25) saturate(1.1); }
.rb-r { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rb-r img {
  display: block; height: auto; max-width: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6));
  transition: opacity .6s var(--ease), transform .8s var(--ease), filter .25s var(--ease);
}
.rbr.hl .rb-r img, .rbr:hover .rb-r img { filter: drop-shadow(0 0 9px rgba(201, 163, 94, .45)) drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.rb-nm {
  width: 100%; text-align: center; font: 600 12px/1.2 var(--ui); letter-spacing: .06em; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rbr.hl .rb-nm, .rbr:hover .rb-nm { color: var(--sand); }
.rb-none { display: block; height: 10px; width: 60%; border-top: 1px dashed var(--line-strong); }
.tr { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tr-red { background: #e2553c; box-shadow: 0 0 6px #e2553c; }
.tr-green { background: #63d36c; box-shadow: 0 0 6px #63d36c; }
.tr-yellow { background: #e9c74c; box-shadow: 0 0 6px #e9c74c; }
.rboard figcaption { color: var(--ink-soft); font-size: 12.5px; margin-top: 12px; max-width: 80ch; }
.rboard.rv .rbr:not(.in) .rb-bar i { transform: scaleX(0); }
.rboard.rv .rbr:not(.in) b { opacity: 0; }
.rboard.rv .rbr:not(.in) .rb-r img { opacity: 0; transform: translateX(-18px); }
.rboard.rv .rbr.in .rb-bar i, .rboard.rv .rbr.in b, .rboard.rv .rbr.in .rb-r img { transition-delay: calc(var(--i) * 28ms); }
.rboard.rv .rbr.in b { transition-delay: calc(var(--i) * 28ms + .45s); }

/* ---------------------------------------------------------------- weapon rack */
.facts-row { display: flex; flex-wrap: wrap; gap: 0 34px; border-top: 0; margin: 4px 0 6px; }
.facts-row div { border-top: 1px solid var(--line); min-width: 104px; }
.facts-row dd { border-bottom: 0; margin-bottom: 4px; font: 600 20px var(--ui); color: var(--sand); }
.grack { margin: 20px 0 32px; }
.gr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.gr {
  position: relative; display: grid; grid-template-rows: auto auto 1fr; background: var(--ground-2);
  border: 1px solid var(--line); outline: none; overflow: hidden;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.gr:hover, .gr.hl, .gr:focus-visible { border-color: var(--accent-dim); background-color: var(--ground-3); }
.gr-plate {
  position: relative; display: flex; align-items: center; min-height: 128px; padding: 16px 20px 10px;
  border-bottom: 1px solid var(--line); background-color: rgba(0, 0, 0, .18);
}
.gr-plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(239, 230, 211, .07) 50%, transparent 65%);
  transform: translateX(-100%);
}
.gr:hover .gr-plate::after, .gr.hl .gr-plate::after { opacity: 1; transform: translateX(100%); transition: transform .9s var(--ease); }
.gr-plate img {
  display: block; height: auto; max-width: 100%;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .7)) drop-shadow(0 0 1px rgba(239, 230, 211, .25));
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.gr:hover .gr-plate img, .gr.hl .gr-plate img { transform: translateX(6px); }
.gr-none { font: 600 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.gr-meta { padding: 12px 18px 4px; min-width: 0; }
.gr-meta h3 { font-size: 22px; line-height: 1.15; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; color: var(--sand); }
.gr-no {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong);
  font: 600 11px var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.gr:hover .gr-no, .gr.hl .gr-no { background: var(--accent); border-color: var(--accent); color: var(--deep); }
.gr-meta p { margin: 0; font: 500 13.5px/1.4 var(--ui); letter-spacing: .04em; color: var(--ink-soft); }
.gr-meta p a { color: var(--accent); text-decoration: none; }
.gr-meta p a:hover { text-decoration: underline; }
.gr-gauges { display: flex; gap: 4px; padding: 6px 12px 12px; align-self: end; }
.gauge { flex: 1; margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; --gc: var(--accent); }
.gauge.bone { --gc: #d9cdb4; }
.gauge svg { width: 50px; height: 44px; flex: none; overflow: visible; }
.gauge path { fill: none; stroke-width: 4; stroke-linecap: round; }
.gauge .trk { stroke: rgba(214, 192, 150, .14); }
.gauge .val { stroke: var(--gc); stroke-dasharray: var(--v) 100; transition: stroke-dasharray 1.1s var(--ease); }
.gauge .tip {
  stroke: var(--gc); stroke-width: 1.4; stroke-linecap: round; transform-box: view-box; transform-origin: 32px 32px;
  transform: rotate(var(--a)); transition: transform 1.1s var(--ease);
}
.gauge figcaption { min-width: 0; }
.gauge figcaption b { display: block; font: 600 21px/1 var(--ui); color: var(--sand); font-variant-numeric: tabular-nums; }
.gauge figcaption span { display: block; margin-top: 3px; font: 600 9.5px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.gauge.none figcaption b { color: var(--ink-faint); }
.grack figcaption { color: var(--ink-soft); font-size: 12.5px; margin-top: 12px; max-width: 80ch; }
.grack > figcaption { margin-top: 14px; }
.grack.rv .gr:not(.in) .val { stroke-dasharray: 0 100; }
.grack.rv .gr:not(.in) .tip { transform: rotate(-120deg); }
.grack.rv .gr:not(.in) .gr-plate img { opacity: 0; transform: translateX(-26px); }
.grack.rv .gr.in .val, .grack.rv .gr.in .tip { transition-delay: calc(var(--i) % 2 * 90ms + .2s); }

/* gun index: each class pictured by a real weapon */
.gface { flex: none; width: 104px; height: 38px; display: flex; align-items: center; justify-content: center; }
.gface img { max-width: 100%; max-height: 100%; width: auto; height: auto; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); transition: transform .4s var(--ease), filter .3s; }
.gun-ov tbody tr:hover .gface img { transform: translateX(4px); filter: drop-shadow(0 0 7px rgba(201, 163, 94, .4)) drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); }

/* ---------------------------------------------------------------- cartridge wall */
.cwall { --mm: 1.75px; --lab: 70px; --glab: 34px; margin: 30px 0 44px; }
.cw-scroll {
  position: relative; overflow-x: auto; overflow-y: hidden; padding: 84px 18px 0 54px;
  border: 1px solid var(--line); background-color: var(--ground-2); scrollbar-width: thin;
}
.cw-ruler {
  position: absolute; left: 0; width: 42px; bottom: calc(var(--lab) + var(--glab));
  height: calc(var(--top) * var(--mm)); border-right: 1px solid var(--line-strong);
}
.cw-ruler span { position: absolute; right: 0; bottom: calc(var(--y) * var(--mm)); width: 8px; border-top: 1px solid var(--line-strong); }
.cw-ruler b { position: absolute; right: 12px; top: -7px; font: 10px var(--mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.cw-ruler em { position: absolute; right: 12px; top: -26px; font: 600 10px var(--ui); letter-spacing: .2em; text-transform: uppercase; font-style: normal; color: var(--ink-faint); }
.cw-groups { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 0 20px; width: max-content; }
.cw-g { display: flex; flex-direction: column-reverse; }
.cw-g > ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 4px; position: relative; }
.cw-g > ol::before {
  content: ""; position: absolute; left: -8px; right: -8px; bottom: var(--lab); height: 1px; background: var(--line-strong);
}
.cw-gl {
  height: var(--glab); display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--accent-dim);
  margin: 0 -2px; font: 600 10.5px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-dim); white-space: nowrap;
}
.cw-g a { position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; outline: none; padding: 0 1px; min-width: 16px; }
.cw-r { position: relative; display: block; width: calc(var(--D) * var(--mm)); height: calc(var(--L) * var(--mm)); transition: transform .45s var(--ease); }
.cw-r img {
  position: absolute; left: 50%; top: 50%; width: calc(var(--L) * var(--mm)); height: auto; max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg); filter: drop-shadow(3px 0 4px rgba(0, 0, 0, .6));
  transition: opacity .6s var(--ease), transform .8s var(--ease), filter .25s;
}
.cw-l {
  height: var(--lab); padding-top: 8px; writing-mode: vertical-rl; transform: rotate(180deg); text-align: right;
  font: 600 11px var(--ui); letter-spacing: .08em; color: var(--ink-soft); white-space: nowrap; transition: color .2s;
}
.cw-g a:hover .cw-r, .cw-g a:focus-visible .cw-r { transform: translateY(-10px); }
.cw-g a:hover .cw-r img, .cw-g a:focus-visible .cw-r img { filter: drop-shadow(0 0 8px rgba(201, 163, 94, .55)) drop-shadow(3px 0 4px rgba(0, 0, 0, .6)); }
.cw-g a:hover .cw-l, .cw-g a:focus-visible .cw-l { color: var(--accent); }
.cw-tip {
  position: absolute; bottom: calc(100% + 18px); left: 50%; z-index: 2; width: max-content; max-width: 220px;
  transform: translate(-50%, 6px); opacity: 0; pointer-events: none; padding: 8px 11px;
  background: var(--ground); border: 1px solid var(--accent-dim); box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
  font: 500 12.5px/1.35 var(--ui); letter-spacing: .03em; color: var(--ink-soft); text-align: left;
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.cw-tip b { display: block; font-weight: 600; font-size: 14px; color: var(--sand); }
.cw-g a:hover .cw-tip, .cw-g a:focus-visible .cw-tip { opacity: 1; transform: translate(-50%, 0); }
.cwall figcaption { color: var(--ink-soft); font-size: 12.5px; margin-top: 10px; }
.cwall.rv .cw-r img { opacity: 0; transform: translate(-50%, -20%) rotate(-90deg); }
.cwall.in .cw-r img { opacity: 1; transform: translate(-50%, -50%) rotate(-90deg); transition-delay: calc(var(--i) * 40ms); }

/* caliber cards carry their round at one scale */
.cc-r { display: flex; align-items: center; height: 30px; margin: -2px 0 10px; }
.cc-r img { width: calc(var(--L) * 1.45px); height: auto; max-width: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); transition: transform .4s var(--ease); }
.cal-card:hover .cc-r img { transform: translateX(6px); }

@media (max-width: 900px) {
  .cal-top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* a phone stacks each row: the round on top, damage and penetration halving the width below */
  .rboard { --lab: 32px; }
  .rb-head, .rbr { grid-template-columns: 1fr 1fr; grid-template-areas: "r r" "d p"; column-gap: 12px; row-gap: 0; }
  .rb-head { grid-template-areas: "d p"; }
  .rb-head > span:not(.rb-hd):not(.rb-hp) { display: none; }
  .rb-hd { grid-area: d; } .rb-hp { grid-area: p; }
  .rb-d { grid-area: d; } .rb-p { grid-area: p; }
  .rbr { padding: 8px 0 6px; }
  .rb-r { grid-area: r; width: 62%; justify-self: center; }
  .rbr .rb-no { position: absolute; left: 0; top: 8px; width: 20px; height: 20px; font-size: 10px; }
  .rb-d b, .rb-p b { font-size: 13px; }
  .rb-d b { right: calc(var(--dv) * (100% - var(--lab)) + 4px); }
  .rb-p b { left: calc(var(--pv) * (100% - var(--lab)) + 4px); }
  .rb-ticks span:nth-child(even) { display: none; }
  .rb-nm { font-size: 10.5px; }
  .gr-gauges { padding: 6px 8px 12px; }
  .gauge svg { width: 42px; height: 38px; }
  .gauge figcaption b { font-size: 18px; }
  .cwall { --mm: 1.4px; }
  .cw-scroll { padding-left: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .specimen.rv img, .specimen.rv .ext, .specimen.rv .dim-l { opacity: 1; transform: none; }
  .specimen.rv .run { stroke-dashoffset: 0; }
  .rboard.rv .rbr:not(.in) .rb-bar i { transform: none; }
  .rboard.rv .rbr:not(.in) b, .rboard.rv .rbr:not(.in) .rb-r img { opacity: 1; transform: none; }
  .grack.rv .gr:not(.in) .val { stroke-dasharray: var(--v) 100; }
  .grack.rv .gr:not(.in) .tip { transform: rotate(var(--a)); }
  .grack.rv .gr:not(.in) .gr-plate img { opacity: 1; transform: none; }
  .cwall.rv .cw-r img { opacity: 1; transform: translate(-50%, -50%) rotate(-90deg); }
  .gr-plate::after { display: none; }
  .rb-bar i, .rb-r img, .gr-plate img, .gauge .val, .gauge .tip, .cw-r, .cw-r img, .cc-r img, .gface img, .cw-tip { transition: none; }
  .gr:hover .gr-plate img, .gr.hl .gr-plate img, .cw-g a:hover .cw-r, .cal-card:hover .cc-r img { transform: none; }
}

/* gun index: one card per class */
.gc-grid > li { display: flex; }
.gc-grid { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gcls {
  flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--ground-2); transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.gcls:hover, .gcls:focus-visible { border-color: var(--accent-dim); background-color: var(--ground-3); }
.gc-plate {
  height: 118px; display: flex; align-items: center; justify-content: center; padding: 14px 22px;
  border-bottom: 1px solid var(--line); background-color: rgba(0, 0, 0, .18); overflow: hidden;
  background-image: linear-gradient(rgba(214, 192, 150, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 192, 150, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}
.gc-plate img { max-width: 100%; max-height: 100%; width: auto; height: auto;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .7)); transition: transform .6s var(--ease), filter .3s; }
.gc-plate .gl { width: 60%; height: auto; color: var(--accent); }
.gc-plate .gl path { fill: rgba(201, 163, 94, .12); stroke: currentColor; stroke-width: 1.1; }
.gcls:hover .gc-plate img, .gcls:focus-visible .gc-plate img { transform: translateX(8px);
  filter: drop-shadow(0 0 10px rgba(201, 163, 94, .35)) drop-shadow(0 10px 10px rgba(0, 0, 0, .7)); }
.gc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 18px 6px; }
.gc-h b { font: 400 25px/1.1 var(--serif); color: var(--sand); }
.gcls:hover .gc-h b { color: var(--accent); }
.gc-h em { font: 600 22px/1 var(--ui); font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; }
.gc-figs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding: 4px 18px 10px; align-items: center; }
.gc-figs dt { font: 600 10px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }
.gc-figs dd { margin: 0; font: 500 15px var(--ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.gc-figs .rng { gap: 10px; }
.gc-figs .rng > span { min-width: 0; text-align: left; }
.gc-figs .rbar { width: 110px; display: block; }
.gc-cal { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 18px 16px; }
.gc-cal span { font: 11px var(--mono); color: var(--ink-soft); border: 1px solid var(--line); padding: 3px 6px; }
@media (prefers-reduced-motion: reduce) {
  .gc-plate img { transition: none; }
  .gcls:hover .gc-plate img { transform: none; }
}

/* items: a few of each category drawn to one scale, and the same on the index cards */
.itray { margin: 6px 0 26px; }
.itray ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1180px) { .itray ol { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 560px) { .itray ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.it {
  position: relative; display: grid; grid-template-rows: auto auto 1fr; cursor: pointer; outline: none;
  border: 1px solid var(--line); background: var(--ground-2); transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.it:hover, .it.hl, .it:focus-visible { border-color: var(--accent-dim); background-color: var(--ground-3); }
.it-plate {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 12px;
  border-bottom: 1px solid var(--line); background-color: rgba(0, 0, 0, .18);
  background-image: linear-gradient(rgba(214, 192, 150, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 192, 150, .045) 1px, transparent 1px);
  background-size: 16px 16px;
}
.it-plate img { display: block; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .7)); transition: transform .6s var(--ease), opacity .6s var(--ease), filter .3s; }
.it:hover .it-plate img, .it.hl .it-plate img { transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 0 9px rgba(201, 163, 94, .35)) drop-shadow(0 10px 10px rgba(0, 0, 0, .7)); }
.it-nm { padding: 8px 10px 2px; font: 500 13px/1.25 var(--ui); letter-spacing: .02em; color: var(--ink); }
.it:hover .it-nm, .it.hl .it-nm { color: var(--sand); }
.it-k { padding: 0 10px 9px; font: 600 9.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }
.itray figcaption { color: var(--ink-soft); font-size: 12.5px; margin-top: 10px; }
.itray.rv .it:not(.in) .it-plate img { opacity: 0; transform: translateY(14px); }
.itray.rv .it.in .it-plate img { transition-delay: calc(var(--i) * 60ms); }
.led tbody tr.flash { animation: rowflash 1.6s var(--ease); }
@keyframes rowflash { 0%, 30% { background: rgba(201, 163, 94, .22); } 100% { background: transparent; } }
.cat-tray { display: flex; align-items: flex-end; gap: 10px; height: 64px; margin-bottom: 12px; }
.cat-tray img { width: auto; height: 100%; max-width: 31%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .7)); transition: transform .5s var(--ease); }
.cat-card:hover .cat-tray img { transform: translateY(-3px); }
.cat-card:hover .cat-tray img:nth-child(2) { transition-delay: 60ms; }
.cat-card:hover .cat-tray img:nth-child(3) { transition-delay: 120ms; }
@media (prefers-reduced-motion: reduce) {
  .itray.rv .it:not(.in) .it-plate img { opacity: 1; transform: none; }
  .it-plate img, .cat-tray img { transition: none; }
  .it:hover .it-plate img, .it.hl .it-plate img, .cat-card:hover .cat-tray img { transform: none; }
  .led tbody tr.flash { animation: none; background: rgba(201, 163, 94, .18); }
}

/* caliber pages: the weapons that fire it */
.shooters { margin: 34px 0 10px; }
.shooters .h2 b { font: 600 .55em var(--ui); color: var(--accent); margin-left: 8px; vertical-align: .25em; }
.shooters ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.shooters a {
  display: grid; height: 100%; text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  background: var(--ground-2); transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.shooters a:hover, .shooters a:focus-visible { border-color: var(--accent-dim); background-color: var(--ground-3); }
.sh-plate { height: 76px; display: flex; align-items: center; justify-content: center; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background-color: rgba(0, 0, 0, .18); }
.sh-plate img { max-width: 100%; max-height: 100%; width: auto; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .7)); transition: transform .5s var(--ease); }
.shooters a:hover .sh-plate img { transform: translateX(5px); }
.shooters b { padding: 8px 12px 0; font: 500 15px/1.2 var(--ui); color: var(--sand); }
.shooters small { padding: 2px 12px 10px; font: 600 9.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }
.sh-none { width: 50%; border-top: 1px dashed var(--line-strong); }
/* a weapon card or round row reached by a link announces itself */
.gr:target, .rbr:target { animation: target-in 2.2s var(--ease); }
.gr:target { border-color: var(--accent); }
@keyframes target-in { 0%, 35% { box-shadow: 0 0 0 2px var(--accent), 0 0 30px rgba(201, 163, 94, .35); } 100% { box-shadow: 0 0 0 0 transparent; } }
.gr, .rbr { scroll-margin-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  .gr:target, .rbr:target { animation: none; box-shadow: 0 0 0 2px var(--accent); }
  .sh-plate img { transition: none; }
  .shooters a:hover .sh-plate img { transform: none; }
}

/* ---------------------------------------------------------------- search */
.srch-btn {
  flex: none; display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px 0 11px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink-soft);
  font: 600 11.5px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; transition: border-color .2s, color .2s;
}
.srch-btn:hover, .srch-btn:focus-visible { border-color: var(--accent); color: var(--sand); }
.srch-btn svg, .srch-f svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.srch-btn kbd { font: 11px var(--mono); letter-spacing: 0; padding: 2px 6px; border: 1px solid var(--line-strong); color: var(--ink-faint); }
.srch {
  width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 640px); margin: 12vh auto auto; padding: 0;
  background: var(--ground-2); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  overflow: hidden; flex-direction: column;
}
.srch[open] { display: flex; animation: srch-in .28s var(--ease); }
.srch::backdrop { background: rgba(7, 6, 5, .72); backdrop-filter: blur(3px); }
@keyframes srch-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.srch-f { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line-strong); color: var(--accent); }
.srch-f input {
  flex: 1; min-width: 0; height: 58px; background: none; border: 0; outline: none; color: var(--sand);
  font: 400 21px var(--serif);
}
.srch-f input::placeholder { color: var(--ink-faint); font-style: italic; }
.srch-f input::-webkit-search-cancel-button { display: none; }
.srch-x { background: none; border: 1px solid var(--line-strong); color: var(--ink-faint); font: 11px var(--mono); padding: 3px 7px; cursor: pointer; }
.srch-x:hover { color: var(--sand); border-color: var(--accent); }
.srch-r { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; overflow-x: hidden; }
.srch-r:empty { display: none; }
.srch-r a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 18px; text-decoration: none; color: var(--ink); }
.srch-r span { font: 500 15.5px/1.3 var(--ui); letter-spacing: .01em; min-width: 0; }
.srch-r small { flex: none; font: 600 9.5px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.srch-r mark { background: none; color: var(--accent); }
.srch-r li[aria-selected="true"] a, .srch-r a:hover { background: var(--ground-3); box-shadow: inset 2px 0 0 var(--accent); }
.srch-r li[aria-selected="true"] span { color: var(--sand); }
.srch-n { margin: 0; padding: 10px 18px 12px; color: var(--ink-faint); font: 12px var(--ui); letter-spacing: .06em; }
.srch-n:empty { display: none; }
@media (max-width: 900px) {
  .srch-btn span, .srch-btn kbd { display: none; }
  .srch-btn { padding: 0 9px; }
}
@media (max-width: 640px) {
  .srch { margin-top: 64px; max-height: calc(100vh - 90px); }
  .srch-r small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .srch[open] { animation: none; } }
.gr-bare { margin-left: auto; font: 600 9.5px var(--ui); font-style: normal; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line-strong); padding: 3px 6px; }

/* armor materials: wear and repair loss, the category's own materials lit */
.mats { margin: 38px 0 8px; }
.mat-t { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mat-t th, .mat-t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.mat-t thead th { font: 600 10px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); border-bottom-color: var(--line-strong); }
.mat-t tbody th { font: 500 16px var(--ui); color: var(--sand); white-space: nowrap; }
.mat-t tbody th small { display: block; font: 600 9px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.mat-t td { white-space: nowrap; }
.mat-t td b { font: 600 15px var(--ui); color: var(--ink); margin-left: 10px; }
.mat-t tr.off th, .mat-t tr.off td b { color: var(--ink-faint); }
.mat-t tr.off .mb i, .mat-t tr.off .mr i { opacity: .35; }
.mb, .mr { display: inline-block; vertical-align: middle; position: relative; width: 120px; height: 8px; background: rgba(214, 192, 150, .08); }
.mb i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v); background: linear-gradient(90deg, rgba(201, 163, 94, .3), var(--accent)); }
.mb.blast i { background: linear-gradient(90deg, rgba(217, 205, 180, .2), #d9cdb4); }
.mr i { position: absolute; top: 0; bottom: 0; left: var(--a); width: calc(var(--b) - var(--a)); min-width: 2px; background: #d9cdb4; }
.mr.trader i { background: var(--accent); }
.mat-t tbody tr:hover { background: var(--ground-2); }
.mats .mb i, .mats .mr i { transform-origin: left; animation: rgrow .8s var(--ease) both; animation-delay: calc(100ms + var(--i) * 50ms); }
@media (prefers-reduced-motion: reduce) { .mats .mb i, .mats .mr i { animation: none; } }

/* weapon mastery: a tag on each card, and the families on the index */
.gr-ms { display: block; margin-top: 3px; font: 600 9.5px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.mastery { margin: 40px 0 6px; }
.ms-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ms-grid li { border: 1px solid var(--line); background: var(--ground-2); padding: 12px 14px 12px; }
.ms-grid h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 2px; font: 400 20px var(--serif); color: var(--sand); }
.ms-grid h3 b { font: 600 15px var(--ui); color: var(--accent); }
.ms-pts { margin: 0 0 8px; font: 600 9.5px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.ms-guns { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ms-guns a { font: 500 12.5px var(--ui); color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line); padding: 2px 6px; }
.ms-guns a:hover { color: var(--sand); border-color: var(--accent-dim); }

/* what fits: the magazines a weapon takes, folded away on its card */
.gr-fit { border-top: 1px solid var(--line); }
.gr-fit summary {
  cursor: pointer; list-style: none; padding: 9px 18px; font: 600 10.5px var(--ui); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: 8px;
}
.gr-fit summary::-webkit-details-marker { display: none; }
.gr-fit summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); transition: transform .25s var(--ease); }
.gr-fit[open] summary::before { transform: rotate(45deg); }
.gr-fit summary:hover { color: var(--sand); }
.gr-fit ul { list-style: none; margin: 0; padding: 0 18px 12px; columns: 2; column-gap: 18px; }
.gr-fit li { display: flex; justify-content: space-between; gap: 8px; break-inside: avoid; padding: 3px 0; border-bottom: 1px solid var(--line); font: 500 13px var(--ui); color: var(--ink); }
.gr-fit li b { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .gr-fit ul { columns: 1; } }
@media (prefers-reduced-motion: reduce) { .gr-fit summary::before { transition: none; } }
/* floor plans: furniture and cover on their own sheet, switchable */
image.props { transition: opacity .3s var(--ease); }
.no-props image.props { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .sheets image.props { transition: none; } }

/* building floor plans on the outdoor maps: they fade in over the roofs once zoomed in */
.bp-floor { opacity: 0; transition: opacity .35s var(--ease); }
.bplans.on .bp-floor:not(.props) { opacity: 1; }
.bplans.on .bp-floor.props { opacity: 1; }
.no-props .bplans.on .bp-floor.props { opacity: 0; }
.bp-hit { fill: transparent; stroke: var(--accent); stroke-opacity: 0; stroke-width: 1.4px; vector-effect: non-scaling-stroke; cursor: zoom-in; transition: stroke-opacity .2s var(--ease); }
.bp-hit:hover { stroke-opacity: .85; }
.bplans.on .bp-hit { cursor: pointer; }
.tc { left: 50%; top: 12px; transform: translateX(-50%); }
.bpanel {
  display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; background: rgba(12, 10, 8, .92);
  border: 1px solid var(--accent-dim); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); white-space: nowrap;
  animation: srch-in .25s var(--ease);
}
.bpanel[hidden] { display: none; }
.bp-name { font: 400 18px var(--serif); color: var(--sand); }
.bp-tabs { display: flex; gap: 2px; }
.bp-tabs button {
  background: none; border: 1px solid var(--line-strong); color: var(--ink-soft); cursor: pointer;
  font: 600 11px var(--ui); letter-spacing: .14em; padding: 5px 9px;
}
.bp-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--deep); }
.bp-tabs button:hover { color: var(--sand); border-color: var(--accent); }
.bld-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; color: var(--ink); padding: 7px 8px; cursor: pointer; font: 15px var(--sans); }
.bld-btn .bp-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.3; }
.bld-btn .nm { flex: 1; }
.bld-btn sup { color: var(--ink-soft); font: 10px var(--mono); margin-left: 3px; }
.bld-btn .lv { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.bld-btn:hover, .bld-btn[aria-current="true"] { background: var(--ground-3); }
.bld-btn[aria-current="true"] { box-shadow: inset 2px 0 0 var(--accent); }
@media (max-width: 640px) { .bp-name { font-size: 15px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } }
@media (prefers-reduced-motion: reduce) { .bpanel { animation: none; } .bp-hit, .bp-floor { transition: none; } }
