/* ═══════════════════════════════════════════════════
   SpeakSharp — Unified Stylesheet
   Shared across: index.html, landing.html, faq.html
   ═══════════════════════════════════════════════════ */

/* ── App styles (index.html) ──────────────────────── */
  :root {
    --bg:          #050a12;
    --bg-card:     #0b1220;
    --bg-hover:    #101827;
    --accent:      #097cfd;
    --accent-2:    rgba(9,124,253,0.15);
    --text:        #eef4ff;
    --text-body:   #c8d0dd;
    --text-muted:  #8b94a3;
    --border:      rgba(148,163,184,0.18);
    --border-acc:  rgba(9,124,253,0.55);
    --border-strong: rgba(9,124,253,0.7);
    --surface:     #0b1220;
    --surface-2:   #101827;
    --radius:      12px;
    --radius-lg:   16px;
    --sidebar-width: 280px;
    --radius-sm:   8px;
    --ease-out:    cubic-bezier(0.4,0,0.2,1);
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-12: 48px;
    --sp-16: 64px;
  }

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

  ::-webkit-scrollbar { display: none; }
  * { scrollbar-width: none; -ms-overflow-style: none; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  /* ── Generic modal (showToast) ── */
  .modal-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
  }
  .modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.25rem;
    padding: 36px 28px 28px;
    max-width: 340px; width: 100%;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  }
  .modal-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-icon svg { width: 26px; height: 26px; }
  .modal-icon-success { background: rgba(52,211,153,0.15); color: #34d399; }
  .modal-icon-error   { background: rgba(248,113,113,0.15); color: #f87171; }
  .modal-message {
    font-size: 0.9rem; color: var(--text); line-height: 1.6;
  }
  .modal-ok-btn {
    width: 100%; padding: 13px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 0.75rem;
    font-family: inherit; font-size: 0.92rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
    margin-top: 4px;
  }
  .modal-ok-btn:hover { background: #2563eb; }

  body.app-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }


  .sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
  }

  .sidebar-item {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.80);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-bottom: 2px;
    position: relative;
    overflow: hidden;
  }

  .sidebar-item:hover {
    background: var(--bg-hover);
    color: #ffffff;
  }

  .sidebar-item.active {
    background: rgba(9,124,253,0.1);
    border-color: rgba(9,124,253,0.3);
    color: #ffffff;
  }

  .sidebar-item .item-icon { display: none; }

  .sidebar-item .item-details {
    flex: 1;
    min-width: 0;
  }

  .sidebar-item .item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-item .item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .sidebar-item .item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
  }

  .sidebar-item:hover .item-actions {
    opacity: 1;
  }

  .sidebar-item:hover:not(:has(.rename-input)) .item-details {
    filter: blur(2.5px);
    transition: filter 0.15s;
  }

  .sidebar-item .rename-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
  }

  .sidebar-item .rename-btn:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
  }

  .sidebar-item .rename-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
  }

  .delete-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    animation: fadeUp 0.15s var(--ease-out);
  }

  .delete-confirm-text { display: none; }

  .delete-confirm-yes {
    padding: 7px 20px;
    background: #ef4444;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
  }

  .delete-confirm-yes:hover { opacity: 0.85; }

  .delete-confirm-no {
    padding: 7px 20px;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: rgba(255,255,255,0.65);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
  }

  .delete-confirm-no:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
  }

  .rename-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid #2563eb;
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 2px 6px;
    width: 100%;
    outline: none;
  }

  .sidebar-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    line-height: 1.5;
  }


  /* ── About page ───────────────────────── */
  #about-page {
    display: none;
    min-height: 100vh;
  }

  #about-page.visible {
    display: block;
  }

  /* ── Main content ─────────────────────── */
  .container {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 28px 120px;
  }

  header {
    text-align: center;
    padding: 20px 0 8px;
  }

  .logo-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
  }

  .idle-brand-logo-text {
    display: inline-block;
    line-height: 1;
    margin-bottom: 4px;
  }
  .logo-speak {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    color: #ffffff;
    letter-spacing: -0.02em;
  }
  .logo-sharp {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--accent);
    letter-spacing: -0.02em;
  }

  /* Smaller logo when inside the nav bar */
  .nav-logo .logo-speak,
  .nav-logo .logo-sharp { font-size: 1.15rem; }

  header h1 {
    display: inline-block;
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  .logo-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 10px;
    position: relative;
  }

  .logo-text-row {
    position: relative;
    display: inline-block;
    line-height: 1;
  }

  .logo-full-text {
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: 1;
  }

  .logo-D-lines {
    position: absolute;
    top: 0.03em;
    left: 0;
    width: 0.68em;
    height: 0.9em;
    pointer-events: none;
  }

  .logo-underline-bar {
    position: absolute;
    bottom: 7px;
    left: 2px;
    right: -16px;
    height: 36px;
    pointer-events: none;
  }

  .logo-underline-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-bottom: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom-right-radius: 18px;
    background: var(--accent) border-box;
    -webkit-mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
  }
  .logo-img {
    height: 70px;
    width: auto;
    display: block;
  }
  .logo-img--sidebar {
    height: 54px;
    margin-bottom: 4px;
  }
  .logo-img--hero {
    height: 140px;
  }

  header p {
    font-size: 1rem;
    margin-top: 4px;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ── Timeline ─────────────────────────── */
  #timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  #timeline:not(:empty) + #active-area {
    margin-top: 48px;
  }

  .attempt-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeUp 0.5s var(--ease-out);
  }

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

  /* ── Audio bubble ─────────────────────── */
  .audio-bubble {
    align-self: flex-end;
    background: rgba(37,99,235,0.55);
    border: 1px solid rgba(9,124,253,0.35);
    border-radius: 20px 20px 4px 20px;
    padding: 12px 16px;
    max-width: 85%;
  }

  /* ── Custom audio player ──────────────── */
  .cap-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.22);
    border-radius: 50px;
    padding: 8px 14px;
    min-width: 220px;
    max-width: 320px;
    user-select: none;
  }
  .cap-btn {
    flex-shrink: 0;
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.18);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff;
    transition: background 0.15s;
  }
  .cap-btn:hover { background: rgba(255,255,255,0.3); }
  .cap-btn svg { display: block; }
  .cap-time, .cap-dur {
    font-size: 0.72rem; font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.75); flex-shrink: 0; min-width: 26px;
  }
  .cap-track { flex: 1; display: flex; align-items: center; }
  .cap-seek {
    width: 100%; height: 4px;
    -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.25);
    border-radius: 2px; cursor: pointer; outline: none;
  }
  .cap-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: #fff; border-radius: 50%; cursor: pointer;
  }
  .cap-seek::-moz-range-thumb {
    width: 12px; height: 12px;
    background: #fff; border-radius: 50%; border: none; cursor: pointer;
  }


  .audio-bubble .attempt-label {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.6);
  }

  /* ── Score cards ──────────────────────── */
  .score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 22px 20px;
    position: relative;
    transition: box-shadow 0.15s, border-top-color 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 1px 3px rgba(0,0,0,0.15);
  }

  .score-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
    border-top-color: var(--accent);
  }

  .score-card.overall {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 36px;
  }

  .score-card .label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
  }

  .value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }

  .score-card.overall .value-row {
    justify-content: center;
    margin-bottom: 5px;
  }

  .score-card .value {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .score-card.overall .value {
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: -0.04em;
  }

  /* Progress bar below value row */
  .card-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
  }
  .card-fill { height: 100%; border-radius: 2px; }

  .score-card .delta {
    font-size: 0.8rem;
  }

  .delta.positive { color: #34d399; }
  .delta.negative { color: #f87171; }
  .delta.neutral  { color: rgba(255,255,255,0.35); }

  /* ── Transcript ───────────────────────── */
  .transcript-section {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  }

  .transcript-toggle {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: color 0.2s;
    box-sizing: border-box;
    user-select: none;
  }

  .transcript-toggle:hover { color: #ffffff; }

  .transcript-toggle .arrow {
    transition: transform 0.2s;
  }

  .transcript-toggle.open .arrow {
    transform: rotate(180deg);
  }

  .transcript-body {
    padding: 0 16px 16px;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    line-height: 1.7;
    display: none;
  }

  .transcript-body.open { display: block; max-height: 320px; overflow-y: auto; }

  /* ── Feedback ─────────────────────────── */
  .feedback-block {
    background: rgba(255,255,255,0.035);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148,163,184,0.15);
    border-radius: var(--radius);
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-body);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    width: 100%;
  }

  .feedback-block strong {
    color: #ffffff;
  }

  .feedback-block p {
    margin-bottom: 12px;
  }

  .next-target {
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .next-target-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    flex-shrink: 0;
  }
  .next-target-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
  }

  /* ── Mic area ─────────────────────────── */
  .controls {
    text-align: center;
    padding: 32px 0 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .controls.docked {
    padding: 18px 0 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 96px;
  }

  .session-card .controls { padding: 0; }
  .session-card .controls.docked { border-top: none; margin-top: 0; padding: 0; }

  /* Mic button — clean Shazam-style */
  @keyframes rippleOut {
    0%   { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(2.0); opacity: 0; }
  }

  .mic-btn {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
    position: relative;
    z-index: 2;
  }

  .mic-btn svg {
    width: 58px;
    height: 58px;
    fill: currentColor;
  }

  .mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 24px rgba(9,124,253,0.35);
  }

  .mic-btn.recording {
    background: var(--accent);
    box-shadow: 0 4px 24px rgba(9,124,253,0.5);
  }

  /* Ripple rings — voice-reactive while recording */
  .ring {
    display: block;
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(9,124,253,0.35);
    width: 148px;
    height: 148px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.06s linear, opacity 0.06s linear;
  }

  /* Voice-reactive rings: JS sets --lvl (0..1) on .mic-rings */
  .mic-rings.active .ring-1 {
    opacity: calc(0.80 * var(--lvl, 0));
    transform: scale(calc(1 + 0.45 * var(--lvl, 0)));
    border-color: rgba(9,124,253,0.9);
    border-width: calc(2px + 4px * var(--lvl, 0));
  }
  .mic-rings.active .ring-2 {
    opacity: calc(0.55 * var(--lvl, 0));
    transform: scale(calc(1 + 0.80 * var(--lvl, 0)));
    border-color: rgba(99,102,241,0.75);
    border-width: calc(1.5px + 2.5px * var(--lvl, 0));
  }
  .mic-rings.active .ring-3 {
    opacity: calc(0.35 * var(--lvl, 0));
    transform: scale(calc(1 + 1.15 * var(--lvl, 0)));
    border-color: rgba(9,124,253,0.5);
    border-width: 1.5px;
  }

  /* Button glow reacts to voice level */
  .mic-rings.active .mic-btn.recording {
    box-shadow:
      0 0 0 calc(16px * var(--lvl, 0)) rgba(9,124,253,0.22),
      0 4px 40px rgba(9,124,253,calc(0.5 + 0.35 * var(--lvl, 0)));
    transition: box-shadow 0.06s linear;
  }

  /* Docked (after feedback) — smaller mic */
  .controls.docked .mic-btn {
    width: 96px;
    height: 96px;
  }
  .controls.docked .mic-btn svg {
    width: 38px;
    height: 38px;
  }
  .controls.docked .ring {
    width: 96px;
    height: 96px;
  }

  .timer {
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: rgba(255,255,255,0.55);
    margin-top: 20px;
  }

  /* Hint sits ABOVE the mic — Shazam-style */
  .hint {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    margin-bottom: 28px;
    margin-top: 0;
  }

  /* Compact hint inside docked controls */
  .controls.docked .hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 8px;
  }

  .hint.warning {
    color: var(--accent);
  }

  /* Brand above idle mic card */
  .idle-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    line-height: 1.2;
  }
  .idle-brand-logo {
    height: 52px;
    width: auto;
    display: block;
  }
  .idle-brand-tagline {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(226,232,240,0.28);
    letter-spacing: 0.04em;
    margin-top: 4px;
    margin-bottom: 36px;
  }

  /* Session card wrapper */
  .session-card {
    background: var(--bg-card);
    border: 1px solid rgba(148,163,184,0.22);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    position: relative;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  }

  /* Context row: presentation name + score badges */
  .session-context-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; min-height: 20px;
  }
  .session-context-name {
    font-size: 0.75rem; font-weight: 600; color: var(--text);
    letter-spacing: 0.04em; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%;
  }
  .session-score-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .session-score-badge {
    font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 20px;
    background: rgba(37,99,235,0.12); border: 1px solid rgba(37,99,235,0.2);
    color: rgba(147,180,253,0.8);
  }
  .session-score-badge.best {
    background: rgba(9,124,253,0.12); border-color: rgba(9,124,253,0.2);
    color: rgba(196,181,253,0.85);
  }

  /* Next Focus pill (collapsed, clickable) */
  .next-focus-pill {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 16px; padding: 8px 16px; border-radius: 20px;
    background: rgba(37,99,235,0.1); border: 1px solid rgba(37,99,235,0.25);
    cursor: pointer; font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
  }
  .next-focus-pill:hover {
    background: rgba(37,99,235,0.18); border-color: rgba(37,99,235,0.45);
  }
  .next-focus-label {
    font-size: 0.82rem; font-weight: 600; color: #93c5fd;
    letter-spacing: 0.01em;
  }
  .next-focus-arrow { font-size: 0.9rem; color: rgba(147,197,253,0.55); line-height: 1; }

  /* Drill modal */
  .drill-modal-backdrop {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(6,13,23,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
  }
  .drill-modal-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px 28px 24px;
    max-width: 440px; width: 90%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  }
  .drill-modal-title {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  }
  .drill-modal-body {
    font-size: 0.92rem; line-height: 1.65; color: var(--text); margin-bottom: 20px;
  }
  .drill-modal-close {
    display: block; width: 100%; padding: 10px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-muted); font-family: inherit;
    font-size: 0.85rem; cursor: pointer; transition: background 0.15s;
  }
  .drill-modal-close:hover { background: rgba(255,255,255,0.1); }

  /* Bare separator replacing "or" divider */
  .upload-divider {
    height: 1px; background: rgba(255,255,255,0.05);
    margin: 16px 0 12px; border: none;
  }

  .restart-btn {
    margin-top: 16px;
    padding: 8px 22px;
    border-radius: 20px;
    border: 1px solid rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.08);
    color: rgba(239,68,68,0.65);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  .restart-btn:hover {
    background: rgba(239,68,68,0.16);
    color: rgba(239,68,68,0.9);
    border-color: rgba(239,68,68,0.5);
  }
  body.light-mode .restart-btn {
    border-color: rgba(220,38,38,0.25);
    background: rgba(220,38,38,0.06);
    color: rgba(185,28,28,0.7);
  }
  body.light-mode .restart-btn:hover {
    background: rgba(220,38,38,0.12);
    color: #b91c1c;
    border-color: rgba(220,38,38,0.4);
  }

  /* ── Recording status row ─────────────── */
  .rec-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }
  .rec-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    animation: recBlink 1.1s ease-in-out infinite;
    flex-shrink: 0;
  }
  @keyframes recBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
  }

  /* ── Eye contact tip ─────────────────── */
  .eye-contact-tip {
    display: block;
    text-align: center;
    margin: 14px auto 0;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(37,99,235,0.2);
    background: rgba(37,99,235,0.07);
    font-size: 0.78rem;
    color: rgba(147,180,253,0.75);
    font-weight: 500;
    max-width: 360px;
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  body.light-mode .eye-contact-tip {
    border-color: rgba(37,99,235,0.2);
    background: rgba(37,99,235,0.05);
    color: rgba(29,78,216,0.65);
  }

  /* ── Divider ──────────────────────────── */
  .or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
  }

  .or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
  }

  /* ── Upload zone ──────────────────────── */
  .upload-zone {
    border: 2px dashed rgba(148,163,184,0.28);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    background: rgba(255,255,255,0.02);
  }

  .upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(96,165,250,0.05);
    color: rgba(255,255,255,0.7);
    transform: translateY(-1px);
  }

  .upload-zone input { display: none; }

  /* ── Processing ───────────────────────── */
  .processing {
    text-align: center;
    padding: 72px 0 64px;
    animation: fadeUp 0.4s var(--ease-out);
  }

  .processing .label {
    color: rgba(226,232,240,0.5);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
  }

  /* ── Ad overlay (during analysis) ─────── */
  .ad-overlay-wrap {
    margin: 0 auto 20px;
    max-width: 560px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.18);
    background: var(--bg-card);
    animation: fadeUp 0.3s var(--ease-out);
  }
  .ad-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
  }
  .ad-overlay-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    align-self: flex-start;
  }
  .ad-overlay-placeholder {
    width: 100%;
    height: 90px;
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
  }
  .ad-overlay-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: flex-end;
  }
  .ad-overlay-countdown {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
  }
  .ad-skip-btn {
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 0.4rem;
    color: rgba(255,255,255,0.75);
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .ad-skip-btn:disabled { opacity: 0.35; cursor: default; }
  .ad-skip-btn:not(:disabled):hover { border-color: rgba(255,255,255,0.6); color: #fff; }

  /* ── Error ─────────────────────────────── */
  .error-block {
    text-align: center;
    padding: 32px;
    animation: fadeUp 0.3s var(--ease-out);
  }

  .error-block .msg {
    color: #f87171;
    margin-bottom: 16px;
    font-size: 0.9rem;
  }

  .retry-btn {
    padding: 10px 24px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.3s var(--ease-out);
  }

  .retry-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
  }

  /* ── Metric pills ─────────────────────── */
  .metric-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  .pill {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    transition: all 0.2s var(--ease-out);
  }

  .pill:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
  }

  /* ── Metric badge inside score cards ─── */
  .metric-badge {
    display: block;
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ── Gradient text ────────────────────── */
  .gradient-text {
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ── Script add button (inline) ───────── */
  .script-add-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.6);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .script-add-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
  }

  /* ── Confirm dialog ───────────────────── */
  .confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeUp 0.15s ease;
  }
  .confirm-dialog {
    background: rgba(15,23,42,0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 340px;
    width: 90%;
    text-align: center;
  }
  .confirm-message {
    font-size: 0.92rem;
    color: rgba(226,232,240,0.85);
    margin-bottom: 20px;
    line-height: 1.55;
  }
  .confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
  }
  .confirm-btn-cancel {
    flex: 1;
    padding: 9px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(226,232,240,0.8);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
  }
  .confirm-btn-cancel:hover { background: rgba(255,255,255,0.1); }
  .confirm-btn-ok {
    flex: 1;
    padding: 9px 0;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .confirm-btn-ok:hover { opacity: 0.88; }

  /* ── Camera confirm overlay ──────────── */
  .camera-confirm-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(6,13,23,0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
  }
  .camera-confirm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    display: flex; flex-direction: column; gap: 12px;
    align-items: center;
  }
  .camera-confirm-title {
    font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 0;
  }
  .camera-confirm-body {
    font-size: 0.95rem; color: var(--text); margin: 0; line-height: 1.5;
  }
  .camera-confirm-sub {
    font-size: 0.78rem; color: var(--text-muted); margin: 0;
  }
  .camera-confirm-btn {
    background: var(--accent); color: #fff; border: none;
    border-radius: 10px; padding: 12px 20px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    font-family: inherit; width: 100%;
  }
  .camera-confirm-btn:hover { opacity: 0.9; }
  .camera-cancel-link {
    background: none; border: none; color: var(--text-muted);
    font-size: 0.82rem; cursor: pointer; font-family: inherit;
    padding: 4px;
  }
  .camera-cancel-link:hover { color: var(--text); }

  /* ── Upgrade button + plan badges ─────── */
  .topbar-upgrade-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--accent);
    color: #fff; border: none; border-radius: 20px;
    padding: 5px 13px; font-size: 0.78rem; font-weight: 700;
    cursor: pointer; font-family: inherit; letter-spacing: 0.01em;
    transition: opacity 0.15s, box-shadow 0.15s;
    align-self: center;
    line-height: 1;
    white-space: nowrap;
  }
  .topbar-upgrade-btn:hover { opacity: 0.88; box-shadow: 0 2px 12px rgba(9,124,253,0.4); }
  body.is-pro .topbar-upgrade-btn { display: none; }


  .plan-badge { font-size:0.65rem; font-weight:700; padding:2px 7px; border-radius:20px; letter-spacing:0.04em; text-transform:uppercase; }
  .plan-badge.pro { background:var(--accent); color:#fff; }
  .plan-badge.free { background:rgba(255,255,255,0.08); color:var(--text-muted); }

  /* ── Locked metric body ─────────────────── */
  .locked-metric-body { display:flex; flex-direction:column; align-items:center; gap:12px; padding:32px 24px; text-align:center; }
  .locked-metric-title { font-size:1rem; font-weight:700; color:rgba(255,255,255,0.45); }
  .locked-metric-sub { font-size:0.83rem; color:var(--text-muted); line-height:1.5; max-width:280px; }

  /* ── Blurred viz lockout ─────────────────── */
  .locked-viz-wrap { position:relative; overflow:hidden; border-radius:12px; }
  .locked-viz-blur { filter:blur(7px) brightness(0.6); pointer-events:none; user-select:none; }
  .locked-viz-overlay {
    position:absolute; inset:0;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
    background:rgba(10,16,28,0.45);
    text-align:center; padding:16px;
  }
  .locked-viz-overlay .locked-metric-title { color:rgba(255,255,255,0.85); font-size:1.05rem; }
  .locked-viz-overlay .locked-metric-sub { max-width:260px; color:rgba(255,255,255,0.5); }

  /* ── Camera setup card (live preview) ── */
  .camera-setup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    max-width: 700px;
    width: 95%;
    display: flex;
    flex-direction: row;
    max-height: 90vh;
  }
  .camera-setup-preview-col {
    flex: 0 0 340px;
    background: #000;
    position: relative;
    min-height: 260px;
  }
  .camera-setup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
  }
  .camera-setup-status {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 14px;
    background: rgba(0,0,0,0.65);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(4px);
  }
  .camera-setup-info-col {
    flex: 1;
    padding: 26px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-width: 0;
  }
  .camera-setup-eye-box {
    background: rgba(37,99,235,0.08);
    border: 1px solid rgba(37,99,235,0.25);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-muted);
  }
  .camera-setup-eye-box strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
  }
  @media (max-width: 600px) {
    .camera-setup-card { flex-direction: column; }
    .camera-setup-preview-col { flex: none; height: 220px; }
  }

  /* ── Metric modal overlay ─────────────── */
  .metric-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeUp 0.2s ease;
  }

  .metric-modal {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.5rem;
    padding: 28px;
    width: min(520px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: fadeUp 0.2s ease;
  }

  .metric-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  .metric-modal-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .metric-modal-score {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
  }

  .metric-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
    flex-shrink: 0;
  }

  .metric-modal-close:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
  }

  .metric-viz {
    min-height: 160px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  /* Progress panel modal */
  .progress-modal {
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    padding: 28px;
    width: min(720px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    animation: fadeUp 0.2s ease;
  }
  .progress-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 16px 16px 16px;
  }
  .upgrade-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
  }
  .upgrade-cta-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 2px 14px rgba(37,99,235,0.45);
  }
  .progress-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .progress-modal-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
  }
  .progress-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
  }
  .progress-chart-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 12px 14px;
  }
  .progress-chart-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(226,232,240,0.55);
    margin-bottom: 8px;
  }

  /* Camera toggle button */
  .camera-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: rgba(226,232,240,0.6);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
  }
  .camera-toggle-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
  }
  .camera-toggle-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(226,232,240,0.85);
  }
  .camera-toggle-btn.active {
    border-color: rgba(37,99,235,0.5);
    background: rgba(37,99,235,0.12);
    color: #60a5fa;
  }
  .cam-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
  }

  /* Physical delivery section */
  .physical-delivery {
    margin: 10px 0 14px;
    padding: 12px 14px;
    background: rgba(37,99,235,0.06);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 10px;
  }
  .physical-delivery-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(96,165,250,0.9);
    margin-bottom: 8px;
  }
  .physical-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
  }
  .physical-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
  }
  .physical-summary {
    font-size: 0.78rem;
    color: rgba(226,232,240,0.55);
    line-height: 1.5;
  }

  .metric-insight {
    font-size: 0.76rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
  }

  .metric-insight-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
  }

  .mini-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.5);
    animation: spinGradient 0.8s linear infinite;
    flex-shrink: 0;
  }

  .metric-why {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mw-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .mw-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.35);
  }

  /* ── Score card clickable hint ────────── */
  .score-card.clickable {
    cursor: pointer;
  }

  .score-card.clickable:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  }

  /* ── Script panel ─────────────────────── */
  .script-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .script-panel-header {
    padding: 9px 14px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .script-panel-header > span:first-child { white-space: nowrap; }

  .script-textarea {
    width: 100%;
    min-height: 160px;
    max-height: 360px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;
    padding: 14px 16px;
    resize: none;
    outline: none;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .script-textarea::placeholder { color: rgba(255,255,255,0.2); }
  .script-textarea:read-only { color: rgba(255,255,255,0.45); cursor: default; }

  .script-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px 14px 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .script-tool-btn {
    padding: 5px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
  }

  .script-tool-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }

  .script-ctrl-btn {
    padding: 2px 7px;
    font-size: 0.75rem;
    min-width: 28px;
    border-radius: 6px;
  }

  .script-warn {
    padding: 6px 14px 8px;
    font-size: 0.75rem;
    color: var(--accent);
    border-top: 1px solid rgba(9,124,253,0.15);
    background: rgba(9,124,253,0.05);
  }

  /* ── Layout with script ───────────────── */
  .active-with-script {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
  }

  .active-with-script .script-panel {
    height: 100%;
  }

  .active-with-script .script-panel .script-textarea {
    flex: 1;
    max-height: none;
  }


  @media (max-width: 768px) {
    .topbar {
      padding: 0 12px;
      gap: 8px;
    }
    .topbar-links { gap: 2px; }
    .topbar-link {
      padding: 5px 7px;
      font-size: 0.75rem;
    }
    .topbar-reader-btn {
      padding: 5px 10px;
      font-size: 0.75rem;
    }
    .topbar-tools-btn {
      padding: 5px 10px;
      font-size: 0.75rem;
    }
    .timer-label { display: none; }
    .layout-body { min-width: 0; }
    .main-content { min-width: 0; }
    .right-panel { min-width: 0; overflow-x: auto; }
  }

  @media (max-width: 480px) {
    .topbar-links .topbar-link:not(:first-child) { display: none; }
  }

  @media (max-width: 640px) {
    .active-with-script { display: block; }

    .mic-sticky-mobile {
      position: sticky;
      top: 16px;
      z-index: 10;
      background: rgba(15,23,42,0.8);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: var(--radius);
      padding: 16px;
      margin-top: 16px;
      text-align: center;
    }

    .mic-sticky-mobile .session-card { background: transparent; border: none; box-shadow: none; padding: 0; }
  }

  /* ── 6-metric flat 3-column grid ──────── */
  .score-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* ── Feedback section headers ─────────── */
  .feedback-section-bold {
    margin-top: 14px;
    margin-bottom: 2px;
  }

  .feedback-section-bold:first-child { margin-top: 0; }

  .next-script-target {
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(96,165,250,0.08);
    border-left: 3px solid rgba(96,165,250,0.6);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 500;
    color: #ffffff;
  }

  /* ── Auth screen ────────────────────────── */
  .auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 16px;
    animation: fadeUp 0.3s cubic-bezier(0.4,0,0.2,1);
  }

  .auth-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 1.5rem;
    padding: 52px 48px 44px;
    width: 100%;
    max-width: 480px;
  }

  .auth-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
  }

  .auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 0.65rem;
    padding: 3px;
    margin-bottom: 24px;
  }

  .auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s;
  }

  .auth-tab.active {
    background: rgba(255,255,255,0.10);
    color: #fff;
  }

  .auth-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.75rem;
    padding: 14px 16px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    margin-bottom: 12px;
    transition: border-color 0.18s;
    display: block;
  }

  .auth-input:focus { border-color: rgba(255,255,255,0.3); }
  .auth-input::placeholder { color: rgba(255,255,255,0.25); }

  .auth-error {
    color: #f87171;
    font-size: 0.8rem;
    min-height: 1.2em;
    margin-bottom: 8px;
  }

  .auth-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.18s;
    margin-top: 2px;
  }

  .auth-btn:hover { opacity: 0.87; }
  .auth-btn:disabled { opacity: 0.45; cursor: default; }

  .auth-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0 4px;
    color: rgba(255,255,255,0.2); font-size: 0.75rem;
  }
  .auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
  }
