/* ============================================================================
   VOICES  (#voicesRoot, body.voices-mode). Loaded with the engine (core/app.js
   ENGINES row), so nothing here reaches another chart.
   One memorable thing: the strip, the whole book as a ribbon of turns, each
   as wide as its verses, broken into rows at the book's own cycles, so the
   back-and-forth and the friends' shortening speeches show at a glance. On a
   phone the ribbon turns upright into a colored spine down the page, a turn
   per row with a bar for its length.
   Speaker hues are the engine's own, a light and a dark value each, checked
   for color-blind separation on every pair that touches in the strip. Color is
   never the only cue: each hue has a pattern and a mark, and every turn is
   labeled. The strip's draw-in and the sheet's slide are the only motion;
   Lite mode and reduced motion make both instant.
   ============================================================================ */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2");
             font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2");
             font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
             font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
             font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2");
             font-weight: 600; font-display: swap; }

body.voices-mode #voicesRoot {
  /* Dark values (dark mode, every palette): light fills, dark ink on them. */
  --vc-h1: #6f9fe6;   /* blue */
  --vc-h2: #ec8a5a;   /* red-orange */
  --vc-h3: #4fbf98;   /* teal */
  --vc-h4: #e07ab2;   /* magenta */
  --vc-h5: #a497ef;   /* violet */
  --vc-h6: #d9b04a;   /* gold */
  --vc-h7: #8fcf62;   /* green */
  --vc-hn: #a39d92;   /* the narrator: neutral */
  --vc-on: #17120b;   /* ink on a fill */
  --vc-pat: rgba(255, 255, 255, .34);
  /* The two shares sum to 100%, or color-mix leaves the sheet see-through. */
  --vc-paper: color-mix(in srgb, var(--bg-1) 94%, #fff 6%);
  --vc-sel: var(--ink);
  --vc-accent: var(--accent-soft);
  --vc-display: "Fraunces", var(--font-display);
  --vc-read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --vc-ui: "IBM Plex Sans", var(--font);
  display: block; position: relative; min-height: 100vh; min-height: 100dvh;
  background: var(--bg-1); color: var(--text);
  font-family: var(--vc-read); font-size: 17px; line-height: 1.6;
  padding: 0 28px 80px; overflow-x: clip;
}
:root[data-mode="light"] body.voices-mode #voicesRoot {
  /* Light values: deep fills, white ink on them. */
  --vc-h1: #2a63b8;
  --vc-h2: #c2410c;
  --vc-h3: #0f7d62;
  --vc-h4: #b0307a;
  --vc-h5: #6a4fc9;
  --vc-h6: #946b00;
  --vc-h7: #3f7a1a;
  --vc-hn: #6b665e;
  --vc-on: #ffffff;
  --vc-pat: rgba(0, 0, 0, .2);
  --vc-paper: color-mix(in srgb, var(--bg-1) 45%, #fff 55%);
}
/* Parchment's dim text is deepened, as in Tally and Berean, to read on the paper. */
:root[data-mode="light"][data-theme="parchment"] body.voices-mode #voicesRoot { --text-dim: #64564a; }

/* Each hue's pattern, so a turn reads without color. */
#voicesRoot [data-hue] { --hue: var(--vc-hn); --pat: none; }
#voicesRoot [data-hue="n"] { --hue: var(--vc-hn); --pat: repeating-linear-gradient(90deg, var(--vc-pat) 0 1px, transparent 1px 5px); }
#voicesRoot [data-hue="1"] { --hue: var(--vc-h1); --pat: none; }
#voicesRoot [data-hue="2"] { --hue: var(--vc-h2); --pat: repeating-linear-gradient(45deg, var(--vc-pat) 0 2px, transparent 2px 7px); }
#voicesRoot [data-hue="3"] { --hue: var(--vc-h3); --pat: repeating-linear-gradient(0deg, var(--vc-pat) 0 2px, transparent 2px 7px); }
#voicesRoot [data-hue="4"] { --hue: var(--vc-h4); --pat: radial-gradient(circle, var(--vc-pat) 1.6px, transparent 1.9px) 0 0 / 7px 7px; }
#voicesRoot [data-hue="5"] { --hue: var(--vc-h5); --pat: repeating-linear-gradient(-45deg, var(--vc-pat) 0 2px, transparent 2px 7px); }
#voicesRoot [data-hue="6"] { --hue: var(--vc-h6); --pat: repeating-radial-gradient(circle at 50% 130%, transparent 0 5px, var(--vc-pat) 5px 7px); }
#voicesRoot [data-hue="7"] { --hue: var(--vc-h7); --pat: linear-gradient(var(--vc-pat) 1.5px, transparent 1.5px) 0 0 / 7px 7px, linear-gradient(90deg, var(--vc-pat) 1.5px, transparent 1.5px) 0 0 / 7px 7px; }

