@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,800;1,9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --teal:       #0A6E6E;
  --teal-mid:   #0D8686;
  --teal-lite:  #E6F2F1;
  --amber:      #E8A24A;
  --amber-mid:  #C48432;
  --amber-lite: #FBF0DD;
  --green:      #2F7D5B;
  --green-mid:  #3F9D74;
  --green-lite: #EAF6F0;
  --red:        #B4442E;
  --red-mid:    #C65940;
  --red-lite:   #FBECE5;
  --yellow:     #B76A2B;
  --yellow-lite:#FBF0DD;
  --slate:      #0E2A2A;
  --mid:        #123A3A;
  --light:      #6B7876;
  --bg:         #FBFAF6;
  --cream:      #F4F1E7;
  --white:      #FFFFFF;
  --border:     #E4E7E3;
  --shadow:     0 1px 2px rgba(14,42,42,.04), 0 8px 24px rgba(14,42,42,.06);

  /* Per-tab signature accents (verable-prototype-fixes.html) — a wayfinding
     layer on top of the core ink/teal/amber brand, not a replacement for it.
     Used only for: active tab underline, mode-card icon/selected state. */
  --sig-evaluate:  #B3245C;
  --sig-research:  #1D5FA8;
  --sig-strategy:  #2F7A4F;
  --sig-interview: #6B46C1;
  --sig-profile:   #33475B;
  --sig-saved:     #A6740A;
}

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

html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, textarea, pre, table, canvas, video {
  max-width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--slate);
  padding: 16px 14px 32px;
  font-size: 14px;
}

/* ── HEADER ── */
.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--teal);
}
.header-left .brand-row { display: flex; align-items: center; gap: 8px; }
.header-left h1 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.1;
}
.header-left p { margin-top: 5px; font-size: 12.5px; color: var(--light); }
.header-right { display: flex; flex-direction: row; align-items: center; gap: 8px; }
/* FIX (verable-prototype-fixes.html): badges no longer look like clickable
   buttons — no solid fill, no heavy border, lighter weight. */
.badge {
  background: transparent; color: var(--teal);
  border: 1px solid var(--teal-lite);
  font-family: 'Inter', sans-serif;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px; white-space: nowrap;
}
.badge-outline {
  background: transparent; color: var(--light);
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px; white-space: nowrap;
}

/* ── TABS ── */
.tab-bar {
  display: flex; gap: 0; align-items: center;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  position: relative;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar::after {
  content: '';
  position: sticky;
  right: 0;
  min-width: 24px;
  background: linear-gradient(to left, var(--bg), transparent);
  pointer-events: none;
}
/* FIX (verable-prototype-fixes.html): overflow control is now labeled (title
   tooltip) and only shown when the tabs actually overflow, instead of an
   unexplained icon that's always present. */
.nav-scroll { display: none; margin-left: auto; align-items: center; gap: 2px; color: var(--light); font-size: 11px; flex-shrink: 0; padding-left: 8px; }
.nav-scroll.visible { display: flex; }
.nav-scroll button {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  width: 22px; height: 18px; cursor: pointer; color: var(--mid); font-size: 10px; line-height: 1;
}
.nav-scroll button:hover { border-color: var(--teal-mid); color: var(--teal); }
.tab {
  padding: 12px 16px; border: none; background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--light);
  cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: all 0.15s; white-space: nowrap;
  min-height: 44px;
  scroll-snap-align: start;
}
.tab:hover { color: var(--mid); }
.tab.active { color: var(--tab-color, var(--teal)); border-bottom-color: var(--tab-color, var(--teal)); font-weight: 600; }
.tab[data-tab="evaluate"].active  { --tab-color: var(--sig-evaluate); }
.tab[data-tab="research"].active  { --tab-color: var(--sig-research); }
.tab[data-tab="strategy"].active  { --tab-color: var(--sig-strategy); }
.tab[data-tab="interview"].active { --tab-color: var(--sig-interview); }
.tab[data-tab="profile"].active   { --tab-color: var(--sig-profile); }
.tab[data-tab="saved"].active     { --tab-color: var(--sig-saved); }

