/* ==========================================================================
   Skyline Pages Layer — inner pages, TAF timeline, flight plan, shortcuts.
   Loaded after motion.css. Additive: remove pages.css + pages.js to revert.
   ========================================================================== */

/* flight-category colours, shared by everything below */
.c-VFR  { --c: var(--vfr); }
.c-MVFR { --c: var(--mvfr); }
.c-IFR  { --c: var(--ifr); }
.c-LIFR { --c: var(--lifr); }
.c-VFR, .c-MVFR, .c-IFR, .c-LIFR { --on-c: #07110b; }
:root[data-theme="light"] .c-VFR, :root[data-theme="light"] .c-MVFR,
:root[data-theme="light"] .c-IFR, :root[data-theme="light"] .c-LIFR { --on-c: #ffffff; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .c-VFR, :root:not([data-theme="dark"]) .c-MVFR,
  :root:not([data-theme="dark"]) .c-IFR, :root:not([data-theme="dark"]) .c-LIFR { --on-c: #ffffff; }
}

/* ---------- 1. INNER PAGE HEADER: the hero's sky, in miniature ------------ */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 18px;
  min-height: 118px; padding: 22px 28px; border-radius: var(--radius);
  background: linear-gradient(105deg, var(--sky-top, #1f63d4) 0%, var(--sky-mid, #4f9cf0) 55%, var(--sky-bot, #a8d6ff) 100%);
  color: #fff; box-shadow: 0 24px 50px -34px rgba(8, 20, 60, .6);
}
.page-head::before {                       /* soft light and readability scrim */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px 220px at 12% 0%, rgba(255, 255, 255, .18), transparent 70%), linear-gradient(0deg, rgba(6, 14, 40, .30), transparent 60%);
}
.ph-icon {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.ph-icon svg { width: 28px; height: 28px; stroke: #fff; }
.ph-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ph-title { margin: 0; font-family: var(--font-head); font-size: clamp(1.35rem, 3.2vw, 2rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; text-shadow: 0 2px 16px rgba(5, 15, 50, .35); }
.ph-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .82rem; color: rgba(255, 255, 255, .88); }
.ph-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.ph-cat { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .74rem; background: var(--c, #fff); color: var(--on-c, #07110b); }
.ph-route { position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: min(46%, 520px); pointer-events: none; opacity: .9; }
.ph-route svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-route path { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.6; stroke-dasharray: 3 7; stroke-linecap: round; }
.ph-plane { position: absolute; left: 0; top: 0; width: 26px; height: 26px; offset-path: path("M10 96 C 120 8, 300 8, 500 78"); offset-rotate: auto 90deg; animation: ph-fly 11s linear infinite; }
.ph-plane svg { width: 100%; height: 100%; fill: #fff; filter: drop-shadow(0 3px 6px rgba(5, 15, 50, .4)); }
:root[dir="rtl"] .ph-route { transform: scaleX(-1); }
:root[dir="rtl"] .ph-plane svg { transform: scaleX(-1); }
@keyframes ph-fly { from { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } to { offset-distance: 100%; opacity: 0; } }
@media (max-width: 640px) { .ph-route { display: none; } .page-head { padding: 18px; } }

/* inner-page cards: same language as the home page */
.view:not(#view-home) > .card { border-radius: var(--radius); }
.view .card > h2 { display: flex; align-items: center; gap: 10px; }
.card-icon { transition: transform .4s var(--ease-spring, ease); }
.card:hover > h2 .card-icon { transform: rotate(-8deg) scale(1.12); }
.view table tbody tr { transition: background-color .18s; }
.view table tbody tr:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }

/* ---------- 2. RAW METAR / TAF, TOKEN BY TOKEN ----------------------------- */
.raw-box.tok { line-height: 2.05; white-space: pre-wrap; overflow-wrap: anywhere; }
.raw-box .tk { padding: 1px 5px; border-radius: 6px; margin: 0 1px; transition: background-color .2s, transform .2s; cursor: default; }
.raw-box .tk:hover { transform: translateY(-1px); background: color-mix(in srgb, currentColor 16%, transparent); }
.tk-id    { color: var(--text); font-weight: 700; }
.tk-time  { color: var(--text-faint); }
.tk-wind  { color: var(--azure); background: color-mix(in srgb, var(--azure) 12%, transparent); }
.tk-vis   { color: var(--vfr);   background: color-mix(in srgb, var(--vfr) 12%, transparent); }
.tk-cloud { color: var(--warn-text); background: color-mix(in srgb, var(--warn-text) 13%, transparent); }
.tk-temp  { color: var(--gold-2); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.tk-qnh   { color: var(--lifr); background: color-mix(in srgb, var(--lifr) 12%, transparent); }
.tk-wx    { color: var(--ifr); background: color-mix(in srgb, var(--ifr) 13%, transparent); font-weight: 700; }
.tk-chg   { color: var(--text); background: var(--bg-2); font-weight: 700; }
.tok-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: -4px 0 14px; font-size: .72rem; color: var(--text-faint); }
.tok-legend i { font-style: normal; padding: 1px 7px; border-radius: 6px; }

/* ---------- 3. TAF TIMELINE ------------------------------------------------ */
.tl-wrap { margin: 4px 0 18px; }
.tl-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.tl-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; font-size: .84rem; background: var(--bg-2); color: var(--text); }
.tl-chip b { font-weight: 700; }
.tl-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-faint)); }
.tl-scroll { overflow-x: auto; padding-bottom: 6px; direction: ltr; }
.tl { position: relative; min-width: 640px; margin-inline: 16px; padding: 48px 0 10px; direction: ltr; }   /* side margin keeps the first/last hour labels whole */
.tl-axis { position: absolute; inset: 22px 0 auto 0; height: 22px; }
.tl-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: .7rem; color: var(--text-faint); font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.tl-grid { position: absolute; inset: 44px 0 0 0; pointer-events: none; }
.tl-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); opacity: .55; }
.tl-lane { position: relative; height: 46px; margin-bottom: 8px; }
.tl-lane-label { position: absolute; inset-inline-start: 0; top: -2px; font-size: .64rem; color: var(--text-faint); z-index: 2; pointer-events: none; text-transform: none; }
.tl-seg {
  position: absolute; top: 12px; height: 34px; border-radius: 10px; padding: 0 10px;
  display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap;
  background: var(--c); color: var(--on-c); font-size: .74rem; font-weight: 700;
  transform-origin: left center; animation: tl-grow .8s var(--ease-out, ease) both; animation-delay: var(--d, 0ms);
  transition: filter .2s, transform .2s;
}
.tl-seg:hover { filter: brightness(1.12); transform: translateY(-2px); z-index: 3; }
.tl-seg small { font-weight: 500; opacity: .82; }
.tl-seg.ov { top: 14px; height: 30px; background: color-mix(in srgb, var(--c) 22%, var(--bg-card)); color: var(--text); box-shadow: inset 0 0 0 2px var(--c); background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--c) 22%, transparent) 6px 12px); }
@keyframes tl-grow { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.tl-now { position: absolute; top: 20px; bottom: 6px; width: 2px; background: var(--gold); z-index: 4; border-radius: 2px; }
.tl-now::before { content: attr(data-l); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 8px; font-size: .64rem; font-weight: 700; background: var(--gold); color: #1a0e0c; white-space: nowrap; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: .74rem; color: var(--text-dim); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { width: 14px; height: 10px; border-radius: 4px; background: var(--c); }
.tl-legend i.ov { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }

/* ---------- 4. FLIGHT PLAN CARD ------------------------------------------- */
.plan-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 6px 0 16px; }
.plan-controls label { display: flex; flex-direction: column; gap: 6px; font-size: .74rem; color: var(--text-faint); font-weight: 600; }
.plan-controls select, .plan-controls input {
  min-width: 128px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.plan-controls select:focus, .plan-controls input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 106, 95, .2); }
