/* ─────────────────────────────────────────────────────────
   Frank — Stylesheet
   ───────────────────────────────────────────────────────── */

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

/* ── Design tokens ──────────────────────────────────────── */
:root {
  --bg:           #0f1117;
  --surface:      #1a1f2e;
  --surface-2:    #242938;

  --border:       #2d3348;
  --border-focus: #d4a853;

  --text-primary:   #ffffff;
  --text-secondary: #a0aec0;
  --text-muted:     #a0aec0;

  --accent:       #d4a853;
  --accent-hover: #e8c068;
  --accent-light: rgba(212, 168, 83, 0.1);
  --accent-ring:  rgba(212, 168, 83, 0.2);

  --green:        #48bb78;
  --green-bg:     rgba(72, 187, 120, 0.1);
  --green-border: rgba(72, 187, 120, 0.3);

  --amber:        #d4a853;
  --amber-bg:     rgba(212, 168, 83, 0.1);
  --amber-border: rgba(212, 168, 83, 0.3);

  --purple:       #9f7aea;
  --purple-bg:    rgba(159, 122, 234, 0.1);
  --purple-border: rgba(159, 122, 234, 0.3);

  --error:        #fc8181;
  --error-bg:     rgba(252, 129, 129, 0.1);
  --error-border: rgba(252, 129, 129, 0.3);

  --warn-bg:      #242938;
  --warn-border:  #fc8181;
  --warn-text:    #fc8181;

  --radius:    8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow:    0 4px 16px rgba(0, 0, 0, 0.4);

  --t: 180ms ease;
}

/* ── Base ───────────────────────────────────────────────── */
html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ──────────────────────────────────────────── */
#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.header-inner {
  width: 100%;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Landing nav links shown only when step-indicator is empty (step 0) */
.landing-nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  margin-right: 8px;
}
#step-indicator:empty ~ .landing-nav-links { display: flex; }

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t);
}
.nav-link:hover { color: var(--text-primary); }

/* ── Step indicator ─────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  transition: background var(--t), width var(--t);
}
.step-dot.done    { background: var(--accent); }
.step-dot.current { background: var(--accent); width: 22px; }

/* ── Main ───────────────────────────────────────────────── */
main { flex: 1; width: 100%; }

/* ── Step visibility & animation ───────────────────────── */
.step        { display: none; }
.step.active { display: block; animation: stepIn 220ms ease both; }

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

/* Steps 1–4 centered with padding */
#step-1,
#step-2,
#step-3,
#step-4 {
  max-width: 1000px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

/* Step 5: chat fills full viewport — no max-width, three panels need the full width */
#step-5 {
  width: 100%;
  padding: 0 24px;
  overflow: hidden;
}

/* ── Step header ────────────────────────────────────────── */
.step-header { margin-bottom: 32px; }

.step-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.step-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--text-primary);
}

.step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 680px;
}

/* ── Grids ──────────────────────────────────────────────── */
.two-col-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.three-col-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ── Form elements ──────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.label-hint {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.required { color: var(--error); }

select,
textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-2);
  resize: vertical;
  transition: border-color var(--t), box-shadow var(--t);
}

select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

textarea::placeholder,
input::placeholder { color: var(--text-muted); opacity: 0.6; }

select option { background: var(--surface-2); color: var(--text-primary); }

/* ── Form card (step 2) ─────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 20px;
}

/* ── Radio options ──────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-group--horizontal { flex-direction: row; flex-wrap: wrap; gap: 10px; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--t), background var(--t), color var(--t);
}

.radio-option:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text-primary);
}

.radio-option:has(input:checked) {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--text-primary);
  font-weight: 500;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ── Buttons ────────────────────────────────────────────── */
.step-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t), opacity var(--t), color var(--t);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