/* ── ACTIVE APPLICATION STRIP ── */
.app-strip {
  display: none; align-items: center; justify-content: space-between;
  background: var(--cream); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; margin-bottom: 18px; font-size: 12.5px; color: var(--mid);
}
.app-strip span { font-weight: 600; color: var(--slate); }

/* ── PANELS ── */
.panel { display: none; }
.panel.active { display: block; animation: fadeUp 0.25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LABELS ── */
.sec-label {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--light); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 6px;
}
.sec-title {
  font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700;
  color: var(--slate); margin-bottom: 4px;
}
.sec-sub {
  font-size: 14px; color: var(--mid); margin-bottom: 22px;
  line-height: 1.6; max-width: 680px;
}

/* ── CARDS ── */
.card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 20px 22px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* ── FORM ── */
.field-label {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--light); margin-bottom: 7px;
}
input[type="text"], input[type="url"] {
  width: 100%; background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 7px; padding: 12px 13px; color: var(--slate);
  font-family: 'Inter', sans-serif; font-size: 16px;
  min-height: 44px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(13,134,134,0.14);
}
textarea {
  width: 100%; background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 7px; padding: 10px 13px; color: var(--slate);
  font-family: 'Inter', sans-serif; font-size: 16px;
  line-height: 1.6; resize: vertical; min-height: 150px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(13,134,134,0.14);
}
select {
  font-size: 16px;
}
.input-row { display: flex; flex-direction: column; gap: 10px; }
.input-row input { flex: 1; }
.field-gap { margin-bottom: 14px; }
.or-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--light); font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; margin: 14px 0;
}
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; border: none; white-space: nowrap;
  min-height: 44px;
}
.btn-primary { background: var(--slate); color: white; }
.btn-primary:hover { background: var(--teal); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-amber { background: var(--amber); color: var(--slate); }
.btn-amber:hover { background: var(--amber-mid); color: white; }
.btn-amber:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--mid); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--light); color: var(--slate); }
.btn-full { width: 100%; justify-content: center; padding: 11px; font-size: 14px; font-weight: 600; margin-top: 14px; min-height: 48px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn + .btn { margin-top: 12px; }
.result-actions .btn + .btn { margin-top: 0; }
.wizard-error-actions .btn + .btn { margin-top: 0; }

/* ── MODE GRID ── */
.mode-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
.mode-card {
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 14px; cursor: pointer;
  transition: all 0.15s; text-align: center;
  min-height: 44px;
}
.mode-card:hover { border-color: var(--sig, var(--teal-mid)); background: color-mix(in srgb, var(--sig, var(--teal)) 8%, var(--cream)); }
.mode-card.selected { border-color: var(--sig, var(--teal)); background: color-mix(in srgb, var(--sig, var(--teal)) 12%, white); box-shadow: 0 0 0 1px var(--sig, var(--teal)); }
.mode-icon { font-size: 20px; margin-bottom: 6px; color: var(--sig, var(--teal)); }
.mode-title { font-family: 'Fraunces', serif; font-size: 12px; font-weight: 700; color: var(--slate); margin-bottom: 3px; }
.mode-card.selected .mode-title { color: var(--sig, var(--teal)); }
.mode-desc { font-size: 11px; color: var(--mid); line-height: 1.4; }

/* ── STAGE PILLS ── */
.stage-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stage-btn {
  padding: 10px 14px; border-radius: 20px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s;
  background: var(--cream); border: 1.5px solid var(--border); color: var(--mid);
  min-height: 44px;
}
.stage-btn:hover { border-color: var(--teal-mid); color: var(--teal); }
.stage-btn.active { background: var(--teal); border-color: var(--teal); color: white; }

/* ── RESULT WRAP ── */
.result-wrap {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; overflow: hidden; margin-top: 16px; position: relative;
  box-shadow: var(--shadow);
  margin-left: 0; margin-right: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.result-empty {
  padding: 48px 24px; text-align: center; color: var(--light);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-icon { font-size: 32px; opacity: 0.5; }
.result-empty p { font-size: 13px; max-width: 300px; line-height: 1.6; color: var(--light); }

/* ── LOADING ── */
.progress-bar {
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid));
  transition: width 0.35s ease;
}
.loading-state {
  padding: 20px 22px; display: flex; align-items: center; gap: 10px;
  color: var(--teal); font-size: 13px; font-weight: 500;
}
.dot-loader { display: flex; gap: 5px; }
.dot-loader span {
  width: 6px; height: 6px; background: var(--teal-mid);
  border-radius: 50%; animation: dotpulse 1.2s ease-in-out infinite;
}
.dot-loader span:nth-child(2) { animation-delay: 0.2s; }
.dot-loader span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotpulse {
  0%,100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* ── AI CONTENT ── */
.ai-content {
  padding: 22px 24px; font-size: 14px; line-height: 1.75; color: var(--mid);
}
.ai-content h2 {
  font-family: 'Fraunces', serif; font-size: 15px; font-weight: 700;
  color: var(--slate); margin: 20px 0 8px;
  padding-bottom: 7px; border-bottom: 1.5px solid var(--border);
}
.ai-content h2:first-child { margin-top: 0; }
.ai-content h3 {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--teal); text-transform: uppercase;
  letter-spacing: 1.2px; margin: 14px 0 6px;
}
.ai-content p { margin-bottom: 9px; color: var(--mid); }
.ai-content ul, .ai-content ol { margin: 6px 0 12px 20px; }
.ai-content li { margin-bottom: 5px; }
.ai-content strong { color: var(--slate); font-weight: 600; }
.ai-content em { color: var(--teal); font-style: normal; font-weight: 500; }
.ai-content hr { border: none; border-top: 1.5px solid var(--border); margin: 18px 0; }
.result-actions {
  display: flex; gap: 12px; padding: 14px 22px;
  border-top: 1.5px solid var(--border); background: var(--cream);
  flex-wrap: wrap;
}

/* ── INSIGHT BOX ── */
.insight {
  background: var(--teal-lite); border: 1.5px solid var(--teal-mid);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
}
.ins-icon { font-size: 18px; }
.insight h4 {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--teal); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.insight p { font-size: 12.5px; color: var(--mid); line-height: 1.5; }

/* ── PROFILE BLOCKS ── */
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.profile-block {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 18px 20px;
  box-shadow: var(--shadow);
}
.block-title {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--teal);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1.5px solid var(--teal-lite);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; overflow: hidden; }
.tag {
  display: inline-block; font-size: 11.5px; padding: 3px 10px;
  border-radius: 20px; font-weight: 500;
  border: 1px solid var(--border); background: var(--cream); color: var(--mid);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-teal { background: var(--teal-lite); color: var(--teal); border-color: var(--teal-mid); }

/* ── TIMELINE ── */
.tl-item {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.tl-item:last-child { border-bottom: none; }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--teal);
  margin-top: 5px; flex-shrink: 0; border: 2px solid var(--teal-lite);
}
.tl-dot.dim { background: var(--light); border-color: var(--border); }
.tl-title { font-weight: 600; color: var(--slate); margin-bottom: 2px; font-size: 13px; }
.tl-meta { color: var(--light); font-size: 12px; line-height: 1.5; }

