/* IFR Meter — design tokens, then components.
   Status colours never carry meaning alone: every level ships an icon and a label. */

:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #fcfcfb;
  --surface-2: #f0efeb;
  --surface-3: #e6e4de;
  --border: #dedcd5;
  --border-strong: #c9c6bd;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7a7872;
  --accent: #1c5cab;
  --accent-ink: #ffffff;
  --accent-soft: #e3edfb;
  --brand-ink: #ffffff;
  --focus: #2a78d6;

  --l0: #0ca30c;
  --l1: #2a78d6;
  --l2: #fab219;
  --l3: #ec835a;
  --l4: #d03b3b;
  --l0-soft: #e7f5e7;
  --l1-soft: #e3edfb;
  --l2-soft: #fdf1d3;
  --l3-soft: #fbe6dd;
  --l4-soft: #f8dcdc;
  --neutral-dot: #a9a69d;

  --map-land: #ebe9e3;
  --map-border: #fcfcfb;
  --shadow: 0 1px 2px rgb(20 20 15 / 5%), 0 8px 24px rgb(20 20 15 / 6%);
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110;
    --surface: #1a1a19;
    --surface-2: #232321;
    --surface-3: #2e2e2b;
    --border: #30302d;
    --border-strong: #45453f;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --text-3: #8f8e86;
    --accent: #5598e7;
    --accent-ink: #0b0b0b;
    --accent-soft: #1b2b40;
    --l1: #3987e5;
    --l0-soft: #15291a;
    --l1-soft: #1b2b40;
    --l2-soft: #3a2f12;
    --l3-soft: #3d241a;
    --l4-soft: #3f1c1c;
    --neutral-dot: #5d5c56;
    --map-land: #262624;
    --map-border: #1a1a19;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110;
  --surface: #1a1a19;
  --surface-2: #232321;
  --surface-3: #2e2e2b;
  --border: #30302d;
  --border-strong: #45453f;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #8f8e86;
  --accent: #5598e7;
  --accent-ink: #0b0b0b;
  --accent-soft: #1b2b40;
  --l1: #3987e5;
  --l0-soft: #15291a;
  --l1-soft: #1b2b40;
  --l2-soft: #3a2f12;
  --l3-soft: #3d241a;
  --l4-soft: #3f1c1c;
  --neutral-dot: #5d5c56;
  --map-land: #262624;
  --map-border: #1a1a19;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---- header ------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 680; letter-spacing: -0.01em; font-size: 17px; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a { color: var(--text-2); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 520; }
