/* No Man's Land — shared styles for section, entity and daily pages (same tokens as the board). */
:root {
  --bg: #eef1f0; --surface: #ffffff; --sunk: #e4e9e7; --ink: #142120; --muted: #586866; --faint: #8a9896; --line: #d3dad8;
  --accent: #1d4f7a; --accent-ink: #ffffff;
  --cat-oil: #a85d00; --cat-ship: #00707f; --cat-act: #b42318; --cat-mov: #3949a8; --cat-mac: #4a7212; --cat-nuc: #8a2a86;
  --cat-fin: #0f6e56; --cat-agr: #6b5a12; --cat-surv: #7a3b2e; --contested: #b7791f; --good: #4a7212; --bad: #b42318;
  --heat-0: #e4e9e7; --heat-1: #f3d9b0; --heat-2: #e9b06a; --heat-3: #d4822d; --heat-4: #a85d00;
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1413; --surface: #151f1e; --sunk: #1b2726; --ink: #e2e9e7; --muted: #9aa9a6; --faint: #6d7c79; --line: #2a3735;
    --accent: #8db4de; --accent-ink: #0e1413;
    --cat-oil: #e3a14a; --cat-ship: #4cc0cf; --cat-act: #f07a68; --cat-mov: #93a2f2; --cat-mac: #9fcb5d; --cat-nuc: #d886d4;
    --cat-fin: #4cc0a0; --cat-agr: #d8c25a; --cat-surv: #e0937f; --contested: #e0a84a; --good: #9fcb5d; --bad: #f07a68;
    --heat-0: #1b2726; --heat-1: #3b3222; --heat-2: #6b4f22; --heat-3: #a8711f; --heat-4: #e3a14a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1413; --surface: #151f1e; --sunk: #1b2726; --ink: #e2e9e7; --muted: #9aa9a6; --faint: #6d7c79; --line: #2a3735;
  --accent: #8db4de; --accent-ink: #0e1413;
  --cat-oil: #e3a14a; --cat-ship: #4cc0cf; --cat-act: #f07a68; --cat-mov: #93a2f2; --cat-mac: #9fcb5d; --cat-nuc: #d886d4;
  --cat-fin: #4cc0a0; --cat-agr: #d8c25a; --cat-surv: #e0937f; --contested: #e0a84a; --good: #9fcb5d; --bad: #f07a68;
  --heat-0: #1b2726; --heat-1: #3b3222; --heat-2: #6b4f22; --heat-3: #a8711f; --heat-4: #e3a14a; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font-body); }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 16px 16px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* masthead + navigation (shared by every page) */
.mast { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); text-decoration: none; line-height: 1; }
.nml-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.nml-nav a { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 3px; }
.nml-nav a:hover { color: var(--ink); background: var(--sunk); }
.nml-nav a[aria-current="page"] { color: var(--bg); background: var(--ink); }

/* section header */
.sechead { display: grid; gap: 4px; }
.sechead h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 44px); line-height: 1; text-transform: uppercase; }
.sechead p { margin: 0; color: var(--muted); max-width: 75ch; font-size: 15px; }
.subnav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.subnav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.subnav a:hover { border-bottom-color: var(--ink); }

/* filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; position: sticky; top: 0; z-index: 5; }
.filters label { display: flex; gap: 6px; align-items: center; }
.filters select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); max-width: 46vw; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* view card */
.view { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px 16px; display: grid; gap: 10px; min-width: 0; scroll-margin-top: 64px; }
.view > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.view h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.view .q { color: var(--muted); font-size: 13px; }
.view .how { color: var(--muted); font-size: 12px; margin: 0; max-width: 90ch; }
.view .applies { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.empty { color: var(--muted); font-size: 13px; padding: 12px; border: 1px dashed var(--line); border-radius: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }

/* tables */
.tbl { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: 12px; color: var(--muted); white-space: nowrap; }
table.t td.n, table.t th.n { text-align: right; }
table.t tr:hover td { background: var(--sunk); }

/* chips, pills */
.conf { display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 0 7px; border: 1.5px solid var(--ink); border-radius: 3px; white-space: nowrap; }
.conf.Confirmed { background: var(--ink); color: var(--bg); }
.conf.Contested { border-color: var(--contested); color: var(--contested); }
.conf.Unverified { border-style: dashed; border-color: var(--faint); color: var(--muted); }
.cat { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--c, var(--ink)); }
.cat::before { content: ""; width: 9px; height: 9px; background: var(--c, var(--ink)); border-radius: 1px; }
[data-cat="OIL"] { --c: var(--cat-oil); } [data-cat="SHIP"] { --c: var(--cat-ship); } [data-cat="ACT"] { --c: var(--cat-act); }
[data-cat="MOV"] { --c: var(--cat-mov); } [data-cat="MAC"] { --c: var(--cat-mac); } [data-cat="NUC"] { --c: var(--cat-nuc); }
[data-cat="FIN"] { --c: var(--cat-fin); } [data-cat="AGR"] { --c: var(--cat-agr); } [data-cat="SURV"] { --c: var(--cat-surv); }
.aff { font-size: 12px; color: var(--muted); }
.aff.state, .aff.official { color: var(--cat-act); }
.aff.exile, .aff.opposition-exile, .aff.partisan, .aff.milblogger { color: var(--cat-nuc); }
.tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.up { color: var(--good); } .dn { color: var(--bad); }

