  :root {
    --paper:        #FFFFFF;
    --paper-2:      #F7F8FA;
    --paper-3:      #EEF0F3;
    --ink:          #0F1115;
    --ink-2:        #2A2D33;
    --ink-3:        #5C616B;
    --ink-4:        #9CA1AC;
    --line:         #E6E8ED;
    --line-2:       #CFD3DB;

    --accent:       oklch(0.45 0.07 250);
    --accent-soft:  oklch(0.96 0.015 250);
    --accent-ink:   oklch(0.32 0.07 250);

    --vivid-1:      oklch(0.62 0.22 265);
    --vivid-2:      oklch(0.68 0.22 30);
    --vivid-grad:   linear-gradient(90deg, oklch(0.62 0.22 265) 0%, oklch(0.65 0.20 200) 50%, oklch(0.78 0.18 165) 100%);

    --ok:           oklch(0.55 0.14 155);
    --ok-soft:      oklch(0.96 0.03 155);
    --warn:         oklch(0.55 0.16 25);
    --warn-soft:    oklch(0.97 0.03 25);

    --radius:       8px;
    --radius-lg:    12px;

    --serif: "Fraunces", "Noto Serif SC", "Songti SC", Georgia, serif;
    --sans:  "Inter", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
    --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  body {
    background-image:
      radial-gradient(1200px 600px at 88% -10%, oklch(0.97 0.013 250 / 0.6), transparent 60%),
      radial-gradient(900px 500px at -5% 35%, oklch(0.97 0.012 200 / 0.4), transparent 60%);
    min-height: 100vh;
  }
  ::selection { background: var(--accent-soft); color: var(--ink); }
  a { color: inherit; text-decoration: none; }
  button, input, textarea, select { font-family: inherit; color: inherit; }
  button { cursor: pointer; border: none; background: none; padding: 0; }

  *::-webkit-scrollbar { width: 8px; height: 8px; }
  *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
  *::-webkit-scrollbar-track { background: transparent; }

  /* ------------- layout ------------- */
  .app {
    display: grid;
    grid-template-columns: 252px minmax(0,1fr) 224px;
    max-width: 1440px; margin: 0 auto;
    min-height: 100vh;
  }
  @media (max-width: 1100px) {
    .app { grid-template-columns: 240px minmax(0,1fr); }
    .toc { display: none; }
  }
  @media (max-width: 760px) {
    .app { grid-template-columns: minmax(0,1fr); }
    .nav { display: none; }
  }

  /* ------------- left nav ------------- */
  .nav {
    padding: 28px 22px 56px;
    border-right: 1px solid var(--line);
    position: sticky; top: 0;
    height: 100vh; overflow-y: auto;
    background: linear-gradient(180deg, transparent 0%, oklch(0.985 0.005 250 / 0.5) 100%);
  }
  .brand { display: flex; align-items: center; gap: 11px; padding-bottom: 18px; border-bottom: 1px dashed var(--line-2); }
  .brand-mark {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--ink); color: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-weight: 600; font-style: italic; font-size: 19px;
  }
  .brand-name { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; line-height: 1.2; }
  .brand-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4); margin-top: 2px; }

  .lang-toggle {
    display: inline-flex; margin: 18px 0 14px;
    padding: 3px; border: 1px solid var(--line-2); border-radius: 7px;
    background: var(--paper-2);
  }
  .lang-toggle button {
    padding: 4px 14px; border-radius: 5px;
    font-size: 12px; font-weight: 500; color: var(--ink-3);
    font-family: var(--mono); letter-spacing: 0.04em;
  }
  .lang-toggle button.on { background: var(--ink); color: var(--paper); font-weight: 600; }

  .auth-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 11px; margin-bottom: 16px;
    border: 1px solid var(--line); border-radius: 7px;
    background: var(--surface, #fff);
    font-size: 12px; color: var(--ink-3);
    cursor: pointer;
  }
  .auth-chip .auth-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
  .auth-chip.on .auth-dot { background: var(--ok); }
  .auth-chip .auth-label { flex: 1; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
  .auth-chip .auth-action { font-family: var(--mono); font-size: 10px; color: var(--ink-4); letter-spacing: 0.08em; }

  .nav-group-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-4); margin: 18px 0 6px 2px; }
  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 10px; margin: 1px 0;
    border-radius: 6px;
    font-size: 13.5px; color: var(--ink-2);
    cursor: pointer; font-weight: 500;
    text-decoration: none;
  }
  .nav-item:hover { background: var(--paper-2); }
  .nav-item.active { background: var(--ink); color: var(--paper); font-weight: 600; }
  .nav-item .pill {
    font-family: var(--mono); font-size: 9px; font-weight: 600;
    letter-spacing: 0.08em; padding: 1px 5px; border-radius: 3px;
    background: var(--accent-soft); color: var(--accent-ink);
    margin-left: auto;
  }
  .nav-item.active .pill { background: oklch(1 0 0 / 0.18); color: var(--paper); }

  /* ------------- main ------------- */
  main { padding: 40px 56px 120px; min-width: 0; }
  @media (max-width: 900px) { main { padding: 32px 22px 80px; } }

  .breadcrumb { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; margin-bottom: 18px; display: flex; gap: 7px; align-items: center; }
  .breadcrumb .sep { color: var(--ink-4); }
  .breadcrumb .current { color: var(--ink-2); font-weight: 600; }

  .title {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(40px, 6.4vw, 72px);
    line-height: 1.02; letter-spacing: -0.025em;
    margin: 4px 0 22px;
  }
  .title em { font-style: italic; color: var(--accent); font-weight: 500; }

  .lead {
    font-family: var(--serif); font-weight: 500;
    font-size: 19px; line-height: 1.55; color: var(--ink-2);
    max-width: 680px; margin: 0 0 22px;
  }
  .lead strong { color: var(--ink); font-weight: 600; }

  .badge-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 36px; }
  .tag {
    font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
    padding: 3px 9px; border-radius: 4px;
    background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
  }
  .tag.method-post { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
  .tag.path { background: var(--paper); color: var(--ink); border-color: var(--line-2); font-weight: 600; }
  .tag.stable { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
  .tag.muted { color: var(--ink-4); border-color: transparent; background: transparent; }

  /* hero waveform — pipeline figure */
  .hero-figure { margin: 0 0 60px; padding: 22px 22px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--paper-2); }
  .hero-figure-cap { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--ink-4); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }

  .hero-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
  }
  @media (max-width: 860px) {
    .hero-stage { grid-template-columns: 1fr; gap: 16px; }
  }

  /* INPUT — two speaker tracks */
  .hero-input { display: flex; flex-direction: column; gap: 12px; position: relative; }
  .hero-track {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: center;
  }
  .hero-track-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-weight: 600; font-size: 14px;
    color: #fff;
  }
  /* Softer pastel palette: A indigo, B teal — clearly distinct, not heavy */
  .hero-track.a .hero-track-icon { background: linear-gradient(140deg, oklch(0.72 0.10 265), oklch(0.62 0.12 265)); }
  .hero-track.b .hero-track-icon { background: linear-gradient(140deg, oklch(0.72 0.10 195), oklch(0.62 0.12 195)); }
  .hero-bars {
    width: 100%; height: 40px; display: block;
    overflow: visible;
  }
  .hero-bars.a .hero-bar { fill: oklch(0.88 0.03 265); transition: fill .15s; }
  .hero-bars.a .hero-bar.lit { fill: oklch(0.62 0.12 265); }
  .hero-bars.b .hero-bar { fill: oklch(0.88 0.03 195); transition: fill .15s; }
  .hero-bars.b .hero-bar.lit { fill: oklch(0.62 0.12 195); }
  .hero-scanner {
    stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3;
    opacity: 0.55;
  }

  /* MIDDLE — API processing card with flow arrows */
  .hero-pipe {
    display: grid; grid-template-columns: auto auto auto;
    align-items: center; gap: 8px;
    min-height: 90px;
  }
  @media (max-width: 860px) {
    .hero-pipe { grid-template-columns: 1fr; gap: 6px; padding: 6px 0; }
  }
  .hero-arrow {
    position: relative;
    width: 48px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--ink-4) 50%, var(--ink-4) 100%);
  }
  .hero-arrow::after {
    content: ''; position: absolute;
    right: -1px; top: -3px;
    border-left: 5px solid var(--ink-4);
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
  }
  .hero-arrow .hero-arrow-pulse {
    position: absolute; top: -2px;
    width: 6px; height: 5px; border-radius: 1px;
    background: linear-gradient(90deg, oklch(0.62 0.18 265), oklch(0.62 0.16 195));
    box-shadow: 0 0 6px oklch(0.62 0.18 265 / 0.7);
    opacity: 0;
  }
  .hero-arrow.flowing .hero-arrow-pulse {
    animation: hero-arrow-flow 1.2s ease-in-out infinite;
  }
  @keyframes hero-arrow-flow {
    0%   { opacity: 0; left: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; left: calc(100% - 6px); }
  }
  @media (max-width: 860px) {
    .hero-arrow { width: 1px; height: 28px;
      background: linear-gradient(180deg, transparent, var(--ink-4) 50%, var(--ink-4) 100%); }
    .hero-arrow::after {
      right: -3px; top: auto; bottom: -1px; left: -3px;
      border-top: 5px solid var(--ink-4);
      border-left: 3.5px solid transparent;
      border-right: 3.5px solid transparent;
      border-bottom: none;
    }
  }
  .hero-api {
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 14px -8px oklch(0.62 0.18 265 / 0.25);
    min-width: 150px;
    position: relative;
    transition: border-color .25s, box-shadow .25s, transform .25s;
  }
  .hero-api.busy {
    border-color: oklch(0.62 0.18 265 / 0.55);
    box-shadow: 0 6px 20px -6px oklch(0.62 0.18 265 / 0.4);
  }
  .hero-api-method {
    display: inline-block;
    font-family: var(--mono); font-size: 9.5px; font-weight: 700;
    background: var(--ink); color: var(--paper);
    padding: 2px 7px; border-radius: 3px;
    letter-spacing: 0.08em;
  }
  .hero-api-path {
    margin-top: 6px;
    font-family: var(--mono); font-size: 14px; font-weight: 600;
    color: var(--ink); letter-spacing: -0.01em;
  }
  .hero-api-step {
    margin-top: 4px;
    font-family: var(--mono); font-size: 9.5px;
    color: var(--ink-4); letter-spacing: 0.04em;
    min-height: 12px;
  }
  .hero-api.busy .hero-api-step { color: oklch(0.50 0.16 285); }

  /* OUTPUT — verdict-first */
  .hero-output {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    min-height: 90px; justify-content: center;
  }
  .hero-verdict {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 10px 16px 10px 12px;
    border-radius: 999px;
    background: var(--paper-3);
    color: var(--ink-3);
    opacity: 0.55;
    transition: opacity .4s ease, background .35s, color .35s, transform .35s;
  }
  .hero-verdict.show { opacity: 1; }
  .hero-verdict.same { background: oklch(0.96 0.05 165); color: oklch(0.32 0.12 165); }
  .hero-verdict.diff { background: oklch(0.96 0.05 25);  color: oklch(0.42 0.16 25); }
  .hero-verdict-icon {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: currentColor;
    flex-shrink: 0;
  }
  .hero-verdict-icon svg { color: var(--paper); width: 14px; height: 14px; }
  .hero-verdict-text {
    font-family: var(--serif); font-weight: 600; font-size: 19px;
    letter-spacing: -0.01em; line-height: 1;
  }
  /* sections */
  .sec { margin: 76px 0 0; scroll-margin-top: 24px; }
  .sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
  .sec-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-4); }
  .sec-title { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; margin: 0; }
  .sec-lead { color: var(--ink-3); font-size: 15px; max-width: 660px; margin: 0 0 22px; }
  .sec-lead code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line); }

  /* endpoint cards */
  .ep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
  .ep-card { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color 0.18s; }
  .ep-card:hover { border-color: var(--line-2); }
  .ep-card .ep-h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
  .ep-card .ep-meth { font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: var(--ink); color: var(--paper); letter-spacing: 0.06em; }
  .ep-card .ep-path { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
  .ep-card .ep-name { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 4px 0; }
  .ep-card .ep-desc { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }
  .ep-card.primary { background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 70%); border-color: var(--accent); }

  /* limits grid */
  .limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
  .limit { padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
  .limit-label { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
  .limit-value { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
  .limit-value .limit-unit { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
  .limit-note { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }

  /* perf */
  .perf { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
  .perf-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
  .perf-card .pf-l { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
  .perf-card .pf-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
  .perf-card .pf-row:last-child { border-bottom: none; }
  .perf-card .pf-row span:first-child { color: var(--ink-3); }
  .perf-card .pf-row span:last-child { font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--ink); }

  /* try-it widget */
  .try {
    border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
    background: #fff;
  }
  .try-header {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-bottom: 1px solid var(--line);
    background: var(--paper-2);
    font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em;
  }
  .try-header .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vivid-1); box-shadow: 0 0 0 3px oklch(0.62 0.22 265 / 0.18); }
  .try-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  @media (max-width: 760px) { .try-body { grid-template-columns: 1fr; } }
  .try-col { padding: 22px; }
  .try-col.left { border-right: 1px solid var(--line); }
  @media (max-width: 760px) { .try-col.left { border-right: none; border-bottom: 1px solid var(--line); } }

  .field { margin-bottom: 18px; }
  .field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 6px;
  }
  .field-label .field-meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: 0.04em; text-transform: none; }

  .drop {
    border: 1.5px dashed var(--line-2); border-radius: var(--radius);
    padding: 16px; min-height: 78px;
    display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
    text-align: center; cursor: pointer;
    transition: all 0.18s;
    background: var(--paper-2);
  }
  .drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
  .drop.has-file { border-color: var(--accent); background: var(--accent-soft); border-style: solid; }
  .drop .drop-prim { font-size: 13px; color: var(--ink-2); font-weight: 500; }
  .drop .drop-sec { font-size: 11px; color: var(--ink-4); font-family: var(--mono); letter-spacing: 0.04em; }
  .drop .drop-name { font-family: var(--mono); font-size: 12px; color: var(--ink); font-weight: 600; word-break: break-all; }
  .drop .drop-meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; }

  .samples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .sample-chip {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
    padding: 4px 9px; border-radius: 4px;
    background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
    cursor: pointer; transition: background 0.15s;
  }
  .sample-chip:hover { background: var(--accent-soft); border-color: var(--accent); }

  .slider-row { display: flex; align-items: center; gap: 10px; }
  .slider-row input[type=range] { flex: 1; accent-color: var(--accent); }
  .slider-val { font-family: var(--mono); font-size: 12px; color: var(--ink); font-weight: 600; min-width: 38px; text-align: right; }

  .submit {
    width: 100%; padding: 11px;
    background: var(--ink); color: var(--paper);
    border-radius: var(--radius);
    font-weight: 600; font-size: 13.5px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.15s;
  }
  .submit:hover { background: var(--ink-2); }
  .submit:disabled { background: var(--ink-4); cursor: not-allowed; }
  .submit .kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 3px; background: oklch(1 0 0 / 0.16); }

  .out-empty { text-align: center; color: var(--ink-3); padding: 28px 12px; }
  .out-empty svg { color: var(--ink-4); margin-bottom: 10px; }
  .out-empty .out-hint { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); margin-top: 8px; letter-spacing: 0.04em; }

  .verdict {
    padding: 16px 18px; border-radius: var(--radius-lg);
    background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 14px;
  }
  .verdict.same { background: var(--ok-soft); border-color: oklch(0.55 0.14 155 / 0.3); }
  .verdict.diff { background: var(--warn-soft); border-color: oklch(0.55 0.16 25 / 0.3); }
  .verdict-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
  .verdict-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-weight: 700; }
  .verdict.same .verdict-icon { background: var(--ok); }
  .verdict.diff .verdict-icon { background: var(--warn); }
  .verdict-text { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); }
  .verdict-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }

  .score-bar-wrap { padding: 4px 2px 0; }
  .score-bar { position: relative; height: 22px; background: var(--paper-2); border-radius: 4px; border: 1px solid var(--line); overflow: hidden; }
  .score-bar .threshold-mark {
    position: absolute; top: -4px; bottom: -4px; width: 2px;
    background: var(--ink-2);
  }
  .score-bar .threshold-mark::after {
    content: '阈值 ' attr(data-thr); position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); white-space: nowrap; letter-spacing: 0.04em;
  }
  .score-bar .score-fill {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 0;
    background: var(--vivid-grad);
    transition: width 0.5s ease-out;
  }
  .score-bar .score-fill.neg {
    background: linear-gradient(90deg, oklch(0.6 0.18 25) 0%, oklch(0.7 0.13 25) 100%);
  }
  .score-axis { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 10px; color: var(--ink-4); letter-spacing: 0.04em; }

  .raw-json {
    margin-top: 12px; padding: 12px;
    background: var(--ink); color: oklch(0.92 0.005 245);
    border-radius: var(--radius);
    font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
    overflow-x: auto;
  }
  .raw-json .k { color: oklch(0.7 0.18 30); }
  .raw-json .s { color: oklch(0.78 0.18 165); }
  .raw-json .n { color: oklch(0.75 0.20 250); }
  .raw-json .b { color: oklch(0.68 0.22 330); }

  /* code tabs */
  .code-tabs {
    display: flex; gap: 2px; padding: 4px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px 8px 0 0; border-bottom: none;
    align-items: center;
  }
  .code-tabs button {
    padding: 5px 12px; border-radius: 5px;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.04em;
  }
  .code-tabs button.on { background: var(--ink); color: var(--paper); font-weight: 600; }
  .code-tabs .copy { margin-left: auto; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11px; }
  .code-tabs .copy:hover { color: var(--ink); }
  .code {
    margin: 0; padding: 16px 18px;
    background: var(--ink); color: oklch(0.92 0.005 245);
    border-radius: 0 0 8px 8px;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
    overflow-x: auto; white-space: pre;
  }
  .code .c1 { color: var(--ink-4); }
  .code .s2 { color: oklch(0.78 0.18 165); }
  .code .kw { color: oklch(0.7 0.18 30); }
  .code .nb { color: oklch(0.75 0.20 250); }

  /* errors table */
  /* ===== Error code cards — one card per HTTP status (matches reference) ===== */
  .errors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  @media (max-width: 760px) { .errors { grid-template-columns: 1fr; } }
  .err {
    display: grid; grid-template-columns: 64px 1fr; gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--paper);
    transition: border-color .15s;
  }
  .err:hover { border-color: var(--line-2); }
  .err .http {
    font-family: var(--serif); font-size: 30px; font-weight: 500;
    line-height: 1; letter-spacing: -0.02em;
    align-self: flex-start;
  }
  .err.c4 .http { color: var(--warn); }
  .err.c5 .http { color: oklch(0.55 0.22 25); }
  .err .name {
    font-family: var(--mono); font-weight: 700; font-size: 13px;
    color: var(--ink); letter-spacing: 0.02em;
    margin-bottom: 3px;
  }
  .err .desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
  .err .desc code {
    font-family: var(--mono); font-size: 11.5px; padding: 1px 5px;
    border-radius: 3px; background: var(--paper-2); color: var(--ink-2);
    border: 1px solid var(--line);
  }

  /* ===== AI Prompt Card (§06 on both pages) ===== */
  .ai-prompt-card {
    position: relative;
    margin-top: 18px;
    padding: 26px 28px 22px;
    border-radius: 14px;
    color: oklch(0.94 0.02 260);
    background:
      radial-gradient(500px 300px at 100% 0%, oklch(0.70 0.24 330 / 0.18), transparent 60%),
      radial-gradient(520px 340px at 0% 100%, oklch(0.62 0.22 265 / 0.20), transparent 60%),
      linear-gradient(155deg, oklch(0.22 0.05 265), oklch(0.15 0.03 270));
    box-shadow:
      0 1px 0 oklch(1 0 0 / 0.08) inset,
      0 24px 60px -20px oklch(0.15 0.05 265 / 0.55);
    overflow: hidden;
  }
  .ai-prompt-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 40%, oklch(0.70 0.24 330 / 0.08) 55%, transparent 70%);
    pointer-events: none;
  }
  .aipc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-bottom: 14px;
    position: relative; z-index: 1;
  }
  .aipc-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 10px; border-radius: 5px;
    background: oklch(1 0 0 / 0.06);
    border: 1px solid oklch(1 0 0 / 0.12);
    color: oklch(0.85 0.14 170);
    font-family: var(--mono); font-size: 10.5px; font-weight: 600;
    letter-spacing: 0.18em;
  }
  .aipc-meta {
    font-family: var(--mono); font-size: 11px;
    color: oklch(0.72 0.02 260);
    letter-spacing: 0.02em;
  }
  .aipc-meta .aipc-tokens { color: oklch(0.90 0.02 260); font-weight: 600; }
  .aipc-title {
    position: relative; z-index: 1;
    margin: 4px 0 8px;
    font-family: var(--serif); font-weight: 500;
    font-size: 26px; line-height: 1.2; letter-spacing: -0.015em;
    color: oklch(0.98 0.01 260);
  }
  .aipc-title em {
    font-style: italic;
    background: linear-gradient(90deg, oklch(0.88 0.16 85), oklch(0.88 0.18 330));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .aipc-sub {
    position: relative; z-index: 1;
    margin: 0 0 16px; font-size: 13.5px; line-height: 1.55;
    color: oklch(0.78 0.02 260); max-width: 640px;
  }
  .aipc-sub em { font-style: italic; color: oklch(0.92 0.02 260); }
  .aipc-code {
    position: relative; z-index: 1;
    max-height: 220px; overflow: auto;
    margin: 0 0 16px; padding: 14px 16px;
    border-radius: 8px;
    background: oklch(0.10 0.02 265 / 0.6);
    border: 1px solid oklch(1 0 0 / 0.06);
    font-family: var(--mono); font-size: 12px; line-height: 1.7;
    color: oklch(0.80 0.04 210);
    white-space: pre-wrap; word-break: break-word;
    mask-image: linear-gradient(180deg, #000 0, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 85%, transparent);
  }
  .aipc-code::-webkit-scrollbar { width: 6px; }
  .aipc-code::-webkit-scrollbar-thumb { background: oklch(1 0 0 / 0.15); border-radius: 3px; }
  .aipc-actions {
    position: relative; z-index: 1;
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  .aipc-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: 8px;
    background: oklch(1 0 0 / 0.04);
    border: 1px solid oklch(1 0 0 / 0.12);
    color: oklch(0.90 0.02 260);
    font-family: var(--sans); font-size: 12.5px; font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
  }
  .aipc-btn svg { opacity: 0.8; }
  .aipc-btn:hover { background: oklch(1 0 0 / 0.09); border-color: oklch(1 0 0 / 0.22); }
  .aipc-btn:active { transform: scale(0.98); }
  .aipc-btn.primary {
    background: linear-gradient(135deg, oklch(0.96 0.02 260), oklch(0.90 0.04 260));
    border-color: oklch(1 0 0 / 0.2);
    color: oklch(0.18 0.02 265); font-weight: 600;
  }
  .aipc-btn.primary:hover { background: linear-gradient(135deg, oklch(1 0 0), oklch(0.94 0.04 260)); }
  .aipc-btn.primary svg { opacity: 1; }
  .aipc-btn.copied {
    background: oklch(0.75 0.18 150);
    border-color: oklch(0.75 0.18 150);
    color: oklch(0.15 0.05 150);
  }

  /* right TOC */
  .toc {
    padding: 40px 24px 80px; position: sticky; top: 0; height: 100vh;
    overflow-y: auto; border-left: 1px solid var(--line);
    background: linear-gradient(180deg, transparent, oklch(0.985 0.005 250 / 0.4));
  }
  .toc-title {
    font-family: var(--mono); font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4);
    margin-bottom: 16px;
  }
  /* Inline `NN · label` format — matches reference template. */
  .toc-link {
    display: block;
    padding: 9px 0;
    text-decoration: none;
    color: var(--ink-3);
    font-family: var(--sans); font-size: 14px; line-height: 1.3;
    transition: color .15s;
  }
  .toc-link:hover { color: var(--ink); }
  .toc-link.active { color: var(--ink); font-weight: 600; }
  .toc-link.active .toc-num,
  .toc-link.active .toc-sep { color: var(--ink); }

  .toc-num {
    font-family: var(--mono); font-weight: 600;
    color: inherit;
    transition: color .15s;
  }
  .toc-sep {
    display: inline-block;
    margin: 0 7px;
    color: var(--ink-4);
    transition: color .15s;
  }
  .toc-label { color: inherit; }
  .toc-label code {
    font-family: var(--mono); font-size: 13px;
    background: none; border: none; padding: 0; color: inherit;
  }

  /* ---- Auth modal — premium two-pane card ---- */
  @keyframes authBackdropIn { from{opacity:0} to{opacity:1} }
  @keyframes authCardIn { from{opacity:0;transform:translateY(12px) scale(.985)} to{opacity:1;transform:none} }
  @keyframes authWaveShift { 0%{transform:translateX(0)} 100%{transform:translateX(-33.333%)} }
  @keyframes authOrbit { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

  .auth-modal-backdrop {
    position: fixed; inset: 0;
    background:
      radial-gradient(900px 600px at 30% 20%, oklch(0.62 0.22 265 / 0.25), transparent 60%),
      radial-gradient(900px 600px at 80% 80%, oklch(0.70 0.24 330 / 0.22), transparent 60%),
      oklch(0.12 0.02 260 / 0.55);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
  }
  .auth-modal-backdrop.open {
    display: flex; animation: authBackdropIn .22s ease-out;
  }
  .auth-modal {
    width: 780px; max-width: calc(100vw - 40px);
    height: 460px; max-height: calc(100vh - 40px);
    background: var(--paper);
    border-radius: 18px;
    display: grid; grid-template-columns: 320px 1fr;
    overflow: hidden;
    box-shadow:
      0 1px 0 oklch(1 0 0 / 0.9) inset,
      0 40px 120px oklch(0.1 0 0 / 0.35),
      0 10px 40px oklch(0.1 0 0 / 0.18);
    animation: authCardIn .34s cubic-bezier(.2,.9,.25,1);
    position: relative;
  }
  @media (max-width: 720px) {
    .auth-modal { grid-template-columns: 1fr; height: auto; }
    .auth-left { display: none !important; }
  }

  /* Left brand pane */
  .auth-left {
    position: relative; overflow: hidden;
    background:
      radial-gradient(520px 380px at 20% 120%, oklch(0.70 0.24 330 / 0.55), transparent 60%),
      radial-gradient(420px 320px at 120% -10%, oklch(0.78 0.20 85 / 0.45), transparent 60%),
      linear-gradient(155deg, oklch(0.28 0.10 265), oklch(0.18 0.06 270));
    color: oklch(0.96 0.02 260);
    padding: 28px 26px;
    display: flex; flex-direction: column;
    justify-content: space-between;
  }
  .auth-left::before {
    content: ''; position: absolute; inset: -40%;
    background: conic-gradient(from 0deg,
      oklch(0.62 0.22 265 / 0.0),
      oklch(0.70 0.24 330 / 0.35),
      oklch(0.78 0.20 85  / 0.0),
      oklch(0.75 0.20 170 / 0.30),
      oklch(0.62 0.22 265 / 0.0));
    filter: blur(40px);
    animation: authOrbit 22s linear infinite;
    pointer-events: none;
  }
  .auth-left-top { position: relative; z-index: 1; }
  .auth-left-top .mark {
    width: 36px; height: 36px; border-radius: 9px;
    background: oklch(1 0 0 / 0.12);
    border: 1px solid oklch(1 0 0 / 0.18);
    backdrop-filter: blur(6px);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-weight: 600; font-style: italic;
    font-size: 20px; color: #fff;
  }
  .auth-left-top .brand-line {
    font-family: var(--mono); font-size: 10px; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase;
    margin-top: 14px; opacity: 0.7;
  }
  .auth-left-headline {
    position: relative; z-index: 1;
    font-family: var(--serif); font-weight: 500;
    font-size: 26px; line-height: 1.18; letter-spacing: -0.02em;
    margin-top: 24px;
  }
  .auth-left-headline em {
    font-style: italic;
    background: linear-gradient(90deg, oklch(0.88 0.16 85), oklch(0.88 0.18 330));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .auth-left-sub {
    position: relative; z-index: 1;
    font-size: 12.5px; line-height: 1.55; opacity: 0.72;
    margin-top: 10px; max-width: 260px;
  }
  /* Shimmering waveform strip */
  .auth-wave {
    position: relative; z-index: 1;
    height: 60px; overflow: hidden;
    margin-top: 18px;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
  .auth-wave-inner {
    display: flex; align-items: center; gap: 3px;
    height: 100%; width: 300%;
    animation: authWaveShift 9s linear infinite;
  }
  .auth-wave-inner span {
    width: 3px; border-radius: 2px; flex: none;
    background: linear-gradient(180deg, oklch(0.90 0.16 85), oklch(0.70 0.24 330));
    box-shadow: 0 0 8px oklch(0.70 0.24 330 / 0.45);
  }
  .auth-left-foot {
    position: relative; z-index: 1;
    font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.14em; opacity: 0.55;
    display: flex; align-items: center; gap: 6px;
  }
  .auth-left-foot::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: oklch(0.85 0.18 150); box-shadow: 0 0 10px oklch(0.85 0.18 150);
  }

  /* Right form pane */
  .auth-right {
    padding: 36px 38px 28px; position: relative;
    display: flex; flex-direction: column;
  }
  .auth-close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-3); border: 1px solid transparent;
    background: transparent; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
  }
  .auth-close:hover { background: var(--paper-2); border-color: var(--line); color: var(--ink); }

  .auth-right h3 {
    margin: 4px 0 2px; font-family: var(--serif);
    font-weight: 600; font-size: 26px; letter-spacing: -0.015em; color: var(--ink);
  }
  .auth-right h3 em {
    font-style: italic;
    background: linear-gradient(90deg, oklch(0.62 0.22 265), oklch(0.70 0.24 330));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .auth-right .sub {
    font-size: 13px; color: var(--ink-3); margin-bottom: 22px;
    line-height: 1.55;
  }
  /* Inline path chip used inside the subtitle. */
  .auth-right .sub code {
    display: inline-block;
    padding: 2px 8px; margin: 0 1px;
    border-radius: 5px;
    background: oklch(0.96 0.01 250);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-family: var(--mono); font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.02em;
    vertical-align: 1px;
  }
  .auth-field {
    position: relative; margin-bottom: 14px;
  }
  .auth-field label {
    display: block; font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.16em; color: var(--ink-3); margin-bottom: 6px;
    text-transform: uppercase;
  }
  .auth-input-wrap { position: relative; }
  .auth-input-wrap .icn {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--ink-4); pointer-events: none;
    transition: color .15s;
  }
  .auth-field input {
    width: 100%; padding: 12px 14px 12px 38px;
    border: 1.5px solid var(--line-2); border-radius: 9px;
    font-family: var(--sans); font-size: 14px;
    background: var(--paper-2); color: var(--ink);
    transition: border-color .18s, background .18s, box-shadow .18s;
  }
  .auth-field input:focus {
    outline: none; border-color: oklch(0.62 0.22 265); background: var(--paper);
    box-shadow: 0 0 0 4px oklch(0.62 0.22 265 / 0.12);
  }
  .auth-input-wrap:focus-within .icn { color: oklch(0.62 0.22 265); }

  .auth-err {
    margin: -4px 0 10px; padding: 9px 12px;
    background: oklch(0.96 0.05 30); color: oklch(0.48 0.20 30);
    border-left: 3px solid oklch(0.55 0.22 30);
    border-radius: 4px; font-size: 12.5px; display: none;
  }
  .auth-err.show { display: block; }

  .auth-submit {
    position: relative;
    width: 100%; padding: 12px;
    color: #fff; font-weight: 600; font-size: 14px;
    border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(90deg,
      oklch(0.62 0.22 265) 0%,
      oklch(0.70 0.24 330) 50%,
      oklch(0.78 0.20 85)  100%);
    background-size: 200% 100%; background-position: 0% 50%;
    transition: background-position .4s ease, transform .1s, box-shadow .2s;
    box-shadow: 0 10px 24px -10px oklch(0.62 0.22 265 / 0.55);
  }
  .auth-submit:hover { background-position: 100% 50%; }
  .auth-submit:active { transform: scale(0.985); }
  .auth-submit:disabled { opacity: 0.7; cursor: wait; }
  .auth-submit .spin {
    display: none; width: 14px; height: 14px;
    border: 2px solid oklch(1 0 0 / 0.35); border-top-color: #fff;
    border-radius: 50%;
    animation: authOrbit .8s linear infinite;
    vertical-align: -3px; margin-right: 8px;
  }
  .auth-submit.loading .spin { display: inline-block; }

  [hidden] { display: none !important; }

  /* hidden file input */
  input[type=file] { position: absolute; left: -9999px; }

  /* ===== Shared animations ===== */
  @keyframes fade-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  @keyframes pulse   { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.78); } }
  @keyframes spin    { to { transform: rotate(360deg); } }

  /* ===== When .drop holds a player or action stack, neutralize dashed dropzone style ===== */
  .drop.has-player, .drop.has-actions {
    border: none; padding: 0; min-height: 0;
    background: transparent; cursor: default; display: block;
  }
  .drop.has-player:hover, .drop.has-actions:hover { background: transparent; border: none; }

  /* ===== Mini audio player (used inside .drop on both pages) ===== */
  .player {
    display: grid; grid-template-columns: 44px 1fr 22px;
    gap: 14px; align-items: center;
    padding: 12px 14px;
    border: 1px solid oklch(0.62 0.18 280 / 0.45);
    border-radius: 10px;
    background: linear-gradient(135deg, oklch(0.985 0.01 280), oklch(0.97 0.02 280));
    box-shadow: 0 1px 2px oklch(0.1 0 0 / 0.04);
    animation: fade-up .25s ease;
  }
  .player-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, oklch(0.62 0.18 280), oklch(0.50 0.16 285));
    color: #fff; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px -4px oklch(0.50 0.16 285 / 0.45);
    transition: transform .12s, box-shadow .18s;
  }
  .player-btn:hover  { transform: scale(1.05); box-shadow: 0 8px 18px -4px oklch(0.50 0.16 285 / 0.55); }
  .player-btn:active { transform: scale(0.96); }
  .player-btn svg    { width: 14px; height: 14px; transition: transform .15s; }
  .player-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .player-row  { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .player-name {
    font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
  }
  .player-tag {
    font-family: var(--mono); font-size: 9px; font-weight: 600;
    padding: 1px 6px; border-radius: 3px;
    background: oklch(1 0 0 / 0.6); color: oklch(0.50 0.16 285);
    letter-spacing: 0.06em; text-transform: uppercase;
    flex-shrink: 0;
  }
  .player-bar-wrap {
    display: grid; grid-template-columns: 1fr auto;
    gap: 10px; align-items: center;
  }
  .player-bar {
    height: 3px; background: oklch(0.92 0.02 280); border-radius: 2px;
    position: relative; overflow: hidden; cursor: pointer;
  }
  .player-bar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, oklch(0.62 0.18 280), oklch(0.55 0.16 195));
    border-radius: 2px; width: 0;
  }
  .player-time {
    font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
    font-variant-numeric: tabular-nums; min-width: 70px; text-align: right;
  }
  .player-x {
    width: 22px; height: 22px; border-radius: 50%;
    background: oklch(1 0 0 / 0.7); color: var(--ink-4);
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
  }
  .player-x:hover { background: var(--warn-soft); color: var(--warn); }

  /* ===== Section sub-heading (used in §04 across both pages) ===== */
  .sub-h { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 22px 0 10px; color: var(--ink); }
  .ep-panel { margin-top: 6px; }

  /* ===== Field table (request fields docs) ===== */
  .field-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13.5px; }
  .field-table th, .field-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
  .field-table th { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); background: var(--paper-2); }
  .field-table td.fname { font-family: var(--mono); font-size: 12px; color: var(--ink); font-weight: 600; white-space: nowrap; }
  .field-table td.ftype { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
  .field-table td.freq { font-family: var(--mono); font-size: 10px; padding-top: 12px; }
  .field-table .req { color: oklch(0.55 0.16 25); }
  .field-table .opt { color: var(--ink-4); }
  .field-table .cond { color: oklch(0.45 0.10 70); }
  .field-table td.fdesc { color: var(--ink-2); line-height: 1.55; }
  .field-table td.fdesc code { font-family: var(--mono); font-size: 11.5px; padding: 1px 5px; border-radius: 3px; background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); }

  /* ===== Response / schema JSON cards ===== */
  .json-card { margin: 6px 0 22px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
  .json-card-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
  .json-card-h .right { color: var(--ink-4); font-size: 10px; letter-spacing: 0.06em; text-transform: none; }
  .json-card pre { margin: 0; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--ink-2); background: var(--paper); overflow-x: auto; }
  .json-card pre .k { color: oklch(0.45 0.07 250); }
  .json-card pre .s { color: oklch(0.45 0.10 165); }
  .json-card pre .n { color: oklch(0.50 0.16 25); }
  .json-card pre .c { color: var(--ink-4); font-style: italic; }

  /* ===== Action stack: upload + record cards (replaces dashed dropzone) ===== */
  .action-stack { display: flex; flex-direction: column; gap: 8px; }

  .action-card {
    display: grid; grid-template-columns: 44px 1fr;
    gap: 14px; align-items: center;
    padding: 12px 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
    position: relative;
    text-align: left;
    font-family: var(--sans);
  }
  /* When wrapping a hidden file input, .action-card is a <label> — make sure
     the label still acts like a button. */
  .action-card input[type=file] { position: absolute; left: -9999px; }

  .action-card:hover:not(:disabled) {
    border-color: oklch(0.62 0.18 280 / 0.5);
    background: oklch(0.985 0.01 280);
    box-shadow: 0 4px 14px -8px oklch(0.50 0.16 285 / 0.25);
  }
  .action-card:active:not(:disabled) { transform: scale(0.99); }
  .action-card:disabled { opacity: 0.45; cursor: not-allowed; }
  .action-card.drag {
    border-color: oklch(0.62 0.18 280);
    background: oklch(0.96 0.04 280);
  }

  .action-card-icon {
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: oklch(0.96 0.04 280);
    color: oklch(0.50 0.16 285);
    border: 1.5px solid oklch(0.62 0.18 280 / 0.35);
    transition: background .18s, color .18s, border-color .18s;
  }
  .action-card-icon svg { width: 22px; height: 22px; }
  .action-card:hover .action-card-icon {
    background: oklch(0.92 0.06 280);
    border-color: oklch(0.62 0.18 280 / 0.6);
  }

  .action-card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .action-card-title {
    font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.2;
  }
  .action-card-sub {
    font-family: var(--mono); font-size: 11px; color: var(--ink-3);
    letter-spacing: 0.02em;
  }

  /* Recording state — record card turns red */
  .action-card.recording {
    border-color: oklch(0.55 0.22 25 / 0.65);
    background: oklch(0.985 0.02 25);
    box-shadow: 0 4px 18px -8px oklch(0.55 0.22 25 / 0.35);
  }
  .action-card.recording .action-card-icon {
    background: oklch(0.55 0.22 25);
    color: #fff;
    border-color: oklch(0.55 0.22 25);
    box-shadow: 0 0 0 6px oklch(0.55 0.22 25 / 0.16);
    animation: pulse 1.2s ease-in-out infinite;
  }
  .action-card.recording .action-card-title { color: oklch(0.42 0.20 25); }
  .action-card.recording .action-card-sub { color: oklch(0.50 0.16 25); }
  .action-card.recording:hover {
    background: oklch(0.97 0.04 25);
    border-color: oklch(0.55 0.22 25);
  }
  .action-card.recording:hover .action-card-icon {
    background: oklch(0.50 0.20 25);
    border-color: oklch(0.50 0.20 25);
  }
