:root {
  color-scheme: dark;
  --ink:#080e15; --sidebar:#0b131c; --surface:#101b26; --lift:#142230;
  --line:#25394a; --line-soft:#1c2d3c; --slate:#405565;
  --cyan:#75c8d1; --ice:#e8f0f4; --muted:#a3b6c4; --amber:#d4a45c;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--ink); color:var(--ice); font-size:16px;
}
*,*::before,*::after { box-sizing:border-box; }
body { margin:0; min-width:300px; }
a { color:var(--cyan); text-decoration:none; }
a:hover { text-decoration:underline; text-underline-offset:4px; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
h1,h2,h3,p { margin:0; }
p { line-height:1.58; }
svg { flex-shrink:0; vertical-align:middle; }
[hidden] { display:none !important; }
.skip { position:absolute; left:1rem; top:-5rem; z-index:9; padding:.7rem 1rem; background:var(--ice); color:var(--ink); }
.skip:focus { top:1rem; }
.app-frame { display:grid; grid-template-columns:228px minmax(0,1fr); min-height:100vh; }
.sidebar { display:flex; flex-direction:column; gap:0; min-width:0; padding:27px 15px 24px; height:100vh; position:sticky; top:0; border-right:1px solid var(--line-soft); background:var(--sidebar); }
.brand { display:flex; align-items:center; gap:11px; color:var(--ice); padding:0 8px; font-weight:780; font-size:1.07rem; letter-spacing:.025em; white-space:nowrap; }
.brand:hover { text-decoration:none; }
.brand small { font-size:.87rem; color:var(--muted); font-weight:540; letter-spacing:0; }
.brand-divider { color:var(--cyan); }
.nav-caption,.eyebrow,.meta-label { font:650 .72rem/1.35 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.125em; text-transform:uppercase; color:var(--muted); }
.nav-caption { margin:44px 0 13px 12px; }
nav a { display:flex; align-items:center; gap:10px; position:relative; color:var(--muted); border:1px solid transparent; padding:11px 10px; border-radius:8px; margin:3px 0; font-weight:590; font-size:.875rem; }
nav a:hover { background:var(--surface); text-decoration:none; color:var(--ice); }
nav a[aria-current] { border-color:#2a4c59; background:#142a35; color:var(--ice); }
nav a[aria-current]::before { content:""; position:absolute; inset:7px auto 7px -1px; width:3px; background:var(--cyan); border-radius:0 5px 5px 0; }
nav a[aria-current] svg { color:var(--cyan); }
.side-footer { margin-top:auto; padding:0 9px; color:var(--muted); }
.workspace { min-width:0; }
.topbar { min-height:64px; padding:0 35px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line-soft); }
.breadcrumbs { font-size:.82rem; color:var(--muted); }
.breadcrumbs span { color:var(--cyan); margin:0 .4rem; }
.top-actions,.private-label,.tag-wrap { display:flex; align-items:center; gap:10px; }
.private-label,.version { font-size:.75rem; font-weight:620; color:var(--muted); white-space:nowrap; }
.version { font-family:ui-monospace,monospace; border:1px solid var(--line); border-radius:5px; padding:4px 7px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--cyan); flex-shrink:0; }
main { max-width:1520px; min-height:calc(100vh - 118px); margin:auto; padding:33px 35px 30px; outline:none; }
.page-footer { max-width:1520px; margin:auto; padding:0 35px 20px; display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:.75rem; }
.page-footer span { font-family:ui-monospace,monospace; letter-spacing:.1em; }
.intro { display:flex; gap:20px; align-items:flex-end; justify-content:space-between; margin-bottom:21px; padding:5px 0 3px; }
.intro .eyebrow { color:var(--cyan); }
h1 { font-size:clamp(2.1rem,4vw,3.25rem); line-height:1.09; letter-spacing:-.055em; margin:.3rem 0 .45rem; font-weight:735; max-width:52rem; }
.subtitle,.muted { color:var(--muted); }
.subtitle { font-size:1rem; max-width:69ch; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:8px 13px; color:var(--ice); background:#162431; border:1px solid #32495b; border-radius:7px; font-size:.86rem; font-weight:690; white-space:nowrap; }
.button:hover { text-decoration:none; background:#22384a; }
.button.primary { background:var(--cyan); border-color:var(--cyan); color:#0b1a22; }
.button.primary:hover { background:#a2e2e6; }
.button.quiet { background:transparent; }
.button.small { min-height:32px; padding:5px 9px; font-size:.81rem; }
.split { display:grid; grid-template-columns:minmax(0,1.38fr) minmax(0,1fr); gap:17px; align-items:start; }
.stack { display:grid; gap:15px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:12px; min-width:0; }
.panel-body { padding:18px; }
.panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:11px; padding:16px 18px 13px; border-bottom:1px solid var(--line-soft); }
.panel-head h2,.panel-body h2 { font-size:1.08rem; line-height:1.3; letter-spacing:-.015em; }
.panel-head p,.panel-body > p { margin-top:5px; color:var(--muted); font-size:.91rem; }
.panel-head .eyebrow { margin-bottom:5px; display:block; }
.panel-end { padding:11px 18px; border-top:1px solid var(--line-soft); display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:.8rem; }
.panel-end a { font-weight:650; }
.strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:17px; }
.strip-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.metric { padding:13px 14px 12px;  border:1px solid var(--line); border-radius:9px; min-width:0; }
.metric .meta-label { color:var(--muted); letter-spacing:.068em; }
.metric strong { display:block; font-size:1.64rem; line-height:1.25; letter-spacing:-.06em; font-variant-numeric:tabular-nums; margin:3px 0; font-weight:720; }
.metric small { color:var(--muted); font-size:.78rem; }
.metric.amber strong { color:var(--amber); }
.case-hero { padding:17px 18px 14px; position:relative; isolation:isolate;  }
.record-id { font:600 .75rem/1.4 ui-monospace,monospace; color:var(--cyan); letter-spacing:.08em; }
.case-hero h3 { margin:6px 0 2px; font-size:1.45rem; letter-spacing:-.035em; }
.case-hero p { color:var(--muted); font-size:.87rem; }
.case-hero .tag-wrap { flex-wrap:wrap; margin-bottom:5px; }
.pill { display:inline-flex; align-items:center; gap:6px; border:1px solid #344a5c; background:#162532; color:#c4d4df; border-radius:99px; padding:3px 8px; font-size:.73rem; line-height:1.3; font-weight:640; white-space:nowrap; }
.pill.attention { color:#efd2a1; border-color:#735635; background:#30281e; }
.pill.server-roe { color:#b6f0cc; border-color:#3b7758; background:#163526; }
.pill.incident-alliance { color:var(--alliance-tone,#c4d4df); background:color-mix(in srgb,var(--alliance-tone,#8394a2) 16%,#101a25); border-color:color-mix(in srgb,var(--alliance-tone,#8394a2) 48%,#101a25); }
.incident-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.pill.orca-baseline { color:#071c2b; border-color:#8dddff; background:#68caff; }
.pill .dot,.legend-dot { width:8px; height:8px; border-radius:50%; background:var(--marker,var(--cyan)); flex-shrink:0; }
.stage-wrap { padding:13px 18px 15px; }
.stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin-bottom:13px; }
.stage { position:relative; text-align:left; min-height:37px; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#0d1822; color:var(--muted); font-size:.78rem; font-weight:650; }
.stage[aria-pressed="true"] { color:var(--ice); border-color:#447682; background:#1b3642; }
.stage:hover { color:var(--ice); border-color:var(--slate); }
.stage-copy { min-height:97px; background:#0d1822; border-left:3px solid var(--amber); border-radius:0 6px 6px 0; padding:11px 13px; overflow-wrap:anywhere; }
.stage-copy strong { display:block; margin-bottom:3px; font-size:.94rem; }
.stage-copy p { font-size:.88rem; color:var(--muted); white-space:pre-wrap; }
.stage-copy .text-link { display:inline-block; margin-top:7px; font-size:.84rem; }
.coverage-list { display:grid; gap:8px; margin-top:12px; }
.coverage-item,.list-row { min-width:0; display:flex; gap:11px; align-items:center; justify-content:space-between; padding:10px 11px; border:1px solid var(--line-soft); border-radius:7px; background:#0d1720; }
.coverage-item { color:var(--ice); font-size:.85rem; }
.coverage-item:hover { background:#172632; text-decoration:none; }
.coverage-item > span:first-child { display:flex; align-items:center; gap:8px; }
.coverage-item svg { color:var(--cyan); }
.coverage-item small { color:var(--muted); text-align:right; font-size:.76rem; }
.chart-shell { position:relative; width:100%; aspect-ratio:2 / 1; min-height:166px; overflow:hidden; background-color:#09151e;  background-size:auto,24px 24px,24px 24px; }
.chart-shell::before,.chart-shell::after { content:""; position:absolute; inset:50% auto auto 50%; width:69%; aspect-ratio:2/1; transform:translate(-50%,-50%); border:1px solid #52768d38; border-radius:50%; pointer-events:none; }
.chart-shell::after { width:44%; }
.chart { position:relative; z-index:1; display:block; width:100%; height:100%; }
.bubble { cursor:pointer; }
.bubble:hover, #alliance-register a:hover { text-decoration:none; }
#alliance-register a:hover { color:var(--ice); }
.bubble .area { fill:#758c9d; fill-opacity:.24; stroke:#839bad; stroke-width:.7; vector-effect:non-scaling-stroke; }
.bubble:not(.home):is(:hover,:focus-visible,.status-match) .area { fill:var(--bubble-tone); stroke:var(--bubble-tone); fill-opacity:.24; stroke-width:1.7; }
.bubble.home .area { fill:var(--bubble-tone); fill-opacity:.82; stroke:#668193; stroke-width:1.25; }
.bubble:focus-visible { outline:none; }
.bubble.home:focus-visible .area { stroke:var(--ice); stroke-width:2; }
.bubble text { fill:var(--ice); text-anchor:middle; dominant-baseline:central; pointer-events:none; font-weight:650; font-family:ui-monospace,monospace; }
.chart-empty { position:absolute; inset:0; display:grid; place-content:center; text-align:center; color:var(--muted); padding:25px; }
.legend { display:flex; flex-wrap:wrap; gap:7px 10px; padding:10px 12px; border-top:1px solid var(--line-soft); }
.legend-chip { display:inline-flex; align-items:center; gap:5px; color:var(--muted); background:none; padding:3px 4px; border:1px solid transparent; border-radius:5px; font-size:.73rem; }
.legend-icon { width:15px; height:15px; flex-shrink:0; }
.legend-chip:hover,.legend-chip[aria-pressed="true"] { color:var(--ice); border-color:var(--line); background:#182938; }
.chart-note { color:var(--muted); padding:0 15px 11px; font-size:.75rem; }
.preview { padding:11px 15px; border-top:1px solid var(--line-soft); display:flex; justify-content:space-between; gap:10px; align-items:center; }
.preview p { font-size:.8rem; color:var(--muted); }
.preview strong { font-size:.96rem; }
.filters { display:flex; gap:9px; align-items:end; flex-wrap:wrap; padding:13px 15px; border-bottom:1px solid var(--line-soft); }
.field { display:grid; gap:5px; color:var(--muted); font-size:.82rem; font-weight:590; }
.field.grow { flex:1 1 150px; }
input:not([type=checkbox]),select,textarea { background:#0c1620; border:1px solid #395164; color:var(--ice); border-radius:6px; padding:7px 9px; width:100%; min-width:0; }
select { appearance:none; padding-right:28px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2375c8d1' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 7px center; background-size:16px; }
input[type=checkbox] { accent-color:var(--cyan); }
.check { display:flex; align-items:center; gap:6px; min-height:37px; color:var(--muted); font-size:.84rem; }
.segment { display:flex; flex-wrap:wrap; gap:5px; padding:5px; border-radius:8px; border:1px solid var(--line); background:#0b1620; width:fit-content; }
.segment button { background:none; border:1px solid transparent; border-radius:5px; color:var(--muted); padding:7px 10px; font-size:.83rem; font-weight:620; }
.segment button[aria-pressed="true"] { color:var(--ice); border-color:#345564; background:#193240; }
.list-controls { padding:14px 16px 0; }
.table-scroller { overflow:auto; }
table { border-collapse:collapse; width:100%; text-align:left; font-size:.87rem; }
th,td { padding:10px 13px; border-bottom:1px solid var(--line-soft); vertical-align:middle; }
th { color:var(--muted); font-size:.75rem; white-space:nowrap; }
td { overflow-wrap:anywhere; }
tbody tr:hover { background:#142432; }
tr:last-child td { border-bottom:0; }
.numeric { font-variant-numeric:tabular-nums; white-space:nowrap; }
.data-section { margin-top:16px; }
.data-section summary { cursor:pointer; padding:13px 16px; font-weight:650; color:var(--ice); }
.fact-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.fact { padding:9px 10px; border:1px solid var(--line-soft); border-radius:7px; overflow-wrap:anywhere; }
.fact dt { color:var(--muted); font-size:.77rem; margin:0 0 3px; }
.fact dd { font-size:1rem; font-weight:650; margin:0; }
.empty { padding:17px; color:var(--muted); line-height:1.55; }
.callout { padding:12px 14px; border-left:3px solid var(--amber); background:#211e1c; color:#e6d6bc; border-radius:0 7px 7px 0; font-size:.88rem; line-height:1.5; }
.section-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; align-items:start; }
.list-row div { min-width:0; overflow-wrap:anywhere; }
.list-row a { font-weight:650; }
.list-row p { font-size:.82rem; color:var(--muted); margin-top:2px; }
.atlas-row { border-left:3px solid var(--cyan); }
.section-note { margin-top:12px; color:var(--muted); font-size:.88rem; }
.source-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:12px; }
.source-list a { display:block; padding:10px; border:1px solid var(--line); border-radius:7px; color:var(--ice); }
.source-list small { display:block; margin-top:3px; color:var(--muted); }
dialog { color:var(--ice); width:min(760px,calc(100vw - 24px)); max-height:calc(100dvh - 30px); padding:0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
dialog::backdrop { background:#03080ddd; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; }
.form-grid .wide { grid-column:1/-1; }
textarea { resize:vertical; min-height:66px; }
.form-actions { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px; border-top:1px solid var(--line); background:var(--surface); position:sticky; bottom:0; }
.toast { display:none; position:fixed; bottom:20px; right:20px; z-index:5; padding:10px 14px; color:var(--ice); border:1px solid #4f7b86; background:#19313d; border-radius:8px; max-width:min(420px,calc(100vw - 40px)); }
.toast.visible { display:block; }
.loading { padding:24px; }
.drop-zone { display:grid; gap:7px; border:1px dashed var(--cyan); background:#0c1823; border-radius:9px; padding:14px; font-weight:700; }
.drop-zone span { color:var(--muted); font-size:.84rem; font-weight:500; }
.drop-zone.dragging { background:#214150; }
.screenshot-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr)); gap:8px; margin-top:8px; }
.screenshot-grid:empty { display:none; }
.screenshot-grid figure { margin:0; min-width:0; }
.screenshot-grid img { width:100%; height:115px; object-fit:contain; background:#0b131c; border-radius:6px; }
.screenshot-grid figcaption { overflow-wrap:anywhere; font-size:.8rem; }
.policy-form { padding-top:12px; }
.policy-form button { justify-self:start; }
.clause-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.clause-difference { background:#fff19a; color:#17202a; border-left:2px solid #ffdb3d; padding-left:7px; }
.conflict-card { border-color:#76652d; }
.conflict-card .pill { background:#ffed80; border-color:#fff2ad; color:#232119; }
.conflict-clause { background:var(--surface); min-width:0; padding:13px 14px; border-left:3px solid #ffdf46; border-radius:0 8px 8px 0; }
.conflict-clause mark { background:#fff19a; color:#17202a; padding:1px 2px; box-decoration-break:clone; }
.conflict-clause p { margin-top:5px; }
.conflict-clause a { font-size:.82rem; }
.conflict-card .panel-body > p { margin-top:12px; }
.page-footer strong { color:var(--cyan); }
.status-definitions { margin:10px 0; padding-inline-start:1.35rem; }
.status-definitions li { margin-block:10px; padding-inline-start:.1rem; }
.status-definitions p { margin:3px 0 0; }
details > summary { cursor:pointer; color:var(--cyan); }
@media (max-width:1150px) { .app-frame { grid-template-columns:190px minmax(0,1fr); } .sidebar { padding-inline:10px; } .topbar,main,.page-footer { padding-inline:22px; } }
.nav-toggle.button { display:none; }
#directory-results :is(th,td):nth-child(3) { display:none; }
@media (max-width:890px) {
  .app-frame { grid-template-columns:minmax(0,1fr); }
  .sidebar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 12px; padding:8px 14px; height:auto; position:static; border-right:0; border-bottom:1px solid var(--line-soft); }
  .nav-caption,.side-footer { display:none; }
  .brand { padding:0; }
  .brand img { width:30px; height:30px; }
  .nav-toggle.button { display:inline-grid; place-items:center; width:44px; height:44px; padding:0; }
  #navigation { display:none; grid-column:1 / -1; padding-top:6px; }
  .nav-toggle[aria-expanded="true"] ~ #navigation { display:block; }
  #navigation a { min-height:44px; }
  #directory-results :is(th,td):nth-child(3) { display:table-cell; }
  #directory-results :is(th,td):nth-child(n+4) { display:none; }
  #directory-results td { overflow-wrap:anywhere; }
  .directory-confirmation { margin-top:4px; color:var(--muted); font-size:.76rem; }
  .pill.role-confirmed { padding:1px 5px; margin-inline-end:3px; color:#b6f0cc; background:#163526; border-color:#3b7758; font-size:.67rem; }
  .topbar { min-height:44px; }
  main { padding-top:18px; }
}
@media (max-width:650px) { .split,.section-grid { grid-template-columns:1fr; } .topbar,main,.page-footer { padding-inline:14px; } .intro { align-items:flex-start; flex-wrap:wrap; gap:9px; } .strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; } .metric { padding:9px 10px; } .source-list { grid-template-columns:1fr; } .form-grid { grid-template-columns:1fr; } .panel-head,.panel-body { padding-inline:13px; } }
@media (max-width:390px) { .stages { grid-template-columns:repeat(2,minmax(0,1fr)); } .private-label { display:none; } }
@media (prefers-reduced-motion:no-preference) { .button,.bubble .area { transition:background .15s,fill-opacity .15s; } }

:root {
  --ink:#080d12; --sidebar:#0c151d; --surface:#14222d; --lift:#1a2c39;
  --jade:#78b5a0; --crimson:#d45b5b; --blue:#6498ce; --yellow:#f5da78;
  --silver:#929ba7; --copper:#d68d4b;
}
.sidebar {  }
.topbar { min-height:52px; background:#0a1219; border-bottom:1px solid var(--slate); }
.panel,.metric { border-radius:4px 11px 4px 4px; }
.panel-head {  }
.record-id { letter-spacing:.055em; overflow-wrap:anywhere; }
main[data-page="alliances"] { padding-top:19px; }
main[data-page="alliances"] > .intro { margin-bottom:11px; }
main[data-page="alliances"] > .intro h1 { font-size:clamp(1.8rem,3.2vw,2.8rem); margin:.15rem 0 .2rem; }
main[data-page="alliances"] > .strip { gap:8px; margin-bottom:10px; }
main[data-page="alliances"] > .strip .metric { padding:6px 10px; }
main[data-page="alliances"] > .strip .metric strong { margin:0; font-size:1.28rem; }
.posture-panel .panel-head { padding-block:8px; }
.posture-panel .filters { padding-block:7px; }
.posture-panel .chart-shell { border-block:1px solid var(--slate); background-color:#0b141d; }
.posture-panel .chart { border:1px solid #6498ce38;  }
.posture-panel #posture-plot { position:relative; }
.posture-panel #posture-plot::before,.posture-panel #posture-plot::after { content:""; z-index:2; position:absolute; top:8px; width:22px; height:13px; border-top:2px solid var(--cyan); pointer-events:none; }
.posture-panel #posture-plot::before { left:8px; border-left:2px solid var(--cyan); }
.posture-panel #posture-plot::after { right:8px; border-right:2px solid var(--cyan); }
.dossier-identity { display:flex; justify-content:space-between; align-items:start; gap:16px; margin-bottom:17px; padding:19px; border-left:4px solid var(--cyan);  }
.dossier-identity h1 { font-size:clamp(1.7rem,3.2vw,2.85rem); }
.dossier-identity h1 span { color:var(--cyan); }
.dossier-identity .tag-wrap { flex-wrap:wrap; }
.operation-entry,.case-step { padding:11px 12px; border:1px solid var(--line); background:#0d1822; min-width:0; overflow-wrap:anywhere; }
.operation-entry summary,.case-step summary { cursor:pointer; font-weight:650; }
.operation-entry .tag-wrap { flex-wrap:wrap; }
.operation-entry p { font-size:.88rem; }
.record-copy { white-space:pre-wrap; overflow-wrap:anywhere; }
.war-header { border-left:4px solid var(--state-tone,var(--cyan)); }
.war-active { --state-tone:var(--crimson); }
.war-ceasefire { --state-tone:var(--amber); }
.war-resolved { --state-tone:var(--jade); }
.pill:is(.war-active,.war-ceasefire,.war-resolved) { border-color:var(--state-tone); color:var(--ice); background:color-mix(in srgb,var(--state-tone) 25%,var(--ink)); }
.war-header button { margin-top:9px; }
.war-header .tag-wrap { flex-wrap:wrap; }
.button.war-delete { color:#ffc5c5; border-color:var(--crimson); }
.button.war-delete:hover { background:#3a2229; }
.operation-cases { display:grid; gap:5px; border:1px solid var(--line); }
.operation-cases label { font-size:.86rem; }
.case-workflow { display:grid; gap:5px; margin-top:8px; }
.case-step .stage-copy { min-height:unset; margin-top:7px; border-left-color:var(--blue); }
.atlas-index { display:flex; flex-wrap:wrap; gap:6px; }
.conflict-card { scroll-margin-top:14px; }
.conflict-card:focus-visible { outline:2px solid var(--yellow); outline-offset:2px; }
.strip-three .metric:last-child strong { font-size:clamp(.88rem,1.7vw,1.32rem); letter-spacing:0; overflow-wrap:anywhere; }
#directory-results td:last-child .muted { font-size:.75rem; }
#directory-results tbody td:first-child { border-left:2px solid #6498ce48; }
@media (max-width:650px) {
  .dossier-identity { flex-direction:column; padding:13px; }
  .strip-three .metric:last-child { grid-column:1 / -1; }
}
@media (prefers-reduced-motion:no-preference) {
  .bubble .area { transition:fill .18s,stroke .18s,fill-opacity .18s; }
  .dossier-identity,.conflict-card { animation:record-reveal .18s ease-out; }
  @keyframes record-reveal { from { opacity:.78; } to { opacity:1; } }
}
main[data-page="alliances"] > .posture-panel + .strip { margin-top:10px; }
.term-counts { margin-bottom:10px; }

/* A-005 proof primitives, integrated with the existing routes and controls. */
:root {
  --cyan-low:#13232C; --blue-low:#111D2C; --amber-low:#241E16;
  --jade-low:#142822; --red-low:#28191E; --divider:#30434E; --muted:#91A6B5;
}
body { background:linear-gradient(160deg,#080D12 30%,#14222D); }
p { line-height:1.5; }
.sidebar,.topbar { background:#0D1821; border-color:var(--divider); }
.topbar { min-height:46px; }
#navigation a[aria-current] { background:var(--cyan-low); border-color:transparent; }
.button,#navigation a { border-radius:4px; }
main,main[data-page="alliances"] { padding-top:8px; }
.design-rail { display:block; width:100%; height:38px; margin-bottom:10px; }
main > .intro,main[data-page="alliances"] > .intro { margin-bottom:12px; padding:0; }
main .intro .eyebrow,.dossier-identity .eyebrow {
  font:600 13px/1.5 system-ui,sans-serif; letter-spacing:2px; color:var(--cyan); margin:0 0 5px;
}
main h1,main[data-page="alliances"] > .intro h1,.dossier-identity h1 {
  font:750 clamp(30px,5.8vw,56px)/1.08 system-ui,sans-serif;
  letter-spacing:-.04em; margin:0 0 6px; text-transform:none;
}
.panel { background:var(--surface); border:0; border-radius:2px; }
.panel-head,.panel-end { background:transparent; border-color:var(--divider); }
.panel-head h2 { font-size:1.12rem; font-weight:700; line-height:1.2; }
.panel-head h2::before { content:none; }
.strip,.strip-three,main[data-page="alliances"] > .strip {
  grid-template-columns:minmax(0,148fr) minmax(0,94fr) minmax(0,82fr) minmax(0,82fr); gap:16px;
}
.strip-three { grid-template-columns:minmax(0,148fr) minmax(0,94fr) minmax(0,82fr); }
.metric { --accent:var(--cyan); --low:var(--cyan-low); --number:var(--ice); }
.metric,main[data-page="alliances"] > .strip .metric {
  display:grid; justify-items:start; align-content:start; min-width:0;
  background:var(--low); border:0; border-top:6px solid var(--accent);
  border-radius:2px; box-shadow:none; padding:14px 22px 19px;
}
.metric:nth-child(2) { --accent:var(--blue); --low:var(--blue-low); --number:var(--blue); }
.metric:nth-child(3),.metric.amber { --accent:var(--amber); --low:var(--amber-low); --number:var(--amber); }
.metric:nth-child(4),.metric.jade { --accent:var(--jade); --low:var(--jade-low); --number:var(--jade); }
.metric strong,main[data-page="alliances"] > .strip .metric strong {
  order:-1; font-size:clamp(26px,4.3vw,46px); line-height:1.12; font-weight:750;
  color:var(--number); margin:0; letter-spacing:-.035em; overflow-wrap:anywhere;
}
.metric.amber strong { color:var(--number); }
.metric .meta-label {
  color:var(--accent); font:600 13px/1.5 system-ui,sans-serif; letter-spacing:1.2px; margin-top:5px;
}
.posture-panel { background:#0D1821; }
.posture-panel .panel-head { padding-block:7px; }
.posture-panel .filters { padding-block:5px; background:var(--cyan-low); }
.posture-panel .chart-shell { background:#0B151D; border-color:var(--divider); }
.posture-panel .chart { border:0; }
.dossier-identity { background:transparent; border-bottom:1px solid var(--divider); padding:8px 0 17px; }
.dossier-reference { display:block; white-space:nowrap; }
.record-timeline { list-style:none; margin:0; padding:0 0 0 23px; border-left:1px solid #405565; }
.timeline-event { --accent:var(--state-tone,var(--blue)); position:relative; padding:0 0 22px; }
.timeline-event:last-child { padding-bottom:0; }
.timeline-event::before { content:""; position:absolute; left:-29px; top:7px; width:11px; height:11px; border-radius:50%; background:var(--accent); }
.timeline-event.incident { --accent:var(--jade); }
.timeline-date { color:var(--accent); font-size:12px; letter-spacing:1px; font-weight:600; }
.timeline-date span { margin-left:8px; color:var(--muted); }
.timeline-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; }
.timeline-heading > :is(a,strong) { color:var(--ice); font-size:17px; font-weight:700; overflow-wrap:anywhere; }
.timeline-event.timeline-neutral { --accent:var(--cyan); }
.timeline-detail .timeline-source { font-size:.78rem; }
.operation-entry details > .record-timeline { margin-top:10px; }
.timeline-detail p { margin:2px 0; color:var(--muted); font-size:15px; overflow-wrap:anywhere; }
.case-hero { background:var(--cyan-low); border-bottom:1px solid var(--divider); }
.case-step,.operation-entry { background:#0D1821; border:0; border-bottom:1px solid var(--divider); }
.war-active { --state-tone:var(--crimson); --state-low:var(--red-low); }
.war-ceasefire { --state-tone:var(--amber); --state-low:var(--amber-low); }
.war-resolved { --state-tone:var(--jade); --state-low:var(--jade-low); }
.war-header {
  background:var(--state-low,var(--cyan-low)); border:0;
  border-top:5px solid var(--state-tone,var(--cyan)); border-radius:2px;
}
.pill:is(.war-active,.war-ceasefire,.war-resolved) { border:0; color:var(--state-tone); background:var(--state-low); }
.atlas-index { border-left:4px solid var(--yellow); padding-left:8px; }
.conflict-card { background:#0D1821; }
.conflict-clause,.table-scroller thead th { background:var(--cyan-low); }
.table-scroller thead th { border-bottom:1px solid var(--divider); }
#directory-results tbody tr:nth-child(even) { background:#111D2C; }
@media (max-width:650px) {
  .design-rail { height:23px; margin-bottom:10px; }
  main .intro .eyebrow,.dossier-identity .eyebrow { font-size:11px; }
  .strip,.strip-three,main[data-page="alliances"] > .strip { grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:8px; }
  main[data-page="alliances"] > .strip .metric:first-child { grid-column:1/-1; }
  .metric,main[data-page="alliances"] > .strip .metric { padding:12px 10px; border-top-width:4px; }
  .metric strong,main[data-page="alliances"] > .strip .metric strong { font-size:32px; }
  .metric .meta-label { font-size:11px; letter-spacing:.7px; }
  .posture-panel .filters { gap:6px; }
}
@media (min-width:891px) {
  main[data-page="alliances"] > .design-rail { margin-bottom:4px; }
  main[data-page="alliances"] > .intro { margin-bottom:7px; }
}
.dossier-identity > div { flex:1; min-width:0; }
.dossier-metrics {
  display:grid; grid-template-columns:minmax(0,148fr) minmax(0,82fr) minmax(0,94fr);
  gap:12px; max-width:580px; margin:12px 0;
}
.dossier-metrics .metric { padding:10px 14px 12px; }
.dossier-metrics .metric strong { font-size:clamp(26px,3vw,40px); overflow-wrap:normal; }
@media (max-width:650px) {
  .design-rail path { stroke-width:6px; }
  .dossier-identity > div { width:100%; }
  .dossier-metrics { gap:6px; }
  .dossier-metrics .metric { padding:8px 6px 9px; }
  .dossier-metrics .metric strong { font-size:clamp(22px,7vw,30px); }
  #alliance-register th:first-child,#alliance-register td:first-child,
  #alliance-register th:last-child,#alliance-register td:last-child { display:none; }
  #alliance-register table { width:100%; table-layout:fixed; }
  #alliance-register th:nth-child(2) { width:50%; }
  #alliance-register th:nth-child(3) { width:29%; }
  #alliance-register th,#alliance-register td { padding:8px 5px; font-size:.78rem; overflow-wrap:normal; }
  #alliance-register th:first-of-type + th,#alliance-register td:first-of-type + td { padding-left:9px; }
  #alliance-register th:nth-child(4),#alliance-register td:nth-child(4) { text-align:right; padding-right:9px; }
  #alliance-register td .pill { padding:3px 5px; font-size:.68rem; white-space:normal; }
}
.case-timeline .timeline-event { padding-bottom:16px; }
.case-timeline summary { color:var(--ice); cursor:pointer; font-size:1.08rem; font-weight:700; }
.case-timeline .timeline-detail { padding-block:8px 4px; }
.case-timeline .timeline-detail > .button { margin:8px 4px 0 0; }
.case-timeline .timeline-event > .button { margin-top:6px; }
.case-tone-cyan { --accent:var(--cyan); }
.case-tone-blue { --accent:var(--blue); }
.case-tone-jade { --accent:var(--jade); }
.current-step-label { margin-left:7px; color:var(--accent); font-size:.7rem; font-weight:650; }
.current-step::before { outline:1px solid var(--accent); outline-offset:3px; }
@media (prefers-reduced-motion:no-preference) {
  .current-step::before { animation:case-step-pulse 2.4s ease-in-out infinite; }
  @keyframes case-step-pulse { 50% { outline-offset:6px; } }
}
.case-rule-list { display:grid; gap:8px; margin:8px 0; }
.case-rule-list details { border-left:4px solid var(--blue); padding:8px 10px; background:var(--blue-low); }
.case-rule-list summary { font-size:.88rem; }
#screenshot-drop { cursor:pointer; }
#screenshot-drop input { cursor:pointer; }
.screenshot-review { border-left:4px solid var(--blue); background:var(--blue-low); padding:12px; margin-top:10px; }
.screenshot-review .tag-wrap { flex-wrap:wrap; margin-top:8px; }
.screenshot-review [data-confirmation] { color:var(--jade); font-size:.8rem; }
.screenshot-review p { margin-top:6px; overflow-wrap:anywhere; }
#incident-form .form-grid { align-items:start; }
#incident-form .field { align-content:start; }
.deleted-cases { margin-top:16px; }
.deleted-cases summary { cursor:pointer; color:var(--muted); margin-bottom:8px; }
.roster-field { position:relative; min-width:0; }
.roster-options { position:absolute; inset:calc(100% - 1.15rem) 0 auto; z-index:4; max-height:13rem; overflow:auto; background:var(--blue-low); border:1px solid var(--slate); border-radius:3px; overscroll-behavior:contain; }
.roster-options [role=option] { padding:7px 10px; color:var(--ice); cursor:pointer; overflow-wrap:anywhere; }
.roster-options [role=option]:is(:hover,[aria-selected=true]) { background:var(--cyan-low); color:var(--cyan); }
.archive-overview .tag-wrap { flex-wrap:wrap; }
.archive-field .record-copy { margin:3px 0 0; color:var(--muted); }
.workspace-actions { flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.workspace-case { align-items:center; }
.workspace-case .tag-wrap { flex-wrap:wrap; gap:5px; margin-top:5px; }
@media(max-width:520px) {
  #case-heading + .workspace-actions,.workspace-actions { justify-content:flex-start; }
  .panel-head:has(.workspace-actions) { flex-wrap:wrap; }
}
.marker-edit { display:grid; gap:8px; justify-items:start; margin:14px 0; }
.marker-edit .field { width:100%; max-width:26rem; }
.marker-edit .muted { font-size:.8rem; }
.source-list .internal-source { padding:10px 12px; color:var(--ice); background:var(--blue-low); }
.source-list .internal-source small { display:block; color:var(--muted); margin-top:4px; }
