﻿/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;
  --radius:        14px;
  --radius-sm:     10px;
  --radius-xs:     6px;
  --radius-pill:   999px;
  --transition:    0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.77, 0, 0.175, 1);

  /* Soft purple → soft blue gradient */
  --grad:          linear-gradient(90deg,  #7c5cbf, #4d88c4);
  --grad-135:      linear-gradient(135deg, #7c5cbf, #4d88c4);
  --grad-text:     linear-gradient(90deg, #7c5cbf 0%, #9b7dd4 50%, #4d88c4 100%);
}

/* ── Color tokens — permanent dark theme ─────────────────────────────────── */
:root {
  --bg:            #1c1c1e;
  --card:          #252526;
  --card-2:        #2d2d30;
  --card-3:        #383838;
  --shadow:        0 8px 30px rgba(0,0,0,0.50);
  --shadow-sm:     0 2px 12px rgba(0,0,0,0.35);
  --shadow-in:     inset 0 2px 8px rgba(0,0,0,0.35);
  --shadow-hover:  0 12px 40px rgba(0,0,0,0.65);
  --border:        rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --text:          #f0efed;
  --muted:         #a09890;
  --muted-2:       #58524e;
  --blue:          #7eb8e8;
  --purple:        #b497e8;
  --purple-soft:   #c4b5fd;
  --green:         #56c490;
  --amber:         #e8a84a;
  --red:           #e06060;
  --teal:          #5ac8e8;
  --indigo:        #a5b4fc;
  --navbar-bg:     rgba(28,28,30,0.92);
  --session-hdr-bg: rgba(28,28,30,0.82);
  --dot-grid:      radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  --parchment:     #f5f0e8;
  --parchment-ink: #2c2218;
  --purple-light:  #c4b5fd;
  --gold:          #f4d060;
  --on-photo:      #ffffff;
  --video-bg:      #0a0a0a;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 350ms ease-out;
  overflow-x: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.5;
  transition: background 350ms ease-out, color 350ms ease-out;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--dot-grid);
  background-size: 28px 28px;
  opacity: 0.5;
  transition: opacity 350ms ease-out;
}
main { position: relative; z-index: 1; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.link { color: var(--blue); cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 52px;
  background: var(--navbar-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 28px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand-glyph {
  font-size: 1.2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 200ms ease-out;
}
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transition: opacity 200ms ease-out;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand:hover .brand-glyph  { filter: brightness(1.15); }
.nav-brand:hover .brand-logo   { opacity: 0.82; }
.nav-links { display: flex; gap: 2px; margin-right: auto; }
.nav-link {
  padding: 5px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(124,58,237,0.07); text-decoration: none; }
.nav-link.active {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}
.nav-link:hover { background: rgba(255,255,255,0.05); }

@media (max-width: 640px) {
  .navbar {
    width: 100%;
    max-width: 100vw;
    gap: 10px;
    padding: 0 14px;
    overflow: hidden;
  }
  .brand-name { display: none; }
  .nav-brand { flex: 0 0 auto; }
  .nav-links {
    min-width: 0;
    margin-right: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link {
    flex: 0 0 auto;
    padding: 5px 8px;
    font-size: 0.78rem;
  }
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}
.pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  transition: background 0.4s;
}
.pill-text { color: var(--muted); }
.nav-pill.ready .pill-text { color: var(--green); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 20px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: transform 160ms ease-out, background 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, opacity 160ms ease-out;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn:active:not(:disabled),
.btn-start:active,
.btn-stop:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--grad-135);
  color: var(--on-photo);
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  border: none;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6b4fad, #3d6fa8);
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 1px solid rgba(124,58,237,0.45);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(124,58,237,0.10);
  border-color: var(--purple);
}

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

.btn-danger {
  background: var(--red);
  color: var(--on-photo);
}
.btn-danger:hover:not(:disabled) { background: #ff6259; }

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(255,69,58,0.4);
}
.btn-danger-outline:hover:not(:disabled) {
  background: rgba(255,69,58,0.1);
  border-color: var(--red);
}

.btn-lg  { padding: 13px 28px; font-size: 0.95rem; border-radius: 12px; }
.btn.small { padding: 5px 12px; font-size: 0.78rem; }

/* Record button — pill-shaped, prominent */
.btn-record {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  min-width: 148px;
  justify-content: center;
  font-size: 0.9rem;
}
.btn-record:hover:not(:disabled) {
  background: var(--card-3);
}
.btn-record.recording {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-photo);
  animation: pulse-btn 1.4s ease-in-out infinite;
}
@keyframes pulse-btn {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,69,58,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(255,69,58,0); }
}

.btn-next {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 110px;
  justify-content: center;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.btn-next:not(:disabled):hover {
  border-color: rgba(124,58,237,0.50);
  color: var(--purple);
  box-shadow: var(--shadow);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-select, .form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--card-2);
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  appearance: none;
  transition: border-color var(--transition), background var(--transition);
}
.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--card-3);
}
.form-select.small { padding: 6px 10px; font-size: 0.82rem; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%28235%2C235%2C245%2C0.45%29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}
.select-wrap:focus-within::after { opacity: 0.75; }
.select-wrap .form-select { padding-right: 36px; }

/* ── Volume meter ────────────────────────────────────────────────────────── */
.volume-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.volume-track {
  flex: 1;
  height: 5px;
  background: var(--card-2);
  border-radius: 4px;
  overflow: hidden;
  min-width: 120px;
}
.volume-track.large { height: 8px; min-width: 200px; }
.volume-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #57f287);
  border-radius: 4px;
  transition: width 0.05s;
}
.volume-label { font-size: 0.82rem; color: var(--muted); min-width: 140px; }

/* ── Home page ───────────────────────────────────────────────────────────── */
.page-home { max-width: 980px; margin: 0 auto; padding: 56px 28px; }

.hero { text-align: center; margin-bottom: 56px; }
.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.hero-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--card);
  letter-spacing: -0.01em;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .home-grid { grid-template-columns: 1fr; } }

.device-row { display: flex; align-items: center; gap: 14px; }
.device-icon { font-size: 1.4rem; width: 36px; text-align: center; }
.device-info { flex: 1; }
.device-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Session page ────────────────────────────────────────────────────────── */
.session-wrap { display: flex; flex-direction: column; height: calc(100vh - 52px); }

.session-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--session-hdr-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.session-progress {
  font-weight: 600;
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.session-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

/* Left panel — camera + transcript */
.session-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--video-bg);
}
.camera-box { position: relative; flex-shrink: 0; }
.camera-box video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transform: scaleX(-1);
  background: #000;
}
.camera-off {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  font-size: 0.82rem; color: var(--muted);
  background: var(--video-bg);
}
.transcript-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.transcript-label {
  font-size: 0.68rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.transcript-text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}
.filler-word {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--amber);
  text-underline-offset: 3px;
}

/* Transcript label row with toggle */
.transcript-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.transcript-label-row .transcript-label {
  margin-bottom: 0;
}
.transcript-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
}
.transcript-toggle-btn:hover { color: var(--text); background: var(--card-2); }

.transcript-hidden-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}
.transcript-box.is-hidden .transcript-text { display: none; }
.transcript-box.is-hidden .transcript-hidden-msg { display: block; }

/* Right panel — scores */
.session-right { padding: 28px; overflow-y: auto; }
.score-card { text-align: center; }

.score-ring-wrap {
  position: relative;
  display: inline-block;
  width: 168px; height: 168px;
}
.score-ring { width: 168px; height: 168px; }
#score-arc { transition: stroke-dashoffset 0.7s cubic-bezier(0.25,0.46,0.45,0.94), stroke 0.5s; }
.score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-number {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  transition: color 0.4s;
}
.score-label-sm {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 2px;
}

.sub-scores {
  display: flex;
  gap: 0;
  justify-content: center;
  margin-top: 24px;
  background: var(--card-2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.sub-item {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
}
.sub-item:last-child { border-right: none; }
.sub-label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 5px;
}
.sub-val { display: block; font-size: 1.15rem; font-weight: 600; }

.tip-box {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px;
  padding: 11px 14px;
  background: rgba(255,159,10,0.08);
  border: 1px solid rgba(255,159,10,0.2);
  border-radius: 10px;
  text-align: left;
}
.tip-box[data-type="info"] {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.25);
}
.tip-box[data-type="info"] .tip-text { color: var(--blue); }
.tip-icon { flex-shrink: 0; }
.tip-text { font-size: 0.84rem; color: var(--amber); }

.filler-row {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Question panel */
.question-panel {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: rgba(28,28,30,0.8);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.question-text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.followup-text {
  font-size: 0.84rem;
  color: var(--blue);
  font-style: italic;
}

/* Controls bar */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
}
.loading-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 44px 40px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
}
/* orb-style loading card variant */
.loading-card-orb {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 44px;
}
/* small orb for overlays (48px instead of 96px) */
.an-orb-sm {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}
/* between-question countdown bar */
.lt-between-countdown {
  width: 200px;
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
}
.lt-between-bar {
  height: 100%;
  width: 0%;
  background: var(--purple);
  border-radius: 2px;
  transition: width 3s linear;
}
/* staged loading card variant */
.loading-card.load-staged { text-align: left; }
.load-brand {
  font-size: 2rem;
  color: var(--blue);
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.loading-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.load-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 28px;
}
.load-stages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.load-stage {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ls-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 300ms ease;
}
.load-stage.ls-done   .ls-dot { background: var(--green); }
.load-stage.ls-active .ls-dot { background: var(--blue); animation: ls-pulse 1s ease-in-out infinite; }
.load-stage.ls-pending .ls-dot { background: var(--border-strong); }
@keyframes ls-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}
.ls-text { font-size: 0.88rem; line-height: 1; }
.ls-label {
  display: block;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 200ms ease;
}
.ls-note {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
  min-height: 1em;
}
.load-stage.ls-done   .ls-label { color: var(--muted); }
.load-stage.ls-active .ls-label { color: var(--text); }
.load-stage.ls-pending .ls-label { color: var(--muted); }
.load-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted-2);
  line-height: 1.5;
}

.spinner {
  width: 36px; height: 36px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto;
}
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-inline {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.88rem;
  margin-top: 16px;
}

/* ── Baseline wizard ─────────────────────────────────────────────────────── */
.wizard-header { text-align: center; margin-bottom: 40px; }
.wizard-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  gap: 0;
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem;
  color: var(--muted);
  background: var(--card);
  transition: all 0.3s;
}
.step-item.active .step-circle {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(124,58,237,0.12);
}
.step-item.done .step-circle {
  border-color: var(--green);
  background: var(--green);
  color: var(--on-photo);
}
.step-label {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-item.active .step-label { color: var(--blue); }
.step-item.done .step-label { color: var(--green); }
.step-connector {
  flex: 1; height: 1px;
  background: var(--border-strong);
  max-width: 60px; margin: 0 4px; margin-bottom: 22px;
}
.step-item.done + .step-connector { background: var(--green); }

.step-panel { display: none; }
.step-panel.active { display: block; }
.step-card { text-align: center; }
.step-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.step-card > p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

.mic-status { font-size: 0.88rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* Prompt box */
.prompt-box {
  background: rgba(48,209,88,0.06);
  border: 1px solid rgba(48,209,88,0.18);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
}
.prompt-box.uncertain {
  background: rgba(255,159,10,0.06);
  border-color: rgba(255,159,10,0.18);
}
.prompt-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 8px;
}
.prompt-text { font-size: 0.95rem; line-height: 1.55; }

/* Countdown ring */
.record-center { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 12px; }
.countdown-ring-wrap { position: relative; width: 96px; height: 96px; }
.countdown-ring { width: 96px; height: 96px; }
#conf-arc, #unc-arc { transition: stroke-dashoffset 0.1s linear; }
.countdown-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.countdown-num { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.countdown-unit { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Sample dots */
.sample-dots { display: flex; gap: 8px; }
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  transition: background 0.3s, border-color 0.3s;
}
.dot.filled { background: var(--green); border-color: var(--green); }
.sample-status { font-size: 0.82rem; color: var(--muted); }

/* Train result */
.train-result { margin-top: 24px; }
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.metric-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.metric-val { font-size: 1.5rem; font-weight: 700; color: var(--green); letter-spacing: -0.03em; }
.metric-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-top: 2px;
}
#train-msg { color: var(--green); font-size: 0.88rem; }

/* ── History page ────────────────────────────────────────────────────────── */
.page-history { max-width: 1080px; margin: 0 auto; padding: 48px 28px; }
.history-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.history-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stats-bar {
  display: flex;
  gap: 16px;
  padding: 20px 0;
}
.stat-item {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-align: center;
}
.stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 4px;
}

.history-table { width: 100%; border-collapse: collapse; }
.history-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.history-table td {
  padding: 13px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(255,255,255,0.02); }

.score-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}
.score-chip.green { background: rgba(48,209,88,0.12); color: var(--green); }
.score-chip.amber { background: rgba(255,159,10,0.12); color: var(--amber); }
.score-chip.red   { background: rgba(255,69,58,0.12);  color: var(--red); }
.score-chip.muted { background: rgba(255,255,255,0.06); color: var(--muted-2); }

.type-badge {
  display: inline-block; padding: 2px 9px;
  border-radius: 6px; font-size: 0.72rem; font-weight: 600;
  background: rgba(255,255,255,0.06); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.empty-state { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty-icon { font-size: 3.5rem; margin-bottom: 20px; }
.empty-state h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}
.empty-state p { margin-bottom: 24px; }

/* ── Rubric evaluation panel ─────────────────────────────────────────────── */
.rubric-panel {
  margin: 0 auto;
  max-width: 900px;
  padding: 0 24px 40px;
}
.rubric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.rubric-title {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rubric-status {
  font-size: .85rem;
  color: var(--blue);
  font-weight: 600;
}
.rubric-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.rubric-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--card-2);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.rubric-row {
  display: grid;
  grid-template-columns: 160px 48px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
}
.rubric-dim  { color: var(--muted); font-weight: 500; padding-top: 1px; }
.rubric-score { font-weight: 700; font-size: .9rem; }
.rubric-rationale { color: var(--text); line-height: 1.45; }
.rubric-smoke {
  padding: 8px 14px;
  font-size: .8rem;
  color: var(--amber);
  background: rgba(255,159,10,.08);
  border: 1px solid rgba(255,159,10,.2);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.rubric-smoke code {
  background: rgba(255,159,10,.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: .78rem;
}
.rubric-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 4px;
}
.rubric-priority {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
}
.rubric-sum-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}
.rubric-sum-item {
  font-size: .82rem;
  padding: 5px 0;
  line-height: 1.4;
}
.rubric-strength { color: var(--green); }
.rubric-weakness { color: var(--red); }

/* ── v4.0 — Onboarding modal ─────────────────────────────────────────────── */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
}
.onboarding-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--blue);
  border-radius: 24px;
  padding: 52px 48px;
  text-align: center;
  max-width: 460px;
  width: 92%;
  box-shadow: var(--shadow);
  animation: modal-enter 280ms var(--ease-drawer) forwards;
  position: relative;
}
.ob-skip-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms;
}
.ob-skip-btn:hover { background: var(--card-2); color: var(--text); }
.onboarding-logo {
  font-size: 2.8rem;
  color: var(--blue);
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}
.onboarding-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.onboarding-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.onboarding-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.ob-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ob-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-photo);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ob-text { font-size: 0.9rem; line-height: 1.55; }
.ob-text strong { display: block; margin-bottom: 2px; }

/* ── Multi-step tutorial modal ───────────────────────────────────────────── */
.ob-multi { padding: 40px 40px 32px; min-height: 320px; display: flex; flex-direction: column; align-items: center; }

.ob-dots {
  display: flex; gap: 7px; margin-bottom: 28px;
}
.ob-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-strong);
  transition: background 200ms ease, transform 200ms ease;
}
.ob-dot.active { background: var(--blue); transform: scale(1.35); }

.ob-slide {
  display: none; flex-direction: column; align-items: center; text-align: center;
  flex: 1; gap: 10px;
}
.ob-slide.active { display: flex; }
.ob-slide h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.ob-slide .onboarding-sub { margin-bottom: 0; }
.ob-icon { font-size: 2.6rem; margin-bottom: 6px; }