.auth-hint {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    margin-top: 16px;
  }

  .auth-hint a { color: rgba(255,255,255,0.6); text-decoration: none; }
  .auth-hint a:hover { color: #fff; }

  .auth-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0 12px;
    color: rgba(255,255,255,0.25);
    font-size: 0.75rem;
  }
  .auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1);
  }

  .auth-free-note {
    text-align: center;
    font-size: 0.73rem;
    color: rgba(255,255,255,0.28);
    margin-top: 10px;
    letter-spacing: 0.01em;
  }

  /* ── Rewrite button ─────────────────────── */
  .rewrite-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    letter-spacing: 0.02em;
  }
  .rewrite-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
  .rewrite-btn-locked { opacity: 0.5; cursor: default; }
  .rewrite-btn-locked:hover { background: transparent; color: var(--text-muted); }
  .pro-badge-inline {
    font-size: 0.65rem; font-weight: 700; padding: 2px 5px;
    background: #2563eb;
    border-radius: 3px; color: #fff; letter-spacing: 0.03em;
  }

  /* ── User info bar in header ─────────────── */
  .user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
  }

  .user-email {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
  }

  .user-attempts {
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 99px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
  }

  .user-attempts.low {
    background: rgba(239,68,68,0.14);
    color: #f87171;
  }

  .logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.28);
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.18s;
  }

  .logout-btn:hover { color: rgba(255,255,255,0.6); }

  /* ── Trial badge & ended screen ──────────── */
  .trial-badge {
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.01em;
  }

  .trial-badge.low { color: var(--accent); }

  .trial-ended-screen {
    text-align: center;
    padding: 72px 24px;
    animation: fadeUp 0.4s cubic-bezier(0.4,0,0.2,1);
  }

  .trial-ended-screen .ended-icon {
    font-size: 3rem;
    margin-bottom: 16px;
  }

  .trial-ended-screen h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
  }

  .trial-ended-screen p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin-bottom: 28px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
  }

  .trial-ended-screen .buy-link {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(9,124,253,0.3);
    transition: all 0.2s;
  }

  .trial-ended-screen .buy-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(9,124,253,0.4);
  }

  /* ── Block section header ─────────────── */
  .block-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.75);
  }

  .block-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
    order: 1;
  }
  .block-section-header .rewrite-btn { order: 2; }

  /* ── Auth brand ───────────────────────── */
  .auth-brand-name {
    font-size: 1.8rem;
    letter-spacing: -0.01em;
    text-align: center;
    display: block;
    margin-bottom: 4px;
  }
  .auth-brand-name .logo-speak,
  .auth-brand-name .logo-sharp {
    font-size: 2.2rem;
  }

  .auth-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.88rem;
    margin-bottom: 32px;
    line-height: 1.5;
  }

  /* ── Attempt divider ──────────────────── */
  .attempt-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.22);
    margin: 0 0 4px;
  }

  .attempt-divider::before, .attempt-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
  }

  /* ── Score value colors (5-tier) ─────── */
  .score-val-great { color: #34c472; }   /* 90+  bright green    */
  .score-val-good  { color: #7ab830; }   /* 75+  yellow-green    */
  .score-val-ok    { color: #e8b914; }   /* 50+  yellow          */
  .score-val-warn  { color: #e06b20; }   /* 26+  orange          */
  .score-val-poor  { color: #d94040; }   /* 0–25 red             */

  /* ── Attempt header bar ───────────────── */
  .attempt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
    margin-bottom: 4px;
  }

  .attempt-header-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .attempt-header-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
  }

  .audio-unavailable {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    font-style: italic;
    padding: 6px 0;
  }

  .logo-c-svg {
    height: 0.85em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.02em;
  }

  /* ── Theme toggle pill ────────────────── */
  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    user-select: none;
    transition: all 0.2s;
  }
  .theme-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
  }
  .tt-knob {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .tt-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    transition: color 0.2s;
  }

  /* ── Topbar action buttons ────────────── */
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid var(--border);
  }
  .topbar-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .topbar-action-btn:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(37,99,235,0.35);
  }
  .topbar-action-btn.active {
    background: var(--accent);
    color: #fff;
  }
  .topbar-action-btn svg {
    width: 13px; height: 13px;
    fill: currentColor;
    flex-shrink: 0;
  }

  /* ── Reader button ────────────────────── */
  .topbar-reader-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .topbar-reader-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 2px 12px rgba(37,99,235,0.45);
  }
  .topbar-reader-btn svg {
    width: 14px; height: 14px;
    fill: currentColor;
    flex-shrink: 0;
  }

  /* ── Tools pills + collapsed dropdown ── */
  .topbar-tools-collapsed {
    display: none;
    position: relative;
    flex-shrink: 0;
  }
  .topbar-tool-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .topbar-tool-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(9,124,253,0.45);
    background: rgba(9,124,253,0.08);
    color: #93c5fd;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .topbar-tool-pill:hover {
    background: rgba(9,124,253,0.18);
    border-color: rgba(9,124,253,0.7);
    color: #bfdbfe;
  }
  .topbar-tool-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .topbar-tool-pill svg {
    width: 13px; height: 13px;
    fill: currentColor;
    flex-shrink: 0;
  }
  /* Keep old tools-btn name working for any JS references */
  .topbar-tools-btn { display: none; }
  .topbar-tools-collapsed-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(9,124,253,0.45);
    background: rgba(9,124,253,0.08);
    color: #93c5fd;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .topbar-tools-collapsed-btn:hover {
    background: rgba(9,124,253,0.18);
    border-color: rgba(9,124,253,0.7);
    color: #bfdbfe;
  }
  .topbar-chevron {
    transition: transform 0.2s;
  }
  .topbar-tools-collapsed.open .topbar-chevron {
    transform: rotate(180deg);
  }
  .topbar-tools-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    gap: 6px;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    z-index: 500;
  }
  .topbar-tools-collapsed.open .topbar-tools-dropdown {
    display: flex;
  }
  .topbar-tools-dropdown .topbar-tool-pill {
    width: 100%;
    justify-content: flex-start;
  }

  /* ── Light mode overrides ─────────────── */
  body.light-mode {
    background: #F9FAFB;
    color: #111827;
    --text:       #111827;
    --text-muted: rgba(17,24,39,0.52);
    --border:     #E5E7EB;
    --border-acc: rgba(37,99,235,0.22);
    --bg-card:    #ffffff;
    --bg-hover:   #F3F4F6;
  }

  body.light-mode .sidebar-item { color: #111827; }
  body.light-mode .sidebar-item:hover { color: #111827; background: rgba(0,0,0,0.04); }
  body.light-mode .sidebar-item.active { color: #2563eb; background: rgba(37,99,235,0.08); }
  body.light-mode .sidebar-item .item-meta { color: rgba(17,24,39,0.45); }

  body.light-mode .delete-confirm-text { color: rgba(15,23,42,0.6); }

  body.light-mode .delete-confirm-no {
    border-color: rgba(0,0,0,0.12);
    color: rgba(15,23,42,0.55);
  }

  body.light-mode .theme-btn {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8);
    color: rgba(15,23,42,0.6);
  }
  body.light-mode .theme-btn:hover {
    background: #ffffff;
    border-color: rgba(0,0,0,0.18);
    color: #0f172a;
  }

  body.light-mode header p { -webkit-text-fill-color: rgba(26,37,53,0.5); background: none; }
  body.light-mode .idle-brand-tagline { color: rgba(26,37,53,0.3); }

  body.light-mode .controls.docked {
    border-top-color: rgba(0,0,0,0.08);
    background: var(--bg-card);
  }

  body.light-mode .session-card { background: var(--bg-card); border-color: rgba(0,0,0,0.09); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
  body.light-mode .session-context-name { color: rgba(26,37,53,0.45); }
  body.light-mode .session-score-badge { background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.15); color: rgba(37,99,235,0.75); }
  body.light-mode .session-score-badge.best { background: rgba(9,124,253,0.07); border-color: rgba(9,124,253,0.15); color: rgba(9,124,253,0.75); }
  body.light-mode .next-focus-pill { background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.2); }
  body.light-mode .next-focus-label { color: rgba(37,99,235,0.75); }
  body.light-mode .next-focus-arrow { color: rgba(37,99,235,0.5); }
  body.light-mode .drill-modal-card { background: #d6e8f8; border-color: rgba(30,58,95,0.15); }
  body.light-mode .drill-modal-close { color: rgba(30,58,95,0.6); }
  body.light-mode .upload-divider { background: rgba(0,0,0,0.06); }
  body.light-mode .session-card .controls.docked { background: transparent; }

  /* Light mode mic */
  body.light-mode .mic-btn {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(37,99,235,0.25);
  }
  body.light-mode .mic-btn.recording {
    background: var(--accent);
    box-shadow: 0 4px 20px rgba(9,124,253,0.35);
  }

  body.light-mode .timer { color: rgba(15,23,42,0.55); }

  body.light-mode .or-divider { color: rgba(15,23,42,0.35); }
  body.light-mode .or-divider::before,
  body.light-mode .or-divider::after { background: rgba(0,0,0,0.1); }

  body.light-mode .upload-zone {
    border-color: rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.42);
    color: rgba(26,37,53,0.5);
  }

  body.light-mode .upload-zone:hover, body.light-mode .upload-zone.dragover {
    background: rgba(255,255,255,0.68);
    border-color: rgba(0,64,255,0.28);
    color: rgba(26,37,53,0.8);
  }

  body.light-mode .processing .label { color: rgba(15,23,42,0.65); }

  body.light-mode .retry-btn {
    background: rgba(255,255,255,0.55);
    border-color: rgba(0,0,0,0.1);
    color: #1a2535;
  }

  body.light-mode .retry-btn:hover {
    background: rgba(255,255,255,0.78);
    border-color: rgba(0,0,0,0.16);
  }

  body.light-mode .pill {
    background: rgba(255,255,255,0.48);
    border-color: rgba(0,0,0,0.09);
    color: rgba(26,37,53,0.65);
  }

  body.light-mode .pill:hover {
    background: rgba(255,255,255,0.72);
    color: #1a2535;
  }

  body.light-mode .metric-badge {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
    color: rgba(15,23,42,0.55);
  }

  body.light-mode .script-add-btn {
    border-color: rgba(0,0,0,0.12);
    color: rgba(26,37,53,0.55);
    background: rgba(255,255,255,0.42);
  }

  body.light-mode .script-add-btn:hover {
    border-color: rgba(0,64,255,0.28);
    color: #1a2535;
    background: rgba(255,255,255,0.65);
  }

  /* Logo in light mode — keep brand colors */
  body.light-mode .logo-speak { color: #0f172a; }
  body.light-mode .logo-sharp { color: var(--accent); }

  /* Score cards */
  body.light-mode .score-card {
    background: rgba(255,255,255,0.52);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  body.light-mode .score-card.clickable:hover {
    background: rgba(255,255,255,0.75);
    border-color: rgba(0,64,255,0.18);
    box-shadow: 0 6px 24px rgba(0,64,255,0.08);
  }

  body.light-mode .score-card .label { color: rgba(15,23,42,0.5); }
  body.light-mode .delta.neutral { color: rgba(15,23,42,0.3); }

  /* Feedback & transcript */
  body.light-mode .feedback-block {
    background: rgba(255,255,255,0.5);
    border-color: rgba(0,0,0,0.08);
    color: rgba(26,37,53,0.78);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  body.light-mode .feedback-block strong { color: #0f172a; }

  body.light-mode .next-target {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
    border-left-color: var(--accent);
  }

  body.light-mode .feedback-section-bold { color: #0f172a; }
  body.light-mode .feedback-section-bold strong { color: #0f172a; }

  body.light-mode .transcript-section {
    background: rgba(255,255,255,0.42);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  body.light-mode .transcript-toggle { color: rgba(15,23,42,0.6); }
  body.light-mode .transcript-toggle:hover { color: #0f172a; }
  body.light-mode .transcript-body { color: rgba(15,23,42,0.65); }

  body.light-mode .block-section-header { color: rgba(15,23,42,0.42); }

  body.light-mode .attempt-divider { color: rgba(15,23,42,0.25); }
  body.light-mode .attempt-divider::before,
  body.light-mode .attempt-divider::after { background: rgba(0,0,0,0.08); }

  body.light-mode .attempt-header-label { color: rgba(15,23,42,0.4); }
  body.light-mode .attempt-header-time { color: rgba(15,23,42,0.28); }
  body.light-mode .audio-unavailable { color: rgba(15,23,42,0.4); }

  /* Script panel */
  body.light-mode .script-panel {
    background: rgba(255,255,255,0.48);
    border-color: rgba(0,0,0,0.08);
  }

  body.light-mode .script-panel-header {
    border-bottom-color: rgba(0,0,0,0.07);
    color: rgba(15,23,42,0.4);
  }

  body.light-mode .script-textarea {
    color: rgba(15,23,42,0.75);
    background: transparent;
  }

  /* Metric modal stays dark — SVG graph text must stay readable */
  body.light-mode .metric-overlay { background: rgba(0,0,0,0.4); }

  body.light-mode .metric-modal {
    background: #1e293b;
    border-color: rgba(255,255,255,0.08);
    color: #f1f5f9;
  }

  body.light-mode .metric-modal-score { color: rgba(241,245,249,0.5); }
  body.light-mode .metric-modal-close { color: rgba(241,245,249,0.45); }

  body.light-mode .metric-modal-close:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(241,245,249,0.85);
  }

  body.light-mode .metric-insight {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.07);
    color: rgba(241,245,249,0.75);
  }

  body.light-mode .metric-insight-loader { color: rgba(241,245,249,0.4); }

  body.light-mode .metric-why {
    color: rgba(15,23,42,0.55);
    border-top-color: rgba(0,0,0,0.08);
  }
  body.light-mode .mw-label {
    color: rgba(15,23,42,0.35);
  }

  /* Auth card */
  body.light-mode .auth-card {
    background: rgba(255,255,255,0.6);
    border-color: rgba(0,0,0,0.09);
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    color: #1a2535;
  }

  body.light-mode .auth-subtitle,
  body.light-mode .auth-hint { color: rgba(15,23,42,0.5); }

  body.light-mode .auth-tab { color: rgba(15,23,42,0.5); }
  body.light-mode .auth-tab.active { color: #0f172a; }
  body.light-mode .auth-tab.active::after { background: #2563eb; }

  body.light-mode .auth-tabs { background: rgba(0,0,0,0.05); }
  body.light-mode .auth-tab.active { background: rgba(255,255,255,0.6); }

  body.light-mode .auth-input {
    background: rgba(255,255,255,0.58);
    border-color: rgba(0,0,0,0.1);
    color: #1a2535;
  }

  body.light-mode .auth-input::placeholder { color: rgba(26,37,53,0.35); }
  body.light-mode .auth-input:focus {
    border-color: #2563eb;
    background: rgba(255,255,255,0.82);
  }

  body.light-mode .auth-error { color: #dc2626; }
  body.light-mode .auth-hint a { color: rgba(15,23,42,0.6); }
  body.light-mode .auth-hint a:hover { color: #0f172a; }

  body.light-mode .rename-input {
    background: rgba(255,255,255,0.65);
    color: #1a2535;
    border-color: rgba(0,0,0,0.12);
  }

  body.light-mode .user-info { color: rgba(15,23,42,0.5); }
  body.light-mode .user-email { color: rgba(15,23,42,0.7); }
  body.light-mode .logout-btn { color: rgba(15,23,42,0.5); }
  body.light-mode .logout-btn:hover { color: #0f172a; }

  /* ── Brand text logo ───────────────────── */
  .brand {
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .brand-speak { color: var(--accent); font-weight: 600; }
  .brand-sharp { color: var(--accent); font-weight: 800; }
  .header-brand {
    font-size: 1.9rem;
    margin-bottom: 4px;
  }
  .tagline {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0;
  }

  /* ── Panel buttons row ─────────────────── */
  .panel-btns {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
  }
  .panel-btns button {
    background: none;
    border: 1px solid var(--border-acc);
    color: var(--text-muted);
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
  }
  .panel-btns button:hover {
    background: rgba(37,99,235,0.1);
    color: var(--text);
  }

  /* ── Mic rings container ──────────────── */
  .mic-rings {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    width: 148px;
    height: 148px;
  }

  /* Scan bar — single gradient bar with shimmer, shown during analysis */
  .rec-bars {
    position: relative;
    width: 140px;
    height: 4px;
    margin: 20px auto 0;
    border-radius: 2px;
    background: rgba(99,78,237,0.15);
    overflow: hidden;
  }
  .rec-bar { display: none; }
  .rec-bars::after {
    content: '';
    position: absolute;
    top: 0; left: -45%;
    width: 45%; height: 100%;
    border-radius: 2px;
    background: var(--accent);
    animation: barScan 1.6s ease-in-out infinite;
  }
  @keyframes barScan {
    0%   { left: -45%; }
    100% { left: 145%; }
  }

  /* Circular audio visualizer canvas */
  .mic-visualizer {
    position: absolute;
    width: 260px;
    height: 260px;
    left: calc(50% - 130px);
    top: calc(50% - 130px);
    pointer-events: none;
    z-index: 1;
  }

  /* mic-glow removed — using ripple rings instead */

  /* ── Topbar ─────────────────────────────── */
  .topbar {
    height: 64px;
    flex-shrink: 0;
    background: rgba(5,10,18,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 60px;
    gap: 0;
    z-index: 200;
    position: sticky;
    top: 0;
  }
  .topbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    flex-shrink: 0;
  }
  .topbar-logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
  }
  .topbar-logo .sharp { color: var(--accent); }
  .topbar-right-group {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .topbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin-left: 40px;
  }
  .topbar-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.15s;
  }
  .topbar-link:hover {
    color: var(--text);
  }
  .topbar-user {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  body.light-mode .topbar {
    background: rgba(255,255,255,0.97);
    border-bottom-color: #E5E7EB;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  }
  body.light-mode .topbar-link { color: rgba(17,24,39,0.55); }
  body.light-mode .topbar-link:hover { color: #111827; background: none; text-decoration: underline; text-underline-offset: 3px; }
  body.light-mode .topbar-user { color: rgba(17,24,39,0.55); }
  body.light-mode .topbar-action-btn {
    border-color: rgba(37,99,235,0.55);
    color: var(--accent);
    background: rgba(255,255,255,0.88);
  }
  body.light-mode .topbar-action-btn:hover,
  body.light-mode .topbar-action-btn.active {
    background: var(--accent);
    color: #fff;
  }
  body.light-mode .topbar-tools-btn {
    border-color: rgba(0,0,0,0.12);
    color: rgba(15,23,42,0.6);
    background: rgba(0,0,0,0.04);
  }
  body.light-mode .topbar-tools-btn:hover,
  body.light-mode .topbar-tools-wrapper.open .topbar-tools-btn {
    background: rgba(0,0,0,0.07);
    color: #0f172a;
    border-color: rgba(0,0,0,0.18);
  }
  body.light-mode .topbar-dropdown {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }
  body.light-mode .timer { color: rgba(15,23,42,0.55); }
  body.light-mode .hint { color: rgba(26,37,53,0.52); }

  /* ── Layout body ────────────────────────── */
  .layout-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 0;
  }
  .main-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
    padding-left: 20px;
  }
  .main-content::-webkit-scrollbar { width: 5px; }
  .main-content::-webkit-scrollbar-track { background: transparent; }
  .main-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
  .main-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

  /* ── Right panel ────────────────────────── */
  .right-panel {
    width: 220px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: width 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .right-panel-header {
    padding: 14px 12px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }
  .right-panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .new-presentation-btn {
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
  }
  .new-presentation-btn:hover { background: rgba(9,124,253,0.08); border-color: rgba(9,124,253,0.35); }
  .new-presentation-btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
  .right-panel.collapsed {
    width: 0;
    overflow: hidden;
  }
  body.light-mode .right-panel {
    background: var(--bg-card);
    border-left-color: rgba(0,0,0,0.08);
  }
  body.light-mode .right-panel-header { border-bottom-color: rgba(0,0,0,0.07); }

  /* ── Ad banner (free users only) ────────── */
  .ad-banner {
    flex-shrink: 0;
    width: 100%;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    padding: 8px;
  }
  .ad-banner-inner {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* ── Panel toggle button ─────────────────── */
  .panel-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .panel-toggle-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
  }
  .panel-toggle-btn.active {
    color: var(--text);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
  }
  .panel-toggle-btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
  .panel-toggle-label { white-space: nowrap; }
  body.light-mode .panel-toggle-btn { color: rgba(15,23,42,0.55); background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
  body.light-mode .panel-toggle-btn:hover { background: rgba(0,0,0,0.07); color: #0f172a; }
  body.light-mode .panel-toggle-btn.active { color: #0f172a; }



/* ── Shared navigation bar (.l-nav) ──────────────── */

.l-nav {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5,10,18,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  gap: 0;
}

.l-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.l-logo .sharp { color: var(--accent); }

.l-nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: 40px;
}
.l-nav-links a {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s;
}
.l-nav-links a:hover { color: var(--text); }
.l-nav-links a.active { color: var(--text); }

.l-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.l-nav-cta {
  height: 34px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s;
}
.l-nav-cta:hover { filter: brightness(1.1); }

/* Shared footer */
.l-footer-wrap {
  border-top: 1px solid var(--border);
  padding: 28px 60px;
}
.l-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
}
.l-footer-links {
  display: flex;
  gap: 20px;
}
.l-footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.l-footer-links a:hover { color: var(--text); }

body.light-mode .l-nav {
  background: rgba(255,255,255,0.97);
  border-bottom-color: #E5E7EB;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
body.light-mode .l-logo { color: #0f172a; }
body.light-mode .l-nav-links a { color: rgba(17,24,39,0.55); }
body.light-mode .l-nav-links a:hover { color: #111827; }

/* ── Landing page styles ─────────────────────────── */

  :root {
    --r:   0.75rem;
    --rsm: 0.5rem;
  }

  /* ── Navigation ─────────────────────────── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 60px;
    background: rgba(5,10,18,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148,163,184,0.12);
  }

  .nav-logo {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    line-height: 1;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }

  .nav-links a {
    padding: 8px 18px;
    border-radius: var(--rsm);
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
  }

  .nav-links a:hover {
    color: #fff;
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }

  .nav-links a.nav-cta {
    background: var(--accent);
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(9,124,253,0.3);
  }

  .nav-links a.nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9,124,253,0.4);
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-right .nav-cta {
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(9,124,253,0.3);
    transition: all 0.2s;
    white-space: nowrap;
  }

  .nav-right .nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9,124,253,0.4);
  }

  /* ── Hero ───────────────────────────────── */
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 24px 70px;
    position: relative;
    overflow: hidden;
  }

  .hero::before,
  .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
  }

  .hero::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(9,124,253,0.1) 0%, transparent 70%);
    top: 20%; left: 10%;
  }

  .hero::after {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,64,255,0.08) 0%, transparent 70%);
    top: 30%; right: 5%;
  }

  .hero-inner {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .hero-tagline {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
  }

  .hero-brand {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-intro {
    font-size: 1.05rem;
    color: rgba(200,208,221,0.9);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto 32px;
  }

  .hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
  }

  /* ── App preview ─────────────────────────── */
  .video-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.2rem;
    position: relative;
    overflow: hidden;
  }

  .video-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.02) 0%, transparent 70%);
  }

  .btn-primary {
    padding: 13px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(9,124,253,0.35);
    transition: all 0.2s;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(9,124,253,0.45);
    background: #2563eb;
  }

  .btn-secondary {
    padding: 13px 28px;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
  }

  .btn-secondary:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
  }

  .hero-stats {
    display: flex;
    gap: 0;
    justify-content: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.07);
  }

  .hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 0 8px;
  }

  .hero-stat + .hero-stat {
    border-left: 1px solid rgba(255,255,255,0.07);
  }

  .stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #2563eb;
  }

  .stat-label {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  /* ── Shared section styles ──────────────── */
  section { padding: 88px 24px; }

  .section-inner { max-width: 1000px; margin: 0 auto; }

  .section-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-align: center;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 52px;
  }

  .section-title .accent {
    color: #2563eb;
  }

  /* ── Feature cards ──────────────────────── */
  .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  @media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 540px) { .feature-grid { grid-template-columns: 1fr; } }

  .feature-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: var(--r);
    padding: 24px 22px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  }

  .feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.9;
  }

  .feature-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(148,163,184,0.22);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  }

  .feature-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
  }

  .feature-icon svg {
    width: 20px; height: 20px;
    fill: none;
    stroke: #2563eb;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .feature-icon svg.filled {
    fill: #2563eb;
    stroke: none;
  }

  .feature-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
  }

  .feature-desc {
    font-size: 0.82rem;
    color: rgba(200,208,221,0.85);
    line-height: 1.65;
  }

  /* ── Privacy ────────────────────────────── */
  #privacy { background: transparent; }

  .privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  @media (max-width: 640px) { .privacy-grid { grid-template-columns: 1fr; } }

  .privacy-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--r);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .privacy-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.9;
  }

  .privacy-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: block;
  }

  .privacy-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .privacy-card p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.65;
  }

  /* ── Pricing ────────────────────────────── */
  #buy { text-align: center; }

  .pricing-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 660px;
    margin: 0 auto;
  }

  @media (max-width: 560px) { .pricing-wrap { grid-template-columns: 1fr; } }

  .plan-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
  }

  .plan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.6;
  }

  .plan-card.highlight {
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
  }

  .plan-card.highlight::before {
    opacity: 1;
    height: 3px;
  }

  .plan-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  }

  .plan-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.35);
  }

  .plan-price {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  .plan-price.grad {
    color: #2563eb;
  }

  .plan-period {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
  }

  .plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
  }

  .plan-features li {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.58);
    display: flex;
    align-items: flex-start;
    gap: 9px;
  }

  .plan-features li::before {
    content: '✓';
    color: #34d399;
    font-weight: 700;
    flex-shrink: 0;
  }

  .plan-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--rsm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
  }

  .plan-btn.ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    box-sizing: border-box;
  }

  .plan-btn.ghost:hover {
    background: rgba(255,255,255,0.09);
    transform: translateY(-1px);
  }

  .plan-btn.solid {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(9,124,253,0.35);
  }

  .plan-btn.solid:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(9,124,253,0.45);
  }

  /* ── Footer ─────────────────────────────── */
  footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .footer-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .footer-copy {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
  }

  .footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
  }

  .footer-links a {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    transition: color 0.2s;
  }

  .footer-links a:hover { color: rgba(255,255,255,0.7); }

  /* ── Fade-up on scroll ──────────────────── */
  .fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), transform 0.55s cubic-bezier(0.4,0,0.2,1);
  }

  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Misc ───────────────────────────────── */
  @media (max-width: 600px) {
    nav { padding: 12px 20px; }
    .hero-inner { padding: 0 4px; }
    .hero-brand { font-size: 2.4rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn-primary, .btn-secondary { text-align: center; }
    footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
    .section-title { font-size: 1.65rem; }
  }

  /* ── Theme toggle button ──────────────── */
  .theme-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 7px 9px;
    transition: all 0.2s;
    flex-shrink: 0;
  }
  .theme-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
  }

  /* ── Light mode ───────────────────────── */
  body.light-mode {
    background: #F9FAFB;
    color: #111827;
  }
  body.light-mode nav {
    background: rgba(255,255,255,0.92);
    border-bottom-color: rgba(0,0,0,0.07);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  }
  body.light-mode .nav-links a { color: rgba(17,24,39,0.6); }
  body.light-mode .nav-links a:hover { background: none; color: #111827; }
  body.light-mode .hero-tagline { color: rgba(15,23,42,0.4); }
  body.light-mode .hero-intro { color: rgba(15,23,42,0.65); }
  body.light-mode .btn-secondary { color: rgba(15,23,42,0.65); border-color: rgba(15,23,42,0.18); background: rgba(255,255,255,0.7); }
  body.light-mode .btn-secondary:hover { color: #0f172a; border-color: rgba(15,23,42,0.35); background: #ffffff; }
  body.light-mode .hero-stats { border-top-color: rgba(0,0,0,0.08); }
  body.light-mode .hero-stat + .hero-stat { border-left-color: rgba(0,0,0,0.08); }
  body.light-mode .stat-label { color: rgba(15,23,42,0.4); }
  body.light-mode .video-wrap { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.07); }
  body.light-mode .section-eyebrow { color: var(--accent); }
  body.light-mode .feature-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.07);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  }
  body.light-mode .feature-card:hover {
    background: #f8faff;
    border-color: rgba(0,64,255,0.18);
    box-shadow: 0 8px 28px rgba(0,64,255,0.08);
  }
  body.light-mode .feature-name { color: #0f172a; }
  body.light-mode .feature-desc { color: rgba(15,23,42,0.55); }
  body.light-mode .feature-icon {
    background: rgba(0,64,255,0.05);
    border-color: rgba(0,64,255,0.1);
  }
  body.light-mode .privacy-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.07);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  body.light-mode .privacy-card h4 { color: #0f172a; }
  body.light-mode .privacy-card p { color: rgba(15,23,42,0.55); }
  body.light-mode .plan-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  }
  body.light-mode .plan-card.highlight {
    background: #ffffff;
    border-color: rgba(0,64,255,0.25);
    box-shadow: 0 4px 20px rgba(0,64,255,0.1);
  }
  body.light-mode .plan-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.1); }
  body.light-mode .plan-label { color: rgba(15,23,42,0.4); }
  body.light-mode .plan-period { color: rgba(15,23,42,0.35); }
  body.light-mode .plan-features li { color: rgba(15,23,42,0.6); }
  body.light-mode footer {
    background: rgba(255,255,255,0.5);
    border-top-color: rgba(0,0,0,0.07);
  }
  body.light-mode .footer-copy { color: rgba(15,23,42,0.35); }
  body.light-mode .footer-links a { color: rgba(15,23,42,0.48); }
  body.light-mode .footer-links a:hover { color: rgba(15,23,42,0.8); }
  body.light-mode .theme-btn {
    border-color: rgba(0,0,0,0.1);
    color: rgba(15,23,42,0.6);
    background: rgba(255,255,255,0.8);
  }
  body.light-mode .theme-btn:hover {
    background: #ffffff;
    border-color: rgba(0,0,0,0.18);
    color: #0f172a;
  }

  /* ── Logo wordmark (em-based, scales with font-size) ── */
  .logo-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 0.22em;
    position: relative;
    line-height: 1;
  }
  .logo-text-row {
    position: relative;
    display: inline-block;
    line-height: 1;
  }
  .logo-full-text {
    background: linear-gradient(to right, var(--gs), var(--ge));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: 1;
  }
  .logo-D-lines {
    position: absolute;
    top: 0.03em;
    left: 0;
    width: 0.68em;
    height: 0.9em;
    pointer-events: none;
  }
  .logo-underline-bar {
    position: absolute;
    bottom: 0.15em;
    left: 0.04em;
    right: -0.28em;
    height: 0.75em;
    pointer-events: none;
  }
  .logo-underline-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-bottom: 0.15em solid transparent;
    border-right: 0.15em solid transparent;
    border-bottom-right-radius: 0.38em;
    background: linear-gradient(to right, var(--gs), var(--ge)) border-box;
    -webkit-mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
  }
  .logo-img {
    height: 58px;
    width: auto;
    display: block;
  }
  .logo-img--sidebar {
    height: 44px;
    margin-bottom: 4px;
  }
  .logo-img--hero {
    height: 140px;
  }


