/* Redraft project page. Self-contained: system fonts, inline SVG icons, no external CSS/JS. */

:root {
  --text: #1f2328;
  --muted: #57606a;
  --faint: #8c959f;
  --rule: #d0d7de;
  --rule-light: #eaeef2;
  --surface: #f6f8fa;
  --accent: #b4530f;
  --ours: #fdf4ee;
  --gain: #1a7f37;
  --series-1: #2f6db3;
  --series-2: #7a8591;
  --series-3: #2a9d8f;
  --acc: #1a7f37;
  --draft: #8c959f;
  --rej: #cf222e;
  --back: #8250df;
  --vox-add: #f07d2e;
  --vox-rem: #3b82f6;
  --text-w: 840px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif,
          "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; height: auto; }

sup { font-size: 0.68em; line-height: 0; }

.wrap {
  max-width: 1008px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.hero {
  padding: 72px 0 8px;
  text-align: center;
}

.paper-title {
  max-width: 900px;
  margin: 0 auto 28px;
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.method-name { color: var(--accent); }

.authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
}

.authors {
  gap: 4px 22px;
  font-size: 18px;
}

.affiliations {
  gap: 2px 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15.5px;
}

.author-notes {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 14px;
}

.author-notes .sep { margin: 0 8px; }

.venue {
  margin: 18px 0 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 16px;
  border: 1px solid #24292f;
  border-radius: 999px;
  background: #24292f;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #000;
  border-color: #000;
  text-decoration: none;
}

.btn-light {
  background: #fff;
  border-color: var(--rule);
  color: var(--text);
}

.btn-light:hover {
  background: var(--surface);
  border-color: var(--faint);
}

.btn svg { width: 17px; height: 17px; flex: none; }
.icon-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; }
.emoji { font-size: 16px; line-height: 1; }

/* Sections */

main { padding-bottom: 16px; }

.section { padding-top: 64px; }

h2 {
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
}

p { margin: 0 0 14px; }

.prose {
  max-width: var(--text-w);
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.prose-wide {
  max-width: var(--text-w);
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.7;
}

.justify { text-align: justify; }

.note { color: var(--muted); font-size: 15.5px; text-align: center; }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: var(--text-w);
  margin: 8px auto 18px;
}

/* Figures */

figure { margin: 28px 0 36px; }

figure img {
  width: 100%;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
}

figcaption {
  max-width: 860px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

figcaption strong { color: var(--text); font-weight: 600; }

.teaser { padding-top: 40px; }
.teaser figure { margin-top: 0; }

/* Tables */

.table-scroll {
  max-width: var(--text-w);
  margin: 28px auto 18px;
  overflow-x: auto;
}

table.booktabs {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
}

.booktabs caption {
  caption-side: bottom;
  padding-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.booktabs th,
.booktabs td {
  padding: 8px 14px;
  text-align: left;
  white-space: nowrap;
}

.booktabs thead th {
  border-bottom: 1px solid var(--text);
  font-weight: 650;
}

.booktabs .num { text-align: right; }

.booktabs tr.group-start td { border-top: 1px solid var(--rule); }
.booktabs tbody tr.group-start:first-child td { border-top: 0; }

.booktabs td.dataset { font-weight: 600; vertical-align: middle; }

.booktabs strong { font-weight: 650; }

.booktabs tr.ours td { background: var(--ours); font-weight: 600; }

.results { min-width: 600px; }

.gain {
  display: inline-block;
  min-width: 2.7em;
  margin-left: 4px;
  color: var(--gain);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}

.efficiency {
  align-items: center;
  margin-top: 48px;
}

.efficiency .table-scroll { margin: 0; }
.efficiency p { color: var(--text); font-size: 16.5px; line-height: 1.7; }

/* Analysis */

.analysis {
  max-width: none;
  grid-template-columns: 1.55fr 1fr;
  align-items: start;
}

.analysis figure { margin: 0; }

.bars {
  padding: 10px 4px 4px;
  font-size: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 40px;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.bar-row b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.track {
  height: 10px;
  border-radius: 999px;
  background: var(--rule-light);
  overflow: hidden;
}

.track span {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: 999px;
  background: var(--faint);
}

.bar-row.ours span:first-child,
.bar-row.ours b { color: var(--accent); font-weight: 650; }
.bar-row.ours .track span { background: var(--accent); }

.bar-axis {
  display: flex;
  justify-content: space-between;
  margin: 4px 52px 0 100px;
  color: var(--faint);
  font-size: 12.5px;
}

/* BibTeX */

.bibtex { position: relative; }

.bibtex pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: 500 13px/1.5 var(--sans);
  cursor: pointer;
}

.copy:hover { color: var(--text); border-color: var(--faint); }

/* Footer */

.footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--rule-light);
  color: var(--faint);
  font-size: 13.5px;
  text-align: center;
}

.footer p { margin: 0; }

/* Small screens */

@media (max-width: 760px) {
  .hero { padding-top: 48px; }
  .authors { gap: 2px 16px; font-size: 17px; }
  .affiliations { font-size: 14.5px; }
  .section { padding-top: 48px; }
  h2 { font-size: 24px; }
  .prose { font-size: 16.5px; }
  .justify { text-align: left; }
  .cols,
  .analysis { grid-template-columns: 1fr; gap: 20px; }
  .analysis figure + figure { margin-top: 24px; }
  .btn { padding: 8px 15px 8px 13px; font-size: 14.5px; }
}

.zoom { display: block; cursor: zoom-in; }
.zoom:hover img { border-color: var(--rule); }

/* Redraft: session videos */
.player { margin: 24px 0 10px; }
.player video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 504;
  background: var(--surface);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
}
.player-caption { color: var(--muted); font-size: 15px; text-align: center; margin: 10px 0 0; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.thumbs button {
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
}
.thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.thumbs img { border-radius: 4px 4px 0 0; aspect-ratio: 1280 / 504; object-fit: cover; width: 100%; }
.thumbs span { display: block; padding: 4px 6px 6px; font-size: 13px; line-height: 1.35; }
.thumbs small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ interactive demo */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tldr { max-width: var(--text-w); margin: 0 auto 22px; font-size: 18px; line-height: 1.65; text-align: center; color: var(--text); }
.muted { color: var(--muted); }
.note.left { text-align: left; }
.demo-block { margin-top: 8px; }

.picker { margin: 0 0 14px; }
.pick-group { margin: 0 0 8px; }
.pick-title { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 5px; }
.pick-row, .room-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.room-picker { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); margin: 0 0 14px; }
.picker button, .room-picker button { position: relative; }
.picker button {
  padding: 0; border: 2px solid var(--rule-light); border-radius: 8px; background: #fff; cursor: pointer;
  font: inherit; color: var(--text); text-align: left; overflow: hidden;
}
.picker button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(180, 83, 15, .15); }
.picker img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.picker small i, .room-picker small i { font-style: normal; font-weight: 650; }
.picker i.up { color: var(--gain); } .picker i.down { color: var(--rej); } .picker i.flat { color: var(--muted); }
.tag { position: absolute; top: 5px; left: 5px; font-style: normal; font-size: 10.5px; font-weight: 650; color: #fff;
       background: rgba(31, 35, 40, .72); border-radius: 4px; padding: 1px 5px; }