.ob-nav {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-top: 28px; gap: 12px;
}
.ob-nav .btn { min-width: 110px; }

.ob-no-show-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--muted); cursor: pointer; margin-top: 16px;
}
.ob-no-show-label input { cursor: pointer; }

/* ── v4.0 — Help button ──────────────────────────────────────────────────── */
.btn-icon-help {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-icon-help:hover {
  color: var(--text);
  border-color: var(--blue);
  background: rgba(124,58,237,0.12);
}

/* ── v4.0 — State panels ─────────────────────────────────────────────────── */
.state-panel { flex: 1; overflow-y: auto; }

/* ── STATE 1: READY ──────────────────────────────────────────────────────── */
.ready-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 120px);
}
.ready-left {
  border-right: 1px solid var(--border);
  background: var(--video-bg);
}
.ready-right {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.question-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 14px;
}
.question-text {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.ready-tip {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 32px;
  padding: 12px 16px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.22);
  border-radius: 10px;
}

/* Start button */
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--grad-135);
  color: var(--on-photo);
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out, opacity 160ms ease-out;
  align-self: flex-start;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  position: relative;
  overflow: hidden;
}
.btn-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-110%);
  pointer-events: none;
  transition: transform 0ms;
}
.btn-start:hover::before {
  transform: translateX(110%);
  transition: transform 700ms ease;
}
.btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
.btn-start:active { transform: translateY(0) scale(0.97); }

#session-form .btn-start {
  width: 100%;
  justify-content: center;
}

/* ── STATE 2: RECORDING ──────────────────────────────────────────────────── */
/* .recording-layout — full definition moved to line ~5584 */
.rec-left {
  border-right: 1px solid var(--border);
  background: var(--video-bg);
  display: flex;
  flex-direction: column;
}

/* Pulsing red border while recording */
.recording-pulse {
  position: relative;
}
.recording-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--red);
  pointer-events: none;
  animation: recording-border-pulse 1.5s ease-in-out infinite;
}
@keyframes recording-border-pulse {
  0%,100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.rec-timer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
}
.rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.rec-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  flex: 1;
}
.rec-timer {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rec-progress-wrap {
  padding: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-progress-track {
  flex: 1;
  height: 4px;
  background: var(--card-2);
  border-radius: 4px;
  overflow: hidden;
}
.rec-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--green);
  transition: width 0.9s linear, background 0.4s;
}
.rec-progress-label {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rec-right {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.question-badge-sm {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  font-style: normal;
  margin-bottom: 14px;
  line-height: 1.5;
}
.recording-active {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--card);
  overflow-y: auto;
  max-height: 200px;
  margin-bottom: 16px;
}
.rec-scores-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.mini-score {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.mini-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.mini-val { display: block; font-size: 1.1rem; font-weight: 700; }

/* Stop button */
.btn-stop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--card-2);
  color: var(--text);
  border: 2px solid var(--red);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease-out, background 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, opacity 160ms ease-out;
  align-self: flex-start;
}
.btn-stop:hover {
  background: var(--red);
  color: var(--on-photo);
  box-shadow: 0 2px 16px rgba(255,69,58,0.35);
}

/* ── STATE 3: ANALYSING ──────────────────────────────────────────────────── */
/* ── STATE 3: ANALYSING (breathing orb design) ───────────────────────── */
.analysing-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 280ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 280ms cubic-bezier(0.23, 1, 0.32, 1);
}
.analysing-panel.an-visible {
  opacity: 1;
  transform: scale(1);
}
.an-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 360px;
  text-align: center;
}

/* Orb */
.an-orb-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
}
.an-orb-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,151,232,0.18) 0%, transparent 70%);
  animation: orb-breathe 2.4s cubic-bezier(0.45, 0, 0.55, 1) 400ms infinite;
}
.an-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, rgba(180,151,232,0.65) 0%, rgba(120,100,200,0.25) 55%, transparent 75%);
  border: 1.5px solid rgba(180,151,232,0.35);
  box-shadow: 0 0 18px rgba(180,151,232,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: orb-breathe 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes orb-breathe {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.07); opacity: 0.85; }
}

/* Stage label */
.an-stage-label-wrap {
  height: 24px;
  overflow: hidden;
  margin-bottom: 20px;
}
.an-stage-label-text {
  display: block;
  font-size: 1.0rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: opacity 160ms ease-in, transform 160ms ease-in;
}
.an-stage-label-text.fading {
  opacity: 0;
  transform: translateY(-4px);
}
.an-stage-label-text.entering {
  opacity: 0;
  transform: translateY(4px);
}
/* Remove transition while setting entering state, add it for fade-in */
.an-stage-label-text.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Progress dots */
.an-stage-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.an-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: background 220ms ease-out, transform 220ms ease-out;
}
.an-dot.ls-pending { background: var(--border-strong); }
.an-dot.ls-active  { background: var(--purple); transform: scale(1.3); animation: ls-pulse 1s ease-in-out infinite; }
.an-dot.ls-done    { background: var(--green); }

.an-timer {
  font-size: 0.78rem;
  color: var(--muted);
}
.an-timer-hint { opacity: 0.6; }

/* ── STATE 4: FEEDBACK ───────────────────────────────────────────────────── */
.feedback-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px 60px;
}

.feedback-header {
  margin-bottom: 24px;
}
.feedback-q-ref {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.feedback-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Overall score block */
.feedback-overall {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.overall-score-block {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.overall-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 70px;
}
.overall-number {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.overall-score-num.score-high {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.overall-denom {
  font-size: 1.3rem;
  color: var(--muted);
  font-weight: 500;
  align-self: flex-end;
  padding-bottom: 4px;
}
.overall-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--card-2);
  border-radius: 6px;
  overflow: hidden;
  min-width: 120px;
}
.overall-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.overall-verdict {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Dimension sections */
.feedback-dims { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.feedback-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.feedback-accordion > summary { cursor: pointer; list-style: none; }
.feedback-accordion > summary::-webkit-details-marker { display: none; }
.feedback-accordion > summary::before {
  content: "›";
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  margin-right: 8px;
  transition: transform 180ms ease;
}
.feedback-accordion[open] > summary::before { transform: rotate(90deg); }
.feedback-accordion > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.feedback-accordion-body { padding: 16px; }
.feedback-loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
.feedback-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245,158,11,0.35);
  animation: feedback-loading-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes feedback-loading-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.65; box-shadow: 0 0 0 0 rgba(245,158,11,0.28); }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 7px rgba(245,158,11,0); }
}
.feedback-report-loading {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(100%, 520px);
}
.feedback-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(232,168,74,0.14);
}
.feedback-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(232,168,74,0.3), var(--amber), rgba(90,200,232,0.8));
  animation: feedback-progress-indeterminate 1.35s var(--ease-out-strong) infinite;
}
@keyframes feedback-progress-indeterminate {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(85%); }
  100% { transform: translateX(180%); }
}
.feedback-section.section-good { border-left: 3px solid var(--green); }
.feedback-section.section-ok   { border-left: 3px solid var(--amber); }
.feedback-section.section-bad  { border-left: 3px solid var(--red); }
.feedback-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}
.fs-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.fs-composite {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Individual dimension block */
.dim-block {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dim-block:last-child { border-bottom: none; }
.dim-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.dim-icon { font-size: 1rem; flex-shrink: 0; width: 22px; }
.dim-name {
  font-weight: 600;
  font-size: 0.88rem;
  flex: 1;
}
.dim-score {
  font-size: 0.9rem;
  font-weight: 700;
}
.dim-label-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dim-rationale {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.5;
  padding-left: 32px;
}
.dim-extra {
  font-size: 0.76rem;
  color: var(--muted);
  padding-left: 32px;
  margin-top: 4px;
}
.dim-extra code {
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
}
.dim-na {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.dim-na:last-child { border-bottom: none; }
.dim-na-tag {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

/* Summary block */
.feedback-summary-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 16px;
}
.sum-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.sum-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.sum-item {
  font-size: 0.84rem;
  padding: 6px 0;
  line-height: 1.45;
}
.sum-strength { color: var(--green); }
.sum-weakness { color: var(--red); }

.priority-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.priority-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
}
.priority-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Dos & don'ts block */
.feedback-dosdonts {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 28px;
}
.dd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dd-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.dd-col:first-child .dd-col-label { color: var(--green); }
.dd-col:last-child  .dd-col-label { color: var(--red); }
.dd-item {
  font-size: 0.84rem;
  padding: 6px 0;
  line-height: 1.45;
}
.dd-do   { color: var(--green); }
.dd-dont { color: var(--red); }

/* Feedback actions */
.feedback-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.feedback-actions .btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* ── Hint guide ──────────────────────────────────────────────────────────── */
.hint-guide {
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.05);
  overflow: hidden;
}
.hint-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.hint-summary::-webkit-details-marker { display: none; }
.hint-caret {
  margin-left: auto;
  font-size: 1rem;
  transition: transform 200ms var(--ease-out-strong);
}
details[open] .hint-caret { transform: rotate(90deg); }
.hint-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hint-loading {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.hint-bullet {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid var(--blue);
  opacity: 0.9;
}

/* ── Model answer panel ──────────────────────────────────────────────────── */
.model-answer-panel {
  margin: 20px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.ma-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.ma-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
}
.ma-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 160ms ease-out;
}
.ma-close:hover { color: var(--text); }
.ma-body {
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}
.ma-loading {
  color: var(--muted);
  font-style: italic;
  font-size: 0.83rem;
}
.ma-label-tag {
  color: var(--green);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ── Coaching Breakdown Panel ─────────────────────────────────────────── */
.coaching-breakdown-panel {
  margin: 16px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.cb-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-transform: uppercase;
}
.cb-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 160ms ease-out;
}
.cb-close:hover { color: var(--text); }
.cb-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
.cb-insights {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cb-card {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--card-2);
  border-left: 3px solid var(--border-strong);
}
.cb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cb-dim-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cb-score-badge {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cb-what {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 6px;
}
.cb-fix {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .ready-layout, .recording-layout {
    grid-template-columns: 1fr;
  }
  .ready-left, .rec-left { display: none; }
  .sum-cols, .dd-grid { grid-template-columns: 1fr; }
  .overall-score-block { flex-wrap: wrap; }
}

/* ── Role Card (interview type selector) ─────────────────────────────────── */
.role-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0;
}

.role-card {
  position: relative;
  display: flex;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--card);
  cursor: default;
  min-height: 220px;
  transition: border-color 200ms ease,
              box-shadow 200ms ease,
              transform 400ms cubic-bezier(0.23,1,0.32,1);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .role-card:hover {
    border-color: rgba(180,151,232,0.45);
    box-shadow: 0 10px 36px rgba(0,0,0,0.38);
  }
}

.role-card-bg {
  position: absolute;
  inset: 0;
  transition: opacity 380ms ease;
  pointer-events: none;
  z-index: 0;
}

.role-card-img-section {
  position: relative;
  flex: 0 0 52%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  min-height: 220px;
  z-index: 1;
}

.role-card-img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  object-position: bottom center;
  transition: opacity 210ms cubic-bezier(0.23,1,0.32,1),
              filter  210ms cubic-bezier(0.23,1,0.32,1),
              transform 240ms cubic-bezier(0.23,1,0.32,1);
}
.role-card-img.leaving {
  opacity: 0;
  filter: blur(6px);
  transform: scale(0.95);
}

.role-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 22px;
  position: relative;
  z-index: 1;
  border-left: 1px solid var(--border);
  transition: opacity 150ms ease,
              transform 150ms ease;
}
.role-card-info.leaving {
  opacity: 0;
  transform: translateY(6px);
}

.role-card-cat {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
  background: rgba(124,58,237,0.16);
  color: var(--purple);
}
.role-card-cat[data-cat="Finance"]  { background: rgba(255,159,10,0.14);  color: #f59e0b; }
.role-card-cat[data-cat="Tech"]     { background: rgba(96,165,250,0.14);  color: #60a5fa; }
.role-card-cat[data-cat="Strategy"] { background: rgba(191,90,242,0.14);  color: #bf5af2; }
.role-card-cat[data-cat="General"]  { background: rgba(48,209,88,0.14);   color: #30d158; }
.role-card-cat[data-cat="People"]   { background: rgba(20,184,166,0.14);  color: #14b8a6; }

.role-card-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 9px;
}

.role-card-desc-text {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Nav row */
.role-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.role-nav-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 140ms ease,
              box-shadow   140ms ease,
              transform    120ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .role-nav-arrow:hover {
    border-color: rgba(180,151,232,0.60);
    box-shadow: 0 0 0 1px rgba(180,151,232,0.35);
  }
}
.role-nav-arrow:active { transform: scale(0.91); }
.role-nav-arrow:disabled { opacity: 0.28; pointer-events: none; }

/* Expanding dot indicators */
.role-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.role-dot {
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
  width: 6px;
  opacity: 0.28;
  transition: width   220ms cubic-bezier(0.23,1,0.32,1),
              opacity 220ms ease;
}
.role-dot.active { width: 20px; opacity: 1; }
.role-dot[data-cat="Finance"]  { background: #f59e0b; }
.role-dot[data-cat="Tech"]     { background: #60a5fa; }
.role-dot[data-cat="Strategy"] { background: #bf5af2; }
.role-dot[data-cat="General"]  { background: #30d158; }
.role-dot[data-cat="People"]   { background: #14b8a6; }

/* Mobile: stack vertically */
@media (max-width: 520px) {
  .role-card { flex-direction: column; }
  .role-card-img-section { flex: 0 0 auto; min-height: 180px; }
  .role-card-info { border-left: none; border-top: 1px solid var(--border); padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .role-card, .role-card-bg, .role-card-img, .role-card-info,
  .role-dot, .role-nav-arrow { transition: none !important; }
}

/* ── Status dot (device check) ───────────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  transition: background 200ms ease;
}
.status-dot.ok     { background: var(--green); animation: status-pulse 2s ease-in-out infinite; }
.status-dot.error  { background: var(--red); }
.status-dot.detecting { background: var(--amber); }

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48,209,88,0.45); }
  50%       { box-shadow: 0 0 0 5px rgba(48,209,88,0); }
}

/* ── Session progress dots ───────────────────────────────────────────────── */
.session-prog-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.prog-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-3);
  border: 1px solid var(--border-strong);
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.prog-dot.done {
  background: var(--blue);
  border-color: var(--blue);
  opacity: 0.5;
}
.prog-dot.current {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(180,151,232,0.38);
}

/* ── Onboarding modal — Emil entrance animation ──────────────────────────── */
.onboarding-overlay {
  animation: overlay-fade-in 200ms ease-out forwards;
}
@keyframes overlay-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modal-exit {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.96) translateY(6px); }
}
@keyframes overlay-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.onboarding-overlay.closing {
  animation: overlay-fade-out 180ms ease-in forwards;
  pointer-events: none;
}
.onboarding-overlay.closing .onboarding-card {
  animation: modal-exit 160ms ease-in forwards;
}

/* ── Camera panel label ──────────────────────────────────────────────────── */
.camera-panel-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  padding: 6px 10px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--border);
}
.camera-off-clean {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--video-bg);
  color: var(--muted-2);
}
.camera-off-clean svg { width: 32px; height: 32px; opacity: 0.4; }
.camera-off-clean span { font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn-start, .btn-stop {
    transition-duration: 0ms !important;
    animation: none !important;
  }
  .btn-start::before { display: none; }
  .onboarding-card { animation: none !important; opacity: 1; transform: none; }
  .onboarding-overlay, .onboarding-overlay.closing { animation: none !important; }
  .onboarding-overlay.closing { opacity: 0; }
  .prog-dot, .status-dot { transition: none; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETUP PAGE — Landing + Wizard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero section ──────────────────────────────────────────────────────── */
/* ── Hero — full viewport cover page ─────────────────────────────────── */
.page-setup {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100dvh - 52px);
  background:
    radial-gradient(ellipse 58% 42% at 18% 6%, rgba(112, 164, 228, 0.18) 0%, rgba(112, 164, 228, 0.04) 38%, transparent 68%),
    radial-gradient(ellipse 48% 38% at 84% 10%, rgba(155, 122, 232, 0.16) 0%, rgba(155, 122, 232, 0.04) 42%, transparent 70%),
    linear-gradient(180deg, #1d1d20 0%, #17171a 46%, #111114 100%);
}
.page-setup::before,
.page-setup::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.page-setup::before {
  background:
    linear-gradient(118deg, transparent 0%, rgba(255, 255, 255, 0.035) 18%, transparent 31%),
    linear-gradient(152deg, transparent 20%, rgba(122, 154, 255, 0.09) 48%, transparent 70%),
    radial-gradient(ellipse 90% 18% at 50% 35%, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.018) 48%, transparent 72%);
  filter: blur(0.2px);
  mix-blend-mode: screen;
}
.page-setup::after {
  opacity: 0.32;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
}
.setup-hero,
.setup-wizard-section {
  position: relative;
  z-index: 1;
}
.setup-hero {
  min-height: calc(100dvh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: transparent;
  position: relative;
  overflow: hidden;
}
/* Subtle ambient light */
.setup-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 56% 46% at 20% -10%, rgba(124,92,191,0.12) 0%, transparent 68%),
    radial-gradient(ellipse 46% 34% at 78% -4%,  rgba(116,130,255,0.11) 0%, transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.18));
}
.setup-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.setup-hero-inner { position: relative; z-index: 1; }
.setup-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 60px 28px 80px;
  max-width: 1080px;
  width: 100%;
  isolation: isolate;
}
.setup-hero-inner::before {
  content: '';
  position: absolute;
  inset: 48px clamp(18px, 9vw, 140px) 56px;
  z-index: -1;
  border-radius: 30px;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(118, 148, 255, 0.12) 0%, transparent 58%),
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018) 38%, rgba(0,0,0,0.22)),
    rgba(11, 11, 15, 0.34);
  border: 1px solid rgba(255,255,255,0.065);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    0 32px 90px rgba(0,0,0,0.26);
  backdrop-filter: blur(14px) saturate(126%);
  -webkit-backdrop-filter: blur(14px) saturate(126%);
}