#voicesMain { max-width: 1240px; margin: 0 auto; padding-top: 76px; }
#voicesBack { position: absolute; }
#voicesRoot :focus-visible { outline: 2px solid var(--vc-accent); outline-offset: 3px; }
#voicesRoot a:not(.lib-link) { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
#voicesRoot button { font: inherit; color: inherit; }

/* ---- Title, opening, frame ---------------------------------------------- */
.vc-eyebrow { margin: 0; font: 600 12px/1.2 var(--vc-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--vc-accent); }
.vc-title h1 { margin: 8px 0 10px; font: 600 clamp(32px, 5vw, 54px)/1.06 var(--vc-display); color: var(--ink); text-wrap: balance; }
.vc-sub { margin: 0; max-width: 40em; font-size: 20px; line-height: 1.45; color: var(--text-dim); text-wrap: pretty; }
.vc-intro { max-width: 46em; margin: 22px 0 0; }
.vc-intro p { margin: 0 0 12px; }

.vc-top--framed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 40px; align-items: start; }
.vc-frame {
  max-width: 52em; margin: 0; padding: 20px 24px 8px; border-radius: 16px;
  background: var(--vc-paper); border: 1px solid var(--line); border-left: 4px solid var(--vc-h6);
}
.vc-frame h2 { margin: 0 0 10px; font: 600 13px/1.2 var(--vc-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--vc-accent); }
.vc-frame blockquote { margin: 0 0 14px; }
.vc-frame blockquote p { margin: 0; font: italic 500 18px/1.45 var(--vc-read); color: var(--ink); text-wrap: pretty; }
.vc-frame cite, .vc-quote cite, .vc-narr-line cite {
  display: block; margin-top: 4px; font: normal 600 13px/1.3 var(--vc-ui); letter-spacing: .03em; color: var(--vc-accent);
}
.vc-frame-more p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.vc-frame-more summary { display: none; }

/* ---- Controls ------------------------------------------------------------ */
.vc-chart { margin-top: 40px; }
.vc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-bottom: 18px; }
.vc-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--soft-fill); border: 1px solid var(--line); }
.vc-tab {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 600 14px/1 var(--vc-ui) !important; color: var(--text-dim) !important;
}
.vc-tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent) !important; }
.vc-key-wrap { min-width: 0; }
.vc-key { display: flex; flex-wrap: wrap; gap: 6px; }
.vc-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; font: 600 13px/1 var(--vc-ui) !important; color: var(--text) !important;
}
.vc-chip[aria-pressed="true"] { border-color: var(--hue); box-shadow: inset 0 0 0 1.5px var(--hue); background: var(--soft-fill); }
.vc-sw {
  display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px;
  background-color: var(--hue); background-image: var(--pat);
}

.vc-sw--mark {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; vertical-align: middle;
  font: 600 12px/1 var(--vc-ui); color: var(--vc-on); letter-spacing: 0;
}
.vc-chip .vc-sw--mark { width: 24px; height: 24px; }

