/* SKYTICAL site styles — everything the design layers on top of modernist.css,
   plus classes replacing the design's inline styles where JS needs hooks. */

/* — from the design's helmet <style> block — */
/* boxed layout: the page sheet is centered, the body shows a darker gutter */
html, body { margin: 0; background: color-mix(in srgb, var(--color-text) 12%, var(--color-bg)); }
body, h1, h2, h3, h4, h5, h6, .btn, .card-title, .nav-brand {
  font-family: "Archivo", "Noto Sans TC", system-ui, sans-serif;
}
a:hover { color: var(--color-accent-600); }

[data-theme="dark"] {
  --color-bg: #171514;
  --color-surface: #221f1e;
  --color-text: #f3f2f2;
  --color-divider: color-mix(in srgb, #f3f2f2 35%, transparent);
  --color-neutral-100: #2d2b2b;
  --color-neutral-200: #353232;
  --color-neutral-300: #444141;
  --color-neutral-800: #eae7e7;
  --color-neutral-900: #f8f4f4;
  --color-accent-100: #43150c;
  --color-accent-200: #5c190d;
  --color-accent-800: #ffc4b8;
  --color-accent-2-100: #43150c;
  --color-accent-2-800: #ffc4b9;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 3px 10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
}

@keyframes avwire-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* — LIVE ticker: each flash links to its story. Affordance is the accent
     ↗ mark + hover color (owner: clickable-looking but NO underline);
     the track pauses on hover so items can actually be clicked. — */
.marquee-track:hover { animation-play-state: paused; }
.ticker-pass { padding-right: 70px; font-size: 13px; white-space: nowrap; }
.ticker-item { color: inherit; text-decoration: none; }
a.ticker-item:hover { color: var(--color-accent); }
a.ticker-item:hover .ticker-time { color: var(--color-accent); }
.ticker-time { font-weight: 800; }
.ticker-time.hot { color: var(--color-accent); }
.ticker-go {
  font-size: 10px; font-weight: 800; color: var(--color-accent);
  margin-left: 4px; vertical-align: 2px;
}
.ticker-sep { padding: 0 18px; color: color-mix(in srgb, var(--color-text) 35%, transparent); }
@keyframes avwire-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* — chrome — */
.page {
  min-height: 100vh; max-width: 1280px; margin: 0 auto;
  background: var(--color-bg); color: var(--color-text);
  border-left: 1px solid var(--color-divider);
  border-right: 1px solid var(--color-divider);
  box-shadow: 0 0 32px rgba(0, 0, 0, .08);
}
.pulse-dot { width: 8px; height: 8px; background: var(--color-accent); animation: avwire-pulse 2s infinite; }
.marquee-track {
  display: flex; width: max-content; white-space: nowrap;
  animation: avwire-marquee var(--ticker-duration, 80s) linear infinite;
}
.brand-link {
  display: inline-flex; align-items: center; color: inherit;
  text-decoration: none; flex: 0 0 320px; min-width: 250px;
}
.brand-logo {
  display: block; width: 100%; height: auto; max-width: 320px;
  background: transparent;
}
.footer-logo {
  display: block; width: min(100%, 300px); height: auto;
  background: transparent;
}
/* — Google-style search, deliberately the first row of every page — */
.header-search-row {
  padding: 11px 20px; border-bottom: 1px solid var(--color-divider);
  background: var(--color-bg);
}
.header-search-form {
  width: min(720px, 100%); min-height: 48px; margin: 0 auto;
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 40px;
  align-items: center; gap: 9px; padding: 3px 5px 3px 16px;
  border: 1px solid color-mix(in srgb, var(--color-text) 24%, transparent);
  border-radius: 999px; background: var(--color-surface);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-text) 12%, transparent);
}
.header-search-form:focus-within {
  border-color: color-mix(in srgb, var(--color-accent) 70%, var(--color-divider));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--color-text) 18%, transparent);
}
.header-search-icon, .header-search-submit svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
.header-search-icon { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.header-search-input {
  min-width: 0; width: 100%; border: 0; outline: 0; padding: 9px 0;
  background: transparent; color: var(--color-text); font: inherit;
  font-size: 15px;
}
.header-search-input::placeholder {
  color: color-mix(in srgb, var(--color-text) 52%, transparent);
}
.header-search-clear, .header-search-submit {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer; font-family: inherit;
}
.header-search-clear {
  width: 32px; height: 32px; background: transparent; color: var(--color-text);
  font-size: 24px; font-weight: 400; line-height: 1; opacity: 0; pointer-events: none;
}
.header-search-input:not(:placeholder-shown) + .header-search-clear { opacity: 1; pointer-events: auto; }
.header-search-clear:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
.header-search-submit {
  width: 40px; height: 40px; background: var(--color-accent); color: var(--color-bg);
}
.header-search-submit:hover { background: var(--color-accent-600); }
.header-search-clear:focus-visible, .header-search-submit:focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px;
}