/* Logo — wrapper carries the entrance animation and layout spacing */
.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: -16px;
  animation: heroLogoIn 700ms cubic-bezier(0.23, 1, 0.32, 1) both;
  animation-delay: 80ms;
}
.hero-logo {
  height: min(380px, 42vh);
  width: auto;
  display: block;
  margin-bottom: 0;
  transition: opacity 350ms ease-out;
}
@keyframes heroLogoIn {
  from { opacity: 0; transform: translateY(14px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Title */
.setup-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.1;
  animation: heroTitleIn 700ms 120ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Typewriter row */
.hero-typewriter-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  margin-bottom: 36px;
  animation: heroSubIn 700ms 200ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes heroSubIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-typewriter-prefix {
  color: var(--muted);
}
.hero-typewriter-text {
  color: var(--blue);
  font-weight: 700;
}
.hero-cursor {
  color: var(--blue);
  font-weight: 400;
  margin-left: 1px;
  animation: cursorBlink 0.75s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Feature chips row */
.setup-feats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  animation: heroSubIn 700ms 280ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.setup-feat { font-size: 0.78rem; color: var(--muted); letter-spacing: -0.005em; }
.feat-sep   { color: var(--border-strong); font-size: 1rem; user-select: none; }

/* CTA group wrapper */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  animation: heroSubIn 700ms 360ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* Primary CTA button */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-135);
  color: var(--on-photo);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

/* Secondary Resume CTA */
.hero-resume-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms var(--ease-out-strong),
              border-color 180ms var(--ease-out-strong),
              background 180ms var(--ease-out-strong);
  cursor: pointer;
}
.hero-resume-cta:hover {
  color: var(--text);
  border-color: var(--purple-soft);
  background: rgba(124,58,237,0.07);
  text-decoration: none;
}
.hero-resume-cta svg { flex-shrink: 0; }
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  text-decoration: none;
}
.hero-cta:active {
  transform: scale(0.97);
  box-shadow: 0 2px 12px rgba(124,58,237,0.25);
}
.hero-cta-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.hero-cta-arrow svg { width: 14px; height: 14px; }
.hero-cta:hover .hero-cta-arrow { transform: translateX(2px); }

/* ── Wizard section ────────────────────────────────────────────────────── */
.setup-wizard-section {
  scroll-margin-top: 60px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 26%),
    radial-gradient(ellipse 48% 34% at 50% 0%, rgba(124,92,191,0.08), transparent 70%);
}
.setup-wizard-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 52px 28px 100px;
}

/* ── Wizard step breadcrumb — chevron arrow style ────────────────────── */
.wizard-prog { margin-bottom: 40px; }
.wp-bar      { display: none; }

.wp-step-labels {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  border-bottom: none;
}

.wp-step-lbl {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 10px 14px 10px 22px;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
  background: var(--card-2);
  cursor: default;
  user-select: none;
  white-space: nowrap;
  transition: color 220ms ease-out, background 220ms ease-out, filter 220ms ease-out;
  clip-path: polygon(
    0% 0%,
    calc(100% - 14px) 0%,
    100% 50%,
    calc(100% - 14px) 100%,
    0% 100%,
    14px 50%
  );
  margin-left: -7px;
}

/* First step — flat left edge, arrow on right only */
.wp-step-lbl:first-child {
  clip-path: polygon(
    0% 0%,
    calc(100% - 14px) 0%,
    100% 50%,
    calc(100% - 14px) 100%,
    0% 100%
  );
  padding-left: 14px;
  margin-left: 0;
}

/* Last step — indent on left, flat right edge */
.wp-step-lbl:last-child {
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% 100%,
    0% 100%,
    14px 50%
  );
  padding-right: 14px;
}

/* Active step — violet gradient + glow (filter: drop-shadow respects clip-path) */
.wp-step-lbl.active {
  background: linear-gradient(90deg, var(--purple), var(--purple-soft));
  color: #fff;
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(124,92,191,0.38));
}

.wp-step-lbl::after { content: ''; }
.wp-step-lbl.active::after { content: ' »'; }

/* Done steps */
.wp-step-lbl.done {
  background: var(--card-3);
  color: var(--muted);
  z-index: 2;
}

/* Clickable done steps */
.wp-step-lbl.done.clickable {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .wp-step-lbl.done.clickable:hover {
    background: var(--card-2);
    color: var(--text);
    filter: drop-shadow(0 0 4px rgba(124,92,191,0.18));
  }
}

/* Ensure any stale sep rule is harmless */
.wp-step-sep { display: none; }

/* Required field shake animation */
@keyframes field-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.field-shake { animation: field-shake 0.45s cubic-bezier(0.36,0.07,0.19,0.97); }

/* ── Step panels ───────────────────────────────────────────────────────── */
@keyframes ws-enter-fwd {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ws-enter-bwd {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ws-anim-fwd { animation: ws-enter-fwd 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.ws-anim-bwd { animation: ws-enter-bwd 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.ws-head { margin-bottom: 32px; }
.ws-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.ws-head p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.ws-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}
.ws-back-btn { color: var(--muted); }
.ws-back-btn:hover { color: var(--text); }

/* ── Role list (vertical bars) ─────────────────────────────────────────── */
.role-list { display: flex; flex-direction: column; gap: 3px; }

.role-cat-hdr {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted-2);
  padding: 18px 2px 6px;
}
.role-cat-hdr:first-child { padding-top: 0; }

.role-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: border-color 150ms ease-out,
              border-left-color 150ms ease-out,
              background 150ms ease-out,
              transform 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .role-item:hover {
    border-color: var(--border-strong);
    border-left-color: var(--muted-2);
    background: var(--card-2);
    transform: translateX(3px);
  }
}
.role-item:active { transform: translateX(3px) scale(0.99); }
.role-item.active {
  border-color: rgba(124,58,237,0.35);
  border-left-color: var(--purple);
  background: rgba(124,58,237,0.07);
}

.role-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 150ms ease-out;
}
.role-item-icon svg { width: 18px; height: 18px; }
.role-item.active .role-item-icon { color: var(--blue); }

.role-item-info { flex: 1; min-width: 0; }
.role-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 2px;
}
.role-item-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.role-item-check {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 180ms ease-out, transform 180ms var(--ease-drawer);
}
.role-item.active .role-item-check {
  display: flex;
  opacity: 1;
  transform: scale(1);
}
.role-item-check svg { width: 9px; height: 9px; }

/* ── Config form ───────────────────────────────────────────────────────── */
.config-form { display: flex; flex-direction: column; gap: 18px; }

/* ── Launch summary ────────────────────────────────────────────────────── */
.launch-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.ls-item {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ls-item:nth-child(2n) { border-right: none; }
.ls-item:nth-last-child(-n+2) { border-bottom: none; }
.ls-full {
  grid-column: 1 / -1;
  border-right: none;
}
.ls-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 5px;
}
.ls-val {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.launch-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Device modal ──────────────────────────────────────────────────────── */
.dm-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-fade-in 200ms ease-out forwards;
}
.dm-overlay.closing {
  animation: overlay-fade-out 180ms ease-in forwards;
  pointer-events: none;
}
.dm-overlay.closing .dm-card {
  animation: modal-exit 160ms ease-in forwards;
}
.dm-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--blue);
  border-radius: 18px;
  padding: 24px 28px 28px;
  width: 460px;
  max-width: 92vw;
  box-shadow: var(--shadow);
  animation: modal-enter 280ms var(--ease-drawer) forwards;
}
.dm-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dm-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dm-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, transform 160ms ease-out;
}
.dm-close:hover { color: var(--text); border-color: var(--border-strong); background: var(--card-2); }
.dm-close:active { transform: scale(0.93); }

.dm-section-lbl {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.dm-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dm-ftr {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.btn-compact { padding: 6px 14px; font-size: 0.82rem; }


/* ═══════════════════════════════════════════════════════════════════════════
   v4.5 — Mode picker, resume upload,
   STAR meter, history analytics, coaching plan
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Mode picker — Step 0 of setup wizard ───────────────────────────────── */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 640px) { .mode-grid { grid-template-columns: 1fr; } }
.mode-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms var(--ease-out-strong), box-shadow 200ms var(--ease-out-strong), transform 180ms var(--ease-out-strong);
}
.mode-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.mode-card:active { transform: scale(0.985); }
.mode-card.active {
  border-color: rgba(59,130,246,0.55);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.25), 0 4px 20px rgba(59,130,246,0.12);
}
.mode-card-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  color: var(--muted);
}
.mode-card.active .mode-card-icon { color: var(--purple); }

/* ── Resume upload step ─────────────────────────────────────────────────── */

/* Drop zone */
.ws-optional-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
}
.ru-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 24px 40px;
  background: var(--card);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms, background 180ms, box-shadow 180ms;
  user-select: none;
}
.ru-zone:hover {
  border-color: var(--purple);
  background: rgba(124,58,237,0.05);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.08);
}
.ru-zone.drag-over {
  border-color: var(--purple);
  background: rgba(124,58,237,0.10);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.15);
}
.ru-zone-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  color: var(--muted);
  opacity: 0.7;
}
.ru-zone-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.ru-zone-or {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ru-browse-pill {
  display: inline-block;
  padding: 7px 20px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  pointer-events: none;
}
.ru-zone:hover .ru-browse-pill {
  background: var(--blue);
  color: var(--on-photo);
}
.ru-zone-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* Progress state */
.ru-progress {
  display: none;
  padding: 26px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 10px;
  flex-direction: column;
}
.ru-progress.active { display: flex; }
.ru-progress-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ru-progress-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.ru-progress-track {
  height: 3px;
  background: var(--card-2);
  border-radius: 4px;
  overflow: hidden;
}
.ru-progress-bar {
  height: 100%;
  width: 0;
  background: var(--grad-135);
  border-radius: 4px;
  transition: width 260ms ease-out;
}

/* Parsed card */
.ru-card {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ru-card.active { display: block; }
.ru-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}
.ru-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--green, #22c55e);
}
.ru-card-name {
  flex: 1;
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ru-replace-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: color 120ms;
}
.ru-replace-btn:hover { color: var(--blue); text-decoration: underline; }
.ru-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── STAR meter (during recording) ──────────────────────────────────────── */
.star-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.star-meter-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-right: 4px;
}
.star-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background 320ms ease-out, color 320ms ease-out, border-color 320ms ease-out, transform 320ms var(--ease-drawer);
}
.star-pill.done {
  background: var(--green);
  color: var(--on-photo);
  border-color: var(--green);
  transform: scale(1.08);
}
.star-meter-drift {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
}
.star-meter-drift.warn { color: var(--amber); }
.star-meter-drift.bad { color: var(--red); }

/* ── Hint guide — switch from blue to teal ──────────────────────────────── */
.hint-guide {
  border-color: rgba(90,200,250,0.25) !important;
  background: rgba(90,200,250,0.05) !important;
}
.hint-summary {
  color: var(--teal) !important;
}
.hint-summary svg { color: var(--teal); }
.hint-caret { color: var(--teal); }
.hint-bullet::before { background: var(--teal) !important; }

/* ── Feedback section accent colors ─────────────────────────────────────── */
.feedback-section:nth-child(1) .fs-title { color: var(--purple); }
.feedback-section:nth-child(2) .fs-title { color: var(--teal); }
.feedback-section:nth-child(3) .fs-title { color: var(--amber); }

/* ── Followup & model answer accents ────────────────────────────────────── */
#followup-btn {
  color: var(--purple);
  border-color: rgba(191,90,242,0.4);
}
#followup-btn:hover:not(:disabled) {
  background: rgba(191,90,242,0.1);
  border-color: var(--purple);
}
.model-answer-panel { border-left: 3px solid var(--green) !important; }
.ma-label-tag { color: var(--green) !important; }

/* ── Overall score gradient for high scores ─────────────────────────────── */
.overall-number.score-strong {
  background: linear-gradient(135deg, var(--green), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Role category headers (setup wizard) ───────────────────────────────── */
.role-cat-hdr[data-cat="Technology"]    { color: var(--blue); }
.role-cat-hdr[data-cat="Finance"]       { color: var(--green); }
.role-cat-hdr[data-cat="Strategy"]      { color: var(--purple); }
.role-cat-hdr[data-cat="General"]       { color: var(--teal); }
.role-cat-hdr[data-cat="Public Sector"] { color: var(--amber); }

/* ── Score chip / label colour boost ────────────────────────────────────── */
.score-chip { font-weight: 700; }
.overall-verdict { font-weight: 700; }
.dim-label-badge { font-weight: 700; }

/* ── History analytics (charts + insights) ──────────────────────────────── */
.history-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-header h1 { flex: 1; }
.history-actions { display: flex; gap: 10px; }
.btn-danger-soft {
  background: rgba(239,68,68,0.10);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger-soft:hover:not(:disabled) {
  background: rgba(239,68,68,0.18);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (max-width: 900px) { .analytics-grid { grid-template-columns: 1fr; } }
.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.chart-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}
.chart-card canvas { width: 100% !important; height: 180px !important; }

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 24px;
}
@media (max-width: 700px) { .insight-grid { grid-template-columns: 1fr; } }
.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.insight-card.weakness { border-left-color: var(--red); }
.insight-card.strength { border-left-color: var(--green); }
.insight-card.difficulty { border-left-color: var(--amber); }
.insight-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.insight-text {
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.45;
}

.coaching-plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
#generate-plan-btn {
  background: var(--grad-135);
  color: var(--on-photo);
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.coaching-plan-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.coaching-plan-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.015em;
  flex: 1;
}
.coaching-plan-body { display: none; }
.coaching-plan-body.active { display: block; }
.cp-loading { color: var(--muted); font-size: 0.88rem; }
.cp-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cp-item:last-child { border-bottom: none; }
.cp-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-photo);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-text {
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  line-height: 1.5;
}