/* ---- Stage: the views and the card -------------------------------------- */
.vc-stage { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.vc-views { min-width: 0; }
.vc-scale, .vc-legend-line { margin: 14px 0 0; font: 400 14px/1.5 var(--vc-ui); color: var(--text-dim); }
.vc-legend-line { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.vc-phone-only { display: none; }
@media (max-width: 640px) { .vc-phone-only { display: inline; } .vc-wide-only { display: none; } }
.vc-lg-item { display: inline-flex; align-items: center; gap: 8px; }
.vc-lg-dots { width: 26px; height: 3px; background: radial-gradient(circle, var(--text) 1.3px, transparent 1.6px) 0 0 / 6px 3px repeat-x; }
.vc-lg-gap { width: 22px; height: 16px; border: 2px dashed var(--text-dim); border-radius: 4px; }

/* ---- The strip ----------------------------------------------------------- */
.vc-row { margin: 0 0 18px; }
.vc-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 2px; }
.vc-row-head h3 { margin: 0; font: 600 19px/1.2 var(--vc-display); color: var(--ink); }
.vc-row-meta { font: 400 13px/1.3 var(--vc-ui); color: var(--text-dim); }
.vc-row-lead { margin: 0 0 6px; font: 400 14px/1.45 var(--vc-ui); color: var(--text-dim); max-width: 60em; }
.vc-track { display: flex; gap: 2px; width: calc(var(--gw) * 100%); min-width: 34px; margin-top: 6px; }
.vc-turn {
  position: relative; flex: var(--v) 1 0px; min-width: 5px; height: 60px; padding: 0; border: 0; border-radius: 0;
  background: none; cursor: pointer; container-type: inline-size; text-align: center;
}
.vc-turn:first-child, .vc-turn:first-child .vc-fill { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.vc-turn:last-child, .vc-turn:last-child .vc-fill { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.vc-fill {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-color: var(--hue); background-image: var(--pat); color: var(--vc-on);
  transition: transform .18s ease, filter .18s ease;
}
.vc-lab { font: 600 13px/1.1 var(--vc-ui); white-space: nowrap; padding: 3px 5px; border-radius: 5px;
  background: color-mix(in srgb, var(--hue) 82%, transparent); }
.vc-lab-name, .vc-lab-mark { display: none; }
@container (min-width: 22px) { .vc-lab-mark { display: inline; } }
@container (min-width: 70px) { .vc-lab-mark { display: none; } .vc-lab-name { display: inline; } }
.vc-txt, .vc-n { display: none; }
.vc-turn:hover .vc-fill { filter: brightness(1.08) saturate(1.05); }
.vc-turn[aria-current="true"] { z-index: 2; }
.vc-turn[aria-current="true"] .vc-fill { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--vc-sel); transform: translateY(-3px); }
.vc-turn.vc-dim .vc-fill, .vc-lt.vc-dim, .vc-count.vc-dim { opacity: .22; }
/* A turn whose speaker is discussed: a dotted rule over it. */
.vc-turn.vc-disputed::after {
  content: ""; position: absolute; left: 1px; right: 1px; top: -7px; height: 3px;
  background: radial-gradient(circle, var(--text) 1.3px, transparent 1.6px) 0 0 / 6px 3px repeat-x;
}
/* A missing speech: a dashed slot in the speaker's hue. */
.vc-turn.vc-gap { flex: 0 0 36px; }
.vc-turn.vc-gap .vc-fill { background: transparent; border: 2px dashed var(--hue); color: var(--text); border-radius: 6px; }
.vc-turn.vc-gap .vc-lab { background: none; }

.vc-strip.vc-draw .vc-fill { animation: vc-grow .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 24ms); transform-origin: 0 50%; }
@keyframes vc-grow { from { transform: scaleX(0); opacity: .3; } }
body.low-power .vc-strip.vc-draw .vc-fill { animation: none; }
@media (prefers-reduced-motion: reduce) { .vc-strip.vc-draw .vc-fill { animation: none; } .vc-fill { transition: none; } }

/* ---- The lanes ----------------------------------------------------------- */
.vc-lanes {
  --label: 138px; --head: 34px; --lh: 48px;
  position: relative; height: calc(var(--head) + var(--n) * var(--lh) + 6px);
}
.vc-lane-label {
  position: absolute; left: 0; width: var(--label); top: calc(var(--head) + var(--lane) * var(--lh)); height: var(--lh);
  display: flex; align-items: center; gap: 8px; padding-right: 10px; font: 600 14px/1.15 var(--vc-ui); color: var(--text);
}
.vc-lane-n { margin-left: auto; font: 400 13px var(--vc-ui); color: var(--text-dim); }
.vc-lane-bg {
  position: absolute; left: var(--label); right: 0; top: calc(var(--head) + var(--lane) * var(--lh)); height: var(--lh);
  border-top: 1px solid var(--hairline);
}
.vc-lane-group {
  position: absolute; top: 0; bottom: 0; left: calc(var(--label) + (100% - var(--label)) * var(--x));
  width: calc((100% - var(--label)) * var(--w)); border-left: 1px dashed var(--line);
  container-type: inline-size; padding: 4px 0 0 6px; overflow: hidden; white-space: nowrap;
  font: 600 12px/1.3 var(--vc-ui); color: var(--text-dim);
}
.vc-lg-full, .vc-lg-ch { display: none; }
@container (min-width: 30px) { .vc-lg-ch { display: inline; } }
@container (min-width: 84px) { .vc-lg-full { display: inline; } .vc-lg-ch { display: none; } }
.vc-lt {
  position: absolute; left: calc(var(--label) + (100% - var(--label)) * var(--x));
  width: max(6px, calc((100% - var(--label)) * var(--w) - 2px));
  top: calc(var(--head) + var(--lane) * var(--lh) + 8px); height: calc(var(--lh) - 16px);
  padding: 0; border: 0; border-radius: 5px; cursor: pointer; overflow: visible;
  background-color: var(--hue); background-image: var(--pat); color: var(--vc-on) !important;
  display: flex; align-items: center; justify-content: center; container-type: inline-size;
  font: 600 12px/1 var(--vc-ui) !important;
}
.vc-lt::after { content: ""; position: absolute; inset: -6px -3px; }
.vc-lt-mark, .vc-lt-n { display: none; }
@container (min-width: 22px) { .vc-lt-mark { display: inline; } }
.vc-lt.vc-gap { width: 14px; margin-left: -7px; background: transparent; border: 2px dashed var(--hue); color: var(--text) !important; }
.vc-lt.vc-disputed { box-shadow: inset 0 3px 0 -1px var(--bg-1); }
.vc-lt[aria-current="true"] { z-index: 2; box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--vc-sel); }