.utility-bar { border-bottom: 1px solid var(--color-divider); }
.utility-row {
  padding: 6px 20px; display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px; font-size: 12px;
}
.utility-date, .utility-clock { letter-spacing: .06em; }
.utility-clock { font-weight: 600; }
.utility-update { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.brand-shell { border-bottom: 2px solid var(--color-divider); }
.brand-row {
  padding: 8px 20px; display: flex; align-items: center;
  gap: clamp(36px, 4vw, 56px);
}
.brand-link {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  color: inherit; text-decoration: none;
}
.brand-link:hover { color: inherit; }
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 34px; display: flex;
  align-items: center; justify-content: center; background: var(--color-accent);
  color: var(--color-bg); font-size: 15px; font-weight: 800;
}
.brand-copy { min-width: 0; }
.brand-name { font-size: 20px; font-weight: 800; line-height: 1.05; letter-spacing: -.015em; }
.brand-name span { color: var(--color-accent); }
.brand-tagline { margin-top: 2px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.nav-toggle {
  display: none; min-height: 44px; padding: 8px 11px; align-items: center; gap: 7px;
  border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text);
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.nav-toggle-icon { font-size: 18px; line-height: 1; }
.ticker-shell { border-bottom: 2px solid var(--color-divider); display: flex; align-items: stretch; min-width: 0; }
.ticker-label {
  padding: 7px 16px; display: flex; align-items: center; flex-shrink: 0;
  background: var(--color-accent); color: var(--color-bg); font-size: 12px;
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.ticker-window { min-width: 0; overflow: hidden; flex: 1; display: flex; align-items: center; }

.nav-link {
  cursor: pointer; font-size: 14px; font-weight: 600; padding: 8px 14px;
  border-bottom: 2px solid transparent; color: var(--color-text); text-decoration: none;
}
.nav-link:hover { color: var(--color-accent); }
.nav-link.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.site-nav {
  display: flex; gap: 2px; margin-left: auto; white-space: nowrap;
}

/* — segmented controls (language links / theme + filter buttons) — */
.seg-btn {
  appearance: none; border: 0; margin: 0; background: transparent;
  color: var(--color-text); font-family: inherit; font-weight: 400;
  line-height: inherit; cursor: pointer; display: inline-flex; align-items: center;
  text-decoration: none;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--color-divider); }
.seg-btn.active { background: var(--color-accent); color: var(--color-bg); }
a.seg-btn:hover { color: var(--color-text); }
a.seg-btn.active:hover { color: var(--color-bg); }
.seg-lang .seg-btn { padding: 4px 11px; font-size: 12px; }
.seg-cat .seg-btn { padding: 5px 12px; font-size: 12px; }
.seg-sev .seg-btn { padding: 6px 14px; font-size: 12.5px; }
/* keep the segmented controls intact on narrow screens: wrap, don't clip */
.seg-lang { flex-shrink: 0; }
/* visible focus ring on segmented controls (mirrors modernist.css .seg-opt) */
.seg-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.seg-btn.active:focus-visible { outline-color: var(--color-bg); }

/* — home grid — */
.home-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px; align-items: stretch;
}
.rail-left { border-right: 2px solid var(--color-divider); padding: 20px; }
.center-col { padding: 20px 24px; min-width: 0; }
.rail-right { border-left: 2px solid var(--color-divider); padding: 20px; }

