:root {
  --bg: #0f1117;
  --bg-2: #161822;
  --bg-3: #1e2030;
  --gold: #c9a84c;
  --gold-dim: #8a6e2a;
  --text: #e8e0d0;
  --text-muted: #9a9080;
  --text-faint: #5a5040;
  --border: #2a2830;
  --border-gold: rgba(201,168,76,0.3);
  --green: #2ecc71;
  --red: #e74c3c;
  --radius: 4px;
  --transition: 200ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15,17,23,0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color var(--transition); }
.nav-link:hover { color: var(--text); }
.nav-link.muted { color: var(--text-faint); font-size: 13px; }
.nav-btn {
  padding: 8px 20px;
  background: var(--gold);
  color: #0f1117;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background var(--transition);
}
.nav-btn:hover { background: #d4b55a; }

/* ── Flash Messages ── */
.flash-container { padding: 0 24px; }
.flash {
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}
.flash--success { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.3); color: #2ecc71; }
.flash--error { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }
.flash--info { background: rgba(201,168,76,0.1); border: 1px solid var(--border-gold); color: var(--gold); }

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); font-weight: 300; }
.footer-tagline { font-size: 12px; color: var(--text-faint); flex: 1; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-faint); text-decoration: none; }
.footer-links a:hover { color: var(--text-muted); }

/* ── Hero / Landing ── */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Merriweather', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 700px;
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-body {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--gold);
  color: #0f1117;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #d4b55a; }
.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition);
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold-dim); color: var(--text); }