/* Primary — gold fill */
.btn-primary {
  background: var(--accent);
  color: #0f1117;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Secondary — gold outline (Log in, etc.) */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-light); }

/* Back buttons — ghost/text only */
#step2-back,
#step3-back {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  padding-left: 0;
}
#step2-back:hover,
#step3-back:hover {
  background: transparent;
  color: var(--text-primary);
}

/* Hero CTA override */
.btn-hero {
  padding: 16px 40px;
  font-size: 17px;
}

/* Landing login size */
.btn-landing-login {
  font-size: 13px;
  padding: 7px 16px;
}

/* ── Error messages ─────────────────────────────────────── */
.error-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 12px;
}

/* ── Loading state ──────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
  color: var(--text-secondary);
  text-align: center;
}

.loading-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress (step 3) ──────────────────────────────────── */
.progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progress-header h1 { margin-bottom: 0; }

.progress-fraction {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 32px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 380ms ease;
  width: 0%;
}

/* ── Question card ──────────────────────────────────────── */
.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.question-text {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
}

.keyboard-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 11px;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* ── Report (step 4) ────────────────────────────────────── */
.report-summary { line-height: 1.7; color: var(--text-secondary); }

.report-tiers {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
}

.tier-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.tier-title    { font-size: 15px; font-weight: 700; }
.tier-subtitle { font-size: 13px; opacity: 0.75; margin-top: 1px; }

/* Apply Now — green */
.tier.apply-now { border-color: var(--green-border); }
.tier.apply-now .tier-header { background: var(--green-bg); }
.tier.apply-now .tier-icon   { background: rgba(72,187,120,0.15); color: var(--green); }
.tier.apply-now .tier-title  { color: var(--green); }
.tier.apply-now .tier-subtitle { color: var(--green); }

/* Positioned Differently — gold */
.tier.positioned { border-color: var(--amber-border); }
.tier.positioned .tier-header { background: var(--amber-bg); }
.tier.positioned .tier-icon   { background: rgba(212,168,83,0.15); color: var(--amber); }
.tier.positioned .tier-title  { color: var(--amber); }
.tier.positioned .tier-subtitle { color: var(--amber); }

/* With Some Groundwork — purple */
.tier.groundwork { border-color: var(--purple-border); }
.tier.groundwork .tier-header { background: var(--purple-bg); }
.tier.groundwork .tier-icon   { background: rgba(159,122,234,0.15); color: var(--purple); }
.tier.groundwork .tier-title  { color: var(--purple); }
.tier.groundwork .tier-subtitle { color: var(--purple); }

/* Role cards */
.tier-body { background: var(--surface); }

.role-card {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}
.role-card:first-child { border-top: none; }

.role-title { font-size: 15px; font-weight: 600; margin-bottom: 5px; color: var(--text-primary); }
.role-why   { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }

.role-pivot {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 12px;
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 4px;
  line-height: 1.5;
}

.role-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.role-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.role-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--text-muted);
}

/* Watch out section */
.watchout {
  background: var(--warn-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.watchout-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--warn-text);
  margin-bottom: 10px;
}
.watchout-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.watchout-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.watchout-list li::before {
  content: '⚠';
  font-size: 11px;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--warn-text);
}

.report-actions { gap: 12px; }

/* Save banner */
.save-banner {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.save-banner-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.save-banner-link:hover { text-decoration: underline; }

/* ── Profile icon + dropdown ────────────────────────────── */
.profile-menu-wrap {
  position: relative;
}

.profile-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.profile-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1f2e;
  border: 1px solid #2d3348;
  border-radius: 8px;
  min-width: 200px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: fadeIn 120ms ease both;
}

.profile-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.profile-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}
.profile-dropdown-item--danger:hover { color: var(--error); }

.profile-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Tool nav bar ────────────────────────────────────────── */
.tool-nav {
  position: sticky;
  top: 64px;
  z-index: 150;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 44px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tool-nav::-webkit-scrollbar { display: none; }

.tool-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t), border-color var(--t);
  margin-bottom: -1px;
  flex-shrink: 0;
}
.tool-nav-item:hover { color: var(--text-primary); }
.tool-nav-item.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.tool-nav-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  padding: 1px 5px;
  border: 1px solid var(--accent-ring);
  border-radius: 10px;
  line-height: 1.4;
}

