/* ═══════════════════════════════════════════════════════════════
   PRP Merit Intelligence – Dark Neon Dashboard
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Primary Accents (softer, professional) ── */
  --neon-cyan:   #4db8d9;   /* muted sky-blue, was #4db8d9 */
  --neon-purple: #7c65c4;   /* muted indigo, was #7c65c4 */
  --neon-green:  #3ecf8e;   /* muted teal-green, was #3ecf8e */
  --neon-gold:   #e8a627;   /* warm amber, was #e8a627 */
  --neon-pink:   #d44f7e;   /* muted rose, was #d44f7e */

  /* ── Backgrounds (deep navy, not pure black) ── */
  --bg-deep:   #0d1626;
  --bg-card:   rgba(16, 26, 52, 0.85);
  --bg-hover:  rgba(77, 184, 217, 0.05);
  --bg-input:  rgba(255, 255, 255, 0.05);

  /* ── Borders (subtler) ── */
  --border:        rgba(77, 184, 217, 0.12);
  --border-hover:  rgba(77, 184, 217, 0.28);
  --border-active: rgba(77, 184, 217, 0.55);

  /* ── Text (softer blue-white) ── */
  --text:       #c8daf0;
  --text-muted: #6b84a8;
  --text-light: #3a506e;

  /* ── Semantic (legacy compat) ── */
  --primary:       #4db8d9;
  --primary-light: #73cadf;
  --primary-dark:  #3090aa;
  --accent:        #3ecf8e;
  --accent-light:  #65dfa8;
  --danger:        #e05470;
  --warning:       #e8a627;
  --success:       #3ecf8e;
  --info:          #4db8d9;

  /* ── Legacy surface compat ── */
  --bg:        #0d1626;
  --surface:   rgba(16, 26, 52, 0.85);
  --surface-2: rgba(255, 255, 255, 0.03);

  /* ── Glows (reduced intensity) ── */
  --glow-cyan:   0 0 14px rgba(77,184,217,0.2), 0 0 30px rgba(77,184,217,0.08);
  --glow-green:  0 0 14px rgba(62,207,142,0.2);
  --glow-purple: 0 0 14px rgba(124,101,196,0.28);
  --glow-danger: 0 0 14px rgba(224,84,112,0.25);

  /* ── Spacing ── */
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.55);
  --shadow:    0 4px 24px rgba(0,0,0,0.65);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.8);

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Consolas', 'Courier New', monospace;

  /* ── Outcomes ── */
  --likely:     #3ecf8e;
  --borderline: #e8a627;
  --unlikely:   #e05470;

  /* ── Bands ── */
  --band-top:  #7c65c4;
  --band-high: #4db8d9;
  --band-mid:  #3ecf8e;
  --band-low:  #e05470;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Global scrollbar (Webkit + Firefox) ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(77,184,217,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(124,101,196,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 90%, rgba(62,207,142,0.025) 0%, transparent 50%);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.45s ease;
}

