:root {
  --ink: #12243a;
  --muted: #5c6f84;
  --line: #d7e0e9;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --navy: #10294b;
  --blue: #1769aa;
  --cyan: #20a4b8;
  --amber: #d88916;
  --red: #a93d45;
  --land: #e8eef3;
}
* { box-sizing: border-box; }
html { color: var(--ink); background: var(--wash); font-family: Inter, "Noto Sans", "Noto Sans CJK SC", Arial, sans-serif; }
body { margin: 0; }
main { width: min(1480px, calc(100% - 28px)); margin: 18px auto 40px; background: var(--paper); box-shadow: 0 16px 48px rgba(16, 41, 75, .08); }
a { color: var(--blue); }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 7px 0 7px; font-size: clamp(27px, 4vw, 46px); line-height: 1.05; letter-spacing: -.025em; }
.subtitle { margin: 0; color: var(--muted); max-width: 850px; line-height: 1.55; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 14px; font-size: 13px; }
.nav a { text-decoration: none; white-space: nowrap; }
.statebar { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 28px; background: var(--navy); color: #fff; }
.badge { border: 1px solid rgba(255,255,255,.32); border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800; letter-spacing: .045em; }
.badge.pending { color: #ffe09b; }
.badge.failclosed { color: #ffd5d8; }
.content { padding: 24px 28px 32px; }
.boundary { border: 1px solid #ead39d; border-left: 5px solid var(--amber); background: #fffaf0; padding: 13px 15px; line-height: 1.55; margin-bottom: 18px; }
.boundary strong { color: #6f4703; }
.summary { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.metric { border: 1px solid var(--line); background: var(--wash); padding: 13px 14px; min-height: 82px; }
.metric .value { display: block; font-size: 25px; font-weight: 850; line-height: 1.1; }
.metric .label { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; text-transform: uppercase; letter-spacing: .055em; }
.fresh { color: #087e5b; }
.stale { color: var(--amber); }
.expired, .error { color: var(--red); }
.map-shell { border: 1px solid var(--line); background: #fbfdff; }
.map-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.map-head h2, .panel h2 { margin: 0; font-size: 17px; }
.map-head p { margin: 0; color: var(--muted); font-size: 12px; }
#observation-map { width: 100%; height: auto; display: block; background: #f7fafc; }
.graticule { stroke: #dbe4ec; stroke-width: .7; fill: none; }
.land { fill: var(--land); stroke: #c7d3de; stroke-width: .55; fill-rule: evenodd; }
.airport-marker { fill: #fff; stroke: var(--navy); stroke-width: 2.2; }
.aircraft-marker { fill: var(--cyan); stroke: #075565; stroke-width: .8; opacity: .9; cursor: pointer; }
.aircraft-marker.selected { fill: var(--amber); stroke: #713f00; stroke-width: 1.4; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 9px 14px 12px; color: var(--muted); font-size: 12px; }
.dot, .plane { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.dot { border: 2px solid var(--navy); background: #fff; border-radius: 50%; }
.plane { background: var(--cyan); transform: rotate(45deg); }
.selection { min-height: 45px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.selection strong { color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 18px; }
.panel { border: 1px solid var(--line); padding: 15px; }
.panel p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.window-list, .completeness { display: grid; gap: 7px; }
.window-row, .field-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid #edf1f5; padding: 7px 0; font-size: 12px; }
.field-row .bar { grid-column: 1 / -1; height: 5px; background: #e5ebf0; overflow: hidden; }
.field-row .bar span { display: block; height: 100%; background: var(--cyan); }
.controls { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.controls input { width: min(520px, 100%); border: 1px solid #aebdca; border-radius: 4px; padding: 10px 12px; font: inherit; }
.controls .count { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { text-align: left; padding: 9px 8px; background: var(--navy); color: #fff; white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid #e8edf2; vertical-align: top; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: #eef8fa; }
.not-observed { color: #8a98a6; font-style: italic; }
.runtime-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.capture-evidence { margin-top: 18px; padding: 13px 15px; background: #f5f8fb; border: 1px solid var(--line); font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); padding: 18px 28px 24px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.runtime-observation-link { margin: 16px 0; padding: 13px 15px; border: 1px solid #a8d9df; border-left: 5px solid var(--cyan); background: #f2fbfc; }
.runtime-observation-link a { font-weight: 800; }
@media (max-width: 980px) {
  .summary { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .nav { justify-content: flex-start; }
}
@media (max-width: 600px) {
  main { width: 100%; margin: 0; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}
@page { size: A4 landscape; margin: 8mm; }
@media print {
  :root { --ink: #000; --muted: #3b4650; }
  html, body { background: #fff; }
  main { width: 100%; margin: 0; box-shadow: none; }
  .topbar, .content, .footer { padding-left: 0; padding-right: 0; }
  .nav, .controls { display: none !important; }
  .statebar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .summary { grid-template-columns: repeat(6, 1fr); }
  .metric { min-height: 0; padding: 7px; }
  .metric .value { font-size: 18px; }
  .map-shell, .grid-2, .capture-evidence, tr { break-inside: avoid; }
  #observation-map { max-height: 105mm; }
  th { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  table { font-size: 8px; }
  th, td { padding: 4px; }
  .footer { position: static; }
}
