/* ============================================================
   Dotty the Biographer — Design System
   Clean, editorial, high-contrast publishing aesthetic
   ============================================================ */

/* --- Reset & Variables --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette — OKLCH with green-tinted neutrals */
  --bg:           oklch(99.5% 0.005 155);
  --bg-surface:   oklch(97% 0.012 155);
  --bg-card:      oklch(99.5% 0.005 155);
  --bg-subtle:    oklch(97% 0.012 155);
  --border:       oklch(88% 0.02 155);
  --border-focus: oklch(52% 0.12 160);

  /* Typography — tinted toward brand green, never pure black */
  --text:         oklch(18% 0.01 155);
  --text-muted:   oklch(45% 0.03 155);
  --text-light:   oklch(62% 0.025 155);

  /* Accent — forest green */
  --accent:         oklch(52% 0.12 160);
  --accent-dark:    oklch(42% 0.10 160);
  --accent-light:   oklch(94% 0.03 155);

  /* Semantic — distinct hues for each role */
  --success:  oklch(52% 0.12 160);
  --error:    oklch(52% 0.15 25);
  --warning:  oklch(72% 0.14 85);

  /* Legacy aliases (kept so JS that reads them doesn't break) */
  --primary:       oklch(52% 0.12 160);
  --primary-dark:  oklch(42% 0.10 160);
  --primary-light: oklch(94% 0.03 155);

  /* Radii */
  --radius:    4px;
  --radius-lg: 8px;
  --radius-sm: 4px;

  /* Shadows — tinted toward brand green */
  --shadow:    0 1px 3px oklch(30% 0.02 155 / 0.1);
  --shadow-lg: 0 4px 12px oklch(30% 0.02 155 / 0.12);
  --shadow-xl: 0 12px 40px oklch(30% 0.02 155 / 0.14);

  /* Fonts — distinctive pairing */
  --font-serif: 'Literata', Georgia, serif;
  --font-sans:  'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Easing — expo curves per Impeccable guidelines */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);

  --transition: 0.2s var(--ease-out);
}

html {
  font-size: 18px; /* proper base — use explicit sizing for readability targets */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --- Screen System --- */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

/* Landing screen scrollable */
#landing-screen {
  overflow-y: auto;
}

/* Full-screen centered screens */
.screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

/* --- Typography — 1.333 perfect fourth scale --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.37rem, 5vw, 3.16rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.78rem, 3vw, 2.37rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.33rem; font-weight: 600; }

p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  max-width: 65ch;
}

em {
  font-style: italic;
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

a:hover {
  color: var(--accent-dark);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: oklch(100% 0 0);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-ghost:hover {
  background: var(--accent-light);
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.btn-xl {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-full {
  width: 100%;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.nav-btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.nav-btn-ghost:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.lang-dropdown-wrapper {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px oklch(30% 0.02 155 / 0.14);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}

.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
  white-space: nowrap;
}

.lang-dropdown button:hover {
  background: var(--bg-surface);
}

.lang-dropdown button.active-lang {
  font-weight: 600;
  color: var(--accent);
}

.nav-btn-primary {
  background: var(--accent);
  color: oklch(100% 0 0);
  font-weight: 600;
}

.nav-btn-primary:hover {
  background: var(--accent-dark);
}

.nav-user-name {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Back Button --- */
.back-btn {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.back-btn:hover {
  color: var(--text);
  background: var(--bg-surface);
}

/* --- Hero Section --- */
/* Hero banner — illustrated background */
/* ── Hero — full-bleed dark section with text overlay ── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: oklch(18% 0.04 155);
}

/* CSS-only abstract background — radial glows + subtle rings */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 70%, rgba(46,125,94,0.45) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(76,175,130,0.25) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(201,169,110,0.10) 0%, transparent 60%),
    linear-gradient(160deg, oklch(14% 0.04 155) 0%, oklch(24% 0.05 155) 50%, oklch(19% 0.04 155) 100%);
  pointer-events: none;
}

/* Concentric ring overlay via pseudo-elements */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 18%, rgba(255,255,255,0.018) 18.5%, transparent 19%),
    radial-gradient(circle at 50% 50%, transparent 28%, rgba(255,255,255,0.015) 28.5%, transparent 29%),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(255,255,255,0.012) 40.5%, transparent 41%),
    radial-gradient(circle at 50% 50%, transparent 54%, rgba(255,255,255,0.010) 54.5%, transparent 55%),
    radial-gradient(circle at 50% 50%, transparent 70%, rgba(255,255,255,0.007) 70.5%, transparent 71%);
  background-size: 140vmax 140vmax;
  background-position: center;
}

/* Flowing gold accent lines via pseudo */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(168deg, transparent 45%, rgba(201,169,110,0.07) 50%, transparent 55%),
    linear-gradient(12deg, transparent 40%, rgba(201,169,110,0.05) 45%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  width: 100%;
  padding: 5rem 2.5rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(46,125,94,0.25);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.35rem 1.1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  font-weight: 700;
  color: oklch(100% 0 0);
  margin-bottom: 1.25rem;
}