/* ── FOOTER ── */
.footer {
  margin-top: 24px; padding-top: 16px; border-top: 1.5px solid var(--border);
  font-size: 11.5px; color: var(--light);
  display: flex; justify-content: space-between; align-items: center;
}

/* ── STRUCTURED RESULT COMPONENTS (Phase A) ─────────────── */
.score-row { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.score-badge {
  width: 72px; height: 72px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--teal-lite); border: 3px solid var(--teal);
  flex-shrink: 0;
}
.score-badge .num { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 800; color: var(--teal); line-height: 1; }
.score-badge .denom { font-size: 9px; color: var(--mid); }
.score-rationale { font-size: 13px; color: var(--mid); max-width: 480px; }
.subscore-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
.subscore { background: var(--cream); border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.subscore-label { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--light); margin-bottom: 6px; }
.subscore-bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.subscore-bar-fill { height: 100%; background: var(--teal-mid); border-radius: 3px; }
.subscore-val { font-size: 12px; font-weight: 600; color: var(--slate); }

.gap-card { border: 1.5px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; border-left-width: 4px; }
.gap-card.sev-high { border-left-color: var(--red-mid); }
.gap-card.sev-medium { border-left-color: var(--yellow); }
.gap-card.sev-low { border-left-color: var(--green-mid); }
.sev-pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 10px; margin-bottom: 6px; }
.sev-pill.sev-high { background: var(--red-lite); color: var(--red); }
.sev-pill.sev-medium { background: var(--yellow-lite); color: var(--yellow); }
.sev-pill.sev-low { background: var(--green-lite); color: var(--green); }
.gap-desc { font-size: 13px; color: var(--slate); margin-bottom: 4px; }
.gap-bridge { font-size: 12.5px; color: var(--mid); }
.gap-bridge strong { color: var(--teal); }