/* ── Confirm dialog (used by Clear History) ─────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-fade-in 200ms ease-out forwards;
}
.confirm-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--red);
  border-radius: 18px;
  padding: 24px 28px;
  width: 420px;
  max-width: 92vw;
  box-shadow: var(--shadow);
  animation: modal-enter 280ms var(--ease-drawer) forwards;
}
.start-plan-card {
  max-width: 430px;
}
.start-plan-card .confirm-actions {
  flex-wrap: wrap;
}
.confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.confirm-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}
.confirm-renewal {
  border-top: 1px solid var(--border);
  color: var(--amber);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: -8px 0 18px;
  padding-top: 12px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 480px) {
  .start-plan-card .confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .start-plan-card .confirm-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Gamified Image Cards — Mode picker & Type grid
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Mode grid for Standard / Resume Deep Dive / Custom / Live Test ─────── */
.mode-grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 480px) { .mode-grid { grid-template-columns: 1fr; } }

/* Image-card mode layout overrides */
.mode-card {
  padding: 0;
}
.mode-card-visual {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  height: 160px;
}
/* Per-mode gradient backgrounds */
.mode-card[data-mode="standard"] .mode-card-visual {
  background: linear-gradient(160deg, rgba(59,130,246,0.20) 0%, rgba(30,64,175,0.09) 100%);
}
.mode-card[data-mode="custom"] .mode-card-visual {
  background: linear-gradient(160deg, rgba(180,151,232,0.24) 0%, rgba(147,51,234,0.11) 100%);
}
.mode-card[data-mode="resume_deep_dive"] .mode-card-visual {
  background: linear-gradient(160deg, rgba(59,130,246,0.18) 0%, rgba(20,184,166,0.12) 100%);
}
.mode-card[data-mode="live_test"] .mode-card-visual {
  background: linear-gradient(160deg, rgba(16,185,129,0.22) 0%, rgba(5,150,105,0.09) 100%);
}
.mode-card-img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: auto;
  display: block;
  z-index: 1;
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), filter 300ms ease;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.14));
}
.mode-card:hover .mode-card-img {
  transform: translateX(-50%) translateY(-5px);
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.22));
}
.mode-card-vfade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to top, var(--card), transparent);
  z-index: 2;
  pointer-events: none;
}

/* Corner ribbon — Premium (Custom) and Live (Live Test) only */
.mode-card-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 68px;
  height: 68px;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
}
.mode-card-ribbon::before {
  content: attr(data-label);
  display: block;
  position: absolute;
  top: 14px;
  right: -24px;
  width: 96px;
  padding: 5px 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255,255,255,0.95);
  transform: rotate(45deg);
}
.mode-card[data-mode="custom"] .mode-card-ribbon::before {
  background: linear-gradient(135deg, rgba(139,92,246,0.92), rgba(109,40,217,0.88));
}
.mode-card[data-mode="live_test"] .mode-card-ribbon::before {
  background: linear-gradient(135deg, rgba(16,185,129,0.92), rgba(5,150,105,0.88));
}
.mode-card[data-mode="resume_deep_dive"] .mode-card-ribbon::before {
  background: linear-gradient(135deg, rgba(59,130,246,0.92), rgba(20,184,166,0.88));
}

.mode-card-body {
  padding: 16px 18px 20px;
}
.mode-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 6px;
}
.mode-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}
.mode-card-access {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
}
.mode-card.active .mode-card-access {
  color: var(--text);
}

/* Per-mode active overrides */
.mode-card[data-mode="custom"].active,
.mode-card.active.custom-mode-card {
  border-color: rgba(180,151,232,0.55);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(180,151,232,0.25), 0 4px 20px rgba(180,151,232,0.12);
}
.mode-card[data-mode="live_test"].active,
.mode-card.active.live-test-mode-card {
  border-color: rgba(16,185,129,0.55);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.25), 0 4px 20px rgba(16,185,129,0.12);
}
.mode-card[data-mode="resume_deep_dive"].active,
.mode-card.active.resume-deep-dive-mode-card {
  border-color: rgba(59,130,246,0.48);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(20,184,166,0.20), 0 4px 20px rgba(59,130,246,0.10);
}
/* Per-mode hover glow */
.mode-card[data-mode="custom"]:hover {
  border-color: rgba(180,151,232,0.40);
  box-shadow: 0 0 0 1px rgba(180,151,232,0.25), 0 8px 24px rgba(180,151,232,0.12);
}
.mode-card[data-mode="live_test"]:hover {
  border-color: rgba(16,185,129,0.38);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.22), 0 8px 24px rgba(16,185,129,0.10);
}
.mode-card[data-mode="resume_deep_dive"]:hover {
  border-color: rgba(59,130,246,0.36);
  box-shadow: 0 0 0 1px rgba(20,184,166,0.18), 0 8px 24px rgba(59,130,246,0.10);
}

/* ── Career Stage inline picker (Step 1) ────────────────────────────────── */
.cs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cs-label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.cs-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, color 160ms;
  white-space: nowrap;
}

.cs-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.cs-pill-active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  color: var(--blue);
}


/* ── JD Details step (Custom Mode — ws-2c) ───────────────────────────────── */
.jd-step-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.jd-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .jd-field-row { grid-template-columns: 1fr; } }
.jd-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.jd-field-label {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.015em;
}
.jd-input {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 160ms ease;
  box-sizing: border-box;
}
.jd-input:focus {
  outline: none;
  border-color: var(--blue);
}
.jd-input::placeholder { color: var(--muted); opacity: 0.7; }
.jd-textarea {
  min-height: 155px;
  resize: vertical;
  line-height: 1.5;
}
.jd-char-count {
  font-size: 0.71rem;
  color: var(--muted);
  text-align: right;
  margin-top: -8px;
}

/* ── Role Preparation Guide ─────────────────────────────────────────────── */
.prep-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prep-guide-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.prep-guide-loading > div:last-child { flex: 1; min-width: 0; }
.prep-guide-loading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}
.prep-loading-rail {
  position: relative;
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}
.prep-loading-rail span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  margin: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  animation: prepRail 1150ms cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
@keyframes prepRail {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(270%); }
}
.prep-spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  animation: spin 900ms linear infinite;
  flex-shrink: 0;
}
.prep-guide-error,
.prep-notice,
.prep-empty {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.prep-guide-error {
  border-color: rgba(239,68,68,0.35);
  color: #f87171;
  background: rgba(239,68,68,0.08);
}
.prep-summary-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.prep-summary-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  letter-spacing: 0;
  line-height: 1.3;
}
.prep-summary-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}
.prep-evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.prep-evidence-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.prep-dashboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prep-hero,
.prep-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.prep-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  min-height: 210px;
}
.prep-hero-copy {
  padding: 24px;
  min-width: 0;
}
.prep-hero h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.32rem;
  line-height: 1.25;
  letter-spacing: 0;
}
.prep-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 68ch;
}
.prep-focus-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.prep-focus-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
}
.prep-role-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 210px;
  background:
    radial-gradient(circle at 50% 24%, rgba(180,151,232,0.26), transparent 34%),
    linear-gradient(160deg, rgba(124,58,237,0.15), rgba(20,184,166,0.10));
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.prep-role-visual::after {
  content: "";
  position: absolute;
  inset: auto 18% 14px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  filter: blur(12px);
}
.prep-role-visual img {
  position: relative;
  z-index: 1;
  width: min(92%, 190px);
  max-height: 190px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,0.28));
}
.prep-panel {
  padding: 18px;
}
.prep-process-timeline,
.prep-study-map,
.prep-practice-pack,
.prep-resource-grid {
  position: relative;
}
.prep-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.prep-panel-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}
.prep-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.prep-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,0.025);
}
.prep-stage::after {
  content: "";
  position: absolute;
  top: 25px;
  left: 42px;
  right: -11px;
  height: 1px;
  background: linear-gradient(90deg, rgba(180,151,232,0.55), rgba(20,184,166,0.0));
}
.prep-stage:last-child::after { display: none; }
.prep-stage-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(180,151,232,0.16);
  border: 1px solid rgba(180,151,232,0.35);
  color: var(--purple-light);
  font-size: 0.78rem;
  font-weight: 800;
}
.prep-stage strong,
.prep-map-card h5 {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}
.prep-stage p,
.prep-map-card p,
.prep-resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.prep-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.prep-map-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,0.025);
}
.prep-map-card h5 {
  margin: 8px 0 5px;
}
.prep-map-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(180,151,232,0.95), rgba(20,184,166,0.72));
  box-shadow: 0 0 0 4px rgba(180,151,232,0.08);
}
.prep-mini-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.prep-mini-list li {
  position: relative;
  padding-left: 15px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
}
.prep-mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--teal);
}
.prep-practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 10px;
}
.prep-question-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prep-question-card,
.prep-grounded-card,
.prep-resource-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,0.025);
}
.prep-question-card {
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
}
.prep-grounded-card {
  padding: 14px;
}
.prep-grounded-card ol {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
}
.prep-resource-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.prep-resource-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
}
.prep-resource-card span {
  flex: 0 0 auto;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--purple), var(--teal));
  opacity: 0.85;
}
.prep-segmented-guide {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prep-segment-hero {
  min-height: 190px;
}
.prep-segment-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}
.prep-segment-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prep-segment-card h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.prep-segment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prep-segment-list li {
  position: relative;
  padding: 10px 12px 10px 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.prep-segment-list li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20,184,166,0.10);
}
.prep-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.prep-primary-cta,
.prep-secondary-cta {
  min-height: 38px;
}
.prep-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.prep-resource-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,0.025);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease-out, background 160ms ease-out, transform 160ms ease-out;
}
.prep-resource-link span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.prep-resource-link strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}
@media (hover: hover) and (pointer: fine) {
  .prep-resource-link:hover {
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.045);
    transform: translateY(-1px);
  }
}
.prep-resource-link:active,
.prep-primary-cta:active,
.prep-secondary-cta:active {
  transform: scale(0.98);
}
.report-accordion.prep-accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.report-accordion.prep-accordion[open] {
  background: var(--card-2, var(--card));
  border-color: var(--border-strong);
}
.report-accordion-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  user-select: none;
}
.report-accordion-summary::-webkit-details-marker { display: none; }
.report-accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.report-accordion-title::before {
  content: "›";
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 160ms ease;
}
.report-accordion[open] .report-accordion-title::before {
  transform: rotate(90deg);
}
.report-accordion-score {
  flex-shrink: 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
}
.report-accordion-body {
  padding: 0 14px 14px;
}
.prep-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.prep-list li,
.prep-source-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,0.025);
  color: var(--text);
  line-height: 1.45;
  font-size: 0.88rem;
}
.prep-list li {
  position: relative;
  padding-left: 30px;
}
.prep-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--purple-soft, var(--purple));
  box-shadow: 0 0 0 3px rgba(180,151,232,0.10);
}
.prep-evidence {
  margin-top: 14px;
}
.prep-evidence .report-accordion-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prep-evidence-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.prep-evidence-heading {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.prep-source-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.prep-source-item p {
  margin: 0;
  color: var(--muted);
}
.prep-source-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prep-source-company {
  border-color: var(--border);
  color: var(--text);
}
.prep-source-role {
  border-color: var(--border);
  color: var(--text);
}
.prep-source-jd {
  border-color: var(--border);
  color: var(--text);
}
.prep-source-general {
  border-color: var(--border);
  color: var(--muted);
}
.prep-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(8px);
}
.prep-modal-card {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.prep-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.prep-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
  .prep-loading-rail span,
  .prep-spinner {
    animation: none;
  }
}

@media (max-width: 760px) {
  .prep-hero {
    grid-template-columns: 1fr;
  }
  .prep-role-visual {
    min-height: 150px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .prep-role-visual img {
    max-height: 145px;
  }
  .prep-timeline,
  .prep-map-grid,
  .prep-practice-grid,
  .prep-resource-cards,
  .prep-link-grid {
    grid-template-columns: 1fr;
  }
  .prep-stage {
    min-height: auto;
  }
  .prep-stage::after {
    top: auto;
    left: 25px;
    right: auto;
    bottom: -11px;
    width: 1px;
    height: 12px;
    background: linear-gradient(180deg, rgba(180,151,232,0.55), rgba(20,184,166,0.0));
  }
}

/* ── Custom mode resume step hint ────────────────────────────────────────── */
.resume-required-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(191,90,242,0.08);
  border: 1px solid rgba(191,90,242,0.28);
  border-radius: 10px;
  font-size: 0.81rem;
  color: var(--purple-light);
  margin-bottom: 12px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 220ms ease, max-height 220ms ease;
  pointer-events: none;
}
.resume-required-hint.visible {
  opacity: 1;
  max-height: 56px;
  pointer-events: auto;
}

/* ── Question context/text split ────────────────────────────────────────── */
.q-context {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--card-2);
  border-left: 3px solid var(--border-strong);
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

.q-text {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.55;
}

.q-text-sm {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ── Summarising spinner ─────────────────────────────────────────────────── */
.summarising-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border, #e5e7eb);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 24px auto 0;
}


/* ── Resume inline editor ────────────────────────────────────────────────── */
.rp-edit-panel {
  margin-top: 14px;
  border-top: 1px solid var(--border, #e5e7eb);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rp-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.rp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.rp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.rp-add-btn {
  font-size: 0.78rem;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--card-3);
  color: var(--blue);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.rp-add-btn:hover { background: var(--blue); color: var(--on-photo); border-color: var(--blue); }

.rp-list { display: flex; flex-direction: column; gap: 5px; }

/* Work experience card — blue left accent, labeled fields */
.rp-exp-item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 11px 36px 11px 14px;
  transition: box-shadow 150ms, border-color 150ms;
}
.rp-exp-item:has(input:focus) {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-color: var(--border-strong);
  border-left-color: var(--blue);
}
.rp-exp-item .rp-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.rp-exp-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.rp-exp-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  margin-bottom: 2px;
  user-select: none;
}

.rp-exp-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.rp-exp-title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  width: 100%;
  min-width: 0;
}
.rp-exp-title:focus {
  outline: none;
  box-shadow: none;
}

.rp-exp-desc {
  font-family: var(--font);
  font-size: 0.80rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  width: 100%;
  min-width: 0;
}
.rp-exp-desc:focus {
  outline: none;
  box-shadow: none;
}
.rp-exp-desc::placeholder { color: var(--muted-2); }

/* Certification item — green left accent */
.rp-cert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 8px 8px 8px 12px;
  transition: box-shadow 150ms;
}
.rp-cert-item:has(input:focus) {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.rp-cert-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--green);
  opacity: 0.9;
}

.rp-cert-input {
  flex: 1;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  min-width: 0;
}
.rp-cert-input:focus {
  outline: none;
  box-shadow: none;
}

/* Generic single-line project / other item */
.rp-list-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rp-list-input {
  flex: 1;
  font-size: 0.85rem;
  font-family: var(--font);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--text);
  min-width: 0;
  transition: border-color 120ms, box-shadow 120ms;
}
.rp-list-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.22);
}

.rp-remove-btn {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: none;
  background: var(--card-3);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background 120ms, color 120ms;
}
.rp-remove-btn:hover { background: rgba(255,69,58,0.15); color: var(--red); }

.rp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  align-items: flex-start;
  align-content: flex-start;
}

.rp-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  background: rgba(124,58,237,0.14);
  color: var(--purple);
  border: 1px solid rgba(124,58,237,0.30);
  border-radius: 999px;
  white-space: nowrap;
}

.rp-chip-remove {
  border: none;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
  transition: opacity 100ms, color 100ms;
}
.rp-chip-remove:hover { opacity: 1; color: var(--red); }

.rp-tag-input {
  font-size: 0.85rem;
  font-family: var(--font);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 120ms, box-shadow 120ms;
}
.rp-tag-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.22);
}
.rp-tag-input::placeholder { color: var(--muted-2); }

