/* Calm, minimal interview room. Warm neutrals, one accent. */

:root {
  --bg: #faf8f4;
  --card: #ffffff;
  --ink: #2b2a27;
  --dim: #8a857c;
  --line: #e8e3da;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --danger: #b4452f;
  --listening: #c98a2d;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Avenir Next", "Seravek", -apple-system, sans-serif;
}

/* ── Intro splash: petals spin, then fade to page 1 ─────────────── */
#splash {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 0.55s ease;
}
#splash.done { opacity: 0; pointer-events: none; }
.splash-flower { width: 230px; height: 230px; animation: splash-pop 0.6s ease both; }
/* One smooth, decelerating turn — calm, not a fast whirl. */
.splash-petals {
  transform-box: fill-box;
  transform-origin: center;
  animation: petal-spin 1.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes petal-spin {
  0%   { transform: rotate(0deg) scale(0.82); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes splash-pop {
  0%   { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}
/* Live face: gentle breathing + an occasional blink. */
.splash-face {
  transform-box: fill-box;
  transform-origin: center;
  animation: face-breathe 2.8s ease-in-out infinite;
}
@keyframes face-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.splash-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: splash-blink 3.2s ease-in-out infinite;
}
@keyframes splash-blink { 0%, 90%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.splash-tag {
  margin: 24px 0 0;
  text-align: center;
  color: var(--dim);
  font-size: 16px;
  animation: tag-in 0.7s ease both;     /* fades in with the flower */
}
@keyframes tag-in { from { opacity: 0; } to { opacity: 1; } }
/* The whole #splash fades on .done, so the tag leaves before page 1 shows. */
@media (prefers-reduced-motion: reduce) {
  .splash-flower, .splash-petals, .splash-face, .splash-eyes, .splash-tag { animation: none; }
}

.screen { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }

h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 2rem; margin: 0 0 4px; }
h2 { font-family: Georgia, serif; font-weight: 600; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.sub { color: var(--dim); margin-top: 0; }
.dim { color: var(--dim); font-weight: 400; font-size: 0.9em; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin: 18px 0;
}

.big-label { display: block; font-weight: 600; margin-bottom: 8px; }
label { display: block; font-size: 0.9rem; margin-bottom: 4px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row[hidden] { display: none; }
.row .grow { flex: 1; }
.settings-row > div { min-width: 140px; }

input[type="url"], input[type="text"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fffdfa;
}
input[type="url"] { flex: 1; width: auto; }
.row input[type="text"] { flex: 1; width: auto; }
textarea { resize: vertical; }

button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font: inherit;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: var(--danger); }
button.big { font-size: 1.1rem; padding: 14px 22px; }

.status { min-height: 1.2em; font-size: 0.9rem; color: var(--dim); }
.status.error { color: var(--danger); }
.status.busy::after { content: " ⏳"; }

.banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
}
.banner.error { background: #fbeae5; border: 1px solid #eac6bb; color: var(--danger); }

/* ── Setup: joining a call ──────────────────────────────────────── */

.join-screen { max-width: 560px; }

.join-col {
  min-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}
.join-main {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
/* step 2 (role picker) gets the wide band for the 4-up roles grid; step 1 stays narrow */
.join-screen { max-width: 560px; transition: max-width 0.2s ease; }
.join-screen:has(#step-role:not([hidden])) { max-width: 1100px; }
.roles-section { width: 100%; }
.join-avatar-row { width: 100%; display: flex; justify-content: center; }

/* ── Two-step onboarding ───────────────────────────────────────── */
.step { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.step[hidden] { display: none; }
.step-narrow { max-width: 560px; margin: 0 auto; }
.step-h { text-align: center; margin: 0; }
.step-head-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.step-head-row .step-h, .step-head-row .join-tag { text-align: left; margin: 0; }
.step-links { display: flex; align-items: center; gap: 10px; justify-content: center; }
.dot-sep { color: var(--line); }
.step-dots { display: flex; gap: 8px; justify-content: center; }
.step-dots .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--line);
}
.step-dots .dot.on { background: var(--accent); }
.dropzone-lg { padding: 40px 24px; }

/* Tabs */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f1ede5;
  border-radius: 999px;
  align-self: center;
}
.tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  color: var(--dim);
}
.tab:hover { border-color: transparent; color: var(--ink); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,20,20,0.08); }
.tab-panel { width: 100%; }
.tab-panel[hidden] { display: none; }
#panel-link { max-width: 560px; margin: 0 auto; }
.side-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}
.join-block { width: 100%; }

.join-avatar { width: 130px; height: 130px; }
.join-tag { color: var(--dim); margin: 0; text-align: center; }

.tiny-link { font-size: 0.82rem; color: var(--dim); }
.tiny-link:hover { color: var(--ink); }

.chip[hidden] { display: none; }
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef3ec;
  border: 1px solid #d4e0d0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 500;
}
.chip .chip-x {
  border: none;
  background: none;
  padding: 2px 6px;
  color: var(--dim);
  margin-left: auto;
}
.chip .chip-x:hover { color: var(--danger); }
.chip a { color: var(--dim); margin-left: auto; font-size: 0.85rem; }
.chip a + a { margin-left: 0; }            /* second link (clear) sits beside replace */
#cv-clear:hover { color: var(--danger); }  /* clear reads as destructive */

