/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --radius: 0.875rem;
  --background:      #f9f9fe;
  --foreground:      #1c1f35;
  --card:            #ffffff;
  --card-foreground: #1c1f35;
  --muted:           #f0f1f8;
  --muted-fg:        #6b7491;
  --border:          rgba(170,180,220,0.45);
  --primary:         #5571d9;
  --accent:          #a855f7;
  --orange:          #f5956d;
  --destructive:     #e05a6b;
  --emerald:         #22c98c;
  --amber:           #f59e0b;
  --rose:            #e05a6b;

  --gradient-brand:  linear-gradient(135deg, #f5956d 0%, #a855f7 50%, #5571d9 100%);
  --gradient-surface: linear-gradient(160deg, #f9f9fe 0%, #eef0fa 100%);
  --shadow-glow: 0 20px 60px -20px rgba(140,100,230,0.28);
  --shadow-soft: 0 8px 28px -10px rgba(20,25,60,0.10);
}

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

/* ── Base ──────────────────────────────────────────────────── */
body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 60% 50% at 15%   0%, rgba(245,149,109,0.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 100% 10%, rgba(168,85,247,0.16), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(85,113,217,0.10), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── Layout ────────────────────────────────────────────────── */
.page { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; position: relative; z-index: 1; }

/* ── Header ────────────────────────────────────────────────── */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.875rem;
  background-image: var(--gradient-brand);
  box-shadow: var(--shadow-glow);
  display: grid; place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-fg); }
.brand-name  { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }

.user-switcher {
  display: flex; align-items: center; gap: 0.25rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.7);
  border-radius: 999px;
  padding: 0.25rem;
  backdrop-filter: blur(8px);
}
.user-btn {
  border: none; cursor: pointer;
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  transition: all 0.15s;
  color: var(--muted-fg);
  background: none;
}
.user-btn:hover { color: var(--foreground); }
.user-btn.active {
  background-image: var(--gradient-brand);
  color: var(--background);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

/* ── Nav tabs — persistent strip between header and content ─── */
.nav-tabs {
  display: flex; gap: 0.5rem;
  padding: 1.25rem var(--page-pad, 2rem) 0;
  margin-bottom: 0;
}
.tab {
  cursor: pointer;
  font-size: 0.82rem; font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.7);
  color: var(--muted-fg);
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.tab:hover { color: var(--foreground); border-color: rgba(170,180,220,0.8); }
.tab.active {
  background-image: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero { margin-top: 3rem; max-width: 48rem; }
.hero-eyebrow {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--muted-fg);
}
.hero-headline {
  margin-top: 0.75rem;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero-headline .gradient-text {
  background-image: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 1.25rem;
  max-width: 38rem;
  font-size: 1rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

/* ── Background gradient orbs ──────────────────────────────── */
.app-orb {
  position: fixed; pointer-events: none; z-index: 0; border-radius: 50%;
  filter: blur(80px);
}
.app-orb-left {
  left: -8rem; top: 20%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(245,149,109,0.18) 0%, rgba(168,85,247,0.14) 50%, transparent 100%);
}
.app-orb-right {
  right: -10rem; bottom: 15%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(168,85,247,0.14) 0%, rgba(85,113,217,0.12) 50%, transparent 100%);
  filter: blur(100px);
}

/* ── Spotlight card (practice panels) ─────────────────────── */
.practice-grid {
  display: grid; gap: 1.25rem; margin-top: 2.5rem; position: relative; z-index: 1;
}
@media (min-width: 768px) {
  .practice-grid { grid-template-columns: 1.2fr 1fr; }
}

.spotlight-card {
  position: relative; overflow: hidden;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}
.spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: transparent;
}

