/* ── Orion Theme — Global CSS override ── */
/* Loads after main.css. Overrides variables and targeted classes only.    */
/* No class renames. Existing HTML structure is unchanged except sidebar.  */

/* ── Variables — Neutral Navy palette ── */
:root {
  --bg-base:      #06080c;
  --bg-panel:     #0a0d13;
  --bg-card:      #0e1218;
  --bg-card-alt:  #0a0d13;
  --bg-hover:     #13181f;
  --bg-elevated:  #13181f;

  --border:       #1a2030;
  --border-dim:   #232c3a;

  --text-pri:     #e8ecf2;
  --text-sec:     #b0bccf;
  --text-ter:     #7b8da5;
  --text-dim:     #556378;
  --text-muted:   #556378;

  --accent:       #00b8d9;
  --accent-dim:   rgba(0, 184, 217, 0.06);
  --green:        #00c48c;
  --red:          #ff4d6a;
  --yellow:       #e8a517;

  --radius:       3px;
  --radius-lg:    3px;

  --font-sans:    'DM Sans', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-base);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #232c3a; border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Sidebar — collapsible, expand on hover ── */
.sidebar {
  width: 48px;
  overflow: hidden;
  transition: width 0.2s ease;
  background: #0a0d13;
  border-right: 1px solid #1a2030;
}
.sidebar:hover { width: 170px; }