.top-nav a:hover { background: var(--surface-2); color: var(--text); }
.top-nav a[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.top-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--text-2); }
.live { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral-dot); }
.live[data-state="live"] i { background: var(--l0); box-shadow: 0 0 0 0 color-mix(in srgb, var(--l0) 60%, transparent); animation: pulse 2.4s infinite; }
.live[data-state="partial"] i { background: var(--l2); }
.live[data-state="down"] i { background: var(--l4); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--l0) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.zulu { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
.icon-button svg { width: 18px; height: 18px; }

/* ---- layout ------------------------------------------------------------- */
main { width: min(1180px, 100%); margin: 0 auto; padding: 28px 16px 56px; flex: 1; outline: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.005em; }
.card-head .muted { font-size: 13px; }
.section-title { font-size: 13px; font-weight: 640; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 28px 2px 10px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 14px; }

/* ---- hero + route form --------------------------------------------------- */
.hero { padding: 18px 2px 22px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.08; letter-spacing: -0.028em; font-weight: 700; max-width: 18ch; }
.hero p { margin-top: 12px; color: var(--text-2); font-size: clamp(16px, 1.6vw, 18px); max-width: 62ch; }

.route-form { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: end; padding: 16px; }
.route-form.single { grid-template-columns: 1fr auto; }
.route-form:not(.single) > .field:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.route-form:not(.single) > .swap { grid-column: 2; grid-row: 1; }
.route-form:not(.single) > .field:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.route-form:not(.single) > .primary { grid-column: 4; grid-row: 1; }
.field { position: relative; display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 620; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.field input {
  width: 100%; height: 54px; padding: 0 14px; letter-spacing: 0.02em; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: var(--surface); font-size: 19px; font-weight: 600;
}
.field input::placeholder { color: var(--text-3); font-weight: 450; }
.field input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field .picked { position: absolute; right: 12px; bottom: 16px; max-width: 58%; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.swap { height: 54px; width: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.swap:hover { color: var(--text); border-color: var(--border-strong); }
.swap svg { width: 20px; height: 20px; }
.primary {
  height: 54px; padding: 0 26px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 16.5px; white-space: nowrap;
}
.primary:hover { filter: brightness(1.08); }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 16px 16px; font-size: 13.5px; color: var(--text-3); }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-weight: 640; letter-spacing: 0.03em; font-size: 13px; text-decoration: none; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }

.suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; max-height: 320px; overflow-y: auto; }
.suggest button { display: grid; grid-template-columns: 58px 1fr; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; cursor: pointer; align-items: baseline; }
.suggest button[aria-selected="true"], .suggest button:hover { background: var(--accent-soft); }
.suggest .id { font-weight: 720; letter-spacing: 0.03em; }
.suggest .where { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- level badges & tiles ------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 620; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.badge svg, .lvl-icon { width: 16px; height: 16px; flex: none; }
[data-level="0"] { --lvl: var(--l0); --lvl-soft: var(--l0-soft); }
[data-level="1"] { --lvl: var(--l1); --lvl-soft: var(--l1-soft); }
[data-level="2"] { --lvl: var(--l2); --lvl-soft: var(--l2-soft); }
[data-level="3"] { --lvl: var(--l3); --lvl-soft: var(--l3-soft); }
[data-level="4"] { --lvl: var(--l4); --lvl-soft: var(--l4-soft); }
.badge[data-level] { background: var(--lvl-soft); }
.badge[data-level] svg { color: var(--lvl); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.tile { display: grid; gap: 2px; padding: 14px 16px; text-align: left; cursor: pointer; border: 1px solid var(--border); border-left: 4px solid var(--lvl); background: var(--surface); border-radius: var(--radius-sm); }
.tile:hover { border-color: var(--border-strong); border-left-color: var(--lvl); }
.tile[aria-pressed="true"] { background: var(--lvl-soft); }
.tile .n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .k { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); font-weight: 560; }
.tile .k svg { width: 15px; height: 15px; color: var(--lvl); }

/* ---- map ----------------------------------------------------------------- */
.map-wrap { padding: 6px 10px 4px; }
.map { width: 100%; height: auto; display: block; }
.map .land { fill: var(--map-land); }
.map .borders { fill: none; stroke: var(--map-border); stroke-width: 1; stroke-linejoin: round; }
.map .dot { stroke: var(--surface); stroke-width: 1.5; }
.map .dot[data-level="0"] { fill: var(--neutral-dot); stroke-width: 0; }
.map .dot.clear { fill: var(--l0); stroke: var(--surface); }
.map .dot[data-level="1"] { fill: var(--l1); }
.map .dot[data-level="2"] { fill: var(--l2); }
.map .dot[data-level="3"] { fill: var(--l3); }
.map .dot[data-level="4"] { fill: var(--l4); }
.map .halo { fill: none; stroke: var(--l4); stroke-width: 1.5; opacity: 0.55; }
.map .hit { fill: transparent; cursor: pointer; }
.map .hit:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2.5; }
.map .label { font-family: var(--font); font-weight: 700; letter-spacing: 0.02em; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.map .route-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; }
.map .route-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 18px 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 15px; height: 15px; }