/* ── Dashboard panel ─────────────────────────────────────── */
.tool-panel { padding: 0; }

.dashboard-section { margin-bottom: 4px; }

.dashboard-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dashboard-last-active {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
}

.dashboard-role {
  font-size: 13px;
  color: var(--accent);
  padding: 3px 0;
  line-height: 1.4;
}

.dashboard-action {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  line-height: 1.4;
}

.dashboard-empty {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

.dashboard-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.dashboard-link:hover { text-decoration: underline; }

.dashboard-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.coming-soon-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.coming-soon-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Chat (step 5) ──────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
  height: calc(100vh - 132px);
  margin-top: 24px;
  min-height: 0;
}

.chat-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 18px 18px;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-heading {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(212, 168, 83, 0.35);
  margin: 16px 0;
}

.sidebar-section {
  margin-top: 20px;
}

.sidebar-placeholder {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.5;
}

/* Small button variant — used for "Update my situation →" */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* ── Right panel: Tools ─────────────────────────────────── */
.chat-tools {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 18px 18px;
  overflow-y: auto;
  min-height: 0;
  transition: width var(--t);
  display: flex;
  flex-direction: column;
}

.chat-layout:has(.chat-tools--expanded) {
  grid-template-columns: 280px 1fr 480px;
}

.tool-section {
  margin-top: 16px;
}

.tool-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.tool-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Mobile tab bar (hidden on desktop) ─────────────────── */
.chat-tab-radio { display: none; }
.chat-tabs      { display: none; }

.sidebar-view-report-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #d4a853;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
.sidebar-view-report-btn:hover {
  color: #e8c068;
  text-decoration: underline;
}

.back-to-chat { margin-bottom: 20px; }

.mini-tier { margin-bottom: 16px; }

.mini-tier-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.mini-tier-title.apply      { color: var(--green); }
.mini-tier-title.positioned { color: var(--amber); }
.mini-tier-title.groundwork { color: var(--purple); }

.mini-role {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0 6px;
  cursor: pointer;
  transition: color var(--t);
  line-height: 1.4;
}
.mini-role:hover { color: var(--accent); text-decoration: underline; }

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
}

.chat-input-wrapper {
  margin-top: auto;
  flex-shrink: 0;
}

.chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  scroll-behavior: smooth;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 780px;
}
.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-message.assistant .msg-avatar { background: var(--accent); color: #0f1117; }
.chat-message.user       .msg-avatar { background: var(--surface-2); color: var(--text-secondary); }

.msg-bubble {
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.65;
  max-width: 600px;
}
.chat-message.assistant .msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 4px 12px 12px 12px;
}
.chat-message.user .msg-bubble {
  background: var(--accent);
  color: #0f1117;
  border-radius: 12px 4px 12px 12px;
}

/* Markdown in chat bubbles */
.msg-bubble .md-h2 {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin: 12px 0 4px; line-height: 1.3;
}
.msg-bubble .md-h3 {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin: 10px 0 4px; line-height: 1.3;
}
.msg-bubble .md-hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.msg-bubble .md-ul { margin: 4px 0 6px; padding-left: 18px; }
.msg-bubble .md-ul li { margin-bottom: 3px; line-height: 1.55; }
.msg-bubble .md-table-wrap { overflow-x: auto; margin: 8px 0 6px; }
.msg-bubble .md-table { border-collapse: collapse; font-size: 13px; width: 100%; min-width: 280px; }
.msg-bubble .md-table th,
.msg-bubble .md-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; line-height: 1.4; }
.msg-bubble .md-table th { background: var(--surface-2); font-weight: 600; color: var(--text-primary); }
.msg-bubble .md-table td { color: var(--text-primary); }
.msg-bubble .md-table tr:nth-child(even) td { background: var(--surface); }

