/* TeamStarWolf Radar components. Every value comes from tokens.css; this file defines no colour of its own.
   Shared by the site, the library, the Intelligence Hub and ATT&CK-Navi: keep the class names stable. */

/* Base: type scale, links, focus, the gutter wrapper, utilities. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head-h) + 16px); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--t-16); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--fg); text-wrap: balance; }
h1 { font-size: var(--t-36); letter-spacing: -0.03em; }
h2 { font-size: var(--t-28); }
h3 { font-size: var(--t-22); font-weight: 600; }
h4 { font-size: var(--t-18); font-weight: 600; }
p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--accent); text-decoration: none; }
p a, td a, dd a, .prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; transition: text-decoration-color 160ms ease; }
p a:hover, td a:hover, dd a:hover, .prose a:hover { text-decoration-color: var(--accent); }
.u { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 0 1px; background-position: 0 100%; padding-bottom: 1px; transition: background-size 180ms ease, color 160ms ease; }
.u:hover, .u:focus-visible { background-size: 100% 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1480px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono, code, kbd, pre { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nw { white-space: nowrap; }
.dim, .muted { color: var(--muted); }
.red { color: var(--red); }
.strong { font-weight: 600; color: var(--fg); }
.eyebrow { font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lead { color: var(--fg-2); font-size: var(--t-18); line-height: 1.45; max-width: 72ch; }
.note { color: var(--muted); font-size: var(--t-13); line-height: 1.5; max-width: 92ch; }
code { font-size: 0.92em; padding: 1px 5px; border-radius: 4px; background: var(--bg-3); color: var(--fg-2); }
pre { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); font-size: var(--t-13); line-height: 1.65; overflow-x: auto; color: var(--fg-2); }
pre code { padding: 0; background: transparent; font-size: inherit; }
kbd { font-size: var(--t-12); line-height: 1; padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--bg-3); color: var(--fg-2); }

/* Skip link. */
.skip { position: absolute; left: 16px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--accent); color: var(--bg); border-radius: var(--r-xs); font-weight: 600; transform: translateY(-200%); }
.skip:focus, .skip:focus-visible { transform: none; outline-color: var(--fg); }