/* Gradient border ring that appears on hover */
.spotlight-ring {
  position: absolute; inset: 0; border-radius: 2rem;
  background: var(--gradient-brand);
  pointer-events: none; opacity: 0;
  transition: opacity 0.45s;
  /* Mask to show only the 1px border */
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.spotlight-card:hover .spotlight-ring { opacity: 1; }

/* Mouse-following spotlight */
.spotlight-overlay {
  position: absolute; inset: 0; border-radius: 2rem;
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s;
}
.spotlight-card:hover .spotlight-overlay { opacity: 1; }

/* Content wrapper sits above the overlays */
.spotlight-content { position: relative; z-index: 1; padding: 2rem 2.25rem; height: 100%; display: flex; flex-direction: column; }

.practice-left .spotlight-content  { gap: 1.25rem; }
.transcript-panel { min-height: 420px; }
.transcript-panel .spotlight-content { gap: 0; }

.q-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.85);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem; color: var(--muted-fg);
}
.q-tag-dot {
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  background-image: var(--gradient-brand);
  flex-shrink: 0;
}
.q-select-wrapper { margin-top: 0 }
.q-text {
  margin-top: 1.25rem;
  font-size: 1.2rem; font-weight: 500;
  line-height: 1.45; color: var(--foreground);
}
.q-select {
  display: block; width: 100%;
  background: rgba(240,241,248,0.85);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.q-select option { background: #f0f1f8; }
.q-select optgroup { background: #f0f1f8; color: var(--primary); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.q-select optgroup option { color: var(--foreground); font-weight: 400; font-size: 0.875rem; text-transform: none; letter-spacing: 0; padding-left: 1rem; }

/* Custom question input */
.custom-q-row { margin-top: 0.625rem; }
.custom-q-input {
  width: 100%; box-sizing: border-box;
  background: rgba(240,241,248,0.85);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: var(--foreground);
  font-family: inherit; font-size: 0.875rem;
  padding: 0.6rem 0.875rem;
  outline: none; transition: border-color 0.15s;
}
.custom-q-input::placeholder { color: var(--muted-fg); }
.custom-q-input:focus { border-color: rgba(85,113,217,0.5); }

/* Recorder row */
.recorder-row {
  margin-top: 2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.record-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: none; cursor: pointer;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 600;
  background-image: var(--gradient-brand);
  color: var(--background);
  box-shadow: var(--shadow-glow);
  transition: opacity 0.15s;
  position: relative;
}
.record-btn:hover { opacity: 0.92; }
.record-btn.recording { background-image: none; background-color: var(--destructive); }
.rec-dot {
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: rgba(240,241,248,0.7);
  display: grid; place-items: center;
  font-size: 0.55rem;
}
.rec-dot::after { content: "●"; }
.record-btn.recording .rec-dot::after { content: "■"; }
.ping-ring {
  position: absolute; inset: 0;
  border-radius: 999px;
  animation: ping 1.2s cubic-bezier(0,0,0.2,1) infinite;
  background: rgba(255,255,255,0.2);
  pointer-events: none;
  display: none;
}
.recording .ping-ring { display: block; }
@keyframes ping {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

.cancel-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.8rem; color: var(--muted-fg);
  cursor: pointer; transition: all 0.15s;
}
.cancel-btn:hover { border-color: var(--destructive); color: var(--rose); }

.rec-timer { font-family: monospace; font-size: 0.875rem; color: var(--muted-fg); }

/* Waveform */
.waveform {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
}
.waveform span {
  display: block; width: 3px; border-radius: 999px;
  background: rgba(107,116,145,0.45);
  transition: height 0.1s, opacity 0.2s;
}
.waveform.active span { opacity: 0.85; }

.rec-tip { margin-top: 1.5rem; font-size: 0.75rem; color: var(--muted-fg); }

/* Transcript panel */
.transcript-header {
  display: flex; align-items: center; justify-content: space-between;
}
.transcript-label {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-fg);
}
.transcript-badge {
  border-radius: 999px;
  background: rgba(34,201,140,0.10);
  padding: 0.25rem 0.75rem;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--emerald);
  outline: 1px solid rgba(34,201,140,0.25);
}
/* Empty state placeholder */
.transcript-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin-top: 1rem;
  border: 1.5px dashed var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem; text-align: center;
  background: rgba(240,241,248,0.5);
}
.transcript-empty-icon { font-size: 2rem; margin-bottom: 0.75rem; opacity: 0.5; }
.transcript-empty p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; max-width: 220px; }
.transcript-text {
  margin-top: 1rem;
  font-size: 0.875rem; line-height: 1.7;
  color: var(--foreground);
  max-height: 320px; overflow-y: auto;
  padding-right: 0.25rem;
  white-space: pre-wrap;
}
.hl-filler { background: rgba(224,90,107,0.12); color: var(--rose);   border-radius: 3px; padding: 0 2px; }
.hl-hedge  { background: rgba(245,158,11,0.10); color: var(--amber);  border-radius: 3px; padding: 0 2px; }

