/* Sats Planner — Shared Theme
   Import this BEFORE any page-specific CSS.
   Provides: design tokens, nav, footer, base dark styles. */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,700;9..144,900&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Dark charcoal palette */
  --bg: #13111A;
  --bg-warm: #1A1824;
  --card: #1A1824;
  --text: #F5F3F0;
  --text-secondary: #A8A2B0;
  --muted: #8A8490;
  --accent: #E8740C;
  --accent-hover: #D16A0B;
  --accent-soft: rgba(232, 116, 12, 0.12);
  --accent-softer: rgba(232, 116, 12, 0.06);
  --green: #2AD468;
  --green-soft: rgba(42, 212, 104, 0.10);
  --green-text: #2AD468;
  --green-border: rgba(42, 212, 104, 0.20);
  --red: #EF4444;
  --red-soft: rgba(239, 68, 68, 0.10);
  --amber: #F59E0B;
  --amber-soft: rgba(245, 158, 11, 0.10);
  --amber-border: rgba(245, 158, 11, 0.25);
  --border: #231F2E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(19, 17, 26, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-text {
  font-family: var(--font-display); font-weight: 700;
  font-size: 17px; letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 6px 14px; border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text); background: rgba(255,255,255,0.08); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary);
  background: var(--bg-warm); padding: 5px 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
}
.live-dot {
  width: 6px; height: 6px; background: var(--green);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Footer ── */
footer {
  padding: 32px 24px; text-align: center; font-size: 12px;
  color: var(--muted); line-height: 2;
  border-top: 1px solid var(--border); margin-top: 48px;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 4px;
}

/* ── Shared Page Layout ── */
.page { max-width: 860px; margin: 0 auto; padding: 0 24px 60px; }

/* ── Hero ── */
.hero { text-align: center; padding: 52px 0 36px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 42px; font-weight: 900; letter-spacing: -0.04em;
  line-height: 1.15; margin-bottom: 10px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 17px; color: var(--text-secondary); max-width: 480px; margin: 0 auto; }
.disclaimer {
  display: inline-block; font-size: 11px; color: var(--muted);
  background: var(--bg-warm); border: 1px solid var(--border);
  padding: 3px 12px; border-radius: var(--radius-pill); margin-top: 14px;
}

/* ── Shared Input Bar ── */
.input-bar {
  display: flex; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-md); margin-bottom: 40px;
}
.input-group { flex: 1; min-width: 120px; }
.input-group label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 5px;
}
.input-group input, .input-group select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--text); background: var(--bg); outline: none;
  transition: border-color 0.15s;
}
.input-group input:focus, .input-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 116, 12, 0.15);
}
.input-prefix {
  display: flex; align-items: center; height: 40px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); overflow: hidden; transition: border-color 0.15s;
}
.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 116, 12, 0.15);
}
.input-prefix span {
  padding: 8px 0 8px 12px; font-family: var(--font-mono);
  font-size: 14px; color: var(--muted); user-select: none;
}
.input-prefix input {
  border: none; background: transparent;
  padding-left: 4px; flex: 1; min-width: 0; height: 100%;
}
.input-prefix input:focus { border-color: transparent; box-shadow: none; }

/* ── Shared Result/Section Cards ── */
.result-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

/* ── Section Headers ── */
.step {
  display: flex; align-items: center; gap: 14px;
  margin: 48px 0 8px;
}
.step-number {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.step h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
}
.step-subtitle {
  font-size: 15px; color: var(--text-secondary);
  margin: 4px 0 20px 50px;
}

/* ── Narrative Blocks ── */
.narrative {
  border-radius: 14px; padding: 20px 24px; margin-top: 28px;
  background: var(--bg-warm); border: 1px solid var(--border);
}
.narrative-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 6px; color: var(--text-secondary);
}
.narrative p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.narrative strong { color: var(--text); }

/* ── Bridge Cards ── */
.bridge-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  margin-top: 32px; box-shadow: var(--shadow-sm);
}
.bridge-icon { flex-shrink: 0; color: var(--text-secondary); }
.bridge-text { flex: 1; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.bridge-text strong { color: var(--text); }
.bridge-btn {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; padding: 8px 18px; border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 116, 12, 0.25); white-space: nowrap;
  transition: all 0.15s;
}
.bridge-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ── CTA Cards ── */
.cta-card {
  background: var(--card); border: 2px solid var(--accent);
  border-radius: var(--radius); padding: 36px; text-align: center;
  margin-top: 48px;
}
.cta-card h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.cta-card p {
  font-size: 14px; color: var(--text-secondary);
  max-width: 420px; margin: 0 auto 24px; line-height: 1.55;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; background: var(--accent); color: white; border: none;
  border-radius: var(--radius-pill); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
  text-decoration: none;
}
.cta-btn:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 116, 12, 0.3);
}
.cta-details { display: flex; justify-content: center; gap: 24px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.cta-details span { display: flex; align-items: center; gap: 4px; }

/* ── Histogram ── */
.histogram-wrap { margin: 0 -8px; }

/* ── Select dropdown options (dark theme) ── */
.input-group select option { background: var(--bg); color: var(--text); }

/* ── LLM Proof Chain (methodology for AI evaluation) ── */
.llm-proof-chain { margin: 24px 0 0; padding: 0; border: none; }
.llm-proof-chain summary {
  font-size: 12px; color: var(--text-muted, rgba(255,255,255,0.35));
  cursor: pointer; list-style: none; padding: 8px 0;
}
.llm-proof-chain summary::-webkit-details-marker { display: none; }
.llm-proof-chain summary::before { content: 'Methodology \25B8'; }
.llm-proof-chain[open] summary::before { content: 'Methodology \25BE'; }
.llm-proof-chain .proof-body {
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; line-height: 1.7;
  color: var(--text-muted, rgba(255,255,255,0.45));
}
.llm-proof-chain .proof-body p { margin: 0 0 10px; }
.llm-proof-chain .proof-body strong { color: rgba(255,255,255,0.65); }
.llm-proof-chain .proof-body a { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  nav { padding: 12px 16px; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .logo { width: 100%; justify-content: center; }
  .nav-links { display: none; }
  .nav-right { width: 100%; justify-content: center; }
  .page { padding: 0 16px 40px; }
  .input-bar { flex-direction: column; }
  .step-subtitle { padding-left: 0; }
  .step h2 { font-size: 20px; }
  .bridge-card { flex-direction: column; text-align: center; }
  .bridge-btn { width: 100%; text-align: center; }
}