/* Insignia: the hidden defs block, the gradient stops from the wolf tokens, and the mark sizes for the three lockups. */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.g-hi { stop-color: var(--wolf-hi); } .g-1 { stop-color: var(--wolf-1); } .g-2 { stop-color: var(--wolf-2); }
.mark { display: block; max-width: 100%; height: auto; }
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); min-width: 0; flex: none; }
.lockup .mark-h { width: 75px; height: 40px; flex: none; }
.wordmark { display: block; font-size: var(--t-22); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.tagline { display: block; margin-top: 4px; font-size: var(--t-12); color: var(--muted); white-space: nowrap; }

/* Shell: two stacked glass bars (lockup, search, site links, toggle; then the doors). Below 1180 px the lockup bar stays sticky over a search-and-links row that scrolls away; on phones that row stacks and only the lockup bar sticks. */
.shell { display: contents; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 31; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); }
.top-row { display: flex; align-items: center; gap: 20px; height: var(--row-h); }
.bar1, .bar2 { display: contents; }
.top-row .toggle { order: 3; }
.search { position: relative; flex: 1 1 320px; display: flex; align-items: center; gap: 10px; max-width: 640px; min-width: 0; height: 40px; margin: 0; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); transition: border-color 160ms ease; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; color: var(--fg); font: inherit; font-size: var(--t-14); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-decoration, .search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.hint { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--muted); font-size: var(--t-12); white-space: nowrap; }
.sites { display: flex; align-items: center; gap: 16px; list-style: none; margin-left: auto; flex: none; }
.sites a { color: var(--fg-2); font-size: var(--t-13); font-weight: 500; white-space: nowrap; }
.sites a:hover { color: var(--fg); }
.sites .nav-pill { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; background-image: none; transition: border-color 160ms ease, color 160ms ease; }
.sites .nav-pill:hover { border-color: var(--accent); color: var(--fg); }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-3); color: var(--fg); font-family: var(--mono); font-size: var(--t-12); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; flex: none; transition: border-color 160ms ease, transform 160ms ease; }
.toggle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.doors-nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--row-h)); z-index: 30; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.doors-row { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.doors-row::-webkit-scrollbar { display: none; }
.doors { display: flex; gap: 2px; list-style: none; flex: none; }
.door { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px 9px 6px; color: var(--fg-2); white-space: nowrap; border-bottom: 2px solid transparent; transition: border-color 160ms ease, color 160ms ease; }
.door:hover { border-bottom-color: var(--accent); }
.door:hover .door-label { color: var(--accent); }
.door-n { font-family: var(--mono); font-size: var(--t-12); font-weight: 600; color: var(--accent); letter-spacing: 0.06em; padding-top: 3px; }
.door-label { display: flex; align-items: center; gap: 8px; font-size: var(--t-14); font-weight: 600; color: var(--fg); line-height: 1.2; transition: color 160ms ease; }
.door-q { display: block; font-size: var(--t-12); color: var(--muted); margin-top: 3px; }
.door.planned { cursor: default; }
.door.planned .door-label { color: var(--fg-2); }
.door.planned:hover { border-bottom-color: transparent; }
.door.planned:hover .door-label { color: var(--fg-2); }

/* Search results: the list app.js fills under the search box, links only, text only. */
.results { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 45; display: grid; gap: 2px; list-style: none; margin: 0; padding: 6px; max-height: min(70vh, 480px); overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--shadow), inset 0 1px 0 var(--hi); }
.results[hidden] { display: none; }
.result a { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-xs); color: var(--fg); transition: background-color 120ms ease; }
.result a:hover, .result.is-active a { background: var(--bg-3); }
.result.is-active .result-title { color: var(--accent); }
.result-kind { font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.result-title { font-size: var(--t-14); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }

/* Brand stage: black in both themes, the insignia large, a breathing radial glow and a CSS grid texture. */
.stage { position: relative; overflow: hidden; isolation: isolate; background: var(--stage-bg); color: var(--stage-fg); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 34% 72% at 22% 56%, color-mix(in srgb, var(--wolf-1) 36%, transparent), transparent 72%); animation: breathe 8s ease-in-out infinite; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--stage-grid) 1px, transparent 1px), linear-gradient(90deg, var(--stage-grid) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 100% at 36% 50%, var(--stage-bg) 15%, transparent 78%); mask-image: radial-gradient(ellipse 70% 100% at 36% 50%, var(--stage-bg) 15%, transparent 78%); }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.stage-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 48px; padding-block: 48px; }
.mark-stage { width: 300px; }
.stage-text { display: grid; gap: 12px; max-width: 58rem; }
.stage-text .eyebrow { color: var(--stage-muted); }
.stage-text h1 { color: var(--stage-fg); font-size: clamp(var(--t-28), 1.2rem + 1.8vw, var(--t-36)); }
.asof { font-family: var(--mono); font-size: var(--t-12); line-height: 1.65; color: var(--stage-muted); letter-spacing: 0.01em; max-width: 68ch; }
.stage .asof { max-width: 92ch; }
.asof .clock { color: var(--stage-fg); font-weight: 600; }
.lede { padding-block: 30px 10px; }
.lede > .wrap { display: grid; gap: 10px; }
.lede h1 { font-size: clamp(var(--t-28), 1.1rem + 1.6vw, var(--t-36)); max-width: 24ch; }
.lede .eyebrow { color: var(--signal); }
.lede .asof { color: var(--muted); max-width: 96ch; }
.lede .asof .clock { color: var(--fg); font-weight: 600; }