.hero-title em {
  color: oklch(76% 0.12 160);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Primary CTA on dark hero background */
.hero-cta-primary {
  background: var(--accent) !important;
  color: oklch(100% 0 0) !important;
  box-shadow: 0 0 32px rgba(46,125,94,0.45);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.hero-cta-primary:hover {
  background: var(--accent-dark) !important;
  box-shadow: 0 0 44px rgba(46,125,94,0.60);
  transform: translateY(-1px);
}

/* Ghost CTA on dark hero background */
.hero-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-cta-ghost:hover {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
}

.hero-trust {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1.5rem;
}

.hero-early-access {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.01em;
}

.hero-early-access strong {
  color: oklch(76% 0.12 160);
  font-weight: 600;
}

/* --- How It Works — horizontal flow, not identical cards --- */
.how-it-works {
  background: var(--bg-surface);
  padding: 6rem 2rem 5rem;
  text-align: center;
}

.how-it-works h2 {
  margin-bottom: 3.5rem;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.step {
  flex: 1;
  max-width: 260px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0 1rem;
  position: relative;
  text-align: center;
}

.step:hover {
  transform: none;
  box-shadow: none;
}

/* Connecting line between steps */
.step + .step::before {
  content: '';
  position: absolute;
  top: 1.8rem;
  left: -1rem;
  width: 2rem;
  height: 1px;
  background: var(--border);
}

.step-num {
  position: static;
  transform: none;
  width: 3rem;
  height: 3rem;
  background: var(--accent);
  color: oklch(99% 0 0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  font-family: var(--font-serif);
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.step p {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Value Prop — centered text, generous whitespace --- */
.value-prop {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--bg);
  max-width: 680px;
  margin: 0 auto;
}

.value-prop h2 {
  margin-bottom: 1.5rem;
}

.value-prop-body {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0 auto;
}

/* --- Trust — minimal, confident --- */
.trust {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg);
}

.trust h2 {
  margin-bottom: 2rem;
}

.trust-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.trust-points li {
  font-size: 1.1rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.75rem;
}

.trust-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* --- Trust details grid --- */
.trust-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 2.5rem auto 0;
}

.trust-detail {
  text-align: center;
}

.trust-detail-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.trust-detail h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.trust-detail p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Social proof --- */
.social-proof {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--bg);
}

.social-proof h2 {
  margin-bottom: 2.5rem;
}

.proof-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.proof-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.proof-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}

.proof-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.proof-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: oklch(100% 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.proof-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.proof-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- FAQ --- */
.faq {
  padding: 5rem 2rem;
  background: var(--bg-surface);
}

.faq h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-list {
  max-width: 640px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease-out);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 580px;
}

/* --- Waitlist — warm, inviting --- */
.waitlist {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--accent-light);
}

.waitlist h2 {
  margin-bottom: 0.75rem;
}

.waitlist > p {
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
}

.waitlist-invite-row {
  margin-bottom: 1.5rem;
}

.waitlist-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 320px;
  margin: 0 auto 1.5rem;
}

.waitlist-divider::before,
.waitlist-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.waitlist-divider span {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.waitlist-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 480px;
}

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto 1rem;
}

.waitlist-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition);
}

.waitlist-input:focus {
  border-color: var(--accent);
}

.waitlist-input::placeholder {
  color: var(--text-light);
}

.waitlist-reassure {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.waitlist-success {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent-dark);
  font-weight: 500;
  display: inline-block;
}

.waitlist-error {
  margin-top: 0.75rem;
  color: var(--error);
  font-size: 0.95rem;
}

/* --- Pricing — featured card elevated, siblings recede --- */
.pricing {
  padding: 6rem 2rem 5rem;
  background: var(--bg-surface);
  text-align: center;
}

.pricing > h2 {
  margin-bottom: 0.75rem;
}

.pricing > p {
  margin-bottom: 3rem;
  margin-left: auto;
  margin-right: auto;
}

.pricing-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  border: 1.5px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  position: relative;
  flex: 1;
  max-width: 280px;
}

.pricing-card-featured {
  border-color: var(--accent);
  background: var(--accent-light);
  padding: 2.5rem 1.75rem;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  transform: scale(1.04);
}

.pricing-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-badge {
  background: var(--accent);
  color: oklch(100% 0 0);
}

.pricing-price {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.pricing-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.pricing-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.pricing-features li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* --- Footer --- */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--text);
  color: rgba(255,255,255,0.75);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: oklch(100% 0 0);
  margin-bottom: 0.75rem;
}

.footer p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255,255,255,0.9);
}

/* --- Language Screen --- */
.dotty-logo-sm {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

#language-screen .screen-center h2 {
  margin-bottom: 0.5rem;
}

