[hidden] { display: none !important; }

:root {
  color-scheme: dark;
  --ink: #11110f;
  --ink-raised: #171612;
  --ink-deep: #0b0b0a;
  --paper: #1c1a16;
  --paper-alt: #211e19;
  --rule: #494239;
  --rule-soft: #302c26;
  --ivory: #e7dfd0;
  --ivory-dim: #b8ad9d;
  --muted: #8c8377;
  --copper: #bd855c;
  --copper-bright: #dda574;
  --copper-dark: #6e4933;
  --red: #c7655e;
  --amber: #d2a65f;
  --green: #79a879;
  --focus: #f1c58e;
  --mono: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ivory);
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(189, 133, 92, .035) 50%, transparent calc(50% + 1px)),
    linear-gradient(180deg, #171612 0, #11110f 31rem, #0f0f0d 100%);
  font: 14px/1.5 var(--sans);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: .16;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, #716657 32px);
}
::selection { color: var(--ink-deep); background: var(--copper-bright); }

button, input, select, textarea { color: inherit; font: inherit; }
button, input, select, textarea {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: #12110f;
}
button, select, input { min-height: 40px; padding: .6rem .72rem; }
textarea { min-height: 88px; padding: .7rem; resize: vertical; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:hover:not(:disabled), select:hover, input:hover, textarea:hover { border-color: var(--copper); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible, .region-map:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a { color: var(--copper-bright); text-underline-offset: .18em; }
a:hover { color: #f0c28f; }

.suite-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(12rem, 28rem);
  align-items: center;
  column-gap: clamp(.9rem, 2vw, 1.6rem);
  min-height: 60px;
  padding: .62rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--rule);
  background: rgba(17, 17, 15, .97);
}
.suite-brand {
  color: var(--ivory);
  font: 800 .72rem/1 var(--mono);
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
}
.suite-brand span { color: var(--copper-bright); }
.suite-nav { display: flex; min-width: 0; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: thin; }
.suite-nav a {
  flex: none;
  padding: .52rem .7rem;
  border-left: 1px solid var(--rule-soft);
  color: var(--muted);
  font: 700 .66rem/1 var(--mono);
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
}
.suite-nav a:last-child { border-right: 1px solid var(--rule-soft); }
.suite-nav a[aria-current="page"] { color: var(--ivory); background: var(--paper-alt); box-shadow: inset 0 -2px var(--copper); }
.suite-nav a:hover { color: var(--ivory); background: #1b1915; }
.suite-status {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ivory-dim);
  font: .68rem/1.3 var(--mono);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main { width: min(1540px, calc(100% - clamp(2rem, 6vw, 6rem))); margin: 0 auto; padding: clamp(1.3rem, 3vw, 2.8rem) 0 4rem; }
.map-main { width: min(1760px, calc(100% - clamp(1.5rem, 4vw, 4rem))); }
.route-heading {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(520px, 1.28fr);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding: 1rem 0 1.3rem;
  border-bottom: 1px solid var(--rule);
}
.route-title { align-self: center; }
.route-heading h1 {
  max-width: 850px;
  margin: .25rem 0 .55rem;
  color: var(--ivory);
  font-size: clamp(2rem, 4vw, 4.3rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
}
.eyebrow { margin: 0; color: var(--copper-bright); font: 800 .64rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.hero-copy { max-width: 720px; margin: 0; color: var(--ivory-dim); font-size: clamp(.9rem, 1.25vw, 1.02rem); }
.boundary-note {
  margin: 0;
  padding: .72rem 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--muted);
  font: .69rem/1.45 var(--mono);
}
.boundary-note strong { color: var(--amber); font-weight: 700; text-transform: uppercase; }

.query-card, .panel { border: 1px solid var(--rule); border-radius: 0; background: rgba(28, 26, 22, .96); box-shadow: none; }
.query-card { padding: .82rem; box-shadow: inset 3px 0 var(--copper-dark); }
.query-grid { display: grid; grid-template-columns: minmax(120px, .55fr) minmax(220px, 1.45fr) minmax(110px, .6fr) auto; align-items: end; gap: .55rem; }
.query-grid > button { align-self: end; }
label { display: grid; gap: .28rem; color: var(--ivory-dim); font: 700 .66rem/1.35 var(--mono); letter-spacing: .025em; text-transform: uppercase; }
.primary { border-color: var(--copper); color: #17110c; background: var(--copper-bright); font-weight: 850; }
.primary:hover:not(:disabled) { border-color: #f1c69a; background: #e6b080; }
.secondary { background: #28231d; }
.danger { border-color: #74433f; color: #e58b83; background: #251514; }
.hint, .muted { color: var(--muted); }
.hint { margin: .7rem 0 0; font: .68rem/1.5 var(--mono); }

.autocomplete-field { position: relative; }
.autocomplete-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid var(--copper);
  background: #15130f;
  box-shadow: 8px 10px 0 rgba(0, 0, 0, .34);
}
.autocomplete-option { display: grid; width: 100%; gap: .1rem; padding: .68rem .75rem; border: 0; border-bottom: 1px solid var(--rule-soft); text-align: left; background: transparent; }
.autocomplete-option:last-child { border-bottom: 0; }
.autocomplete-option small { color: var(--muted); font-family: var(--mono); }
.autocomplete-option.active, .autocomplete-option:hover { color: var(--ivory); background: #2a2119; box-shadow: inset 3px 0 var(--copper); }

.section-head, .panel-title-row, .watch-head, .map-toolbar { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.section-head { margin: 1.8rem 0 .65rem; }
.section-head h2, .panel h2, .panel h3 { margin: .15rem 0; line-height: 1.18; }
.section-head p:last-child { max-width: 680px; margin: 0; color: var(--muted); }
.file-header { padding-bottom: .65rem; border-bottom: 2px solid var(--copper-dark); }
.file-header h2 { font-size: clamp(1.35rem, 2.4vw, 2.2rem); font-weight: 580; }
.panel { min-width: 0; padding: 1rem; }
.ledger-section { position: relative; background: linear-gradient(180deg, rgba(31, 29, 24, .98), rgba(24, 23, 19, .98)); }
.ledger-section::before { position: absolute; top: 0; left: 0; width: 2.7rem; height: 2px; content: ""; background: var(--copper); }
.panel-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--rule); }
.panel-grid > .panel { border: 0; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.toolbar, .chips, .inline-actions, .dialog-actions, .map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.button-link, .inline-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: .48rem .65rem;
  border: 1px solid var(--rule);
  color: var(--ivory-dim);
  font: 700 .67rem/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
}
.button-link:hover, .inline-actions a:hover { border-color: var(--copper); color: var(--ivory); }
.coverage-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: .75rem 0 1px; border: 1px solid var(--rule); border-bottom: 0; }
.chip { min-width: 0; padding: .54rem .7rem; border-right: 1px solid var(--rule); color: var(--ivory-dim); background: #191713; font: .66rem/1.3 var(--mono); }
.chip:last-child { border-right: 0; }
.empty, .empty-panel { color: var(--muted); }
.empty { margin: .7rem 0; font-family: var(--mono); font-size: .72rem; }
.empty-panel { margin-top: 1.2rem; text-align: center; }
.caveat-panel { color: #cfb98f; background: #242017; }
.caveat-panel ul { margin: .65rem 0 0; padding-left: 1.2rem; }
.caveat-panel li + li { margin-top: .35rem; }
.loading-sheen { opacity: .62; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { display: block; margin: 2rem; padding: 1rem; border: 1px solid var(--amber); }

/* Group evidence file */
.dossier-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: .55rem -1rem -1rem; }
.stat { min-height: 78px; padding: .75rem 1rem; border-top: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft); }
.stat:nth-child(even) { border-right: 0; }
.stat small, .stat strong { display: block; }
.stat small { color: var(--muted); font: .61rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.stat strong { margin-top: .3rem; color: var(--ivory); font-size: 1.06rem; font-weight: 620; font-variant-numeric: tabular-nums; }
.entity-list { margin: .65rem -1rem -1rem; }
.entity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 58px; padding: .6rem 1rem; border-top: 1px solid var(--rule-soft); }
.entity-row > div { min-width: 0; }
.entity-row strong, .entity-row a, .entity-row small { display: block; overflow-wrap: anywhere; }
.entity-row small { margin-top: .1rem; color: var(--muted); font: .65rem/1.35 var(--mono); }
.entity-row > span { color: var(--ivory-dim); font: .69rem/1.35 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

.heat-section { overflow: hidden; }
.heatmap-scroll { margin: .7rem -1rem 0; padding: .65rem 1rem .8rem; overflow-x: auto; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); scrollbar-color: var(--copper-dark) var(--ink-deep); }
.heatmap { display: grid; min-width: 760px; gap: 2px; }
.heat-row { display: grid; grid-template-columns: 3.2rem repeat(24, minmax(24px, 1fr)); gap: 2px; }
.heat-corner, .heat-hour, .heat-day { display: grid; min-height: 22px; align-items: center; color: var(--muted); font: .58rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.heat-hour { justify-content: center; }
.heat-day { justify-content: end; padding-right: .4rem; color: var(--ivory-dim); font-weight: 700; }
.heat-cell { min-width: 24px; height: 28px; padding: 0; border: 1px solid #322d26; background: #171612; }
.heat-cell[data-band="1"] { background: #3f3024; }
.heat-cell[data-band="2"] { background: #65432e; }
.heat-cell[data-band="3"] { background: #8c593a; }
.heat-cell[data-band="4"] { background: #b57449; }
.heat-cell[data-band="5"] { background: #db9b68; }
.heat-cell:hover, .heat-cell[aria-selected="true"] { border-color: var(--ivory); box-shadow: inset 0 0 0 1px #171612; }
.heat-cell:focus-visible { position: relative; z-index: 2; outline-offset: 1px; }
.heat-legend { display: grid; grid-template-columns: auto minmax(120px, 260px) auto; align-items: center; gap: .6rem; margin-top: .6rem; color: var(--muted); font: .62rem/1 var(--mono); text-transform: uppercase; }
.heat-ramp { height: 8px; border: 1px solid var(--rule); background: linear-gradient(90deg, #171612, #3f3024, #65432e, #8c593a, #b57449, #db9b68); }
.heat-focus { display: block; min-height: 2.2rem; margin: .65rem 0 0; padding: .5rem .6rem; border-left: 2px solid var(--copper); color: var(--ivory-dim); background: #15130f; font: .65rem/1.4 var(--mono); }

.dossier-evidence-list { display: grid; grid-template-columns: 1fr; margin: .65rem -1rem -1rem; }
.evidence-card { min-width: 0; padding: .8rem 1rem; border-top: 1px solid var(--rule); border-left: 3px solid var(--green); background: #191713; }
.evidence-card.evidence-loss { border-left-color: var(--red); }
.evidence-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; }
.evidence-head > div { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.evidence-link { overflow: hidden; font: 750 .74rem/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.evidence-role { flex: none; min-width: 3.8rem; padding: .18rem .38rem; border-left: 3px solid currentColor; color: var(--green); font: 800 .6rem/1 var(--mono); letter-spacing: .08em; text-align: center; }
.evidence-role.loss { color: var(--red); }
.evidence-head > strong { font: 700 .73rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.evidence-action { margin: .55rem 0 .3rem; color: var(--ivory); font-weight: 620; overflow-wrap: anywhere; }
.evidence-final { margin: .25rem 0; color: var(--ivory-dim); font: .68rem/1.4 var(--mono); }
.evidence-detail { display: flex; flex-wrap: wrap; gap: 0; margin-top: .45rem; }
.evidence-detail .chip { padding: .25rem .4rem; border: 1px solid var(--rule-soft); }
.evidence-actors { margin-top: .55rem; border-top: 1px solid var(--rule-soft); padding-top: .45rem; }
.evidence-actors summary { color: var(--copper-bright); cursor: pointer; font: 700 .66rem/1.3 var(--mono); }
.actor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: .5rem; background: var(--rule-soft); }
.actor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; padding: .48rem .55rem; background: #141310; }
.actor-row strong, .actor-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.actor-row small { color: var(--muted); font-family: var(--mono); font-size: .62rem; }

/* Watch operations register */
.action-register { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.watch-layout { display: grid; grid-template-columns: minmax(255px, 320px) minmax(0, 1fr); align-items: start; gap: 1px; margin-top: 1.1rem; padding: 1px; background: var(--rule); }
.watch-layout > .panel { width: 100%; border: 0; }
.watch-sidebar { position: sticky; top: 76px; }
.watch-head { align-items: flex-start; padding-bottom: .75rem; }
.counter-mark { display: grid; min-width: 2.4rem; min-height: 2.4rem; place-items: center; border: 1px solid var(--copper); color: var(--copper-bright); font: 800 .75rem/1 var(--mono); }
.register-columns, .member-columns, .scan-columns { display: grid; gap: .7rem; padding: .35rem .55rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--muted); font: .58rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.register-columns { grid-template-columns: 1fr; }
.register-columns span:last-child { display: none; }
.set-list { margin: 0 -1rem -1rem; }
.set-card { display: grid; width: 100%; grid-template-columns: 1fr; gap: .18rem; min-height: 56px; padding: .65rem 1rem; border: 0; border-bottom: 1px solid var(--rule-soft); text-align: left; background: transparent; }
.set-card strong { overflow-wrap: anywhere; font-size: .82rem; }
.set-card small { color: var(--muted); font: .62rem/1.35 var(--mono); }
.set-card.active { color: var(--ivory); background: #2d241c; box-shadow: inset 3px 0 var(--copper); }
.set-card:hover { background: #25211a; }
.form-row { display: flex; align-items: flex-start; gap: .8rem; padding-top: .2rem; }
.form-row > label { flex: 1; }
.register-fields > label:last-child { flex: 1.4; }
.compact { margin-top: 1.25rem; }
.editor-grid { display: grid; grid-template-columns: minmax(110px, .4fr) minmax(220px, 1fr) auto; align-items: end; gap: .55rem; padding: .7rem 0; }
.member-columns { grid-template-columns: minmax(180px, 1fr) minmax(140px, .5fr) auto; }
.member-list { border-bottom: 1px solid var(--rule); }
.member-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 55px; padding: .52rem .55rem; border-bottom: 1px solid var(--rule-soft); }
.member-row:last-child { border-bottom: 0; }
.member-row > div:first-child { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .5fr); gap: .7rem; }
.member-row strong { overflow-wrap: anywhere; }
.member-row small { color: var(--muted); font: .64rem/1.4 var(--mono); }
.member-row .inline-actions { justify-content: flex-end; }
.member-row .inline-actions a, .member-row .inline-actions button { min-height: 32px; padding: .4rem .5rem; font-size: .62rem; }
.editor-actions { justify-content: flex-end; margin-top: .85rem; }
.scan-ledger { margin-top: 1.5rem; }
.scan-columns { grid-template-columns: minmax(200px, .6fr) minmax(260px, 1fr) auto; }
.scan-results { border: 1px solid var(--rule); border-top: 0; }
.scan-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 58px; padding: .6rem .75rem; border-bottom: 1px solid var(--rule-soft); background: #181713; }
.scan-card:last-child { border-bottom: 0; }
.scan-card > div:first-child { min-width: 0; }
.scan-card strong, .scan-card small { display: block; }
.scan-card small { margin-top: .12rem; color: var(--muted); font: .64rem/1.4 var(--mono); }
.dialog { width: min(520px, calc(100% - 2rem)); padding: 0; border: 1px solid var(--copper); border-radius: 0; color: var(--ivory); background: var(--paper); }
.dialog::backdrop { background: rgba(4, 4, 3, .78); }
.dialog-body { padding: 1rem; }
.dialog-actions { justify-content: flex-end; }

/* Regional plotting table */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 300px); align-items: start; gap: 1px; padding: 1px; background: var(--rule); }
.map-layout > .panel, .instrument-rail > .panel { border: 0; }
.map-panel { padding-bottom: .75rem; }
.map-toolbar { padding-bottom: .7rem; border-bottom: 1px solid var(--rule); }
.map-controls { flex-wrap: nowrap; }
.map-controls button { min-width: 38px; min-height: 34px; padding: .35rem .55rem; }
.map-controls output { min-width: 3.4rem; color: var(--ivory-dim); font: .66rem/1 var(--mono); text-align: center; }
.map-stage { position: relative; min-height: clamp(480px, 62vh, 780px); margin: 0 -1rem; overflow: hidden; border-bottom: 1px solid var(--rule); background-color: #0c0c0a; background-image: linear-gradient(var(--rule-soft) 1px, transparent 1px), linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px); background-size: 40px 40px; }
.region-map { display: block; width: 100%; height: clamp(480px, 62vh, 780px); cursor: grab; touch-action: none; }
.region-map.dragging { cursor: grabbing; }
.map-empty { position: absolute; inset: 50% auto auto 50%; width: min(28rem, calc(100% - 3rem)); margin: 0; padding: .8rem; transform: translate(-50%, -50%); border: 1px solid var(--rule); color: var(--muted); background: rgba(17, 17, 15, .93); font: .7rem/1.4 var(--mono); text-align: center; }
.map-edge { stroke: #51493f; stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.map-system { cursor: pointer; vector-effect: non-scaling-stroke; transition: stroke-width 100ms linear, opacity 100ms linear; }
.map-system:hover, .map-system:focus { stroke: var(--ivory) !important; stroke-width: 3.5; outline: none; }
.map-system.selected { stroke: var(--focus) !important; stroke-width: 4; }
.map-label { pointer-events: none; fill: #cfc4b3; font: 600 11px/1 var(--mono); paint-order: stroke; stroke: #0c0c0a; stroke-width: 3px; }
.map-instructions { margin: .65rem 0 0; color: var(--muted); font: .63rem/1.45 var(--mono); }
.instrument-rail { display: grid; align-content: start; gap: 1px; background: var(--rule); }
.instrument-rail .panel { padding: .9rem; }
.map-detail dl { display: grid; grid-template-columns: 1fr auto; margin: .7rem 0; border-top: 1px solid var(--rule-soft); }
.map-detail dt, .map-detail dd { margin: 0; padding: .42rem 0; border-bottom: 1px solid var(--rule-soft); }
.map-detail dt { color: var(--muted); font: .63rem/1.35 var(--mono); text-transform: uppercase; }
.map-detail dd { color: var(--ivory); font: .68rem/1.35 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.legend-list { display: grid; margin-top: .55rem; border-top: 1px solid var(--rule-soft); }
.legend-item { display: grid; grid-template-columns: 1rem 1fr; align-items: center; gap: .55rem; min-height: 32px; border-bottom: 1px solid var(--rule-soft); color: var(--ivory-dim); font: .64rem/1.3 var(--mono); }
.legend-swatch { width: .72rem; height: .72rem; border: 1px solid var(--rule); background: #171612; }
.legend-swatch.level-0 { background: #171612; }
.legend-swatch.level-1 { background: #4d3527; }
.legend-swatch.level-2 { background: #785039; }
.legend-swatch.level-3 { background: #a46d49; }
.legend-swatch.level-4 { background: #d39a67; }
.legend-swatch.security-high { border-color: var(--green); background: var(--green); }
.legend-swatch.security-low { border-color: var(--amber); background: var(--amber); }
.legend-swatch.security-null { border-color: var(--red); background: var(--red); }

@media (max-width: 1180px) {
  .suite-topbar { grid-template-columns: auto minmax(0, 1fr); }
  .suite-status { grid-column: 1 / -1; text-align: left; }
  .route-heading { grid-template-columns: 1fr; align-items: start; gap: 1rem; }
  .route-heading > .query-card { width: 100%; }
  .query-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 1fr; }
  .instrument-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .span-4, .span-8 { grid-column: span 12; }
  .watch-layout { grid-template-columns: 1fr; }
  .watch-sidebar { position: static; }
  .set-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule-soft); }
  .set-card { background: #191713; }
  .instrument-rail { grid-template-columns: 1fr; }
  .actor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main, .map-main { width: calc(100% - 1.5rem); }
  .suite-topbar { position: static; grid-template-columns: 1fr; }
  .suite-nav { width: 100%; }
  .suite-status { width: 100%; }
  .section-head, .panel-title-row, .watch-head, .map-toolbar { align-items: flex-start; flex-direction: column; }
  .span-6 { grid-column: span 12; }
  .form-row { display: grid; grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .member-columns, .scan-columns { display: none; }
  .member-row, .scan-card { grid-template-columns: 1fr; }
  .member-row > div:first-child { grid-template-columns: 1fr; gap: .15rem; }
  .member-row .inline-actions { justify-content: flex-start; }
  .region-map, .map-stage { min-height: 430px; height: 55vh; }
  .coverage-strip { grid-template-columns: 1fr; }
  .chip { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .chip:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
  .query-grid { grid-template-columns: 1fr; }
  .suite-brand { font-size: .66rem; }
  .route-heading h1 { font-size: 2.15rem; }
  .set-list { grid-template-columns: 1fr; }
  .dossier-summary-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .entity-row { grid-template-columns: 1fr; gap: .25rem; }
  .entity-row > span { text-align: left; }
  .action-register { align-items: flex-start; flex-direction: column; }
  .heatmap { min-width: 700px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Post-redesign visual QA: preserve ruled divisions without letting the rule
 * color become a large accidental field when adjacent columns have unequal
 * content heights. */
.watch-layout,
.map-layout {
  align-items: stretch;
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0;
}
.watch-layout > .panel,
.map-layout > .panel,
.map-layout > .instrument-rail {
  background: rgba(28, 26, 22, .96);
}
.watch-layout > .panel + .panel,
.map-layout > .instrument-rail {
  border-left: 1px solid var(--rule);
}
.watch-sidebar { top: 76px; }
.instrument-rail { background: transparent; }
.instrument-rail > .panel + .panel { border-top: 1px solid var(--rule); }

@media (max-width: 1180px) {
  .map-layout > .instrument-rail { border-top: 1px solid var(--rule); border-left: 0; }
  .instrument-rail > .panel + .panel { border-top: 0; border-left: 1px solid var(--rule); }
}
@media (max-width: 900px) {
  .watch-layout > .panel + .panel { border-top: 1px solid var(--rule); border-left: 0; }
  .instrument-rail > .panel + .panel { border-top: 1px solid var(--rule); border-left: 0; }
}
@media (max-width: 760px) {
  .suite-nav { padding-bottom: .3rem; }
  .suite-status { padding-bottom: .15rem; }
}


/* Small-screen QA: keep the full suite reachable without compressing labels. */
@media (max-width: 760px) {
  .suite-nav {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .suite-nav a { min-height: 34px; }
}