/* Loading */
.loading { margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted-fg); }

/* ── Metrics section ───────────────────────────────────────── */
.metrics-section { margin-top: 3rem; }
.metrics-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 1rem;
}
.metrics-eyebrow {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--muted-fg);
}
.metrics-title {
  margin-top: 0.25rem;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em;
}
.delete-btn {
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--muted-fg);
  transition: color 0.15s;
}
.delete-btn:hover { color: var(--rose); }

.metrics-grid {
  margin-top: 1.5rem;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.metric-card {
  position: relative; overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.85);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s, border-color 0.15s;
}
.metric-card:hover { transform: translateY(-2px); border-color: rgba(85,113,217,0.35); }
.metric-card-hover-glow {
  pointer-events: none;
  position: absolute; right: -2.5rem; top: -2.5rem;
  width: 6rem; height: 6rem; border-radius: 50%;
  background-image: var(--gradient-brand);
  opacity: 0; filter: blur(24px);
  transition: opacity 0.2s;
}
.metric-card:hover .metric-card-hover-glow { opacity: 0.2; }

.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted-fg);
}
.metric-icon {
  width: 1.75rem; height: 1.75rem; border-radius: 0.4rem;
  display: grid; place-items: center;
  font-size: 0.75rem;
  outline: 1px solid;
}
.metric-icon.ok   { color: var(--emerald); background: rgba(34,201,140,0.10); outline-color: rgba(34,201,140,0.20); }
.metric-icon.warn { color: var(--amber);   background: rgba(245,158,11,0.10);  outline-color: rgba(245,158,11,0.20); }
.metric-icon.bad  { color: var(--rose);    background: rgba(224,90,107,0.10);  outline-color: rgba(224,90,107,0.20); }
.metric-icon.est  { color: var(--muted-fg); background: rgba(240,241,248,0.75); outline-color: var(--border); }

.metric-value-row { margin-top: 1rem; display: flex; align-items: baseline; gap: 0.375rem; }
.metric-value { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-unit  { font-size: 0.75rem; color: var(--muted-fg); }
.metric-hint  { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted-fg); }
.metric-target { margin-top: 0.4rem; font-size: 0.68rem; font-style: italic; color: #6b7491; line-height: 1.45; }
.metric-est-tag { font-size: 0.65rem; color: var(--muted-fg); font-style: italic; margin-top: 0.25rem; }

.metric-info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.3rem; font-size: 0.65rem;
  color: var(--muted-fg); cursor: default;
  vertical-align: middle; position: relative; top: -1px;
}
.metric-info-icon:hover { color: var(--foreground); }

/* ── Claude report ─────────────────────────────────────────── */
.readiness-row { display: flex; align-items: center; gap: 1rem; margin-bottom: -0.5rem; }
.report-section { margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem; }

.rewrite-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(85,113,217,0.25);
  background: rgba(240,241,248,0.85);
  padding: 1.75rem;
  box-shadow: var(--shadow-glow);
}
.rewrite-card h2 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-fg); margin-bottom: 0.75rem; }
.readiness-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: 999px; padding: 0.25rem 0.875rem;
  font-size: 0.8rem; font-weight: 600;
  margin-bottom: 1rem;
}
.readiness-badge.not-yet       { background: rgba(224,90,107,0.08); color: var(--rose); outline: 1px solid rgba(224,90,107,0.18); }
.readiness-badge.close         { background: rgba(245,158,11,0.08); color: var(--amber); outline: 1px solid rgba(245,158,11,0.18); }
.readiness-badge.interview-ready { background: rgba(34,201,140,0.08); color: var(--emerald); outline: 1px solid rgba(34,201,140,0.20); }
.rewrite-text {
  font-size: 0.9rem; line-height: 1.7;
  color: var(--foreground);
  white-space: pre-wrap; margin-bottom: 1rem;
}
.copy-btn {
  background-image: var(--gradient-brand);
  color: var(--background);
  border: none; border-radius: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.copy-btn:hover { opacity: 0.9; }

.what-worked-card {
  border-radius: 1rem;
  border: 1px solid rgba(34,201,140,0.20);
  background: rgba(34,201,140,0.06);
  padding: 1.25rem 1.5rem;
}
.what-worked-card h3 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--emerald); margin-bottom: 0.75rem; }
.what-worked-card ul { padding-left: 1.25rem; font-size: 0.875rem; line-height: 1.6; color: var(--foreground); }