#language-screen .screen-center > p {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
  margin-bottom: 2rem;
}

.lang-btn {
  padding: 0.9rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.lang-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
}

.lang-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
  font-weight: 600;
}

/* --- Auth Screen --- */
#auth-screen {
  display: none;
  background: var(--bg);
}

#auth-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  padding-top: 2rem;
}

.auth-container .back-btn {
  position: static;
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.4rem 0;
}

.auth-container .dotty-logo-sm {
  margin-bottom: 2rem;
}

.auth-form {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form h2 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.auth-form > p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: -0.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(52% 0.12 160 / 0.12);
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-error {
  background: rgba(196,74,58,0.07);
  color: var(--error);
  border: 1px solid rgba(196,74,58,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.auth-switch {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-terms {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.auth-terms a {
  color: var(--text-muted);
}

.auth-waitlist-fallback {
  margin-top: 1.5rem;
}

.auth-waitlist-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.auth-waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-success {
  background: rgba(46,125,94,0.07);
  color: var(--accent-dark);
  border: 1px solid rgba(46,125,94,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.auth-forgot {
  text-align: center;
  font-size: 0.9rem;
  margin-top: -0.25rem;
  margin-bottom: 0;
}

.auth-forgot a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-forgot a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* "or" divider between Google button and email form */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Google Sign-In button wrapper */
.google-btn-wrapper {
  min-height: 44px;
  display: none;
  justify-content: center;
}

/* Change-password section in dashboard settings */
.change-pw-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.change-pw-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 0.75rem;
}

.change-pw-section .auth-input {
  margin-bottom: 0.5rem;
}

.change-pw-section button {
  margin-top: 0.25rem;
}

/* --- Dashboard --- */
#dashboard-screen {
  display: none;
  flex-direction: column;
  background: var(--bg);
  height: 100vh;       /* fill the viewport exactly */
  overflow: hidden;    /* nothing overflows the screen itself */
}

#dashboard-screen.active {
  display: flex;
}

/* Sidebar + main layout */
.dashboard-layout {
  flex: 1;
  display: flex;
  min-height: 0;       /* allow flex children to shrink below content size */
  overflow: hidden;
}

.dashboard-sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  /* Fill the remaining height below the top nav; no sticky needed */
  height: 100%;
  overflow: hidden;    /* sidebar never scrolls */
  flex-shrink: 0;
}


.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}

.sidebar-nav-item:hover {
  background: var(--border);
  color: var(--text);
}

.sidebar-nav-item.active {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-logout {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Dashboard views */
.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: oklch(100% 0 0);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

.dashboard {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;  /* only the main content area scrolls */
  height: 100%;
}

.dashboard-welcome h1 {
  margin-bottom: 0.25rem;
  font-size: 2.2rem;
  color: var(--text);
}

.dashboard-welcome p {
  margin-bottom: 0;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saved-list h3 {
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  margin-bottom: 0.25rem;
}

/* ---- Account settings section on dashboard ---- */
.account-settings {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.account-settings h3 {
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  margin-bottom: 0.75rem;
}

.account-plan-line {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

.account-plan-line strong {
  color: var(--accent);
  text-transform: capitalize;
}

.redeem-invite-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.redeem-invite-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}

.redeem-invite-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.redeem-invite-input {
  flex: 1;
  margin-bottom: 0 !important;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
}

.redeem-invite-btn {
  white-space: nowrap;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
}

.saved-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
}

.saved-item:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.saved-item-meta {
  font-size: 0.9rem;
  color: var(--text-light);
}

.saved-item-actions {
  display: flex;
  gap: 0.5rem;
}

.saved-item-actions button {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-resume {
  background: var(--accent);
  color: oklch(100% 0 0);
}

.btn-resume:hover {
  background: var(--accent-dark);
}

.btn-draft {
  background: transparent;
  border: 1px solid var(--accent) !important;
  color: var(--accent);
}

.btn-draft:hover {
  background: var(--accent-light);
}

.btn-delete {
  background: transparent;
  border: 1px solid var(--border) !important;
  color: var(--text-muted);
}

.btn-delete:hover {
  background: rgba(196,74,58,0.07);
  border-color: var(--error) !important;
  color: var(--error);
}

/* --- Onboarding Screen --- */
#onboarding-screen {
  display: none;
  background: var(--bg);
}

#onboarding-screen.active {
  display: block;
}

.onboarding-content {
  gap: 1.25rem;
}

.dotty-avatar {
  margin-bottom: 0.5rem;
}

.avatar-orb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  box-shadow: 0 0 40px rgba(46,125,94,0.3);
  animation: avatar-breathe 2.5s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes avatar-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.onboarding-content h2 {
  font-size: 2rem;
  color: var(--text);
}

.onboarding-content > p {
  max-width: 460px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 440px;
  text-align: left;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  color: var(--text);
}

.onboarding-step-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.onboarding-tech-note {
  background: var(--accent-light);
  border: 1px solid rgba(46,125,94,0.2);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  max-width: 440px;
  width: 100%;
}

.onboarding-tech-note p {
  font-size: 0.95rem;
  color: var(--accent-dark);
  margin-bottom: 0;
}

.onboarding-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Interview Screen (legacy voice-orb layout) --- */
#interview-screen {
  display: none;
  background: var(--bg);
}

#interview-screen.active {
  display: block;
}

.interview-ui {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

.interview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 10;
}

.interview-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.interview-controls {
  display: flex;
  gap: 0.75rem;
}

.ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.ctrl-btn:hover {
  background: var(--border);
  color: var(--text);
}

.ctrl-btn-danger:hover {
  background: rgba(196,74,58,0.1);
  border-color: var(--error);
  color: var(--error);
}

.interview-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

/* --- Voice Orb (legacy layout) --- */
.orb-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(46,125,94,0.18);
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orb-ring-2 {
  width: 175px;
  height: 175px;
  border-color: rgba(46,125,94,0.08);
}

/* Orb states */
.orb-idle {
  animation: orb-pulse 3s ease-in-out infinite;
  background: radial-gradient(circle at 40% 40%, oklch(85% 0.01 155), oklch(68% 0.015 155), oklch(56% 0.015 155));
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(168,160,153,0.3); }
  50% { transform: scale(1.04); box-shadow: 0 0 35px rgba(168,160,153,0.45); }
}

.orb-listening {
  animation: orb-listen 1.5s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, oklch(74% 0.10 160), oklch(50% 0.10 160), oklch(40% 0.08 160));
}