/* User bubble — keep text dark */
.chat-message.user .msg-bubble .md-h2,
.chat-message.user .msg-bubble .md-h3,
.chat-message.user .msg-bubble .md-table th,
.chat-message.user .msg-bubble .md-table td { color: #0f1117; }
.chat-message.user .msg-bubble .md-hr { border-top-color: rgba(15,17,23,0.2); }

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: center; gap: 4px;
  padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px; width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.1s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

/* Chat input row */
.chat-input-row {
  border-top: 1px solid #d4a853;
  padding: 14px 16px 10px;
  display: flex; gap: 10px; align-items: flex-end;
  background: #242938;
}

.chat-textarea {
  flex: 1; resize: none; max-height: 130px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid #d4a853;
  color: var(--text-primary);
}
.chat-textarea:focus {
  outline: none;
  border-color: #d4a853;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.chat-send-btn { align-self: flex-end; }

.chat-hint {
  padding: 0 16px 10px; margin-top: -4px;
  background: #242938;
  color: var(--text-muted); font-size: 12px;
}

/* ── Password toggle ────────────────────────────────────── */
.password-field { position: relative; }
.password-field input { padding-right: 40px; width: 100%; }

.pw-toggle {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 3px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: color var(--t); line-height: 0;
}
.pw-toggle:hover { color: var(--text-secondary); }

/* ── Auth modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 160ms ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  width: 100%; max-width: 440px;
  padding: 28px 28px 24px;
  position: relative;
  animation: modalSlideIn 200ms ease both;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none;
  font-size: 16px; color: var(--text-muted);
  cursor: pointer; padding: 4px 6px; border-radius: var(--radius);
  line-height: 1; transition: color var(--t);
}
.modal-close:hover { color: var(--text-primary); }

.modal-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.modal-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer; margin-bottom: -1px;
  transition: color var(--t), border-color var(--t);
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

.modal-panel { display: flex; flex-direction: column; gap: 16px; }

.modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 700; color: var(--text-primary);
}

.modal-desc {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.6; margin-top: -8px;
}

.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.btn-full { width: 100%; justify-content: center; padding: 11px 20px; }

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

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE (step 0)
   ═══════════════════════════════════════════════════════════ */

#step-0 { padding: 0; }

/* ── Hero ───────────────────────────────────────────────── */
.landing-hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  text-align: center;
}

.landing-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
}

.hero-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-gold-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 28px;
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 720px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-subheading {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-welcome {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--accent);
  margin-top: 14px;
}

.hero-note {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── Section shared styles ──────────────────────────────── */
.landing-section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  text-align: center;
}

.section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
  text-align: center;
}

/* ── Value proposition ──────────────────────────────────── */
.landing-value {
  background: var(--surface);
  padding: 80px 48px;
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.value-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.value-card-icon span {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.value-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.value-card p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── How it works ───────────────────────────────────────── */
.landing-process {
  background: var(--bg);
  padding: 80px 48px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 0;
}

/* Gold connecting line between step numbers */
.process-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}

.process-step { padding: 0 28px; }
.process-step:first-child { padding-left: 0; }
.process-step:last-child  { padding-right: 0; }

.process-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1;
  position: relative;
  display: inline-block;
  background: var(--bg); /* mask the line behind the number */
  padding-right: 12px;
}

.process-step h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.process-step p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #0a0d13;
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}

.footer-main {
  max-width: 1080px;
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.footer-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t);
}
.footer-link:hover { color: var(--text-primary); }