.fixes-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.75);
  padding: 1.25rem 1.5rem;
}
.fixes-card h3 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-fg); margin-bottom: 0.75rem; }
.fixes-card ol { padding-left: 1.25rem; font-size: 0.875rem; line-height: 1.8; color: var(--foreground); }
.drill-line {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px dashed var(--border);
  font-size: 0.875rem; font-weight: 600;
  color: var(--foreground);
}

.scores-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.75);
  padding: 1.25rem 1.5rem;
}
.scores-grid { display: grid; gap: 1.5rem; }
@media (min-width: 540px) { .scores-grid { grid-template-columns: 1fr 1fr; } }
.scores-col h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-fg); margin-bottom: 0.6rem; }
.score-row { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.8rem; color: var(--muted-fg); border-bottom: 1px solid var(--border); }
.score-row:last-child { border-bottom: none; }
.score-row .sc { font-weight: 700; color: var(--foreground); }

/* ── Progress tab ──────────────────────────────────────────── */
.progress-section { margin-top: 2rem; }
.filter-row { margin-bottom: 1.5rem; }
.filter-row label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-fg); display: block; margin-bottom: 0.4rem; }
.filter-row select {
  background: rgba(240,241,248,0.85);
  border: 1px solid var(--border);
  color: var(--foreground);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: 100%; max-width: 24rem;
  -webkit-appearance: none; appearance: none;
}
.charts-grid { display: flex; flex-direction: column; gap: 1rem; }
.charts-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 540px) { .charts-grid-4 { grid-template-columns: 1fr; } }
.chart-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.85);
  padding: 1.25rem 1.5rem;
}
.chart-card-sm {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.85);
  padding: 1.25rem 1.5rem;
}
.chart-card h3, .chart-card-sm h3 { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-fg); margin-bottom: 0.625rem; }
.readiness-summary { margin: 1.5rem 0; font-size: 0.875rem; color: var(--muted-fg); }
.clear-btn {
  background: rgba(224,90,107,0.07);
  color: var(--rose);
  border: 1px solid rgba(224,90,107,0.18);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer; transition: background 0.15s;
}
.clear-btn:hover { background: rgba(224,90,107,0.12); }

/* ── Session note ───────────────────────────────────────────── */
.session-note-wrap {
  margin-top: 1.25rem;
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.session-note-input {
  flex: 1; resize: none;
  background: rgba(240,241,248,0.85);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--foreground);
  font-family: inherit; font-size: 0.82rem; line-height: 1.5;
  padding: 0.625rem 0.875rem;
  outline: none; transition: border-color 0.15s;
}
.session-note-input::placeholder { color: var(--muted-fg); }
.session-note-input:focus { border-color: rgba(85,113,217,0.4); }
.note-save-btn {
  background: rgba(240,241,248,0.95);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: var(--foreground); font-size: 0.8rem;
  padding: 0.5rem 0.875rem; cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.note-save-btn:hover { background: rgba(230,232,244,0.98); }

/* ── Progress - new sections ───────────────────────────────── */
.section-eyebrow {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-fg); margin-bottom: 1rem;
}