/* Sections: a violet hairline gradient at the top of each band, an eyebrow, a title and a lead. */
.band { position: relative; padding-block: 44px 56px; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--signal) 70%, transparent), var(--line) 36%, var(--line) 64%, color-mix(in srgb, var(--signal) 40%, transparent)); }
.sec-head { display: grid; gap: 8px; margin-bottom: 26px; }
.sec-head .eyebrow { display: flex; align-items: center; gap: 10px; }
.sec-head .eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--signal); }
.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sub-head h3 { font-size: var(--t-22); }

/* Chips: mono, uppercase, the colour in the text and a faint tint, never a full fill except the solid flag. */
.chip { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; height: 20px; padding: 0 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--chip-c, var(--line-2)) 45%, transparent); background: color-mix(in srgb, var(--chip-c, var(--grey)) var(--tint), var(--bg-2)); color: var(--chip-t, var(--chip-c, var(--fg-2))); font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1; white-space: nowrap; transition: border-color 160ms ease, filter 160ms ease; }
.sev-critical, .flag-kev, .chip.red { --chip-c: var(--red); }
.sev-major, .chip.amber { --chip-c: var(--amber); }
.grade-confirmed, .chip.green { --chip-c: var(--green); }
.chip.grey { --chip-c: var(--grey); --chip-t: var(--muted); }
.k-vulnerability, .flag-epss, .tech { --chip-c: var(--signal); --chip-t: var(--accent); }
.k-campaign { --chip-c: var(--signal); --chip-t: var(--fg); background: color-mix(in srgb, var(--signal) 30%, var(--bg-2)); }
.k-incident { --chip-c: var(--fg); --chip-t: var(--fg); background: color-mix(in srgb, var(--fg) 10%, var(--bg-2)); border-color: color-mix(in srgb, var(--fg) 32%, transparent); }
.k-actor, .sev-minor { --chip-c: var(--grey); --chip-t: var(--muted); }
.k-era, .sev-maintenance, .grade-reported, .chip.outline { --chip-c: var(--line-2); --chip-t: var(--fg-2); background: transparent; border-color: var(--line-2); }
.k-reference, .grade-inferred { --chip-c: var(--line-2); --chip-t: var(--muted); background: transparent; border: 1px dashed var(--line-2); }
.flag-exploited { --chip-c: var(--red); --chip-t: var(--bg); background: var(--red); border-color: var(--red); font-weight: 600; }
.flag-due { --chip-c: var(--red); --chip-t: var(--red); background: transparent; }
.chip.mode { --chip-c: var(--accent); --chip-t: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.chip.kind-tactic { --chip-c: var(--line-2); --chip-t: var(--fg-2); background: transparent; border-color: var(--line-2); text-transform: none; letter-spacing: 0.02em; font-family: var(--font); }
a.chip:hover { filter: brightness(1.12); border-color: var(--chip-c); }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--t-13); color: var(--fg-2); background: var(--bg-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Buttons. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg-3); color: var(--fg); font-size: var(--t-14); font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 var(--hi); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn.small { height: 30px; padding: 0 10px; font-size: var(--t-13); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Callout: a note set apart with an amber rail. */
.callout { display: grid; gap: 6px; padding: 14px 16px 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--r-s); background: var(--bg-2); font-size: var(--t-14); color: var(--fg-2); max-width: 72ch; }
.callout .eyebrow { color: var(--amber); }