.room-picker button { padding: 0; border: 2px solid var(--rule-light); border-radius: 8px; background: #fff; cursor: pointer;
                      font: inherit; color: var(--text); text-align: left; overflow: hidden; }
.room-picker button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(180, 83, 15, .15); }
.room-picker img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.room-picker span { display: block; padding: 4px 7px 6px; font-size: 12.5px; line-height: 1.35; }
.picker span { display: block; padding: 4px 7px 6px; font-size: 13px; font-weight: 600; text-transform: capitalize; }
.picker small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; text-transform: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 10px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.seg button, .toggle {
  border: 0; background: #fff; padding: 6px 13px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"], .toggle[aria-pressed="true"] { background: var(--text); color: #fff; }
.toggle { border: 1px solid var(--rule); border-radius: 999px; }
.slider { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.slider input { width: 120px; accent-color: var(--accent); }

.viewer { position: relative; border: 1px solid var(--rule-light); border-radius: 10px; background: var(--surface); overflow: hidden; }
.viewer canvas { position: absolute; inset: 0; z-index: 1; display: block; touch-action: pan-y; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.vp-grid { display: grid; gap: 1px; background: var(--rule-light); }
.three-up .vp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.one-up .vp-grid { grid-template-columns: 1fr; }
.vp { position: relative; aspect-ratio: var(--img-aspect, 1); background: var(--surface); }
.two-up .vp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.five-up .vp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vp-image .vp-bg, .mode-input .vp-overlay .vp-bg { display: block; }
.vp-overlay .vp-bg { display: none; }
.five-up.mode-input .vp:not(.vp-image):not(.vp-overlay) .vp-bg { display: none; }
.picker.compact .pick-row { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.picker.compact span, .picker.compact .tag { display: none; }
.picker.compact .pick-group { display: inline-block; vertical-align: top; margin: 0 14px 6px 0; }
.picker.compact .pick-row { display: flex; flex-wrap: wrap; }
.picker.compact button { width: 58px; }
h3.sub { font-size: 18px; margin: 30px 0 10px; }
.pipe-note, .room-meta, .rp-who { font-size: 14.5px; margin: 10px 0 0; }
.rp-who { margin: 0 0 4px; }
details.videos { margin: 26px 0 0; border: 1px solid var(--rule-light); border-radius: 10px; padding: 10px 16px; background: #fff; }
details.videos summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
details.videos[open] summary { margin-bottom: 8px; }
.vp { overflow: hidden; }
.vp-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; display: none; }
.mode-input .vp-bg { display: block; }
.vp-label, .vp-value {
  position: absolute; z-index: 2; pointer-events: none; font-size: 13.5px; font-weight: 600;
  background: rgba(255, 255, 255, .88); border-radius: 6px; padding: 2px 8px;
}
.vp-label { left: 10px; top: 10px; }
.vp-value { right: 10px; bottom: 10px; font-variant-numeric: tabular-nums; }
.vp-value:empty, .vp-label:empty { display: none; }
.vp-value b.up { color: var(--gain); margin-left: 4px; }
.vp-value b.flat { color: var(--muted); margin-left: 4px; }
.split-handle { display: none; position: absolute; z-index: 3; top: 0; bottom: 0; left: 50%; width: 0; }
.split-on .split-handle { display: block; }
.split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.split-handle span {
  position: absolute; top: 50%; left: -17px; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  background: #fff; border: 1px solid var(--rule); display: grid; place-items: center; cursor: ew-resize;
  font-size: 18px; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.split-on.three-up .vp-grid { grid-template-columns: 2fr 1fr; align-items: start; background: transparent; }
.split-on.two-up .vp-grid { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.split-on .vp:nth-child(2) { display: none; }
.split-on .vp:nth-child(1) .vp-label::after { content: "  |  Redraft"; }
.split-on.two-up .vp:nth-child(1) .vp-label::after { content: "  |  Redraft"; }
.viewer-fail { display: none; padding: 40px 20px; text-align: center; color: var(--muted); }
.viewer.failed canvas, .viewer.failed .vp-grid { display: none; }
.viewer.failed .viewer-fail { display: block; }
.compare-meta { font-size: 14.5px; margin: 10px 0 0; text-align: center; }

/* loop diagram */
.loop-wrap { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 24px; align-items: center; margin: 8px 0 8px; }
#loop-svg { width: 100%; height: auto; }
#loop-svg text { font: 600 14px var(--sans); fill: var(--text); text-anchor: middle; pointer-events: none; }
#loop-svg .ring { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 6 5; }
#loop-svg .ring-label { font-weight: 500; fill: var(--muted); }
#loop-svg .token { fill: var(--accent); }
#loop-svg .edge { stroke: var(--faint); stroke-width: 1.6; }
#loop-svg .edge.faint { stroke-dasharray: 3 3; }
#loop-svg .arrowhead { fill: var(--faint); }
#loop-svg .node { cursor: pointer; }
#loop-svg .node rect { fill: #fff; stroke: var(--rule); stroke-width: 1.5; transition: fill .2s, stroke .2s; }
#loop-svg .node.frozen rect { fill: #f1f3f5; }
#loop-svg .node.vlm rect { stroke: var(--accent); }
#loop-svg .node.out rect { stroke: var(--acc); }
#loop-svg .node:hover rect { stroke-width: 2.5; }
#loop-svg .node.lit rect { fill: var(--accent); stroke: var(--accent); }
#loop-svg .node.lit text { fill: #fff; }
.loop-text { min-height: 150px; border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.loop-text h3 { margin: 0 0 6px; font-size: 18px; }
.loop-text p { margin: 0; font-size: 15.5px; color: var(--text); }

/* session replay */
.tl { width: 100%; height: auto; display: block; margin: 4px 0 0; }
.tl-axis { stroke: var(--rule); stroke-width: 2; }
.tl-f5 { fill: none; stroke: var(--accent); stroke-width: 2; }
.tl-dot { fill: var(--accent); }
.tl-val { font: 600 11px var(--sans); fill: var(--accent); text-anchor: middle; }
.tl-cap { font: 500 12px var(--sans); fill: var(--muted); }
.tl-branch { fill: none; stroke: var(--back); stroke-width: 1.6; stroke-dasharray: 4 3; }
.tl-node { cursor: pointer; }
.tl-node circle { stroke: #fff; stroke-width: 2; }
.tl-node.acc circle { fill: var(--acc); }
.tl-node.draft circle { fill: var(--draft); }
.tl-node.rej circle { fill: var(--rej); }
.tl-node.back circle { fill: var(--back); }
.tl-node.none circle { fill: #d0d7de; }
.tl-node.start circle { fill: #57606a; }
.tl-node.final circle { stroke: var(--text); stroke-width: 3; }
.tl-node.on circle { stroke: var(--accent); stroke-width: 4; }
.tl-gen { font: 600 12px var(--sans); fill: var(--muted); text-anchor: middle; }
.tl-node.on .tl-gen { fill: var(--accent); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin: 2px 0 14px; }
.tl-legend i.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg.acc { background: var(--acc); } .lg.draft { background: var(--draft); } .lg.rej { background: var(--rej); }
.lg.back { background: var(--back); } .lg.final { background: #fff; border: 3px solid var(--text); width: 9px !important; height: 9px !important; }
.lg.branch { border-radius: 0 !important; height: 0 !important; border-top: 2px dashed var(--back); width: 18px !important; }
.replay-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.rp-card { border: 1px solid var(--rule-light); border-radius: 10px; padding: 16px 18px; background: #fff; min-height: 420px; }
.rp-title { margin: 0 0 6px; font-size: 19px; }
.rp-title .muted { font-weight: 400; font-size: 15px; margin-left: 6px; }
.rp-plan { font-size: 14.5px; margin: 0 0 8px; }
.rp-plan:empty { display: none; }
.rp-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 0; border-top: 1px solid var(--rule-light); }
.rp-key { font-size: 13px; color: var(--muted); padding-top: 3px; }
.rp-cells { font-variant-numeric: tabular-nums; font-size: 14.5px; padding-top: 2px; }
.rp-cells .add { color: var(--vox-add); font-weight: 650; }
.rp-cells .rem { color: var(--vox-rem); font-weight: 650; }
.chip { display: inline-block; margin: 0 6px 6px 0; padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule-light); font-size: 13px; }
.chip.muted { color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; color: #fff; }
.badge.acc { background: var(--acc); } .badge.draft { background: var(--draft); } .badge.rej { background: var(--rej); }
.badge.back { background: var(--back); } .badge.none { background: #d0d7de; color: var(--text); }
.badge.final { background: var(--text); margin-left: 6px; vertical-align: 2px; }
.rp-reason { margin: 6px 0 4px; padding: 8px 12px; border-left: 3px solid var(--rule); background: var(--surface); font-size: 14.5px; line-height: 1.55; color: var(--text); }
.rp-reason:empty { display: none; }
.rp-seen { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-seen .thumb { padding: 0; border: 1px solid var(--rule-light); border-radius: 6px; overflow: hidden; background: #fff; cursor: zoom-in; }
.rp-seen .thumb img { height: 74px; width: auto; }
.rp-f5 { font-weight: 650; font-variant-numeric: tabular-nums; padding-top: 2px; }
dialog#lightbox { border: 0; padding: 8px; border-radius: 10px; max-width: min(92vw, 1000px); }
dialog#lightbox img { max-width: 100%; max-height: 80vh; }
dialog#lightbox::backdrop { background: rgba(0, 0, 0, .6); }

/* charts */
.chart-block { margin: 18px 0 30px; }
.chart-area { position: relative; max-width: 820px; margin: 12px auto 0; }
.chart-area svg { width: 100%; height: auto; display: block; }
.chart-area .grid { stroke: var(--rule-light); }
.chart-area .tick { font: 12px var(--sans); fill: var(--muted); }
.chart-area .axis-title { font: 600 12.5px var(--sans); fill: var(--muted); }
.chart-area .series { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart-area .gap { opacity: .14; }
.chart-area .gap-label { font: 600 12px var(--sans); fill: var(--muted); }
.chart-area .cursor { stroke: var(--faint); stroke-dasharray: 3 3; }
.chart-tip {
  position: absolute; top: 10px; z-index: 2; pointer-events: none; background: rgba(255,255,255,.96); border: 1px solid var(--rule);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.08); min-width: 210px;
}
.chart-tip .tip-head { font-weight: 650; margin-bottom: 4px; }
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.chart-tip b { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-tip i, .legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 8px 0 0; justify-content: center; }
.legend button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule-light); background: #fff; border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--text); }
.legend button[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }

.hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 860px) {
  #loop-svg, .tl { min-width: 640px; }
  .picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .loop-wrap, .replay-grid { grid-template-columns: 1fr; }
  .three-up .vp-grid { grid-template-columns: 1fr; }
  .five-up .vp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-up .vp-grid { grid-template-columns: 1fr; }
  .split-on.three-up .vp-grid { grid-template-columns: 1fr; }
  .rp-card { min-height: 0; }
  .tldr { font-size: 16.5px; }
}

.btn-disabled, .btn-disabled:hover { background: #8c959f; cursor: default; text-decoration: none; }

/* Section bar: in-page navigation, kept apart from the paper links in the header */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule-light);
}
.topnav .wrap {
  display: flex;
  gap: 4px 18px;
  align-items: center;
  height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 14px;
}
.topnav .wrap::-webkit-scrollbar { display: none; }
.topnav a { color: var(--muted); white-space: nowrap; }
.topnav a:hover { color: var(--text); text-decoration: none; }
.topnav .topnav-brand { color: var(--accent); font-weight: 650; margin-right: auto; }
h2[id], .hero { scroll-margin-top: 56px; }