.monthly-summary {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background-image: var(--gradient-surface);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.monthly-summary .summary-eyebrow {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted-fg);
  grid-column: 1/-1; margin-bottom: -0.5rem;
}
.summary-stat { }
.summary-stat .stat-value {
  font-size: 2rem; font-weight: 700;
  letter-spacing: -0.02em;
  background-image: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.summary-stat .stat-label { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.2rem; }

.first-vs-now {
  border-radius: 1.25rem;
  border: 1px solid rgba(85,113,217,0.20);
  background: rgba(240,241,248,0.75);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.first-vs-now .fvn-title {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-fg); margin-bottom: 1.25rem;
}
.fvn-grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.fvn-cell { }
.fvn-cell .fvn-metric { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 0.35rem; }
.fvn-cell .fvn-values { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.fvn-cell .fvn-then { color: var(--muted-fg); font-weight: 400; }
.fvn-cell .fvn-arrow { color: var(--muted-fg); font-size: 0.75rem; }
.fvn-cell .fvn-now { color: var(--foreground); }
.fvn-cell .fvn-now.better { color: var(--emerald); }
.fvn-cell .fvn-now.worse  { color: var(--rose); }

.weak-heatmap {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.75);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.heatmap-grid {
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.heatmap-cell {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  padding: 0.6rem 0.875rem;
  font-size: 0.8rem;
}
.heatmap-cell .hc-name { color: var(--foreground); }
.heatmap-cell .hc-bar-wrap {
  flex: 1; margin: 0 0.75rem;
  height: 4px; border-radius: 999px;
  background: rgba(85,113,217,0.12);
  overflow: hidden;
}
.heatmap-cell .hc-bar { height: 100%; border-radius: 999px; }
.heatmap-cell .hc-bar.ok   { background: var(--emerald); }
.heatmap-cell .hc-bar.warn { background: var(--amber); }
.heatmap-cell .hc-bar.bad  { background: var(--rose); }
.heatmap-cell .hc-pct { font-size: 0.72rem; color: var(--muted-fg); white-space: nowrap; }

/* ── Recent runs ────────────────────────────────────────────── */
.recent-runs { margin-top: 0.5rem; }

.run-card {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: rgba(240,241,248,0.75);
  margin-bottom: 0.875rem;
  overflow: hidden;
}
.run-card-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; cursor: pointer; user-select: none;
}
.run-card-header:hover { background: rgba(240,241,248,0.8); }
.run-card-header .run-date { font-size: 0.75rem; color: var(--muted-fg); white-space: nowrap; }
.run-card-header .run-q    { flex: 1; font-size: 0.85rem; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-card-header .run-badge {
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 999px; white-space: nowrap;
}
.run-badge.interview-ready { background: rgba(34,201,140,0.10); color: var(--emerald); }
.run-badge.close           { background: rgba(245,158,11,0.10); color: var(--amber);   }
.run-badge.not-yet         { background: rgba(224,90,107,0.10); color: var(--rose);    }
.run-card-header .run-composite { font-size: 0.85rem; font-weight: 700; color: var(--foreground); }
.run-card-header .run-chevron { font-size: 0.75rem; color: var(--muted-fg); transition: transform 0.2s; }
.run-card-header.open .run-chevron { transform: rotate(180deg); }

.run-card-body { display: none; padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.run-card-body.open { display: block; }

.run-section-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted-fg); margin: 1rem 0 0.4rem;
}
.run-what-worked { font-size: 0.82rem; color: var(--emerald); line-height: 1.6; padding-left: 1.1rem; }
.run-what-worked li { margin-bottom: 0.2rem; }
.run-fixes { font-size: 0.82rem; color: var(--foreground); line-height: 1.6; padding-left: 1.1rem; }
.run-fixes li { margin-bottom: 0.3rem; }
.run-drill {
  margin-top: 0.75rem; padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  background: rgba(85,113,217,0.07); border: 1px solid rgba(85,113,217,0.15);
  font-size: 0.82rem; font-weight: 600; color: var(--foreground);
}
.run-drill span { color: var(--muted-fg); font-weight: 400; }
.run-rewrite {
  margin-top: 0.75rem; padding: 0.875rem; border-radius: 0.75rem;
  background: rgba(240,241,248,0.85); border: 1px solid var(--border);
  font-size: 0.82rem; line-height: 1.7; color: var(--foreground);
}
.run-copy-btn {
  margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted-fg);
  background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline;
}
.run-copy-btn:hover { color: var(--foreground); }
.run-note {
  font-size: 0.8rem; font-style: italic;
  color: var(--muted-fg); line-height: 1.5;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid rgba(85,113,217,0.30);
  margin-bottom: 0.25rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.app-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2rem;
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted-fg);
  position: relative; z-index: 1;
}
.app-footer a { color: var(--muted-fg); transition: color 0.15s; }
.app-footer a:hover { color: var(--primary); }
.footer-feedback-btn {
  background: none; border: 1px solid var(--border); border-radius: 2rem;
  padding: 0.25rem 0.85rem; font-size: 0.78rem; color: var(--muted-fg);
  cursor: pointer; transition: border-color 0.15s, color 0.15s; font-family: inherit;
}
.footer-feedback-btn:hover { border-color: var(--primary); color: var(--primary); }
.feedback-textarea {
  resize: vertical; min-height: 90px; margin-bottom: 0.5rem;
}
.feedback-status {
  font-size: 0.82rem; min-height: 1.2em; margin-bottom: 0.5rem;
  color: var(--primary);
}

