/* Authentic OslerAI Lab visual system (matching oslerai.ca/lab):
     White page (#FFFFFF), flat grey cards (#F7F7F7, no shadow, no outline),
     white insets (#FFFFFF), neutral ink (#0D0D0D), signature OslerAI Lime (#E4F46B),
     Lavender (#C9BFF0 / #6750B5), and Sage (#A8B79A), calm voice orb (no wave bars). */
  :root {
    --paper: #ffffff;
    --card: #f7f7f7;
    --surface: #efefec;
    --line: #e2e3dc;
    --ink: #0d0d0d;
    --body: #2d2d2b;
    --muted: #5e5e5b;
    --subtle: #858580;
    --lime: #e4f46b;
    --lime-soft: #f3f9c4;
    --lavender: #c9bff0;
    --lavender-soft: #e7e2f9;
    --lavender-deep: #6750b5;
    --sage: #a8b79a;
    --font: "Inter", "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--body);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  main {
    max-width: 720px;
    margin: 0 auto;
    padding: 4px 0 24px;
  }
  .shell {
    background: var(--card);
    border-radius: 20px;
    padding: 24px;
  }
  .step-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
  }
  .step-num {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--subtle);
    font-weight: 500;
  }
  .step-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .sub-note {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--muted);
  }

  /* White inset inside flat grey card */
  .transcript-inset {
    background: var(--paper);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    color: var(--ink);
    font-size: 15.5px;
    line-height: 1.65;
  }
  .speaker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .mini-orb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex: none;
    background: radial-gradient(circle at 68% 30%, #e4f46b 0%, #a8b79a 48%, #7b66c2 92%);
    position: relative;
    overflow: hidden;
  }
  .mini-orb::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.22) 1px, transparent 0);
    background-size: 3px 3px;
    opacity: 0.45;
  }
  .speaker-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
  }
  .speaker-sub {
    font-size: 12.5px;
    color: var(--muted);
    margin-left: auto;
  }

  /* Form rating rows */
  .q-block {
    margin-bottom: 16px;
  }
  .q-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 8px;
  }
  .q-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
  }
  .q-hint {
    font-size: 12.5px;
    color: var(--muted);
  }
  .scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .scale label {
    display: block;
    cursor: pointer;
  }
  .scale input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .scale span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 6px 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    transition: background 0.14s, color 0.14s, border-color 0.14s;
  }
  .scale span small {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 1px;
  }
  .scale label:hover span {
    background: var(--surface);
  }
  .scale input:checked + span {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
  .scale input:checked + span small {
    color: rgba(255, 255, 255, 0.72);
  }

  /* Signature OslerAI V3 Primary Button: ink pill + lime arrow disc */
  .action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
  }
  .v3-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--ink);
    color: var(--paper);
    border: 0;
    border-radius: 999px;
    padding: 6px 6px 6px 20px;
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.14s;
  }
  .v3-primary:hover { opacity: 0.9; }
  .v3-primary:disabled { opacity: 0.38; cursor: not-allowed; }
  .lime-disc {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
  }
  .privacy-note {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0;
  }

  /* Divider & Reveal */
  .divider {
    height: 1px;
    background: var(--line);
    margin: 22px 0;
  }
  .reveal[hidden] { display: none; }

  /* Step 02: Verbatim diff + calm timeline track (ZERO audio wave bars!) */
  .mode-pills {
    display: inline-flex;
    background: var(--surface);
    padding: 3px;
    border-radius: 999px;
    gap: 2px;
    margin-bottom: 12px;
  }
  .mode-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
  }
  .mode-btn.active {
    background: var(--paper);
    color: var(--ink);
  }
  .erased-chip {
    display: inline-block;
    background: var(--lavender-soft);
    color: var(--lavender-deep);
    border-radius: 6px;
    padding: 0 6px;
    margin: 0 2px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: 0;
    font-family: var(--font);
    transition: background 0.14s, color 0.14s;
  }
  .erased-chip.active, .erased-chip:hover {
    background: var(--lavender-deep);
    color: var(--paper);
  }
  .erased-chip.pause {
    font-family: var(--mono);
    font-size: 12px;
  }
  .hide-erased .erased-chip { display: none; }

  /* Calm OslerAI V3 20s timeline track (replaces animated wave bars) */
  .timeline-card {
    background: var(--paper);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .tl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
  }
  .tl-track {
    position: relative;
    height: 10px;
    background: var(--surface);
    border-radius: 999px;
    overflow: visible;
  }
  .tl-fill {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lime-soft) 0%, var(--lime) 100%);
  }
  .tl-mark {
    position: absolute;
    top: -3px;
    height: 16px;
    min-width: 8px;
    border-radius: 999px;
    background: var(--lavender-deep);
    border: 2px solid var(--paper);
    transform: translateX(-50%);
    cursor: pointer;
    padding: 0;
  }
  .tl-mark.active {
    background: var(--ink);
    box-shadow: 0 0 0 3px var(--lime);
  }
  .tl-detail {
    margin-top: 10px;
    font-size: 13px;
    color: var(--body);
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .tl-detail strong { color: var(--ink); font-weight: 500; }

  /* Step 03: Benchmark summary cards & clean V3 SVG chart */
  .receipt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  .metric-box {
    background: var(--paper);
    border-radius: 14px;
    padding: 14px 16px;
  }
  .metric-val {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1.15;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .metric-val.lime-pill {
    background: var(--lime);
    color: var(--ink);
    padding: 2px 9px;
    border-radius: 8px;
  }
  .metric-val.lav { color: var(--lavender-deep); }
  .metric-lbl {
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
    line-height: 1.35;
  }

  .chart-inset {
    background: var(--paper);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
  }
  .chart-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .chart-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
  }
  .chart-legend {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
  }
  .leg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
  }
  .footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
  }
  .quiet-btn {
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 4px 0;
  }

  @media (max-width: 560px) {
    .shell { padding: 18px 16px; border-radius: 16px; }
    .receipt-grid { grid-template-columns: 1fr; }
    .scale span small { display: none; }
  }

.leg-dot.lime { background: var(--lime); border: 1.8px solid var(--ink); }
.leg-dot.lav { background: var(--lavender); border: 1.8px solid var(--lavender-deep); }