/* Brand: icon always visible, text fades in */
.sidebar-brand {
  padding: 14px 14px 16px;
  border-bottom: 1px solid #1a2030;
}
.brand-name {
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: 0.1em;
}
.sidebar:hover .brand-name { opacity: 1; }
.brand-svg { color: #3b82f6; flex-shrink: 0; }

/* Nav links */
.sidebar-nav { padding: 8px 0; gap: 0; }
.nav-link {
  padding: 8px 11px;
  border-radius: 0;
  border: none;
  border-left: 2px solid transparent;
  overflow: hidden;
}
.nav-link:hover { background: #13181f; border-left-color: transparent; }
.nav-link.active {
  background: rgba(0, 184, 217, 0.06);
  border-left-color: #00b8d9;
  color: #00b8d9;
}

/* Nav dot — the visible handle in collapsed state */
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a4858;
  flex-shrink: 0;
  transition: background 0.12s, box-shadow 0.12s;
}
.nav-link:hover .nav-dot { background: #7b8da5; }
.nav-link.active .nav-dot {
  background: #00b8d9;
  box-shadow: 0 0 6px rgba(0, 184, 217, 0.4);
}

/* Nav labels — hidden until sidebar expands */
.nav-lbl {
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
}
.sidebar:hover .nav-lbl { opacity: 1; }
.nav-link.active .nav-lbl { color: #00b8d9; }
.nav-link:hover .nav-lbl { color: #ffffff; }

/* Infra status (bottom of sidebar) */
.sidebar-infra { padding: 10px 11px; }
.sidebar-infra-hdr,
.infra-label,
.infra-val {
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.sidebar:hover .sidebar-infra-hdr,
.sidebar:hover .infra-label,
.sidebar:hover .infra-val { opacity: 1; }

/* Account links at sidebar bottom */
.sidebar-account {
  border-top: 1px solid #1a2030;
  padding: 8px 0;
  flex-shrink: 0;
}
.sidebar-ext-brand {
  display: block;
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #556378;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.sidebar:hover .sidebar-ext-brand { opacity: 1; }

/* ── Badge overrides — muted, no purple tints ── */
.prov-badge {
  background: rgba(85, 99, 120, 0.15) !important;
  color: #7b8da5 !important;
  border: 1px solid rgba(85, 99, 120, 0.3) !important;
  font-size: 7px !important;
  letter-spacing: 0.1em !important;
  border-radius: 2px !important;
  padding: 2px 6px !important;
}
.prov-badge.prov-obs,
.prov-badge.prov-parsed,
.prov-badge.prov-nowcast {
  background: rgba(85, 99, 120, 0.15) !important;
  color: #7b8da5 !important;
  border-color: rgba(85, 99, 120, 0.3) !important;
}

/* ── Explainer info button hover — white, not cyan ── */
.kpi-info-btn:hover {
  color: #e8ecf2 !important;
  border-color: #e8ecf2 !important;
}

/* ── Mobile — horizontal nav bar, labels always visible ── */
@media (max-width: 767px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100% !important;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #1a2030;
  }
  .sidebar:hover { width: 100% !important; }
  .sidebar-brand {
    border-bottom: none;
    border-right: 1px solid #1a2030;
    padding: 10px 14px;
    flex-shrink: 0;
  }
  .brand-name { opacity: 1; }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 4px 8px;
    overflow: visible;
  }
  .nav-lbl { opacity: 1; }
  .nav-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 8px 10px;
    overflow: visible;
  }
  .nav-link:hover { border-left-color: transparent; }
  .nav-link.active {
    border-left-color: transparent;
    border-bottom-color: #00b8d9;
  }
  .sidebar-infra { display: none; }
}

/* ═══ UNIVERSAL CONTRAST — ALL ACTUAL CLASS NAMES ═══ */

/* ── TITLES (every variant) ── */
.card-title,
.synthesis-title,
.ag-legend-title,
.alert-title,
.section-label,
.route-title {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  color: #8293a7 !important;
  text-transform: uppercase !important;
}

/* ── LABELS (every variant) ── */
.kpi-label,
.macro-hero-kpi-label,
.fr-label,
.wasde-label,
.cpc-issue-label,
.cpc-map-label,
.cpc-valid-label,
.crop-cal-label,
.wx-subtitle {
  font-family: 'JetBrains Mono', monospace !important;
  color: #7b8da5 !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.synthesis-label {
  font-family: 'JetBrains Mono', monospace !important;
  color: #7b8da5 !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}

/* ── VALUES (every variant) ── */
.kpi-value,
.kpi-value.sm,
.macro-hero-kpi-val,
.fr-value,
.gdd-value {
  font-family: 'JetBrains Mono', monospace !important;
  color: #e8ecf2 !important;
  font-weight: 700 !important;
}

/* ── SOURCE LINES ── */
.kpi-src,
.macro-hero-kpi-src,
.wasde-src {
  font-family: 'JetBrains Mono', monospace !important;
  color: #3a4858 !important;
  font-size: 8px !important;
}

/* ── CHANGE/DELTA ── */
.macro-hero-kpi-chg {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 500 !important;
}

/* ── BADGES ── */
.prov-badge,
.card-badge {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
}

/* ── CARD HEADERS ── */
.card-header {
  background: #0a0d13 !important;
  border-bottom: 1px solid #1a2030 !important;
}

/* ── INLINE COLOR OVERRIDES ── */
[style*="color:#64748b"] { color: #7b8da5 !important; }
[style*="color: #64748b"] { color: #7b8da5 !important; }
[style*="color:#94a3b8"] { color: #8293a7 !important; }
[style*="color: #94a3b8"] { color: #8293a7 !important; }

/* ── INFO BUTTON HOVER ── */
.kpi-info-btn:hover {
  color: #e8ecf2 !important;
  border-color: #e8ecf2 !important;
}

/* ═══ v2 CSS CLASSES — replaces inline font/color in section-macro-brief-v2.js ═══ */

/* KPI change / delta lines */
.kpi-change,
.kpi-delta {
  font: 400 9px/1 var(--font-mono);
  color: var(--text-dim);
}

/* PMI / signal value modifiers (need !important to override base .kpi-value rule) */
.kpi-value.expand   { color: #10b981 !important; }
.kpi-value.contract { color: #ef4444 !important; }

/* Inline color helpers */
.clr-pos  { color: #10b981; }
.clr-neg  { color: #ef4444; }
.clr-dim  { color: var(--text-dim); }
.clr-warn { color: #f59e0b; }

/* Grid section dividers (GLOBAL PMI / RISK & UNCERTAINTY / etc.) */
.grid-section-label {
  grid-column: 1 / -1;
  padding: 6px 2px 2px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .1em;
  color: var(--text-dim);
}

/* Generic awaiting / empty state */
.panel-await {
  color: var(--text-dim);
  font-size: 11px;
  padding: 12px 0;
}

/* Synthesis headline / rows containers */
.synthesis-headline {
  font-size: 12px;
  color: var(--text-sec);
  padding: 6px 0 8px;
  letter-spacing: 0.01em;
}

/* OFAC SDN panel helpers */
.sdn-count  { font: 400 9px/1 var(--font-mono); color: var(--text-dim); margin-top: 2px; }
.sdn-empty  { padding: 8px 0; font: 400 10px/1.6 var(--font-mono); color: var(--text-dim); }
.sdn-row    { font: 400 10px/1.7 var(--font-mono); color: var(--text-dim); border-bottom: 1px solid #1e293b; padding: 3px 0; }
.sdn-name   { color: var(--text-sec); }
.sdn-prog   { color: var(--text-dim); }
.sdn-more   { font: 400 9px/1 var(--font-mono); color: var(--text-dim); margin-top: 4px; }
.sdn-header { font: 500 9px/1 var(--font-mono); letter-spacing: .08em; color: var(--text-dim); margin-bottom: 6px; }

/* Release calendar */
.cal-empty  { color: var(--text-dim); font: 400 11px/1.5 var(--font-mono); padding: 12px 4px; }
.event-tag  { display: inline-block; padding: 0 4px; margin: 1px 1px 0 0; font: 400 8px/1.7 var(--font-mono); background: #1e293b; border-radius: 2px; color: var(--text-dim); }

/* Economic calendar */
.eco-cat-header { font: 500 9px/1.8 var(--font-mono); letter-spacing: .08em; color: var(--text-dim); border-bottom: 1px solid #1e293b; padding-top: 8px; }
.eco-more-tog   { cursor: pointer; font: 400 9px/2 var(--font-mono); color: var(--text-dim); }
.eco-more-nav   { cursor: pointer; font: 500 9px/1 var(--font-mono); color: var(--text-dim); letter-spacing: .08em; padding: 4px 0; }
.eco-meth-nav   { cursor: pointer; font: 500 9px/1 var(--font-mono); color: var(--text-dim); letter-spacing: .08em; padding: 2px 0; }
.eco-meth-body  { font: 400 10px/1.5 var(--font-mono); color: var(--text-dim); padding: 4px 0 8px; }
.eco-footer     { font-size: 9px; color: var(--text-dim); padding: 6px 0 2px; letter-spacing: .04em; }
.eco-src        { color: var(--text-dim); font-size: 9px; }
.eco-time       { color: var(--text-dim); }

/* OECD CLI */
.cli-quad-title { font-size: 10px; color: var(--text-dim); margin-bottom: 6px; text-align: center; letter-spacing: 0.05em; }

/* ── Price stream flash animations ── */
@keyframes flash-up {
  0%   { background: rgba(16, 185, 129, 0.32); }
  100% { background: transparent; }
}
@keyframes flash-down {
  0%   { background: rgba(239, 68, 68, 0.32); }
  100% { background: transparent; }
}
.flash-up   { animation: flash-up   0.8s ease-out; border-radius: 2px; }
.flash-down { animation: flash-down 0.8s ease-out; border-radius: 2px; }

/* Stream age indicator */
#stream-age {
  font: 400 9px/1 var(--font-mono);
  color: var(--text-dim);
  margin-top: 6px;
  text-align: right;
  grid-column: 1 / -1;
}

/* Alert banner */
#alert-banner {
  grid-column: 1 / -1;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 3px;
  padding: 8px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font: 400 11px/1.5 var(--font-mono);
  color: #ef4444;
}
#alert-banner .alert-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}
#alert-banner .alert-entries { flex: 1; }

/* Analytics data-source badge — white (analytics-only; class emitted by provBadge() in section-analytics.js) */
.analytics-prov-badge {
  background: rgba(255, 255, 255, 0.05);
  color: #e8ecf2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
}

/* ── Auth / Signin / Pricing / Account page styles — dispatch 3A ── */
.auth-page-wrap,
.pricing-page-wrap,
.account-page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.auth-page-wrap {
  max-width: 480px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding-top: 80px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 40px 32px;
  width: 100%;
}
.auth-card-header { text-align: center; margin-bottom: 20px; }
.auth-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-pri);
}
.auth-headline {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-pri);
  text-align: center;
  margin: 0 0 8px 0;
}
.auth-subhead {
  font-size: 13px;
  color: var(--text-sec);
  text-align: center;
  margin: 0 0 28px 0;
}
.auth-buttons { display: flex; flex-direction: column; gap: 10px; }
.auth-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  color: var(--text-pri);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}
.auth-btn:hover { background: #1c2333; border-color: #2a3550; }
.auth-divider {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  display: inline-block;
  width: 38%;
  height: 1px;
  background: var(--border);
  vertical-align: middle;
}
.auth-divider span { margin: 0 10px; }
.auth-email-form { display: flex; flex-direction: column; gap: 8px; }
.auth-email-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  color: var(--text-pri);
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
.auth-email-input:focus { outline: none; border-color: var(--border); }
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.auth-back-link {
  font-size: 12px;
  color: var(--text-sec);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-back-link:hover { color: var(--text-pri); }

/* Pricing */
.pricing-header { text-align: center; margin-bottom: 40px; }
.pricing-headline {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-pri);
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}
.pricing-subhead {
  font-size: 14px;
  color: var(--text-sec);
  margin: 0 0 28px 0;
}
.pricing-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 999px;
  padding: 3px;
}
.pricing-toggle-btn {
  padding: 7px 18px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-sec);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pricing-toggle-btn.active { background: var(--bg-hover); color: var(--text-pri); }
.pricing-toggle-savings { font-size: 10px; color: var(--text-dim); margin-left: 4px; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card-pro { border-color: var(--border); }
.pricing-card-badge {
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-pri);
}
.pricing-card-tier {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sec);
}
.pricing-card-price { margin: 10px 0 6px 0; }
.pricing-card-price-num {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-pri);
  letter-spacing: -0.02em;
}
.pricing-card-price-suffix { font-size: 13px; color: var(--text-sec); margin-left: 4px; }
.pricing-card-desc { font-size: 12px; color: var(--text-sec); margin: 0 0 20px 0; }
.pricing-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex: 1;
}
.pricing-card-features li {
  padding: 7px 0;
  font-size: 12px;
  color: var(--text-pri);
  border-bottom: 1px solid var(--border);
}
.pricing-card-features li:last-child { border-bottom: 0; }
.pricing-card-cta {
  display: block;
  text-align: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
}
.pricing-card-cta-primary { background: var(--text-pri); color: var(--bg-base); }
.pricing-card-cta-primary:hover { opacity: 0.88; }
.pricing-card-cta-secondary {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-pri);
}
.pricing-card-cta-secondary:hover { background: var(--bg-hover); }

/* Account */
.account-headline {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-pri);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}
.account-subhead { font-size: 14px; color: var(--text-sec); margin: 0 0 28px 0; }
.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 28px;
}
.account-placeholder-text { font-size: 13px; color: var(--text-sec); margin: 0; }

@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-headline { font-size: 26px; }
  .pricing-card { padding: 20px; }
  .pricing-card-price-num { font-size: 36px; }
  .auth-card { padding: 28px 20px; }
}

/* ── Sidebar tier visibility ──
   Admin routes are hidden by default; sidebar.js reveals them for admin tier.
   Pro routes are NOT hidden — they serve as conversion funnel for anonymous users.
   Anonymous users see the route, click it, and hit middleware → CF Access redirect. */
.nav-link-admin { display: none; }

/* ── Account page ── */
.account-page-wrap { max-width: 560px; margin: 0 auto; padding: 32px 0; }
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dim);
}
.account-row:last-child { border-bottom: none; }
.account-row-label { font-size: 12px; color: var(--text-sec); text-transform: uppercase; letter-spacing: 0.07em; }
.account-row-val { font-size: 14px; color: var(--text-pri); font-family: var(--font-mono); }
.account-card + .account-card { margin-top: 16px; }
.account-tier-block .account-block-title { font-size: 13px; font-weight: 600; color: var(--text-pri); margin: 0 0 6px 0; }
.account-tier-block .account-block-body { font-size: 13px; color: var(--text-sec); margin: 0; }
.account-manage-link { display: inline-block; margin-top: 0.75rem; font-size: 13px; color: var(--accent); text-decoration: none; }
.account-manage-link:hover { text-decoration: underline; }

/* ── Pricing upgrade banner ── */
.pricing-upgrade-banner {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 6px;
  color: #f59e0b;
  font-size: 13px;
  padding: 10px 16px;
  margin-bottom: 24px;
  text-align: center;
}

/* sidebar.js sets nav-link-revealed on admin links for admin-tier users.
   !important required for reliable reveal on iOS Safari. */
.nav-link-admin.nav-link-revealed {
  display: flex !important;
}

/* ── Observability page ── */
.obs-section { margin-bottom: 40px; }
.obs-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-sec);
  margin: 0 0 12px 0;
}
.obs-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; color: var(--text-sec); }
.obs-error { color: #f87171; font-size: 13px; }
.obs-empty { color: var(--text-sec); font-size: 13px; }

.obs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: var(--font-mono);
}
.obs-table th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-sec);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.obs-table td {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-pri);
  vertical-align: top;
}
.obs-table tr:last-child td { border-bottom: none; }
.obs-table tr:hover td { background: rgba(255,255,255,0.03); }
.obs-key { color: var(--text-pri); word-break: break-all; max-width: 360px; }
.obs-ts { color: var(--text-sec); white-space: nowrap; }
.obs-size { color: var(--text-sec); white-space: nowrap; }
.obs-age { white-space: nowrap; }
.obs-age-ok    { color: #34d399; }
.obs-age-warn  { color: #fbbf24; }
.obs-age-stale { color: #f87171; }
.obs-cell-error { color: #f87171; }
.obs-email-status { color: var(--text-sec); }

.obs-stat-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.obs-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}
.obs-stat-card-total    { border-color: var(--accent); }
.obs-stat-card-fresh    { border-color: #34d399; }
.obs-stat-card-stale    { border-color: #fbbf24; }
.obs-stat-card-critical { border-color: #f87171; }
.obs-stat-num { font-size: 28px; font-weight: 700; color: var(--text-pri); font-family: var(--font-mono); }
.obs-stat-label { font-size: 11px; color: var(--text-sec); text-transform: uppercase; letter-spacing: 0.07em; }

/* ── Observability: shell, header, refresh ── */
.obs-shell { max-width: 1100px; }
.obs-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.obs-title { font-size: 20px; font-weight: 700; color: var(--text-pri); margin: 0; }
.obs-meta { display: flex; align-items: center; gap: 14px; }
.obs-timestamp { font-size: 12px; color: var(--text-sec); font-family: var(--font-mono); }
.obs-refresh {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-sec);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.obs-refresh:hover { border-color: var(--accent); color: var(--accent); }
.obs-loading-msg { color: var(--text-sec); font-size: 13px; padding: 32px 0; }

/* ── Stat row (replaces old stat-grid for new layout) ── */
.obs-stat-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Category cards ── */
.obs-cat-grid { display: flex; flex-direction: column; gap: 8px; }
.obs-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  overflow: hidden;
}
.obs-cat-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 10px;
}
.obs-cat-summary::-webkit-details-marker { display: none; }
.obs-cat-summary::before { content: "▸"; color: var(--text-sec); margin-right: 6px; transition: transform 0.15s; }
details[open] > .obs-cat-summary::before { transform: rotate(90deg); }
.obs-cat-summary-critical { background: rgba(248, 113, 113, 0.08); border-bottom: 1px solid rgba(248, 113, 113, 0.2); }
.obs-cat-summary-stale    { background: rgba(251, 191, 36, 0.06); }
.obs-cat-name { font-size: 14px; font-weight: 600; color: var(--text-pri); flex: 1; }
.obs-cat-counts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Pills ── */
.obs-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.obs-pill-fresh    { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.obs-pill-stale    { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.obs-pill-critical { background: rgba(248, 113, 113, 0.15); color: #f87171; }

/* ── Status badges ── */
.obs-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.obs-badge-fresh    { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.obs-badge-stale    { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.obs-badge-critical { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.obs-badge-missing  { background: rgba(248, 113, 113, 0.25); color: #f87171; }

/* ── Row highlighting ── */
.obs-row-critical { background: rgba(248, 113, 113, 0.06); }
.obs-row-missing  { background: rgba(248, 113, 113, 0.10); }
.obs-row-stale    { background: rgba(251, 191, 36, 0.04); }

/* ── Critical section border ── */
.obs-section-critical {
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  padding: 16px;
  background: rgba(248, 113, 113, 0.03);
}
.obs-section-title-critical { color: #f87171; }

/* ── Misc ── */
.obs-mono    { font-family: var(--font-mono); font-size: 12px; }
.obs-subname { color: var(--text-sec); font-size: 11px; font-family: var(--font-mono); }
.obs-error-item {
  font-size: 12px;
  font-family: var(--font-mono);
  color: #f87171;
  padding: 4px 0;
  border-bottom: 1px solid rgba(248, 113, 113, 0.15);
}
.obs-error-item:last-child { border-bottom: none; }

/* ── Stripe Checkout additions (v35) ── */
button.pricing-card-cta {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
button.pricing-card-cta:disabled { opacity: 0.55; cursor: not-allowed; }
.pricing-canceled-banner {
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.30);
  color: #fbbf24;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.pricing-checkout-error {
  color: #f87171;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}
.account-upgrade-banner {
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.30);
  color: #34d399;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ── Account page v36 ── */
.account-shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px;
}
.account-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
}
.account-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.account-banner-success {
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.30);
  color: #34d399;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}
.account-loading {
  padding: 32px;
  text-align: center;
  color: var(--text-sec);
}
.account-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.account-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px 0;
  color: var(--text-pri);
}
.sub-card {
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 4px 0;
  margin-bottom: 16px;
}
.sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-dim);
}
.sub-row:last-child { border-bottom: none; }
.sub-label { color: var(--text-sec); font-size: 13px; }
.sub-value { font-size: 13px; font-weight: 500; }
.sub-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sub-status-active    { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.sub-status-past_due  { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.sub-status-canceled,
.sub-status-incomplete { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.account-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s;
  font-family: inherit;
}
.account-btn-primary            { background: var(--text-pri); color: var(--bg-base); }
.account-btn-primary:hover      { opacity: 0.88; }
.account-btn-primary:disabled   { opacity: 0.45; cursor: not-allowed; }
.account-btn-secondary          { background: var(--bg-hover); color: var(--text-pri); border: 1px solid var(--border-dim); }
.account-btn-secondary:hover    { opacity: 0.80; }
.account-cta-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.account-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 6px;
  color: #f87171;
  font-size: 13px;
}
.account-pitch {
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

/* ── Footer disclaimer + pricing note (v37) ── */
.footer-disclaimer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-dim);
}
.footer-disclaimer strong { color: var(--text-sec); }
.pricing-disclaimer-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 8px 0 0;
}

/* ── Footer links + Legal pages (v38) ── */
.footer-link {
  color: var(--text-dim);
  text-decoration: none;
}
.footer-link:hover { color: var(--text-sec); }

.pricing-disclaimer-note a { color: var(--text-dim); text-decoration: underline; }
.pricing-disclaimer-note a:hover { color: var(--text-sec); }

.legal-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}
.legal-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-dim);
}
.legal-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}
.legal-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}
.legal-body {
  color: var(--text-sec);
  line-height: 1.75;
  font-size: 15px;
}
.legal-body h2 {
  color: var(--text-pri);
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 14px;
}
.legal-body h3 {
  color: var(--text-pri);
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 10px;
}
.legal-body p  { margin: 0 0 14px; }
.legal-body strong { color: var(--text-pri); font-weight: 600; }
.legal-body ul,
.legal-body ol { margin: 10px 0 14px; padding-left: 24px; }
.legal-body li { margin: 5px 0; }
.legal-body a  { color: var(--accent, #176bf8); text-decoration: underline; }
.legal-body a:hover { opacity: 0.80; }
.legal-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-size: 13px;
}
.legal-footer a { color: var(--text-sec); }

/* Admin Dashboard — Vessel Registry tile (ADM-1) */
.admin-tile-vessel-registry { margin-top: 16px; }
.admin-tile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-tile-title { font-size: 14px; font-weight: 600; color: var(--text-pri); margin: 0; }
.admin-tile-status { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 4px; }
.admin-tile-status-fresh    { background: rgba(16,185,129,0.15); color: #10b981; }
.admin-tile-status-stale    { background: rgba(234,179,8,0.15);  color: #eab308; }
.admin-tile-status-critical { background: rgba(239,68,68,0.15);  color: #ef4444; }
.vr-stat { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-dim); font-size: 13px; }
.vr-stat:last-child { border-bottom: 0; }
.vr-stat-label { color: var(--text-dim); }
.vr-stat-value { color: var(--text-pri); font-family: var(--font-mono, 'JetBrains Mono', monospace); font-weight: 600; }
.vr-breakdown { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-dim); }
.vr-breakdown summary { cursor: pointer; color: var(--text-sec); font-size: 12px; user-select: none; }
.vr-breakdown summary:hover { color: var(--text-pri); }
.vr-breakdown-content { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .vr-breakdown-content { grid-template-columns: 1fr; } }
.vr-breakdown-section h4 { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 8px; }
.vr-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; font-family: var(--font-mono, 'JetBrains Mono', monospace); }
.vr-row span:first-child { color: var(--text-sec); }
.vr-row span:last-child  { color: var(--text-pri); }