/* ── FAQ page styles ─────────────────────────────── */


  /* ── Navigation ─────────────────────────── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 60px;
    background: rgba(5,10,18,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148,163,184,0.12);
  }

  .nav-logo {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    line-height: 1;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }

  .nav-links a {
    padding: 8px 18px;
    border-radius: var(--rsm);
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
  }

  .nav-links a:hover {
    color: #fff;
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }

  .nav-links a.nav-cta {
    background: var(--accent);
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(9,124,253,0.3);
  }

  .nav-links a.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9,124,253,0.4);
  }

  /* ── FAQ body — solid background, no gradient ─── */
  .faq-page { background: var(--bg, #050a12) !important; background-image: none !important; }

  /* ── Page content ───────────────────────── */
  .page-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 120px 24px 80px;
  }

  .page-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
  }

  .page-title {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
  }

  .page-title .accent {
    color: var(--accent);
  }

  .page-intro {
    color: rgba(200,208,221,0.85);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 56px;
    max-width: 560px;
  }

  /* ── FAQ items ──────────────────────────── */
  .faq-section {
    margin-bottom: 48px;
  }

  .faq-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.48);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .faq-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148,163,184,0.15);
  }

  .faq-item {
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 8px;
    transition: border-color 0.2s;
  }

  .faq-item:hover { border-color: rgba(255,255,255,0.12); }

  .faq-question {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    line-height: 1.4;
  }

  .faq-question:hover { background: rgba(255,255,255,0.05); }

  .faq-item.open .faq-question { background: rgba(255,255,255,0.05); }

  .faq-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: rgba(255,255,255,0.5);
    transition: transform 0.2s;
  }

  .faq-item.open .faq-arrow { transform: rotate(180deg); }

  .faq-answer {
    display: none;
    padding: 0 20px 18px;
    color: rgba(200,208,221,0.85);
    font-size: 0.9rem;
    line-height: 1.75;
    background: rgba(255,255,255,0.02);
  }

  .faq-item.open .faq-answer { display: block; }

  .faq-answer a {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .faq-answer a:hover { color: #fff; }

  .faq-answer ul {
    margin: 8px 0 8px 20px;
  }

  .faq-answer ul li {
    margin-bottom: 4px;
  }

  /* ── Footer ─────────────────────────────── */
  footer {
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
  }

  .footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .footer-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
  }

  .footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }

  .footer-links a {
    padding: 6px 12px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 6px;
    transition: all 0.2s;
  }

  .footer-links a:hover { color: rgba(255,255,255,0.7); }

  @media (max-width: 640px) {
    nav { padding: 14px 20px; }
    .nav-links { display: none; }
    .page-title { font-size: 2rem; }
    footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  }

  /* ── Theme toggle button ──────────────── */
  .theme-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 7px 9px;
    transition: all 0.2s;
    flex-shrink: 0;
  }
  .theme-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
  }

  /* ── Light mode ───────────────────────── */
  body.light-mode {
    background: #F9FAFB;
    color: #111827;
  }
  body.light-mode nav {
    background: rgba(255,255,255,0.92);
    border-bottom-color: rgba(0,0,0,0.07);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  }
  body.light-mode .nav-links a { color: rgba(17,24,39,0.6); }
  body.light-mode .nav-links a:hover { background: none; color: #111827; }
  body.light-mode .page-eyebrow { color: rgba(15,23,42,0.4); }
  body.light-mode .page-intro { color: rgba(15,23,42,0.55); }
  body.light-mode .faq-section-title { color: rgba(15,23,42,0.35); }
  body.light-mode .faq-section-title::after { background: rgba(0,0,0,0.07); }
  body.light-mode .faq-item {
    border-color: rgba(0,0,0,0.07);
  }
  body.light-mode .faq-item:hover { border-color: rgba(0,64,255,0.15); }
  body.light-mode .faq-question {
    background: rgba(255,255,255,0.7);
    color: #0f172a;
  }
  body.light-mode .faq-question:hover { background: #ffffff; }
  body.light-mode .faq-item.open .faq-question { background: #ffffff; }
  body.light-mode .faq-arrow { fill: rgba(15,23,42,0.35); }
  body.light-mode .faq-answer {
    background: rgba(255,255,255,0.5);
    color: rgba(15,23,42,0.65);
    border-top-color: rgba(0,0,0,0.06);
  }
  body.light-mode .faq-answer a { color: rgba(0,64,255,0.75); }
  body.light-mode .faq-answer a:hover { color: #0040ff; }
  body.light-mode footer {
    background: rgba(255,255,255,0.4);
    border-top-color: rgba(0,0,0,0.07);
  }
  body.light-mode .footer-copy { color: rgba(15,23,42,0.35); }
  body.light-mode .footer-links a { color: rgba(15,23,42,0.48); }
  body.light-mode .footer-links a:hover { color: rgba(15,23,42,0.8); }
  body.light-mode .theme-btn {
    border-color: rgba(0,0,0,0.1);
    color: rgba(15,23,42,0.6);
    background: rgba(255,255,255,0.8);
  }
  body.light-mode .theme-btn:hover {
    background: #ffffff;
    border-color: rgba(0,0,0,0.18);
    color: #0f172a;
  }

  /* ── Logo wordmark (em-based, scales with font-size) ── */
  .logo-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 0.22em;
    position: relative;
    line-height: 1;
  }
  .logo-text-row {
    position: relative;
    display: inline-block;
    line-height: 1;
  }
  .logo-full-text {
    background: linear-gradient(to right, var(--gs), var(--ge));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: 1;
  }
  .logo-D-lines {
    position: absolute;
    top: 0.03em;
    left: 0;
    width: 0.68em;
    height: 0.9em;
    pointer-events: none;
  }
  .logo-underline-bar {
    position: absolute;
    bottom: 0.15em;
    left: 0.04em;
    right: -0.28em;
    height: 0.75em;
    pointer-events: none;
  }
  .logo-underline-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-bottom: 0.15em solid transparent;
    border-right: 0.15em solid transparent;
    border-bottom-right-radius: 0.38em;
    background: linear-gradient(to right, var(--gs), var(--ge)) border-box;
    -webkit-mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    mask:
      linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
  }
  .logo-img {
    height: 58px;
    width: auto;
    display: block;
  }
  .logo-img--sidebar {
    height: 44px;
    margin-bottom: 4px;
  }
  .logo-img--hero {
    height: 140px;
  }


/* ── Pricing page styles ──────────────────────────── */


  /* ── Navigation ─────────────────────────── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    background: rgba(5,10,18,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148,163,184,0.12);
  }

  .nav-logo {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    line-height: 1;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }

  .nav-links a {
    padding: 8px 18px;
    border-radius: var(--rsm);
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
  }

  .nav-links a:hover {
    color: #fff;
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }

  .nav-links a.nav-cta {
    background: var(--accent);
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(9,124,253,0.3);
  }

  .nav-links a.nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9,124,253,0.4);
  }

  /* ── Page wrapper ───────────────────────── */
  .page-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 120px 24px 80px;
  }

  /* ── Hero ───────────────────────────────── */
  .hero {
    text-align: center;
    margin-bottom: 64px;
  }

  .hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 16px;
    color: #fff;
  }

  .hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
  }

  /* ── Plan cards ─────────────────────────── */
  .plans-grid {
    display: flex;
    gap: 24px;
    max-width: 1020px;
    margin: 0 auto 72px;
    align-items: stretch;
  }

  .plan-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
  }

  .plan-card:hover {
    border-color: rgba(255,255,255,0.13);
    transform: translateY(-2px);
  }

  /* Pro card — gradient overline via ::before */
  .plan-card.plan-pro {
    padding-top: 35px;
  }

  .plan-card.plan-pro::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 20px 20px 0 0;
  }

  /* "Most popular" badge — top-right corner of plan cards only */
  .plan-card .plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
  }

  .plan-name {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.38);
    margin-bottom: 8px;
  }

  .plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
  }

  .plan-price-amount {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    line-height: 1;
  }

  .plan-price-period {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.38);
    font-weight: 500;
  }

  .plan-tagline {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.36);
    margin-bottom: 24px;
    min-height: 1.2em;
  }

  .plan-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin-bottom: 20px;
  }

  .plan-features {
    list-style: none;
    margin-bottom: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.45;
  }

  .feat-check {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-top: 1px;
  }

  .plan-free .feat-check { color: #2563eb; }
  .plan-pro  .feat-check { color: var(--accent); }
  .plan-enterprise .feat-check { color: rgba(255,255,255,0.4); }
  .plan-enterprise { opacity: 0.8; }

  /* ── CTA buttons ─────────────────────────── */

  /* Ghost / border-gradient for Free */
  .btn-ghost {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #e2e8f0;
    background: transparent;
    border: none;
    position: relative;
    transition: all 0.2s;
    letter-spacing: 0.01em;
    /* inner radius for the pseudo border trick */
    z-index: 0;
  }

  .btn-ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1.5px;
    background: var(--accent);
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: -1;
  }

  .btn-ghost:hover {
    background: rgba(37,99,235,0.08);
    color: #fff;
  }

  /* Gradient fill for Pro */
  .btn-gradient {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,99,235,0.35);
    transition: all 0.2s;
    letter-spacing: 0.01em;
  }

  .btn-gradient:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 26px rgba(37,99,235,0.45);
  }

  .btn-gradient:active { transform: translateY(0); }

  /* ── FAQ section ────────────────────────── */
  .section-header {
    text-align: center;
    margin-bottom: 32px;
  }

  .section-overline {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
  }

  .faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .faq-item {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .faq-item:hover { border-color: rgba(255,255,255,0.12); }

  .faq-question {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    line-height: 1.4;
  }

  .faq-question:hover { background: rgba(255,255,255,0.05); }
  .faq-question.open  { background: rgba(255,255,255,0.05); }

  .faq-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: rgba(255,255,255,0.35);
    transition: transform 0.2s;
  }

  .faq-item.open .faq-arrow { transform: rotate(180deg); }

  .faq-answer {
    display: none;
    padding: 0 20px 18px;
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    line-height: 1.75;
    background: rgba(255,255,255,0.02);
  }

  .faq-item.open .faq-answer { display: block; }

  .faq-answer a {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .faq-answer a:hover { color: #fff; }

  /* ── Footer ─────────────────────────────── */
  footer {
    margin-top: 72px;
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
  }

  .footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .footer-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
  }

  .footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
  }

  .footer-links a {
    padding: 6px 12px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 6px;
    transition: all 0.2s;
  }

  .footer-links a:hover { color: rgba(255,255,255,0.7); }

  /* ── Responsive ─────────────────────────── */
  @media (max-width: 640px) {
    nav { padding: 14px 20px; }
    .nav-links { display: none; }
    .hero-title { font-size: 2rem; }
    .plans-grid { flex-direction: column; max-width: 100%; }
    footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  }