.match-list { list-style: none; margin: 0 0 16px; }
.match-list li { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--mid); border-bottom: 1px solid var(--border); }
.match-list li:last-child { border-bottom: none; }
.match-list .check { color: var(--green-mid); flex-shrink: 0; }
.match-title { color: var(--slate); font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 16px; }
.data-table th { text-align: left; font-family: 'Inter', sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--light); padding: 8px 10px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--mid); }
.verdict-pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.verdict-pill.exceeds, .verdict-pill.direct_match { background: var(--green-lite); color: var(--green); }
.verdict-pill.near_match { background: var(--amber-lite); color: var(--amber-mid); }
.verdict-pill.gap { background: var(--red-lite); color: var(--red); }

.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.week-card { border: 1.5px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.week-label { font-family: 'Fraunces', serif; font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 6px; }
.week-actions { margin: 0 0 6px 18px; font-size: 13px; color: var(--mid); }
.week-milestone { font-size: 12px; color: var(--amber-mid); font-weight: 600; }

.star-card { border: 1.5px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; }
.star-title { font-family: 'Fraunces', serif; font-size: 13px; font-weight: 700; color: var(--slate); margin-bottom: 8px; }
.star-title .linked-gap-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; background: var(--teal-lite); color: var(--teal); padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.star-row { font-size: 12.5px; color: var(--mid); margin-bottom: 4px; }
.star-row strong { color: var(--teal); text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; margin-right: 6px; }

/* ── BRAND MARK ── */
.brand-mark { display: inline-flex; flex-shrink: 0; }
.mono-ref { font-family: 'JetBrains Mono', ui-monospace, monospace; }


/* ── ONBOARDING WIZARD ─────────────────────────────────── */

/* Overlay covers full viewport, blocks interaction */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  padding-top: 5vh;
  animation: wizardFadeIn 0.2s ease;
}

/* Semi-transparent dark backdrop */
.onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 42, 42, 0.55);
  backdrop-filter: blur(2px);
}

/* Wizard container — centered card */
.onboarding-wizard {
  position: relative;
  width: calc(100vw - 16px);
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(14, 42, 42, 0.18), 0 2px 8px rgba(14, 42, 42, 0.08);
  display: flex;
  flex-direction: column;
}

/* Header area */
.wizard-header {
  padding: 18px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wizard-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--slate);
  margin: 0;
}

.wizard-header p {
  font-size: 13.5px;
  color: var(--mid);
  line-height: 1.5;
  margin: 0;
}

/* Progress indicator */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  border-bottom: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.wizard-progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--light);
}

.wizard-progress-step.active {
  color: var(--teal);
  font-weight: 600;
}

.wizard-progress-step.completed {
  color: var(--green-mid);
}

.wizard-progress-step .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.wizard-progress-step.active .step-dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 110, 110, 0.15);
}

.wizard-progress-step.completed .step-dot {
  background: var(--green-mid);
}

.wizard-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.wizard-progress-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Skip link */
.wizard-skip {
  display: inline-block;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--light);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  text-align: center;
  width: 100%;
}

.wizard-skip:hover {
  color: var(--mid);
}

/* Wizard body / step panels */
#wizard-body {
  padding: 18px;
  flex: 1;
}

