/* ════════════════════════════════════════════════════════
   KD9OPI — Central Indiana
   Shared Stylesheet
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  font-family: 'IBM Plex Sans', sans-serif;
  background: #f6f8fa;
  color: #24292f;
}

/* ══════════════════════════════════════════════════
   PAGE WRAPPER — header + content stacked
══════════════════════════════════════════════════ */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1rem 0;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.site-header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 0.6rem;
}

.site-header-desc {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #8b949e;
  line-height: 1.5;
  border-left: 1px solid #30363d;
  padding-left: 1.25rem;
}

.site-header-desc strong {
  font-weight: 600;
  color: #c9d1d9;
}

.site-header-nav {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #30363d;
  min-height: 32px;
}

/* ── Advisory / Warning ticker ───────────────── */
.warn-ticker-wrap {
  display: none;          /* hidden until alerts exist */
  flex: 1;
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
}
.warn-ticker-wrap.has-alerts {
  display: flex;
}

.warn-ticker-separator {
  width: 1px;
  background: #30363d;
  flex-shrink: 0;
  align-self: stretch;
}

.warn-ticker-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-width: 0;
  position: relative;
  /* Soft fade at both edges so text doesn't hard-clip */
  mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
}

.warn-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--ticker-travel)); }
}

/* Individual alert pill inside the track */
.warn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
}

/* Animated dot before each pill */
.warn-pill::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: ticker-dot-pulse 2s ease-in-out infinite;
}
@keyframes ticker-dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Thin divider between pills */
.warn-pill-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: #30363d;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Severity colour themes — matching the existing palette */
.warn-pill.severity-warning  { color: #f0883e; }   /* orange */
.warn-pill.severity-watch    { color: #d29922; }   /* amber  */
.warn-pill.severity-advisory { color: #388bfd; }   /* blue   */
.warn-pill.severity-none     { color: #3fb950; }   /* green  */

/* ── Header nav dropdown ─────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b949e;
  cursor: default;
  user-select: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-dropdown:hover .nav-dropdown-trigger {
  color: #e6edf3;
  background: #21262d;
}

.nav-dropdown-trigger svg {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #161b22;
  border: 1px solid #30363d;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(1,4,9,0.4);
  z-index: 100;
  overflow: hidden;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: #8b949e;
  font-size: 12.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-left-color 0.15s;
}
.nav-dropdown-item:not(:last-child) {
  border-bottom: 1px solid #21262d;
}
.nav-dropdown-item:hover {
  background: #21262d;
  color: #e6edf3;
  border-left-color: #388bfd;
}

.nav-dropdown-item-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #484f58;
  transition: color 0.15s;
}
.nav-dropdown-item:hover .nav-dropdown-item-icon { color: #388bfd; }

.nav-dropdown-item-text { flex: 1; line-height: 1.3; }

.nav-dropdown-item-sub {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: #484f58;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 1px;
  transition: color 0.15s;
}
.nav-dropdown-item:hover .nav-dropdown-item-sub { color: #6e7681; }

/* ══════════════════════════════════════════════════
   PAGE LAYOUT — three columns
══════════════════════════════════════════════════ */
.page-layout {
  display: grid;
  grid-template-columns: auto 1fr 338px;
  gap: 0;
  padding: 0;
  min-height: 100vh;
  align-items: start;
}

/* Left column fills full height with its own background */
.col-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #eaeef2;
  border-right: 1px solid #d0d7de;
  min-height: 100vh;
  padding: 0.75rem 0 1rem;
}

.col-center,
.col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 1rem;
}

/* ══════════════════════════════════════════════════
   LEFT COLUMN — NAVBAR
══════════════════════════════════════════════════ */

.callsign-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.2rem 0.5rem;
}

.callsign-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ea043;
  box-shadow: 0 0 6px rgba(46,160,67,0.6);
  flex-shrink: 0;
  position: relative;
}
.callsign-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid #2ea043;
  animation: ping-cs 2s ease-out infinite;
}
@keyframes ping-cs {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.callsign-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #e6edf3;
}
.callsign-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #ffff00;
  margin-top: 1px;
}