/* Tables: hairlines, mono uppercase headers, tabular numerals, hover tint, each in its own scroll container; width hints keep citation and URL columns from being starved. */
.scroll { overflow-x: auto; min-width: 0; }
.scroll.framed { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-14); font-variant-numeric: tabular-nums; line-height: 1.4; }
.tbl caption { text-align: left; padding: 10px 16px; font-size: var(--t-13); color: var(--muted); }
.tbl th { text-align: left; font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: bottom; }
.tbl tbody th { font-family: var(--font); font-size: var(--t-14); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--fg); white-space: normal; vertical-align: top; padding: 10px 12px; border-bottom: 0; border-top: 1px solid var(--line); }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.tbl tbody tr:first-child td, .tbl tbody tr:first-child th { border-top: 0; }
.tbl tbody tr:hover td, .tbl tbody tr:hover th { background: color-mix(in srgb, var(--bg-3) 70%, transparent); }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl .mono { font-size: var(--t-13); }
.tbl .min { width: 1%; white-space: nowrap; }
.tbl th.w-cite { width: 18%; }
.tbl th.w-url { width: 30%; }
.tbl.dense td, .tbl.dense th { padding: 7px 12px; }
.tbl.dense td { font-size: var(--t-13); }
.framed .tbl th:first-child, .framed .tbl td:first-child, .panel .tbl th:first-child, .panel .tbl td:first-child { padding-left: 16px; }
.framed .tbl th:last-child, .framed .tbl td:last-child, .panel .tbl th:last-child, .panel .tbl td:last-child { padding-right: 16px; }
.sub-id { display: block; margin-top: 2px; font-size: var(--t-12); color: var(--muted); }
.due { color: var(--red); font-weight: 600; }
.cite { font-family: var(--mono); font-size: var(--t-12); color: var(--muted); overflow-wrap: anywhere; }
.tbl td.mono a { overflow-wrap: anywhere; }

/* Desk: six tiles with a 3 px rail (six, three or two columns, never an orphan), then the panels on a twelve-column grid. */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; margin-bottom: 14px; }
.tiles > li { min-width: 0; }
.tile { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; height: 100%; padding: 14px 16px 13px 19px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); color: var(--fg); overflow: hidden; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rail, var(--signal)); }
.tile.tone-red { --rail: var(--red); }
.tile.tone-amber { --rail: var(--amber); }
.tile:hover { transform: translateY(-1px); border-color: var(--line-2); box-shadow: var(--shadow), inset 0 1px 0 var(--hi); }
.tile-label { font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--t-36); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.tile-sub { font-size: var(--t-13); color: var(--muted); overflow-wrap: anywhere; }
.skeleton { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--bg-3), var(--line-2), var(--bg-3)); }
.skeleton.tall { height: 32px; width: 56%; }
.skeleton.short { width: 72%; }
.panels { display: grid; gap: 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.panel { grid-column: span 4; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); }
.panel.c7 { grid-column: span 7; }
.panel.c5 { grid-column: span 5; }
.panel.c12 { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: var(--t-16); letter-spacing: -0.01em; }
.panel-src { font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel-body { padding: 14px 16px; display: grid; gap: 14px; }
.panel > .note { padding: 10px 16px 12px; border-top: 1px solid var(--line); max-width: none; }
.panel-foot { margin-top: auto; padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: var(--t-13); display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 12px 10px; }
.figs div { min-width: 0; }
.figs dt { font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.figs dd { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--t-22); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.figs .is-red dd { color: var(--red); }
.wire { list-style: none; }
.wire li { display: grid; gap: 5px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: var(--t-14); line-height: 1.4; }
.wire li:first-child { border-top: 0; }
.wire li:hover { background: color-mix(in srgb, var(--bg-3) 70%, transparent); }
.wire-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-12); color: var(--muted); }