.wizard-step {
  display: none;
  animation: wizardStepIn 0.25s ease;
}

.wizard-step.active {
  display: block;
}

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

@keyframes wizardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Step headings */
.wizard-step h3 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 6px;
}

.wizard-step p {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Form inputs inside wizard */
.wizard-step label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--light);
  margin-bottom: 6px;
}

.wizard-step input[type="text"],
.wizard-step select {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 10px 13px;
  color: var(--slate);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 14px;
}

.wizard-step input[type="text"]:focus,
.wizard-step select:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(13, 134, 134, 0.14);
}

.wizard-step textarea {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 10px 13px;
  color: var(--slate);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 14px;
}

.wizard-step textarea:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(13, 134, 134, 0.14);
}

/* Input error state */
.wizard-step input.input-error,
.wizard-step textarea.input-error,
.wizard-step select.input-error {
  border-color: var(--red-mid);
  box-shadow: 0 0 0 3px rgba(180, 68, 46, 0.1);
}

/* Validation error messages */
.wizard-validation-error {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  margin-top: -10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wizard-validation-error::before {
  content: '⚠';
  font-size: 11px;
}

/* Wizard buttons */
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.wizard-btn-next,
.wizard-btn-save,
.wizard-btn-parse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--teal);
  color: var(--white);
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
  justify-content: center;
}

.wizard-btn-next:hover,
.wizard-btn-save:hover,
.wizard-btn-parse:hover {
  background: var(--teal-mid);
}

.wizard-btn-next:disabled,
.wizard-btn-save:disabled,
.wizard-btn-parse:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wizard-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--mid);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
  width: 100%;
  justify-content: center;
}

.wizard-btn-back:hover {
  border-color: var(--light);
  color: var(--slate);
}

/* Loading indicator for Step 2 AI parsing */
.wizard-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--teal-lite);
  border: 1.5px solid rgba(10, 110, 110, 0.2);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
}

.wizard-loading .dot-loader {
  display: flex;
  gap: 4px;
}

.wizard-loading .dot-loader span {
  width: 6px;
  height: 6px;
  background: var(--teal-mid);
  border-radius: 50%;
  animation: dotpulse 1.2s ease-in-out infinite;
}

.wizard-loading .dot-loader span:nth-child(2) { animation-delay: 0.2s; }
.wizard-loading .dot-loader span:nth-child(3) { animation-delay: 0.4s; }

/* Step 2 error state */
.wizard-step2-error {
  background: rgba(180, 68, 46, 0.08);
  border: 1.5px solid rgba(180, 68, 46, 0.25);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.wizard-error-message {
  font-size: 13px;
  color: var(--red);
  margin: 0 0 10px;
  font-weight: 500;
}

.wizard-error-actions {
  display: flex;
  gap: 10px;
}

.wizard-step2-error .wizard-error-actions:only-child {
  margin-top: 0;
}

/* Read-only profile summary in Step 3 */
.wizard-review-summary {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.wizard-review-summary h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--teal);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}

.wizard-review-summary .review-field {
  margin-bottom: 10px;
}

.wizard-review-summary .review-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.wizard-review-summary .review-field-value {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
}