@keyframes orb-listen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58,122,90,0.45), 0 0 20px rgba(58,122,90,0.25); }
  50% { box-shadow: 0 0 0 18px rgba(58,122,90,0), 0 0 40px rgba(58,122,90,0.4); }
}

.orb-winding-down {
  animation: orb-shrink 5s linear forwards;
  background: radial-gradient(circle at 35% 35%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
}

@keyframes orb-shrink {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.75); opacity: 0.7; }
}

.orb-thinking {
  animation: orb-spin 1.2s linear infinite;
  background: radial-gradient(circle at 35% 35%, oklch(40% 0.005 155), oklch(22% 0.005 155), oklch(14% 0.005 155));
}

@keyframes orb-spin {
  0% { transform: rotate(0deg) scale(1.02); }
  100% { transform: rotate(360deg) scale(1.02); }
}

.orb-speaking {
  animation: orb-breathe 1s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, oklch(35% 0.005 155), oklch(14% 0.005 155), oklch(8% 0.005 155));
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(26,26,26,0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 55px rgba(26,26,26,0.75); }
}

/* Voice state label */
.voice-state-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  text-align: center;
  min-height: 1.6rem;
}

/* Live transcript */
.live-transcript {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  text-align: center;
  min-height: 2rem;
  font-style: italic;
  transition: opacity 0.3s;
  padding: 0 1rem;
  line-height: 1.5;
}

/* Voice action row */
.voice-action-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  min-height: 48px;
  align-items: center;
}

.voice-action-btn {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.voice-action-btn:hover {
  background: var(--border);
}

/* Interview Progress */
.interview-progress {
  padding: 0 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.progress-bar {
  width: 100%;
  max-width: 480px;
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  width: 0%;
  transition: width 1s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* --- Complete Screen --- */
#complete-screen {
  display: none;
  background: var(--bg);
}

#complete-screen.active {
  display: block;
}

.complete-content {
  gap: 1.5rem;
  text-align: center;
}

.complete-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: complete-glow 2s ease-in-out infinite;
  margin: 0 auto;
}

.complete-orb-inner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  box-shadow: 0 0 20px rgba(46,125,94,0.35);
}

@keyframes complete-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,125,94,0.2); }
  50% { box-shadow: 0 0 0 10px rgba(46,125,94,0); }
}

.complete-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin: 0.5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Facts Screen --- */
#facts-screen {
  display: none;
  background: var(--bg);
  min-height: 100vh;
}

#facts-screen.active {
  display: block;
}

.facts-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.facts-header {
  margin-bottom: 2rem;
  text-align: center;
}

.facts-header h2 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.facts-header p {
  max-width: 560px;
  margin: 0 auto;
}

.facts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}

.fact-card:hover {
  border-color: var(--accent);
}

.fact-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.fact-category-icon {
  font-size: 1.1rem;
}

.fact-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}

.fact-confidence {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-weight: 600;
}

.confidence-high   { background: oklch(52% 0.12 160 / 0.1);  color: var(--accent); }
.confidence-medium { background: rgba(46,125,94,0.1); color: var(--accent); }
.confidence-low    { background: rgba(196,74,58,0.1);  color: var(--error); }

.fact-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.fact-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(52% 0.12 160 / 0.12);
}