/* ── Format step: segmented pill control ─────────────────────────────────── */
.seg-control {
  display: flex;
  gap: 4px;
  background: var(--card-2, #2a2a2e);
  border-radius: 12px;
  padding: 4px;
}
.seg-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms cubic-bezier(0.23, 1, 0.32, 1),
              color 160ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.seg-btn:active { transform: scale(0.97); }
.seg-btn.seg-active {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
/* ── Format step: style icon tiles ──────────────────────────────────────── */
.style-tiles {
  display: flex;
  gap: 10px;
}

.style-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background  160ms cubic-bezier(0.23, 1, 0.32, 1),
              transform   160ms cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow  160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.style-tile:active { transform: scale(0.97); }
.style-tile.style-tile-active {
  border-color: var(--purple);
  background: rgba(124,58,237,0.10);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.30);
}
.style-tile-icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
  transition: color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.style-tile.style-tile-active .style-tile-icon { color: var(--blue); }
.style-tile-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.style-tile-desc {
  font-size: 0.67rem;
  color: var(--muted);
  line-height: 1.3;
}

/* ── Format step: number tiles ───────────────────────────────────────────── */
.num-tiles {
  display: flex;
  gap: 10px;
}

.num-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background  160ms cubic-bezier(0.23, 1, 0.32, 1),
              transform   160ms cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow  160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.num-tile:active { transform: scale(0.97); }
.num-tile.num-tile-active {
  border-color: var(--purple);
  background: rgba(124,58,237,0.10);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.30);
}
.num-tile-number {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.num-tile.num-tile-active .num-tile-number { color: var(--purple); }
.num-tile-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════════════════════════════════════════
   AUTH — Login page + User chip
   ══════════════════════════════════════════════════════════════════════════════ */

/* Login page */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad-135);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}

.login-logo {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

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

/* ── Login tabs (Google / Email) ──────────────────────────── */
.login-tabs {
  display: flex;
  gap: 4px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  width: 100%;
}
.login-tab {
  flex: 1;
  padding: 8px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.login-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.login-tab-panel { width: 100%; }

.google-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  width: 100%;
  justify-content: center;
  transition: background 160ms ease-out, border-color 160ms ease-out;
  margin-top: 8px;
}

.google-btn:hover {
  background: var(--card-3);
  border-color: var(--border-strong);
  text-decoration: none;
}

.google-icon { width: 20px; height: 20px; flex-shrink: 0; }

.login-terms {
  font-size: 0.72rem;
  color: var(--muted-2);
  margin: 20px 0 0;
  line-height: 1.5;
}

.login-link { color: var(--purple); text-decoration: none; }
.login-link:hover { text-decoration: underline; }

.login-error {
  background: rgba(255,59,48,0.08);
  border: 1px solid rgba(255,59,48,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--red);
  margin-bottom: 12px;
  text-align: center;
}

.login-dev-notice {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.22);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--muted);
  width: 100%;
}

/* Navbar — user chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-right: 4px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-logout-btn {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--card-3);
  border: 1px solid var(--border-strong);
  transition: background 150ms, color 150ms;
  white-space: nowrap;
}

.user-logout-btn:hover {
  background: rgba(229,72,77,0.08);
  color: var(--red);
  border-color: rgba(229,72,77,0.25);
}

.ready-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-change-question {
  min-height: 44px;
  padding-inline: 18px;
  color: var(--muted);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.02);
}

.btn-change-question:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(180,151,232,0.34);
  background: rgba(180,151,232,0.08);
}

.skip-question-card {
  max-width: 520px;
}

.skip-reason-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 14px;
}

.skip-reason-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.skip-reason-option:hover {
  border-color: rgba(180,151,232,0.34);
  background: rgba(180,151,232,0.08);
}

.skip-reason-option input {
  accent-color: var(--purple);
  flex: 0 0 auto;
}

.skip-question-note {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--card-2);
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.45;
  outline: none;
}

.skip-question-note:focus {
  border-color: rgba(180,151,232,0.55);
  box-shadow: 0 0 0 3px rgba(180,151,232,0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Pricing Page
   ══════════════════════════════════════════════════════════════════════════ */
.pricing-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.pricing-hero {
  text-align: center;
  margin-bottom: 36px;
}
.pricing-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  margin-bottom: 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(180,151,232,0.28);
  background: rgba(180,151,232,0.08);
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.pricing-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.05;
}
.pricing-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}
.pricing-flash {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--green);
  margin-bottom: 24px;
  text-align: center;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 64px;
}
.pricing-grid-pro {
  align-items: stretch;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 680px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: var(--shadow-sm);
}
.pricing-card-pro {
  border-color: var(--purple);
  background:
    linear-gradient(180deg, rgba(180,151,232,0.08), transparent 42%),
    var(--card);
  box-shadow: 0 0 0 1px rgba(180,151,232,0.24), 0 18px 46px rgba(0,0,0,0.28);
}
.pro-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: var(--on-photo);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-plan-name {
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.tier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  width: max-content;
}
.tier-free { background: var(--card-2); color: var(--muted); border: 1px solid var(--border-strong); }
.tier-pro  { background: rgba(124,58,237,0.15); color: var(--purple); border: 1px solid rgba(124,58,237,0.30); }
.pricing-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.launch-sale-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 6px;
  border: 1px solid rgba(232,168,74,0.35);
  background: rgba(232,168,74,0.14);
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}
.price-display {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.price-amount {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.price-original {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: line-through;
  text-decoration-color: rgba(232,168,74,0.82);
  text-decoration-thickness: 2px;
}
.price-period { font-size: 0.9rem; color: var(--muted); }
.price-sale-note {
  color: var(--amber);
  font-size: 0.82rem;
  line-height: 1.4;
}
.price-annual-note {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-save-badge {
  background: rgba(44,169,76,0.15);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(44,169,76,0.25);
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.feature-item {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.feature-item::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
}
.feature-yes { color: var(--text); }
.feature-yes::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-no { color: var(--muted-2); }
.feature-no::before {
  content: '–';
  color: var(--muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pricing-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  margin-top: 20px;
  text-decoration: none;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}
.pricing-cta-group .pricing-cta { margin-top: 0; }
.pricing-cta-primary {
  background: var(--grad-135);
  color: var(--on-photo);
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.pricing-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.50);
}
.pricing-cta-current {
  background: var(--card-2);
  color: var(--muted);
  cursor: default;
  border: 1px solid var(--border);
}
.pricing-cta-secondary {
  background: transparent;
  color: var(--purple);
  border: 1px solid rgba(124,58,237,0.40);
}
.pricing-cta-pro {
  background: var(--grad-135);
  color: var(--on-photo);
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.pricing-cta-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.50);
}
.pricing-cta-annual {
  background: var(--card-2);
  color: var(--purple);
  border: 1px solid rgba(124,58,237,0.30);
}
.pricing-safe-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: -4px;
}
.pricing-manage-banner {
  max-width: 620px;
  margin: 0 auto 52px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(86,196,144,0.24);
  background: rgba(86,196,144,0.08);
  color: var(--text);
  text-align: center;
}
.pricing-manage-banner a {
  color: var(--green);
  font-weight: 700;
}
.save-chip {
  background: rgba(44,169,76,0.15);
  color: var(--green);
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
}
.pricing-manage-link {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  margin-top: 8px;
}

/* FAQ */
.pricing-faq { padding-top: 16px; }
.faq-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-align: center;
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 680px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.faq-q {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.faq-a {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Subscription Success Page
   ══════════════════════════════════════════════════════════════════════════ */
.sub-success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px;
}
.sub-success-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.sub-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(44,169,76,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--green);
}
.sub-success-icon svg { width: 28px; height: 28px; }
.sub-success-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.sub-success-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.sub-success-cta {
  display: inline-block;
  padding: 13px 32px;
  background: var(--grad-135);
  color: var(--on-photo);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(124,58,237,0.30);
}
.sub-success-note {
  font-size: 0.82rem;
  color: var(--muted-2);
  line-height: 1.5;
}
.sub-portal-link { color: var(--purple); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   Admin Dashboard
   ══════════════════════════════════════════════════════════════════════════ */
.admin-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: var(--card);
}
.admin-sidebar-brand,
.admin-nav-link,
.admin-mobile-brand,
.admin-mobile-link {
  text-decoration: none;
}
.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
}
.admin-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--purple);
  color: var(--on-photo);
  font-weight: 800;
}
.admin-brand-name,
.admin-brand-subtitle {
  display: block;
}
.admin-brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}
.admin-brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-nav {
  display: grid;
  gap: 6px;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: var(--card-2);
  color: var(--text);
}
.admin-signout-link {
  margin-top: auto;
  color: var(--red);
}
.admin-main {
  min-width: 0;
}
.admin-content {
  min-width: 0;
}
.admin-mobile-nav {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.admin-mobile-brand {
  color: var(--text);
  font-weight: 800;
}
.admin-mobile-links {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.admin-mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}
.admin-mobile-link:hover,
.admin-mobile-link.active {
  background: var(--card-2);
  color: var(--text);
}
.admin-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.admin-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.admin-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.admin-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(229,72,77,0.12);
  color: var(--red);
  border: 1px solid rgba(229,72,77,0.25);
  padding: 3px 10px;
  border-radius: 999px;
}
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
@media (max-width: 900px) { .admin-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.admin-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.admin-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.admin-kpi-card.kpi-accent-green { border-left: 3px solid var(--green); }
.admin-kpi-card.kpi-accent-purple { border-left: 3px solid var(--purple); }
.admin-kpi-card.kpi-accent-amber  { border-left: 3px solid var(--amber); }
.admin-kpi-card.kpi-accent-red    { border-left: 3px solid var(--red); }
.admin-kpi-card .kpi-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 6px;
}
.admin-kpi-card .kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.admin-section { margin-bottom: 40px; }
.admin-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.admin-count { font-size: 0.82rem; font-weight: 400; color: var(--muted); }
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: var(--card-2);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.admin-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--card-2); }
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.admin-email { color: var(--muted); font-size: 0.83rem; }
.admin-num   { text-align: right; font-variant-numeric: tabular-nums; }
.admin-date  { color: var(--muted); font-size: 0.83rem; white-space: nowrap; }
.admin-empty { text-align: center; color: var(--muted); padding: 24px; }
.admin-tier-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
}
.admin-tier-free { background: var(--card-2); color: var(--muted); }
.admin-tier-pro  { background: rgba(124,58,237,0.15); color: var(--purple); }
.admin-tier-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-tier-select {
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
}
.admin-set-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--card-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms;
}
.admin-set-btn:hover { background: rgba(124,58,237,0.15); color: var(--purple); }
.admin-kpi-grid-wide { grid-template-columns: repeat(5, 1fr); }
.admin-users-table { min-width: 1280px; }
.admin-row-banned td { background: rgba(229,72,77,0.04); }
.admin-user-name { font-weight: 700; color: var(--text); }
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-status-active { color: var(--green); background: rgba(45,122,84,0.12); }
.admin-status-approved { color: var(--green); background: rgba(45,122,84,0.12); }
.admin-status-draft { color: var(--amber); background: rgba(232,168,74,0.14); }
.admin-status-archived { color: var(--muted); background: var(--card-2); }
.admin-status-banned { color: var(--red); background: rgba(229,72,77,0.12); }
.admin-ban-reason {
  max-width: 180px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}
.admin-action-form,
.admin-ban-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-ban-input {
  width: 130px;
  font-size: 0.78rem;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.admin-ban-btn:hover { background: rgba(229,72,77,0.15); color: var(--red); }
.admin-forgive-btn:hover { background: rgba(45,122,84,0.15); color: var(--green); }
.admin-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-notice {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
}
.admin-notice-error {
  border-color: #f3b7b7;
  background: #fff5f5;
  color: #8a1f1f;
}
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-input,
.admin-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
}
.admin-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.admin-field-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.admin-textarea {
  resize: vertical;
  min-height: 120px;
}
.admin-intel-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-intel-form .admin-field-wide,
.admin-intel-form .admin-primary-btn,
.admin-intel-edit-form .admin-intel-meta {
  grid-column: 1 / -1;
}
.admin-primary-btn {
  justify-self: start;
  background: rgba(124,58,237,0.12);
  color: var(--purple);
}
.admin-filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-filter-input {
  width: 180px;
}
.admin-intel-list {
  display: grid;
  gap: 12px;
}
.admin-intel-entry {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 12px;
}
.admin-intel-entry summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.admin-intel-entry summary::-webkit-details-marker { display: none; }
.admin-intel-title {
  font-weight: 700;
  color: var(--text);
}
.admin-intel-edit-form {
  margin-top: 14px;
}
.admin-intel-meta {
  color: var(--muted);
  font-size: 0.86rem;
}
.admin-data-page {
  max-width: 1440px;
}
.admin-data-map-table {
  min-width: 1180px;
}
.admin-data-pill {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 24px;
  margin: 2px 4px 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}
.admin-data-pill-warn {
  background: rgba(232,168,74,0.14);
  color: var(--amber);
}
.admin-muted {
  color: var(--muted);
  font-size: 0.82rem;
}
.admin-data-table-list {
  display: grid;
  gap: 12px;
}
.admin-data-entry summary {
  min-height: 34px;
}
.admin-data-detail {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.admin-data-purpose {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.admin-data-record {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
}
.admin-data-field {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: var(--card);
}
.admin-data-field.is-redacted {
  border: 1px solid rgba(232,168,74,0.25);
}
.admin-data-key {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-data-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}
@media (max-width: 900px) {
  .admin-shell {
    display: block;
  }
  .admin-sidebar {
    display: none;
  }
  .admin-mobile-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    gap: 10px;
    padding: 12px 16px;
  }
  .admin-page {
    padding: 28px 16px 70px;
  }
  .admin-data-record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-intel-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .admin-intel-form,
  .admin-filter-form { display: grid; grid-template-columns: 1fr; }
  .admin-filter-input { width: 100%; }
  .admin-data-record { grid-template-columns: 1fr; }
}

/* Account suspended page */
.banned-page {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.banned-panel {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.banned-kicker {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.banned-panel h1 {
  font-size: 1.65rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.banned-panel p {
  color: var(--muted);
  line-height: 1.65;
}
.banned-reason {
  margin: 22px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  border: 1px solid var(--border);
}
.banned-reason span,
.banned-account {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}
.banned-reason strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}
.banned-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
@media (max-width: 900px) { .admin-kpi-grid-wide { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .admin-kpi-grid-wide { grid-template-columns: repeat(2, 1fr); } }

/* ── Persona selection cards ────────────────────────────────────────────── */
.persona-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.persona-card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  min-height: 145px;
  transition: border-color 200ms var(--ease-out-strong),
              background   200ms var(--ease-out-strong),
              box-shadow   200ms ease;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .persona-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  }
}
.persona-card:active { transform: scale(0.99); }
.persona-card.active {
  border-color: var(--purple);
  background: rgba(124,58,237,0.07);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.28);
}
.persona-card-left {
  flex: 1;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.persona-card-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(124,58,237,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
  margin-bottom: 4px;
}
.persona-card-icon svg { width: 18px; height: 18px; }
.persona-card-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}
.persona-card-bullets {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.persona-card-bullets li {
  font-size: 0.76rem;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}
.persona-card-bullets li::before {
  content: '•';
  position: absolute; left: 2px;
  color: var(--purple-soft);
}
.persona-card-img-wrap {
  width: 260px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-2);
}
.persona-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
}
@media (prefers-reduced-motion: reduce) {
  .persona-card { transition-duration: 0ms !important; }
}
/* Per-stage icon colours */
.persona-card[data-stage="student"]   .persona-card-icon { background: rgba(124,58,237,0.14); color: var(--purple); }
.persona-card[data-stage="graduate"]  .persona-card-icon { background: rgba(59,130,246,0.14);  color: var(--blue); }
.persona-card[data-stage="midcareer"] .persona-card-icon { background: rgba(5,150,105,0.14);   color: var(--green); }
/* Per-stage active border */
.persona-card[data-stage="student"].active   { border-color: var(--purple); background: rgba(124,58,237,0.06); box-shadow: 0 0 0 1px rgba(124,58,237,0.22); }
.persona-card[data-stage="graduate"].active  { border-color: var(--blue);   background: rgba(59,130,246,0.06);  box-shadow: 0 0 0 1px rgba(59,130,246,0.22); }
.persona-card[data-stage="midcareer"].active { border-color: var(--green);  background: rgba(5,150,105,0.06);   box-shadow: 0 0 0 1px rgba(5,150,105,0.22); }

.setup-quota-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(232,168,74,0.34);
  border-radius: 10px;
  background: rgba(232,168,74,0.08);
}
.setup-quota-main {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}
.setup-quota-sub {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.setup-quota-link {
  grid-row: 1 / span 2;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.setup-quota-link:hover { text-decoration: underline; }
.setup-quota-pro {
  position: relative;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px 12px 46px;
  border-color: rgba(180,151,232,0.34);
  background:
    linear-gradient(135deg, rgba(180,151,232,0.13), rgba(90,200,232,0.07)),
    rgba(255,255,255,0.025);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.setup-quota-pro::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(86,196,144,0.16);
  border: 1px solid rgba(86,196,144,0.32);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}
.setup-quota-pro .setup-quota-main {
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0;
}
.setup-quota-pro .setup-quota-sub {
  display: none;
}
.setup-quota-pro .setup-quota-link {
  display: none !important;
}
@media (max-width: 620px) {
  .setup-quota-banner { grid-template-columns: 1fr; }
  .setup-quota-link { grid-row: auto; }
}

/* ── Difficulty selection cards ─────────────────────────────────────────── */
.difficulty-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.difficulty-card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  min-height: 115px;
  transition: border-color 200ms var(--ease-out-strong),
              background   200ms var(--ease-out-strong),
              box-shadow   200ms ease;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .difficulty-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  }
}
.difficulty-card:active { transform: scale(0.99); }
.difficulty-card.active {
  border-color: var(--purple);
  background: rgba(124,58,237,0.07);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.28);
}
.difficulty-card-left {
  flex: 1;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: flex-start;
}
.difficulty-badge-easy   { background: rgba(5,150,105,0.15);  color: var(--green); }
.difficulty-badge-medium { background: rgba(217,119,6,0.15);  color: var(--amber); }
.difficulty-badge-hard   { background: rgba(220,38,38,0.15);  color: var(--red);   }
.difficulty-card-desc {
  font-size: 0.80rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 320px;
}
.difficulty-card-img-wrap {
  width: 185px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-2);
}
.difficulty-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .difficulty-card { transition-duration: 0ms !important; }
}
/* Per-value active state colours */
.difficulty-card[data-value="easy"].active   { border-color: var(--green); background: rgba(5,150,105,0.05);  box-shadow: 0 0 0 1px rgba(5,150,105,0.22); }
.difficulty-card[data-value="medium"].active { border-color: var(--amber); background: rgba(217,119,6,0.05);  box-shadow: 0 0 0 1px rgba(217,119,6,0.22); }
.difficulty-card[data-value="hard"].active   { border-color: var(--red);   background: rgba(220,38,38,0.05);  box-shadow: 0 0 0 1px rgba(220,38,38,0.22); }