/* same story, different headline */
.rash { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.rash article { border: 1px solid var(--line); border-top: 3px solid var(--side, var(--ink)); padding: 10px 12px; display: grid; gap: 6px; align-content: start; background: var(--bg); }
.rash .side { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 8px; }
.rash h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 600; }
.rash h3[lang]:not([lang="en"]) { font-weight: 500; }
.rash .meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rash .frame { font-size: 12px; border-left: 3px solid var(--line); padding-left: 8px; color: var(--ink); }

/* heat grids */
.heat { display: grid; gap: 2px; font-size: 11px; overflow-x: auto; }
.heat .row { display: grid; gap: 2px; align-items: center; }
.heat .lab { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.heat .c { height: 22px; border-radius: 2px; background: var(--heat-0); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.heat .c.blind { outline: 2px dashed var(--bad); outline-offset: -2px; }
.heat .colh { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 4px; }

/* bars */
.bars { display: grid; gap: 4px; }
.bars .b { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.bars .b > a, .bars .b > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .track { position: relative; height: 14px; background: var(--sunk); border-radius: 2px; min-width: 0; }
.bars .fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 2px; opacity: .85; }
.bars .fill.alt { background: var(--accent); opacity: .9; height: 6px; top: 4px; }
.bars .v { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* charts */
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.8; }
svg.chart .bar { fill: var(--accent); opacity: .35; }
svg.chart .mark { fill: var(--contested); stroke: var(--surface); stroke-width: 1.5; cursor: pointer; }
svg.chart .mark.Confirmed { fill: var(--ink); } svg.chart .mark.Likely { fill: var(--accent); } svg.chart .mark.Unverified { fill: var(--faint); }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.mini > div { border: 1px solid var(--line); padding: 8px 10px; display: grid; gap: 2px; background: var(--bg); }
.mini .k { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.mini .v { font-family: var(--font-mono); font-size: 16px; }
.mini .d { font-family: var(--font-mono); font-size: 11px; display: flex; gap: 8px; flex-wrap: wrap; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 8px; border-radius: 4px; max-width: 320px; }

/* today */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bl { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bl li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.cards a { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--ink); }
.cards b { font-family: var(--font-display); font-size: 18px; text-transform: uppercase; letter-spacing: .03em; }
.cards span { font-size: 13px; color: var(--muted); }
.ab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ab > div { border: 1px solid var(--line); padding: 10px; background: var(--bg); }
.ab b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; }
.dailycard img { width: 100%; height: auto; border: 1px solid var(--line); display: block; }

/* entity pages */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.kv div { border: 1px solid var(--line); background: var(--surface); padding: 8px 10px; display: grid; gap: 2px; }
.kv .k { font-size: 11px; font-family: var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kv .v { font-family: var(--font-mono); font-size: 15px; }
ul.list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.dir { columns: 3 240px; column-gap: 24px; font-size: 13px; }
.dir div { break-inside: avoid; padding: 2px 0; }
.warn { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
footer.site { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .bars .b { grid-template-columns: minmax(0, 1fr) auto; } .bars .track { grid-column: 1 / -1; grid-row: 2; }
  .ab { grid-template-columns: minmax(0, 1fr); } .bl li { grid-template-columns: minmax(0, 1fr); gap: 2px; } .bl li .conf { justify-self: start; }
}