/* ---- lists --------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.row:hover { background: var(--surface-2); }
.row .lvl-icon { width: 22px; height: 22px; color: var(--lvl); }
.row .id { font-weight: 720; font-size: 15.5px; letter-spacing: 0.03em; }
.row .what { min-width: 0; }
.row .what b { display: block; font-weight: 580; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .what span { display: block; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sides { display: flex; gap: 4px; font-size: 11px; font-weight: 650; color: var(--text-3); }
.row .sides em { font-style: normal; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }
.row .sides em[data-on="true"] { color: var(--text); background: var(--lvl-soft); border-color: transparent; }
.list-scroll { max-height: 534px; overflow-y: auto; }
.empty { padding: 26px 18px; color: var(--text-3); text-align: center; font-size: 14.5px; }
.filters { display: flex; gap: 6px; padding: 12px 18px 4px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-weight: 540; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }

/* ---- verdict ------------------------------------------------------------- */
.crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; }
.crumbs a { text-decoration: none; color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.route-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.route-title .ends { display: flex; align-items: center; gap: 14px; }
.route-title .end { display: grid; }
.route-title .end b { font-size: clamp(32px, 6vw, 50px); line-height: 1; font-weight: 760; letter-spacing: 0.01em; }
.route-title .end span { color: var(--text-2); font-size: 13.5px; margin-top: 5px; max-width: 28ch; }
.route-title .end a { color: inherit; text-decoration: none; }
.route-title .end a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.route-title .arrow { width: 34px; height: 34px; color: var(--text-3); flex: none; }
.route-title .tools { margin-left: auto; display: flex; gap: 8px; }
.ghost { height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 560; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.ghost:hover { background: var(--surface-2); }
.ghost svg { width: 16px; height: 16px; }

.verdict { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 22px; border-radius: var(--radius); background: var(--lvl-soft); border: 1px solid color-mix(in srgb, var(--lvl) 45%, transparent); border-left: 8px solid var(--lvl); }
.verdict .big-icon { width: 54px; height: 54px; color: var(--lvl); grid-row: span 3; }
.verdict .level-name { font-size: 12.5px; font-weight: 680; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.verdict h1 { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.verdict .advice { color: var(--text-2); font-size: 16px; margin-top: 4px; }
.asof { margin: 10px 2px 0; font-size: 13px; color: var(--text-3); }

/* ---- factors ------------------------------------------------------------- */
.factor { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 16px 18px; }
.factor + .factor { border-top: 1px solid var(--border); }
.factor .lvl-icon { width: 22px; height: 22px; color: var(--lvl); margin-top: 1px; }
.factor .lvl-icon.info { color: var(--text-3); }
.factor h3 { font-size: 16px; font-weight: 640; letter-spacing: -0.005em; }
.factor p { color: var(--text-2); font-size: 14.5px; margin-top: 3px; }
.factor .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 9px; font-size: 12.5px; color: var(--text-3); align-items: center; }
.factor .meta .when { font-family: var(--mono); color: var(--text-2); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.factor .note { margin-top: 8px; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 7px 10px; }
.factor[data-applies="false"] h3, .factor[data-applies="false"] p { color: var(--text-3); }
.side-tag { font-size: 11px; font-weight: 660; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text-3); }

/* ---- timeline ------------------------------------------------------------ */
.timeline { padding: 12px 18px 16px; }
.timeline svg { width: 100%; height: auto; display: block; overflow: visible; }
.timeline .axis { stroke: var(--border); stroke-width: 1; }
.timeline .tick { font: 11px var(--mono); fill: var(--text-3); }
.timeline .now { stroke: var(--text); stroke-width: 1.5; }
.timeline .now-label { font: 620 11px var(--font); fill: var(--text); }
.timeline .bar { rx: 4; }
.timeline .bar-label { font: 560 12.5px var(--font); fill: var(--text); }
.timeline .open-end { fill: var(--text-3); font: 11px var(--font); }

/* ---- stats, config, chart ------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); border-top: 1px solid var(--border); margin-top: 14px; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 13px 18px; display: grid; gap: 1px; }
.stat .v { font-size: 24px; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat .l { font-size: 12.5px; color: var(--text-3); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 14px 18px 16px; font-size: 14.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 540; }
.chart { padding: 6px 12px 12px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--l1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--l1); opacity: 0.1; }
.chart .tick { font: 11px var(--mono); fill: var(--text-3); }
.chart .cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .mark { fill: var(--l1); stroke: var(--surface); stroke-width: 2; }
.chart .bar-fill { fill: var(--l1); }
.chart .bar-fill.now { fill: var(--text); }
.chart .ref-line { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .ref-label { font: 600 11.5px var(--font); fill: var(--text-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.card-note { padding: 10px 18px 14px; font-size: 13.5px; color: var(--text-2); }
.ghost[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.chart .band { stroke: var(--surface); stroke-width: 1.5; stroke-linejoin: round; }
.chart-title { font-size: 14px; font-weight: 620; color: var(--text-2); }
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; padding: 6px 18px 14px; }
.trend-grid .chart { padding: 0; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.tile .d { font-size: 12px; color: var(--text-3); min-height: 17px; }
.row.waits { grid-template-columns: 26px 52px minmax(0, 1fr); }
.briefing { padding-top: 14px; font-size: 14.5px; line-height: 1.55; }
.briefing-sections { padding: 0 18px 14px; display: grid; gap: 2px; }
.briefing-sections details { border-top: 1px solid var(--border); padding: 9px 0; }
.briefing-sections summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.briefing-sections ul { margin: 8px 0 2px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--text-2); }
.alert-form { margin-top: 14px; padding: 14px 16px; }
.alert-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.alert-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 620; font-size: 15px; }
.alert-label svg { width: 20px; height: 20px; color: var(--accent); }
.alert-form input { height: 46px; padding: 0 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface); font-size: 16px; min-width: 0; }
.alert-form input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.alert-form .primary { height: 46px; padding: 0 20px; }
.alert-form .primary:disabled { opacity: 0.6; cursor: progress; }
.alert-note { margin-top: 9px; font-size: 13.5px; color: var(--text-3); }
.alert-note[data-state="ok"] { color: var(--text); font-weight: 560; }
.alert-note[data-state="error"] { color: var(--l4); font-weight: 560; }
.notice-card { max-width: 640px; margin: 24px auto; }
.notice-body { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 26px; }
.notice-body .big-icon { width: 46px; height: 46px; color: var(--lvl); }
.notice-body h1 { font-size: 24px; letter-spacing: -0.015em; }
.notice-body p { margin-top: 8px; color: var(--text-2); }
.notice-body p:last-child { margin-top: 16px; }
.body-pad { padding: 14px 18px 18px; }
.outlook { list-style: none; margin: 0; padding: 6px 18px 16px; display: grid; gap: 10px; }
.outlook li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.outlook .lvl-icon { color: var(--lvl); width: 18px; height: 18px; margin-top: 2px; }
.outlook small { display: block; color: var(--text-3); font-size: 12.5px; }

.airport-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-end; margin-bottom: 18px; }
.airport-head h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1; font-weight: 760; letter-spacing: 0.01em; }
.airport-head .name { color: var(--text-2); font-size: 16px; padding-bottom: 4px; }
.airport-head .tools { margin-left: auto; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.side-head h2 { font-size: 16px; font-weight: 650; }

.prose { max-width: 70ch; display: grid; gap: 14px; font-size: 16.5px; color: var(--text-2); }
.prose h1 { color: var(--text); font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.025em; }
.prose h2 { color: var(--text); font-size: 19px; margin-top: 14px; letter-spacing: -0.01em; }
.prose strong { color: var(--text); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.levels-table { display: grid; gap: 8px; }
.levels-table div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; font-size: 15px; }

.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--text); color: var(--surface); padding: 8px 11px; border-radius: 9px; font-size: 13px; max-width: 280px; box-shadow: var(--shadow); line-height: 1.35; }
.tooltip b { display: block; font-size: 13.5px; }
.tooltip span { opacity: 0.8; }

.foot { border-top: 1px solid var(--border); padding: 22px max(16px, calc((100vw - 1180px) / 2 + 16px)) 34px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 6px; }
.foot p { max-width: 96ch; }
.banner { margin-bottom: 16px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--l2-soft); border: 1px solid color-mix(in srgb, var(--l2) 50%, transparent); font-size: 14px; }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .grid-2, .two, .trend-grid { grid-template-columns: minmax(0, 1fr); }
  .alert-row { grid-template-columns: minmax(0, 1fr) auto; }
  .alert-label { grid-column: 1 / -1; }
  .top-nav a { padding: 7px 9px; }
  .list-scroll { max-height: none; }
}
@media (max-width: 680px) {
  main { padding: 18px 12px 44px; }
  .top { gap: 8px; flex-wrap: wrap; }
  .top-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .top-meta { gap: 10px; }
  .route-form:not(.single) { grid-template-columns: 1fr auto; }
  .route-form:not(.single) > .field:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .route-form:not(.single) > .swap { grid-row: 1 / span 2; grid-column: 2; align-self: stretch; margin-top: 23px; height: calc(100% - 23px); }
  .route-form:not(.single) > .primary { grid-column: 1 / -1; grid-row: 3; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verdict { grid-template-columns: 1fr; padding: 18px; }
  .verdict .big-icon { width: 40px; height: 40px; grid-row: auto; }
  .route-title .tools { margin-left: 0; width: 100%; }
  .row { grid-template-columns: 24px 46px minmax(0, 1fr); }
  .row .sides { display: none; }
  .levels-table div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