.flash-row {
  padding: 9px 0; border-bottom: 1px solid var(--color-divider);
  display: flex; gap: 10px; align-items: baseline;
  color: inherit; text-decoration: none;
}
a.flash-row:hover { color: inherit; }
.flash-time {
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.flash-time.hot { color: var(--color-accent); }
.flash-pin,
.ticker-pin {
  display: inline-block;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font: 800 8px/1 monospace;
  letter-spacing: .08em;
  padding: 2px 3px;
  margin-right: 6px;
  vertical-align: 1px;
}

.dot { width: 7px; height: 7px; background: var(--color-accent); flex-shrink: 0; }
.dot.err { background: color-mix(in srgb, var(--color-text) 30%, transparent); }

.hero-ph {
  height: 280px;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--color-text) 7%, transparent) 0 12px, transparent 12px 24px), var(--color-surface);
  border: 1px solid var(--color-divider);
  display: flex; align-items: flex-end; padding: 10px;
}
/* real news photos: full frame, full color — never crop away the subject */
.hero-img {
  width: 100%; height: auto; max-height: 420px; object-fit: contain;
  background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface));
  border: 1px solid var(--color-divider);
}

.feed-row {
  display: grid; grid-template-columns: 48px 84px minmax(0, 1fr) auto;
  grid-template-areas:
    "time category copy source"
    ". . summary summary";
  column-gap: 14px; row-gap: 0; align-items: start; padding: 13px 0;
  border-top: 1px solid var(--color-divider);
  color: inherit; text-decoration: none; cursor: pointer;
}
.feed-row:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); color: inherit; }
.feed-time { grid-area: time; font-size: 13px; font-weight: 800; }
.feed-category { grid-area: category; justify-content: flex-start; }
.feed-copy { grid-area: copy; min-width: 0; }
.feed-source {
  grid-area: source;
  padding: 3px 9px; border: 1px solid var(--color-divider);
  font-size: 11px; white-space: nowrap;
}
.hero-title { margin: 8px 0 10px; font-size: 34px; line-height: 1.15; }
.hero-meta { display: flex; gap: 16px; align-items: baseline; margin-top: 10px; font-size: 12px; }

/* Apple-style glanceable summary: borderless and aligned with its headline.
   The private iOS glyph is represented by an original SVG. */