.facts-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Biography Screen --- */
#biography-screen {
  display: none;
  background: var(--bg);
  min-height: 100vh;
}

#biography-screen.active {
  display: block;
}

.bio-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem;
}

.bio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bio-header h2 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
}

.bio-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bio-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 6rem 2rem;
  text-align: center;
}

.bio-loading p {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.bio-loading-sub {
  font-size: 0.9rem !important;
  color: var(--text-light) !important;
}

.bio-content {
  padding: 1rem 0 4rem;
}

.bio-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 2rem;
  outline: none;
  border-bottom: 2px dashed transparent;
  padding-bottom: 0.5rem;
}

.bio-title:focus {
  border-bottom-color: var(--accent);
}

.bio-body {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text);
  outline: none;
  max-width: 65ch;
  margin: 0 auto;
}

.bio-body:focus {
  outline: 1px dashed rgba(46,125,94,0.35);
  outline-offset: 4px;
  border-radius: 4px;
}

.bio-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.bio-body p {
  color: var(--text);
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
}

/* --- Continue Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(15% 0.02 155 / 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.3rem;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

.modal-box > p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 1rem;
}

.continue-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.5;
}

.continue-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,125,94,0.12);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* --- Loading Spinner --- */
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(46,125,94,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-spinner.large {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}

.toast {
  background: var(--text);
  color: oklch(100% 0 0);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  line-height: 1.4;
  animation: toast-in 0.3s ease;
  cursor: pointer;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--error);
}

.toast-warning {
  background: var(--warning);
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

/* --- Pricing Screen (standalone) --- */
#pricing-screen {
  display: none;
  background: var(--bg);
}

#pricing-screen.active {
  display: block;
}

#pricing-screen .screen-center {
  padding-top: 5rem;
  justify-content: flex-start;
}

#pricing-screen h2 {
  margin-bottom: 0.5rem;
}

#pricing-screen > .screen-center > p {
  margin-bottom: 2rem;
}

#pricing-screen .pricing-cards {
  width: 100%;
}

/* --- Responsive --- */
/* Sidebar responsive */
@media (max-width: 900px) {
  .dashboard-sidebar {
    position: fixed;
    left: -300px;
    top: 60px;
    bottom: 0;
    z-index: 90;
    transition: left 0.25s ease;
    box-shadow: none;
    height: auto;
  }

  .dashboard-sidebar.open {
    left: 0;
    box-shadow: var(--shadow-xl);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .hero-content {
    padding: 4rem 2rem;
  }
}

@media (max-width: 600px) {
  html { font-size: 17px; }

  .nav { padding: 0.875rem 1rem; }
  .nav-logo { font-size: 1.3rem; }

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

  .hero { min-height: 75vh; }
  .hero-content { padding: 3rem 1.5rem; }

  .value-prop { padding: 3rem 1rem; }
  .how-it-works { padding: 3rem 1rem; }
  .trust { padding: 3rem 1rem; }
  .features { padding: 3rem 1rem; }
  .pricing { padding: 3rem 1rem; }
  .trust-details { grid-template-columns: 1fr; gap: 1.5rem; }
  .social-proof { padding: 3rem 1rem; }
  .proof-cards { grid-template-columns: 1fr; }
  .faq { padding: 3rem 1rem; }
  .waitlist { padding: 3rem 1rem; }
  .waitlist-form { flex-direction: column; }

  /* Steps stack vertically on mobile */
  .steps { flex-direction: column; align-items: center; }
  .step + .step::before { display: none; }
  .features { grid-template-columns: 1fr; }

  /* Pricing stacks vertically, featured card resets scale */
  .pricing-cards { flex-direction: column; align-items: center; }
  .pricing-card,
  .pricing-card-featured {
    max-width: 340px;
    width: 100%;
    transform: none;
  }

  .auth-form { padding: 2rem 1.25rem; }

  .bio-container { padding: 1.5rem 1rem; }
  .bio-header { flex-direction: column; align-items: flex-start; }
  .bio-header-actions { flex-wrap: wrap; }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  .complete-stats { gap: 2rem; }
  .dashboard { padding: 2rem 1rem; }
  .facts-container { padding: 2rem 1rem; }
}

/* ============================================================
   Guide Screen & Interview Screen (sidebar + chat layout)
   ============================================================ */

/* Scope variables for these screens — tinted toward brand green */
#guide-screen,
#controls-modal,
#interview-screen {
  --bg-dark:           var(--bg);
  --bg-surface-dark:   var(--bg-surface);
  --bg-elevated-dark:  oklch(93% 0.015 155);
  --bg-hover-dark:     oklch(90% 0.018 155);
  --text-dark:         var(--text);
  --text-muted-dark:   var(--text-muted);
  --text-dim-dark:     var(--text-light);
  --accent-dark:       var(--accent);
  --accent-dim-dark:   var(--accent-dark);
  --green-dark:        var(--accent);
  --yellow-dark:       var(--warning);
  --red-dark:          var(--error);
  --border-dark:       var(--border);
  --radius-dark:       4px;
  --radius-lg-dark:    8px;
  font-family: var(--font-sans);
}