/* ---- The totals ---------------------------------------------------------- */
.vc-counts-lead { margin: 0 0 14px; font: 400 15px/1.5 var(--vc-ui); color: var(--text-dim); }
.vc-counts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vc-count { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; align-items: center; }
.vc-count-who { grid-row: 1 / 3; display: flex; align-items: center; gap: 9px; font: 600 15px/1.25 var(--vc-ui); color: var(--text); }
.vc-count-bar { height: 16px; border-radius: 8px; background: var(--soft-fill); overflow: hidden; }
.vc-count-fill {
  position: relative; display: block; height: 100%; width: calc(var(--f) * 100%); min-width: 4px; border-radius: 8px;
  background-color: var(--hue); background-image: var(--pat);
}
.vc-count-q, .vc-q-sw {
  background: repeating-linear-gradient(-45deg, var(--text) 0 2px, transparent 2px 5px);
}
.vc-count-q { position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--q) * 100%); opacity: .75; box-shadow: -2px 0 0 var(--bg-1); }
.vc-count-fig { margin: 3px 0 0; font: 400 13px/1.4 var(--vc-ui); color: var(--text-dim); }
.vc-count-fig strong { color: var(--text); font-weight: 600; }
.vc-counts-key { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font: 400 14px/1.5 var(--vc-ui); color: var(--text-dim); }
.vc-q-sw { flex: none; width: 22px; height: 14px; margin-top: 3px; border-radius: 3px; border: 1px solid var(--line); }