/* Live rows: what app.js renders inside a panel body today (the KEV, status, outage, wire and EPSS lists and the Patch Tuesday table), with the loading and failed states of tiles and panels. */
.panel-body:has(> .rows), .panel-body:has(> .table), .panel-body:has(> .panel-note) { padding: 0; gap: 0; }
.panel-body:has(> .rows), .panel-body:has(> .table) { max-height: 440px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rows { list-style: none; }
.row { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 16px; border-top: 1px solid var(--line); font-size: var(--t-14); line-height: 1.4; transition: background-color 120ms ease; }
.row:first-child { border-top: 0; }
.row:hover { background: color-mix(in srgb, var(--bg-3) 70%, transparent); }
.row:has(> .chip:first-child) { grid-template-columns: 7.6em minmax(0, 1fr) auto; }
.row > .chip { align-self: center; justify-self: start; }
.cell { min-width: 0; }
.cell.main { overflow-wrap: anywhere; color: var(--fg-2); }
.cell.main .chip { margin-inline: 0 6px; }
.cell.main > :not(:first-child).chip { margin-inline: 6px 0; }
.cell.mono { font-size: var(--t-12); white-space: nowrap; }
.row > .cell.mono:last-child { text-align: right; }
.sep { white-space: pre; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-14); font-variant-numeric: tabular-nums; line-height: 1.4; }
.table th { text-align: left; font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table th:not(:first-child) { text-align: right; }
.table td { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--fg-2); }
.table tr:nth-child(2) td { border-top: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--bg-3) 70%, transparent); }
.table td.mono { text-align: right; font-size: var(--t-13); }
.table td.red { color: var(--red); font-weight: 600; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.panel-note { padding: 12px 16px; font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.02em; color: var(--muted); }
.panel.loading .panel-body::after { content: ""; display: block; height: 60px; margin: 0 16px 16px; border-radius: 4px; background: repeating-linear-gradient(180deg, var(--bg-3) 0 12px, transparent 12px 24px); }
.panel.failed .panel-note { margin: 14px 16px; padding: 10px 12px; border-left: 3px solid var(--amber); border-radius: 0 var(--r-xs) var(--r-xs) 0; background: color-mix(in srgb, var(--amber) 8%, var(--bg-2)); color: var(--fg-2); }
.tile.loading .tile-value, .tile.loading .tile-sub { color: transparent; border-radius: 4px; background: linear-gradient(90deg, var(--bg-3), var(--line-2), var(--bg-3)); }
.tile.loading .tile-value { width: 56%; }
.tile.loading .tile-sub { width: 72%; }
.tile.failed .tile-value { color: var(--grey); }
.panel.c12 .rows { columns: 2; column-gap: 0; column-rule: 1px solid var(--line); }
.panel.c12 .row { break-inside: avoid; }

/* Library: three ways in as entry cards, then reference tables and the guides. */
.ways { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); list-style: none; }
.way { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); }
.way h3 { font-size: var(--t-22); }
.way p { color: var(--fg-2); font-size: var(--t-14); line-height: 1.55; flex: 1; }
.go { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 600; font-size: var(--t-14); }
.go svg { width: 14px; height: 14px; transition: transform 160ms ease; }
.go:hover svg { transform: translateX(3px); }
.guides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); list-style: none; }
.guide { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.guide h4 { font-size: var(--t-16); }
.guide h4 a { color: var(--fg); }
.guide h4 a:hover { color: var(--accent); }
.guide p { font-size: var(--t-14); color: var(--fg-2); line-height: 1.5; }

/* Catalog: kind filters, the definitions, the study table. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; list-style: none; }
.filter { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg-2); font-size: var(--t-13); font-weight: 500; white-space: nowrap; }
.filter b { font-family: var(--mono); font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.filter.is-on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.filter.is-on b { color: var(--bg); }
.filter svg { width: 14px; height: 8px; }
.defs-list { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 20px; font-size: var(--t-13); color: var(--muted); }
.defs-list div { display: flex; gap: 6px; min-width: 0; }
.defs-list dt { color: var(--fg-2); font-weight: 600; }
.defs-list dt::after { content: ":"; }
.dl-links { display: flex; gap: 10px; white-space: nowrap; }
.dl-links a { font-size: var(--t-13); font-weight: 500; }
.period { font-size: var(--t-13); color: var(--muted); }

/* Reader: the study head and the evidence rail (muted violet) share the top row, the contents sit left and stick, the body runs one 65ch measure below it and its tables break out under the rail's column from 1181 px; the whole block sits centred. */
.reader-in { width: fit-content; max-width: 100%; margin-inline: auto; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: var(--t-13); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.reader-grid { display: grid; grid-template-columns: 216px minmax(0, 65ch) 276px; column-gap: 48px; align-items: start; margin-top: 20px; }
.toc { grid-column: 1; grid-row: 1 / 3; position: sticky; top: calc(var(--head-h) + 20px); max-height: calc(100vh - var(--head-h) - 40px); overflow-y: auto; scrollbar-width: thin; font-size: var(--t-13); min-width: 0; }
.toc h3 { font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; }
.toc > ol > li { padding: 6px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 6px; }
.toc > ol > li:first-child { border-top: 0; }
.toc > ol > li > ol { grid-column: 2; margin-top: 4px; }
.toc ol ol li { padding: 2px 0; color: var(--muted); font-size: var(--t-12); }
.toc-n { font-family: var(--mono); font-size: var(--t-12); color: var(--accent); letter-spacing: 0.04em; padding-top: 2px; }
.toc a { color: var(--fg-2); }
.toc a:hover { color: var(--accent); }
.toc a.is-active { color: var(--accent); font-weight: 600; }
.toc .plain { color: var(--fg-2); }
.study { grid-column: 2; grid-row: 2; min-width: 0; }
.study-head { grid-column: 2; grid-row: 1; min-width: 0; display: grid; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.study-head .eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.study-head h2 { font-size: clamp(var(--t-28), 1.1rem + 1.6vw, var(--t-36)); letter-spacing: -0.03em; }
.byline { color: var(--muted); font-size: var(--t-14); }
.downloads { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: var(--r-s); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); font-size: var(--t-14); }
.meta div { min-width: 0; }
.meta .span2 { grid-column: 1 / -1; }
.meta dt { font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.meta dd { color: var(--fg-2); line-height: 1.45; }
.meta ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.meta ul li { padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--t-13); color: var(--fg-2); }
.study h3 { margin: 40px 0 14px; display: flex; flex-direction: column; gap: 5px; }
.study h3 .part { font-family: var(--mono); font-size: var(--t-12); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.study h4 { margin: 26px 0 10px; }
.study p { margin-bottom: 1em; line-height: 1.62; color: var(--fg-2); }
.study .scroll { width: calc(100% + 324px); margin: 14px 0 22px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); }
.study .tbl td, .study .tbl th { padding: 9px 11px; }
.study .tbl th { white-space: normal; }
.study .tbl td { font-size: var(--t-13); }
.grade-note { padding: 14px 16px 14px 18px; margin: 8px 0 26px; border-left: 3px solid var(--signal); border-radius: 0 var(--r-s) var(--r-s) 0; background: color-mix(in srgb, var(--signal) 8%, var(--bg-2)); font-size: var(--t-14); }
.themes { display: grid; gap: 12px; list-style: none; }
.theme { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); }
.theme h4 { margin: 0 0 6px; font-size: var(--t-16); }
.theme p { margin: 0; font-size: var(--t-14); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.pair article { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); min-width: 0; }
.pair .eyebrow { margin-bottom: 6px; }
.pair h4 { margin: 0 0 6px; font-size: var(--t-16); }
.pair p { margin: 0; font-size: var(--t-14); }
.rail { grid-column: 3; grid-row: 1; position: sticky; top: calc(var(--head-h) + 20px); min-width: 0; display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: var(--r-s); background: color-mix(in srgb, var(--signal) 6%, var(--bg-2)); font-size: var(--t-13); color: var(--fg-2); }
.rail h3 { font-family: var(--mono); font-size: var(--t-12); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.rail dl { display: grid; gap: 10px; }
.rail dd { color: var(--muted); line-height: 1.5; margin-top: 4px; }
.rail .eyebrow { margin-bottom: 3px; }
.rail code { font-size: var(--t-12); overflow-wrap: anywhere; }

/* Spine: a legend, then the band in its own scroll container; kinds by fill (the catalog's filter swatches share the same fills), the backbone as diamonds. */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin-bottom: 14px; font-size: var(--t-13); color: var(--fg-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend svg, .filter svg { flex: none; }
.band-scroll { overflow-x: auto; padding: 14px 10px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); }
.spine-svg { display: block; width: 100%; min-width: 1360px; height: auto; font-family: var(--font); font-variant-numeric: tabular-nums; }
.spine-svg .grid { stroke: var(--line); stroke-width: 1; }
.spine-svg .sep { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.spine-svg .axis { stroke: var(--line-2); stroke-width: 1; }
.spine-svg .tick, .spine-svg .kind-n { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.spine-svg .kind-l { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--fg-2); text-anchor: end; }
.spine-svg .kind-n { text-anchor: end; }
.spine-svg .lbl { font-size: 13px; fill: var(--fg-2); }
.spine-svg .lbl.dim { font-family: var(--mono); font-size: 12px; fill: var(--muted); letter-spacing: 0.04em; }
.spine-svg .bb-line { stroke: var(--line-2); stroke-width: 1; }
.spine-svg .bb path { fill: var(--accent); }
.spine-svg .bb.research path { fill: var(--bg-2); stroke: var(--accent); stroke-width: 1.2; }
.sp-vulnerability { --k: var(--signal); }
.sp-incident { --k: var(--fg); }
.sp-campaign { --k: var(--k-campaign); }
.sp-actor { --k: var(--grey); }
.sp-era { --k: var(--muted); }
.sp-reference { --k: var(--muted); }
.spine-svg .bar, .legend .bar, .filter .bar { fill: var(--k); }
.spine-svg .sp-era .bar, .legend .sp-era .bar, .filter .sp-era .bar { fill: color-mix(in srgb, var(--muted) 16%, transparent); stroke: var(--muted); stroke-width: 1; }
.spine-svg .sp-reference .bar, .legend .sp-reference .bar, .filter .sp-reference .bar { fill: url(#hatch); stroke: var(--muted); stroke-width: 0.6; }
.hatch-l { stroke: var(--muted); stroke-width: 1.6; }
.spine-svg .has-core .bar { opacity: 0.5; }
.spine-svg .core { fill: var(--k); }
.spine-svg .sp:hover .bar { opacity: 1; filter: brightness(1.2); }
.spine-svg .today { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 3 3; }
.spine-svg .today-l { font-family: var(--mono); font-size: 12px; font-weight: 600; fill: var(--fg); }
.legend .bb path { fill: var(--accent); }
.legend .bb.research path { fill: var(--bg-2); stroke: var(--accent); stroke-width: 1.2; }
.legend .today { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 3 3; }

/* Entity pages: three panels, every join as a labelled row. */
.entities { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entity { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 1px 0 var(--hi); }
.entity-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.entity-head h3 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; letter-spacing: -0.02em; }
.entity-head .id { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.entity-head .sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: var(--t-14); }
.joins > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: var(--t-14); }
.joins > div:first-child { border-top: 0; }
.joins dt { font-family: var(--mono); font-size: var(--t-12); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.joins dd { color: var(--fg-2); min-width: 0; line-height: 1.45; }
.joins dd ul { list-style: none; display: grid; gap: 5px; }
.joins .big { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--t-28); font-weight: 700; color: var(--fg); line-height: 1; letter-spacing: -0.02em; }
.joins .big.is-red { color: var(--red); }
.links-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.entity > .note { padding: 10px 18px 14px; border-top: 1px solid var(--line); margin-top: auto; }

/* Footer. */
.footer { padding-block: 32px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-14); }
.footer .wrap { display: grid; gap: 12px; }
.footer p { max-width: 110ch; }
.foot-line { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: var(--t-13); letter-spacing: 0.02em; color: var(--fg-2); }
.foot-line .mark-s { width: 44px; flex: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
.foot-links a { color: var(--fg-2); font-weight: 500; }
.nintendo { font-size: var(--t-13); max-width: 92ch; }

/* Wall mode (?wall=1): large type and no chrome for a monitor; the board refreshes every ten minutes. */
html.wall .bar2, html.wall .doors-nav, html.wall .footer, html.wall .skip, html.wall #desk .sec-head .lead { display: none; }
html.wall body { font-size: 1.15rem; }
html.wall .stage-row { padding-block: 18px; gap: 28px; }
html.wall .mark-stage { width: 150px; }
html.wall .lede h1 { font-size: var(--t-22); }
html.wall .asof { font-size: 0.95rem; max-width: none; }
html.wall .tile-value { font-size: clamp(2.6rem, 4.5vw, 4rem); }
html.wall .tile-label { font-size: 0.8rem; }
html.wall .tile-sub { font-size: 0.95rem; }
html.wall .row { font-size: 1.05rem; padding: 10px 16px; }
html.wall .panel-body { max-height: none; }

/* Responsive: the tiles step down at 1260; from 1180 the shell becomes a sticky lockup bar over a search-and-links row, the doors drop their questions, the reader's tables stay in the measure, the panels pair up and an odd last panel or entity takes a full row; at 900 that row stacks, the doors wrap onto as many lines as they need and stop sticking, grids collapse and the band scrolls inside its container; at 720 the doors become a two-column grid. */
@media (max-width: 1260px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  :root { --head-h: 104px; }
  .top, .top-row { display: contents; }
  .bar1 { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 31; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--row-h); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); }
  .bar2 { display: flex; align-items: center; gap: 16px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .door-q { display: none; }
  .reader-grid { grid-template-columns: 200px minmax(0, 65ch); column-gap: 36px; }
  .toc { grid-row: 1 / 4; }
  .study .scroll { width: auto; }
  .rail { grid-column: 2; grid-row: 3; position: static; margin-top: 28px; }
  .panel, .panel.c7, .panel.c5, .panel.c12 { grid-column: span 6; }
  .panel:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .panel.c12 .rows { columns: auto; }
  .entities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --row-h: 50px; --head-h: 50px; }
  .bar2 { display: grid; gap: 8px; }
  .lockup .mark-h { width: 60px; height: 32px; }
  .wordmark { font-size: var(--t-18); }
  .tagline { display: none; }
  .search { max-width: none; height: 36px; }
  .hint span { display: none; }
  .sites { margin-left: 0; flex-wrap: wrap; gap: 6px 14px; }
  .toggle { height: 30px; }
  .doors-nav { position: static; }
  .doors-row { display: block; overflow: visible; }
  .doors { flex-wrap: wrap; gap: 0 4px; }
  .door { white-space: normal; padding: 9px 12px 8px 4px; }
  .door-label { flex-wrap: wrap; gap: 4px 8px; }
  .stage-row { grid-template-columns: 1fr; gap: 26px; padding-block: 34px; }
  .mark-stage { width: min(260px, 100%); }
  .band { padding-block: 36px 44px; }
  .reader-grid { grid-template-columns: minmax(0, 65ch); column-gap: 0; }
  .study-head, .toc, .study, .rail { grid-column: 1; grid-row: auto; }
  .toc { position: static; max-height: none; overflow: visible; margin-top: 24px; }
  .meta { grid-template-columns: minmax(0, 1fr); }
  .entities { grid-template-columns: minmax(0, 1fr); }
  .joins > div { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .panel, .panel.c7, .panel.c5, .panel.c12 { grid-column: span 12; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 12px 12px 15px; }
  .tile-value { font-size: var(--t-28); }
  .sec-head { margin-bottom: 20px; }
  .doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding-block: 2px; }
  .doors > li { min-width: 0; }
  .doors > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .door { height: 100%; }
  .row { grid-template-columns: 4.8em minmax(0, 1fr); gap: 4px 10px; }
  .row:has(> .chip:first-child) { grid-template-columns: 7.6em minmax(0, 1fr); }
  .table th, .table td { padding-inline: 8px; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .table th:last-child, .table td:last-child { padding-right: 16px; }
  .row > .cell.mono:last-child:not(:nth-child(1)) { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