/* ── Process / How It Works ── */
.process { padding: 80px 0; border-top: 1px solid var(--border); }
.section-label { font-size: 11px; letter-spacing: 0.25em; color: var(--gold); text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-family: 'Merriweather', serif; font-size: 28px; font-weight: 300; color: var(--text); margin-bottom: 48px; }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--border); }
.process-step { background: var(--bg); padding: 32px 28px; }
.step-num { font-size: 32px; font-weight: 300; color: var(--border-gold); letter-spacing: -0.02em; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.step-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.step-body { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Pricing ── */
.pricing { padding: 80px 0; border-top: 1px solid var(--border); }
.pricing-card {
  max-width: 440px;
  border: 1px solid var(--border-gold);
  padding: 40px;
  position: relative;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}
.price-amount { font-size: 48px; font-weight: 300; color: var(--gold); letter-spacing: -0.02em; margin: 16px 0 4px; }
.price-period { font-size: 14px; color: var(--text-faint); margin-bottom: 24px; }
.price-features { list-style: none; margin-bottom: 32px; }
.price-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
.price-features li::before { content: '✓'; color: var(--gold); font-size: 12px; }

/* ── Auth Forms ── */
.auth-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-title { font-family: 'Merriweather', serif; font-size: 26px; font-weight: 300; color: var(--text); margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 36px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  border-radius: var(--radius);
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--gold-dim); }
.form-input::placeholder { color: var(--text-faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-footer { margin-top: 24px; font-size: 14px; color: var(--text-faint); text-align: center; }
.form-footer a { color: var(--gold-dim); text-decoration: none; }
.form-footer a:hover { color: var(--gold); }
.btn-full { width: 100%; text-align: center; padding: 14px; font-size: 14px; }

/* ── Dashboard ── */
.dashboard { flex: 1; padding: 60px 0; }
.page-heading { font-family: 'Merriweather', serif; font-size: 28px; font-weight: 300; color: var(--text); margin-bottom: 8px; }
.page-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 40px; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.session-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  transition: border-color var(--transition);
  text-decoration: none;
  display: block;
}
.session-card:hover { border-color: var(--border-gold); }
.session-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.status-active { background: rgba(46,204,113,0.12); color: #2ecc71; }
.status-completed { background: rgba(201,168,76,0.12); color: var(--gold); }
.status-archived { background: rgba(90,80,64,0.3); color: var(--text-faint); }
.session-title { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.session-meta { font-size: 13px; color: var(--text-faint); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state p { margin-bottom: 24px; }

/* ── Interrogation ── */
.interrogation-page { flex: 1; display: flex; flex-direction: column; height: calc(100vh - 65px); overflow: hidden; }
.phase-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.phase-bar-inner { max-width: 900px; margin: 0 auto; display: flex; gap: 0; }
.phase-tab {
  padding: 14px 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.phase-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.phase-tab.done { color: var(--text-muted); }
.interrogation-body { flex: 1; overflow-y: auto; padding: 32px 24px; }
.interrogation-inner { max-width: 760px; margin: 0 auto; }
.messages { display: flex; flex-direction: column; gap: 20px; padding-bottom: 20px; }
.message { max-width: 88%; }
.message--ai { align-self: flex-start; }
.message--user { align-self: flex-end; }
.message-bubble {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.message--ai .message-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
}
.message--user .message-bubble {
  background: var(--gold);
  color: #0f1117;
}
.message-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; padding: 0 4px; }
.message--user .message-label { text-align: right; }
.interrogation-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 16px 24px;
}
.footer-inner { max-width: 760px; margin: 0 auto; }
.response-area {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  padding: 14px 16px;
  border-radius: var(--radius);
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.6;
}
.response-area:focus { border-color: var(--gold-dim); }
.response-area::placeholder { color: var(--text-faint); }
.footer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }
.upload-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}
.upload-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.uploads-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.upload-chip {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.send-btn { padding: 10px 28px; }
.generating-msg { text-align: center; padding: 40px; color: var(--text-muted); }
.generating-dots span { animation: blink 1.4s infinite; font-size: 24px; }
.generating-dots span:nth-child(2) { animation-delay: 0.2s; }
.generating-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }
.report-ready {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  margin-top: 20px;
}
.report-ready h3 { font-family: 'Merriweather', serif; font-weight: 300; font-size: 22px; color: var(--gold); margin-bottom: 12px; }
.report-ready p { color: var(--text-muted); margin-bottom: 24px; }

/* ── Upload Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 480px; }
.modal h3 { font-size: 18px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 10px 20px; border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--gold-dim); color: var(--text-muted); }
.drop-zone input { display: none; }

/* ── Report View ── */
.report-page { flex: 1; padding: 60px 0; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.report-section { margin-bottom: 48px; }
.report-section-title {
  font-family: 'Merriweather', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.two-col-report { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.list-positive, .list-negative, .list-neutral { list-style: none; }
.list-positive li { padding: 8px 0 8px 16px; border-left: 3px solid #2ecc71; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.list-negative li { padding: 8px 0 8px 16px; border-left: 3px solid #e74c3c; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.list-neutral li { padding: 8px 0 8px 16px; border-left: 3px solid var(--gold); margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.col-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.col-title.pos { color: #2ecc71; }
.col-title.neg { color: #e74c3c; }
.risk-table, .rec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.risk-table th, .rec-table th { text-align: left; padding: 10px 14px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); font-weight: 500; }
.risk-table td, .rec-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.horizon-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); }
.horizon-card { background: var(--bg); padding: 24px 20px; }
.horizon-label { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.horizon-theme { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 12px; }
.horizon-items { list-style: none; }
.horizon-items li { font-size: 13px; color: var(--text-muted); padding: 4px 0; border-bottom: 1px solid var(--border); }
.closing-block { background: var(--bg-2); border: 1px solid var(--border-gold); padding: 28px 32px; border-radius: var(--radius); font-size: 16px; font-style: italic; color: var(--text-muted); line-height: 1.8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-high { background: rgba(231,76,60,0.15); color: #e74c3c; }
.badge-medium { background: rgba(230,126,0,0.15); color: #e67e22; }
.badge-low { background: rgba(46,204,113,0.15); color: #2ecc71; }

/* ── Payment ── */
.payment-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.payment-card { width: 100%; max-width: 520px; }

/* ── Utilities ── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
a { color: inherit; }

@media (max-width: 640px) {
  .hero { padding: 60px 0 40px; }
  .form-row { grid-template-columns: 1fr; }
  .two-col-report { grid-template-columns: 1fr; }
  .phase-tab { font-size: 10px; padding: 12px 10px; }
}