.vc-compare { margin: 34px 0 0; }
.vc-compare h3 { margin: 0 0 4px; font: 600 22px/1.2 var(--vc-display); color: var(--ink); }
.vc-compare figcaption p { margin: 0 0 12px; font: 400 15px/1.5 var(--vc-ui); color: var(--text-dim); }
.vc-table-wrap { overflow-x: auto; }
.vc-compare table { border-collapse: collapse; width: 100%; max-width: 680px; font: 400 15px/1.3 var(--vc-ui); }
.vc-compare th, .vc-compare td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.vc-compare thead th { font-weight: 600; font-size: 14px; color: var(--text); }
.vc-compare thead small { display: block; font-weight: 400; font-size: 12px; color: var(--text-dim); }
.vc-compare tbody th { font-weight: 600; white-space: nowrap; }
.vc-compare tbody th .vc-sw { margin-right: 8px; }
.vc-cell-n { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.vc-cell-bar { display: block; height: 6px; margin-top: 5px; width: calc(var(--f) * 100%); min-width: 3px; border-radius: 3px; background-color: var(--hue, var(--text-dim)); background-image: var(--pat, none); }
.vc-total th, .vc-total td { border-bottom: 0; border-top: 2px solid var(--line); }
.vc-total .vc-cell-bar { background: var(--text-dim); }
.vc-none span { display: block; font-weight: 600; color: var(--text-dim); }
.vc-none small { display: inline-block; margin-top: 3px; padding: 1px 6px; border: 1.5px dashed var(--hue); border-radius: 4px; font-size: 12px; color: var(--text-dim); }

/* ---- The card ------------------------------------------------------------ */
.vc-card {
  position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  border-radius: 16px; background: var(--vc-paper); border: 1px solid var(--line); border-top: 6px solid var(--hue, var(--line));
  overflow: hidden;
}
.vc-card-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 22px 8px; overscroll-behavior: contain; }
.vc-card-body:focus { outline: none; }
.vc-close { display: none; }
.vc-card-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 12px/1.3 var(--vc-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.vc-card-eyebrow .vc-sw { width: 14px; height: 14px; }
.vc-card-who { margin: 8px 0 2px; font: 600 25px/1.15 var(--vc-display); color: var(--ink); }
.vc-card-ref { margin: 0 0 10px; font: 400 14px/1.4 var(--vc-ui); color: var(--text-dim); }
.vc-card-ref strong { color: var(--text); font-weight: 600; }
.vc-flag {
  display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; border: 1.5px dotted var(--text-dim);
  font: 600 13px/1.4 var(--vc-ui); color: var(--text);
}
.vc-narr { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft-fill); }
.vc-narr-label { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font: 600 12px/1.3 var(--vc-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.vc-narr-label .vc-sw { width: 12px; height: 12px; }
.vc-narr-line { margin: 0 0 4px; font-size: 15px; font-style: italic; }
.vc-narr-line cite { display: inline; margin-left: 6px; font-size: 12px; }
.vc-sum { margin: 0 0 14px; font-size: 17px; line-height: 1.55; }
.vc-quote { margin: 0 0 14px; }
.vc-quote figcaption { font: 600 12px/1.2 var(--vc-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--vc-accent); margin-bottom: 4px; }
.vc-quote blockquote { margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--hue, var(--line)); }
.vc-quote blockquote p { margin: 0; font-style: italic; font-size: 16px; line-height: 1.55; }
.vc-quote cite { padding-left: 17px; }
.vc-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.vc-note strong { color: var(--ink); }
.vc-about { margin: 0 0 12px; font: 400 14px/1.5 var(--vc-ui); color: var(--text-dim); }
.vc-about strong { color: var(--text); }
.vc-card-nav { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px 14px; border-top: 1px solid var(--hairline); }
.vc-step {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; cursor: pointer;
  font: 600 14px/1 var(--vc-ui) !important;
}
.vc-step:hover:not(:disabled) { border-color: var(--vc-accent); }
.vc-step:disabled { opacity: .4; cursor: default; }

/* ---- Tooltip ------------------------------------------------------------- */
#voicesRoot .vc-tip {
  position: fixed; z-index: 70; pointer-events: none; max-width: 280px; padding: 7px 11px; border-radius: 8px;
  background: var(--ink); color: var(--bg-1); font: 400 13px/1.35 var(--vc-ui); box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
#voicesRoot .vc-tip strong { display: block; font-weight: 600; }

/* ---- Sources -------------------------------------------------------------- */
.vc-sources { max-width: 52em; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font: 400 14px/1.55 var(--vc-ui); color: var(--text-dim); }
.vc-sources h2 { margin: 0 0 6px; font: 600 20px/1.2 var(--vc-display); color: var(--ink); }
.vc-sources p { margin: 0 0 8px; }
.vc-sources ul { margin: 0; padding-left: 1.2em; }
.vc-sources li { margin: 0 0 4px; }

/* ---- Narrow screens: the card becomes a bottom sheet ---------------------- */
@media (max-width: 1099px) {
  .vc-top--framed { display: block; }
  .vc-frame { margin-top: 22px; }
}
@media (max-width: 1099px), (max-height: 500px) {
  .vc-stage { display: block; }
  .vc-card {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; max-width: 760px; margin: 0 auto;
    max-height: 70vh; max-height: 70dvh; border-radius: 18px 18px 0 0; border-bottom: 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .3);
    transform: translateY(calc(100% + 24px)); visibility: hidden;
    transition: transform .32s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .32s;
  }
  .vc-card.open { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
  .vc-close {
    display: grid; place-items: center; position: absolute; top: 8px; right: 10px; z-index: 1; width: 40px; height: 40px;
    border-radius: 50%; border: 1px solid var(--line); background: var(--vc-paper); cursor: pointer; font: 600 16px/1 var(--vc-ui) !important;
  }
  .vc-card-body { padding-right: 58px; }
  .vc-card-nav { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  body.vc-sheet-open #voicesRoot { padding-bottom: 72vh; padding-bottom: 72dvh; }
  body.low-power .vc-card { transition: none; }
}
@media (prefers-reduced-motion: reduce) { .vc-card { transition: none !important; } }

/* ---- Phones: the strip turns upright -------------------------------------- */
@media (max-width: 640px) {
  body.voices-mode #voicesRoot { font-size: 16px; padding: 0 16px 64px; }
  #voicesMain { padding-top: 62px; }
  .vc-sub { font-size: 18px; }
  .vc-frame { padding: 14px 16px 4px; }
  .vc-frame blockquote { margin-bottom: 4px; }
  .vc-frame blockquote p { font-size: 17px; }
  .vc-frame-more summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
    font: 600 14px/1.3 var(--vc-ui); color: var(--vc-accent);
  }
  .vc-frame-more summary::-webkit-details-marker { display: none; }
  .vc-frame-more summary::before {
    content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid currentColor; font-size: 15px; line-height: 1;
  }
  .vc-frame-more[open] summary::before { content: "–"; }
  .vc-frame-more[open] summary { margin-bottom: 4px; }
  .vc-chart { margin-top: 30px; }

  .vc-controls { display: block; }
  .vc-switch { display: flex; width: 100%; }
  .vc-tab { flex: 1 1 0; min-height: 42px; padding: 0 8px; }
  /* The key: one row that scrolls sideways, with a fade at the cut edge. */
  .vc-key-wrap { margin: 12px -16px 0; position: relative; }
  .vc-key { flex-wrap: nowrap; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .vc-key::-webkit-scrollbar { display: none; }
  .vc-chip { flex: none; min-height: 40px; }

  /* The strip: a spine down the left, a turn per row, a bar for its length. */
  .vc-row { margin: 0 0 22px; }
  .vc-row-head h3 { font-size: 20px; }
  .vc-track { flex-direction: column; gap: 0; width: 100%; margin-top: 8px; }
  .vc-turn {
    flex: none; height: auto; min-height: 52px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto;
    grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: center;
    padding: 8px 6px 9px 0; text-align: left; container-type: normal; border-radius: 0 !important;
  }
  .vc-turn::before {
    content: ""; grid-column: 1; grid-row: 1 / 3; align-self: stretch; margin: -8px 0 -9px;
    background-color: var(--hue); background-image: var(--pat);
  }
  .vc-turn:first-child::before { border-radius: 6px 6px 0 0; }
  .vc-turn:last-child::before { border-radius: 0 0 6px 6px; }
  .vc-turn:only-child::before { border-radius: 6px; }
  .vc-fill {
    position: static; grid-column: 2 / 4; grid-row: 2; justify-self: start; height: 9px;
    width: calc(var(--tw) * 100%); min-width: 6px; border-radius: 5px !important;
  }
  .vc-lab { display: none; }
  .vc-txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; grid-column: 2; grid-row: 1; min-width: 0; }
  .vc-who { font: 600 16px/1.25 var(--vc-ui); color: var(--text); }
  .vc-ref { font: 400 14px/1.3 var(--vc-ui); color: var(--text-dim); }
  .vc-n { display: block; grid-column: 3; grid-row: 1; font: 600 14px/1.2 var(--vc-ui); color: var(--text); font-variant-numeric: tabular-nums; }
  .vc-turn:hover .vc-fill { filter: none; }
  .vc-turn[aria-current="true"] { background: var(--soft-fill-2); }
  .vc-turn[aria-current="true"] .vc-fill { box-shadow: none; transform: none; }
  .vc-turn[aria-current="true"] .vc-who { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .vc-turn.vc-dim { opacity: .3; }
  .vc-turn.vc-dim .vc-fill { opacity: 1; }
  .vc-turn.vc-disputed::after {
    position: static; grid-column: 2 / 4; grid-row: 2; justify-self: end; content: "speaker discussed"; width: auto; height: auto;
    background: none; font: 400 12px/1 var(--vc-ui); color: var(--text-dim); padding-left: 8px;
  }
  /* The phone rows say "speaker discussed" in words, so the dotted-rule key is not needed. */
  .vc-lg-item.vc-lg-disputed { display: none; }
  .vc-turn.vc-gap { flex: none; }
  .vc-turn.vc-gap::before { background: none; border-left: 3px dashed var(--hue); margin-left: 4px; }
  .vc-turn.vc-gap .vc-fill { display: none; }
  .vc-turn.vc-gap .vc-ref { color: var(--text); font-style: italic; }

  /* The lanes: a column per voice, the turns down the page in order. */
  .vc-lanes {
    display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-auto-rows: minmax(42px, auto);
    column-gap: 5px; height: auto;
  }
  .vc-lane-label {
    position: sticky; top: 0; z-index: 3; grid-row: 1; grid-column: var(--col); left: auto; width: auto; height: auto;
    flex-direction: column; justify-content: center; gap: 3px; padding: 8px 0 6px; background: var(--bg-1);
    border-bottom: 1px solid var(--line); text-align: center;
  }
  .vc-lane-label .vc-sw--mark { width: 28px; height: 26px; font-size: 13px; }
  .vc-lane-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vc-lane-n { margin: 0; font-size: 12px; }
  /* Each voice's thread runs down its column; the group heads cut across it. */
  .vc-lane-bg {
    position: static; grid-column: var(--col); grid-row: 2 / span var(--rows); border: 0; height: auto;
    background: linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat;
  }
  .vc-lane-group {
    position: relative; z-index: 1; left: auto; top: auto; bottom: auto;
    grid-column: 1 / -1; grid-row: var(--grow); width: auto; border-left: 0; border-top: 1px solid var(--line);
    background: var(--bg-1); padding: 12px 0 2px; margin-top: 6px; font: 600 15px/1.2 var(--vc-display); color: var(--ink); white-space: normal;
    container-type: normal;
  }
  .vc-lg-full { display: inline; }
  .vc-lg-ch { display: inline; margin-left: 8px; font: 400 13px var(--vc-ui); color: var(--text-dim); }
  .vc-lt {
    position: relative; z-index: 1; left: auto; top: auto; width: auto; height: auto; min-height: 40px; margin: 2px 0;
    grid-column: var(--col); grid-row: var(--grow); flex-direction: column; gap: 2px; container-type: normal; border-radius: 6px;
  }
  .vc-lt::after { inset: 0; }
  .vc-lt-mark { display: block; font-size: 12px; }
  .vc-lt-n { display: block; font-size: 13px; }
  .vc-lt.vc-gap { width: auto; margin-left: 0; background: var(--bg-1); }
  .vc-lt.vc-gap .vc-lt-n { font-size: 12px; font-weight: 400; }

  .vc-count { grid-template-columns: minmax(0, 1fr); }
  .vc-count-who { grid-row: auto; margin-bottom: 6px; }
  .vc-compare h3 { font-size: 20px; }
  .vc-compare th, .vc-compare td { padding: 8px 7px; }
  .vc-compare table { font-size: 14px; }

  .vc-card-body { padding: 16px 56px 6px 18px; }
  .vc-card-who { font-size: 22px; }
  .vc-sources { margin-top: 44px; }
}
@media (max-width: 380px) {
  .vc-tab { font-size: 13px !important; }
  .vc-compare th, .vc-compare td { padding: 7px 5px; }
}
@media (pointer: coarse) {
  .vc-chip { min-height: 40px; }
  .vc-tab { min-height: 42px; }
}