.dropzone {
  width: 100%;
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #f2f6f1; }

/* ── Matched roles ─────────────────────────────────────────────── */

.roles-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.roles-title { font-family: Georgia, serif; font-size: 1.25rem; margin: 0; }
.roles-nav { display: flex; gap: 8px; }
.roles-arrow {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.roles-arrow:disabled { opacity: 0.35; }

/* A scroll-snap carousel that reads as a 4-up grid: 4 cards fit the band on
   wide screens, 2 on tablet, 1 on mobile; the ‹ › control pages through the 6. */
.roles-grid {
  display: flex;
  align-items: stretch;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* overflow-x:auto also clips the Y axis, so pad room for each card's shadow,
     hover lift, and selected ring instead of letting them get cropped. */
  padding: 8px 4px 24px;
  scroll-padding: 4px;
  scrollbar-width: none;
}
.roles-grid::-webkit-scrollbar { display: none; }

.role-card {
  flex: 0 0 calc((100% - 72px) / 4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 28px;
  min-height: 190px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(20, 20, 20, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.role-card:hover, .role-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.09);
  transform: translateY(-2px);
}
.role-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.role-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-company { margin-top: 3px; color: var(--dim); font-size: 0.85rem; }
.role-why {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;          /* clamp the why-line to ~2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.role-spacer { flex: 1; min-height: 14px; }
.role-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.role-practice {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}
.role-practice:hover { filter: brightness(1.06); }
.role-view { color: var(--dim); font-size: 0.85rem; font-weight: 500; white-space: nowrap; }
.role-view:hover { color: var(--ink); }

@media (max-width: 1023px) { .role-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 600px)  { .role-card { flex-basis: 88%; } }

.roles-note { margin: 10px 2px 0; color: var(--dim); font-size: 0.82rem; }
.roles-error { margin: 8px 2px; color: var(--dim); font-size: 0.9rem; }

/* Loading skeleton while the matcher runs */
.role-skeleton { pointer-events: none; }
.sk-line {
  display: block; height: 12px; margin: 7px 0; border-radius: 6px;
  background: linear-gradient(90deg, #eee9e0, #f6f2ec, #eee9e0);
  background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite;
}
.sk-title { height: 18px; width: 70%; }
.sk-foot  { width: 50%; margin-top: auto; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: var(--dim);
  font-size: 0.82rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

#try-sample { display: block; text-align: center; margin-bottom: 4px; }

.opt-label { display: block; margin: 10px 0 6px; color: var(--ink); font-size: 0.9rem; }
.round-pick {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}
.round-btn {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 9px 4px;
  font-size: 0.85rem;
  color: var(--dim);
  background: transparent;
}
.round-btn + .round-btn { border-left: 1px solid var(--line); }
.round-btn.on { background: var(--accent); color: var(--accent-ink); }

#start-flow { width: 100%; }

#options { width: 100%; color: var(--dim); }
#options summary { cursor: pointer; font-size: 0.9rem; text-align: center; }
#options[open] {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
#mic-section { width: 100%; }

/* ── Interview room: voice-call UI ──────────────────────────────── */

.call-screen { max-width: 640px; }

#interview-room {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.call-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-bottom: 130px; /* room for the floating dock */
}

/* ── Avatar ── */
.avatar-wrap { text-align: center; }
.avatar { width: 220px; height: 220px; }
.avatar * { transform-box: fill-box; transform-origin: center; }
.call-state { color: var(--dim); margin: 6px 0 0; min-height: 1.4em; }

#sprout { transform-origin: 50% 92%; }
#head   { transform-origin: 50% 80%; }
#leafL  { transform-origin: 90% 80%; }
#leafR  { transform-origin: 10% 80%; }
#sprout, #head, #leafL, #leafR, #eyeL, #eyeR, #mouthClosed { transition: transform 0.5s ease; }

/* idle (THINKING-label aside, idle visuals apply to CONFIRMING too) */
#sprout { animation: av-breathe 3s ease-in-out infinite; }
@keyframes av-breathe { 50% { transform: scale(1.02); } }
#eyeL, #eyeR { animation: av-blink 5.2s infinite; }
#eyeR { animation-delay: 0.06s; }
@keyframes av-blink {
  0%, 93.5%, 100% { transform: scaleY(1); }
  95.5% { transform: scaleY(0.12); }
}
#head { animation: av-sway 4.2s ease-in-out infinite; }
@keyframes av-sway { 50% { transform: rotate(3deg); } }
#leafL { animation: av-leaf-sway 4.2s ease-in-out infinite; }
#leafR { animation: av-leaf-sway 4.2s ease-in-out infinite reverse; }
@keyframes av-leaf-sway { 50% { transform: rotate(-4deg); } }

/* speaking */
#mouthOpen { opacity: 0; }
#interview-room[data-state="SPEAKING"] #mouthClosed { animation: av-talk-c 0.6s ease-in-out infinite; }
#interview-room[data-state="SPEAKING"] #mouthOpen   { animation: av-talk-o 0.6s ease-in-out infinite; }
@keyframes av-talk-c { 0%, 100% { opacity: 1; } 40%, 70% { opacity: 0; } }
@keyframes av-talk-o {
  0%, 100% { opacity: 0; transform: scaleY(0.55); }
  40%, 70% { opacity: 1; transform: scaleY(1); }
}
#interview-room[data-state="SPEAKING"] #sprout { animation: av-bob 0.6s ease-in-out infinite; }
@keyframes av-bob { 50% { transform: translateY(-2.5px); } }

/* listening */
#interview-room[data-state="LISTENING"] #sprout {
  transform: rotate(4deg);
  animation: av-breathe-lean 3s ease-in-out infinite;
}
@keyframes av-breathe-lean { 50% { transform: rotate(4deg) scale(1.02); } }
#interview-room[data-state="LISTENING"] #eyeL,
#interview-room[data-state="LISTENING"] #eyeR { animation: av-blink-wide 6.5s infinite; }
@keyframes av-blink-wide {
  0%, 94.5%, 100% { transform: scale(1.28); }
  96.5% { transform: scale(1.28) scaleY(0.12); }
}
#interview-room[data-state="LISTENING"] #head { transform: rotate(-4deg) scale(1.04); animation: none; }

/* thinking */
#interview-room[data-state="THINKING"] #sprout { animation: av-ponder 4.5s ease-in-out infinite; }
@keyframes av-ponder {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
#interview-room[data-state="THINKING"] #eyeL,
#interview-room[data-state="THINKING"] #eyeR { transform: translate(3.5px, -4px); animation: none; }
#interview-room[data-state="THINKING"] #mouthClosed { transform: scaleX(0.72); }
#interview-room[data-state="THINKING"] #head { transform: rotate(7deg) translateY(3px); animation: none; }

/* sent: one-shot bounce (class added after data-state flips, so keep it last) */
#interview-room.sent #sprout { animation: av-bounce 0.7s ease-in-out 1; }
@keyframes av-bounce {
  0%   { transform: scale(1, 1); }
  25%  { transform: scale(1.08, 0.9); }
  55%  { transform: scale(0.94, 1.07) translateY(-7px); }
  75%  { transform: scale(1.03, 0.97); }
  100% { transform: scale(1, 1); }
}
#interview-room.sent #head { animation: av-head-flick 0.7s ease-in-out 1; }
@keyframes av-head-flick {
  35% { transform: rotate(-8deg); }
  70% { transform: rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar * { animation: none !important; }
}

/* ── Transcript card ── */
#transcript-card {
  position: relative;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px 22px;
  overflow: hidden;
}
.call-screen.cc-off #transcript-card { display: none; }

#transcript-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 0.85rem;
}
.tc-title { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.75rem; }
#transcript-card .timer { margin-left: auto; font-variant-numeric: tabular-nums; }
#interview-room[data-state="LISTENING"] .timer { color: var(--listening); }
#iv-expand { border: none; background: none; padding: 4px; color: var(--dim); font-size: 0.85rem; }
#iv-expand:hover { color: var(--ink); }

.tc-body { position: relative; min-height: 96px; }
.tc-q { font-size: 1.08rem; line-height: 1.5; margin: 10px 0 6px; min-height: 1.5em; }
.tc-a { color: var(--accent); margin: 4px 0 6px; }
.tc-a:empty { margin: 0; }
.tc-a .interim { color: var(--dim); font-style: italic; }

#iv-history { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
#iv-history details { border-bottom: 1px solid var(--line); padding: 6px 0; }
#iv-history summary { cursor: pointer; font-size: 0.92rem; }
#iv-history p { color: var(--dim); font-size: 0.92rem; }

/* topic pill — always visible, even with the transcript hidden */
.topic-pill {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── Floating control dock ── */
.control-dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
}
.control-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(60, 50, 30, 0.12);
}
.pill-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  padding: 0;
}
.pill-btn.mic { width: 60px; height: 60px; font-size: 1.5rem; }
.pill-btn.mic.muted { background: #f3e9e6; border-color: var(--danger); }
.pill-btn.mic.ptt { border-color: var(--listening); box-shadow: 0 0 0 3px rgba(201,138,45,.3); }
.pill-btn.cc { font-size: 0.85rem; font-weight: 700; color: var(--dim); }
.pill-btn.cc.on { color: var(--accent); border-color: var(--accent); }
.pill-btn.end { background: var(--danger); border-color: var(--danger); color: #fff; }
#iv-done { color: var(--accent); border-color: var(--accent); opacity: 0.35; pointer-events: none; }
#interview-room[data-state="LISTENING"] #iv-done { opacity: 1; pointer-events: auto; }
.dock-meta { display: flex; gap: 12px; align-items: center; }
#iv-issues { color: var(--dim); font-size: 0.85rem; }
#iv-echo-mode {
  font-size: 0.72rem;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
  background: var(--card);
}
.end-confirm {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(60, 50, 30, 0.14);
}
.end-confirm[hidden] { display: none; }

/* ⌥D latency overlay */
#iv-debug {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  background: rgba(43, 42, 39, 0.92);
  color: #f2efe8;
  font: 12px/1.6 ui-monospace, Menlo, monospace;
  padding: 10px 14px;
  border-radius: 8px;
  pointer-events: none;
}

/* typed-answer + help cards */
.type-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
}
.type-card ul { margin: 6px 0; padding-left: 18px; }

#db-per-question details { border-top: 1px solid var(--line); padding: 8px 0; }
#db-per-question summary { cursor: pointer; }

/* ── Debrief: dashboard grid (one layout, two shapes) ───────────── */

.debrief { max-width: 1080px; }
.debrief h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 12px;
}