/* Cards are flat groups — no white box, no border */
.section-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

/* Section label is a plain divider, not a card header */
.section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.8rem 0.85rem 0.3rem;
  background: transparent;
  border-bottom: none;
}

.section-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #8c959f;
}

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c959f;
}

.link-list { list-style: none; }
.link-list li { border-bottom: none; }

/* Hide the redundant identical arrow icons */
.link-row-icon { display: none; }

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.42rem 0.85rem;
  text-decoration: none;
  color: #24292f;
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.15s, border-left-color 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.link-row:hover {
  background: #d8dfe6;
  border-left-color: #388bfd;
  color: #0969da;
}
.link-row.active {
  background: #d8dfe6;
  border-left-color: #388bfd;
  color: #0969da;
}

.link-row-text { flex: 1; line-height: 1.3; }

.link-row-sub {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: #8c959f;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.link-chevron {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  color: #b0b8c2;
  transition: color 0.15s, transform 0.15s;
}
.link-row:hover .link-chevron,
.link-row.active .link-chevron {
  color: #388bfd;
  transform: translateX(2px);
}

.live-badge {
  display: none;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #1a0a0a;
  color: #f85149;
  border: 1px solid #6e2020;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.live-badge.is-live { display: inline-flex; }
.live-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f85149;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.col-brand {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: #b0b8c2;
  letter-spacing: 0.06em;
  margin-top: auto;
  padding-top: 1rem;
}

/* ══════════════════════════════════════════════════
   CENTER COLUMN — WEATHER CENTER
══════════════════════════════════════════════════ */

.wc-card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  overflow: hidden;
}

.wc-widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.wc-radar-icon { width: 24px; height: 24px; flex-shrink: 0; }

.wc-header-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #57606a;
}

.wc-card-footer {
  padding: 0.65rem 1.25rem;
  border-top: 1px solid #d0d7de;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6f8fa;
}

.wc-nws-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #388bfd;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.wc-nws-link:hover { color: #1f6feb; }

.wc-refresh-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #57606a;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.wc-refresh-btn:hover { border-color: #8c959f; color: #24292f; }
.wc-refresh-btn:active { transform: scale(0.97); }
.wc-refresh-btn.spinning { pointer-events: none; opacity: 0.45; }

.wc-brand {
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #8c959f;
  letter-spacing: 0.06em;
}

/* ── Tab system ──────────────────────────────── */
.wc-tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.wc-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, background 0.2s;
  border-bottom: 2px solid transparent;
}

.wc-tab.tab-inactive {
  opacity: 0.45;
  filter: grayscale(0.4);
  border-bottom-color: transparent;
}
.wc-tab.tab-inactive:hover {
  opacity: 0.7;
  filter: grayscale(0.2);
}

.wc-tab.tab-active {
  opacity: 1;
  filter: none;
  border-bottom-color: #388bfd;
}

.wc-tab:first-child {
  border-right: 1px solid #d0d7de;
}

.wc-panel { display: none; }
.wc-panel.panel-active { display: block; }

/* Weather Story */
.ws-status-bar {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d0d7de;
  background: #f6f8fa;
}
.ws-status-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #24292f;
  flex: 1;
}
.ws-update-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #57606a;
}

.image-wrap {
  display: block;
  position: relative;
  background: #0d1117;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}
.story-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease, transform 0.35s ease;
}
.image-wrap:hover .story-img { opacity: 0.88; transform: scale(1.015); }

.image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.image-wrap:hover .image-overlay { opacity: 1; }

.overlay-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(22,27,34,0.85);
  color: #388bfd;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 4px 10px;
  backdrop-filter: blur(4px);
}

.img-placeholder {
  width: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0d1117;
  padding: 2rem;
}
.img-placeholder.hidden { display: none; }
.placeholder-icon { width: 32px; height: 32px; color: #30363d; }
.placeholder-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #484f58;
  letter-spacing: 0.06em;
  text-align: center;
}