.footer-copyright {
  max-width: 1080px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #4a5568;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ═══════════════════════════════════════════════════════════
   STATIC PAGES (about, contact, privacy, terms)
   ═══════════════════════════════════════════════════════════ */

.static-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.static-page h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.static-page .page-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.static-page .page-intro {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 48px;
  margin-top: 16px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.static-page .page-body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.static-page .page-body p { margin-bottom: 20px; }

.static-page .page-body strong { color: var(--text-primary); font-weight: 600; }

.static-page .page-body a {
  color: var(--accent);
  text-decoration: none;
}
.static-page .page-body a:hover { text-decoration: underline; }

.static-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color var(--t);
}
.static-back-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }
  .landing-nav-links { gap: 16px; margin-right: 4px; }

  /* Hero */
  .landing-hero { padding: 60px 24px; min-height: calc(100vh - 64px); }
  .hero-headline { font-size: 36px; }
  .hero-subheading { font-size: 16px; }

  /* Sections */
  .section-heading { font-size: 28px; }
  .landing-value  { padding: 60px 24px; }
  .landing-process { padding: 60px 24px; }

  /* Value cards */
  .value-cards { grid-template-columns: 1fr; }

  /* Process steps */
  .process-steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .process-steps::before { display: none; }
  .process-step { padding: 0; }
  .process-number { background: transparent; padding-right: 0; }

  /* Footer */
  .site-footer { padding: 40px 24px; }
  .footer-main { flex-direction: column; gap: 24px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }

  /* Steps 1-4 */
  #step-1, #step-2, #step-3, #step-4 { padding: 28px 16px 60px; }
  .step-header h1 { font-size: 22px; }

  .two-col-grid,
  .three-col-grid { grid-template-columns: 1fr; }

  /* Chat — three-panel collapses to single panel with tab bar */
  #step-5 { padding: 0 12px; overflow: hidden; }

  /* Tab bar */
  .chat-tabs {
    display: flex;
    height: 44px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .chat-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  /* Active tab label — driven by the :checked radio sibling */
  #chat-tab-report:checked ~ .chat-tabs label[for="chat-tab-report"],
  #chat-tab-frank:checked  ~ .chat-tabs label[for="chat-tab-frank"],
  #chat-tab-tools:checked  ~ .chat-tabs label[for="chat-tab-tools"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  /* Tool nav — reduced padding, horizontal scroll */
  .tool-nav { padding: 0 16px; }

  /* Layout — single column, height accounts for tool nav + tab bar */
  .chat-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 152px); /* 64px header + 44px tool-nav + 44px tab bar */
    margin-top: 0;
    gap: 0;
    min-height: 0;
  }

  /* Default: frank (centre) panel visible; left and right hidden */
  .chat-layout .chat-sidebar { display: none; }
  .chat-layout .chat-tools   { display: none; }
  .chat-layout .chat-main    { height: 100%; min-height: 0; }

  /* Report tab active */
  #chat-tab-report:checked ~ .chat-layout .chat-sidebar { display: block; height: 100%; overflow-y: auto; }
  #chat-tab-report:checked ~ .chat-layout .chat-main    { display: none; }

  /* Tools tab active */
  #chat-tab-tools:checked ~ .chat-layout .chat-main  { display: none; }
  #chat-tab-tools:checked ~ .chat-layout .chat-tools { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }

  /* Static pages */
  .static-page { padding: 40px 20px 60px; }
  .static-page h1 { font-size: 32px; }
}

/* ── Resume Builder (right panel) ───────────────────────── */
.resume-flow-panel {
  padding: 0;
}

.resume-flow-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.resume-flow-subheading {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.resume-back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 14px;
}
.resume-back-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.resume-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 0;
  text-align: center;
}

.resume-loading-msg {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Resume file upload */
.resume-upload-heading {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.resume-upload-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: background var(--t), border-color var(--t);
  min-height: 48px;
}

.resume-upload-area:hover {
  background: var(--accent-light);
}

.resume-upload-area--active {
  border-color: var(--accent-hover);
  background: rgba(212, 168, 83, 0.15);
}

#resume-upload-idle {
  font-size: 13px;
  color: var(--text-secondary);
  pointer-events: none;
}