.plan-out { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: stretch; }
.plan-cat { display: grid; place-items: center; min-width: 132px; padding: 16px; border-radius: 18px; background: var(--c); color: var(--on-c); text-align: center; animation: pop .5s var(--ease-spring, ease); }
.plan-cat b { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1; letter-spacing: -.02em; }
.plan-cat small { display: block; margin-top: 6px; font-size: .72rem; opacity: .85; font-weight: 600; }
@keyframes pop { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plan-cell { padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.plan-cell small { display: block; font-size: .7rem; color: var(--text-faint); font-weight: 600; margin-bottom: 4px; }
.plan-cell b { font-family: var(--font-mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.plan-cell.bad { background: color-mix(in srgb, var(--ifr) 16%, var(--bg-2)); }
.plan-cell.bad b { color: var(--ifr); }
.plan-note { margin-top: 12px; font-size: .8rem; color: var(--text-dim); }
@media (max-width: 640px) { .plan-out { grid-template-columns: 1fr; } .plan-cat { min-width: 0; } }

/* ---------- 5. CHANGE ALERTS ----------------------------------------------- */
.trend-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff; animation: pop .5s var(--ease-spring, ease), chip-out .6s ease 14s forwards; }
.trend-chip.up { background: #17a34a; }
.trend-chip.down { background: #dc2626; }
@keyframes chip-out { to { opacity: 0; transform: scale(.9); } }
.tick-flash { animation: tick-flash 1.2s var(--ease-out, ease); }
.toast-stack { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 340px; padding: 12px 16px; border-radius: 14px; font-size: .86rem; color: var(--text); background: var(--bg-card); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: toast-in .45s var(--ease-spring, ease), toast-out .4s ease 6s forwards; }
.toast b { color: var(--gold); }
@keyframes toast-in { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.data-age { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .74rem; font-weight: 600; color: var(--text-dim); background: var(--bg-2); white-space: nowrap; }
.data-age::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--vfr); }
.data-age.stale::before { background: var(--warn-text); }
.data-age.off::before { background: var(--ifr); }
.offline-bar { position: sticky; top: 0; z-index: 90; padding: 8px 16px; text-align: center; font-size: .82rem; font-weight: 600; color: #fff; background: #b45309; }

/* ---------- 6. SHORTCUTS ---------------------------------------------------- */
.kbd-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(6, 10, 24, .6); backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.kbd-panel { width: min(520px, 100%); max-height: 86vh; overflow: auto; padding: 24px; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.kbd-panel h3 { margin: 0 0 14px; font-size: 1.1rem; }
.kbd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .9rem; color: var(--text-dim); }
kbd { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-family: var(--font-mono); font-size: .8rem; padding: 3px 9px; border-radius: 8px; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; }
.nav-item .nav-key { margin-inline-start: auto; font-family: var(--font-mono); font-size: .64rem; color: var(--text-faint); opacity: 0; transition: opacity .2s; }
.sidebar:hover .nav-key { opacity: .9; }

/* ---------- 8. TRANSITIONS, 3D COMPASS, SUN COUNTDOWN ------------------- */
.main-col { view-transition-name: main; }
::view-transition-old(main) { animation: vt-out .18s ease both; }
::view-transition-new(main) { animation: vt-in .38s var(--ease-out, ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
.compass-wrap { perspective: 900px; }
.compass-svg { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; transform-style: preserve-3d; will-change: transform; }
.sun-countdown { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); font-size: .9rem; color: var(--text-dim); }
.sun-countdown b { color: var(--warn-text); font-family: var(--font-mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------- MOBILE FIXES (found in the 390px review) ----------------------- */
.icao-form input::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }   /* the datalist arrow was eating the field */
.icao-form input { flex: none; width: 5.2ch; }
@media (max-width: 900px) {
  .disclaimer { padding-inline-start: 64px; }          /* clear of the fixed menu button */
}

@media (prefers-reduced-motion: reduce) {
  .tl-seg, .plan-cat, .trend-chip, .toast, .ph-plane { animation: none !important; }
  .trend-chip { opacity: 1; }
  .compass-svg { transform: none !important; transition: none; }
  ::view-transition-old(main), ::view-transition-new(main) { animation: none; }
}

/* ---------- Airport location pin (replaces the green dot) ------------------ */
.hero-pin {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
  backdrop-filter: blur(6px); box-shadow: 0 8px 22px -10px rgba(5, 15, 50, .5);
}
.hero-pin svg { width: 22px; height: 22px; transform-origin: 50% 100%; animation: pin-bob 3.2s var(--ease-spring, ease) infinite; }
@keyframes pin-bob { 0%, 72%, 100% { transform: translateY(0) scale(1); } 80% { transform: translateY(-3px) scale(1.06); } 90% { transform: translateY(0) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .hero-pin svg { animation: none; } }

/* ---------- DENSITY ALTITUDE GAUGE ---------------------------------------- */
.da-gauge { margin-top: 22px; direction: ltr; }
.dag-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; font-size: .74rem; color: var(--text-faint); }
.dag-zone { padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .8rem; color: #fff; }
.z-ok { background: #17a34a; } .z-warn { background: #d97706; } .z-bad { background: #dc2626; }
.dag-track { position: relative; display: flex; height: 18px; border-radius: 999px; overflow: visible; }
.dag-zone-seg { height: 100%; opacity: .85; }
.dag-zone-seg:first-child { border-radius: 999px 0 0 999px; } .dag-zone-seg:last-child { border-radius: 0 999px 999px 0; }
.dag-mark { position: absolute; top: -6px; width: 4px; height: 30px; border-radius: 3px; transform: translateX(-50%); background: var(--text); transition: left 1s var(--ease-out, ease); }
.dag-mark em { position: absolute; font-style: normal; font-size: .72rem; font-weight: 700; white-space: nowrap; left: 50%; transform: translateX(-50%); }
.dag-mark.da { height: 38px; top: -10px; width: 6px; } .dag-mark.da em { top: -26px; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: .8rem; }
.dag-mark.da.z-ok em { background: #17a34a; } .dag-mark.da.z-warn em { background: #d97706; } .dag-mark.da.z-bad em { background: #dc2626; }
.dag-mark.da { background: currentColor; }
.dag-mark.field { background: var(--text-dim); } .dag-mark.field em { bottom: -24px; color: var(--text-dim); }
.dag-ticks { position: relative; height: 34px; margin-top: 6px; }
.dag-ticks i { position: absolute; top: 0; width: 1px; height: 6px; background: var(--border-strong); font-style: normal; }
.dag-ticks b { position: absolute; top: 9px; left: 0; transform: translateX(-50%); font-weight: 600; font-size: .7rem; color: var(--text-faint); font-family: var(--font-mono); }
.dag-note { margin: 4px 0 0; font-size: .86rem; color: var(--text-dim); direction: inherit; }
.dag-note b { color: var(--warn-text); direction: ltr; unicode-bidi: isolate; display: inline-block; }
:root[dir="rtl"] .dag-note { direction: rtl; }

/* ---------- RUNWAY DIAGRAMS ------------------------------------------------ */
.rw-diagram { display: grid; gap: 16px; margin: 4px 0 20px; }
.rw-wind-chip { justify-self: start; unicode-bidi: normal; padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg-2); color: var(--text); font-variant-numeric: tabular-nums; }
.rw-card { padding: 16px 18px 18px; border-radius: 18px; background: var(--bg-2); }
.rw-title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; direction: ltr; text-align: start; }
.rw-svg { display: block; width: 100%; height: auto; max-height: 150px; direction: ltr; }
.rw-strip { fill: #3b3f52; transform-box: fill-box; transform-origin: 50% 50%; animation: rw-grow .9s var(--ease-out, ease) both; animation-delay: var(--d, 0ms); }
:root[data-theme="light"] .rw-strip { fill: #5a5f78; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .rw-strip { fill: #5a5f78; } }
.rw-diagram.settled .rw-strip { animation: none; }
@keyframes rw-grow { from { transform: scaleX(.05); opacity: 0; } to { transform: none; opacity: 1; } }
.rw-thr { fill: #fff; opacity: .9; }
.rw-dash { fill: #fff; opacity: .65; }
.rw-num { fill: #fff; font: 700 15px var(--font-mono); letter-spacing: .5px; }
.rw-dim { fill: var(--text-dim); font: 600 12px var(--font); }
.rw-wind line { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.rw-wind path { fill: var(--gold); }
.rw-wind { transition: transform 1.2s var(--ease-spring, ease); }
.rw-wind-in { animation: rw-nudge 2.4s ease-in-out infinite; }
@keyframes rw-nudge { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(6px); } }
.rw-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rw-end { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: var(--bg-card); font-size: .84rem; color: var(--text-dim); }
.rw-end b { font-family: var(--font-mono); color: var(--text); font-size: .95rem; display: flex; align-items: center; gap: 8px; direction: ltr; justify-content: flex-start; }
.rw-end i { font-style: normal; font-weight: 700; color: var(--text); font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; display: inline-block; }
.rw-end.best { box-shadow: inset 0 0 0 2px var(--vfr); }
.rw-end .bad, .rw-end .bad i { color: var(--ifr); }
.rw-pref { padding: 1px 9px; border-radius: 999px; background: var(--vfr); color: #07110b; font: 700 .68rem var(--font); }
@media (max-width: 640px) { .rw-ends { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .rw-strip, .rw-wind-in { animation: none; } .rw-wind { transition: none; } }

.rw-pref { align-self: flex-start; }

/* ---------- COMMUNICATIONS: frequency cards ------------------------------- */
.cm-table-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* kept for screen readers */
.cm-wrap { display: grid; gap: 16px; margin-top: 8px; }
.cm-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 16px; border-radius: 16px; background: var(--bg-2); }
.cm-step { padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.cm-arrow { font-style: normal; color: var(--text-faint); font-size: 1.2rem; line-height: 1; }
:root[dir="rtl"] .cm-arrow { transform: scaleX(-1); }
.r-atis { --c: var(--azure); } .r-delivery { --c: var(--lifr); } .r-ground { --c: var(--warn-text); } .r-tower { --c: var(--vfr); } .r-approach { --c: var(--gold); }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.cm-card {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico role" "freq freq"; align-items: center; gap: 12px 12px;
  padding: 16px 18px 18px; border: 0; border-radius: 20px; background: var(--bg-2); color: var(--text); text-align: start; cursor: pointer; font: inherit;
  transition: transform .35s var(--ease-spring, ease), background-color .2s, box-shadow .2s;
  animation: tl-grow .6s var(--ease-out, ease) both; animation-delay: var(--d, 0ms); transform-origin: 50% 100%;
}
.cm-card:hover { transform: translateY(-4px); background: color-mix(in srgb, var(--c) 9%, var(--bg-2)); box-shadow: 0 14px 30px -18px var(--c); }
.cm-card:active { transform: scale(.97); }
.cm-ico { grid-area: ico; position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cm-ico svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.cm-wave { position: absolute; inset: 0; border-radius: 16px; border: 2px solid var(--c); opacity: 0; }
.cm-card:hover .cm-wave { animation: cm-ping 1.6s var(--ease-out, ease) infinite; }
.cm-card:hover .cm-wave.w2 { animation-delay: .5s; }
@keyframes cm-ping { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
.cm-role { grid-area: role; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 700; font-size: .98rem; }
.cm-band { font-style: normal; font: 700 .66rem var(--font-mono); padding: 2px 7px; border-radius: 6px; color: var(--text-dim); background: var(--bg-card); }
.cm-freq { grid-area: freq; direction: ltr; text-align: start; font: 700 clamp(1.9rem, 4vw, 2.5rem)/1 var(--font-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.cm-freq small { font-size: .4em; font-weight: 600; color: var(--text-faint); letter-spacing: 0; }
.cm-copy { position: absolute; inset-block-start: 14px; inset-inline-end: 16px; font-size: .7rem; font-weight: 700; color: var(--text-faint); opacity: 0; transition: opacity .2s; }
.cm-card:hover .cm-copy, .cm-card:focus-visible .cm-copy { opacity: 1; }
.cm-card.copied { background: color-mix(in srgb, var(--vfr) 18%, var(--bg-2)); }
.cm-card.copied .cm-copy { opacity: 1; color: var(--vfr); }
@media (prefers-reduced-motion: reduce) { .cm-card, .cm-wave { animation: none !important; } .cm-card:hover { transform: none; } }

/* ---------- SIGMET ---------------------------------------------------------- */
#sigmet-card.sigmet-clear, #sigmet-card.sigmet-active { background: var(--bg-card); }
.sg-clear { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 20px; background: color-mix(in srgb, var(--vfr) 13%, var(--bg-2)); }
.sg-clear b { font-family: var(--font-head); font-size: 1.2rem; display: block; margin-bottom: 4px; }
.sg-clear p { margin: 0; font-size: .9rem; color: var(--text-dim); }
.sg-clear-ico { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--vfr); color: #07110b; animation: pop .6s var(--ease-spring, ease); }
.sg-clear-ico svg { width: 28px; height: 28px; }
.sg-stamp { margin: 12px 2px 0; font-size: .74rem; color: var(--text-faint); }
.sg-count { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 14px; padding: 8px 16px; border-radius: 999px; background: var(--c); color: var(--on-c); font-weight: 700; }
.sg-count b { font-family: var(--font-head); font-size: 1.5rem; line-height: 1; }
.sg-card { --c: var(--azure); display: grid; gap: 16px; margin-bottom: 14px; padding: 18px 20px; border-radius: 20px; background: color-mix(in srgb, var(--c) 9%, var(--bg-2)); animation: tl-grow .6s var(--ease-out, ease) both; transform-origin: 50% 0; }
.sg-card.sev-high { --c: var(--ifr); } .sg-card.sev-mid { --c: var(--warn-text); } .sg-card.sev-low { --c: var(--azure); }
.sg-card.st-over { opacity: .6; filter: saturate(.5); }
.sg-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sg-ico { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--c); color: #fff; }
.sg-card.sev-mid .sg-ico { color: #1a1204; }
.sg-ico svg { width: 26px; height: 26px; stroke: currentColor; }
.sg-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sg-title b { font-family: var(--font-head); font-size: 1.1rem; }
.sg-title em { font-style: normal; font-weight: 600; color: var(--text-dim); font-size: .85em; }
.sg-sev { font-size: .76rem; font-weight: 700; color: var(--c); }
.sg-state { padding: 5px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg-card); color: var(--text); }
.st-on .sg-state { box-shadow: inset 0 0 0 2px var(--c); }
.sg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sg-block { padding: 12px 14px; border-radius: 14px; background: var(--bg-card); }
.sg-block small { display: block; margin-bottom: 10px; font-size: .72rem; color: var(--text-faint); font-weight: 600; }
.sg-bar, .sg-alt { position: relative; height: 10px; border-radius: 999px; background: var(--bg-2); direction: ltr; }
.sg-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: color-mix(in srgb, var(--c) 55%, var(--bg-2)); }
.sg-now { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 3px; background: var(--c); }
.sg-alt span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--c); }
.sg-times { display: flex; justify-content: space-between; margin-top: 8px; font: 600 .72rem var(--font-mono); color: var(--text-dim); direction: ltr; }
.sg-alt-txt { color: var(--text); }
.sg-raw summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--text-dim); }
.sg-raw .raw-box { margin: 10px 0 0; }
@media (max-width: 640px) { .sg-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sg-card, .sg-clear-ico { animation: none; } }
.sg-alt-txt { unicode-bidi: isolate; }
:root[dir="rtl"] .sg-alt-txt { direction: rtl; }

/* ---------- NOTAM ------------------------------------------------------------ */
#notam-card .notam-freshness { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); font-weight: 600; font-size: .88rem; }
#notam-card .notam-freshness::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--vfr); }
#notam-card .notam-freshness.stale { background: color-mix(in srgb, var(--warn-text) 16%, var(--bg-2)); } #notam-card .notam-freshness.stale::before { background: var(--warn-text); }
#notam-card .notam-freshness.very-stale { background: color-mix(in srgb, var(--ifr) 16%, var(--bg-2)); } #notam-card .notam-freshness.very-stale::before { background: var(--ifr); }
.nt-tools { display: grid; gap: 12px; margin: 4px 0 16px; }
.nt-search { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: inherit; font-size: .92rem; }
.nt-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 106, 95, .2); }
.nt-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-fb { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--text-dim); font: 600 .78rem var(--font); cursor: pointer; transition: transform .2s var(--ease-spring, ease), background-color .2s, color .2s; }
.nt-fb em { font-style: normal; font-size: .72rem; padding: 0 6px; border-radius: 999px; background: var(--bg-card); }
.nt-fb:hover { transform: translateY(-2px); color: var(--text); }
.nt-fb.on { background: var(--gold); color: #1a0e0c; } .nt-fb.on em { background: rgba(255, 255, 255, .45); }
.nt-count { margin: 0; font-size: .76rem; color: var(--text-faint); }
#notam-list .notam-item { position: relative; display: grid; gap: 10px; margin-bottom: 12px; padding: 16px 18px 16px 22px; border: 0; border-radius: 18px; background: var(--bg-2); animation: tl-grow .5s var(--ease-out, ease) both; transform-origin: 50% 0; }
:root[dir="rtl"] #notam-list .notam-item { padding: 16px 22px 16px 18px; }
#notam-list .notam-item::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 5px; border-radius: 0 5px 5px 0; background: var(--azure); }
:root[dir="rtl"] #notam-list .notam-item::before { border-radius: 5px 0 0 5px; }
#notam-list .notam-item.nt-high::before { background: var(--ifr); }
#notam-list .notam-item[hidden] { display: none; }
#notam-list .notam-item .notam-time { display: none; }
#notam-list .notam-scope { font-weight: 700; font-size: .84rem; color: var(--text); }
#notam-list .notam-id { font: 600 .74rem var(--font-mono); color: var(--text-faint); direction: ltr; text-align: start; }
#notam-list .notam-text { font-size: .9rem; line-height: 1.7; color: var(--text); direction: ltr; text-align: left; overflow-wrap: anywhere; }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-chip { padding: 2px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: var(--bg-card); color: var(--text-dim); }
.nt-chip.t-closure { background: var(--ifr); color: #fff; } .nt-chip.t-runway, .nt-chip.t-taxiway { background: color-mix(in srgb, var(--warn-text) 22%, var(--bg-card)); color: var(--warn-text); }
.nt-chip.t-navaid, .nt-chip.t-lights { background: color-mix(in srgb, var(--azure) 20%, var(--bg-card)); color: var(--azure); }
.nt-chip.t-obstacle, .nt-chip.t-airspace { background: color-mix(in srgb, var(--lifr) 20%, var(--bg-card)); color: var(--lifr); }
.nt-time { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg-card); direction: ltr; }
.nt-time-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 600 .72rem var(--font-mono); color: var(--text-faint); }
.nt-time-top b { font: 700 .76rem var(--font); color: var(--text); text-align: center; }
.nt-time.soon .nt-time-top b { color: var(--warn-text); }
.nt-bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; } .nt-bar i { display: block; height: 100%; border-radius: 999px; background: var(--azure); }
.nt-time.soon .nt-bar i { background: var(--warn-text); }
mark.nt-bad { background: color-mix(in srgb, var(--ifr) 20%, transparent); color: var(--ifr); font-weight: 700; padding: 0 4px; border-radius: 5px; }
mark.nt-key { background: color-mix(in srgb, var(--warn-text) 18%, transparent); color: var(--warn-text); font-weight: 700; padding: 0 4px; border-radius: 5px; }
mark.nt-time-tok { background: none; color: var(--azure); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { #notam-list .notam-item { animation: none; } }

/* ---------- HELICOPTER OPS ---------------------------------------------------- */
#heli-card .notam-freshness { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); font-weight: 600; font-size: .88rem; }
#heli-card .notam-freshness::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--vfr); }
#heli-card .notam-freshness.stale { background: color-mix(in srgb, var(--warn-text) 16%, var(--bg-2)); } #heli-card .notam-freshness.stale::before { background: var(--warn-text); }
#heli-card .notam-freshness.very-stale { background: color-mix(in srgb, var(--ifr) 16%, var(--bg-2)); } #heli-card .notam-freshness.very-stale::before { background: var(--ifr); }
#heli-content > p.hint:first-child { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--bg-2); font-size: .78rem; color: var(--text-dim); }
#heli-content .notam-item { position: relative; display: grid; gap: 10px; margin-bottom: 14px; padding: 16px 20px 16px 24px; border: 0; border-radius: 18px; background: color-mix(in srgb, var(--vfr) 10%, var(--bg-2)); }
#heli-content .notam-item.cat-warn { background: color-mix(in srgb, var(--ifr) 12%, var(--bg-2)); }
#heli-content .notam-item::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 5px; border-radius: 0 5px 5px 0; background: var(--vfr); }
:root[dir="rtl"] #heli-content .notam-item::before { border-radius: 5px 0 0 5px; }
:root[dir="rtl"] #heli-content .notam-item { padding: 16px 24px 16px 20px; }
#heli-content .notam-item.cat-warn::before { background: var(--ifr); }
#heli-content .notam-text { font-size: .92rem; line-height: 1.7; color: var(--text); }
.hv-orig { display: none !important; }
.hv-wrap { display: grid; gap: 16px; }
.hv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.hv-tile { padding: 14px 16px; border-radius: 16px; background: var(--bg-2); }
.hv-tile.wide { grid-column: span 1; }
.hv-tile small { display: block; margin-bottom: 6px; font-size: .72rem; font-weight: 600; color: var(--text-faint); }
.hv-tile b { font-size: .95rem; line-height: 1.45; }
.hv-h { margin: 6px 0 -4px; font-family: var(--font-head); font-size: 1.05rem; }
.hv-prof { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: var(--bg-2); }
.hv-cols, .hv-row { display: grid; grid-template-columns: 92px 84px 1fr 110px; align-items: center; gap: 12px; position: relative; direction: ltr; }
.hv-cols { padding: 0 8px 8px; font-size: .68rem; font-weight: 600; color: var(--text-faint); }
.hv-row { padding: 7px 8px; border-radius: 12px; animation: tl-grow .5s var(--ease-out, ease) both; animation-delay: var(--d, 0ms); transform-origin: 0 50%; transition: background-color .2s; }
.hv-row:hover { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.hv-lvl { font: 700 .86rem var(--font-mono); } .hv-lvl small { display: block; font: 600 .66rem var(--font); color: var(--text-faint); }
.hv-wind { display: flex; align-items: center; gap: 8px; font: 600 .78rem var(--font-mono); color: var(--text-dim); }
.hv-arrow { width: 22px; height: 22px; color: var(--azure); flex: none; transition: transform 1s var(--ease-spring, ease); }
.hv-vrb { width: 22px; font: 700 .62rem var(--font-mono); color: var(--text-faint); }
.hv-spd { position: relative; display: flex; align-items: center; min-height: 20px; border-radius: 999px; background: var(--bg-card); overflow: hidden; }
.hv-spd i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: color-mix(in srgb, var(--azure) 65%, var(--bg-card)); }
.hv-spd em { position: relative; padding: 2px 8px; white-space: nowrap; font: 700 .72rem/1.2 var(--font-mono); font-style: normal; color: var(--text); }   /* the number sets the pill's height, so a larger phone font never clips it */
.hv-tmp { display: flex; align-items: center; gap: 8px; }
.hv-tmp i { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent); flex: none; }
.hv-tmp b { font: 700 .8rem var(--font-mono); font-variant-numeric: tabular-nums; }
.hv-iso { position: absolute; inset-inline-end: 8px; top: -2px; padding: 1px 8px; border-radius: 999px; background: var(--azure); color: #fff; font: 700 .62rem var(--font-mono); }
.hv-note { margin: 2px 2px 0 !important; font-size: .86rem; color: var(--text-dim); }
.hv-prof { container: hvprof / inline-size; } .hv-cs { display: none; }
/* compact rows whenever the table itself is narrow (phones, and tablets where it sits beside the chart) */
@media (max-width: 640px) { .hv-cols, .hv-row { grid-template-columns: 58px 40px minmax(0, 1fr) 70px; gap: 6px; } .hv-wind b, .hv-cl { display: none; } .hv-cs { display: inline; } }
@container hvprof (max-width: 460px) { .hv-cols, .hv-row { grid-template-columns: 58px 40px minmax(0, 1fr) 70px; gap: 6px; } .hv-wind b, .hv-cl { display: none; } .hv-cs { display: inline; } }
@media (prefers-reduced-motion: reduce) { .hv-row { animation: none; } }

.hv-tile b { display: block; unicode-bidi: plaintext; }
:root[dir="rtl"] .hv-tile b { text-align: right; }

/* ---------- PUBLIC BULLETIN ---------------------------------------------------- */
.bl-hidden { display: none !important; }
.bl-wrap { display: grid; gap: 14px; margin-top: 6px; }
.bl-valid { padding: 14px 18px; border-radius: 18px; background: var(--bg-2); }
.bl-valid.st-over { background: color-mix(in srgb, var(--ifr) 15%, var(--bg-2)); }
.bl-valid-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 600 .76rem var(--font-mono); color: var(--text-faint); direction: ltr; }
.bl-valid-top b { font: 700 .92rem var(--font); color: var(--text); text-align: center; }
.bl-valid.st-over .bl-valid-top b { color: var(--ifr); }
.bl-bar { height: 8px; margin: 10px 0 8px; border-radius: 999px; background: var(--bg-card); overflow: hidden; direction: ltr; }
.bl-bar i { display: block; height: 100%; border-radius: 999px; background: var(--azure); transition: width 1s var(--ease-out, ease); }
.bl-valid.st-over .bl-bar i { background: var(--ifr); }
.bl-valid p { margin: 0; font-size: .76rem; color: var(--text-dim); }
.bl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.bl-card { --c: var(--azure); position: relative; overflow: hidden; display: grid; gap: 12px; align-content: start; padding: 18px 20px 20px; border-radius: 20px; background: color-mix(in srgb, var(--c) 9%, var(--bg-2)); animation: tl-grow .6s var(--ease-out, ease) both; transform-origin: 50% 0; }
.bl-card.wx { --c: var(--warn-text); } .bl-card.wind { --c: var(--azure); } .bl-card.sea { --c: #18a8c8; }
.bl-card.warn.ok { --c: var(--vfr); } .bl-card.warn.alert { --c: var(--ifr); }
.bl-card:nth-child(2) { animation-delay: .07s; } .bl-card:nth-child(3) { animation-delay: .14s; } .bl-card:nth-child(4) { animation-delay: .21s; }
.bl-head { display: flex; align-items: center; gap: 12px; }
.bl-head small { font-size: .8rem; font-weight: 700; color: var(--c); }
.bl-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.bl-ico svg { width: 22px; height: 22px; }
.bl-card p { margin: 0; font-size: 1.02rem; line-height: 1.6; font-weight: 600; color: var(--text); }
.bl-big { display: flex; align-items: center; gap: 10px; color: var(--text); }
.bl-big b { font: 700 2.3rem/1 var(--font-mono); letter-spacing: -.02em; } .bl-big small { font-size: .85rem; color: var(--text-faint); font-weight: 600; }
.bl-arrow { width: 34px; height: 34px; color: var(--c); transition: transform 1s var(--ease-spring, ease); }
.bl-status { align-self: start; justify-self: start; padding: 4px 14px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: .8rem; }
.bl-card.warn.ok .bl-status { color: #07110b; }
.bl-wave { display: block; width: 100%; height: 38px; margin: 0 -2px; fill: color-mix(in srgb, var(--c) 40%, transparent); animation: bl-sway 5s ease-in-out infinite alternate; }
.bl-wave.lv2 { animation-duration: 3.4s; height: 46px; } .bl-wave.lv3 { animation-duration: 2.2s; height: 56px; }
@keyframes bl-sway { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .bl-card, .bl-wave { animation: none; } }

/* ---------- NAVAIDS RADAR ------------------------------------------------------- */
.nv-hidden { display: none !important; }
.nv-wrap { display: grid; grid-template-columns: minmax(280px, 1.1fr) 1fr; gap: 20px; align-items: start; margin-top: 8px; }
.nv-radar { position: relative; padding: 10px; border-radius: 22px; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--azure) 10%, var(--bg-2)), var(--bg-2) 70%); }
.nv-svg { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; direction: ltr; }
.nv-ring { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.nv-rl { fill: var(--text-faint); font: 600 9px var(--font-mono); }
.nv-tick { stroke: var(--border-strong); stroke-width: 1.2; }
.nv-card-l { fill: var(--text-dim); font: 700 12px var(--font-mono); } .nv-card-l.n { fill: var(--gold); }
.nv-sweep { transform-box: view-box; transform-origin: 200px 200px; animation: nv-spin 9s linear infinite; }
@keyframes nv-spin { to { transform: rotate(360deg); } }
.nv-ap circle { fill: var(--gold); } .nv-ap text { fill: var(--text); font: 700 11px var(--font-mono); }
.nv-mark { cursor: pointer; transition: transform .2s; }
.nv-mark .nv-shape { transition: transform .25s var(--ease-spring, ease); transform-box: fill-box; transform-origin: center; }
.nv-mark.k-vor .nv-shape { fill: color-mix(in srgb, var(--azure) 35%, var(--bg-card)); stroke: var(--azure); stroke-width: 2; }
.nv-mark.k-ndb .nv-shape { fill: color-mix(in srgb, var(--warn-text) 25%, var(--bg-card)); stroke: var(--warn-text); stroke-width: 2; stroke-dasharray: 3 2; } .nv-mark .nv-dot { fill: var(--warn-text); }
.nv-mark text { fill: var(--text); font: 700 11px var(--font-mono); paint-order: stroke; stroke: var(--bg-2); stroke-width: 3px; }
.nv-mark.hl .nv-shape { transform: scale(1.5); }
.nv-cap { margin: 8px 4px 2px; text-align: center; font-size: .72rem; color: var(--text-faint); }
.nv-list { display: grid; gap: 10px; }
.nv-card { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--bg-2); outline: none; animation: tl-grow .5s var(--ease-out, ease) both; animation-delay: var(--d, 0ms); transform-origin: 50% 0; transition: background-color .2s, box-shadow .2s, transform .3s var(--ease-spring, ease); }
.nv-card.hl, .nv-card:focus-visible { background: color-mix(in srgb, var(--c) 12%, var(--bg-2)); box-shadow: inset 0 0 0 2px var(--c); transform: translateX(-3px); }
:root[dir="rtl"] .nv-card.hl { transform: translateX(3px); }
.nv-card.k-vor { --c: var(--azure); } .nv-card.k-ndb { --c: var(--warn-text); }
.nv-id { display: grid; place-items: center; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font: 700 1.05rem var(--font-mono); }
.nv-info { min-width: 0; display: grid; gap: 2px; } .nv-info b { font-size: .95rem; } .nv-info small { font-size: .76rem; color: var(--text-dim); }
.nv-nums { display: flex; gap: 14px; } .nv-nums span { display: grid; text-align: end; } .nv-nums i { font: 700 .95rem var(--font-mono); font-style: normal; font-variant-numeric: tabular-nums; } .nv-nums em { font-style: normal; font-size: .66rem; color: var(--text-faint); font-weight: 600; }
@media (max-width: 900px) { .nv-wrap { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .nv-sweep, .nv-card { animation: none; } }

/* ---------- HOME LAYOUT ------------------------------------------------------ */
/* short condition values stay on one line ("180° / 5 kt"); long ones may wrap */
#view-home .stat .stat-value { font-size: clamp(1rem, 1.35vw, 1.3rem); }
#view-home .stat .stat-value.nw { white-space: nowrap; }
#view-home .stat .stat-value { max-width: 100%; overflow-wrap: break-word; }   /* a value that cannot wrap at a space still stays inside its tile */
/* the "Data Age" pill sits on the sky picture, so it is a dark glass pill in both themes
   (the light theme gave white text on a light-grey pill) */
.hero-cat .hero-age:not(.stale) { background: rgba(6, 16, 44, .38); border-color: rgba(255, 255, 255, .24); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* compass beside a column: crosswind + daylight */
#view-home .grid-2 { align-items: start; }
.home-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
.home-col > .card { margin: 0; }

/* ---------- BRIEFING STRIP ------------------------------------------------------ */
.brief { display: grid; grid-template-columns: auto 1fr; border-radius: 22px; overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow); animation: tl-grow .6s var(--ease-out, ease) both; transform-origin: 50% 0; }
.br-cat { display: grid; align-content: center; gap: 4px; min-width: 150px; padding: 18px 26px; background: var(--c); color: var(--on-c); text-align: center; }
.br-cat small { font-size: .72rem; font-weight: 700; opacity: .85; }
.br-cat b { font-family: var(--font-head); font-size: 2.4rem; line-height: 1; letter-spacing: -.02em; }
.br-body { display: grid; gap: 12px; padding: 16px 22px 18px; min-width: 0; }
.br-verdict { margin: 0; font-size: .98rem; color: var(--text-dim); } .br-verdict b { color: var(--text); font-family: var(--font-head); font-size: 1.1rem; }
.br-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.br-chip { padding: 10px 14px; border-radius: 14px; background: var(--bg-2); min-width: 0; }
.br-chip small { display: block; margin-bottom: 3px; font-size: .68rem; font-weight: 600; color: var(--text-faint); }
.br-chip b { display: block; font: 700 .92rem var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.br-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.br-flag { padding: 4px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.br-flag.ok { background: color-mix(in srgb, var(--vfr) 18%, var(--bg-2)); color: var(--vfr); }
.br-flag.warn { background: color-mix(in srgb, var(--warn-text) 20%, var(--bg-2)); color: var(--warn-text); }
.br-flag.alert { background: var(--ifr); color: #fff; }
@media (max-width: 700px) { .brief { grid-template-columns: 1fr; } .br-cat { grid-auto-flow: column; justify-content: center; align-items: baseline; gap: 12px; padding: 12px 18px; min-width: 0; } .br-cat b { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { .brief { animation: none; } }

.br-chip em { display: block; margin-top: 2px; font: 600 .7rem var(--font); font-style: normal; color: var(--text-dim); }

/* ---------- SEVERITY ON THE CONDITION TILES ----------------------------------------- */
.stat[data-sev] { --sv: var(--vfr); }
.stat[data-sev="warn"] { --sv: var(--warn-text); } .stat[data-sev="alert"] { --sv: var(--ifr); }
.stat[data-sev] .stat-label::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 7px; border-radius: 50%; background: var(--sv); vertical-align: middle; }
.stat[data-sev="warn"] { background: color-mix(in srgb, var(--warn-text) 11%, var(--bg-card)); border-color: color-mix(in srgb, var(--warn-text) 42%, var(--border)); }
.stat[data-sev="alert"] { background: color-mix(in srgb, var(--ifr) 14%, var(--bg-card)); border-color: color-mix(in srgb, var(--ifr) 70%, var(--border)); }
.stat[data-sev="warn"] .stat-value { color: var(--warn-text); } .stat[data-sev="alert"] .stat-value { color: var(--ifr); }
.stat[data-sev="alert"] .stat-label::before { animation: sev-pulse 1.8s ease-in-out infinite; }
@keyframes sev-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ifr) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .stat[data-sev="alert"] .stat-label::before { animation: none; } }

/* ---------- FLIGHT PLAN: wide layout ------------------------------------------------ */
.plan-body { display: grid; grid-template-columns: minmax(220px, 290px) 1fr; gap: 22px; align-items: start; }
.plan-side { display: grid; gap: 14px; align-content: start; }
#plan-card .plan-controls { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; }
#plan-card .plan-controls label, #plan-card .plan-controls select, #plan-card .plan-controls input { width: 100%; }
.plan-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.plan-presets small { grid-column: 1 / -1; font-size: .72rem; font-weight: 600; color: var(--text-faint); }
.plan-preset { padding: 7px 0; text-align: center; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--text-dim); font: 700 .78rem var(--font-mono); cursor: pointer; transition: transform .2s var(--ease-spring, ease), background-color .2s, color .2s; }
.plan-preset:hover { transform: translateY(-2px); background: var(--gold); color: #1a0e0c; }
.plan-preset:active { transform: scale(.94); }
#plan-card .plan-out { grid-template-columns: auto 1fr; }
.plan-strip { margin-top: 20px; padding: 14px 16px 16px; border-radius: 18px; background: var(--bg-2); }
.ps-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; font-size: .74rem; color: var(--text-faint); }
.ps-head b { font-size: .86rem; color: var(--text); }
.ps-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; direction: ltr; }
.ps-slot { display: grid; gap: 2px; justify-items: center; padding: 8px 0 7px; border: 0; border-radius: 12px; font: inherit; color: var(--on-c, var(--text)); background: var(--c, var(--bg-card)); cursor: pointer; transition: transform .25s var(--ease-spring, ease), box-shadow .2s; }
.ps-slot span { font: 700 .72rem var(--font-mono); opacity: .85; } .ps-slot i { font: 700 .95rem var(--font-mono); font-style: normal; font-variant-numeric: tabular-nums; }
.ps-slot:hover { transform: translateY(-3px); }
.ps-slot.sel { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--text); transform: translateY(-3px); }
.ps-slot.over { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--ifr); }
.ps-slot.na { background: var(--bg-card); color: var(--text-faint); cursor: default; }
@media (max-width: 900px) { .plan-body { grid-template-columns: 1fr; } .ps-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .plan-preset, .ps-slot { transition: none; } }
@media (max-width: 640px) {
  #plan-card .plan-out { grid-template-columns: 1fr; }
  #plan-card .plan-cat { min-width: 0; padding: 12px 16px; }
  #plan-card .plan-cat b { font-size: 1.7rem; }
  #plan-card .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- METAR & TAF PAGE ------------------------------------------------------------ */
#view-metartaf { gap: 20px; }
#view-metartaf > .card > h2:first-child { margin-top: 0; }
.dc-wrap { margin: 14px 0 4px; }
.dc-h { margin: 0 0 10px; font-family: var(--font-head); font-size: .98rem; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.dc-card { --c: var(--text-dim); display: grid; gap: 3px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, var(--bg-2)); animation: tl-grow .45s var(--ease-out, ease) both; transform-origin: 50% 0; }
.dc-card b { font: 700 .98rem var(--font-mono); color: var(--c); }
.dc-card span { font-size: .8rem; line-height: 1.5; color: var(--text-dim); }
.dc-card.k-wind { --c: var(--azure); } .dc-card.k-vis { --c: var(--vfr); } .dc-card.k-cloud { --c: var(--warn-text); }
.dc-card.k-temp { --c: var(--gold-2); } .dc-card.k-qnh { --c: var(--lifr); } .dc-card.k-wx { --c: var(--ifr); }
.dc-card.k-chg { --c: var(--text); } .dc-card.k-id, .dc-card.k-time { --c: var(--text-dim); }
.hc-wrap { display: grid; gap: 14px; margin: 4px 0 16px; }
.hc-ribbon-wrap { padding: 12px 16px 14px; border-radius: 16px; background: var(--bg-2); }
.hc-rh { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .74rem; color: var(--text-faint); }
.hc-rh b { font-size: .84rem; color: var(--text); }
.hc-ribbon { position: relative; height: 18px; border-radius: 999px; background: var(--bg-card); overflow: hidden; direction: ltr; }
.hc-ribbon i { position: absolute; top: 0; bottom: 0; background: var(--c); }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.hc-card { padding: 12px 14px 10px; border-radius: 16px; background: var(--bg-2); min-width: 0; }
.hc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.hc-top small { font-size: .74rem; font-weight: 600; color: var(--text-faint); } .hc-top b { font: 700 1.05rem var(--font-mono); }
.hc-svg { display: block; width: 100%; height: 74px; overflow: visible; }
.hc-line { fill: none; stroke: var(--azure); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hc-area { fill: color-mix(in srgb, var(--azure) 13%, transparent); }
.hc-dot { fill: var(--azure); stroke: var(--bg-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hc-gust { fill: var(--warn-text); }
.hc-mm { display: flex; justify-content: space-between; margin-top: 2px; font: 600 .66rem var(--font-mono); color: var(--text-faint); }
.hc-note { margin: 6px 0 0; font-size: .72rem; color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) { .dc-card { animation: none; } }

@media (max-width: 640px) { .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-card { padding: 9px 11px; } .dc-card span { font-size: .74rem; } .dc-card b { font-size: .88rem; overflow-wrap: anywhere; } .hc-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- SIGMET: regional picture --------------------------------------------------- */
.sg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 4px 0 14px; }
.sg-range { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--bg-2); }
.sg-rb { padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim); font: 700 .76rem var(--font-mono); cursor: pointer; transition: background-color .2s, color .2s; }
.sg-rb:hover { color: var(--text); } .sg-rb.on { background: var(--gold); color: #1a0e0c; }
.sg-sum { padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.sg-sum.ok { background: color-mix(in srgb, var(--vfr) 18%, var(--bg-2)); color: var(--vfr); }
.sg-sum.warn { background: color-mix(in srgb, var(--warn-text) 20%, var(--bg-2)); color: var(--warn-text); }
.sg-sum.alert { background: var(--ifr); color: #fff; }
.sg-body { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.sg-map { padding: 10px; border-radius: 22px; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--azure) 9%, var(--bg-2)), var(--bg-2) 72%); }
.sg-svg { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; direction: ltr; }
.sg-ring { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.sg-rl { fill: var(--text-faint); font: 600 9px var(--font-mono); }
.sg-cl { fill: var(--text-dim); font: 700 11px var(--font-mono); } .sg-cl.n { fill: var(--gold); }
.sg-poly { fill: color-mix(in srgb, var(--c, var(--azure)) 26%, transparent); stroke: var(--c, var(--azure)); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s, stroke-width .2s; }
.sg-poly.sev-high { --c: var(--ifr); } .sg-poly.sev-mid { --c: var(--warn-text); } .sg-poly.sev-low { --c: var(--azure); }
.sg-poly.hl { fill: color-mix(in srgb, var(--c) 52%, transparent); stroke-width: 3; }
.sg-ref circle { fill: var(--text-faint); } .sg-ref text { fill: var(--text-dim); font: 600 8px var(--font-mono); paint-order: stroke; stroke: var(--bg-2); stroke-width: 3px; }
.sg-ap circle { fill: var(--gold); stroke: var(--bg-2); stroke-width: 2; } .sg-ap text { fill: var(--text); font: 700 10px var(--font-mono); paint-order: stroke; stroke: var(--bg-2); stroke-width: 3px; }
.sg-list { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; padding-inline-end: 2px; }
.sg-item { --c: var(--azure); display: grid; gap: 4px; padding: 12px 14px 12px 18px; border-radius: 16px; background: color-mix(in srgb, var(--c) 9%, var(--bg-2)); box-shadow: inset 4px 0 0 var(--c); outline: none; transition: background-color .2s, transform .25s var(--ease-spring, ease); }
:root[dir="rtl"] .sg-item { padding: 12px 18px 12px 14px; box-shadow: inset -4px 0 0 var(--c); }
.sg-item.sev-high { --c: var(--ifr); } .sg-item.sev-mid { --c: var(--warn-text); } .sg-item.sev-low { --c: var(--azure); }
.sg-item.hl, .sg-item:focus-visible { background: color-mix(in srgb, var(--c) 20%, var(--bg-2)); transform: translateX(-3px); }
:root[dir="rtl"] .sg-item.hl { transform: translateX(3px); }
.sg-ih { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sg-ih b { font-family: var(--font-head); font-size: .98rem; } .sg-ih em { font-style: normal; font-weight: 600; color: var(--text-dim); font-size: .85em; }
.sg-cov { padding: 2px 10px; border-radius: 999px; background: var(--ifr); color: #fff; font-size: .7rem; font-weight: 700; }
.sg-im { font-size: .78rem; line-height: 1.55; color: var(--text-dim); }
.sg-none { margin: 0; padding: 18px; border-radius: 16px; background: var(--bg-2); font-size: .86rem; color: var(--text-dim); }
@media (max-width: 900px) { .sg-body { grid-template-columns: 1fr; } .sg-list { max-height: none; } }

/* ---------- NOTAM: summary, sort, collapse, map ------------------------------------------ */
.nt-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.nt-sc { padding: 12px 14px; border-radius: 16px; background: var(--bg-2); display: grid; gap: 2px; }
.nt-sc b { font: 700 1.7rem/1 var(--font-head); font-variant-numeric: tabular-nums; } .nt-sc span { font-size: .72rem; font-weight: 600; color: var(--text-dim); }
.nt-sc.alert { background: color-mix(in srgb, var(--ifr) 16%, var(--bg-2)); } .nt-sc.alert b { color: var(--ifr); }
.nt-sc.warn { background: color-mix(in srgb, var(--warn-text) 16%, var(--bg-2)); } .nt-sc.warn b { color: var(--warn-text); }
.nt-sc.info { background: color-mix(in srgb, var(--azure) 14%, var(--bg-2)); } .nt-sc.info b { color: var(--azure); }
.nt-row { display: flex; gap: 10px; flex-wrap: wrap; } .nt-row .nt-search { flex: 1 1 220px; width: auto; }
.nt-sortsel { padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: inherit; font-size: .88rem; }
.nt-sortsel:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 106, 95, .2); }
.nt-chip.t-soon { background: color-mix(in srgb, var(--azure) 22%, var(--bg-card)); color: var(--azure); }
.notam-text.nt-clamp:not(.open) { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nt-actions { display: flex; gap: 8px; justify-content: flex-end; }
.nt-more, .nt-copy { padding: 5px 13px; border: 0; border-radius: 999px; background: var(--bg-card); color: var(--text-dim); font: 700 .72rem var(--font); cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease-spring, ease); }
.nt-more:hover, .nt-copy:hover { background: var(--gold); color: #1a0e0c; transform: translateY(-2px); }
#notam-list .notam-item.nt-flash { animation: nt-flash 1.6s ease; }
@keyframes nt-flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25% { box-shadow: 0 0 0 4px var(--gold); } }
#notam-list .notam-item.hl { background: color-mix(in srgb, var(--azure) 12%, var(--bg-2)); }
.nt-mapbox { margin: 4px 0 16px; padding: 14px 16px 16px; border-radius: 20px; background: var(--bg-2); }
.nt-map-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; font-size: .74rem; color: var(--text-faint); } .nt-map-h b { font-size: .88rem; color: var(--text); }
.nt-map-b { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 18px; align-items: center; }
.nt-svg { display: block; width: 100%; height: auto; direction: ltr; }
.nt-shape { stroke: var(--c); stroke-width: 1.8; fill: color-mix(in srgb, var(--c) 24%, transparent); stroke-linejoin: round; cursor: pointer; vector-effect: non-scaling-stroke; transition: fill .2s; }
.nt-shape.hi { --c: var(--ifr); } .nt-shape.lo { --c: var(--azure); } .nt-shape.ln { fill: none; } .nt-shape.pt { fill: var(--c); }
.nt-shape.hl { fill: color-mix(in srgb, var(--c) 55%, transparent); stroke-width: 3; }
.nt-legend { display: grid; gap: 8px; }
.nt-lg { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 12px; background: var(--bg-card); color: var(--text); text-align: start; font: inherit; cursor: pointer; transition: background-color .2s; }
.nt-lg.hl, .nt-lg:hover { background: color-mix(in srgb, var(--gold) 14%, var(--bg-card)); }
.nt-lg b { font: 700 .74rem var(--font-mono); direction: ltr; } .nt-lg span { font-size: .76rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; } .nt-lg em { font: 700 .74rem var(--font-mono); font-style: normal; color: var(--ifr); }
@media (max-width: 700px) { .nt-map-b { grid-template-columns: 1fr; } .nt-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { #notam-list .notam-item.nt-flash { animation: none; } }

/* ---------- HELICOPTER: readiness strip and vertical profile --------------------------------- */
.brief.ho-ok { --c: var(--vfr); --on-c: #07110b; } .brief.ho-warn { --c: var(--warn-text); --on-c: #1a1204; } .brief.ho-alert { --c: var(--ifr); --on-c: #fff; }
:root[data-theme="light"] .brief.ho-ok { --on-c: #fff; } :root[data-theme="light"] .brief.ho-warn { --on-c: #fff; }
.hv-split { display: grid; grid-template-columns: minmax(240px, 420px) minmax(340px, 1fr); gap: 18px; align-items: start; }   /* the table keeps 340px beside the chart */
.hv-wrap { container: hvwrap / inline-size; }
@container hvwrap (max-width: 600px) { .hv-split { grid-template-columns: 1fr; } }
@container hvwrap (max-width: 300px) {   /* the smallest phones: tighter padding so the speed still has room */
  .hv-prof { padding: 8px 6px; }
  .hv-cols, .hv-row { grid-template-columns: 50px 30px minmax(0, 1fr) 62px; gap: 4px; padding-inline: 4px; }
  .hv-cols { white-space: nowrap; } .hv-spd em { padding-inline: 6px; }
}
.hv-chart { padding: 10px 8px 6px; border-radius: 18px; background: var(--bg-2); }
.vc-svg { display: block; width: 100%; max-width: 460px; margin-inline: auto; height: auto; direction: ltr; }
.vc-g { stroke: var(--border-strong); stroke-width: 1; opacity: .5; } .vc-g.v { stroke-dasharray: 2 5; } .vc-g.zero { stroke: var(--azure); opacity: .8; stroke-dasharray: 5 4; }
.vc-l { fill: var(--text-faint); font: 600 9px var(--font-mono); } .vc-cap { fill: var(--text-dim); font: 600 10px var(--font); }
.vc-ice { fill: color-mix(in srgb, var(--azure) 20%, transparent); stroke: color-mix(in srgb, var(--azure) 55%, transparent); stroke-width: 1; stroke-dasharray: 4 3; animation: vc-pulse 3.2s ease-in-out infinite; }
@keyframes vc-pulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.vc-it { fill: var(--azure); font: 700 9.5px var(--font); }
.vc-z { stroke: var(--azure); stroke-width: 1.6; } .vc-zt { fill: var(--azure); font: 700 10px var(--font-mono); }
.vc-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.vc-d { stroke: var(--bg-2); stroke-width: 2; }
.vc-w { color: var(--azure); stroke: var(--azure); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vc-svg text:not(.vc-l):not(.vc-cap):not(.vc-it):not(.vc-zt) { fill: var(--text-dim); font: 700 10px var(--font-mono); }
@media (max-width: 900px) { .hv-split { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .vc-ice { animation: none; } }

/* ---------- BULLETIN: wind ranges, sea heights, tags ---------------------------------------- */
.bl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tags span { padding: 3px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, var(--bg-card)); color: var(--c); font-size: .74rem; font-weight: 700; }
.bl-bigwrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; }
.bl-peak { display: grid; gap: 2px; padding: 6px 12px; border-radius: 12px; background: var(--bg-card); } .bl-peak small { font-size: .68rem; font-weight: 600; color: var(--text-faint); } .bl-peak b { font: 700 1.05rem var(--font-mono); color: var(--warn-text); }
.bl-seas { display: grid; gap: 8px; }
.bl-sea-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; font-size: .8rem; color: var(--text-dim); }
.bl-sea-bar { position: relative; height: 10px; border-radius: 999px; background: var(--bg-card); } .bl-sea-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--c); }
.bl-sea-row b { font: 700 .86rem var(--font-mono); color: var(--text); }
/* ---------- RUNWAYS: limit badge and 24 h components -------------------------------------------- */
.rw-end.over { box-shadow: inset 0 0 0 2px var(--ifr); background: color-mix(in srgb, var(--ifr) 12%, var(--bg-card)); }
.rw-over { padding: 1px 9px; border-radius: 999px; background: var(--ifr); color: #fff; font: 700 .68rem var(--font); }
.rf-wrap { display: grid; gap: 12px; margin: 0 0 20px; }
.rf-title { margin: 0; font-family: var(--font-head); font-size: 1rem; }
.rf-card { padding: 12px 16px 12px; border-radius: 18px; background: var(--bg-2); }
.rf-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: .84rem; } .rf-h span { font: 600 .74rem var(--font-mono); color: var(--text-faint); }
.rf-svg { display: block; width: 100%; height: auto; direction: ltr; }
.rf-g { stroke: var(--border-strong); stroke-width: 1; opacity: .5; } .rf-g.z { opacity: .9; stroke-dasharray: 4 3; }
.rf-l { fill: var(--text-faint); font: 600 9px var(--font-mono); }
.rf-hw, .rf-xw { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rf-hw { stroke: var(--azure); } .rf-xw { stroke: var(--warn-text); }
.rf-tail { fill: color-mix(in srgb, var(--ifr) 14%, transparent); }
.rf-lim { stroke: var(--ifr); stroke-width: 1.5; stroke-dasharray: 6 4; } .rf-limt { fill: var(--ifr); font: 700 9.5px var(--font); }
.rf-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .74rem; color: var(--text-dim); }
.rf-leg span::before { content: ""; display: inline-block; width: 18px; height: 4px; margin-inline-end: 6px; border-radius: 3px; vertical-align: middle; }
.rf-leg .a::before { background: var(--azure); } .rf-leg .b::before { background: var(--warn-text); } .rf-leg em { font-style: normal; margin-inline-start: auto; color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .bl-sea-row { grid-template-columns: 78px 1fr auto; } }

/* ---------- RUNWAYS: the side the wind comes from --------------------------------------------- */
.rw-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.rw-side { padding: 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--warn-text) 20%, var(--bg-card)); color: var(--warn-text); font: 700 .74rem var(--font); }
.rw-side.over { background: var(--ifr); color: #fff; }
.rw-xwa line { stroke: var(--warn-text); stroke-width: 3.4; stroke-linecap: round; } .rw-xwa path { fill: none; stroke: var(--warn-text); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.rw-xwa.over line, .rw-xwa.over path { stroke: var(--ifr); }
.rw-xwl { fill: var(--text); font: 700 13px var(--font-mono); } .rw-xws { fill: var(--text-dim); font: 600 10px var(--font); }
.rw-xwa text { direction: ltr; }   /* labels always start just right of the arrow, in Arabic too */

/* ---------- PHONES: nothing may make the page wider than the screen ----------------------------
   One box wider than the screen makes iPhone Safari zoom the whole page out, so the other boxes look
   narrower than it and an empty strip appears on the right. */
.home-col { grid-template-columns: minmax(0, 1fr); }   /* the column used to grow to the runway table's width */
@media (max-width: 640px) { .topbar-controls { flex-wrap: wrap; justify-content: center; max-width: 100%; } }   /* small phones: the voice menu drops to its own line */
#runway-table-wrap { container: rwtable / inline-size; }
@container rwtable (max-width: 440px) {   /* phones: the head/cross table becomes one block per runway */
  #runway-table-wrap thead { display: none; }
  #runway-table-wrap table, #runway-table-wrap tbody { display: block; }
  #runway-table-wrap tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  #runway-table-wrap td { display: block; padding: 0; border: 0; text-align: start; }
  #runway-table-wrap td:first-child { flex-basis: 100%; }
  #runway-table-wrap td:first-child br { display: none; }
  #runway-table-wrap td:first-child .hint { margin-inline-start: 8px !important; unicode-bidi: plaintext; }   /* Arabic note + "12L (119°)" keep their order */
  #runway-table-wrap .wind-flag { white-space: normal; }
}
#plan-card .plan-controls label, #plan-card .plan-controls select, #plan-card .plan-controls input { min-width: 0; max-width: 100%; }
#plan-card .plan-controls select, #plan-card .plan-controls input { height: 42px; }
#plan-time { -webkit-appearance: none; appearance: none; display: block; line-height: 1.25; text-align: start; }   /* iPhone draws its own wider, centred time box otherwise */
#plan-time::-webkit-date-and-time-value { text-align: start; margin: 0; }
.plan-presets { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ext-ic { width: .9em; height: .9em; flex: none; }   /* the link buttons already space their contents */
:root[dir="rtl"] .ext-ic { transform: scaleX(-1); }

/* the floating menu button steps aside while reading downwards, and comes back on any scroll up */
@media (max-width: 900px) {
  .menu-toggle { transition: top .12s linear, transform .28s var(--ease-out, ease), opacity .2s; }
  .menu-toggle.away { transform: translateY(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .menu-toggle { transition: none; } }