/* Guide screen */
#guide-screen {
  background: var(--bg);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  min-height: 100vh;
}

#guide-screen.active {
  display: flex;
}

.guide-container {
  max-width: 580px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guide-container h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  text-align: center;
  color: var(--text);
  font-family: var(--font-serif);
}

.guide-container .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 420px;
  line-height: 1.6;
}

.guide-how-box {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem 1rem;
  margin: 0 auto 2rem auto;
}

.guide-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.guide-bullets li {
  font-size: 1.0rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.guide-bullets li:last-child {
  border-bottom: none;
}

.guide-section {
  margin-bottom: 1.75rem;
}

.guide-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
}

.guide-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Orb state indicators */
.orb-states {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.orb-state {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.orb-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Updated orb dot colors — warm editorial palette */
.orb-dot.green     { background: var(--accent); box-shadow: 0 0 6px oklch(52% 0.12 160 / 0.5); }
.orb-dot.yellow    { background: var(--accent); box-shadow: 0 0 6px oklch(52% 0.12 160 / 0.5); }
.orb-dot.blue      { background: var(--text); box-shadow: 0 0 6px oklch(18% 0.01 155 / 0.4); }
.orb-dot.shrinking { background: var(--accent); opacity: 0.35; }

.orb-state strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.1rem;
  color: var(--text);
}

.orb-state p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Button demo rows */
.guide-btns {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.guide-btn-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.guide-btn-row p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Demo buttons */
.demo-btn {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
  text-align: center;
}

.demo-btn.accent      { background: var(--text); color: var(--bg); }
.demo-btn.blue        { background: var(--accent); color: oklch(100% 0 0); }
.demo-btn.muted       { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.demo-btn.muted-solid { background: var(--bg-surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px; font-size: 0.75rem; }
.demo-btn.ghost       { background: transparent; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; font-size: 0.75rem; }

/* Guide status / spinner */
.guide-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-dark 0.8s linear infinite;
}

.spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes spin-dark { to { transform: rotate(360deg); } }

.guide-begin-btn {
  display: block;
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: oklch(100% 0 0);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s var(--ease-out), opacity 0.2s;
}

.guide-begin-btn:hover:not(:disabled) { background: var(--accent-dark); }
.guide-begin-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.3); }

.guide-btn-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.guide-btn-row .guide-begin-btn {
  flex: 1;
}

.guide-back-btn {
  padding: 0.9rem 1.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s, color 0.2s;
}

.guide-back-btn:hover {
  background: var(--bg-surface);
  color: var(--text);
}

/* Controls modal */
#controls-modal.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#controls-modal.hidden { display: none !important; }

#controls-modal .modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  color: var(--text);
  box-shadow: var(--shadow-xl);
}

#controls-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

#controls-modal .modal-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
}

#controls-modal .modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
}

#controls-modal .modal-close:hover { background: var(--bg-surface); color: var(--text); }

/* Interview screen layout (sidebar + chat) */
#interview-screen {
  background: var(--bg);
  color: var(--text);
}

#interview-screen.active {
  display: flex;
}

.interview-layout {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* Sidebar — hidden during interview */
#sidebar {
  display: none;
}

.interview-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.interview-nav-logo {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.interview-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
}

.interview-nav-item:hover {
  background: var(--border);
  color: var(--text);
}

.sidebar-header h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

#overall-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

#interview-screen .progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

#interview-screen .progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

#progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

#interview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 500; color: var(--text); }

#coverage-section h3,
#memory-section h3 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
}

#coverage-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.coverage-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.coverage-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text);
}

.coverage-label .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.coverage-label .pct {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.coverage-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.coverage-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Coverage bar fill colors — using accent/success palette */
.priority-must_have .coverage-bar-fill    { background: var(--accent); }
.priority-important .coverage-bar-fill    { background: var(--success); }
.priority-nice_to_have .coverage-bar-fill { background: var(--text-light); }

#memory-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.memory-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
}

.memory-stat strong {
  color: var(--text);
  font-weight: 600;
}

/* Chat toolbar — bottom of the chat area */
#chat-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  align-items: center;
  flex-shrink: 0;
}

/* Push the help button to the far right */
#chat-toolbar .toolbar-btn-help {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

#chat-toolbar .toolbar-btn-help:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.toolbar-btn {
  padding: 0.45rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
}

.toolbar-btn:hover { background: var(--border); }
.toolbar-btn.active { background: var(--accent); border-color: var(--accent); color: oklch(100% 0 0); }

.toolbar-btn.secondary {
  background: transparent;
  color: var(--text-muted);
}

.toolbar-btn.secondary:hover {
  color: var(--text);
  background: var(--bg-surface);
}

