@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brand:        #00b8a9;
  --brand-light:  #e6f7f6;
  --brand-dark:   #009688;
  --black:        #0a0a0a;
  --white:        #ffffff;
  --bg:           #f4f4f2;
  --surface:      #ffffff;
  --border:       #e5e7eb;
  --text:         #111827;
  --muted:        #6b7280;
  --warn-bg:      #fffbeb;
  --warn-border:  #f59e0b;
  --warn-text:    #92400e;
  --err-bg:       #fef2f2;
  --err-border:   #ef4444;
  --radius:       12px;
  --radius-sm:    8px;
  /* Musiversal-native elevation: soft, layered, low-contrast */
  --shadow-sm:    0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow:       0 4px 16px -4px rgba(10, 10, 10, 0.08),
                  0 1px 3px rgba(10, 10, 10, 0.04);
  --shadow-lg:    0 12px 32px -8px rgba(10, 10, 10, 0.12);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  background: var(--black);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-title {
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.nav-pill {
  margin-left: 10px;
  padding: 2px 9px;
  background: var(--brand);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Page shell ────────────────────────────────────────────── */
main {
  max-width: 660px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-intro {
  margin-bottom: 24px;
}

.page-intro h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-intro p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  /* visible (not hidden) so tooltips/popovers aren't clipped by the card.
     Corner cleanliness is restored on the first/last children below. */
  overflow: visible;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
/* keep rounded corners now that the card no longer clips overflow */
.card > *:first-child { border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius); }
.card > *:last-child { border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius); }

.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

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

.card-step {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--black);
  font-size: 11px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  margin-right: 9px;
  flex-shrink: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}

.card-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.card-body {
  padding: 20px 24px;
}

/* ── Banners ───────────────────────────────────────────────── */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 24px;
  font-size: 13px;
}

.banner-success {
  background: var(--brand-light);
  border-bottom: 1px solid #c9ede9;
}

.banner-warning {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
}

.banner-error {
  background: var(--err-bg);
  border-left: 3px solid var(--err-border);
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
}

.banner svg { flex-shrink: 0; margin-top: 1px; }

.banner strong { font-weight: 600; display: block; }
.banner p { color: var(--muted); margin-top: 2px; }

/* ── Instrument selector ───────────────────────────────────── */
.instrument-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.instrument-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.instrument-label:hover {
  border-color: var(--brand);
}

.instrument-label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}

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

.instrument-emoji { font-size: 26px; line-height: 1; }

.instrument-name {
  font-size: 14px;
  font-weight: 600;
}

.instrument-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── File upload ───────────────────────────────────────────── */
.file-drop {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.file-drop:hover, .file-drop.has-file {
  border-color: var(--brand);
  background: var(--brand-light);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-icon { font-size: 28px; margin-bottom: 8px; }

.file-drop-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.file-drop-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.file-drop-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-top: 6px;
  display: none;
}

.file-drop.has-file .file-drop-filename { display: block; }
.file-drop.has-file .file-drop-hint { display: none; }

/* ── Form fields ───────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 7px;
}

.optional-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.text-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.12);
}

.text-input::placeholder { color: #9ca3af; }

.number-input {
  width: 100px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.number-input:focus { border-color: var(--brand); }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover  { opacity: 0.86; }
.btn:active { opacity: 0.72; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-full { width: 100%; }

.btn-black {
  background: var(--black);
  color: var(--white);
}

.btn-teal {
  background: var(--brand);
  color: var(--black);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

/* ── Analysis review ───────────────────────────────────────── */
/* Three calm stat tiles: Tempo · Key · Meter — no boxed wall, just
   light surfaces with generous whitespace and a confidence badge. */
.stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

@media (min-width: 520px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}

.stat {
  padding: 16px 18px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

.stat-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.stat-input {
  width: 72px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-family: inherit;
  font-weight: 700;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.12);
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-hint {
  font-size: 11px;
  color: var(--muted);
}

/* Generic review section header (Chords / Structure) */
.review-block { margin-top: 22px; }

.review-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 11px;
}

/* Light timeline replaces the heavy bordered structure table */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.timeline-row:first-child { border-top: none; }

.timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.timeline-bars {
  color: var(--muted);
  font-size: 12px;
}

.timeline-len {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* ── Confidence badges ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.badge-green  { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* ── Section / chord labels ────────────────────────────────── */
.section-label {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-light);
  color: var(--brand-dark);
}

.chord-string {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ── Preliminary / validation caption ──────────────────────── */
.analysis-note {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
}

/* ── Chord progression — readable song-map (chords by section) ── */
.chord-prog {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chord-prog-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.chord-prog-row .section-label {
  flex-shrink: 0;
  margin-top: 4px;
  min-width: 86px;
}

.chord-seq {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;            /* tight rows, airy between chords */
  flex: 1;
}

.chord-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.chord-name.is-rest {
  color: var(--border);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.chord-q {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  vertical-align: super;
  margin-left: 1px;
}

.analysis-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}

/* ── Vibe picker ───────────────────────────────────────────── */
/* Data-driven: one .vibe-dim per schema dimension, a calm vertical
   stack of selectable chips. Suggested option gets a subtle tag;
   selected gets the teal accent. No per-instrument styles. */
.vibe-dim {
  border: none;
  margin: 0 0 22px;
  padding: 0;
}
.vibe-dim:last-of-type { margin-bottom: 4px; }

.vibe-dim-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 0;
  margin-bottom: 10px;
}

.chip-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .chip-group { grid-template-columns: repeat(2, 1fr); }
}

.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.chip:hover { border-color: var(--brand); }

.chip:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.18);
}

.chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}

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

.chip-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.chip-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Subtle "Suggested" affordance — only on the pre-selected option,
   regardless of the user's current choice, so it reads as guidance. */
.chip-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1px solid #c9ede9;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}

.chip-suggested:not(:has(input:checked)) {
  border-color: #c9ede9;
}

/* ── Output / documents ────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 9px; }

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.doc-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon { font-size: 20px; }

.doc-name {
  font-size: 14px;
  font-weight: 600;
}

.doc-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Brief preview ─────────────────────────────────────────── */
.brief-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  max-height: 320px;
  overflow-y: auto;
  color: var(--text);
  margin-top: 12px;
}

/* ── Spinner / HTMX ────────────────────────────────────────── */
.htmx-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  justify-content: center;
}

.htmx-request .htmx-indicator,
.htmx-indicator.htmx-request { display: flex; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ─────────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.text-muted { color: var(--muted); font-size: 13px; }

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

/* ── Educational tooltip ("how it works / why it helps") ─────── */
.tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 7px;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-size: 10px; font-weight: 700; font-style: normal;
  cursor: help; position: relative; user-select: none; flex-shrink: 0;
  vertical-align: middle;
}
.tip:hover, .tip:focus-visible {
  background: var(--brand); color: #fff; border-color: var(--brand);
  outline: none;
}
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: min(280px, 90vw);
  overflow-wrap: anywhere;
  background: var(--black); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.45;
  text-align: left; padding: 9px 11px; border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
  z-index: 200;   /* above the sticky nav (z-index 100) */
}
.tip::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--black);
  opacity: 0; transition: opacity .15s; z-index: 200;
}
.tip:hover::after, .tip:focus-visible::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.tip:hover::before, .tip:focus-visible::before { opacity: 1; }

/* ── Session brief — the hero deliverable ────────────────────── */
.brief-hero {
  border: 1px solid #c9ede9;
  background: linear-gradient(180deg, var(--brand-light) 0%, #fff 78px);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-sm);
}
.brief-hero-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.brief-hero-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-dark);
}
.brief-hero-title {
  font-size: 21px; font-weight: 700; color: var(--text); margin-top: 3px;
  display: flex; align-items: center;
}
.brief-hero-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.brief-hero-body {
  white-space: pre-wrap; font-size: 15px; line-height: 1.7;
  color: var(--text);
}

/* ── Section head (chart / stems) ────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 4px 0 12px; flex-wrap: wrap;
}
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Inline chord sheet ──────────────────────────────────────── */
.chart-frame {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fbfbfa; padding: 10px; overflow: auto; max-height: 620px;
}
.chart-frame svg { display: block; width: 100%; height: auto; }

/* ── Playable stems ──────────────────────────────────────────── */
.stem-list { display: flex; flex-direction: column; gap: 10px; }
.stem {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; background: var(--surface);
}
.stem-top { display: flex; align-items: center; gap: 12px; }
.stem-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.stem-meta { flex: 1; min-width: 0; }
.stem-name { font-size: 14px; font-weight: 600; }
.stem-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.stem-audio { width: 100%; height: 34px; margin-top: 10px; }

/* ── "More parts" expander (native <details>, no JS) ──────────── */
.stem-more {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.stem-more[open] { background: var(--surface); }

/* Genre expander on the vibe form: lighter (no heavy grey slab) and clearly
   separated from the ENERGY dimension below it. */
.genre-collapse {
  background: transparent;
  margin: 6px 0 28px;
}
.genre-collapse[open] { background: var(--surface); }

.stem-more-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.stem-more-summary::-webkit-details-marker { display: none; }
.stem-more-summary:hover { color: var(--text); }
.stem-more-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.18);
}

.stem-more-chevron {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.stem-more[open] .stem-more-chevron { transform: rotate(90deg); }

.stem-more-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
}

/* ── Ghost button ────────────────────────────────────────────── */
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--brand); }

/* ── Analyse progress ("it's working, not stuck") ────────────── */
.prog {
  margin-top: 14px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  text-align: left;
}
.prog-head { display: flex; align-items: center; gap: 12px; }
.prog-title { font-size: 14px; font-weight: 600; color: var(--text); }
.prog-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prog-steps { list-style: none; margin: 14px 0 0; padding: 0; }
.prog-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); padding: 5px 0;
  transition: color .2s;
}
.prog-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--surface);
  transition: border-color .2s, background .2s;
}
.prog-step.is-active { color: var(--text); font-weight: 600; }
.prog-step.is-active .prog-dot {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-light);
  animation: prog-pulse 1.1s ease-in-out infinite;
}
.prog-step.is-done { color: var(--text); }
.prog-step.is-done .prog-dot {
  border-color: var(--brand); background: var(--brand);
}
.prog-step.is-done .prog-dot::after {
  content: "✓"; color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
@keyframes prog-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--brand-light); }
  50%      { box-shadow: 0 0 0 6px var(--brand-light); }
}
.prog-note {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