/* ── Step 1 footer with back + right group ──────────────────────────────── */
.ws-foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Profile dropdown ───────────────────────────────────────────────────── */
.nav-profile { position: relative; }

.profile-trigger {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card-2);
  cursor: pointer;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 150ms ease, background 150ms ease;
}
.profile-trigger:hover { border-color: var(--border-strong); background: var(--card-3); }

.profile-avatar, .profile-avatar-init {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.profile-avatar-init {
  background: var(--grad-135);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.profile-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-chevron {
  width: 10px; height: 6px;
  color: var(--muted);
  transition: transform 180ms var(--ease-out-strong);
  flex-shrink: 0;
}
.nav-profile.open .profile-chevron { transform: rotate(180deg); }

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: dropdownFadeIn 140ms var(--ease-out-strong) both;
}
.nav-profile.open .profile-dropdown { display: block; }

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.pd-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px;
}
.pd-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pd-info   { flex: 1; min-width: 0; }
.pd-name   { font-size: 0.82rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-email  { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-plan {
  font-size: 0.60rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 2px 7px; border-radius: 5px; flex-shrink: 0;
  background: rgba(99,102,241,0.14); color: var(--blue);
}
.pd-plan-pro { background: rgba(124,58,237,0.18); color: var(--purple-soft); }

.pd-quota-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  width: 100%;
}
.pd-quota-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
}

.pd-preferred-row {
  padding: 8px 0 4px;
}

.pd-preferred-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}

.pd-preferred-edit {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pd-preferred-input {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg, var(--surface-1, var(--bg)));
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
  min-width: 0;
}

.pd-preferred-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow, rgba(99,102,241,0.2));
}

.pd-preferred-save-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.pd-preferred-save-btn:hover {
  opacity: 0.88;
}

.pd-preferred-save-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pd-divider { height: 1px; background: var(--border); margin: 2px 0; }

.pd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: 0.82rem; color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 130ms ease, color 130ms ease;
}
.pd-item:hover { background: var(--card-2); text-decoration: none; }
.pd-item svg   { color: var(--muted); flex-shrink: 0; }
.pd-item-danger       { color: var(--red); }
.pd-item-danger:hover { background: rgba(220,38,38,0.08); color: var(--red); }
.pd-item-danger svg   { color: var(--red); }

/* ── Upgrade prompt banner (injected by JS when quota exceeded) ──────────── */
.upgrade-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid rgba(124,58,237,0.40);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 9100;
  max-width: 480px;
  width: calc(100vw - 40px);
  animation: banner-rise 280ms var(--ease-drawer) forwards;
}
@keyframes banner-rise {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.upgrade-banner-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}
.upgrade-banner-cta {
  flex-shrink: 0;
  background: var(--grad-135);
  color: var(--on-photo);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Filler analysis badge on session feedback ───────────────────────────── */
.filler-analysis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber);
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: 999px;
  padding: 3px 10px;
}
.filler-analysis-badge.ready {
  color: var(--green);
  background: rgba(44,169,76,0.1);
  border-color: rgba(44,169,76,0.25);
}

/* ── Body Language Panel ─────────────────────────────────── */
.ready-body-lang,
.rec-body-lang,
.body-lang-panel {
  display: none;
}

.body-lang-panel {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}
.bl-row { display: flex; flex-direction: column; gap: 10px; }
.bl-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  transition: background 0.2s;
}
.bl-metric.good { background: rgba(52,199,89,0.08); border: 1px solid rgba(52,199,89,0.2); }
.bl-metric.warn { background: rgba(255,159,10,0.08); border: 1px solid rgba(255,159,10,0.2); }
.bl-metric.bad  { background: rgba(255,59,48,0.08);  border: 1px solid rgba(255,59,48,0.2); }
.bl-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.bl-metric-text { display: flex; flex-direction: column; line-height: 1.2; }
.bl-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.bl-value { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.bl-warning {
  font-size: 0.78rem;
  color: var(--amber);
  background: rgba(255,159,10,0.08);
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,159,10,0.2);
}

/* ── Redesigned Ready State ──────────────────────────────── */
.ready-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
}
.ready-top-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
}
.ready-camera-wrap {
  flex: 1;
  min-width: 0;
}
.ready-camera-wrap .camera-box {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #000;
  position: relative;
}
.ready-camera-wrap .camera-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.ready-body-lang {
  flex: 0 0 200px;
}
.ready-bottom-row {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

/* ── Recording State: Full-screen split layout ───────────── */
.recording-layout {
  display: grid;
  grid-template-columns: 55fr 45fr;
  height: calc(100vh - 52px);
  overflow: hidden;
}
/* Left column: camera + body language */
.rec-left-col {
  display: flex;
  flex-direction: column;
  background: #000;
  padding: 14px;
  gap: 10px;
  overflow: hidden;
}
.rec-top-row {
  display: contents; /* children go directly into rec-left-col flow */
}
.rec-camera-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rec-camera-wrap .camera-box {
  flex: 1;
  width: 100%;
  max-width: none;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: auto;
  background: #111;
  position: relative;
  min-height: 0;
}
.rec-camera-wrap .camera-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.rec-camera-wrap .rec-timer-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.rec-camera-wrap .rec-progress-wrap {
  margin-top: 4px;
}
.rec-body-lang {
  flex: 0 0 auto;
}
/* Right column: question, transcript, scores, controls */
.rec-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px 24px;
  overflow-y: auto;
  background: var(--bg);
}
@media (max-width: 768px) {
  .recording-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .rec-left-col {
    background: #000;
    padding: 10px;
  }
  .rec-camera-wrap .camera-box {
    aspect-ratio: 4/3;
    height: auto;
  }
  .rec-main {
    padding: 16px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESUME HUB  —  landing · analysis · optimizer
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Shared page shell ──────────────────────────────────────────────────────── */
.ra-page, .ro-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  padding-top: 60px;
  background: var(--bg);
}

/* ── Shared toolbar ─────────────────────────────────────────────────────────── */
.ra-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ra-toolbar-left  { display: flex; align-items: center; gap: 14px; }
.ra-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ra-back-link { font-size: 0.82rem; color: var(--muted); text-decoration: none; transition: color 140ms; }
.ra-back-link:hover { color: var(--text); }
.ra-toolbar-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.ra-filename { font-size: 0.75rem; color: var(--muted); display: block; margin-top: 1px; }

.quota-badge { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.quota-free  { background: rgba(107,79,173,0.12); color: var(--purple); border: 1px solid rgba(107,79,173,0.25); }
.quota-used  { background: rgba(184,50,50,0.10); color: var(--red); border: 1px solid rgba(184,50,50,0.22); }
.quota-used a { color: inherit; text-decoration: underline; }

.ra-toolbar-title-block { display: flex; flex-direction: column; gap: 1px; }

/* ── Progress bar ───────────────────────────────────────────────────────────── */
.ra-progress-bar {
  height: 2px;
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.ra-progress-fill {
  height: 100%;
  background: var(--purple);
  width: 0%;
  transition: width 0.25s ease;
}

/* ── Resume Hub landing ──────────────────────────────────────────────────────── */
.rh-landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 52px 24px 60px;
  gap: 36px;
}
.rh-hero { text-align: center; max-width: 600px; }
.rh-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.rh-hero h1 {
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.rh-hero p  { font-size: 0.91rem; color: var(--muted); line-height: 1.65; max-width: 480px; margin: 0 auto; }

.rh-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 960px;
  width: 100%;
}
.rh-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 200ms, box-shadow 200ms, transform 250ms var(--ease-out-strong);
}
.rh-card:hover { border-color: var(--purple); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.rh-card:active { transform: scale(0.98); transition-duration: 80ms; }
.rh-card.rh-pro { border-color: rgba(107,79,173,0.28); }
.rh-card.rh-harvard { border-color: rgba(184,50,50,0.22); }
.rh-card.rh-harvard:hover { border-color: #b83232; }

.rh-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rh-card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(180,151,232,0.14) 0%, rgba(78,136,196,0.08) 100%);
  border: 1px solid rgba(180,151,232,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
}
.rh-icon-pro {
  background: linear-gradient(135deg, rgba(124,92,191,0.22) 0%, rgba(78,136,196,0.14) 100%);
  border-color: rgba(124,92,191,0.32);
}
.rh-pro-badge {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #7c5cbf 0%, #4d88c4 100%);
  color: #fff;
  flex-shrink: 0;
}
.rh-card-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.rh-title-muted { color: var(--muted); font-weight: 600; }
.rh-card-desc  { font-size: 0.82rem; color: var(--muted); line-height: 1.55; flex: 1; }

.rh-card-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rh-card-features li { font-size: 0.78rem; color: var(--muted); padding-left: 16px; position: relative; line-height: 1.4; }
.rh-card-features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; font-size: 0.72rem; }
.rh-pro .rh-card-features li::before { content: '◆'; color: var(--purple); font-size: 0.55rem; top: 3px; }

.rh-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.rh-quota       { font-size: 0.72rem; color: var(--muted); line-height: 1.55; }
.rh-quota strong { color: var(--text); font-weight: 600; }
.rh-quota-warn  { color: var(--amber); }
.rh-cta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8rem; font-weight: 600; color: var(--purple);
  white-space: nowrap;
}
.rh-flow-cards { align-items: stretch; }
.rh-saved {
  width: 100%;
  max-width: 960px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.rh-saved-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.rh-saved-head h2 { margin: 0 0 4px; font-size: 1rem; color: var(--text); }
.rh-saved-head p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.rh-resume-list { display: flex; flex-direction: column; gap: 8px; }
.rh-resume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
}
.rh-resume-name { font-size: 0.9rem; font-weight: 650; color: var(--text); }
.rh-resume-meta { margin-top: 2px; color: var(--muted); font-size: 0.74rem; }
.rh-resume-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rh-empty-saved {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--card-2);
}
.rh-empty-saved h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--text); }
.rh-empty-saved p { margin: 0; max-width: 460px; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.rh-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

@media (max-width: 860px) {
  .rh-cards { grid-template-columns: 1fr 1fr; }
  .rh-resume-row { align-items: flex-start; flex-direction: column; }
  .rh-resume-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .rh-cards { grid-template-columns: 1fr; }
  .rh-landing { padding: 36px 16px 48px; }
  .rh-saved-head { flex-direction: column; }
}

/* ── Two-pane workspace ──────────────────────────────────────────────────────── */
.ra-content {
  display: grid;
  grid-template-columns: 1fr 6px 360px;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 104px);
}
.ra-left {
  overflow-y: auto;
  padding: 24px 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Upload empty state (inside the two-pane left) */
.ra-empty {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  gap: 14px;
  align-self: center;
  justify-self: center;
  margin: auto;
  min-height: clamp(420px, calc(100dvh - 248px), 720px);
  justify-content: center;
  transform: translateY(-2vh);
}
.ra-empty-icon { width: 60px; height: 60px; color: var(--muted); opacity: 0.4; }
.ra-empty-icon svg { width: 100%; height: 100%; }
.ra-empty h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 0; }
.ra-empty p  { font-size: 0.87rem; color: var(--muted); max-width: 400px; line-height: 1.55; margin: 0; }
.ra-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ra-empty-pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ra-pill { font-size: 0.71rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.ra-selector-row { padding-left: 20px; padding-right: 20px; }
.ra-editor-controls {
  width: 100%;
  max-width: 740px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 110px;
  gap: 10px;
  margin-bottom: 12px;
}
.ra-editor-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.ra-editor-controls input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.84rem;
}
.ra-editor-controls input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(107,79,173,0.12);
}

/* ── Harvard resume paper ────────────────────────────────────────────────────── */
/*
  US Letter 8.5in × 11in at 96dpi = 816 × 1056px
  Content with 0.5in margins: 720 × 960px
*/
.ra-paper {
  background: #fff;
  color: #111;
  width: 100%;
  max-width: 740px;
  min-height: 960px;
  padding: 44px 52px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.13), 0 1px 3px rgba(0,0,0,0.06);
  font-family: 'Times New Roman', Times, Georgia, serif;
  font-size: 10.5pt;
  line-height: 1.32;
  position: relative;
}
.ra-paper { box-shadow: 0 4px 48px rgba(0,0,0,0.55); }