/* ─── BACKGROUND THEMES ─────────────────────────────── */
/* bg-default: same as base, registered for picker tracking */
body.bg-default {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(77,184,217,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(124,101,196,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 90%, rgba(62,207,142,0.025) 0%, transparent 50%);
}

/* bg-grid: fine blueprint grid */
body.bg-grid {
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(77,184,217,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,184,217,0.045) 1px, transparent 1px),
    radial-gradient(ellipse at 15% 40%, rgba(77,184,217,0.055) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 60%, rgba(124,101,196,0.055) 0%, transparent 55%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
}

/* bg-aurora: vivid northern-lights orbs that fill the sides */
body.bg-aurora {
  background-color: #080d1a;
  background-image:
    radial-gradient(ellipse 65% 55% at 12% 20%, rgba(77,184,217,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 55% 65% at 88% 22%, rgba(124,101,196,0.15) 0%, transparent 65%),
    radial-gradient(ellipse 70% 40% at 45% 82%, rgba(62,207,142,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 74% 90%, rgba(232,166,39,0.05) 0%, transparent 50%);
}

/* bg-dots: regular dot grid */
body.bg-dots {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle, rgba(77,184,217,0.11) 1px, transparent 1px),
    radial-gradient(ellipse at 18% 38%, rgba(77,184,217,0.045) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 62%, rgba(124,101,196,0.045) 0%, transparent 55%);
  background-size: 28px 28px, 100% 100%, 100% 100%;
}

/* bg-lines: diagonal 45° stripes */
body.bg-lines {
  background-color: var(--bg-deep);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 34px,
      rgba(77,184,217,0.038) 34px,
      rgba(77,184,217,0.038) 35px
    ),
    radial-gradient(ellipse at 50% 50%, rgba(124,101,196,0.06) 0%, transparent 65%);
}

/* bg-void: minimal clean dark */
body.bg-void {
  background-color: #070b14;
  background-image: none;
}

/* bg-rose: pink/magenta sides, amber undertone */
body.bg-rose {
  background-color: #0e0a1a;
  background-image:
    radial-gradient(ellipse 65% 55% at 4% 22%, rgba(212,79,126,0.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 96% 14%, rgba(180,60,220,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 70% 40% at 48% 88%, rgba(232,100,39,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 76% 90%, rgba(212,79,126,0.06) 0%, transparent 50%);
}

/* bg-northern: green-dominant real northern lights */
body.bg-northern {
  background-color: #061410;
  background-image:
    radial-gradient(ellipse 60% 55% at 8% 28%, rgba(62,207,142,0.15) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 92% 18%, rgba(77,184,217,0.11) 0%, transparent 60%),
    radial-gradient(ellipse 65% 40% at 44% 80%, rgba(62,207,142,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 22% 92%, rgba(124,101,196,0.07) 0%, transparent 50%);
}

/* bg-nebula: deep-space purple/pink scatter */
body.bg-nebula {
  background-color: #09061a;
  background-image:
    radial-gradient(ellipse 55% 50% at 6% 16%, rgba(124,101,196,0.17) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 94% 28%, rgba(212,79,126,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 65% 40% at 50% 78%, rgba(77,184,217,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 35% 45% at 66% 94%, rgba(160,60,220,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 25% 30% at 18% 82%, rgba(212,79,126,0.06) 0%, transparent 45%);
}

/* bg-solar: warm amber/gold aurora */
body.bg-solar {
  background-color: #0f0c07;
  background-image:
    radial-gradient(ellipse 62% 52% at 6% 20%, rgba(232,166,39,0.13) 0%, transparent 62%),
    radial-gradient(ellipse 55% 60% at 94% 16%, rgba(210,110,30,0.12) 0%, transparent 62%),
    radial-gradient(ellipse 65% 40% at 48% 82%, rgba(200,60,40,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 74% 94%, rgba(232,166,39,0.06) 0%, transparent 50%);
}

/* bg-dusk: indigo dusk, warm rose horizon */
body.bg-dusk {
  background-color: #0c0818;
  background-image:
    radial-gradient(ellipse 70% 32% at 50% 102%, rgba(212,79,126,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 4% 28%, rgba(124,101,196,0.15) 0%, transparent 62%),
    radial-gradient(ellipse 50% 55% at 96% 22%, rgba(77,184,217,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 45% 28% at 50% 4%, rgba(232,166,39,0.05) 0%, transparent 45%);
}

/* bg-midnight: cool deep navy, ice-blue rim lighting */
body.bg-midnight {
  background-color: #050e1f;
  background-image:
    radial-gradient(ellipse 60% 50% at 0% 48%, rgba(77,184,217,0.13) 0%, transparent 62%),
    radial-gradient(ellipse 55% 46% at 100% 42%, rgba(130,190,255,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 65% 35% at 50% 92%, rgba(77,184,217,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 30% 38% at 28% 8%, rgba(200,225,255,0.05) 0%, transparent 45%);
}

/* ─── Typography ─── */
h1 { font-size: 1.4rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem;   font-weight: 600; }
p  { color: var(--text-muted); }

/* ─── HEADER ─── */
.site-header {
  background: rgba(4, 8, 22, 0.92);
  border-bottom: 1px solid var(--border);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border), 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  animation: floatAnim 3.5s ease-in-out infinite;
  flex-shrink: 0;
}
.site-header h1 {
  color: var(--neon-cyan);
  font-size: 1.2rem;
  text-shadow: 0 0 20px rgba(77,184,217,0.42);
}
.header-sub { color: rgba(180,210,240,0.5); font-size: 0.75rem; margin: 0; }
.header-meta { display: flex; align-items: center; gap: 8px; }

/* ─── NOTIFICATION BELL ─── */
.notif-bell-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(77,184,217,0.06);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.notif-bell-btn:hover {
  border-color: rgba(77,184,217,0.4);
  background: rgba(77,184,217,0.12);
  color: var(--neon-cyan);
}
.notif-bell-btn.subscribed {
  border-color: rgba(62,207,142,0.35);
  background: rgba(62,207,142,0.08);
  color: var(--neon-green);
}
.notif-bell-btn.loading { opacity: 0.6; pointer-events: none; }

.bell-icon { flex-shrink: 0; transition: transform 0.3s; }
.notif-bell-btn:hover .bell-icon { transform: rotate(-12deg); }

.bell-dot {
  position: absolute;
  top: 4px; right: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--neon-gold);
  border: 1.5px solid var(--bg-deep);
  animation: bellDotPulse 2s ease-in-out infinite;
}
@keyframes bellDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,166,39,0.6); }
  50%       { box-shadow: 0 0 0 4px rgba(232,166,39,0); }
}

/* ─── LIVE UPDATE BANNER ─── */
.live-update-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  border-bottom: 1px solid transparent;
  animation: bannerSlideIn 0.3s ease;
  flex-wrap: wrap;
}
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.live-update-banner.lub-info    { background: rgba(77,184,217,0.1);  border-color: rgba(77,184,217,0.22);  color: #b8daea; }
.live-update-banner.lub-warning { background: rgba(232,166,39,0.1);  border-color: rgba(232,166,39,0.22);  color: #e8d0a0; }
.live-update-banner.lub-success { background: rgba(62,207,142,0.1);  border-color: rgba(62,207,142,0.22);  color: #a0e8c8; }
.live-update-banner.lub-danger  { background: rgba(224,84,112,0.1);  border-color: rgba(224,84,112,0.22);  color: #e8a8b8; }
.lub-icon   { font-size: 1rem; flex-shrink: 0; }
.lub-text   { flex: 1; min-width: 0; }
.lub-link   {
  color: var(--neon-cyan); text-decoration: underline;
  font-weight: 600; font-size: 0.8rem; white-space: nowrap;
}
.lub-close  {
  background: none; border: none; color: inherit; opacity: 0.6;
  font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 2px;
  flex-shrink: 0; transition: opacity 0.15s;
}
.lub-close:hover { opacity: 1; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-info     { background: rgba(77,184,217,0.1); color: var(--neon-cyan); border: 1px solid rgba(77,184,217,0.22); }
.badge-success  { background: rgba(62,207,142,0.1); color: var(--neon-green); border: 1px solid rgba(62,207,142,0.22); }
.badge-warning  { background: rgba(232,166,39,0.1); color: var(--neon-gold); border: 1px solid rgba(232,166,39,0.22); }
.badge-danger   { background: rgba(224,84,112,0.1); color: #e05470; border: 1px solid rgba(224,84,112,0.22); }
.badge-likely   { background: rgba(62,207,142,0.1); color: var(--neon-green); border: 1px solid rgba(62,207,142,0.28); }
.badge-borderline { background: rgba(232,166,39,0.1); color: var(--neon-gold); border: 1px solid rgba(232,166,39,0.28); }
.badge-unlikely { background: rgba(224,84,112,0.1); color: #e05470; border: 1px solid rgba(224,84,112,0.28); }

/* ─── TAB NAV ─── */
.tab-nav {
  background: rgba(4, 8, 22, 0.9);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  position: sticky;
  top: 62px;
  z-index: 190;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tab-btn {
  background: none;
  border: none;
  padding: 13px 18px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
  position: relative;
  text-decoration: none;
}
.tab-btn:hover { color: var(--neon-cyan); text-shadow: 0 0 12px rgba(77,184,217,0.42); }
.tab-btn.donate-btn {
  margin-left: auto;
  color: #f472b6;
  border-bottom-color: transparent;
}
.tab-btn.donate-btn:hover {
  color: #fb7ebd;
  text-shadow: 0 0 12px rgba(244,114,182,.45);
}
.tab-btn.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  font-weight: 700;
  text-shadow: 0 0 15px rgba(77,184,217,0.52);
}

/* ─── MAIN ─── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fadeInUp 0.35s cubic-bezier(0.22,1,0.36,1) both;
}

/* ─── SECTION HEADER ─── */
.section-header { margin-bottom: 22px; }
.section-header h2 {
  color: var(--neon-cyan);
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(77,184,217,0.32);
}
.section-header p { font-size: 0.875rem; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: fadeInUp 0.4s ease both;
}
.card:hover { border-color: rgba(77,184,217,0.18); }
.input-card  { border-top: 2px solid var(--neon-cyan); }
.filter-card { border-top: 2px solid var(--neon-green); }
.chart-card  { border-top: 2px solid var(--neon-purple); }
.chart-card h3 { margin-bottom: 8px; color: var(--neon-cyan); }

/* ─── FORM ─── */
.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-group input,
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(77,184,217,0.1), var(--glow-cyan);
  background: rgba(77,184,217,0.03);
}
.form-group select option { background: #0d1630; color: var(--text); }
.select-all-hint {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: none;
}
.select-all-hint.visible { display: block; }
.pred-merit-pct {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  font-weight: 600;
  line-height: 1.3;
}
.pred-merit-pct.hidden { display: none; }
.search-input {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-input);
  outline: none;
  width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(77,184,217,0.1);
  background: rgba(77,184,217,0.03);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--neon-cyan);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  background: rgba(77,184,217,0.07);
  color: var(--neon-cyan);
  letter-spacing: 0.02em;
}
.btn:hover {
  background: rgba(77,184,217,0.12);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}
.btn-primary  { background: rgba(77,184,217,0.08); color: var(--neon-cyan); }
.btn-primary:hover  { background: rgba(77,184,217,0.16); box-shadow: var(--glow-cyan); transform: translateY(-1px); }
.btn-large { padding: 12px 32px; font-size: 1rem; letter-spacing: 0.03em; }

/* ─── INSIGHTS BANNER ─── */
.insights-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.25s;
  animation: fadeInUp 0.5s ease both;
  cursor: default;
}
.insight-card:hover {
  border-color: rgba(77,184,217,0.28);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}
.insight-icon { font-size: 1.8rem; line-height: 1; }
.insight-text { display: flex; flex-direction: column; }
.insight-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(77,184,217,0.42);
}
.insight-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ─── POLICY NOTICE ─── */
.policy-notice {
  background: rgba(77,184,217,0.05);
  border: 1px solid rgba(77,184,217,0.18);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--neon-cyan);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.policy-icon { flex-shrink: 0; }

/* ─── RESULTS CONTROLS ─── */
.results-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.pill:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.pill.active {
  background: rgba(77,184,217,0.1);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(77,184,217,0.18);
}

/* ─── TABLE ─── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: rgba(6, 10, 24, 0.7);
}
.data-table thead th {
  background: rgba(77,184,217,0.07);
  border-bottom: 1px solid rgba(77,184,217,0.16);
  color: var(--neon-cyan);
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(77,184,217,0.05); }
.data-table td {
  padding: 10px 14px;
  vertical-align: middle;
  color: var(--text);
}
.table-caption { font-size: 0.8rem; color: var(--text-light); padding: 6px 2px; }

/* Row coloring by outcome */
.row-likely     { border-left: 3px solid var(--neon-green) !important; }
.row-borderline { border-left: 3px solid var(--neon-gold)  !important; }
.row-unlikely   { border-left: 3px solid #e05470           !important; }

/* ─── TREND BADGES ─── */
.trend-rising  { color: #e05470; font-weight: 700; }
.trend-falling { color: var(--neon-green); font-weight: 700; }
.trend-stable  { color: var(--text-muted); }
.vol-high   { color: #e05470; font-weight: 600; }
.vol-medium { color: var(--neon-gold); font-weight: 600; }
.vol-low    { color: var(--neon-green); font-weight: 600; }
.conf-high   { color: var(--neon-green); }
.conf-medium { color: var(--neon-gold); }
.conf-low    { color: var(--text-light); }

/* Competitiveness */
.comp-very_high { color: var(--neon-purple); font-weight: 700; }
.comp-high      { color: var(--neon-cyan); font-weight: 600; }
.comp-medium    { color: var(--neon-green); font-weight: 600; }
.comp-low       { color: var(--text-muted); }

/* ─── EXPLORER VIEW TOGGLE ─── */
.explorer-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.explorer-toggle-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.explorer-view-btn {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.18s;
}
.explorer-view-btn.active,
.explorer-view-btn:hover {
  background: rgba(77, 184, 217, 0.1);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* ─── SPECIALTY GRID ─── */
.specialty-grid,
.hospital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.spec-card, .hosp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.4s ease both;
}
.spec-card::before, .hosp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}
.spec-card::after, .hosp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(77,184,217,0.07) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.spec-card:hover, .hosp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(77,184,217,0.32);
  box-shadow: var(--shadow), var(--glow-cyan);
}
.spec-card:hover::after, .hosp-card:hover::after { opacity: 1; }
.spec-card h4, .hosp-card h4 {
  font-size: 0.95rem;
  color: var(--neon-cyan);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.card-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 80px;
}
.card-stat-label { font-size: 0.68rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; }
.card-stat-value { font-size: 1.05rem; font-weight: 700; color: var(--text); }

/* ─── MODAL ─── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,7,22,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-box {
  position: relative;
  background: rgba(9, 14, 34, 0.98);
  border: 1px solid rgba(77,184,217,0.18);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(77,184,217,0.08);
  z-index: 1;
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-box.wide { max-width: 960px; }
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 8px;
  transition: all 0.15s;
  line-height: 1;
}
.modal-close:hover { background: rgba(224,84,112,0.12); border-color: #e05470; color: #e05470; }
.modal-box h3 { color: var(--neon-cyan); margin-bottom: 16px; font-size: 1.1rem; }
.modal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-stat {
  background: rgba(77,184,217,0.05);
  border: 1px solid rgba(77,184,217,0.12);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
  min-width: 100px;
}
.modal-stat-val  { font-size: 1.2rem; font-weight: 800; color: var(--neon-cyan); }
.modal-stat-lbl  { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-table-wrap { margin-top: 16px; }

/* ─── MODAL FILTERS ─── */
.modal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(77,184,217,0.04);
  border: 1px solid rgba(77,184,217,0.10);
  border-radius: var(--radius);
}
.modal-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.modal-filter-group label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-filter-group select {
  background: rgba(9,14,34,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 5px 8px;
  font-size: 0.82rem;
  cursor: pointer;
}
.modal-toggle-group {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.modal-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-toggle-btn + .modal-toggle-btn {
  border-left: 1px solid var(--border);
}
.modal-toggle-btn.active {
  background: rgba(77,184,217,0.15);
  color: var(--neon-cyan);
}

/* ─── MODAL DRILL AREA ─── */
.modal-drill-area {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: rgba(77,184,217,0.03);
  border: 1px solid rgba(77,184,217,0.12);
  border-radius: var(--radius);
}
.modal-drill-title {
  font-size: 0.8rem;
  color: var(--neon-cyan);
  margin-bottom: 8px;
  font-weight: 600;
}

/* ─── CLICKABLE TABLE ROWS ─── */
tr.clickable-row { cursor: pointer; transition: background 0.15s; }
tr.clickable-row:hover { background: rgba(77,184,217,0.07); }
tr.clickable-row.active { background: rgba(77,184,217,0.12); outline: 1px solid rgba(77,184,217,0.3); }

/* ─── CHARTS ─── */
.chart-container { position: relative; width: 100%; height: 280px; }
.chart-container.tall { height: 380px; }
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.full-width { grid-column: 1 / -1; }
.chart-note { font-size: 0.82rem; color: var(--text-light); margin-bottom: 8px; }

/* ─── STRATEGY ─── */
.band-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.4s ease both;
}
.band-header { display: flex; align-items: center; gap: 16px; }
.band-badge {
  width: 54px; height: 54px;
  border-radius: 50%;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.band-top    { background: rgba(124,101,196,0.16); box-shadow: 0 0 16px rgba(124,101,196,0.25); }
.band-high   { background: rgba(77,184,217,0.12);  box-shadow: var(--glow-cyan); }
.band-mid    { background: rgba(62,207,142,0.1);   box-shadow: var(--glow-green); }
.band-low    { background: rgba(224,84,112,0.1);   box-shadow: var(--glow-danger); }
.band-card h3 { color: var(--neon-cyan); margin-bottom: 2px; }

.strategy-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.strategy-col {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.5s ease both;
}
.strat-col-header {
  padding: 18px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.strategy-col.safe      .strat-col-header { background: rgba(62,207,142,0.05); border-top: 2px solid var(--neon-green); }
.strategy-col.moderate  .strat-col-header { background: rgba(232,166,39,0.05); border-top: 2px solid var(--neon-gold); }
.strategy-col.ambitious .strat-col-header { background: rgba(77,184,217,0.05); border-top: 2px solid var(--neon-cyan); }
.strat-icon { font-size: 1.5rem; }
.strat-col-header h3 { margin: 6px 0 2px; font-size: 0.95rem; color: var(--text); }
.strat-col-header p  { font-size: 0.77rem; }
.strat-col-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 500px; overflow-y: auto; }

.strat-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.82rem;
  transition: border-color 0.15s;
}
.strat-item:hover { border-color: rgba(77,184,217,0.18); }
.strat-item-specialty { font-weight: 700; color: var(--neon-cyan); margin-bottom: 3px; }
.strat-item-hospital  { color: var(--text-muted); margin-bottom: 4px; line-height: 1.3; font-size: 0.79rem; }
.strat-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
}
.strat-item-gap { font-weight: 700; }
.gap-positive { color: var(--neon-green); }
.gap-small    { color: var(--neon-gold); }
.gap-negative { color: #e05470; }

/* ─── LOADING (see LOADING SCREEN section below for full styles) ─── */

/* ─── FOOTER ─── */
/* Author bar */
.author-bar {
  background: rgba(77,184,217,0.06);
  border-bottom: 1px solid rgba(77,184,217,0.12);
  padding: 5px 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.author-bar a { color: var(--neon-cyan); text-decoration: none; }
.author-bar a:hover { text-decoration: underline; }
.author-bar-note { opacity: 0.65; }

/* Daily verse banner */
.daily-verse {
  background: linear-gradient(135deg, rgba(62,207,142,0.08) 0%, rgba(77,184,217,0.08) 100%);
  border-bottom: 1px solid rgba(62,207,142,0.15);
  padding: 14px 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.daily-verse.hidden { display: none; }
.dv-arabic {
  font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
  font-size: 1.35rem;
  line-height: 2;
  color: #3ecf8e;
  direction: rtl;
  unicode-bidi: embed;
  letter-spacing: 0.03em;
  text-shadow: 0 0 18px rgba(62,207,142,0.35);
}
.dv-translation {
  font-size: 0.88rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.5;
}
.dv-ref {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  opacity: 0.7;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.site-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
}
.site-footer p { margin: 3px 0; }
.site-footer a:hover { opacity: 0.8; }

/* About card in guide */
.guide-about {
  background: rgba(77,184,217,0.06);
  border: 1px solid rgba(77,184,217,0.18);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 28px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.guide-about-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.guide-about-icon { font-size: 1.5rem; }
.guide-about-header strong { display: block; font-size: 0.9rem; color: var(--text); }
.guide-about-handle { font-size: 0.76rem; color: var(--text-muted); }
.guide-about-handle a { color: var(--neon-cyan); text-decoration: none; }
.guide-about-handle a:hover { text-decoration: underline; }
.guide-about p { margin: 6px 0 0; }
.guide-about strong { color: var(--text-light); }

/* ─── UTILITY ─── */
.hidden { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(77,184,217,0.18); }
  50%       { box-shadow: 0 0 24px rgba(77,184,217,0.48), 0 0 50px rgba(77,184,217,0.18); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ═══════════════════════════════════════════════════════
   TOOLTIP SYSTEM
   ═══════════════════════════════════════════════════════ */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(77,184,217,0.1);
  border: 1px solid rgba(77,184,217,0.28);
  color: var(--neon-cyan);
  font-size: 0.62rem;
  font-weight: 900;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 4px;
  transition: all 0.2s;
  line-height: 1;
  flex-shrink: 0;
  font-style: normal;
}
.info-btn:hover {
  background: rgba(77,184,217,0.18);
  box-shadow: 0 0 7px rgba(77,184,217,0.35);
}
.tooltip-popup {
  position: fixed;
  z-index: 9999;
  max-width: 270px;
  background: rgba(13, 20, 42, 0.98);
  border: 1px solid rgba(77,184,217,0.28);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg), 0 0 16px rgba(77,184,217,0.12);
  animation: fadeIn 0.15s ease;
  pointer-events: none;
}
.tooltip-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 5px;
}
.tooltip-body {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.tooltip-example {
  margin-top: 6px;
  font-size: 0.73rem;
  color: var(--neon-green);
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 5px;
}

/* ═══════════════════════════════════════════════════════
   WELCOME MODAL
   ═══════════════════════════════════════════════════════ */
#welcomeModal .modal-box {
  max-width: 560px;
  padding: 36px;
  border: 1px solid rgba(77,184,217,0.22);
}
.welcome-hero {
  text-align: center;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.welcome-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 14px rgba(77,184,217,0.45));
  animation: floatAnim 3s ease-in-out infinite;
}
.welcome-hero h2 {
  font-size: 1.5rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(77,184,217,0.35);
  margin-bottom: 8px;
}
.welcome-hero p { color: var(--text-muted); font-size: 0.9rem; }
.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.welcome-step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(77,184,217,0.1);
  border: 1px solid rgba(77,184,217,0.3);
  color: var(--neon-cyan);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-text h4 { font-size: 0.88rem; color: var(--text); margin-bottom: 2px; }
.step-text p  { font-size: 0.8rem; line-height: 1.45; }
.welcome-actions { display: flex; gap: 12px; justify-content: center; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 9px 20px;
  font-family: var(--font);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

/* ═══════════════════════════════════════════════════════
   GUIDE TAB
   ═══════════════════════════════════════════════════════ */
.guide-hero {
  background: linear-gradient(135deg, rgba(77,184,217,0.05) 0%, rgba(124,101,196,0.04) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}
.guide-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-green));
}
.guide-hero h2 {
  font-size: 1.6rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(77,184,217,0.36);
  margin-bottom: 10px;
}
.guide-hero p { font-size: 0.95rem; max-width: 560px; margin: 0 auto; }

.guide-quick-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.guide-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  animation: fadeInUp 0.5s ease both;
  position: relative;
  overflow: hidden;
}
.guide-step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}
.guide-step-card:hover { border-color: rgba(77,184,217,0.28); transform: translateY(-3px); }
.guide-step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(77,184,217,0.1);
  border: 1px solid rgba(77,184,217,0.22);
  color: var(--neon-cyan);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.guide-step-card h4 { color: var(--text); font-size: 0.9rem; margin-bottom: 6px; }
.guide-step-card p  { font-size: 0.8rem; line-height: 1.55; }

.guide-faq-section { margin-bottom: 32px; }
.guide-faq-section h3 {
  color: var(--neon-purple);
  font-size: 1rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 12px rgba(124,101,196,0.35);
}
.guide-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}
.faq-q {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: background 0.15s;
  user-select: none;
  gap: 10px;
}
.faq-q:hover { background: rgba(77,184,217,0.05); }
.faq-q.open { color: var(--neon-cyan); }
.faq-arrow { transition: transform 0.2s; font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.faq-q.open .faq-arrow { transform: rotate(180deg); color: var(--neon-cyan); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq-a.open { max-height: 320px; padding: 12px 16px 18px; border-top: 1px solid var(--border); }
.faq-a em   { color: var(--neon-green); font-style: normal; font-weight: 600; }
.faq-a code { background: rgba(77,184,217,0.08); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; color: var(--neon-cyan); }
.faq-a .example-box {
  background: rgba(62,207,142,0.06);
  border-left: 3px solid var(--neon-green);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--neon-green);
}

.guide-tips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.guide-tip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon-green);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
  animation: fadeInUp 0.4s ease both;
  line-height: 1.55;
}
.guide-tip strong { color: var(--neon-green); display: block; margin-bottom: 3px; }
.guide-warning {
  background: rgba(224,84,112,0.05);
  border: 1px solid rgba(224,84,112,0.2);
  border-left: 3px solid #e05470;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
}
.guide-warning strong { color: #e05470; }

/* ═══════════════════════════════════════════════════════
   LOADING SCREEN (redesigned)
   ═══════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-box {
  text-align: center;
  max-width: 420px;
  width: 90%;
  padding: 48px 32px;
  background: rgba(16, 26, 52, 0.9);
  border: 1px solid rgba(77,184,217,0.18);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(77,184,217,0.1), 0 24px 80px rgba(0,0,0,0.5);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.loading-logo-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  mix-blend-mode: screen;
  display: block;
  margin: 0 auto 16px;
  animation: floatAnim 3s ease-in-out infinite;
}
.loading-brand h2 {
  color: var(--neon-cyan);
  font-size: 1.4rem;
  margin: 0 0 4px;
  text-shadow: 0 0 24px rgba(77,184,217,0.4);
}
.loading-brand p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 0 28px;
}
.loading-progress-wrap {
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid rgba(77,184,217,0.12);
}
.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 100px;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(77,184,217,0.5);
}
.loading-stage {
  color: var(--text);
  font-size: 0.875rem;
  margin: 0 0 8px;
  min-height: 1.3em;
}
.loading-tip {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.6s ease;
  line-height: 1.5;
}
.loading-tip.visible { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   MERIT CONTEXT BAR
   ═══════════════════════════════════════════════════════ */
.merit-context-bar {
  background: rgba(4, 8, 22, 0.94);
  border-bottom: 1px solid rgba(77,184,217,0.15);
  padding: 7px 24px;
  position: sticky;
  top: 62px;            /* below site-header */
  z-index: 185;         /* below tab-nav (190) so tab-nav wins */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.merit-context-bar.hidden {
  display: none;
}
/* push tab-nav down when context bar is visible */
.merit-context-bar:not(.hidden) ~ nav.tab-nav {
  top: calc(62px + 36px);
}
.merit-context-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.merit-context-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.merit-context-score {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(77,184,217,0.4);
}
.merit-context-band {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(77,184,217,0.06);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(77,184,217,0.14);
}
.merit-context-sep { color: var(--text-light); }
.merit-context-stat {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.merit-context-btn {
  margin-left: auto;
  background: rgba(77,184,217,0.1);
  border: 1px solid rgba(77,184,217,0.25);
  color: var(--neon-cyan);
  border-radius: var(--radius);
  padding: 4px 14px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.merit-context-btn:hover {
  background: rgba(77,184,217,0.18);
  box-shadow: 0 0 10px rgba(77,184,217,0.2);
}

/* ═══════════════════════════════════════════════════════
   RECENT SCORES BAR
   ═══════════════════════════════════════════════════════ */
.recent-scores-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.recent-scores-bar.hidden { display: none; }
.recent-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.recent-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.recent-chip {
  background: rgba(77,184,217,0.07);
  border: 1px solid rgba(77,184,217,0.2);
  color: var(--neon-cyan);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.recent-chip:hover {
  background: rgba(77,184,217,0.16);
}
.recent-clear {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s;
}
.recent-clear:hover { color: #e05470; }

/* ═══════════════════════════════════════════════════════
   HAMBURGER BUTTON (mobile nav)
   ═══════════════════════════════════════════════════════ */
.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s;
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.2s;
}
.hamburger-btn:hover { border-color: var(--neon-cyan); }
.hamburger-btn:hover span { background: var(--neon-cyan); }

/* ═══════════════════════════════════════════════════════
   BACK TO TOP BUTTON
   ═══════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: rgba(16, 26, 52, 0.92);
  border: 1px solid rgba(77,184,217,0.25);
  color: var(--neon-cyan);
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s;
  z-index: 300;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.back-to-top:hover {
  box-shadow: 0 0 16px rgba(77,184,217,0.3);
  background: rgba(77,184,217,0.12);
}

/* ═══════════════════════════════════════════════════════
   KEYBOARD SHORTCUT HINT
   ═══════════════════════════════════════════════════════ */
.kbd-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(16, 26, 52, 0.95);
  border: 1px solid rgba(77,184,217,0.2);
  border-radius: 100px;
  padding: 9px 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: fadeInUp 0.4s ease both;
  transition: opacity 0.5s ease;
}
.kbd-hint.hidden { display: none; }
.kbd-hint kbd {
  background: rgba(77,184,217,0.1);
  border: 1px solid rgba(77,184,217,0.22);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.78rem;
  color: var(--neon-cyan);
  font-family: monospace;
}
.kbd-hint button {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0 0 6px;
  line-height: 1;
  transition: color 0.2s;
}
.kbd-hint button:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════
   TOOLS TAB
   ═══════════════════════════════════════════════════════ */
.tool-card {
  margin-bottom: 24px;
}
.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.tool-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(77,184,217,0.3));
}
.tool-card-header h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.tool-card-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── What-If Simulator ── */
.sim-slider-section {
  margin: 20px 0 16px;
}
.sim-slider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sim-adj-val {
  color: var(--neon-cyan);
  font-size: 1rem;
  font-weight: 800;
  min-width: 48px;
}
.sim-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(77,184,217,0.14);
}
.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(77,184,217,0.4);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.sim-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 18px rgba(77,184,217,0.6);
}
.sim-range-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 5px;
}
.sim-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sim-side-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.sim-side-label strong { color: var(--text); font-size: 1rem; }
.sim-side-b .sim-side-label strong { color: var(--neon-cyan); }
.sim-vs {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  background: rgba(77,184,217,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-bars { display: flex; flex-direction: column; gap: 8px; }
.sim-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}
.sim-stat-label {
  width: 80px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sim-stat-track {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 100px;
  overflow: hidden;
}
.sim-stat-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s ease;
}
.sim-stat-fill.likely     { background: var(--neon-green); box-shadow: 0 0 6px rgba(62,207,142,0.3); }
.sim-stat-fill.borderline { background: var(--neon-gold);  box-shadow: 0 0 6px rgba(232,166,39,0.3); }
.sim-stat-fill.unlikely   { background: #e05470;            box-shadow: 0 0 6px rgba(224,84,112,0.2); }
.sim-stat-count {
  width: 32px;
  text-align: right;
  font-weight: 700;
  font-size: 0.82rem;
}
.sim-stat-count.likely     { color: var(--neon-green); }
.sim-stat-count.borderline { color: var(--neon-gold); }
.sim-stat-count.unlikely   { color: #e05470; }
.tool-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

/* ── Gap Analyzer ── */
.gap-result {
  margin-top: 22px;
  animation: fadeInUp 0.35s ease both;
}
.gap-result.hidden { display: none; }
.gap-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.gap-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.gap-card-main {
  border-color: rgba(77,184,217,0.22);
  background: rgba(77,184,217,0.04);
}
.gap-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.gap-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.gap-value.positive { color: var(--neon-green); text-shadow: 0 0 12px rgba(62,207,142,0.3); }
.gap-value.negative { color: #e05470; text-shadow: 0 0 12px rgba(224,84,112,0.2); }
.gap-value.projected { color: var(--neon-gold); font-size: 1.1rem; }
.gap-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 2px;
}
.gap-verdict {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.gap-verdict.positive { background: rgba(62,207,142,0.07); border-left: 3px solid var(--neon-green); color: var(--text); }
.gap-verdict.negative { background: rgba(224,84,112,0.07); border-left: 3px solid #e05470; color: var(--text); }
.gap-verdict strong { color: var(--neon-cyan); }
.gap-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.gap-history-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.72rem;
}
.gap-history-item .gh-year { color: var(--text-muted); display: block; margin-bottom: 2px; }
.gap-history-item .gh-val  { color: var(--text); font-weight: 700; font-size: 0.85rem; }
.gap-history-item.gh-latest { border-color: rgba(77,184,217,0.3); background: rgba(77,184,217,0.06); }
.gap-history-item.gh-latest .gh-val { color: var(--neon-cyan); }

/* ── Shortlist ── */
.shortlist-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.shortlist-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.btn-sm {
  background: rgba(77,184,217,0.08);
  border: 1px solid rgba(77,184,217,0.2);
  color: var(--neon-cyan);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-sm:hover { background: rgba(77,184,217,0.16); }
.btn-danger-soft {
  background: rgba(224,84,112,0.07) !important;
  border-color: rgba(224,84,112,0.22) !important;
  color: #e05470 !important;
}
.btn-danger-soft:hover { background: rgba(224,84,112,0.14) !important; }
.link-btn {
  background: none;
  border: none;
  color: var(--neon-cyan);
  cursor: pointer;
  font-family: var(--font);
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}
.link-btn:hover { opacity: 0.8; }

/* Star button in predictor table */
.col-star { width: 36px; text-align: center; }
.shortlist-star {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s, transform 0.15s;
}
.shortlist-star:hover  { color: var(--neon-gold); transform: scale(1.2); }
.shortlist-star.saved  { color: var(--neon-gold); }
.shortlist-remove {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 2px 6px;
  transition: color 0.2s;
}
.shortlist-remove:hover { color: #e05470; }

/* ═══════════════════════════════════════════════════════
   TREND TOGGLE
   ═══════════════════════════════════════════════════════ */
.trend-toggle-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.trend-toggle-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.trend-toggle-btn {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.trend-toggle-btn:hover { background: rgba(77,184,217,0.08); color: var(--neon-cyan); border-color: rgba(77,184,217,0.3); }
.trend-toggle-btn.active { background: rgba(77,184,217,0.12); color: var(--neon-cyan); border-color: rgba(77,184,217,0.4); font-weight: 600; }
.trend-toggle-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  flex: 1 1 100%;
}

/* ── Trend policy annotation bar ── */
.trend-policy-annotation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0 4px;
  font-size: 0.75rem;
}
.trend-anno-label { color: var(--text-muted); white-space: nowrap; }
.trend-anno-chip {
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(124,101,196,0.12);
  border: 1px solid rgba(124,101,196,0.22);
  color: #a08ee0;
  font-size: 0.72rem;
  cursor: default;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   MERIT CALCULATOR TAB
   ═══════════════════════════════════════════════════════ */

/* Saved merit banner */
.calc-saved-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(62,207,142,0.07);
  border: 1px solid rgba(62,207,142,0.22);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.calc-saved-label { color: #3ecf8e; font-size: 0.82rem; }
.calc-saved-score { color: var(--neon-cyan); font-size: 1.2rem; }
.calc-saved-policy { color: var(--text-muted); font-size: 0.78rem; }
.calc-saved-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* Policy info bar */
.calc-policy-info {
  margin-bottom: 16px;
  padding: 14px 20px;
}
.calc-policy-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.calc-policy-badge { font-size: 0.78rem; }
.calc-policy-note { color: var(--text-muted); font-size: 0.82rem; }
.calc-policy-warning {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(232,166,39,0.1);
  border: 1px solid rgba(232,166,39,0.25);
  border-radius: 8px;
  color: #e8a627;
  font-size: 0.8rem;
}

/* Form */
.calc-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px 24px; margin-bottom: 20px; }
.calc-form-loading { color: var(--text-muted); padding: 24px 0; text-align: center; }
.calc-form-group { display: flex; flex-direction: column; gap: 6px; }
.calc-form-label-row { display: flex; justify-content: space-between; align-items: center; }
.calc-form-label { font-size: 0.88rem; color: var(--text-light); font-weight: 600; }
.calc-form-max { font-size: 0.75rem; color: var(--neon-cyan); background: rgba(77,184,217,0.1); padding: 1px 8px; border-radius: 100px; white-space: nowrap; }
.calc-form-desc { font-size: 0.74rem; color: var(--text-muted); margin: 0; }
.calc-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.calc-input:focus { outline: none; border-color: var(--neon-cyan); background: rgba(77,184,217,0.04); }
.calc-input-hint { font-size: 0.72rem; color: var(--text-muted); }
.calc-checkbox-wrap { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.calc-checkbox { width: 18px; height: 18px; accent-color: var(--neon-cyan); cursor: pointer; flex-shrink: 0; }
.calc-checkbox-label { font-size: 0.88rem; color: var(--text-light); cursor: pointer; }

/* FCPS / JCAT combo input */
.calc-fj-wrap { display: flex; flex-direction: column; gap: 8px; }
.calc-fj-sub { display: flex; flex-direction: column; gap: 4px; padding-left: 10px; border-left: 2px solid rgba(77,184,217,0.25); }
.calc-fj-sub.hidden { display: none; }
.calc-fj-sub-input { margin-top: 0; }

.calc-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }

/* Result box */
.calc-result-box {
  background: rgba(4,8,22,0.8);
  border: 1px solid rgba(77,184,217,0.22);
  border-radius: 16px;
  padding: 24px 24px 20px;
  margin-top: 16px;
  animation: scaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
.calc-result-score {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.calc-result-label { display: block; font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.calc-result-value-row { display: flex; align-items: baseline; gap: 6px; }
.calc-result-value { font-size: 2.8rem; font-weight: 700; color: var(--neon-cyan); text-shadow: 0 0 24px rgba(77,184,217,0.4); }
.calc-result-out { font-size: 1rem; color: var(--text-muted); }
.calc-result-badge { padding: 6px 16px; border-radius: 100px; font-size: 0.88rem; font-weight: 600; align-self: center; }

/* Breakdown */
.calc-result-breakdown { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.calc-breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto 120px auto;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}
.calc-breakdown-label { color: var(--text-light); }
.calc-breakdown-value { color: var(--text-muted); white-space: nowrap; min-width: 50px; text-align: right; }
.calc-breakdown-bar-wrap { background: rgba(255,255,255,0.06); border-radius: 100px; height: 6px; overflow: hidden; }
.calc-breakdown-bar { height: 100%; background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple)); border-radius: 100px; transition: width 0.5s ease; }
.calc-breakdown-pts { color: var(--neon-cyan); font-size: 0.78rem; white-space: nowrap; text-align: right; }
.calc-result-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }

.calc-disclaimer { margin-top: 20px; }

/* ═══════════════════════════════════════════════════════
   POLICY HISTORY TAB
   ═══════════════════════════════════════════════════════ */

.policy-percentile-callout {
  border-left: 3px solid var(--neon-purple);
  margin-bottom: 16px;
  padding: 16px 20px;
}
.policy-percentile-callout h3 { color: var(--neon-cyan); margin: 0 0 8px; font-size: 1rem; }
.policy-percentile-callout p  { color: var(--text-light); font-size: 0.86rem; margin: 0; line-height: 1.6; }

/* Comparison table cell styles */
.policy-cell-in  { color: #3ecf8e; font-weight: 600; font-size: 0.82rem; }
.policy-cell-out { color: var(--text-muted); font-size: 0.8rem; }
.policy-cell-na  { color: var(--border); font-size: 0.8rem; }
.policy-total-row td { background: rgba(77,184,217,0.05); font-weight: 600; }

/* Timeline cards */
.policy-timeline { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.policy-card {
  background: rgba(10,16,36,0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.policy-card:hover { border-color: rgba(77,184,217,0.22); }
.policy-card-expected {
  border-color: rgba(232,166,39,0.3);
  background: rgba(232,166,39,0.03);
}
.policy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.policy-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.policy-card-year { font-size: 1.05rem; font-weight: 700; color: var(--neon-cyan); }
.policy-expected-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(232,166,39,0.12);
  border: 1px solid rgba(232,166,39,0.3);
  color: #e8a627;
  font-weight: 600;
}
.policy-card-total {
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 100px;
  background: rgba(77,184,217,0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(77,184,217,0.18);
  white-space: nowrap;
}
.policy-card-notes { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 14px; }

.policy-components-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.policy-comp-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  border: 1px solid;
}
.policy-comp-in  { background: rgba(62,207,142,0.08); border-color: rgba(62,207,142,0.25); color: #3ecf8e; }
.policy-comp-out { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); color: var(--text-muted); text-decoration: line-through; }
.policy-comp-marks { font-weight: 700; }

.policy-tidbits { margin-top: 14px; }
.policy-tidbits h4 { font-size: 0.84rem; color: var(--neon-cyan); margin: 0 0 8px; }
.policy-tidbits ul { margin: 0; padding-left: 18px; }
.policy-tidbits li { font-size: 0.82rem; color: var(--text-light); margin-bottom: 5px; line-height: 1.5; }

.policy-stats-section { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.policy-stats-section h4 { font-size: 0.84rem; color: var(--text-light); margin: 0 0 10px; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .charts-grid { grid-template-columns: 1fr; }
  .strategy-columns { grid-template-columns: 1fr; }
  .guide-faq-grid { grid-template-columns: 1fr; }
  .merit-context-bar { top: 62px; }
  .calc-form { grid-template-columns: 1fr; }
  .calc-breakdown-row { grid-template-columns: 1fr auto; }
  .calc-breakdown-bar-wrap, .calc-breakdown-value { display: none; }
}
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo-area h1 { font-size: 1rem; }
  .hamburger-btn { display: flex; }

  /* Collapsible mobile nav */
  .tab-nav {
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding-top: 0;
    padding-bottom: 0;
  }
  .tab-nav.nav-open {
    max-height: 420px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .tab-btn {
    padding: 12px 18px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
    margin-bottom: 0;
  }
  .tab-btn.active {
    border-left-color: var(--neon-cyan);
    border-bottom-color: var(--border);
  }

  .main-content { padding: 16px 12px 40px; }
  .input-grid { grid-template-columns: 1fr 1fr; }
  .insights-banner { grid-template-columns: 1fr 1fr; }
  .specialty-grid, .hospital-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 18px; }
  .guide-quick-steps { grid-template-columns: 1fr 1fr; }
  .strategy-columns { grid-template-columns: 1fr; }
  .merit-context-inner { gap: 6px; }
  .merit-context-btn { margin-left: 0; }
  .sim-comparison { grid-template-columns: 1fr; }
  .sim-vs { display: none; }
  .gap-cards { grid-template-columns: 1fr 1fr; }
}

@media print {
  .site-header, .tab-nav, .merit-context-bar, .back-to-top,
  .kbd-hint, .loading-overlay, .shortlist-actions,
  .section-header p, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .tab-content { display: block !important; }
  .tab-content:not(#tab-tools) { display: none !important; }
  .data-table { border-collapse: collapse; width: 100%; }
  .data-table th, .data-table td { border: 1px solid #ccc; padding: 6px 8px; font-size: 11px; color: #000; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}


/* ══════════════════════════════════════════════════════
   MERIT TABLE — Two-Pane Layout
══════════════════════════════════════════════════════ */
.mt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.mt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.mt-filter-sel {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 120px;
}
.mt-filter-sel:focus { outline: none; border-color: var(--neon-cyan); }

.mt-filter-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  width: 150px;
  transition: border-color 0.2s;
}
.mt-filter-input:focus { outline: none; border-color: var(--neon-cyan); background: rgba(77,184,217,0.03); }

.mt-display-toggle {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.mt-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.mt-toggle-btn + .mt-toggle-btn { border-left: 1px solid var(--border); }
.mt-toggle-btn.active {
  background: rgba(77,184,217,0.12);
  color: var(--neon-cyan);
  font-weight: 600;
}

.mt-count { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* Two-pane */
.mt-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  transition: grid-template-columns 0.3s ease;
}
.mt-layout.sidebar-open { grid-template-columns: 1fr 390px; gap: 16px; }
.mt-main { min-width: 0; }
.mt-table-wrap {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Merit table */
.mt-table { width: 100%; }
.mt-cell-spec { font-weight: 600; color: var(--text); max-width: 180px; }
.mt-cell-hosp {
  color: var(--text-muted);
  font-size: 0.8rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-cell-sm { font-size: 0.8rem; color: var(--text-muted); }
.mt-yr-col { text-align: right; white-space: nowrap; }
.mt-yr-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.mt-no-data { color: var(--text-light); }
.mt-merit-high     { color: #3ecf8e; }
.mt-merit-mid      { color: #4db8d9; }
.mt-merit-low      { color: #e8a627; }
.mt-merit-vlow     { color: #e05470; }

.mt-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.mt-th-sort:hover { color: var(--neon-cyan); }
.mt-th-sort.active { color: var(--neon-cyan); }

.mt-row         { cursor: pointer; }
.mt-row:hover   { background: rgba(77,184,217,0.05); }
.mt-row-selected {
  background: rgba(77,184,217,0.1) !important;
  outline: 1px solid rgba(77,184,217,0.35);
}
.mt-overflow-note {
  text-align: center;
  color: var(--text-muted);
  padding: 12px;
  font-size: 0.8rem;
  font-style: italic;
}

/* Sidebar */
.mt-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 145px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  animation: fadeInUp 0.25s ease both;
}
.mt-sidebar.hidden { display: none; }
.mt-sidebar-inner  { padding: 20px; position: relative; }

.mt-sidebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.mt-sidebar-close:hover {
  background: rgba(224,84,112,0.1);
  border-color: #e05470;
  color: #e05470;
}

.mt-sidebar-chart-wrap { margin-top: 16px; }

/* Sidebar content */
.sidebar-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-right: 32px;
}
.sidebar-header h3 {
  color: var(--neon-cyan);
  font-size: 1rem;
  margin-bottom: 4px;
  line-height: 1.3;
}
.sidebar-hosp { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.sidebar-meta { font-size: 0.74rem; color: var(--text-light); margin: 3px 0 0; }

.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.sidebar-stat {
  background: rgba(77,184,217,0.04);
  border: 1px solid rgba(77,184,217,0.1);
  border-radius: var(--radius);
  padding: 9px 10px;
  text-align: center;
}
.sidebar-stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--neon-cyan);
  line-height: 1.2;
}
.sidebar-stat-lbl {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.sidebar-trend-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sidebar-pol-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 5px 8px;
  background: rgba(77,184,217,0.04);
  border-radius: 5px;
  margin-bottom: 10px;
}
.sidebar-year-table { margin-top: 10px; }
.sidebar-year-table .data-table th,
.sidebar-year-table .data-table td { padding: 5px 8px; font-size: 0.78rem; }
.yr-max { color: var(--text-muted); margin-left: 3px; }

/* ══════════════════════════════════════════════════════
   PREDICTOR (My Prediction)
══════════════════════════════════════════════════════ */
.pred-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(77,184,217,0.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  animation: fadeInUp 0.35s ease both;
}
.pred-hero.hidden { display: none; }

.pred-hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 130px;
}

.pred-pct-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 30px rgba(77,184,217,0.5);
  line-height: 1;
}
.pred-pct-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.pred-hero-band {
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(77,184,217,0.08);
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid rgba(77,184,217,0.2);
  text-align: center;
}
.pred-conf-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 130px;
  line-height: 1.4;
}

.pred-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.pred-hero-stats { display: flex; gap: 12px; }
.pred-hero-stat {
  flex: 1;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.pred-hero-val { font-size: 1.9rem; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.pred-hero-safe-val   { color: #3ecf8e; }
.pred-hero-target-val { color: #4db8d9; }
.pred-hero-reach-val  { color: #e8a627; }
.pred-hero-lbl { font-size: 0.72rem; color: var(--text-muted); }

.pred-dist-wrap { flex: 1; min-height: 100px; }

/* Policy notice */
.policy-notice {
  background: rgba(77,184,217,0.06);
  border: 1px solid rgba(77,184,217,0.2);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.policy-notice.hidden { display: none; }

/* ── Prediction legend (how to read a card) ── */
.pred-legend {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pred-legend-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 8px;
}
.pred-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 8px;
}
.pred-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pred-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.swatch-safe   { background: #3ecf8e; }
.swatch-target { background: #4db8d9; }
.swatch-reach  { background: #e8a627; }
.pred-legend-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.pred-legend-ex {
  font-family: monospace;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ── Quota-missing warning ── */
.pred-quota-warn {
  background: rgba(232,166,39,0.12);
  border: 1px solid rgba(232,166,39,0.35);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}
.pred-quota-warn.hidden { display: none; }

/* Results toolbar */
.pred-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* Buckets grid */
.pred-buckets-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.pred-buckets-flat { display: block; }
.pred-flat-list    { display: flex; flex-direction: column; gap: 6px; }

.pred-bucket {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.pred-bucket-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.pred-bucket-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 1px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}
.safe-header   { border-top: 2px solid #3ecf8e; background: rgba(62,207,142,0.04); }
.target-header { border-top: 2px solid #4db8d9; background: rgba(77,184,217,0.04); }
.reach-header  { border-top: 2px solid #e8a627; background: rgba(232,166,39,0.04); }
.pred-bucket-header h3 { font-size: 0.9rem; color: var(--text); margin: 0; }
.pred-bucket-header p  { font-size: 0.74rem; color: var(--text-muted); margin: 3px 0 0; }

.pred-bucket-items {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Prediction item cards */
.pred-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 9px 11px;
  transition: border-color 0.15s;
  position: relative;
}
.pred-item:hover { border-color: rgba(77,184,217,0.18); }
.pred-item-safe   { border-left: 2px solid #3ecf8e; }
.pred-item-target { border-left: 2px solid #4db8d9; }
.pred-item-reach  { border-left: 2px solid #e8a627; }

.pred-item-main { margin-bottom: 5px; }
.pred-item-spec  { font-weight: 700; font-size: 0.83rem; color: var(--text); }
.pred-item-hosp  { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; }
.pred-item-meta  { font-size: 0.68rem; color: var(--text-muted); opacity: 0.65; margin-top: 2px; }

.pred-item-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.72rem;
}
.pred-item-avg   { color: var(--text-light); }
.pred-item-delta { font-weight: 700; }
.delta-safe   { color: #3ecf8e; }
.delta-target { color: #4db8d9; }
.delta-reach  { color: #e8a627; }
.pred-item-proj { font-size: 0.71rem; }

.pred-bucket-tag {
  display: inline-block;
  font-size: 0.67rem;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 100px;
  margin-bottom: 4px;
  font-weight: 700;
}
.pred-bucket-tag-safe   { background: rgba(62,207,142,0.12);  color: #3ecf8e; }
.pred-bucket-tag-target { background: rgba(77,184,217,0.12);  color: #4db8d9; }
.pred-bucket-tag-reach  { background: rgba(232,166,39,0.12);  color: #e8a627; }

.pred-empty { color: var(--text-muted); font-size: 0.82rem; padding: 14px; text-align: center; }

/* ══════════════════════════════════════════════════════
   CURRENT MERIT PAGE
══════════════════════════════════════════════════════ */
.current-meta-card {
  background: rgba(77,184,217,0.04);
  border: 1px solid rgba(77,184,217,0.15);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 16px;
}
.cur-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  font-size: 0.85rem;
}
.cur-meta-lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.cur-meta-val     { font-weight: 600; color: var(--text); }
.cur-meta-status  { color: var(--neon-cyan); }
.cur-meta-note    { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.cur-loading-cell { text-align: center; padding: 36px; color: var(--text-muted); }

/* vs-last-year cell colors */
.delta-up   { color: #e05470; font-weight: 600; }
.delta-down { color: #3ecf8e; font-weight: 600; }
.delta-flat { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   CALC IMPROVEMENTS
══════════════════════════════════════════════════════ */
.calc-disclaimer {
  margin-top: 20px;
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════
   POLICY CARDS (improved)
══════════════════════════════════════════════════════ */
.policy-percentile-callout {
  background: rgba(77,184,217,0.04);
  border: 1px solid rgba(77,184,217,0.2);
  margin-bottom: 16px;
}
.policy-cell-na  { color: var(--text-light); }
.policy-cell-in  { color: var(--neon-green); font-weight: 600; }
.policy-cell-out { color: #e05470; }
.policy-total-row td { border-top: 2px solid var(--border); font-weight: 700; }
.policy-card-expected { border-left: 3px solid #e8a627; }
.policy-expected-badge {
  display: inline-block;
  background: rgba(232,166,39,0.12);
  color: #e8a627;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
}
.policy-card-notes { font-size: 0.82rem; color: var(--text-muted); margin: 8px 0; }
.policy-comp-pill { display: inline-flex; align-items: center; gap: 6px; margin: 3px; padding: 4px 10px; border-radius: 100px; font-size: 0.78rem; border: 1px solid var(--border); }
.policy-comp-in  { background: rgba(62,207,142,0.06); border-color: rgba(62,207,142,0.2); }
.policy-comp-out { background: rgba(224,84,112,0.06); border-color: rgba(224,84,112,0.2); color: var(--text-muted); text-decoration: line-through; }
.policy-comp-name { font-weight: 600; }
.policy-comp-marks { font-size: 0.72rem; color: var(--text-muted); }
.policy-tidbits { margin-top: 12px; }
.policy-tidbits h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.policy-tidbits ul { padding-left: 16px; }
.policy-tidbits li { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .mt-layout.sidebar-open { grid-template-columns: 1fr; }
  .mt-sidebar {
    position: fixed;
    inset: 0;
    z-index: 400;
    border-radius: 0;
    max-height: 100vh;
  }
  .pred-hero { grid-template-columns: 1fr; }
  .pred-buckets-3col { grid-template-columns: 1fr; }
  .pred-hero-stats { gap: 8px; }
  .cur-meta-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .mt-toolbar  { flex-direction: column; align-items: stretch; }
  .mt-filters  { flex-direction: column; }
  .mt-filter-input, .mt-filter-sel { width: 100%; }
  .cur-meta-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   GUIDE TAB
   ========================================================= */

/* Quick-start steps */
.guide-quickstart {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.guide-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.guide-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue, #5b8dee) 100%);
  color: var(--bg-deep);
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(77,184,217,0.4);
}

.guide-step-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.guide-step-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Section headings */
.guide-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Glossary */
.guide-glossary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.guide-term {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon-cyan);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.guide-term-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: rgba(77,184,217,0.05);
  border-bottom: 1px solid var(--border);
}

.guide-term-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--neon-cyan);
  flex: 1;
}

.guide-term-tag {
  font-size: 0.68rem;
  background: rgba(77,184,217,0.1);
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 100px;
  border: 1px solid rgba(77,184,217,0.15);
  white-space: nowrap;
}

.guide-term-body {
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.guide-term-body p { margin: 0 0 8px; }
.guide-term-body p:last-child { margin-bottom: 0; }

.guide-formula {
  background: rgba(77,184,217,0.06);
  border: 1px solid rgba(77,184,217,0.15);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.81rem;
  color: var(--neon-cyan);
  margin: 8px 0;
}

.guide-example {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 9px 14px;
  margin-top: 10px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.guide-list {
  margin: 8px 0;
  padding-left: 20px;
}
.guide-list li { margin-bottom: 4px; }

.guide-note {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 10px !important;
  opacity: 0.75;
}

/* Trend / Confidence / Volatility inline demo rows */
.guide-trend-demo,
.guide-conf-demo {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.guide-trend-demo:last-of-type,
.guide-conf-demo:last-of-type { border-bottom: none; }

/* Bucket demo rows */
.guide-bucket-demo {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-bucket-demo:last-of-type { border-bottom: none; }

/* Band table */
.guide-band-table {
  margin-top: 8px;
  font-size: 0.80rem;
}

/* FAQ */
.guide-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}

.guide-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.guide-faq-item summary {
  cursor: pointer;
  padding: 13px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.guide-faq-item summary::-webkit-details-marker { display: none; }

.guide-faq-item summary::after {
  content: '\002B';
  font-size: 1rem;
  color: var(--neon-cyan);
  flex-shrink: 0;
  margin-left: 12px;
}

.guide-faq-item[open] summary::after { content: '\2212'; }

.guide-faq-item[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--neon-cyan);
}

.guide-faq-item p,
.guide-faq-item > div {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Disclaimer */
.guide-warning {
  background: rgba(255,180,0,0.06);
  border: 1px solid rgba(255,180,0,0.2);
  border-left: 3px solid #e6a817;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 600px) {
  .guide-step { flex-direction: row; gap: 12px; padding: 14px; }
  .guide-step-num { width: 30px; height: 30px; font-size: 0.85rem; }
  .guide-bucket-demo { flex-direction: column; gap: 4px; }
}

/* =========================================================
   START HERE TAB
   ========================================================= */

.start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.start-hero-copy,
.start-hero-panel,
.start-card,
.start-path {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.start-hero-copy {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.start-hero-copy::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-green));
}

.start-kicker {
  display: inline-flex;
  color: var(--neon-green);
  background: rgba(62,207,142,0.08);
  border: 1px solid rgba(62,207,142,0.22);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.start-hero h2 {
  color: var(--neon-cyan);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.2;
  max-width: 820px;
  margin-bottom: 12px;
  text-shadow: 0 0 24px rgba(77,184,217,0.32);
}

.start-hero p {
  max-width: 740px;
  font-size: 0.95rem;
}

.start-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.start-hero-panel {
  padding: 24px;
  border-color: rgba(77,184,217,0.2);
  background:
    linear-gradient(135deg, rgba(77,184,217,0.07), rgba(124,101,196,0.04)),
    var(--bg-card);
}

.start-panel-label {
  color: var(--neon-purple);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.start-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 20px;
  color: var(--text);
}

.start-checklist li {
  padding-left: 4px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.start-checklist li::marker {
  color: var(--neon-cyan);
  font-weight: 800;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.start-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.start-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 26px rgba(0,0,0,0.24);
}

.start-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(77,184,217,0.08);
  border: 1px solid rgba(77,184,217,0.2);
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.start-card h3 {
  color: var(--text);
  margin-bottom: 8px;
}

.start-card p {
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.start-link {
  margin-top: auto;
  color: var(--neon-cyan);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.start-link:hover {
  color: var(--primary-light);
  text-shadow: 0 0 10px rgba(77,184,217,0.35);
}

.start-path {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 18px;
  margin-bottom: 18px;
}

.start-path h3 {
  color: var(--neon-cyan);
  margin-bottom: 6px;
}

.start-path-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.start-path-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.start-path-item strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.start-path-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.start-disclaimer {
  margin-top: 0;
}

@media (max-width: 980px) {
  .start-hero,
  .start-path {
    grid-template-columns: 1fr;
  }

  .start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .start-hero-copy,
  .start-hero-panel,
  .start-card,
  .start-path {
    padding: 16px;
  }

  .start-grid,
  .start-path-list {
    grid-template-columns: 1fr;
  }

  .start-card {
    min-height: auto;
  }
}

/* ═══════════════════════════════════════════════════════
   REVERSE CALC & COMPARISON STYLES
═══════════════════════════════════════════════════════ */
.rev-metric {
  background: var(--bg-card, #1a2332);
  border: 1px solid var(--border, rgba(77,184,217,0.12));
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
}
.rev-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.rev-metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neon-cyan, #4db8d9);
  font-variant-numeric: tabular-nums;
}
.rev-metric-sub {
  font-size: 0.72rem;
  color: var(--text-light, #3a506e);
  margin-top: 2px;
}

/* Compare tab */
.compare-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.compare-slot-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}
.compare-sel {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-deep, #0d1626);
  color: var(--text);
  appearance: none;
}
.compare-sel:focus {
  border-color: var(--neon-cyan);
  outline: none;
}