/* ── Add-profile modal ──────────────────────────────────────── */
.add-profile-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28,31,53,0.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.add-profile-overlay.active { opacity: 1; pointer-events: all; }
.add-profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%; max-width: 360px;
  box-shadow: 0 24px 64px -16px rgba(20,25,60,0.18);
}
.add-profile-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--foreground);
  margin-bottom: 0.25rem;
}
.add-profile-card p {
  font-size: 0.83rem; color: var(--muted-fg); margin-bottom: 1.25rem;
}
.add-profile-input {
  width: 100%; box-sizing: border-box;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(240,241,248,0.6);
  color: var(--foreground); font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.15s;
  margin-bottom: 1rem;
}
.add-profile-input:focus { border-color: var(--primary); background: #fff; }
.add-profile-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }
.add-profile-cancel {
  padding: 0.55rem 1.1rem; border-radius: 0.6rem;
  border: 1px solid var(--border); background: none;
  color: var(--muted-fg); font-size: 0.875rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.add-profile-cancel:hover { border-color: var(--foreground); color: var(--foreground); }
.add-profile-submit {
  padding: 0.55rem 1.25rem; border-radius: 0.6rem;
  border: none; background: var(--primary); color: #fff;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.add-profile-submit:hover { opacity: 0.88; }
.add-profile-submit:disabled { opacity: 0.5; cursor: default; }

/* ── Login screen ───────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem;
  position: relative;
}
.login-back-btn {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  font-size: 0.82rem; color: var(--muted-fg);
  text-decoration: none;
}
.login-back-btn:hover { color: var(--foreground); }
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.login-brand { margin-bottom: 2rem; }
.login-brand .brand-icon {
  width: 4rem; height: 4rem; border-radius: 1.1rem;
  font-size: 1.7rem; margin: 0 auto 1rem;
}
.login-title { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.login-sub { font-size: 0.875rem; color: var(--muted-fg); margin-top: 0.25rem; }
.login-label {
  display: block; text-align: left;
  font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.5rem;
}
.login-input {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--muted); border: 1px solid var(--border);
  border-radius: 0.5rem; color: var(--foreground);
  font-size: 0.95rem; margin-bottom: 0.75rem; box-sizing: border-box;
}
.login-input:focus { outline: none; border-color: var(--primary); }
.login-btn {
  width: 100%; padding: 0.75rem;
  background: var(--primary); color: white;
  border: none; border-radius: 0.5rem;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.login-btn:hover { opacity: 0.9; }
.login-hint { font-size: 0.8rem; color: var(--muted-fg); margin-top: 0.75rem; }
.login-status { font-size: 0.85rem; color: var(--primary); margin-top: 0.5rem; min-height: 1.2em; }

/* ── Profile switcher ───────────────────────────────────────── */
.profile-switcher-row {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 0.5rem; margin-bottom: 0.75rem;
}
.profile-switcher-label {
  font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background-image: var(--gradient-brand);
  color: #fff;
  white-space: nowrap;
}
.profile-switcher-label::after { content: " →"; }
.profile-switcher {
  display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap;
}
.profile-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted-fg);
  font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
}
.profile-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}
.profile-btn:hover:not(.active) { color: var(--foreground); border-color: var(--foreground); }
.profile-add-btn {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: transparent; color: var(--muted-fg);
  font-size: 0.8rem; cursor: pointer;
}
.profile-add-btn:hover { color: var(--foreground); }

/* Tooltip (generic) */
.has-tooltip { position: relative; }
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--foreground); color: var(--card);
  font-size: 0.72rem; font-weight: 400;
  padding: 0.3rem 0.65rem; border-radius: 6px;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s; z-index: 100;
}
.has-tooltip:hover::after { opacity: 1; }

/* ── Sign-out button ────────────────────────────────────────── */
.signout-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted-fg);
  font-size: 0.8rem; cursor: pointer;
}
.signout-btn:hover { color: var(--destructive); border-color: var(--destructive); }