/* AFD */
.afd-status-bar {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d0d7de;
  background: #161b22;
  transition: background 0.4s ease;
}
.afd-status-bar.state-loading { background: #161b22; }
.afd-status-bar.state-ok      { background: #0d2b1a; }
.afd-status-bar.state-error   { background: #2d1212; }

.pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.4s ease;
  position: relative;
}
.pulse-dot.active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid #2ea043;
  animation: ping-afd 1.8s ease-out infinite;
}
@keyframes ping-afd {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.dot-loading { background: #3a3f47; }
.dot-ok      { background: #2ea043; box-shadow: 0 0 6px rgba(46,160,67,0.5); }
.dot-error   { background: #f85149; }

.afd-status-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  flex: 1;
  transition: color 0.4s ease;
}
.afd-label-loading { color: #484f58; }
.afd-label-ok      { color: #3fb950; }
.afd-label-error   { color: #f85149; }

.afd-update-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #ffffff;
}

.body-layout {
  display: grid;
  grid-template-columns: 148px 1fr;
  height: 580px;
}

.nav-col {
  border-right: 1px solid #d0d7de;
  padding: 0.75rem 0;
  background: #f6f8fa;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}
.nav-btn:hover { background: #eaeef2; }
.nav-btn.active { background: #ffffff; border-left-color: #388bfd; }
.nav-btn.has-data     .nav-indicator { background: #2ea043; }
.nav-btn.no-data      .nav-indicator { background: #d0d7de; }
.nav-btn.loading-data .nav-indicator {
  background: #d0d7de;
  animation: pulse-nav 1.2s ease-in-out infinite;
}
@keyframes pulse-nav {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.nav-indicator {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  transition: background 0.3s;
}

.nav-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #57606a;
  line-height: 1.4;
  flex: 1;
}
.nav-btn.active .nav-label { color: #24292f; }

.nav-alert-icon {
  display: none;
  flex-shrink: 0;
  width: 13px; height: 13px;
  margin-top: 1px;
  align-self: flex-start;
}
.nav-alert-icon.meso-icon { color: #d29922; animation: icon-pulse 1.6s ease-in-out infinite; }
.nav-alert-icon.warn-icon { color: #f0883e; animation: icon-pulse 1.6s ease-in-out infinite; }
@keyframes icon-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.88); }
}
.nav-alert-icon.visible { display: block; }

.content-col {
  padding: 1.25rem;
  overflow-y: auto;
  position: relative;
}

.afd-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #e8ecf0; }
.afd-header.hidden { display: none; }
.afd-header-title  { font-size: 13px; font-weight: 600; color: #24292f; margin-bottom: 2px; }
.afd-header-office {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: #57606a; letter-spacing: 0.04em; margin-bottom: 3px;
}
.afd-header-issued {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: #8b949e; letter-spacing: 0.04em;
}

.afd-section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #8b949e; margin-bottom: 10px;
}

.content-text {
  font-size: 13px; line-height: 1.8;
  color: #24292f; white-space: pre-wrap;
  word-break: break-word; min-height: 120px;
  transition: opacity 0.2s;
}
.content-text.faded         { opacity: 0; }
.content-text.empty-state   { color: #8b949e; font-style: italic; }
.content-text.loading-state { color: #8b949e; font-style: italic; }

.meso-badge {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: #fff8c5; color: #9a6700;
  border: 1px solid #d4a72c;
  border-radius: 4px; padding: 2px 6px; margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════
   RIGHT COLUMN — WEATHER COLUMN
══════════════════════════════════════════════════ */

.nws-widget-header-row {
  background: #000000;
  border-radius: 10px 10px 0 0;
  padding: 0.75rem 1rem;
}

.nws-widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nws-header-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3fb950;
}

.nws-card {
  background: #f6f8fa;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
}

.nws-status-bar {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d0d7de;
  background: #f6f8fa;
  transition: background 0.4s ease;
}
.nws-status-bar.state-loading  { background: #f6f8fa; }
.nws-status-bar.state-ok       { background: #f6f8fa; }
.nws-status-bar.state-error    { background: #f6f8fa; }
.nws-status-bar.state-possible { background: #f6f8fa; }
.nws-status-bar.state-inactive { background: #f6f8fa; }
.nws-status-bar.state-info     { background: #f6f8fa; }

.nws-status-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  flex: 1;
  transition: color 0.4s ease;
}

.nws-update-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #000000;
}

.content-toggle {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid #21262d;
  user-select: none;
  transition: background 0.2s;
}
.content-toggle:hover { background: #eaeef2; }

.toggle-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #484f58;
}

.toggle-chevron {
  width: 14px; height: 14px;
  color: #484f58;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.toggle-chevron.expanded { transform: rotate(180deg); }

.content-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
}
.content-body.expanded { max-height: 600px; padding: 1.25rem; }

.spotter-text {
  font-size: 13px;
  line-height: 1.75;
  color: #000000;
  white-space: pre-wrap;
  min-height: 48px;
  transition: color 0.3s;
}
.spotter-text.loading-state { color: #484f58; font-style: italic; }

.nws-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #21262d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nws-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #388bfd;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nws-link:hover { color: #79c0ff; }

.nws-refresh-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #7d8590;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.nws-refresh-btn:hover { border-color: #6e7681; color: #484f58; }
.nws-refresh-btn:active { transform: scale(0.97); }
.nws-refresh-btn.spinning { pointer-events: none; opacity: 0.5; }

.dot-possible { background: #d29922; box-shadow: 0 0 6px rgba(210,153,34,0.4); }
.dot-inactive { background: #484f58; }
.dot-info     { background: #388bfd; box-shadow: 0 0 6px rgba(56,139,253,0.4); }

.nws-label-active   { color: #2ea043; }
.nws-label-possible { color: #d29922; }
.nws-label-inactive { color: #8b949e; }
.nws-label-info     { color: #388bfd; }
.nws-label-error    { color: #f85149; }
.nws-label-loading  { color: #484f58; }

.nws-brand {
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #7d8590;
  letter-spacing: 0.06em;
}

.davis-widget iframe {
  display: block;
  width: 338px;
  height: 550px;
  border: none;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   Breakpoints:
     ≤ 1024px  — tablet (2-col: hide left nav, stack right below center)
     ≤ 680px   — mobile (single column, compact header)
══════════════════════════════════════════════════ */

/* ── Mobile nav toggle button (hidden on desktop) ── */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b949e;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.mobile-nav-toggle:hover {
  color: #e6edf3;
  border-color: #8b949e;
  background: #21262d;
}
.mobile-nav-toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Mobile nav drawer overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.65);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
}

/* Mobile nav drawer panel */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: #eaeef2;
  border-right: 1px solid #d0d7de;
  z-index: 201;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.75rem 0 1rem;
}
.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem 0.6rem 0.85rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #d0d7de;
}
.mobile-nav-close-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #57606a;
}
.mobile-nav-close-btn {
  background: transparent;
  border: none;
  color: #57606a;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-close-btn:hover {
  background: #d0d7de;
  color: #24292f;
}
.mobile-nav-close-btn svg {
  width: 16px;
  height: 16px;
}

/* ── TABLET (≤ 1024px) ────────────────────────── */
@media (max-width: 1024px) {

  /* Hide the desktop left column */
  .col-left {
    display: none;
  }

  /* 2-column layout: center takes remaining space, right is natural width */
  .page-layout {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  /* Center column occupies full first column */
  .col-center {
    grid-column: 1;
    grid-row: 1;
  }

  /* Right column occupies second column on tablet, full width on mobile */
  .col-right {
    grid-column: 2;
    grid-row: 1;
    padding: 1rem 1rem 1rem 0;
  }

  /* Davis iframe: keep its fixed size — it's an embed with its own scroll */
  .davis-widget iframe {
    width: 338px;
    height: 550px;
  }

  /* Show the mobile nav toggle button in the header */
  .mobile-nav-toggle {
    display: flex;
  }

  /* Header top: add the toggle button gracefully */
  .site-header-top {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  /* Mobile nav overlay & drawer active on tablet too */
  .mobile-nav-overlay {
    display: block;
    pointer-events: none;
  }
  .mobile-nav-overlay.open {
    pointer-events: auto;
  }
}

/* ── MOBILE (≤ 680px) ─────────────────────────── */
@media (max-width: 680px) {

  /* Single column layout */
  .page-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .col-center {
    grid-column: 1;
    grid-row: 1;
    padding: 0.75rem;
  }

  .col-right {
    grid-column: 1;
    grid-row: 2;
    padding: 0 0.75rem 0.75rem;
  }

  /* ── Header compact on mobile ── */
  .site-header {
    padding: 0.5rem 0.75rem 0;
  }

  .site-header-top {
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
  }

  /* Hide the long description on mobile — too cramped */
  .site-header-desc {
    display: none;
  }

  /* Header nav: allow wrapping */
  .site-header-nav {
    flex-wrap: wrap;
    min-height: 28px;
  }

  /* ── Cards ── */
  .wc-card {
    border-radius: 8px;
  }

  /* Tab row stacks or shrinks text */
  .wc-tab-row {
    grid-template-columns: 1fr 1fr;
  }

  .wc-tab {
    padding: 0.6rem 0.75rem;
    gap: 6px;
  }

  .ws-status-label {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  /* AFD body: switch to vertical layout on mobile */
  .body-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
  }

  .nav-col {
    border-right: none;
    border-bottom: 1px solid #d0d7de;
    padding: 0.5rem 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
    overflow-x: auto;
    overflow-y: visible;
  }

  .nav-btn {
    padding: 6px 10px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .nav-btn.active {
    background: #eaeef2;
    border-left-color: transparent;
    border-bottom-color: #388bfd;
  }

  .nav-label {
    font-size: 9px;
    line-height: 1.2;
    /* Flatten the two-line labels into one line */
    white-space: nowrap;
  }
  /* Flatten line breaks in nav labels */
  .nav-label br {
    display: none;
  }

  .content-col {
    padding: 1rem;
    /* Let text area expand naturally instead of fixed height */
    max-height: 420px;
    overflow-y: auto;
  }

  .content-text {
    font-size: 12px;
    line-height: 1.7;
  }

  /* Card footer: stack on very small screens */
  .wc-card-footer {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.5rem 0.75rem;
  }

  .wc-brand {
    font-size: 9px;
  }

  /* ── Right column ── */
  .nws-card {
    border-radius: 8px;
  }

  .nws-card-footer {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.5rem 0.75rem;
  }

  .nws-brand {
    font-size: 9px;
  }

  /* Davis iframe: scale it down to fit on mobile */
  .davis-widget {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: #f6f8fa;
    /* Center the iframe */
    display: flex;
    justify-content: center;
  }

  .davis-widget iframe {
    /* Keep 338 width so embed renders correctly internally,
       but wrap in a scrollable container so user can pan */
    min-width: 338px;
    width: 338px;
    height: 480px;
  }

  /* ── Spotter widget ── */
  .nws-status-bar {
    padding: 0.6rem 0.75rem;
  }

  .nws-status-label {
    font-size: 11px;
  }

  .content-toggle {
    padding: 0.6rem 0.75rem;
  }

  .content-body.expanded {
    padding: 0.75rem;
  }

  .spotter-text {
    font-size: 12px;
  }

  .nws-widget-header-row {
    padding: 0.6rem 0.75rem;
  }
}

/* ── Very small phones (≤ 380px) ─────────────── */
@media (max-width: 380px) {

  .callsign-text {
    font-size: 11px;
  }

  .site-header-nav {
    min-height: 26px;
  }

  .nav-dropdown-trigger {
    font-size: 9px;
    padding: 0 0.65rem;
  }

  .wc-tab {
    padding: 0.5rem 0.6rem;
    gap: 4px;
  }

  .wc-radar-icon {
    width: 18px;
    height: 18px;
  }

  .ws-status-label {
    font-size: 8px;
  }

  .afd-status-label {
    font-size: 10px;
  }
}

/* ── Ensure overlay/drawer are hidden until toggled ── */
@media (min-width: 1025px) {
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    display: none !important;
  }
}