/* Live active-time timer in the toolbar */
.toolbar-timer {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 0 0.25rem;
  min-width: 2.8rem;
  text-align: center;
}

/* Chat area */
#chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.message {
  max-width: 720px;
  line-height: 1.6;
  font-size: 0.95rem;
  animation: fadeInMsg 0.3s ease;
  color: var(--text);
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.interviewer {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  color: var(--text);
}

.message.user {
  display: none;
}

.message.system {
  align-self: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.message-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.message.user .message-label {
  color: rgba(255, 255, 255, 0.5);
}

/* Chat input */
#chat-input-area {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

#thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

#answer-input {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  resize: none;
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: border-color 0.2s;
}

#answer-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,125,94,0.1);
}

#send-btn {
  background: var(--accent);
  color: oklch(100% 0 0);
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
  white-space: nowrap;
}

#send-btn:hover { background: var(--accent-dark); }
#send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Voice toggle button */
.voice-btn {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.voice-btn:hover { color: var(--text); border-color: var(--accent); }
.voice-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Voice area */
#voice-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  gap: 1rem;
}

/* Voice orb — single element, all states use green palette */
.voice-orb {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  box-shadow: 0 0 40px rgba(46, 125, 94, 0.25);
  transition: background 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

/* Idle — muted, still */
.voice-orb[data-state="idle"] .orb-core {
  background: radial-gradient(circle at 38% 38%, oklch(90% 0.03 155), oklch(82% 0.03 155), oklch(70% 0.02 155));
  box-shadow: 0 0 20px rgba(148, 168, 158, 0.2);
  animation: none;
}

/* Listening — vibrant green, scale driven by JS audio analyser */
.voice-orb[data-state="listening"] .orb-core {
  background: radial-gradient(circle at 38% 38%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  box-shadow: 0 0 50px rgba(46, 125, 94, 0.35);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
  animation: none;
}

/* Winding down — same as listening, JS drives scale from mic levels */
.voice-orb[data-state="winding-down"] .orb-core {
  background: radial-gradient(circle at 38% 38%, oklch(82% 0.08 160), oklch(52% 0.12 160), oklch(40% 0.10 160));
  box-shadow: 0 0 30px rgba(46, 125, 94, 0.2);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
  animation: none;
}

/* Processing / Thinking — warm yellow, soft rhythmic pulse */
.voice-orb[data-state="processing"] .orb-core {
  background: radial-gradient(circle at 38% 38%, oklch(95% 0.08 95), oklch(82% 0.14 90), oklch(72% 0.12 85));
  box-shadow: 0 0 40px rgba(232, 200, 64, 0.45);
  animation: orb-think 1.4s ease-in-out infinite;
}

@keyframes orb-think {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(232, 200, 64, 0.45); }
  50% { transform: scale(0.92); box-shadow: 0 0 25px rgba(232, 200, 64, 0.25); }
}

/* Speaking — light green, scale driven by JS TTS audio analyser */
.voice-orb[data-state="speaking"] .orb-core {
  background: radial-gradient(circle at 38% 38%, oklch(94% 0.04 155), oklch(72% 0.1 160), oklch(58% 0.12 160));
  box-shadow: 0 0 55px rgba(125, 196, 160, 0.45);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
  animation: none;
}

#voice-state-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.voice-transcript {
  display: none;
}

.voice-transcript.interim { display: none; }

/* Voice control buttons */
.voice-controls {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.voice-control-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.voice-control-btn.done { background: oklch(72% 0.1 160); color: var(--bg); border-color: oklch(72% 0.1 160); }
.voice-control-btn.done:hover { background: oklch(62% 0.1 160); border-color: oklch(62% 0.1 160); }
.voice-control-btn.hold { background: var(--accent); color: oklch(100% 0 0); border-color: var(--accent); }
.voice-control-btn.hold:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.voice-control-btn.hold.active { background: var(--accent-light); color: var(--accent-dark); border-color: var(--accent); }

/* Hide text input when voice is active */
.voice-active #answer-input { display: none; }
.voice-active #send-btn { display: none; }

/* Responsive */
@media (max-width: 768px) {
  .interview-layout { flex-direction: column; }
  #sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
  }
  .interview-nav { flex-direction: row; gap: 1rem; align-items: center; }
  .interview-nav-logo { font-size: 1rem; }
  #chat-messages { padding: 1rem; }
  #chat-input-area { padding: 0.75rem 1rem; }
  #chat-toolbar { padding: 0.5rem 1rem; flex-wrap: wrap; }
}