#resume-upload-parsing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  pointer-events: none;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
  flex-shrink: 0;
}

.resume-file-hidden {
  display: none;
}

.resume-upload-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.resume-upload-filename {
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.resume-upload-remove {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-upload-remove:hover {
  color: var(--error);
}

.resume-upload-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.resume-coming-soon {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0.45;
  pointer-events: none;
}

.resume-coming-soon-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.resume-coming-soon-text {
  font-size: 12px;
  color: var(--sidebar-placeholder, #4a5568);
}

/* Step R3: flex column so content scrolls and actions stay pinned */
#resume-step-display {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.resume-display-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 12px;
}

.resume-display-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-update-banner {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  background: var(--surface-2);
  color: var(--text-secondary);
  transition: opacity 0.6s ease;
}
.resume-update-banner--success {
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-ring);
}
.resume-update-banner--error {
  color: var(--error);
  background: rgba(252, 129, 129, 0.08);
}
.resume-update-banner--fade { opacity: 0; }

.resume-version-wrap {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.resume-tailor-prompt {
  flex-shrink: 0;
  background: #242938;
  border: 1px solid #d4a853;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.rtp-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.4;
}
.rtp-role {
  color: #d4a853;
  font-weight: 600;
}
.rtp-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rtp-btn {
  padding: 6px 14px;
  font-size: 13px;
}
.rtp-dismiss {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.rtp-dismiss:hover { color: var(--text-secondary); }
.resume-version-select {
  width: 100%;
  background: #242938;
  border: 1px solid #2d3348;
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  outline: none;
}
.resume-version-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.resume-version-select option { background: #242938; color: var(--text-primary); }

.resume-tailor-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 2px;
}
.resume-tailor-inline textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 80px;
  outline: none;
}
.resume-tailor-inline textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* Resume viewer sections */
.rv-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.35);
}

.rv-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.rv-contact {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rv-section {
  margin-bottom: 18px;
}

.rv-section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.rv-body {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.65;
}

.rv-job {
  margin-bottom: 14px;
}

.rv-job-header {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.rv-job-company {
  font-weight: 700;
}

.rv-job-title {
  color: var(--text-primary);
}

.rv-job-dates {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.rv-achievements {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}

.rv-achievements li {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.rv-edu {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.rv-edu-institution {
  font-weight: 700;
}

.rv-edu-year {
  color: var(--text-secondary);
}

/* ── Update My Situation Overlay ──────────────────────── */
.us-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.us-overlay.hidden {
  display: none;
}

.us-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  z-index: 10;
  flex-shrink: 0;
}

.us-header-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
}

.us-exit-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--t);
}

.us-exit-btn:hover {
  color: var(--text-primary);
}

.us-content {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.us-step {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.us-step.hidden {
  display: none;
}

.us-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.us-step-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.us-frank-intro {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.us-question-text {
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 500;
}

.us-answer {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color var(--t), box-shadow var(--t);
  font-family: inherit;
  line-height: 1.5;
}

.us-answer:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.us-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.us-confirm-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  color: var(--text-primary);
  line-height: 1.3;
}

.us-confirm-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.us-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 600px) {
  .us-content {
    padding: 32px 16px 60px;
  }

  .us-question-text {
    font-size: 16px;
  }

  .us-confirm-heading {
    font-size: 22px;
  }
}

/* Update situation — report preview in confirm step */
.us-report-preview {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.us-report-preview .report-summary {
  margin-bottom: 24px;
}

.us-report-preview .report-tiers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Cover Letter Tool ───────────────────────────────────── */
.cl-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0;
  letter-spacing: 0.05em;
}

.cl-role-label {
  font-size: 12px;
  font-weight: 600;
  color: #d4a853;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cl-content {
  flex: 1;
  overflow-y: auto;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  padding-right: 2px;
}

.cl-content p {
  margin: 0 0 1.2em;
}