.debrief-avatar { width: 72px; height: 72px; display: block; margin: 0 auto 18px; }

.db-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  align-items: stretch;
}
.db-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
/* Single-column narrative, in DOM order:
   headline → strength → fixes → mentor → scorecard(collapsed) → proof → patterns → questions */
.db-grid > .db-card, .db-grid > .db-strength { grid-column: 1 / -1; }
.card-proof[hidden] { display: none; }

/* One genuine strength, in a soft positive band under the headline */
.db-strength {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: #eef3ec;
  border: 1px solid #d4e0d0;
  border-radius: 12px;
  padding: 14px 18px;
}
.db-strength[hidden] { display: none; }
.strength-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
#db-strength-text { font-size: 0.95rem; color: var(--ink); line-height: 1.45; }

.proof-row { padding: 8px 0; border-top: 1px solid var(--line); }
.proof-row:first-child { border-top: none; padding-top: 0; }
.proof-row strong { display: block; font-size: 0.95rem; }
.proof-row p { margin: 2px 0 0; color: var(--dim); font-size: 0.88rem; }

/* Headline = the warm session summary, the first and largest thing read.
   The score + label are demoted to a small muted subline — never the hero. */
.db-headline { margin: 0; font-size: 1.4rem; line-height: 1.45; font-weight: 500; color: var(--ink); }
.db-subline { margin: 12px 0 0; font-size: 0.85rem; color: var(--dim); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.growth-label { font-weight: 600; letter-spacing: 0.02em; }
.db-score-small { color: var(--dim); }
.db-score-small::before { content: "· "; }
.attempt-delta { color: var(--dim); }

/* "See full breakdown ▾" — scorecard collapsed by default */
.comps-toggle {
  border: none;
  background: none;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.comps-toggle:hover { text-decoration: underline; }
#db-competencies[hidden] { display: none; }
#db-competencies { margin-top: 14px; }

/* fixes — biggest card, numbered rows */
.fix-rows { margin: 0; padding: 0; counter-reset: fix; list-style: none; }
.fix-rows li {
  counter-increment: fix;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px 12px 50px;
  margin: 0 0 10px;
  position: relative;
}
.fix-rows li:last-child { margin-bottom: 0; }
.fix-rows li::before {
  content: counter(fix);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}
.fix-rows strong { display: block; }
.fix-rows span { color: var(--dim); font-size: 0.9rem; }

/* competencies */
#db-competencies.two-col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
/* Each row is a vertical stack: name on top, then the bar + score on their own
   line, then evidence. This keeps the bar aligned no matter how many lines the
   competency name wraps to. */
.comp-row { margin: 0 0 18px; }
.comp-row:last-child { margin-bottom: 0; }
.comp-name { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.3; margin-bottom: 6px; }
.comp-band { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.band-segs { display: inline-flex; gap: 3px; }
.band-segs .seg { width: 16px; height: 6px; border-radius: 3px; background: var(--line); }
.band-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.01em; }
/* Growth palette — never red/shame. Strong→green, Solid→soft green,
   Developing→amber, Needs work→muted neutral. */
.band-strong  .seg.on { background: #2f6f5e; } .band-strong  .band-label { color: #2f6f5e; }
.band-solid   .seg.on { background: #6aa78f; } .band-solid   .band-label { color: #4d8a73; }
.band-developing .seg.on { background: #c9912d; } .band-developing .band-label { color: #a9781f; }
.band-needs   .seg.on { background: #b0a99c; } .band-needs   .band-label { color: #8a857c; }
.comp-evidence { margin: 0; color: var(--dim); font-size: 0.88rem; font-style: italic; line-height: 1.4; }
.comp-grow { margin: 4px 0 0; color: var(--ink); font-size: 0.85rem; line-height: 1.4; }
.comp-mentor-cue {
  margin: 8px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.comp-mentor-cue:hover { text-decoration: underline; }
.mentor-comp-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  background: #eef3ec;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

/* mentor card — gap items side-by-side */
#db-mentor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#db-mentor:has(.mentor-empty) { display: block; }
@media (max-width: 640px) { #db-mentor { grid-template-columns: 1fr; } }
.mentor-row {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px 14px;
}
.mentor-row strong { display: block; font-size: 0.95rem; }
.mentor-row p { margin: 2px 0 12px; color: var(--dim); font-size: 0.88rem; }
.mentor-row a {
  margin-top: auto;             /* pin the button to the bottom so it aligns across cards */
  align-self: flex-start;
  font-size: 0.82rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 14px;
  text-decoration: none;
}
.mentor-empty { color: var(--dim); font-size: 0.9rem; font-style: italic; }

/* Connect-ADPList banner (shown when the app isn't authorized yet) */
.mentor-connect {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #eef3ec;
  border: 1px solid #d4e0d0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.mentor-connect p { margin: 0; font-size: 0.88rem; }
.mentor-connect button { padding: 8px 14px; font-size: 0.85rem; }

/* Real mentor cards */
.mentor-slot { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mentor-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.mentor-head { display: flex; align-items: center; gap: 10px; }
.mentor-photo { width: 38px; height: 38px; border-radius: 999px; object-fit: cover; }
.mentor-head strong { display: block; font-size: 0.92rem; }
.mentor-title { color: var(--dim); font-size: 0.8rem; }
.mentor-why { margin: 8px 0 0; font-size: 0.85rem; line-height: 1.4; }
.mentor-book { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 0.82rem; }
.mentor-share { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 0.8rem; color: var(--dim); cursor: pointer; }
.mentor-share input { margin: 0; }
.mentor-share-preview { margin: 4px 0 0; font-size: 0.78rem; color: var(--dim); font-style: italic; }
.mentor-none { margin: 6px 0 0; font-size: 0.85rem; }

/* patterns — two-column bullet grid, horizontal lines not a tall ribbon */
.card-patterns ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.92rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}
@media (max-width: 900px) { .card-patterns ul { grid-template-columns: 1fr; } }
.card-patterns li { margin: 0; }

/* question accordion */
.qa-row { border-top: 1px solid var(--line); }
.qa-row summary { cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 4px; }
.qa-q { flex: 1; font-size: 0.95rem; }
.q-chip { flex-shrink: 0; font-size: 0.75rem; border-radius: 999px; padding: 2px 10px; background: #eef3ec; color: var(--accent); }
.q-chip.warn { background: #fcf3e3; color: #8c6418; }
.qa-body { padding: 4px 4px 16px; }
.qa-transcript { color: var(--dim); font-style: italic; }
.qa-more { margin-top: 10px; }
.model-answer-head { font-weight: 600; margin-bottom: 2px; }
.model-answer { background: #f4f1ea; border-radius: 8px; padding: 10px 14px; }

/* sticky action bar */
.debrief-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 18px 0 22px;
  margin-top: 26px;
  background: linear-gradient(to top, var(--bg) 75%, transparent);
}

/* ── Mentor prep-brief (consent-gated preview) ──────────────────── */
.brief-peek {
  margin-top: 10px; padding: 0; border: none; background: none;
  color: var(--accent); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.brief-peek:hover { text-decoration: underline; }

.brief-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.brief-modal[hidden] { display: none; }
.brief-backdrop { position: absolute; inset: 0; background: rgba(30,28,24,0.45); }
.brief-sheet {
  position: relative; z-index: 1; text-align: left;
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 16px; padding: 24px 26px;
  box-shadow: 0 20px 60px rgba(20,20,20,0.25);
}
.brief-head { display: flex; align-items: center; justify-content: space-between; }
.brief-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.brief-close { border: none; background: none; font-size: 1.1rem; color: var(--dim); cursor: pointer; padding: 4px; }
.brief-close:hover { color: var(--ink); }
.brief-intro { margin: 8px 0 12px; font-size: 0.85rem; color: var(--dim); line-height: 1.5; }
.brief-sec { padding: 13px 0; border-top: 1px solid var(--line); }
.brief-sec h4 { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.brief-sec h4 .dim { font-weight: 600; text-transform: none; letter-spacing: 0; }
.brief-sec p { margin: 4px 0; font-size: 0.92rem; line-height: 1.45; }
.brief-airead { color: var(--ink); }
.brief-quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--bg); font-size: 0.9rem; line-height: 1.45; border-radius: 0 8px 8px 0; }
.brief-quote .dim { display: block; font-size: 0.78rem; margin-bottom: 3px; }
.brief-words { margin-top: 10px; font-size: 0.78rem; }
.brief-fixes { margin: 6px 0; padding-left: 20px; }
.brief-fixes li { font-size: 0.9rem; margin: 4px 0; }
.brief-focus { background: #eef3ec; border-radius: 12px; border-top: none; padding: 13px 16px; margin-top: 8px; }
.brief-consent { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.brief-consent label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; }
.brief-consent .dim { margin: 6px 0 0; font-size: 0.8rem; line-height: 1.45; }

/* ── Login gate ─────────────────────────────────────────────────────── */
#screen-login {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; flex-direction: column;
  padding: 24px;
  background: var(--bg);
}
/* Card centers within the upper portion of the page (a touch above dead-center),
   so a big screen reads as framed top-and-bottom rather than half-empty. */
.login-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 14vh;
}
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 44px 40px; max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 10px 40px rgba(43, 42, 39, 0.08);
}
.login-footer {
  flex: 0 0 auto; text-align: center;
  color: var(--dim); font-size: 12px; line-height: 1.5;
  padding-top: 8px;
}
.login-flower { width: 84px; height: 84px; margin: 0 auto 8px; display: block; }
.login-card h1 { font-size: 1.5rem; margin: 0 0 10px; }
.login-card > p { color: var(--dim); font-size: 0.92rem; line-height: 1.5; margin: 0 0 24px; }
.login-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; font-size: 0.95rem; font-weight: 600;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.login-google:hover { background: var(--bg); border-color: var(--dim); }
.login-card #login-step-email > p,
.login-card #login-step-code > p { color: var(--dim); font-size: 0.92rem; line-height: 1.5; margin: 0 0 18px; }
.login-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  outline: none; transition: border-color 0.15s;
}
.login-input:focus { border-color: var(--accent); }
.login-code-input { text-align: center; letter-spacing: 0.4em; font-size: 1.25rem; font-weight: 600; }
.login-btn {
  width: 100%; margin-top: 10px; padding: 12px 16px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: none; border-radius: 999px;
  transition: opacity 0.15s;
}
.login-btn:hover { opacity: 0.92; }
.login-btn:disabled { opacity: 0.6; cursor: default; }
.login-link {
  margin-top: 14px; border: none; background: none; cursor: pointer;
  color: var(--dim); font-size: 0.82rem; text-decoration: underline;
}
.login-error { color: var(--danger); font-size: 0.84rem; margin: 14px 0 0; line-height: 1.4; }
.login-fineprint { color: var(--dim); font-size: 0.76rem; margin: 18px 0 0; }

/* Mobile: comfortable side padding, card fills the width (not a tiny box). */
@media (max-width: 480px) {
  #screen-login { padding: 16px; }
  .login-main { padding-bottom: 8vh; }
  .login-card { padding: 32px 22px; border-radius: 16px; }
}

/* Signed-in badge */
#user-badge {
  position: fixed; top: 12px; right: 14px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 6px 5px 12px; font-size: 0.8rem; color: var(--dim);
  box-shadow: 0 2px 10px rgba(43, 42, 39, 0.06);
}
#user-badge #user-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-signout {
  border: none; background: var(--bg); color: var(--ink); font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
#user-signout:hover { background: var(--line); }

/* ── Aha: CV-vs-role gap scan (shown on the role step before starting) ── */
.gap-scan {
  margin: 18px 0 6px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  text-align: left;
}
.gap-scan-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.gap-scan-list { margin: 0; padding-left: 18px; }
.gap-scan-list li { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.gap-scan-list li:last-child { margin-bottom: 0; }
.gap-scan-list li strong { color: #2b2a27; }