.ra-paper-header {
  text-align: center;
  margin-bottom: 7pt;
  padding-bottom: 5pt;
  border-bottom: 1pt solid #111;
}
.ra-name {
  font-size: 15pt;
  font-weight: 700;
  font-family: 'Times New Roman', Times, Georgia, serif;
  text-align: center;
  color: #111;
  outline: none;
  border-radius: 2px;
  padding: 1px 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  min-height: 1.3em;
}
.ra-name:focus { background: rgba(107,79,173,0.06); }
.ra-contact {
  font-size: 9pt;
  color: #333;
  text-align: center;
  margin-top: 2pt;
  outline: none;
  border-radius: 2px;
  padding: 1px 3px;
  display: block;
  font-family: 'Times New Roman', Times, Georgia, serif;
}
.ra-contact:focus { background: rgba(107,79,173,0.06); }
.ra-placeholder { color: #aaa; font-style: italic; }

/* Sections */
.ra-paper-section {
  margin-bottom: 7pt;
  border-left: 2px solid transparent;
  padding-left: 0;
  transition: border-color 200ms, background 200ms, padding-left 200ms;
}
.ra-paper-section.ra-sec-score-green { border-left-color: var(--green); padding-left: 7px; background: rgba(45,122,84,0.03); border-radius: 0 3px 3px 0; }
.ra-paper-section.ra-sec-score-amber { border-left-color: var(--amber); padding-left: 7px; background: rgba(181,110,24,0.03); border-radius: 0 3px 3px 0; }
.ra-paper-section.ra-sec-score-red   { border-left-color: var(--red);   padding-left: 7px; background: rgba(184,50,50,0.03);  border-radius: 0 3px 3px 0; }

.ra-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4pt; }
.ra-section-title {
  font-size: 9pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #111;
  font-family: 'Times New Roman', Times, serif;
  flex: 1;
  padding-bottom: 2pt;
  border-bottom: 0.75pt solid #111;
}
.ra-section-score-chip {
  font-size: 0.67rem; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  font-family: 'Inter', sans-serif; margin-left: 8px; flex-shrink: 0;
}
.ra-section-score-chip.score-green { background: rgba(45,122,84,0.13); color: var(--green); }
.ra-section-score-chip.score-amber { background: rgba(181,110,24,0.13); color: var(--amber); }
.ra-section-score-chip.score-red   { background: rgba(184,50,50,0.13); color: var(--red); }

/* Editable areas inside the paper */
.ra-section-body, .ra-skills-body,
.ra-entry-title, .ra-entry-org, .ra-entry-dates, .ra-entry-desc {
  outline: none;
  border-radius: 2px;
  padding: 0 2px;
  font-family: 'Times New Roman', Times, Georgia, serif;
  color: #111;
}
.ra-section-body, .ra-skills-body {
  font-size: 10.5pt;
  line-height: 1.32;
  display: block;
  min-height: 1.2em;
}
.ra-section-body:focus, .ra-skills-body:focus,
.ra-entry-title:focus, .ra-entry-org:focus, .ra-entry-dates:focus, .ra-entry-desc:focus {
  background: rgba(107,79,173,0.05);
}

/* Entry rows */
.ra-entry { margin-bottom: 5pt; }
.ra-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;   /* dates MUST stay on same line */
}
.ra-entry-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.ra-entry-title { font-weight: 700; font-size: 10.5pt; min-width: 0; }
.ra-entry-sep   { color: #777; font-size: 10.5pt; flex-shrink: 0; }
.ra-entry-org   { font-style: italic; font-size: 10.5pt; min-width: 0; }
.ra-entry-dates { font-size: 10pt; white-space: nowrap; flex-shrink: 0; margin-left: auto; padding-left: 6px; }

/* Bullet list inside entries */
.ra-bullets-list { margin-top: 2pt; }
.ra-bullet {
  font-size: 10.5pt;
  font-family: 'Times New Roman', Times, Georgia, serif;
  line-height: 1.32;
  color: #111;
  outline: none;
  border-radius: 2px;
  padding: 0 2px;
  display: block;
  min-height: 1em;
  position: relative;
  padding-left: 12px;
}
.ra-bullet::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: #111;
}
.ra-bullet:focus { background: rgba(107,79,173,0.05); }
/* Legacy desc field */
.ra-entry-desc  { font-size: 10.5pt; line-height: 1.32; margin-top: 2pt; display: block; min-height: 1em; }

.ra-add-entry-btn {
  font-size: 0.71rem; color: var(--purple);
  background: none; border: 1px dashed rgba(107,79,173,0.32);
  border-radius: 4px; padding: 3px 9px; cursor: pointer;
  margin-top: 4px; opacity: 0.65; transition: opacity 150ms;
  font-family: 'Inter', sans-serif;
}
.ra-add-entry-btn:hover { opacity: 1; }

/* ── Drag divider ────────────────────────────────────────────────────────────── */
.ra-divider {
  width: 6px;
  background: transparent;
  cursor: col-resize;
  position: relative;
  flex-shrink: 0;
  transition: background 150ms;
  z-index: 10;
}
.ra-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: var(--border);
  border-radius: 2px;
  transition: background 150ms, height 150ms;
}
.ra-divider:hover::after, .ra-divider:active::after {
  background: var(--purple);
  height: 60px;
}

/* ── Right feedback panel ────────────────────────────────────────────────────── */
.ra-right {
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Panel states */
.ra-feedback-loading {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 32px; text-align: center;
}
.ra-feedback-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px 24px; gap: 12px; text-align: center;
}
.ra-feedback-empty-icon { font-size: 2rem; color: var(--muted); opacity: 0.4; }
.ra-feedback-empty h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin: 0; }
.ra-feedback-empty p  { font-size: 0.81rem; color: var(--muted); line-height: 1.5; max-width: 250px; margin: 0; }
.ra-feature-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.ra-feature-list li { font-size: 0.78rem; color: var(--muted); padding: 3px 0 3px 17px; position: relative; }
.ra-feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; font-size: 0.71rem; }
.ra-feedback-results { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.ra-analysis-header { font-size: 0.86rem; font-weight: 700; color: var(--text); padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.ra-overall-verdict { font-size: 0.77rem; color: var(--muted); line-height: 1.5; text-align: center; padding: 0 6px; }
.ra-spinner {
  width: 30px; height: 30px;
  border: 2.5px solid var(--border); border-top-color: var(--purple);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.ra-loading-sub { font-size: 0.77rem; color: var(--muted); }

/* Dual rings */
.ra-dual-rings { display: flex; justify-content: center; gap: 24px; padding: 14px 0 6px; }
.ra-ring-block { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ra-ring-label { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: center; }
.ra-overall-ring { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.ra-ring-svg { width: 100%; height: 100%; }
.ra-ring-bg   { stroke: var(--border); fill: none; }
.ra-ring-fill, .ring-fill { fill: none; stroke: var(--purple); transition: stroke-dashoffset 1s ease, stroke 0.3s; }
.ra-ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ra-ring-num   { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.ra-ring-pct   { font-size: 0.6rem; color: var(--muted); margin-top: 1px; }

/* Top 3 actions */
.ra-top-actions { padding-top: 10px; border-top: 1px solid var(--border); }
.ra-top-actions-title { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 7px; }
.ra-top-action { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 5px; font-size: 0.79rem; color: var(--text); line-height: 1.4; }
.ra-action-num { flex-shrink: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 0.6rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

/* Section score cards */
.ra-sections-list { display: flex; flex-direction: column; gap: 5px; }
.ra-section-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; background: var(--bg);
  transition: border-color 140ms, background 140ms, transform 140ms;
}
.ra-section-card:hover { border-color: var(--purple); background: rgba(107,79,173,0.04); transform: translateX(2px); }
.ra-section-card.active { border-color: var(--purple); background: rgba(107,79,173,0.06); }
.ra-section-card.ra-card-green { border-left: 3px solid var(--green); }
.ra-section-card.ra-card-amber { border-left: 3px solid var(--amber); }
.ra-section-card.ra-card-red   { border-left: 3px solid var(--red); }
.ra-section-card-left  { display: flex; flex-direction: column; gap: 1px; }
.ra-section-card-name  { font-size: 0.83rem; font-weight: 600; color: var(--text); }
.ra-section-card-issues { font-size: 0.69rem; color: var(--muted); }
.ra-section-card-right { display: flex; align-items: baseline; gap: 2px; }
.ra-section-card-score { font-size: 0.92rem; font-weight: 800; }
.ra-section-card-score.score-green { color: var(--green); }
.ra-section-card-score.score-amber { color: var(--amber); }
.ra-section-card-score.score-red   { color: var(--red); }
.ra-section-card-denom { font-size: 0.67rem; color: var(--muted); }
.ra-section-card-arrow { color: var(--muted); margin-left: 4px; }

/* Detail drawer */
.ra-detail-panel { background: var(--card-2); border-radius: 9px; border: 1px solid var(--border); overflow: hidden; }
.ra-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; border-bottom: 1px solid var(--border); }
.ra-detail-title  { font-size: 0.83rem; font-weight: 700; color: var(--text); }
.ra-detail-score  { font-size: 0.77rem; color: var(--muted); font-weight: 600; }
.ra-detail-score.score-green { color: var(--green); }
.ra-detail-score.score-amber { color: var(--amber); }
.ra-detail-score.score-red   { color: var(--red); }
.ra-detail-body  { padding: 11px 13px; display: flex; flex-direction: column; gap: 11px; }
.ra-detail-group { display: flex; flex-direction: column; gap: 6px; }
.ra-detail-group-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 4px; }
.ra-group-green { color: var(--green); }
.ra-group-amber { color: var(--amber); }
.ra-group-red   { color: var(--red); }
.ra-detail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ra-detail-list li { font-size: 0.79rem; color: var(--text); padding-left: 12px; position: relative; line-height: 1.4; }
.ra-detail-list li::before { content: '·'; position: absolute; left: 3px; color: var(--muted); }

.ra-improvements-list { display: flex; flex-direction: column; gap: 6px; }
.ra-improvement-item { background: var(--card); border-radius: 6px; padding: 8px 10px; border-left: 2.5px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.ra-prio-critical, .ra-prio-high   { border-left-color: var(--red); }
.ra-prio-major,    .ra-prio-medium  { border-left-color: var(--amber); }
.ra-prio-minor,    .ra-prio-low     { border-left-color: var(--green); }
.ra-imp-issue { font-size: 0.79rem; font-weight: 600; color: var(--text); }
.ra-imp-why   { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }
.ra-imp-fix-wrap { display: flex; flex-direction: column; gap: 5px; }
.ra-imp-fix {
  font-size: 0.77rem; color: var(--text); line-height: 1.4;
  background: rgba(107,79,173,0.06); border-radius: 4px;
  padding: 5px 8px; border-left: 2px solid var(--purple);
}
.ra-copy-fix-btn {
  align-self: flex-start;
  font-size: 0.71rem; font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid var(--purple);
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  font-family: var(--font);
  transition: background 140ms, color 140ms;
}
.ra-copy-fix-btn:hover { background: var(--purple); color: #fff; }
.ra-copy-fix-btn.ra-fix-copied { border-color: var(--green); color: var(--green); }
.ra-ats-list li { color: var(--amber); }
.ra-ats-list li::before { color: var(--amber); content: '⚠'; }
.ra-sg-note { background: rgba(61,111,168,0.07); border: 1px solid rgba(61,111,168,0.15); border-radius: 6px; padding: 7px 10px; font-size: 0.76rem; color: var(--blue); display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }

/* Score colour classes */
.ra-detail-score.score-green { color: var(--green); }
.ra-detail-score.score-amber { color: var(--amber); }
.ra-detail-score.score-red   { color: var(--red); }
.ra-grade-badge { font-size: 1rem; font-weight: 800; padding: 3px 12px; border-radius: 20px; display: inline-block; width: fit-content; }
.ra-grade-badge.score-green { background: rgba(45,122,84,0.13); color: var(--green); }
.ra-grade-badge.score-amber { background: rgba(181,110,24,0.13); color: var(--amber); }
.ra-grade-badge.score-red   { background: rgba(184,50,50,0.13); color: var(--red); }
.ra-overall-block { border-radius: 10px; padding: 14px; }
.ra-overall-score-wrap { display: flex; align-items: center; gap: 14px; }

/* ── Print ──────────────────────────────────────────────────────────────────── */
@media print {
  .navbar, .ra-toolbar, .ra-right, .ra-empty, .ra-progress-bar, .ra-selector-row, .ra-editor-controls,
  .ra-add-entry-btn, .ra-section-score-chip { display: none !important; }
  .ra-page { display: block; padding-top: 0; }
  .ra-content { display: block !important; }
  .ra-left { padding: 0; overflow: visible; }
  .ra-paper { box-shadow: none; max-width: 100%; padding: 0.5in 0.5in; min-height: auto; }
  .ra-paper-section { border-left: none !important; background: none !important; padding-left: 0 !important; }
  [contenteditable] { outline: none !important; background: none !important; box-shadow: none !important; }
  @page { size: Letter; margin: 0; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .ra-content { grid-template-columns: 1fr !important; height: auto; overflow: visible; }
  .ra-divider { display: none; }
  .ra-right { border-left: none; border-top: 1px solid var(--border); max-height: 55vh; }
  .ra-left { padding: 16px; }
  .ra-empty {
    min-height: clamp(360px, calc(100dvh - 230px), 620px);
    padding: 48px 18px;
    transform: none;
  }
  .ra-paper { padding: 24px 20px; }
  .ra-editor-controls { grid-template-columns: 1fr; max-width: 100%; }
  .ro-workspace { grid-template-columns: 1fr !important; height: auto; }
  .ro-right { border-left: none; border-top: 1px solid var(--border); }
}
/* ══════════════════════════════════════════════════════════════════════════════
   LIVE TEST MODE
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Live-test HUD (legacy floating overlay — hidden, replaced by #lt-inline-bar) */
#lt-hud {
  display: none !important;
}

/* ── Live-test inline timer bar (shown inside recording panel) ────────────── */
#lt-inline-bar {
  display: none; /* shown via JS */
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2, var(--card-bg));
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 12px;
}

#lt-timer-inline {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

#lt-timer-inline.lt-timer-amber { color: var(--amber); }
#lt-timer-inline.lt-timer-red   { color: var(--red); animation: lt-pulse 0.8s ease-in-out infinite; }

.lt-progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

#lt-progress-fill-inline {
  height: 100%;
  width: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.5s linear, background-color 0.5s;
}

#lt-progress-fill-inline.warn   { background: var(--amber); }
#lt-progress-fill-inline.danger { background: var(--red); }

.lt-inline-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Timer display */
.lt-timer {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  min-width: 90px;
  text-align: center;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.lt-timer.lt-timer-amber {
  color: var(--amber);
  border-color: rgba(255,159,10,0.5);
}
.lt-timer.lt-timer-red {
  color: var(--red);
  border-color: rgba(255,69,58,0.5);
  animation: lt-pulse 0.8s ease-in-out infinite;
}
@keyframes lt-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Progress bar */
#lt-progress {
  width: 160px;
  height: 5px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.lt-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 1s linear, background 0.3s ease;
}
.lt-progress-fill.warn    { background: var(--amber); }
.lt-progress-fill.danger  { background: var(--red); }

/* Action buttons */
#lt-actions {
  display: flex;
  gap: 8px;
}
.btn-lt-action {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border-strong);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, opacity 150ms;
}
.btn-lt-action:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  border-color: var(--purple);
}
.btn-lt-action:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn-lt-done {
  background: rgba(48,209,88,0.15);
  border-color: rgba(48,209,88,0.5);
  color: var(--green);
}
.btn-lt-done:hover:not(:disabled) {
  background: rgba(48,209,88,0.25);
}

/* ── LIVE TEST mode card (index.html mode picker) ──────────────────────────── */
.live-test-badge {
  background: rgba(16,185,129,0.16);
  color: #34d399;
  border-color: rgba(16,185,129,0.36);
}

/* ── History ⭐ badge ─────────────────────────────────────────────────────── */
.live-test-badge-hist {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  margin-left: 6px;
  background: rgba(255,159,10,0.15);
  color: var(--amber);
  border: 1px solid rgba(255,159,10,0.35);
  vertical-align: middle;
}
.partial-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  margin-left: 6px;
  background: rgba(180,151,232,0.12);
  color: var(--purple);
  border: 1px solid rgba(180,151,232,0.30);
  vertical-align: middle;
}

/* ── History filter bar ─────────────────────────────────────────────────────── */
.history-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.btn-sm {
  padding: 4px 14px;
  font-size: 0.8rem;
  border-radius: 20px;
}
.history-filter-bar .btn-ghost {
  border: 1.5px solid var(--border);
  transition: border-color 150ms, color 150ms, background 150ms;
}
.history-filter-bar .btn-ghost.active {
  border-color: var(--purple);
  color: var(--text);
  background: rgba(124,58,237,0.10);
}

/* ── Session state panels: smooth fade-in on show ──────────────────────────── */
#state-ready,
#state-recording,
#state-feedback {
  transition: opacity 180ms ease-out;
}
#state-ready.state-active,
#state-recording.state-active,
#state-feedback.state-active {
  opacity: 1;
}