.summary-preview {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: start; gap: 8px; width: 100%; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.summary-preview__label {
  display: inline-flex; align-items: center; padding-top: 2px;
  color: color-mix(in srgb, #6d5bd0 84%, var(--color-text));
  line-height: 1;
}
.summary-preview__icon {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.summary-preview__text {
  min-width: 0; color: color-mix(in srgb, var(--color-text) 82%, transparent);
  font-size: 13.5px; font-weight: 600; line-height: 1.58;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; max-height: 3.16em; overflow: hidden;
  overflow-wrap: anywhere; text-overflow: ellipsis;
}
.summary-preview--hero { margin: 0; }
.summary-preview--feed { grid-area: summary; margin-top: 7px; }
.summary-preview--feed .summary-preview__icon { width: 15px; height: 15px; }
.summary-preview--feed .summary-preview__text {
  font-size: 12.5px; line-height: 1.55; max-height: 3.1em;
}

[data-theme="dark"] .summary-preview__label {
  color: color-mix(in srgb, #b8adff 88%, var(--color-text));
}

/* — article — */
.article-page { max-width: 860px; margin: 0 auto; padding: 28px 20px 64px; }
.article-title { margin: 14px 0 12px; font-size: 38px; line-height: 1.18; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline;
  padding-bottom: 16px; margin-bottom: 24px; border-bottom: 2px solid var(--color-divider);
  font-size: 12.5px;
}
.article-sources { margin-top: 28px; padding: 16px 20px 12px; border: 2px solid var(--color-divider); }
.article-source-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 13.5px; }
.article-source-row a { min-width: 0; overflow-wrap: anywhere; }
.search-hit {
  padding: 0 .08em; border-radius: 3px;
  background: color-mix(in srgb, #f4d35e 38%, transparent);
  color: inherit; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.search-hit-pulse { animation: search-hit-pulse 750ms ease-in-out 4; }
@keyframes search-hit-pulse {
  0%, 100% {
    background: color-mix(in srgb, #f4d35e 38%, transparent);
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    background: color-mix(in srgb, #f4d35e 58%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, #f4d35e 13%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .search-hit-pulse { animation: none; }
}

.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.radar-stat-link { color: inherit; text-decoration: none; }
.radar-stat-link:hover {
  color: inherit;
  background: color-mix(in srgb, var(--color-accent) 7%, transparent);
}
.incident-article-link,
.incident-date-link {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 55%, transparent);
  text-underline-offset: 3px;
}
.incident-article-link:hover,
.incident-date-link:hover { color: var(--color-accent); }

/* — Taiwan civil-flight radar — */
.radar-page { padding: 24px 28px 32px; }
.radar-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 18px;
}
.radar-header h1 { margin: 5px 0 6px; font-size: clamp(28px, 4vw, 46px); }
.radar-header p { max-width: 760px; margin: 0; line-height: 1.7; }
.radar-live-badge {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  border: 1px solid var(--color-divider); padding: 7px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
}
.radar-shell { border: 2px solid var(--color-divider); }
.radar-toolbar {
  display: flex; gap: 10px; align-items: center; padding: 12px;
  border-bottom: 1px solid var(--color-divider);
}
.radar-search { flex: 1; min-width: 180px; }
.radar-search input {
  width: 100%; min-height: 38px; border: 1px solid var(--color-divider);
  background: var(--color-bg); color: var(--color-text); padding: 8px 11px;
  font: inherit;
}
.radar-search input:focus { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.radar-callsign-toggle {
  display: inline-flex; align-items: stretch; flex-shrink: 0;
  min-height: 38px; border: 1px solid var(--color-divider);
}
.radar-callsign-label {
  display: inline-flex; align-items: center; padding: 0 9px;
  border-right: 1px solid var(--color-divider);
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.radar-callsign-toggle .seg-btn {
  min-width: 48px; justify-content: center; padding: 6px 9px; font-size: 11px;
}
.radar-check { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.radar-check input { accent-color: var(--color-accent); }
.radar-status-row {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  min-height: 39px; padding: 8px 12px; border-bottom: 1px solid var(--color-divider);
  font-size: 12px;
}
.radar-state { font-weight: 800; }
.radar-state::before { content: "●"; margin-right: 7px; }
.radar-state.live { color: #167348; }
.radar-state.loading { color: var(--color-accent); }
.radar-state.error { color: #a82516; }
.radar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 650px; }
.radar-map { min-height: 650px; background: #d8e3e9; z-index: 0; }
.radar-list-panel {
  min-width: 0; border-left: 1px solid var(--color-divider);
  background: var(--color-bg); overflow: hidden;
}
.radar-list-panel h2 {
  margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--color-divider);
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.radar-list { max-height: 606px; overflow-y: auto; }
.radar-list-item {
  width: 100%; display: grid; gap: 3px; padding: 10px 14px;
  text-align: left; border: 0; border-bottom: 1px solid var(--color-divider);
  background: transparent; color: var(--color-text); font: inherit; cursor: pointer;
}
.radar-list-item:hover, .radar-list-item:focus-visible {
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}
.radar-list-item strong { color: var(--color-accent); letter-spacing: .04em; }
.radar-list-item > span { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-list-item > strong.radar-callsign-split,
.radar-popup-title.radar-callsign-split {
  display: inline-flex; align-items: baseline; gap: .12em; width: max-content;
}
.radar-list-item .radar-callsign-carrier { color: var(--color-accent); font-weight: 800; }
.radar-list-item .radar-callsign-flight {
  color: color-mix(in srgb, var(--color-accent) 52%, var(--color-text));
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.radar-empty { padding: 16px; font-size: 12px; }
.radar-notes {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px;
  margin-top: 16px; font-size: 11.5px; line-height: 1.65;
}
.radar-notes p { margin: 0; }
.radar-plane-wrap { background: transparent; border: 0; }
.radar-plane {
  display: block; width: 24px; height: 24px; color: #ec3013;
  font-size: 20px; line-height: 24px; text-align: center;
  transform: rotate(var(--heading)); transform-origin: 50% 50%;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .9));
}
.radar-plane.ground { color: #555; font-size: 15px; }
.radar-popup { min-width: 220px; color: #171514; font-family: "Archivo", "Noto Sans TC", sans-serif; }
.radar-popup-title { display: block; color: #ec3013; font-size: 16px; margin-bottom: 7px; }
.radar-popup-title .radar-callsign-carrier { color: #ec3013; }
.radar-popup-title .radar-callsign-flight {
  color: #655e5a; font-variant-numeric: tabular-nums;
}
.radar-popup-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 12px; }
.radar-popup-row .text-muted { color: #625b57; }
.radar-popup-row b { text-align: right; }

/* — footer — */
.footer-grid {
  padding: 24px 20px 32px;
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px;
}
.footer-changelog-button { margin-top: 14px; font-size: 12px; }

/* — site changelog — */
.changelog-page {
  max-width: 960px; margin: 0 auto; padding: 32px 20px 72px;
}
.changelog-page > h1 {
  margin: 7px 0 10px; font-size: clamp(32px, 5vw, 52px);
}
.changelog-sub { max-width: 720px; font-size: 15px; line-height: 1.75; }
.changelog-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--color-divider); margin: 24px 0 16px;
}
.changelog-summary > div { padding: 16px 18px; }
.changelog-summary > div + div { border-left: 1px solid var(--color-divider); }
.changelog-summary strong { display: block; font-size: 20px; }
.changelog-summary span {
  display: block; margin-top: 3px; color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.changelog-notice {
  border-left: 5px solid var(--color-accent); background: var(--color-surface);
  padding: 13px 16px; font-size: 12.5px; line-height: 1.7;
}
.changelog-notice p { margin: 0 0 3px; }
.changelog-history { margin-top: 34px; }
.changelog-group {
  display: grid; grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px; padding: 24px 0; border-top: 2px solid var(--color-divider);
}
.changelog-group > time {
  font-weight: 800; font-size: 14px; letter-spacing: .04em;
}
.changelog-entry {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 0 0 17px; margin: 0 0 17px;
  border-bottom: 1px solid var(--color-divider);
}
.changelog-entry:last-child { margin-bottom: 0; }
.changelog-entry-copy { min-width: 0; }
.changelog-entry h2 {
  margin: 7px 0 0; font-size: 16px; line-height: 1.45;
}
.changelog-commit {
  flex-shrink: 0; align-self: center; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-decoration: none;
}

/* — full-text news search — */
.search-page { padding: 34px 28px 56px; }
.search-header { max-width: 820px; margin-bottom: 24px; }
.search-header h1 {
  margin: 6px 0 8px; font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -.025em;
}
.search-header p { margin: 0; font-size: 14px; line-height: 1.8; }
.news-search { max-width: 960px; }
.search-status { margin: 14px 0 0; min-height: 24px; font-size: 13px; }
.search-results { margin-top: 8px; border-top: 2px solid var(--color-divider); }
.search-result { padding: 18px 0; border-bottom: 1px solid var(--color-divider); }
.search-result-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 11.5px;
}
.search-result-link { color: inherit; text-decoration: none; }
.search-result-link:hover { color: var(--color-accent); }
.search-result h2 { margin: 9px 0 6px; font-size: 21px; line-height: 1.35; }
.search-result p { margin: 0; font-size: 13.5px; line-height: 1.75; }
.search-result-footer {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-top: 10px; font-size: 12px;
}
.search-result-footer a { flex-shrink: 0; font-weight: 700; }

/* — responsive fallback: the design is desktop-first; below 1100px the
     three-column home grid simply stacks. — */
@media (max-width: 1100px) {
  .page { border-left: 0; border-right: 0; box-shadow: none; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .rail-left { border-right: 0; border-bottom: 2px solid var(--color-divider); }
  .rail-right { border-left: 0; border-top: 2px solid var(--color-divider); }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-row { flex-wrap: wrap; }
  .site-nav {
    order: 3; width: 100%; flex-basis: 100%; margin-left: 0; overflow-x: auto;
    padding-bottom: 2px;
  }
  .radar-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .radar-notes { grid-template-columns: 1fr; gap: 8px; }
  .changelog-group { grid-template-columns: 96px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .utility-row { padding: 8px 12px; gap: 8px 12px; }
  .utility-date { flex-basis: 100%; }
  .utility-update { margin-left: 0; }
  .brand-row {
    padding: 9px 12px; gap: 12px; flex-wrap: nowrap;
    justify-content: space-between;
  }
  .brand-link { flex: 0 1 224px; min-width: 0; }
  .brand-logo { max-width: 224px; }
  .brand-name { font-size: 18px; }
  .brand-tagline { font-size: 9px; letter-spacing: .11em; white-space: nowrap; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }
  .site-nav {
    order: 3; width: 100%; margin: 0; padding: 4px 0 0; overflow: visible;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    white-space: normal;
  }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: grid; }
  .nav-link {
    min-height: 44px; padding: 10px 12px; display: flex; align-items: center;
    border: 1px solid var(--color-divider); border-bottom-width: 1px;
  }
  .nav-link.active { border-color: var(--color-accent); }
  .ticker-label { padding: 7px 10px; font-size: 11px; letter-spacing: .08em; }
  .marquee-track { --ticker-duration: 130s; }
  .ticker-pass {
    font-family: "Noto Sans TC", sans-serif;
    font-size: 13px; font-weight: 400; line-height: 1.45; letter-spacing: 0;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  }
  .ticker-time {
    font-family: inherit; font-size: 11px; font-weight: 600;
    letter-spacing: 0; font-variant-numeric: tabular-nums;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-window { overflow-x: auto; }
  .marquee-track { animation: none; transform: none; }
  .marquee-track .ticker-pass:nth-child(2) { display: none; }
}

@media (max-width: 640px) {
  .header-search-row { padding: 9px 12px; }
  .header-search-form {
    min-height: 44px; grid-template-columns: 20px minmax(0, 1fr) auto 36px;
    gap: 7px; padding-left: 13px;
  }
  .header-search-input { font-size: 14px; padding: 7px 0; }
  .header-search-submit { width: 36px; height: 36px; }
  .page { width: 100%; overflow-x: clip; }
  .center-col { order: 1; padding: 16px 12px 20px; }
  .rail-left { order: 2; padding: 18px 12px; border-top: 2px solid var(--color-divider); border-bottom: 0; }
  .rail-right { order: 3; padding: 18px 12px; }
  .hero-title { font-size: 27px; line-height: 1.2; }
  .hero-meta { flex-wrap: wrap; gap: 7px 12px; }
  .hero-meta > :last-child { margin-left: 0 !important; }
  .feed-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "time category"
      "copy copy"
      "summary summary"
      "source source";
    gap: 7px 10px; padding: 15px 0;
  }
  .feed-category { justify-self: start; }
  .feed-source { justify-self: start; white-space: normal; }
  .summary-preview--feed { margin-top: 0; }
  .article-page { padding: 20px 12px 44px; }
  .article-title { font-size: 29px; line-height: 1.22; }
  .article-meta { gap: 7px 12px; }
  .article-meta > :last-child { margin-left: 0 !important; flex-basis: 100%; }
  .summary-preview { gap: 5px; }
  .article-sources { padding: 14px 12px 10px; }
  .article-source-row { flex-wrap: wrap; gap: 4px 8px; }
  .footer-grid { padding: 20px 12px 28px; gap: 24px; }
  .search-page { padding: 24px 14px 40px; }
  .search-result h2 { font-size: 18px; }
  .search-result-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .radar-page { padding: 18px 12px 24px; }
  .radar-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .radar-toolbar { align-items: stretch; flex-wrap: wrap; }
  .radar-search { flex-basis: 100%; }
  .radar-callsign-toggle { order: 2; }
  .radar-check { flex: 1; }
  .radar-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .radar-map { min-height: 520px; }
  .radar-list-panel { border-left: 0; border-top: 1px solid var(--color-divider); }
  .radar-list { max-height: 360px; }
  .seg-cat {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .seg-cat .seg-btn { justify-content: center; }
  .seg-cat .seg-btn:nth-child(4) { border-left: 0; }
  .seg-cat .seg-btn:nth-child(n + 4) {
    border-top: 1px solid var(--color-divider);
  }
  .seg-sev {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .seg-sev .seg-btn { justify-content: center; }
  .seg-sev .seg-btn:nth-child(4) { border-left: 0; }
  .seg-sev .seg-btn:nth-child(n + 4) {
    border-top: 1px solid var(--color-divider);
  }
  .changelog-page { padding: 24px 14px 48px; }
  .changelog-summary { grid-template-columns: 1fr; }
  .changelog-summary > div + div {
    border-left: 0; border-top: 1px solid var(--color-divider);
  }
  .changelog-group { grid-template-columns: 1fr; gap: 14px; }
  .changelog-entry { align-items: flex-start; }
}
