:root {
  --bg: #05090f;
  --panel: #0c1420;
  --panel-2: #111d2e;
  --line: #1e3050;
  --text: #e8f0fc;
  --muted: #8ba4c8;
  --accent: #f59e0b;
  --accent-soft: rgba(245,158,11,.14);
  --accent-strong: #fbbf24;
  --steel: #60a5fa;
  --steel-soft: rgba(96,165,250,.12);
  --green: #34d399;
  --red: #f87171;
  --warn: #fb923c;
  --shadow: 0 16px 48px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto !important; }
* { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, #030710 0%, #07111f 100%);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: #fff; }
h1 { font-size: 2.1rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; color: var(--muted); line-height: 1.55; }

.page-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 88px;
  display: flex; flex-direction: column; gap: 16px;
}

.panel {
  background: linear-gradient(180deg, rgba(15,25,45,.97), rgba(10,18,32,.97));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}

/* --- Hero ------------------------------------------------------------------ */
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-brand { font-size: 0.95rem; font-weight: 800; color: var(--accent); letter-spacing: -0.01em; }
.hero-status-inline { display: flex; align-items: center; gap: 6px; }
.hero-status-inline span:last-child { font-size: 0.75rem; color: var(--muted); }
.hero-copy .eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero-copy h1 { margin: 6px 0 8px; }
.subhead { font-size: 0.98rem; max-width: 62ch; }
.hero-sources-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.sources-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sources-list { font-size: 0.75rem; color: var(--muted); opacity: .8; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-signal-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.hero-pill { font-size: 0.78rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; transition: border-color .15s, color .15s; user-select: none; }
.hero-pill strong { font-weight: 700; }
.hero-pill.high { border-color: rgba(249,115,22,.45); color: #fb923c; }
.hero-pill.critical { border-color: rgba(239,68,68,.5); color: #f87171; }
.hero-pill.med  { border-color: rgba(245,158,11,.45); color: #f59e0b; }
.hero-pill.low  { border-color: var(--line); color: var(--muted); }
.hero-pill:hover { border-color: var(--accent); color: var(--accent); outline: none; }
.btn {
  padding: 11px 18px; border-radius: 999px; font-weight: 600;
  font-size: 0.92rem; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn.primary { background: var(--accent); color: #03080f; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(245,158,11,.35); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* --- Command bar ----------------------------------------------------------- */
.mobile-command-bar {
  position: sticky; top: 8px; z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px; padding: 10px;
  backdrop-filter: blur(18px);
  background: rgba(8,14,26,.92);
}
.nav-chip {
  padding: 9px 12px; border-radius: 12px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  transition: border-color .15s, color .15s, background .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-chip.active, .nav-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.nav-chip.full-row { grid-column: 1 / -1; }

/* --- Stats ----------------------------------------------------------------- */
.quick-view { display: flex; flex-direction: column; gap: 16px; }
.quick-view-head { display: flex; flex-direction: column; gap: 10px; }
.section-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.section-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-top: 2px; }
.feed-status-block { display: flex; flex-direction: column; gap: 4px; }
.feed-status-row { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.live { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.fallback { background: var(--warn); }
.status-text { font-size: 0.82rem; color: var(--muted); }
.feed-status-detail { font-size: 0.78rem; color: var(--muted); opacity: .7; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: border-color .15s, background .15s; text-align: left;
}
.stat-card:hover { border-color: var(--accent); background: rgba(245,158,11,.06); }
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: #fff; }

.top-signal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.top-signal-chip {
  font-size: 0.8rem; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.top-signal-chip.critical { border-color: rgba(239,68,68,.5); color: #f87171; }
.top-signal-chip.high { border-color: rgba(249,115,22,.45); color: #fb923c; }
.top-signal-chip.medium { border-color: rgba(245,158,11,.45); color: #f59e0b; }
.top-signal-chip:hover { border-color: var(--accent); color: var(--accent); }

/* --- Lens panel ------------------------------------------------------------ */
.lens-panel { display: flex; flex-direction: column; gap: 10px; }
.lens-panel-head { display: flex; justify-content: space-between; align-items: center; }
.lens-panel-note { font-size: 0.8rem; color: var(--muted); }
.lens-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lens-chip {
  padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  cursor: pointer; transition: all .15s;
}
.lens-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lens-chip:hover:not(.active) { border-color: var(--muted); color: var(--text); }

/* --- Brief / Today --------------------------------------------------------- */
.brief-panel, .brief-head { display: flex; flex-direction: column; gap: 16px; }
.brief-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
.brief-grid { display: flex; flex-direction: column; gap: 12px; }
.brief-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.brief-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brief-headline { font-size: 0.95rem; font-weight: 700; color: #fff; }
.brief-summary { font-size: 0.88rem; color: var(--muted); }
.brief-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.brief-source { font-size: 0.76rem; color: var(--muted); }

.section-divider { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.section-note { font-size: 0.82rem; color: var(--muted); }
.news-grid { display: flex; flex-direction: column; gap: 10px; }
.news-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.news-title { font-size: 0.92rem; font-weight: 600; color: #fff; }
.news-title a { color: inherit; text-decoration: none; }
.news-title a:hover { color: var(--accent); text-decoration: underline; }
.news-summary { font-size: 0.84rem; color: var(--muted); }
.news-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.news-source { font-size: 0.75rem; color: var(--muted); }
.news-link { font-size: 0.8rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.news-link:hover { text-decoration: underline; }

/* --- Domains --------------------------------------------------------------- */
.domains-panel { display: flex; flex-direction: column; gap: 16px; }
.domain-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.domain-chip {
  padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.domain-chip.active, .domain-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.domains-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 680px) { .domains-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .domains-grid { grid-template-columns: repeat(3, 1fr); } }

.domain-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.domain-card:hover, .domain-card.selected { border-color: var(--accent); background: rgba(245,158,11,.05); }
.domain-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.domain-category { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.domain-card h3 { font-size: 0.97rem; }
.domain-condition { font-size: 0.82rem; color: var(--text); font-style: italic; }
.domain-blurb { font-size: 0.82rem; color: var(--muted); }
.domain-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.timestamp { font-size: 0.75rem; color: var(--muted); }

/* --- Domain detail --------------------------------------------------------- */
.featured-panel { display: flex; flex-direction: column; gap: 14px; }
.domain-detail-head { display: flex; flex-direction: column; gap: 10px; }
.domain-detail-title .section-label { margin-bottom: 2px; }
.domain-detail-title h2 { font-size: 1.35rem; }
.domain-detail-sub { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.domain-detail-badge { display: flex; flex-direction: column; gap: 4px; }
.domain-detail-condition { font-size: 0.9rem; color: var(--text); font-weight: 600; }
.domain-detail-signal { font-size: 0.82rem; color: var(--muted); }

.decision-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .decision-grid { grid-template-columns: repeat(2, 1fr); } }
.decision-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.decision-box.primary { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.05); }
.decision-box.action { border-color: rgba(52,211,153,.25); background: rgba(52,211,153,.04); }
.decision-box b { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.decision-box span { font-size: 0.88rem; color: var(--text); line-height: 1.5; }

/* --- Filter chips ---------------------------------------------------------- */
.filter-panel { display: flex; flex-direction: column; gap: 8px; }
.filter-group-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.filter-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  padding: 6px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.filter-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.filter-chip:hover:not(.active) { border-color: var(--muted); color: var(--text); }

/* --- Status badges --------------------------------------------------------- */
.status-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 5px;
}
.status-effective { background: rgba(52,211,153,.15); color: var(--green); }
.status-active    { background: rgba(249,115,22,.12); color: #fb923c; }
.status-monitor   { background: rgba(245,158,11,.12); color: var(--accent); }
.status-watch     { background: rgba(138,164,200,.1); color: var(--muted); }

/* --- Signal list ----------------------------------------------------------- */
.signal-grid { display: flex; flex-direction: column; gap: 10px; }
.signal-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.signal-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.signal-card-head-left { display: flex; flex-direction: column; gap: 3px; }
.signal-card-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.signal-regime { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; }
.signal-name { font-size: 0.92rem; font-weight: 700; color: #fff; }
.signal-effective { font-size: 0.75rem; color: var(--muted); }
.signal-effective strong { color: var(--steel); font-weight: 600; }
.signal-hts { font-size: 0.75rem; color: var(--muted); }
.signal-summary { font-size: 0.84rem; color: var(--muted); }
.signal-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.signal-source { font-size: 0.75rem; color: var(--muted); }
.signal-source-link { font-size: 0.75rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.signal-source-link:hover { text-decoration: underline; }
.signal-trust { font-size: 0.7rem; color: var(--muted); opacity: .6; padding-top: 2px; border-top: 1px solid var(--line); }

/* --- Action checklist ------------------------------------------------------ */
.action-checklist { display: flex; flex-direction: column; gap: 5px; }
.action-checklist-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); font-weight: 700; margin-bottom: 2px; }
.action-item { display: flex; gap: 7px; align-items: flex-start; font-size: 0.82rem; color: var(--text); }
.action-item::before { content: '→'; color: var(--green); font-weight: 700; flex-shrink: 0; font-size: 0.75rem; margin-top: 1px; }

/* --- Client brief modal ---------------------------------------------------- */
.brief-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.brief-modal[hidden] { display: none; }
.brief-modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px 22px 0 0;
  width: min(680px, 100vw); max-height: 80vh; display: flex; flex-direction: column;
  box-shadow: 0 -8px 48px rgba(0,0,0,.5);
}
.brief-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.brief-modal-title { font-size: 0.88rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.1em; }
.brief-modal-close { font-size: 1.3rem; color: var(--muted); padding: 0 4px; line-height: 1; }
.brief-modal-close:hover { color: #fff; }
.brief-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; font-size: 0.82rem; color: var(--text); white-space: pre-wrap; font-family: inherit; margin: 0; line-height: 1.6; }
.brief-modal-footer { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.brief-modal-note { font-size: 0.75rem; color: var(--muted); }

/* --- Domain sources row ---------------------------------------------------- */
.domain-sources-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.domain-source-link { font-size: 0.78rem; color: var(--accent); font-weight: 600; text-decoration: none; border: 1px solid rgba(245,158,11,.3); padding: 4px 10px; border-radius: 8px; background: rgba(245,158,11,.05); }
.domain-source-link:hover { background: rgba(245,158,11,.1); text-decoration: none; }

/* --- Bottom nav ------------------------------------------------------------ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: rgba(8,14,26,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px); padding: 0 0 env(safe-area-inset-bottom, 0);
}
.bottom-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 8px; font-size: 0.7rem; font-weight: 600; color: var(--muted);
  border: none; background: transparent; cursor: pointer; text-decoration: none;
  transition: color .15s; min-height: 52px;
}
.bottom-tab.active, .bottom-tab:hover { color: var(--accent); }
.bottom-tab-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; }

/* --- Tags ------------------------------------------------------------------ */
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
}
.tag.critical { border-color: rgba(239,68,68,.5); color: #f87171; background: rgba(239,68,68,.07); }
.tag.high { border-color: rgba(249,115,22,.45); color: #fb923c; background: rgba(249,115,22,.07); }
.tag.medium { border-color: rgba(245,158,11,.45); color: #f59e0b; background: rgba(245,158,11,.07); }
.tag.watch { border-color: var(--line); color: var(--muted); }
.tag.stable { border-color: rgba(52,211,153,.3); color: var(--green); background: rgba(52,211,153,.06); }
.tag.pro-lock { border-color: rgba(245,158,11,.4); color: var(--accent); cursor: pointer; }

/* --- Search ---------------------------------------------------------------- */
.search-panel { display: flex; flex-direction: column; gap: 14px; }
.search-box-wrap { position: relative; }
.search-box {
  width: 100%; padding: 12px 40px 12px 16px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 14px; color: var(--text);
  font-size: 0.95rem; outline: none; transition: border-color .15s;
}
.search-box:focus { border-color: var(--accent); }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-hint { font-size: 0.85rem; color: var(--muted); }

/* --- Methodology ----------------------------------------------------------- */
.methodology-panel { display: flex; flex-direction: column; gap: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.detail-grid.two-up { grid-template-columns: 1fr; }
@media (min-width: 600px) { .detail-grid.two-up { grid-template-columns: repeat(2, 1fr); } }
.detail-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.detail-box b { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.detail-box span { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* --- Disclaimer / Footer --------------------------------------------------- */
.disclaimer-panel { padding: 16px 20px; }
.disclaimer-text { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.disclaimer-text a { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
.footer-left { display: flex; flex-direction: column; gap: 2px; }
.footer-muted { font-size: 0.78rem; color: var(--muted); }
.footer-right { display: flex; gap: 16px; }
.footer-right a { font-size: 0.82rem; color: var(--muted); }
.footer-right a:hover { color: var(--text); }

/* --- Toast ----------------------------------------------------------------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--panel-2); border: 1px solid var(--accent); border-radius: 12px;
  padding: 10px 20px; font-size: 0.88rem; color: var(--text); z-index: 100;
  transition: transform .3s ease; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* --- Visit banner ---------------------------------------------------------- */
.visit-banner { padding: 12px 18px; background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); }
.visit-banner p { font-size: 0.85rem; color: var(--text); }

/* --- Auth controls (header) ------------------------------------------------ */
.auth-controls { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.btn-auth {
  font-size: 0.78rem; font-weight: 600; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-auth:hover { border-color: var(--accent); color: var(--accent); }
.btn-auth.primary { background: var(--accent); color: #03080f; border-color: var(--accent); }
.btn-auth.primary:hover { box-shadow: 0 4px 14px rgba(245,158,11,.35); }

/* --- Auth modal ------------------------------------------------------------ */
.auth-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-modal[hidden] { display: none; }
.auth-modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  width: min(420px, 100%); display: flex; flex-direction: column; gap: 0;
  box-shadow: var(--shadow);
}
.auth-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.auth-modal-title { font-size: 0.88rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-modal-close { font-size: 1.3rem; color: var(--muted); padding: 0 4px; line-height: 1; }
.auth-modal-close:hover { color: #fff; }
.auth-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.auth-modal-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.auth-token-input {
  width: 100%; padding: 11px 14px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  font-size: 0.88rem; font-family: monospace; outline: none; transition: border-color .15s;
}
.auth-token-input:focus { border-color: var(--accent); }
.auth-error { font-size: 0.82rem; color: var(--red); padding: 8px 12px; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.25); border-radius: 10px; }
.auth-modal-actions { display: flex; gap: 8px; }
.auth-modal-note { font-size: 0.8rem; color: var(--muted); }
.auth-modal-note a { color: var(--accent); }

/* --- Upgrade prompt -------------------------------------------------------- */
.upgrade-prompt {
  background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.3);
  border-radius: 14px; padding: 14px 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.upgrade-prompt p { font-size: 0.88rem; color: var(--text); }
.upgrade-prompt .btn { flex-shrink: 0; }

/* --- Upgrade strip --------------------------------------------------------- */
.upgrade-strip {
  background: linear-gradient(135deg, rgba(245,158,11,.12) 0%, rgba(251,191,36,.06) 100%);
  border-color: rgba(245,158,11,.35);
}
.upgrade-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.upgrade-strip-copy { display: flex; flex-direction: column; gap: 4px; }
.upgrade-strip-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); font-weight: 700;
}
.upgrade-strip-copy strong { font-size: 1rem; color: #fff; line-height: 1.35; }
.upgrade-strip-price { font-size: 0.82rem; color: var(--muted); }
.upgrade-strip-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex-shrink: 0; }

/* --- Pricing page extras --------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 680px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }
.pricing-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.pricing-card.featured { border-color: var(--accent); background: rgba(245,158,11,.06); }
.price-amount { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.price-period { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.price-savings { font-size: 0.78rem; font-weight: 600; color: var(--green); margin-top: 4px; min-height: 1.1em; }
.feature-list { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.feature-list-label { display:block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; margin-bottom: 4px; font-weight: 700; }

/* Source coverage table */
.sources-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.86rem; }
.sources-table th, .sources-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid rgba(99,132,169,0.16); vertical-align: top; }
.sources-table th { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sources-table td strong { color: var(--fg); }
.sources-table .src-note { display:block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) {
  .sources-table thead { display: none; }
  .sources-table tr { display: block; padding: 10px 0; border-bottom: 1px solid rgba(99,132,169,0.16); }
  .sources-table td { display: block; border: none; padding: 4px 0; }
  .sources-table td:not(:first-child)::before { content: attr(data-label) ': '; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
}
.planned-list { margin-top: 10px; padding-left: 18px; }
.planned-list li { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; line-height: 1.4; }
.planned-list strong { color: var(--fg); }

/* Hero sample-brief form */
.hero-sample-form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(99,132,169,0.18); }
.hero-sample-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hero-sample-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-sample-row input { flex: 1 1 240px; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(99,132,169,0.32); background: rgba(8,14,26,.7); color: var(--fg); font-family: inherit; font-size: 0.94rem; }
.hero-sample-row input::placeholder { color: rgba(138,164,200,.55); }
.hero-sample-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-sample-status { font-size: 0.82rem; color: var(--muted); min-height: 1.2em; }

/* Coverage section — ports + lanes */
.coverage-panel { margin-top: 8px; }
.coverage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.coverage-card { background: rgba(15, 22, 33, 0.85); border: 1px solid rgba(99, 132, 169, 0.18); border-radius: 12px; padding: 14px; }
.coverage-card h3 { font-size: 0.94rem; font-weight: 700; color: var(--fg); margin: 0 0 8px 0; }
.coverage-card ul { margin: 0; padding-left: 16px; }
.coverage-card li { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin-bottom: 3px; }

/* Census Freight Intelligence */
.census-panel { margin-top: 8px; }
.census-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.census-card { background: rgba(15, 22, 33, 0.85); border: 1px solid rgba(99, 132, 169, 0.2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.census-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.census-card-label { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.census-card-freshness { font-size: 0.7rem; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: rgba(99, 132, 169, 0.12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.census-card-blurb { font-size: 0.84rem; color: var(--muted); line-height: 1.4; margin: 0; }
.census-card-body { min-height: 110px; font-size: 0.88rem; line-height: 1.45; }
.census-card-body[data-state="error"] { color: #fda4af; }
.census-card-body[data-state="empty"] { color: var(--muted); font-style: italic; }
.census-card-body ul { margin: 0; padding-left: 18px; }
.census-card-body li { margin-bottom: 6px; color: var(--fg); }
.census-card-body li strong { color: #fff; }
.census-card-foot { font-size: 0.74rem; color: var(--muted); border-top: 1px solid rgba(99, 132, 169, 0.16); padding-top: 8px; }
.census-loading { color: var(--muted); font-size: 0.82rem; margin: 0; }
.census-footnote { font-size: 0.78rem; color: var(--muted); font-style: italic; margin-top: 12px; line-height: 1.45; }
.census-stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.census-stat { display: flex; flex-direction: column; gap: 2px; }
.census-stat-value { font-size: 1.1rem; font-weight: 700; color: #fff; }
.census-stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* Sticky filter chip row (mobile) */
@media (max-width: 720px) {
  .filter-panel .filter-chip-row {
    position: sticky;
    top: 64px; /* below mobile-command-bar */
    z-index: 15;
    padding: 6px 0;
    margin: 0 -2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(8,14,26,.92);
    backdrop-filter: blur(12px);
  }
  .filter-panel .filter-chip-row::-webkit-scrollbar { display: none; }
  .filter-panel .filter-chip { flex-shrink: 0; }
}

/* iPhone SE / narrow viewport safety */
@media (max-width: 380px) {
  .page-shell { padding-left: 8px !important; padding-right: 8px !important; }
  .hero h1 { font-size: 1.45rem; line-height: 1.18; }
  .hero .subhead { font-size: 0.92rem; }
  .hero-meta-row { flex-wrap: wrap; gap: 8px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .signal-card { padding: 12px; }
  .teaser-card { padding: 12px; }
  .teaser-title { font-size: 0.95rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .billing-toggle-btn { padding: 7px 12px; font-size: 0.82rem; }
}

/* Tappable source links — minimum 32px tap target */
.signal-source-link, .signal-source-link-static {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(99, 132, 169, 0.12);
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  transition: background .12s ease;
}
.signal-source-link:hover { background: rgba(245, 158, 11, 0.18); }

/* Emergent (AI-detected) signal cards */
.signal-card.emergent { border-left: 3px solid #f59e0b; background: linear-gradient(135deg, rgba(245, 158, 11, 0.04), rgba(15, 22, 33, 0.85)); }
.emergent-badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  padding: 2px 7px;
  margin-left: 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent);
  text-transform: uppercase;
  vertical-align: middle;
}
.teaser-card.emergent { border-left-style: dashed; }

/* 8-field signal card */
.signal-fields { display: grid; grid-template-columns: 132px 1fr; gap: 6px 12px; margin: 12px 0 0 0; font-size: 0.9rem; }
.signal-fields dt { color: var(--muted); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.signal-fields dd { color: var(--fg); margin: 0; line-height: 1.45; }
.signal-fields .signal-sources-cell { display:flex; flex-wrap:wrap; gap:6px; }
.signal-source-link-static { color: var(--muted); font-size: 0.84rem; }
@media (max-width: 560px) {
  .signal-fields { grid-template-columns: 1fr; gap: 0; }
  .signal-fields dt { margin-top: 8px; }
}

/* Billing interval toggle */
.billing-toggle { display: inline-flex; gap: 0; background: rgba(15, 22, 33, 0.85); border: 1px solid rgba(99, 132, 169, 0.24); border-radius: 999px; padding: 4px; }
.billing-toggle-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.billing-toggle-btn:hover { color: var(--fg); }
.billing-toggle-btn.active { background: var(--accent); color: #0a0c10; }
.billing-save { font-size: 0.68rem; padding: 2px 7px; border-radius: 999px; background: rgba(34, 197, 94, 0.18); color: #86efac; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.billing-toggle-btn.active .billing-save { background: rgba(10, 12, 16, 0.18); color: #0a0c10; }
.feature-list li { font-size: 0.88rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.feature-list li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.feature-list li.locked { color: rgba(138,164,200,.5); }
.feature-list li.locked::before { content: '—'; color: rgba(138,164,200,.3); }
.plan-name { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.plan-desc { font-size: 0.85rem; color: var(--muted); }
.hero-util-links { margin-top: 4px; }
.hero-util-links a { font-size: 0.88rem; color: var(--muted); }
.hero-util-links a:hover { color: var(--accent); }

/* Today's top freight risks — hero teaser */
.today-teaser { margin-top: 8px; }
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.teaser-card {
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 22, 33, 0.85);
  border: 1px solid rgba(99, 132, 169, 0.18);
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.teaser-card:hover { transform: translateY(-1px); border-color: rgba(245, 158, 11, 0.5); background: rgba(15, 22, 33, 0.95); }
.teaser-card.critical { border-left: 4px solid #ef4444; }
.teaser-card.high     { border-left: 4px solid #f97316; }
.teaser-card.med      { border-left: 4px solid #eab308; }
.teaser-card.low      { border-left: 4px solid #22c55e; }
.teaser-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.teaser-domain { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.teaser-status { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.teaser-status.critical { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.teaser-status.high     { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.teaser-status.med      { background: rgba(234, 179, 8, 0.18); color: #fde68a; }
.teaser-status.low      { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.teaser-title { font-size: 1rem; line-height: 1.25; margin: 0; color: var(--fg); font-weight: 700; }
.teaser-fields { display: grid; grid-template-columns: 88px 1fr; gap: 4px 10px; margin: 0; font-size: 0.84rem; }
.teaser-fields dt { color: var(--muted); font-weight: 600; }
.teaser-fields dd { color: var(--fg); margin: 0; }
@media (max-width: 480px) {
  .teaser-fields { grid-template-columns: 1fr; gap: 0; }
  .teaser-fields dt { margin-top: 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
}