/* ── Session.html recording panel: make position:relative for HUD ──────────── */
#state-recording {
  position: relative;
}

/* ── Camera framing: MediaPipe canvas overlay + warning banner ──────────────── */
.cam-guide-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  transition: opacity 600ms ease;
}
.cam-guide-svg.face-locked { opacity: 0.25; }
.framing-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}
.framing-banner {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  animation: banner-pulse 2s ease-in-out infinite;
}
.framing-banner.framing-warning {
  background: rgba(251,191,36,0.18);
  border: 1px solid rgba(251,191,36,0.4);
  color: var(--amber);
}
.framing-banner.framing-lost {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.35);
  color: #f87171;
}
@keyframes banner-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ── Live Test: pre-interview "Begin" overlay ───────────────────────────────── */
.lt-start-card {
  text-align: center;
  max-width: 460px;
}
.lt-start-icon {
  font-size: 2.8rem;
  color: var(--purple);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.lt-start-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.lt-start-status {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto 18px;
}
.lt-start-rules {
  list-style: none;
  text-align: left;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lt-start-rules li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.lt-start-rules li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
}
.lt-start-rules strong {
  color: var(--text);
  font-weight: 600;
}

.tts-mute-toggle {
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.tts-mute-toggle:hover {
  border-color: var(--purple);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   Resume Optimizer  (.ro-*)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Optimizer toolbar ───────────────────────────────────── */
.ro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
  min-height: 54px;
}
.ro-toolbar-left  { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.ro-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* Disclaimer below resume paper */
.ro-disclaimer {
  font-size: 0.72rem;
  color: var(--muted-2);
  text-align: center;
  max-width: 600px;
  line-height: 1.55;
  padding: 10px 16px 4px;
  margin-top: 4px;
}

/* ── Resume selector row ─────────────────────────────────── */
.ro-selector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
  overflow-x: auto;
  flex-shrink: 0;
}
.ro-selector-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ro-resume-pills   { display: flex; gap: 5px; }
.ro-resume-pill {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
  white-space: nowrap;
}
.ro-resume-pill:hover  { border-color: var(--purple); color: var(--purple); }
.ro-resume-pill.active { border-color: var(--purple); background: rgba(107,79,173,0.10); color: var(--purple); }
.ro-no-resume   { font-size: 0.8rem; color: var(--muted); }
.ro-no-resume a { color: var(--purple); }

/* ── Two-pane workspace ──────────────────────────────────── */
.ro-workspace {
  display: grid;
  grid-template-columns: 1fr 6px 360px;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 108px);
}

/* ── Left (paper) — uses .ra-left + .ra-paper from shared styles ── */
.ro-left {
  overflow-y: auto;
  padding: 24px 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Bullet rows — relative so the flag can position */
.ro-bullets-block { margin-top: 4px; }
.ro-bullet-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 0;
  border-radius: 6px;
  transition: background 160ms;
}
.ro-bullet-row.ro-highlight { background: rgba(251,146,60,0.10); }

.ro-bullet-flag {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #e68a00;
  cursor: default;
}

.ro-bullet {
  flex: 1;
  font-size: 10.5pt;
  font-family: 'Times New Roman', Times, Georgia, serif;
  line-height: 1.32;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
  min-height: 20px;
}
.ro-bullet:focus { background: rgba(107,79,173,0.05); }

/* Flash green on fix applied */
.ro-field.ro-fixed {
  animation: ro-fixed-flash 1.8s ease-out forwards;
}
@keyframes ro-fixed-flash {
  0%   { background: rgba(45,122,84,0.18); }
  100% { background: transparent; }
}

/* ── Right panel ─────────────────────────────────────────── */
.ro-right {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--card);
  overflow-y: auto;
}

/* JD input block */
.ro-jd-block {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.ro-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.ro-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ro-input {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.84rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 150ms;
}
.ro-input:focus { border-color: var(--purple); }
.ro-textarea {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font);
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 150ms;
}
.ro-textarea:focus { border-color: var(--purple); }

/* Idle state */
.ro-panel-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 10px;
}
.ro-idle-icon {
  font-size: 2rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.ro-panel-idle h3 { font-size: 1rem; font-weight: 600; }
.ro-panel-idle p  { font-size: 0.83rem; color: var(--muted); line-height: 1.5; max-width: 260px; }

/* Loading */
.ro-panel-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 12px;
}
.ro-panel-loading p { font-size: 0.88rem; color: var(--muted); text-align: center; }

/* Results */
.ro-panel-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  overflow-y: auto;
}

/* Fit ring header */
.ro-fit-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ro-fit-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.ro-fit-ring-svg { width: 100%; height: 100%; }
.ro-fit-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}
.ro-fit-title   { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ro-fit-verdict { font-size: 0.82rem; color: var(--text); margin-top: 4px; line-height: 1.4; }

.ro-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.ro-summary-block {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  padding: 10px 12px;
}
.ro-summary-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ro-summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ro-summary-list li {
  position: relative;
  padding-left: 13px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}
.ro-summary-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
}

/* Keyword gaps */
.ro-gaps-block  { display: none; }
.ro-gaps-title  { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.ro-gaps-list   { display: flex; flex-wrap: wrap; gap: 5px; }
.ro-gap-chip {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(184,50,50,0.10);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(184,50,50,0.18);
}

/* Suggestions */
.ro-suggestions-header {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ro-sug-count { font-weight: 400; }

.ro-sug-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 150ms, transform 150ms;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.ro-sug-item:hover { border-color: var(--purple-soft); transform: translateY(-1px); }
.ro-sug-item.ro-prio-high   { border-left: 3px solid var(--red); }
.ro-sug-item.ro-prio-medium { border-left: 3px solid var(--amber); }
.ro-sug-item.ro-prio-low    { border-left: 3px solid var(--muted); }

.ro-sug-path  { font-size: 0.7rem; color: var(--muted); font-family: var(--font-mono); }
.ro-sug-issue { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.ro-sug-why   { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.ro-sug-fix   { font-size: 0.78rem; color: var(--text); line-height: 1.4; background: rgba(45,122,84,0.07); border-radius: 5px; padding: 6px 8px; margin-top: 2px; }
.ro-sug-fix strong { color: var(--green); }

.ro-fix-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, color 150ms, transform 120ms;
  font-family: var(--font);
  align-self: flex-start;
}
.ro-fix-btn:hover:not(:disabled) { background: var(--green); color: #fff; transform: scale(1.02); }
.ro-fix-btn:active:not(:disabled) { transform: scale(0.97); }
.ro-fix-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ro-fix-btn.ro-fix-applied { border-color: var(--muted); color: var(--muted); }

/* Responsive */
/* ro-workspace responsive handled in the shared @media (max-width: 920px) block above */

/* ══════════════════════════════════════════════════════════════════════════════
   Resume document review redesign
   Dense, read-only analysis workspaces shared by resume analysis and JD compare.
   ═══════════════════════════════════════════════════════════════════════════ */

.ra-build-content {
  grid-template-columns: minmax(0, 1fr) !important;
  height: calc(100vh - 108px);
}
.ra-build-left {
  width: 100%;
  padding: 22px clamp(16px, 4vw, 48px) 44px;
}
.ra-build-page .ra-paper {
  max-width: 760px;
}

.review-page {
  overflow-x: hidden;
}
.review-toolbar {
  min-height: 56px;
}
.review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6px 420px;
  flex: 1;
  height: calc(100vh - 108px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(90,200,232,0.05), transparent 28%),
    var(--bg);
}
.jd-workspace {
  height: calc(100vh - 108px);
}
.review-left {
  min-width: 0;
  overflow-y: auto;
  padding: 22px clamp(14px, 3vw, 34px) 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 180px);
}
.review-doc-shell {
  width: min(100%, 820px);
  display: flex;
  justify-content: center;
}
.review-paper {
  max-width: 780px;
  min-height: 930px;
  padding: 0;
  background: transparent;
  box-shadow: 0 18px 70px rgba(0,0,0,0.5);
  cursor: default;
}
.review-paper [contenteditable],
.review-paper [contenteditable="true"] {
  pointer-events: none;
}
.review-paper-header .ra-name,
.review-paper-header .ra-contact {
  cursor: default;
}
.review-doc-section {
  border-left: 0;
  padding-left: 0;
}
.review-doc-line {
  margin: 0 0 4pt;
  color: #181512;
  font-size: 10.5pt;
  line-height: 1.36;
  overflow-wrap: anywhere;
}
.review-doc-bullet {
  position: relative;
  padding-left: 12pt;
}
.review-doc-bullet::before {
  content: "•";
  position: absolute;
  left: 2pt;
  top: 0;
  color: #111;
}
.review-empty,
.review-report-empty {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-empty {
  max-width: 520px;
  min-height: clamp(360px, calc(100dvh - 220px), 640px);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 42px 22px;
  margin: auto;
}
.review-paper-empty {
  color: var(--text);
}
.review-file-viewer {
  width: min(100%, 880px);
  min-height: 420px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.review-pdf-viewer,
.review-docx-viewer {
  background: transparent;
}
.review-pdf-page {
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 70px rgba(0,0,0,0.5);
}
.review-pdf-canvas {
  display: block;
  width: 100%;
  height: auto;
}
.review-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  line-height: 1;
}
.review-text-span {
  position: absolute;
  display: inline-block;
  white-space: pre;
  transform-origin: 0 0;
  color: transparent;
}
.review-text-span.doc-highlight {
  color: transparent;
}
.review-docx-root {
  width: 100%;
}
.review-docx-root .docx-wrapper {
  background: transparent;
  padding: 0;
}
.review-docx-root .docx {
  box-shadow: 0 18px 70px rgba(0,0,0,0.5);
}
.review-viewer-status {
  width: min(100%, 520px);
  min-height: 360px;
  margin: auto;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  color: var(--text);
  background: rgba(255,255,255,0.024);
}
.review-viewer-status span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.16);
  border-top-color: var(--teal);
  animation: spin 820ms linear infinite;
}
.review-viewer-status strong {
  font-size: 0.92rem;
  line-height: 1.2;
}
.review-viewer-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 360px;
}
.review-empty-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(90,200,232,0.34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 11px, rgba(90,200,232,0.18) 12px, transparent 13px),
    linear-gradient(180deg, transparent 11px, rgba(232,168,74,0.2) 12px, transparent 13px),
    rgba(255,255,255,0.03);
}
.review-empty h2,
.review-report-empty h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.25;
}
.review-empty p,
.review-report-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  max-width: 420px;
}
.review-divider {
  background: rgba(255,255,255,0.025);
}
.review-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, #242426 0%, var(--card) 100%);
}
.jd-report .ro-jd-block {
  background: rgba(255,255,255,0.018);
}
.review-panel-kicker {
  width: fit-content;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}
.review-report-empty {
  padding: 24px;
  justify-content: center;
  min-height: 260px;
}
.review-loading {
  flex: 1;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  gap: 12px;
}
.review-loading p {
  margin: 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
.review-report {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}
.review-score-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.review-score-dial {
  position: relative;
  width: 74px;
  height: 74px;
  flex-shrink: 0;
}
.review-score-svg {
  width: 74px;
  height: 74px;
}
.review-score-dial span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 820;
  letter-spacing: 0;
}
.review-score-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}
.review-score-grade {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 780;
  line-height: 1.2;
  margin-top: 2px;
}
.review-verdict {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.42;
}
.review-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.review-metric {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.032);
  border-radius: 7px;
  padding: 9px 10px;
  min-width: 0;
}
.review-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.review-metric strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1;
}
.review-report-section {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.review-report-section h3,
.review-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 740;
  letter-spacing: 0;
}
.review-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.review-section-head span {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.review-action-list,
.review-plain-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.review-action-list li,
.review-plain-list li {
  padding-left: 3px;
  margin-bottom: 7px;
  font-size: 0.81rem;
  line-height: 1.45;
}
.review-card-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.review-card {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 8px;
  background: rgba(255,255,255,0.036);
  padding: 11px 12px;
  cursor: pointer;
  transform: translateY(0);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  animation: review-card-in 280ms var(--ease-out-strong) both;
  animation-delay: var(--stagger, 0ms);
}
@keyframes review-card-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.review-card:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(90,200,232,0.35);
  transform: translateY(-1px);
}
.review-card.active {
  border-color: var(--teal);
  background: rgba(90,200,232,0.08);
  box-shadow: 0 0 0 1px rgba(90,200,232,0.18);
}
.review-card.severity-high { border-left-color: var(--red); }
.review-card.severity-medium { border-left-color: var(--amber); }
.review-card.severity-low { border-left-color: var(--green); }
.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.review-card-top span {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.review-card-top strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}
.review-card-issue,
.review-card-suggestion {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.43;
}
.review-card-suggestion {
  color: #c8d7cf;
  margin-top: 7px;
}
.review-card blockquote {
  margin: 8px 0 0;
  padding: 7px 9px;
  border-left: 2px solid rgba(90,200,232,0.38);
  background: rgba(0,0,0,0.14);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.4;
}
.review-empty-line {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.doc-highlight {
  position: relative;
  display: inline;
  border-radius: 2px;
  cursor: pointer;
  background:
    linear-gradient(to top, rgba(232,168,74,0.26) 0 0.22em, transparent 0.22em);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(232,168,74,0.75);
  transition: background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}
.doc-highlight.severity-high {
  background: linear-gradient(to top, rgba(224,96,96,0.2) 0 0.22em, transparent 0.22em);
  text-decoration-color: rgba(224,96,96,0.85);
}
.doc-highlight.severity-low {
  background: linear-gradient(to top, rgba(86,196,144,0.18) 0 0.22em, transparent 0.22em);
  text-decoration-color: rgba(86,196,144,0.78);
}
.doc-highlight:hover,
.doc-highlight.active {
  background: rgba(90,200,232,0.2);
  box-shadow: 0 0 0 2px rgba(90,200,232,0.2);
}
.review-tooltip {
  position: fixed;
  z-index: 400;
  width: min(300px, calc(100vw - 28px));
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(90,200,232,0.32);
  background: rgba(28,28,30,0.96);
  box-shadow: 0 16px 44px rgba(0,0,0,0.45);
  pointer-events: none;
}
.review-tooltip strong {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 3px;
}
.review-tooltip span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.38;
}
.review-report .ro-gaps-list {
  margin-top: 10px;
}

@media (max-width: 1040px) {
  .review-workspace,
  .jd-workspace {
    grid-template-columns: minmax(0, 1fr) 6px 380px;
  }
  .review-paper {
    padding: 0;
  }
}

@media (max-width: 920px) {
  .ra-build-content,
  .review-workspace,
  .jd-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto;
    min-height: calc(100vh - 108px);
    overflow: visible;
  }
  .review-divider {
    display: none;
  }
  .review-right {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
  }
  .review-left {
    padding: 16px;
  }
  .review-paper {
    min-height: auto;
    max-width: 100%;
    padding: 0;
  }
  .review-metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .review-toolbar,
  .ro-toolbar.review-toolbar {
    align-items: flex-start;
  }
  .review-toolbar .ra-toolbar-right,
  .ro-toolbar.review-toolbar .ro-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
  .review-score-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .review-score-dial,
  .review-score-svg {
    width: 62px;
    height: 62px;
  }
  .review-card-top {
    flex-direction: column;
    gap: 2px;
  }
  .review-card-top strong {
    white-space: normal;
  }
}

/* ── Policy pages (Privacy, Terms) ─────────────────────────────────────────── */
.policy-page {
  min-height: calc(100vh - 60px);
  padding: 52px 24px 80px;
  display: flex;
  justify-content: center;
}
.policy-wrap {
  max-width: 720px;
  width: 100%;
}
.policy-h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 8px;
}
.policy-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 32px;
}
.policy-wrap h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.policy-wrap h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 6px;
}
.policy-wrap p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.policy-wrap ul {
  margin: 8px 0 14px 20px;
}
.policy-wrap li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 5px;
}
.policy-wrap a {
  color: var(--purple);
  text-decoration: none;
}
.policy-wrap a:hover { text-decoration: underline; }
.policy-wrap strong { color: var(--text); }