/* --- Print Styles (Biography) --- */
@media print {
  .screen:not(#biography-screen) { display: none !important; }
  #biography-screen { display: block !important; }
  .bio-header, .bio-header-actions, .continue-modal { display: none !important; }
  .bio-container { max-width: 100%; padding: 0; }
  .bio-content { display: block !important; }
  .bio-title { font-size: 2rem; color: black; }
  .bio-body { font-size: 12pt; color: black; line-height: 1.8; }
  body { background: white; }
  .bio-body h2 { font-size: 1.3rem; color: black; }
  .bio-body p { color: black; }
  .btn-primary, .btn-ghost { display: none !important; }
}

/* --- Feedback FAB & Modal --- */
.feedback-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: oklch(100% 0 0);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 16px oklch(30% 0.02 155 / 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.feedback-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px oklch(30% 0.02 155 / 0.35);
}
.feedback-modal-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feedback-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feedback-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.feedback-textarea:focus,
.feedback-input:focus {
  outline: none;
  border-color: var(--accent);
}
.feedback-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}

/* --- Admin Page --- */
/* Reset to original 18px base so admin UI is unaffected by the
   24px global bump introduced for elderly-friendly user-facing screens. */
.admin-page {
  font-size: 18px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.admin-badge {
  font-size: 0.6rem;
  font-weight: 600;
  background: var(--accent);
  color: oklch(100% 0 0);
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.admin-stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-columns {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  align-items: start;
}
.admin-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.admin-section {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.admin-section-sticky {
  position: sticky;
  top: 1rem;
}
.admin-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}
.admin-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(107,92,255,0.05); }
.admin-loading { color: var(--text-muted); font-style: italic; }
.admin-goal-cell { max-width: 240px; }
.admin-plan-badge, .admin-phase-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: capitalize;
}
.admin-plan-free    { background: oklch(95% 0.005 155); color: oklch(45% 0.01 155); }
.admin-plan-paid    { background: oklch(95% 0.04 160); color: oklch(48% 0.10 160); }
.admin-plan-subscriber { background: oklch(95% 0.04 290); color: oklch(45% 0.12 290); }
.admin-phase-opening  { background: oklch(95% 0.03 240); color: oklch(48% 0.10 240); }
.admin-phase-exploring { background: oklch(95% 0.04 160); color: oklch(48% 0.10 160); }
.admin-phase-deepening { background: oklch(95% 0.04 70); color: oklch(52% 0.10 55); }
.admin-phase-closing   { background: oklch(95% 0.04 310); color: oklch(50% 0.12 310); }
.admin-phase-unknown   { background: oklch(95% 0.005 155); color: oklch(55% 0.01 155); }
.admin-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-sans), monospace;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.6;
}
.admin-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.admin-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .admin-columns { grid-template-columns: 1fr; }
  .admin-section-sticky { position: static; }
}

/* --- Invite Codes --- */
.auth-input-invite {
  font-family: var(--font-sans), monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.invite-create-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.invite-select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}
.invite-codes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}
.invite-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.invite-code-row.invite-used {
  opacity: 0.5;
}
.invite-code-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.invite-code-value {
  font-family: var(--font-sans), monospace;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.invite-code-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.invite-code-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.invite-copy-btn {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.invite-copy-btn:hover { background: var(--accent); color: oklch(100% 0 0); }
.invite-revoke-btn {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.invite-revoke-btn:hover { border-color: var(--error); color: var(--error); }
.invite-used-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   Cookie Consent Banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--text);
  color: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 -2px 12px oklch(30% 0.02 155 / 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner.hiding {
  transform: translateY(100%);
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner a:hover {
  opacity: 0.85;
}

.cookie-banner__btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.cookie-banner__btn:hover {
  background: var(--accent-dark);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.75rem;
  }
}

/* ============================================================
   Accessibility — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Accessibility — focus-visible for keyboard navigation
   ============================================================ */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   Numeric typography — tabular figures for pricing alignment
   ============================================================ */
.pricing-price {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Voice Setup Check Modal
   ============================================================ */
.vc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 1.5rem;
}
.vc-overlay.hidden { display: none; }

.vc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem 2.25rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.vc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.vc-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.vc-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.vc-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.vc-step-icon {
  font-size: 1.1rem;
  min-width: 1.4rem;
  text-align: center;
  line-height: 1.4;
  transition: color 0.2s;
}
.vc-step.pending .vc-step-icon  { color: var(--text-muted); }
.vc-step.loading .vc-step-icon  { color: var(--accent); animation: vc-spin 0.8s linear infinite; }
.vc-step.ok      .vc-step-icon  { color: #4ade80; }
.vc-step.fail    .vc-step-icon  { color: #f87171; }
.vc-step.skip    .vc-step-icon  { color: var(--text-muted); }

@keyframes vc-spin {
  to { transform: rotate(360deg); }
}

.vc-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.vc-step-label  { font-size: 0.95rem; color: var(--text); }
.vc-step-detail { font-size: 0.82rem; color: var(--text-muted); }

.vc-help {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.vc-help.hidden { display: none; }
.vc-help ul { margin: 0.4rem 0 0 1rem; padding: 0; }
.vc-help li { margin-bottom: 0.25rem; }

.vc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