/* ── Mode button + dropdown ─────────────────────── */
.panel-header-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-header-btns .new-presentation-btn {
  width: 100%;
}

.sidebar-mode-wrap {
  position: relative;
  width: 100%;
}

.sidebar-mode-wrap .sidebar-mode-btn {
  width: 100%;
  justify-content: flex-start;
}

.sidebar-mode-wrap .sidebar-mode-btn .mode-caret {
  margin-left: auto;
  opacity: 0.5;
  transition: transform 0.2s;
}

.sidebar-mode-wrap.open .mode-caret { transform: rotate(180deg); }

.mode-dropdown-wrap {
  position: relative;
}

.mode-btn {
  height: 100%;
  padding: 9px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
}
#modeBtnLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-btn:hover { background: rgba(255,255,255,0.1); }
.mode-btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.mode-caret { opacity: 0.5; transition: transform 0.2s; }
.mode-dropdown-wrap.open .mode-caret { transform: rotate(180deg); }

.mode-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card, #162032);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 1000;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.mode-dropdown.open { display: flex; }

.mode-dropdown-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px 8px;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
  width: 100%;
}

.mode-option:hover { background: rgba(255,255,255,0.05); }
.mode-option.active { background: rgba(37,99,235,0.15); }
.mode-option.active strong { color: #60a5fa; }
.mode-option.wip-mode { opacity: 0.7; }
.mode-option.wip-mode:hover { opacity: 1; }
.mode-pro-lock { display:inline-flex; align-items:center; gap:3px; font-size:0.65rem; font-weight:700; color:var(--accent); background:rgba(59,130,246,0.12); border:1px solid rgba(59,130,246,0.25); border-radius:4px; padding:1px 5px; margin-left:6px; vertical-align:middle; letter-spacing:0.02em; }
.mode-option.pro-locked { cursor:pointer; }
.mode-option.pro-locked .mode-icon { opacity:0.6; }
.speech-sub-option.pro-locked { cursor:pointer; }

.mode-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.mode-option strong { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.mode-desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.mode-option-arrow { margin-left: auto; padding-left: 6px; opacity: 0.45; font-size: 0.75rem; line-height: 1; align-self: center; transition: transform 0.15s; }
.speech-sub-dropdown.open ~ .mode-option .mode-option-arrow,
.mode-option-wrap:has(.speech-sub-dropdown.open) .mode-option-arrow { transform: rotate(90deg); }

/* Speech type sub-dropdown */
.mode-option-wrap { position: relative; }
.speech-sub-dropdown {
  display: none;
  margin-top: 4px;
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px;
  flex-direction: column;
  gap: 2px;
}
.speech-sub-dropdown.open { display: flex; }
.speech-sub-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
  width: 100%;
}
.speech-sub-option:hover { background: rgba(255,255,255,0.05); }
.speech-sub-option.active { background: rgba(37,99,235,0.15); }
.speech-sub-option.active strong { color: #60a5fa; }
.speech-sub-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.speech-sub-option strong { display: block; font-size: 0.8rem; font-weight: 600; }
.speech-sub-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.35; margin-top: 2px; }
body.light-mode .speech-sub-dropdown { background: #ffffff; border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }

.wip-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(9,124,253,0.2);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 2px;
}

body.light-mode .mode-btn {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: var(--text);
}
body.light-mode .mode-btn:hover { background: rgba(0,0,0,0.09); }
body.light-mode .mode-dropdown { background: #ffffff; border-color: rgba(0,0,0,0.1); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

/* ── WIP modal ──────────────────────────────────── */
.wip-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wip-modal {
  background: var(--bg-card, #162032);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.wip-modal-icon { font-size: 2rem; margin-bottom: 12px; }
.wip-modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.wip-modal-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.wip-modal-badge {
  display: inline-block;
  background: rgba(9,124,253,0.18);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.wip-modal-close {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.wip-modal-close:hover { opacity: 0.88; }

body.light-mode .wip-modal { background: #ffffff; border-color: rgba(0,0,0,0.08); }

/* ── TTS coaching button ────────────────────────── */
.tts-coach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  vertical-align: middle;
  flex-shrink: 0;
}

.tts-coach-btn:hover {
  background: rgba(37,99,235,0.2);
  border-color: rgba(37,99,235,0.4);
  color: #60a5fa;
}

.tts-coach-btn svg { width: 12px; height: 12px; fill: currentColor; }

body.light-mode .tts-coach-btn { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.35); }
body.light-mode .tts-coach-btn:hover { background: rgba(37,99,235,0.1); color: #2563eb; }

.tts-coach-btn.tts-purple {
  border-color: rgba(9,124,253,0.5);
  background: rgba(9,124,253,0.15);
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(9,124,253,0.35);
}
.tts-coach-btn.tts-purple:hover {
  background: rgba(9,124,253,0.3);
  border-color: rgba(9,124,253,0.7);
  color: #bfdbfe;
  box-shadow: 0 0 12px rgba(9,124,253,0.55);
}
body.light-mode .tts-coach-btn.tts-purple { border-color: rgba(9,124,253,0.4); background: rgba(9,124,253,0.08); color: var(--accent); box-shadow: 0 0 8px rgba(9,124,253,0.2); }
body.light-mode .tts-coach-btn.tts-purple:hover { background: rgba(9,124,253,0.15); box-shadow: 0 0 12px rgba(9,124,253,0.35); }

/* ── TTS tooltip ─────────────────────────────────── */
.tts-tooltip {
  position: absolute;
  z-index: 9500;
  width: 220px;
  background: #1a2740;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: ttsTooltipIn 0.15s ease;
}

@keyframes ttsTooltipIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tts-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 9px;
  background: #1a2740;
  border-left: 1px solid rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.1);
  transform: translateX(-50%) rotate(45deg);
}

.tts-tooltip-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 5px;
}

.tts-tooltip-desc {
  font-size: 0.75rem;
  color: rgba(226,232,240,0.55);
  line-height: 1.5;
  margin-bottom: 9px;
}

.tts-coming-soon {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(9,124,253,0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(9,124,253,0.3);
}

body.light-mode .tts-tooltip { background: #ffffff; border-color: rgba(0,0,0,0.1); }
body.light-mode .tts-tooltip::before { background: #ffffff; border-color: rgba(0,0,0,0.1); }
body.light-mode .tts-tooltip-title { color: #0f172a; }
body.light-mode .tts-tooltip-desc { color: rgba(15,23,42,0.55); }

/* ── Language button (topbar) ───────────────────── */
.wip-topbar-btn { opacity: 0.8; }
.wip-topbar-btn:hover { opacity: 1; }

/* ── Tutorial overlay ───────────────────────────── */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 32px;
  pointer-events: none;
}

.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  pointer-events: all;
}

.tutorial-box {
  position: relative;
  background: var(--bg-card, #162032);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 24px 24px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  pointer-events: all;
  animation: tutorialSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

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

.tutorial-step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.tutorial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.2s, width 0.2s;
}

.tutorial-dot.active {
  background: #2563eb;
  width: 18px;
  border-radius: 3px;
}

.tutorial-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tutorial-body {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.tutorial-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}
.tutorial-skip:hover { color: var(--text); }

.tutorial-next {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tutorial-next:hover { opacity: 0.88; }

.tutorial-highlighted {
  outline: 2px solid #2563eb !important;
  outline-offset: 3px;
  border-radius: 50%;
  animation: tutorialPulse 1s ease-in-out infinite;
}

@keyframes tutorialPulse {
  0%, 100% { outline-color: #2563eb; }
  50% { outline-color: #60a5fa; }
}

body.light-mode .tutorial-box { background: #ffffff; border-color: rgba(0,0,0,0.08); }

/* ── Tone pill ───────────────────────────────────── */
.pill-tone {
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

/* ── Streak ──────────────────────────────────────── */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.02em;
}
.streak-fire { font-size: 0.9rem; }

body.light-mode .streak-pill { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.3); }

/* ── Export PDF button ───────────────────────────── */
.export-pdf-btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 7px;
  margin-top: 0;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.export-pdf-btn:hover {
  background: rgba(37,99,235,0.1);
  border-color: rgba(37,99,235,0.35);
  color: #60a5fa;
}
.export-pdf-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

body.light-mode .export-pdf-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); color: rgba(15,23,42,0.4); }
body.light-mode .export-pdf-btn:hover { background: rgba(37,99,235,0.07); border-color: rgba(37,99,235,0.3); color: #2563eb; }

/* ── How it works ───────────────────────────────── */
#how-it-works { padding: 100px 24px; }

.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 56px;
}

.step-card {
  flex: 1;
  padding: 0 28px;
  text-align: center;
}

.step-num {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.88rem;
  color: rgba(226,232,240,0.55);
  line-height: 1.65;
}

.step-connector {
  width: 60px;
  flex-shrink: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb22, var(--accent)22);
  margin-top: 36px;
  border-radius: 1px;
}

@media (max-width: 700px) {
  .steps-row { flex-direction: column; gap: 40px; }
  .step-connector { width: 2px; height: 40px; margin: 0 auto; }
}

/* ── Testimonials ───────────────────────────────── */
#testimonials { padding: 100px 24px; background: rgba(255,255,255,0.01); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.testimonial-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial-quote {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(226,232,240,0.7);
  flex: 1;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  flex-shrink: 0;
}

.testimonial-name { font-size: 0.84rem; font-weight: 600; color: var(--text, #e2e8f0); }
.testimonial-role { font-size: 0.76rem; color: rgba(226,232,240,0.4); margin-top: 2px; }

body.light-mode .testimonial-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }
body.light-mode .testimonial-quote { color: rgba(15,23,42,0.65); }
body.light-mode .testimonial-name { color: #0f172a; }

/* ── Coming soon / Waitlist ─────────────────────── */
#coming-soon { padding: 100px 24px; }

.section-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: rgba(226,232,240,0.5);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.65;
}

.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 52px;
}

.upcoming-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upcoming-icon { font-size: 1.6rem; margin-bottom: 4px; }
.upcoming-name { font-size: 0.92rem; font-weight: 700; color: var(--text, #e2e8f0); }
.upcoming-desc { font-size: 0.8rem; color: rgba(226,232,240,0.5); line-height: 1.55; flex: 1; }

.upcoming-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(9,124,253,0.15);
  color: #fbbf24;
  align-self: flex-start;
}

.waitlist-box {
  margin-top: 56px;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(9,124,253,0.08));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 56px;
}

.waitlist-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin-bottom: 8px;
}

.waitlist-sub {
  font-size: 0.87rem;
  color: rgba(226,232,240,0.5);
  margin-bottom: 20px;
}

.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.waitlist-input {
  flex: 1;
  padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text, #e2e8f0);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}
.waitlist-input:focus { border-color: rgba(37,99,235,0.6); }
.waitlist-input::placeholder { color: rgba(226,232,240,0.28); }

.waitlist-btn {
  padding: 11px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.waitlist-btn:hover { opacity: 0.88; }

.waitlist-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #4ade80;
  font-weight: 600;
  padding: 10px;
}

.waitlist-note {
  font-size: 0.72rem;
  color: rgba(226,232,240,0.28);
  margin-top: 12px;
}

body.light-mode .upcoming-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }
body.light-mode .upcoming-name { color: #0f172a; }
body.light-mode .waitlist-box { background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(9,124,253,0.05)); border-color: rgba(0,0,0,0.07); }
body.light-mode .waitlist-input { background: #fff; border-color: rgba(0,0,0,0.12); color: #0f172a; }

/* ── Pricing — 3-column ─────────────────────────── */
.pricing-wrap-3 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 680px;
  margin: 48px auto 0;
}

.plan-mo {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.6;
}

.plan-badge-top {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.plan-card-teams {
  border-color: rgba(9,124,253,0.25);
}

.feat-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(9,124,253,0.15);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

@media (max-width: 780px) {
  .pricing-wrap-3 { grid-template-columns: 1fr; max-width: 380px; }
}


/* ── Metric weight percentage label ──────────────────────── */
.metric-weight {
  font-size: 0.62rem;
  font-weight: 500;
  opacity: 0.42;
  margin-left: 3px;
  letter-spacing: 0;
  vertical-align: baseline;
}

/* ── Interview question card ─────────────────────────────── */
.interview-question-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.interview-question-card.loading { opacity: 0.5; }
.interview-question-card.waiting { opacity: 0.6; border-style: dashed; }
.interview-question-card.revealing { border-color: var(--border); }
.interview-question-card.ready { border-color: rgba(37,99,235,0.35); }
.iq-waiting {
  font-style: italic;
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
}
.iq-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 7px;
  font-weight: 600;
}
.iq-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
.mic-btn.interview-pending {
  opacity: 0.32;
  cursor: not-allowed;
  filter: grayscale(0.4);
  pointer-events: none;
}

/* ── Settings button (always visible) ────────── */
.topbar-settings-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.topbar-settings-btn:hover {
  background: rgba(255,255,255,0.10);
}

/* ── Sign up / Log in button in topbar ────────── */
.topbar-signin-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  font-family: inherit;
}
.topbar-signin-btn:hover {
  background: #1d4ed8;
}
body.light-mode .topbar-signin-btn {
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
body.light-mode .topbar-settings-btn {
  background: rgba(0,0,0,0.04);
  border-color: #E5E7EB;
  color: #374151;
}
body.light-mode .topbar-settings-btn:hover {
  background: rgba(0,0,0,0.07);
}
.topbar-settings-dropdown {
  position: absolute;
  top: 64px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  display: none;
  flex-direction: column;
  z-index: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  padding: 8px;
  gap: 4px;
}
.topbar-settings-dropdown.open { display: flex; }
.settings-dd-email {
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 4px 8px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-dd-row {
  padding: 2px 8px 4px;
}
.settings-dd-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.settings-dd-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.settings-dd-btn:hover {
  background: rgba(255,255,255,0.07);
}
.settings-dd-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  gap: 8px;
}
.settings-dd-mode-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.settings-dd-mode-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.78rem;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.settings-dd-mode-btn:hover { background: rgba(255,255,255,0.07); }
body.light-mode .settings-dd-mode-btn { border-color: #E5E7EB; }
body.light-mode .settings-dd-btn:hover { background: rgba(0,0,0,0.05); }

/* ── Tools inline on desktop (≥900px) ───────────────────── */
/* Tools inline above 1150px; collapse to dropdown below */
@media (min-width: 1150px) {
  .topbar-tools-btn { display: none; }
  .topbar-dropdown {
    position: static !important;
    display: flex !important;
    flex-direction: row;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    gap: 4px;
    min-width: unset;
    max-height: unset;
    overflow: visible;
  }
  .topbar-dropdown .topbar-action-btn {
    width: auto;
    justify-content: center;
  }
}

/* Collapse user info and theme at 900px; swap tool pills for dropdown */
@media (max-width: 900px) {
  .topbar-user { display: none !important; }
  #themeBtn { display: none !important; }
  .topbar-tool-btns { display: none !important; }
  .topbar-tools-collapsed { display: block !important; }
  .topbar { overflow: visible; }
  .topbar-links { overflow: hidden; max-width: 40vw; }
}

/* Safe-area inset only on mobile to avoid notch overlap */
@media (max-width: 768px) {
  .topbar {
    height: calc(64px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    align-items: flex-end;
    padding-bottom: 0;
  }
  .topbar-right-group { height: 64px; align-items: center; }
}

/* Hide all topbar nav links on very narrow screens so settings btn always fits */
@media (max-width: 400px) {
  .topbar-links { display: none !important; }
}

/* ── Sidebar: fixed overlay on mobile (doesn't eat layout space) ── */
@media (max-width: 768px) {
  .right-panel {
    position: fixed !important;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 270px !important;
    min-width: 0 !important;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .right-panel:not(.collapsed) {
    transform: translateX(0) !important;
  }
  .right-panel.collapsed {
    transform: translateX(-100%) !important;
    width: 270px !important;
  }
}

/* ── Mic pre-warm + bouncing dots ────────────────────────── */
.mic-btn.prewarming-pending {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}
.dot-bounce {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.dot-bounce span {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.dot-bounce span:nth-child(2) { animation-delay: 0.15s; }
.dot-bounce span:nth-child(3) { animation-delay: 0.30s; }

/* ── Analysis phase tip ──────────────────────────────────── */
.processing-tip {
  font-size: 0.82rem;
  color: rgba(226,232,240,0.5);
  max-width: 320px;
  width: 100%;
  text-align: center;
  line-height: 1.55;
  margin: 18px auto 0;
  font-style: italic;
  min-height: 2.6em;
}

/* ── Mode dropdown: Coming Soon collapsible ──────────────── */
.mode-coming-soon-wrap {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 2px;
}
.mode-coming-soon-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 7px 12px;
  color: rgba(226,232,240,0.4);
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: color 0.15s;
}
.mode-coming-soon-toggle:hover { color: rgba(226,232,240,0.65); }
.mode-coming-soon-inner { display: none; }
.mode-coming-soon-inner.open { display: block; }

/* ── Attempt rating (thumbs up/down) ────────────────────── */
.attempt-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rating-label {
  font-size: 0.8rem;
  color: rgba(226,232,240,0.5);
  flex: 1;
}
.rating-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 1rem;
  cursor: pointer;
  color: rgba(226,232,240,0.45);
  display: flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rating-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); color: rgba(226,232,240,0.8); }
.rating-btn.thumbs-up.selected { color: #34d399; border-color: #34d399; background: rgba(52,211,153,0.08); }
.rating-btn.thumbs-down.selected { color: #f87171; border-color: #f87171; background: rgba(248,113,113,0.08); }
.rating-thanks {
  font-size: 0.82rem;
  color: rgba(226,232,240,0.55);
}

/* ── Mode WIP badge ──────────────────────────────────────── */
.mode-wip-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(9,124,253,0.12);
  color: rgba(251,191,36,0.8);
  border: 1px solid rgba(9,124,253,0.22);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ── Pin badge (Conversation Mode) ───────────────────────── */
.mode-pin-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(37,99,235,0.12);
  color: rgba(96,165,250,0.9);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.4;
}

.mode-option-pinned {
  border-left: 2px solid var(--accent, #2563eb);
  background: rgba(37,99,235,0.06);
}
.mode-option-pinned:hover { background: rgba(37,99,235,0.12); }
.mode-option-pinned.active { background: rgba(37,99,235,0.15); }

/* ── AI speaking indicator ───────────────────────────────── */
.ai-speaking-indicator {
  display: none;
  gap: 5px;
  align-items: center;
  justify-content: center;
  height: 20px;
  margin-bottom: 4px;
}
.ai-speaking-indicator.active { display: flex; }
.ai-speaking-indicator span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent, #2563eb);
  animation: speakPulse 1.2s infinite;
}
.ai-speaking-indicator span:nth-child(2) { animation-delay: .2s; }
.ai-speaking-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes speakPulse {
  0%,60%,100% { opacity:.2; transform:scale(.8); }
  30% { opacity:1; transform:scale(1); }
}

/* ── Conversation history ────────────────────────────────── */
.conv-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px 0;
}
.conv-turn {
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 8px;
}
.conv-turn-ai {
  background: rgba(37,99,235,0.1);
  border-left: 2px solid rgba(37,99,235,0.4);
  color: var(--text);
  align-self: flex-start;
}
.conv-turn-user {
  background: rgba(255,255,255,0.06);
  border-left: 2px solid rgba(255,255,255,0.15);
  color: rgba(226,232,240,0.8);
  align-self: flex-end;
  text-align: right;
}
.conv-speaking-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent, #2563eb);
  animation: speakPulse 1.2s infinite;
  margin-left: 6px;
}

/* ── Identity block (idle screen) ───────────────────────── */
.identity-block {
  margin: 10px auto 0;
  max-width: 380px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
}
.identity-level {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.identity-avg {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(226,232,240,0.45);
  font-weight: normal;
}
.identity-stats {
  font-size: 0.75rem;
  color: rgba(226,232,240,0.45);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.identity-stats strong { color: rgba(226,232,240,0.7); }
.identity-dot { color: rgba(226,232,240,0.25); }
.identity-improvement { color: #4ade80; font-weight: 600; }
.identity-challenge {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(251,191,36,0.8);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

/* ── Percentile label on score cards ────────────────────── */
.percentile-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(251,191,36,0.75);
  background: rgba(9,124,253,0.12);
  border: 1px solid rgba(9,124,253,0.2);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE — score grid + topbar
   ═══════════════════════════════════════════ */

/* Score grid: 2-col on mobile, 1-col on very small */
@media (max-width: 640px) {
  .score-grid-6 {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Metric badge: scroll long content on small screens */
@keyframes badge-scroll {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(0); }
  80%  { transform: translateX(var(--badge-overflow, 0px)); }
  100% { transform: translateX(var(--badge-overflow, 0px)); }
}
.score-card { overflow: hidden; }
.metric-badge.scrolling {
  cursor: default;
}
.metric-badge.scrolling .badge-inner {
  display: inline-block;
  white-space: nowrap;
  animation: badge-scroll 4s ease-in-out infinite alternate;
}
@media (max-width: 360px) {
  .score-grid-6, .score-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Topbar: hide "Presentations" text at 960px (before user info cuts off) */
@media (max-width: 960px) {
  .panel-toggle-label { display: none; }
  .panel-toggle-btn { padding: 6px 8px; min-width: 0; }
}
/* Nav links stay until very small */
@media (max-width: 400px) {
  .topbar-links { display: none !important; }
}

/* Identity block hidden — code preserved for future use */
.identity-block { display: none !important; }

/* Mode locked state */
.mode-btn.mode-locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.mode-btn.mode-locked .mode-caret { opacity: 0; }