.wizard-review-summary .review-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wizard-review-summary .review-list li {
  font-size: 12.5px;
  color: var(--mid);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.wizard-review-summary .review-list li:last-child {
  border-bottom: none;
}

.wizard-review-summary .review-list li::before {
  content: '•';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── RESPONSIVE: Mobile-First Overrides ─────────────────────────────── */

/* ── Tiny Phones (< 380px) ── */
@media (max-width: 379px) {
  .onboarding-overlay {
    padding: 8px;
  }
}

/* ── Large Phones / Landscape (481px+) ── */
@media (min-width: 481px) {
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .subscore-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .score-row {
    flex-direction: row;
    align-items: center;
  }
}

/* ── Tablets (768px+) ── */
@media (min-width: 768px) {
  body {
    padding: 28px 28px 48px;
    max-width: 1100px;
    margin: 0 auto;
  }
  .header {
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    padding-bottom: 20px;
    margin-bottom: 28px;
  }
  .header-right {
    flex-direction: column;
    align-items: flex-end;
  }
  .input-row {
    flex-direction: row;
    align-items: center;
  }
  .mode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .subscore-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sec-title {
    font-size: 19px;
  }
  .tab {
    padding: 10px 20px;
    min-height: auto;
    scroll-snap-align: unset;
  }
  .tab-bar {
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
    scroll-snap-type: none;
    scrollbar-width: auto;
  }
  .tab-bar::-webkit-scrollbar { display: unset; }
  .tab-bar::after {
    display: none;
  }
  .footer {
    margin-top: 48px;
  }
  .onboarding-wizard {
    width: 100%;
    max-height: 90vh;
    border-radius: 14px;
  }
  .onboarding-overlay {
    padding: 24px;
    align-items: center;
    padding-top: 0;
  }
  .wizard-header {
    padding: 24px 28px 0;
  }
  .wizard-header h2 {
    font-size: 20px;
  }
  .wizard-progress {
    padding: 16px 28px;
    gap: 8px;
  }
  #wizard-body {
    padding: 24px 28px;
  }
  .wizard-actions {
    padding: 16px 28px 24px;
    flex-wrap: nowrap;
  }
  .wizard-btn-next,
  .wizard-btn-save,
  .wizard-btn-parse {
    width: auto;
    padding: 10px 22px;
  }
  .wizard-btn-back {
    width: auto;
    padding: 10px 18px;
  }
  .wizard-skip {
    width: auto;
    text-align: left;
    padding: 8px 28px;
  }
}

/* ── Desktop (1025px+) ── */
@media (min-width: 1025px) {
  body {
    padding: 36px 32px 60px;
  }
  .tab, .stage-btn, .btn, .mode-card {
    min-height: unset;
  }
  .btn-full {
    min-height: unset;
  }
}

/* ── PRINT / EXPORT PDF ─────────────────────────────────── */
/* Hide this button in print output */
.btn-export-pdf { display: inline-flex; }

/* Hidden in screen mode, shown only in print */
.print-export-label {
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

@media print {
  /* ── Reset page geometry ── */
  @page { size: letter; margin: 0.75in 0.85in; }

  /* ── Hide all UI chrome ── */
  .tab-bar,
  .header-right,
  .card,
  .mode-grid,
  .stage-row,
  .or-divider,
  .result-empty,
  .loading-state,
  .progress-bar,
  .result-actions,
  .footer,
  .btn-export-pdf,
  input, textarea, button { display: none !important; }

  /* ── Page & body reset ── */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body {
    background: #fff !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* ── Keep header but trim spacing ── */
  .header {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
  }
  .header-left h1 { font-size: 20px !important; }
  .header-left p  { font-size: 11px !important; }

  /* ── Hide all inactive panels; show only the active one ── */
  .panel { display: none !important; }
  .panel.active { display: block !important; animation: none !important; }

  /* ── Hide the input card / mode / button — show only result ── */
  .panel.active .sec-label,
  .panel.active .sec-title,
  .panel.active .sec-sub { display: none !important; }

  /* ── Result wrap fills the page ── */
  .result-wrap {
    border: none !important;
    margin-top: 0 !important;
    overflow: visible !important;
  }

  /* ── AI content typography ── */
  .ai-content {
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
    color: #0E2A2A !important;
  }
  .ai-content h2 {
    font-size: 14px !important;
    margin: 14px 0 6px !important;
    color: #0A6E6E !important;
  }
  .ai-content h3 {
    font-size: 11px !important;
    color: #0A6E6E !important;
  }
  .ai-content p, .ai-content li { color: #123A3A !important; }

  /* ── Avoid page breaks mid-section ── */
  .ai-content h2,
  .ai-content h3 { page-break-after: avoid; }
  .ai-content p,
  .ai-content li { page-break-inside: avoid; }

  /* ── Profile panel: keep all blocks visible ── */
  .insight,
  .profile-grid,
  .profile-block,
  .tl-item,
  .tag-list,
  .tag { display: revert !important; }

  /* ── Print-only header label ── */
  .print-export-label { display: block !important; }
}
