
/* Visual presets inherit the demo's existing semantic colors and controls. */
:root {
  --theme-art-filter: none;
  --layer-neutral: #eadfce;
  --layer-chosen: #b6d8ad;
  --archive-bank: #d1c18f;
  --archive-water: #f5f5e8;
  --archive-light: #fffdf2;
  --theme-heading: "Songti SC","Noto Serif SC",SimSun,serif;
  --theme-radius: 16px;
}
:root[data-v2-theme="glass"] {
  --bg:#e1edf4; --surface:#edf7f9; --surface-solid:#eaf4f7; --surface-sunk:#daeaf1;
  --surface-hover:#e2f1f5; --surface-cell:#eff8fb; --line:#b8d3dc; --line-strong:#8bb7c4;
  --ink:#103441; --ink-2:#23414b; --muted:#4f6975; --primary:#166365; --primary-deep:#104854;
  --primary-hover:#125759; --primary-soft:#d2e9ee; --primary-line:#a6ccd3; --primary-mid:#93c3ca;
  --focus:#2a7d8e; --primary-ink:#fff; --theme-art-filter:grayscale(.78) hue-rotate(36deg) saturate(.68) brightness(1.10);
  --pdf-card:rgba(237,248,251,.83); --pdf-card-line:#b6d3dd;
  --layer-neutral:#d6ecf5; --layer-chosen:#86caca;
  --archive-bank:#91bdce; --archive-water:#d9f6ff; --archive-light:#fff;
}
:root[data-v2-theme="brutal"] {
  --bg:#fbf6e9; --surface:#fff9e9; --surface-solid:#fff9e9; --surface-sunk:#eadfc7;
  --surface-hover:#fff1ab; --surface-cell:#fff9e9; --line:#171612; --line-strong:#171612;
  --ink:#16150f; --ink-2:#292618; --muted:#514d3e; --primary:#ffdf00; --primary-deep:#15130a;
  --primary-hover:#ffed49; --primary-soft:#ffed79; --primary-line:#19170c; --primary-mid:#e3ba00;
  --focus:#272213; --primary-ink:#16150f; --theme-art-filter:grayscale(1) contrast(1.65) sepia(.32);
  --pdf-card:#fff9ec; --pdf-card-line:#19170f;
  --layer-neutral:#f2e8d4; --layer-chosen:#ffdb19;
  --archive-bank:#15130b; --archive-water:#15130b; --archive-light:#15130b;
  --theme-heading:system-ui,sans-serif; --theme-radius:0px;
}
:root[data-v2-theme="editorial"] {
  --bg:#fff; --surface:#fff; --surface-solid:#fff; --surface-sunk:#eeeded; --surface-hover:#f2f2f2;
  --surface-cell:#f7f7f7; --line:#c9c9c9; --line-strong:#888; --ink:#141414; --ink-2:#333;
  --muted:#595959; --primary:#171717; --primary-deep:#111; --primary-hover:#343434;
  --primary-soft:#e9e9e9; --primary-line:#aaa; --primary-mid:#999; --focus:#333; --primary-ink:#fff;
  --theme-art-filter:grayscale(1) contrast(.9) brightness(1.12);
  --pdf-card:#fff; --pdf-card-line:#ccc; --layer-neutral:#f2f2f2; --layer-chosen:#aeaeae;
  --archive-bank:#aaa; --archive-water:#555; --archive-light:#555; --theme-radius:0px;
}
:root[data-v2-theme="tech"] {
  color-scheme:dark;
  --bg:#091725; --surface:#102637; --surface-solid:#102637; --surface-sunk:#0a1b2a;
  --surface-hover:#17374b; --surface-cell:#122a3b; --line:#31546a; --line-strong:#44839a;
  --ink:#e9f7fe; --ink-2:#c3dce8; --muted:#9fbac9; --primary:#57e4f9; --primary-deep:#88edf8;
  --primary-hover:#a0f4ff; --primary-soft:#174959; --primary-line:#336577; --primary-mid:#509caf;
  --focus:#78eaff; --primary-ink:#061723; --theme-art-filter:grayscale(1) invert(.83) sepia(1) hue-rotate(147deg) saturate(1.5) brightness(.58);
  --pdf-card:#102537; --pdf-card-line:#31576e; --layer-neutral:#164c69; --layer-chosen:#32e4ea;
  --archive-bank:#164459; --archive-water:#57d9eb; --archive-light:#d7faff;
  --theme-heading:system-ui,sans-serif;
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) {
  --pdf-paper:var(--bg); --pdf-green:var(--primary-deep); --pdf-ink:var(--ink);
  --pdf-gold:var(--primary); --pdf-serif:var(--theme-heading);
  --bubble-user:var(--primary-soft);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) body {background:var(--bg);color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .plate-img,
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .lab-setup-art {filter:var(--theme-art-filter)}
:root[data-v2-theme="editorial"] :is(.pdf-home,.v2d-page,.v2-board) .plate-img,
:root[data-v2-theme="brutal"] :is(.pdf-home,.v2d-page,.v2-board) .plate-img {opacity:.33}
:root[data-v2-theme="tech"] :is(.pdf-home,.v2d-page,.v2-board) .plate-img {opacity:.42}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.bar,.steps,.v2-topbar,.v2-nav,.v2-lab-stage,.v2-lab-setup,.v2-lab-console,.v2-lab-controls,.record,.history-content .tabs,.config,.modal,.dialog,.v2-profile-panel,.v2-profile-side,.v2-profile-head,.v2d-rail-inner,.v2d-section) {
  background-color:var(--pdf-card);color:var(--ink);border-color:var(--line);border-radius:var(--theme-radius);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.brand,.greet,.primary-text,.v2-board h1,.v2-board h2,.v2-lab h1,.v2-lab h2,.v2d-page h1,.v2d-page h2,.v2d-page h3,.v2d-page .v2d-facts dt,.v2-library h1,.v2-library h2,.v2-profile-center h1,.v2-profile-center h2,.v2-profile-center h3,.river-record h3,.river-record h4,.river-compare-title,.v2-lab-subtitle) {color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(button.primary,.v2-main-button,.v2-terrain-start,.river-compare,.send,.v2-send,.mode-explore) {color:var(--primary-ink);background:var(--primary);border-color:var(--line-strong);border-radius:var(--theme-radius)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.v2-secondary,.v2-plain,.text-link,.link,.v2d-page a,.config .chip,.mode-fork,.examples,.river-when,.river-topic,.river-compare-topic) {color:var(--primary-deep)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.search,.composer,.home-composer,.history-content .tabs,.v2-lab-console,.v2d-entry,.v2d-page .v2d-rail li button,.diff,.river-compare-body .compare-stance p) {background-color:var(--surface-solid);border-color:var(--line);color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(input:not([type="range"]),textarea,select) {color:var(--ink);border-color:var(--line)}
:root[data-v2-theme="tech"] :is(.v2-lab select,.config input,.v2d-page select,.v2-profile-panel input,.river-compare-body select,.v2d-page input) {background-color:var(--surface-sunk);color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.tabs [aria-pressed="true"],.steps [aria-current="step"],.v2-profile-tab[aria-current],.v2d-rail [aria-current],.v2-layer-list [aria-current]) {background:var(--primary-soft);color:var(--primary-deep);border-color:var(--primary-line)}
:root[data-v2-theme="brutal"] :is(.v2-conversation,.v2-progress,.river-panel,.v2-lab-setup,.v2-lab-controls,.v2-profile-panel) {border:2px solid var(--line);border-radius:0;box-shadow:5px 5px 0 #1c1a10}
:root[data-v2-theme="brutal"] :is(.pdf-home h2,.v2-library h1,.v2-board h1,.v2d-page h1,.v2-lab h1) {font-family:system-ui,sans-serif;font-weight:950;letter-spacing:-.04em}
:root[data-v2-theme="editorial"] :is(.v2-conversation,.v2-progress,.river-panel,.v2-lab-setup,.v2-profile-panel) {border-radius:0;box-shadow:none}
:root[data-v2-theme="glass"] :is(.v2-progress,.v2-conversation,.river-panel,.v2-lab-setup,.v2-profile-panel) {box-shadow:inset 0 2px 3px #fffffff0,0 12px 30px #12334914;backdrop-filter:blur(10px)}
.v2-theme-presets {grid-template-columns:repeat(auto-fit,minmax(min(100%,144px),1fr))}
.v2-theme-thumb {background:var(--sample-ground);color:var(--sample-ink)}
.v2-theme-preset[data-preset="glass"] .v2-theme-thumb {background:linear-gradient(135deg,#f7ffff,#a9cad8);box-shadow:inset 0 2px 3px #fff}
.v2-theme-preset[data-preset="brutal"] .v2-theme-thumb {border:2px solid #19170e;border-radius:0;box-shadow:3px 3px 0 #17160c}
.v2-theme-preset[data-preset="editorial"] .v2-theme-thumb {border-radius:0}
.v2-theme-preset[data-preset="tech"] .v2-theme-thumb {background:linear-gradient(150deg,#091725,#13384b)}
/* Fixed terrain view and contour-shaped controls. */
.fixed-strata .pdf-strata-rig {transform:none;transform-style:flat;pointer-events:none;cursor:default}
.fixed-strata .pdf-strata-rig button.pdf-slab {
  appearance:none;display:block;inset:0;width:100%;height:100%;min-height:0;
  border:0;border-radius:0;padding:0;margin:0;box-shadow:none;
  background:transparent;transform:none!important;filter:none!important;animation:none!important;
  transition:none;pointer-events:auto;isolation:isolate;cursor:pointer;
}
.fixed-strata .pdf-slab img {filter:grayscale(1);opacity:.95}
.fixed-strata .pdf-slab::after {content:"";position:absolute;inset:0;background:var(--layer-neutral);mix-blend-mode:multiply;pointer-events:none}
.fixed-strata .pdf-slab.is-selected::after {background:var(--layer-chosen)}
:root[data-v2-theme="glass"] .fixed-strata .pdf-slab img {filter:grayscale(1) contrast(.76) brightness(1.21)}
:root[data-v2-theme="brutal"] .fixed-strata .pdf-slab img {filter:grayscale(1) contrast(2) brightness(1.03)}
:root[data-v2-theme="editorial"] .fixed-strata .pdf-slab img {filter:grayscale(1) contrast(.83) brightness(1.14)}
:root[data-v2-theme="tech"] .fixed-strata .pdf-slab img {filter:grayscale(1) invert(.89) contrast(1.35) brightness(1.45)}
:root[data-v2-theme="tech"] .fixed-strata .pdf-slab::after {mix-blend-mode:screen;opacity:.55}
:root[data-v2-theme="tech"] .fixed-strata .pdf-slab.is-selected::after {opacity:.78}
.fixed-strata .pdf-strata-tag button.v2-terrain-label {background:var(--surface-solid);color:var(--ink);border-color:var(--line-strong)}
.fixed-strata .pdf-strata-tag button.v2-terrain-label[aria-pressed="true"] {background:var(--primary-soft);color:var(--primary-deep);border-color:var(--primary-mid)}
:root[data-v2-theme="editorial"] .fixed-strata .pdf-strata-tag button[aria-pressed="true"] {background:var(--primary);color:#fff}
:root[data-v2-theme="brutal"] .fixed-strata .pdf-strata-tag button.v2-terrain-label {border:2px solid #16150f;border-radius:0}
.fixed-strata .pdf-strata-leaders :is(path,circle) {stroke:var(--line-strong)}
.fixed-strata .pdf-strata-leaders .is-active :is(path,circle) {stroke:var(--primary-deep)}
.v2-board .v2-layer-list button[aria-current="step"] {background:var(--primary-soft);border-color:var(--primary-mid);color:var(--primary-deep)}
/* Existing claim artwork remains clipped below a uniform, opaque reading area. */
.v2d-page .v2d-claim .v2d-facts>div:nth-child(n) {
  --claim-paper:var(--surface-solid);
  background:var(--claim-paper);border-color:var(--line);transform:none;isolation:isolate;
}
:root:not([data-v2-theme]),:root[data-v2-theme="lavender"] {--claim-theme-paper:#faf5ee}
.v2d-page .v2d-claim .v2d-facts>div:nth-child(n) {--claim-paper:var(--claim-theme-paper,var(--surface-solid))}
.v2d-page .v2d-claim .v2d-facts>div:nth-child(n)::before {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:var(--card-scene) center bottom/cover no-repeat;filter:var(--theme-art-filter);
  mask-image:linear-gradient(transparent 32%,#000 61%,#000 86%,transparent 100%);
}
.v2d-page .v2d-claim .v2d-facts>div:nth-child(n):hover {background-color:var(--claim-paper);border-color:var(--primary-mid);transform:none}
:root[data-v2-theme="tech"] .v2d-page .v2d-claim .v2d-facts>div:nth-child(n)::before {opacity:.55}
.v2d-page .v2d-rail button[aria-current="step"] {background:var(--primary-soft);color:var(--primary-deep)}
/* Lab setup and decision node selection. */
.lab-setup-workspace {display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,2.8fr);align-items:stretch;gap:clamp(12px,2vw,32px)}
.lab-setup-art {display:block;align-self:stretch;width:100%;height:100%;min-height:220px;max-height:420px;object-fit:cover;object-position:42% center;mask-image:radial-gradient(ellipse 72% 69% at 46% 55%,#000 42%,transparent 78%);opacity:.76;pointer-events:none}
.v2-lab-setup .lab-setup-workspace .config {width:min(100%,790px);margin:0 auto 0 0}
.pdf-road .pdf-road-cam {transform:none!important;touch-action:auto;cursor:default}
.pdf-road :is(.pdf-road-far,.pdf-road-near,.pdf-road-mid) {transform:none!important}
.pdf-road button.pdf-road-node {background:var(--surface-solid);border:2px solid var(--line-strong);transform:none;box-shadow:none}
.pdf-road button.pdf-road-node[aria-pressed="true"] {background:var(--primary);border-color:var(--surface-solid);box-shadow:0 0 0 2px var(--primary)}
.pdf-road button.pdf-road-sign {background:var(--surface-solid);color:var(--ink);border-color:var(--line-strong)}
.pdf-road button.pdf-road-sign[aria-pressed="true"] {background:var(--primary-soft);border-color:var(--primary)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.pdf-road-line,.pdf-road-leader path) {stroke:var(--line-strong)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .pdf-road-glow.is-on {stroke:var(--primary)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2-road-picture {filter:var(--theme-art-filter)}
.v2-road-node[data-point][aria-pressed="false"] {animation:none}
@media(max-width:740px) {
 .lab-setup-workspace {grid-template-columns:1fr}
 .lab-setup-art {height:155px;min-height:0;object-position:center 62%}
}
/* Visually continuous, horizontally scrollable archive with real date buttons. */
.archive-river.river {display:grid;grid-template-columns:minmax(0,1.75fr) minmax(265px,1fr);gap:clamp(14px,2.4vw,42px);align-items:stretch;height:auto;min-height:0;padding:12px 0 20px;overflow:visible}
.archive-track {position:relative;overflow:auto hidden;cursor:grab;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-color:var(--primary-mid) var(--surface); border:1px solid var(--line);border-radius:var(--theme-radius);background:var(--surface);min-height:370px}
.archive-track.is-dragging {cursor:grabbing;user-select:none}
.archive-track-content {position:relative;height:480px;isolation:isolate}
.archive-art {position:absolute;inset:0;pointer-events:none;background:var(--archive-scene) left center/auto 100% repeat-x;opacity:.94;z-index:-1}
.archive-route {position:absolute;inset:0;height:480px;width:100%;pointer-events:none;overflow:visible}
.archive-route path {fill:none;stroke-linecap:round;stroke-linejoin:round}
.archive-route-bank {stroke:var(--archive-bank);stroke-width:55;opacity:.56}
.archive-route-water {stroke:var(--archive-water);stroke-width:46;opacity:.86}
.archive-route-light {stroke:var(--archive-light);stroke-width:2;opacity:.88}
.archive-history-point {display:block;position:absolute;transform:translate(-50%,-50%);min-height:0;width:24px;height:24px;margin:0;padding:0;border:0;overflow:visible;background:transparent;cursor:pointer;z-index:1;color:var(--ink);box-shadow:none}
.archive-pin {display:block;width:16px;height:16px;margin:4px;border:2px solid var(--line-strong);border-radius:50%;background:var(--surface-solid);box-shadow:0 0 0 2px #ffffff8c}
.archive-history-point[aria-pressed="true"] .archive-pin {border-color:var(--primary-deep);border-width:4px;box-shadow:0 0 0 3px var(--primary-soft)}
.archive-date {position:absolute;display:flex;align-items:center;gap:7px;bottom:34px;left:50%;translate:-50% 0;white-space:nowrap;padding:7px 12px;line-height:1.25;border:1px solid var(--line-strong);border-radius:var(--theme-radius);background:var(--surface-solid);color:var(--ink);box-shadow:0 3px 10px #1112;font-weight:700}
.archive-date::after {content:"";position:absolute;top:100%;height:15px;width:1px;left:50%;background:var(--line-strong)}
.archive-history-point[aria-pressed="true"] .archive-date {background:var(--primary-soft);border-color:var(--primary-deep);color:var(--ink)}
.archive-version {font-size:.84em}
.archive-river.river .river-panel {position:relative;inset:auto;margin:0;width:auto;min-height:0;border:1px solid var(--line);color:var(--ink);background:var(--pdf-card);border-radius:var(--theme-radius);padding:clamp(13px,2vw,29px)}
.archive-river .river-record {display:flex;flex-direction:column;min-height:100%;gap:10px}
.archive-river .river-when,.archive-river .river-topic,.archive-river .river-stance,.archive-river .river-field,.archive-river h4 {margin:0;color:var(--ink)}
.archive-river .river-stance {font-size:clamp(20px,2vw,32px)}
.archive-river .river-field {background:var(--surface-sunk);border-color:var(--line)}
.archive-river .river-compare {margin-top:auto}
:root[data-v2-theme="glass"] .archive-art {background:radial-gradient(ellipse at 30% 30%,#f4ffff,#c5dbe7 75%);opacity:.9}
:root[data-v2-theme="glass"] .archive-route-bank {stroke-width:68;opacity:.52;filter:drop-shadow(0 7px 4px #4b809a56)}
:root[data-v2-theme="glass"] .archive-route-water {stroke-width:62;opacity:.7}
:root[data-v2-theme="glass"] .archive-route-light {stroke-width:3}
:root[data-v2-theme="tech"] .archive-art {background:linear-gradient(#07162599,#07162566), repeating-linear-gradient(90deg,#44a8c224 0 1px,transparent 1px 34px),repeating-linear-gradient(0deg,#44a8c224 0 1px,transparent 1px 34px),var(--archive-scene) left center/auto 100% repeat-x;filter:var(--theme-art-filter);opacity:.74}
:root[data-v2-theme="tech"] .archive-route-bank {stroke-width:17;opacity:.75;filter:blur(8px)}
:root[data-v2-theme="tech"] .archive-route-water {stroke-width:4;filter:drop-shadow(0 0 4px #31eaff)}
:root[data-v2-theme="brutal"] .archive-art,:root[data-v2-theme="editorial"] .archive-art {display:none}
:root:is([data-v2-theme="brutal"],[data-v2-theme="editorial"]) .archive-route-bank,
:root:is([data-v2-theme="brutal"],[data-v2-theme="editorial"]) .archive-route-light {display:none}
:root[data-v2-theme="brutal"] .archive-route-water {stroke-width:7;stroke-linejoin:miter}
:root[data-v2-theme="brutal"] :is(.archive-pin,.archive-date) {border-radius:0;border:2px solid #17160e}
:root[data-v2-theme="brutal"] .archive-history-point[aria-pressed="true"] .archive-date {background:var(--primary)}
:root[data-v2-theme="editorial"] .archive-route-water {stroke-width:1.3}
:root[data-v2-theme="editorial"] .archive-date {border:0;box-shadow:none;font-family:var(--theme-heading)}
:root[data-v2-theme="editorial"] .archive-history-point[aria-pressed="true"] .archive-date {background:#161616;color:#fff}
.river-compare-page .river-compare-body {background:var(--pdf-card);border-radius:var(--theme-radius);padding:clamp(9px,1.6vw,25px)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .river-compare-page .river-plate {opacity:.28}
:root[data-v2-theme="tech"] .river-compare-page .river-plate {opacity:.50}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .river-compare-page :is(.river-tag,.compare-stance p,.diff) {background:var(--surface-solid);color:var(--ink);border-color:var(--line)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .river-compare-page .river-node {background:var(--primary);border-color:var(--surface-solid)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .river-compare-page .river-line {stroke:var(--archive-water)}
@media(max-width:760px) {
 .archive-river.river {grid-template-columns:1fr}
 .archive-track {min-height:330px}
 .archive-track-content,.archive-route {height:390px}
 .archive-route {height:480px}
}
/* Blend colors only where the source image actually contains terrain. */
.fixed-strata .pdf-slab::after {mask-image:var(--strata-image);mask-repeat:no-repeat;mask-size:100% 100%}

/* The original colored artwork is kept intact in the default preset. */
.original-strata-art {display:none}
:root[data-v2-theme="lavender"] .original-strata-art {
  display:block;position:absolute;inset:0;width:100%;height:100%;
  object-fit:fill;pointer-events:none;user-select:none;
}
:root[data-v2-theme="lavender"] .fixed-strata .pdf-slab :is(img,svg),
:root[data-v2-theme="lavender"] .fixed-strata .pdf-slab::after {display:none}
:root[data-v2-theme="lavender"] .fixed-strata .pdf-strata-tag button.v2-terrain-label {
  background:#fbf6e6;border-color:#dcc189;color:#20362c;
}
:root[data-v2-theme="lavender"] .fixed-strata .pdf-strata-tag button.v2-terrain-label[aria-pressed="true"] {
  background:#e4eee1;border-color:#95b099;
}
:root[data-v2-theme="lavender"] .fixed-strata .pdf-strata-leaders :is(path,circle) {stroke:#c9a866}
:root[data-v2-theme="lavender"] .fixed-strata .pdf-strata-leaders .is-active :is(path,circle) {stroke:#6a8b6b}
.v2-road-scene.pdf-road {cursor:default;overscroll-behavior:auto;touch-action:pan-y}
.pdf-road button.pdf-road-node:not([aria-pressed="true"]):hover,
.v2-road-node[data-point][aria-pressed="false"]:hover {
  color:var(--ink);background:var(--surface-solid);border-color:var(--line-strong);box-shadow:none;scale:1;transform:none;
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.v2d-page .v2d-facts dd,.v2d-page .v2d-rail-layer,.v2-theme-preset,.v2d-page .v2d-claim-text) {color:var(--ink)}
dialog.dialog.history .archive-river.river {min-height:0}

/* In the Chinese landscape preset, coordinates are registered to the painted river. */
.archive-track-scenic {
  border:0;border-radius:0;background:#f6efe4;outline-offset:-4px;
  scrollbar-width:thin;min-height:0;
}
.archive-scenic-art {
  width:calc(100% + clamp(145px,22vw,250px));height:clamp(470px,68vh,700px);
  position:relative;isolation:isolate;
}
.archive-painted-river {position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.archive-track-scenic .archive-history-point {width:28px;height:28px}
.archive-track-scenic .archive-pin {width:18px;height:18px;margin:5px;background:#c8a45b;border:2px solid #fffae8;box-shadow:0 1px 3px #59452166}
.archive-track-scenic button[aria-pressed="true"] .archive-pin {background:#fff9e9;border:3px solid #245743}
.archive-track-scenic .archive-date {
  bottom:35px;left:27px;translate:0;background:#fbf4e3;border:1px solid #c9a866;font-family:var(--pdf-serif);
  border-radius:99px;padding:6px 16px;gap:4px;box-shadow:0 3px 10px #58453121;
}
.archive-track-scenic .archive-date::after {
  height:1px;width:28px;top:auto;bottom:0;left:2px;
  rotate:136deg;transform-origin:left center;background:#c9a866;
}
.archive-track-scenic button[aria-pressed="true"] .archive-date {background:#f5f1df;border-color:#245743}
.archive-track-scenic [data-many-records="true"] .archive-history-point:not([aria-pressed="true"]):not(:hover):not(:focus-visible) .archive-date {visibility:hidden}
@media(max-width:760px) {
  .archive-scenic-art {height:420px;min-width:570px}
  .archive-track-scenic .archive-date {font-size:12px;left:21px;padding-inline:9px}
}

/* The four alternate presets have their own surfaces and illustration systems. */
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .plate-img {visibility:hidden}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page .v2d-claim .v2d-facts>div:nth-child(n)::before {display:none}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page .v2d-entry,
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page .v2d-section {background-image:none}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .fixed-strata .pdf-slab::after {display:none}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.pdf-home,.pdf-chat,.v2-board,.v2d-page,.v2-lab,.v2-library,.v2-profile-center,.v2-history-surface) {
  background:var(--theme-page,var(--bg));color:var(--ink)
}
:root[data-v2-theme="glass"] {
  --theme-page:radial-gradient(ellipse at 86% 12%,#fcffff 0,transparent 40%),radial-gradient(ellipse at 22% 30%,#c2dbe8 0,transparent 56%),linear-gradient(130deg,#edf6fa,#cfdfeb);
  --terrain-top:#f7fcff;--terrain-base:#98bfd0;--terrain-line:#6896a8;--terrain-ridge:#719bab;
  --terrain-edge:#fff;--terrain-river:#effcff;--terrain-tex:.12;--terrain-accent:#32b1b699;
}
:root[data-v2-theme="brutal"] {
  --theme-page:#fff8e9;--terrain-top:#fff8e9;--terrain-base:#e9dec7;--terrain-line:#14140f;
  --terrain-ridge:#14140f;--terrain-edge:#14140f;--terrain-river:#fff9e8;--terrain-tex:.44;--terrain-accent:#ffe315;
}
:root[data-v2-theme="editorial"] {
  --theme-page:#fff;--terrain-top:#fff;--terrain-base:#dedede;--terrain-line:#777;
  --terrain-ridge:#585858;--terrain-edge:#b4b4b4;--terrain-river:#fff;--terrain-tex:.12;--terrain-accent:#8a8a8a36;
}
:root[data-v2-theme="tech"] {
  --theme-page:radial-gradient(ellipse at 68% 8%,#123849,transparent 53%),#071723;
  --terrain-top:#13384e;--terrain-base:#071827;--terrain-line:#559fb7;--terrain-ridge:#7ddfec;
  --terrain-edge:#528aa1;--terrain-river:#7bf1ff;--terrain-tex:.20;--terrain-accent:#20c4dd54;
}
.preset-terrain {width:100%;height:100%;position:absolute;inset:0;pointer-events:none}
.preset-terrain .terrain-accent {fill:transparent}
.preset-terrain .is-selected .terrain-accent {fill:var(--terrain-accent);mix-blend-mode:multiply}
:root[data-v2-theme="tech"] .preset-terrain .is-selected .terrain-accent {mix-blend-mode:screen}
.preset-terrain .terrain-contour {stroke:var(--terrain-line);stroke-width:1.75px;fill:none;opacity:.65}
.preset-terrain .terrain-ridge {stroke:var(--terrain-ridge);stroke-width:5px;fill:none}
.preset-terrain .terrain-edge {stroke:var(--terrain-edge);stroke-width:5px;fill:none}
.preset-terrain .terrain-texture {opacity:var(--terrain-tex)}
.preset-terrain .terrain-river-bank {stroke:var(--terrain-line);stroke-width:22px;fill:none}
.preset-terrain .terrain-river-water {stroke:var(--terrain-river);stroke-width:16px;fill:none}
:root[data-v2-theme="brutal"] .preset-terrain .terrain-edge {stroke-width:9px}
:root[data-v2-theme="brutal"] .preset-terrain .terrain-ridge {stroke-width:10px}
:root[data-v2-theme="glass"] .preset-terrain .terrain-edge {stroke-width:10px}
:root[data-v2-theme="tech"] .preset-terrain .is-selected .terrain-edge {stroke:#67e7f7}
:root[data-v2-theme="tech"] .preset-terrain .terrain-river-water {stroke-width:7px;filter:drop-shadow(0 0 7px #38dff4)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.v2-conversation,.v2-progress) :is(.v2-rail-heading,.v2-rail-message,.v2-rail-input) {background:var(--surface-sunk);color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page .v2d-rail-layer {background:var(--surface);border-color:var(--line)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page .v2d-rail-layer[aria-current="step"] {background:var(--primary-soft);color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .has-pdf-road .pdf-road {background:var(--theme-page,var(--bg))}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .pdf-road .pdf-road-origin {background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .pdf-road .pdf-road-sign :is(small,.v2-road-sign-index) {color:var(--muted)}
:root[data-v2-theme="tech"] :is(.pdf-road,.archive-track) {background-color:#081927;background-image:linear-gradient(#4886a01b 1px,transparent 1px),linear-gradient(90deg,#4886a01b 1px,transparent 1px);background-size:36px 36px}
:root[data-v2-theme="brutal"] :is(.archive-track,.v2d-facts>div,.pdf-road-sign,.home-composer,.v2-profile-side,.chat-composer) {border-width:2px;border-color:var(--line);border-radius:0}
:root[data-v2-theme="editorial"] :is(.archive-track,.v2d-facts>div,.pdf-road-sign,.home-composer,.v2-profile-side) {border-radius:0;box-shadow:none}
:root[data-v2-theme="editorial"] :is(.v2-conversation,.v2-progress,.v2-history-surface,.v2-profile-panel) {border-radius:0;box-shadow:none}
:root[data-v2-theme="glass"] :is(.home-composer,.v2-lab-stage,.v2d-facts>div,.archive-track) {border:1px solid #bfd7de;box-shadow:inset 0 2px 3px #ffffffd6,0 6px 24px #34596a21}
:root[data-v2-theme="tech"] :is(.home-composer,.v2d-facts>div,.v2-profile-panel,.v2-progress,.v2-conversation) {box-shadow:inset 0 0 22px #173f5224,0 10px 25px #0004}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .river-compare-page .river-plate .plate-canvas {background:linear-gradient(165deg,transparent 12%,var(--surface-sunk) 43%,transparent 62%)}
.setup-theme-illustration {min-height:220px;max-height:425px;display:grid;place-items:center;overflow:hidden}
.setup-theme-illustration svg {width:100%;max-width:390px;max-height:100%}
.setup-art-grid {fill:none;stroke:var(--line);stroke-width:1;opacity:.56}
.setup-art-road,.setup-art-road-accent {fill:none;stroke:var(--line-strong);stroke-width:10;stroke-linecap:round}
.setup-art-road-accent {stroke:var(--primary);stroke-width:3}
.setup-art-node {fill:var(--surface);stroke:var(--line-strong);stroke-width:2}
.setup-art-node.is-start {fill:var(--primary)}
:root[data-v2-theme="glass"] .setup-art-road {stroke-width:22;opacity:.38;filter:drop-shadow(0 3px 4px #4a92a577)}
:root[data-v2-theme="brutal"] .setup-art-node {rx:0;stroke-width:4}
:root[data-v2-theme="brutal"] .setup-art-road {stroke-width:14}
:root[data-v2-theme="editorial"] .setup-art-road {stroke-width:2}
:root[data-v2-theme="editorial"] .setup-art-grid {display:none}
:root[data-v2-theme="tech"] .setup-art-road-accent {filter:drop-shadow(0 0 6px #28dfff);stroke-width:5}

/* Shared shell uses each preset's own surface and has no paper art outside the default. */
:root[data-v2-theme]:not([data-v2-theme="lavender"]) {
  background:var(--theme-page,var(--bg));--pdf-paper-image:none;
  --pdf-title:var(--ink);--pdf-green:var(--primary-deep);
  --pdf-green-hover:var(--primary-hover);--pdf-gold:var(--primary-mid);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.v2-board .v2-conversation,.v2-board .v2-progress,.v2d-page .v2d-rail-inner,.bar,.v2-lab-setup,.modal,.dialog) {
  background:var(--pdf-card);color:var(--ink);border-color:var(--line);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) :is(.v2-board-topic,.v2-board .v2-progress-number,.v2-board .v2-rail-message p,.v2-board .v2-rail-message small,.v2-lab-heading .v2-board-topic,.tabs button,.bar button,.steps button) {color:var(--ink)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2-board .v2-layer-list .v2-depth {color:var(--ink)!important}
.v2-board .v2-layer-list li button:not([aria-current="step"]) {background:transparent;border-color:var(--line)}
.v2-board .v2-layer-list button[aria-current="step"] {background:var(--primary-soft);border-color:var(--primary-mid);color:var(--ink)}
.v2-board .v2-layer-list button.is-done svg {display:inline-block}
:root[data-v2-theme="tech"] :is(.v2-board .v2-progress,.v2-board .v2-conversation,.river-panel) {background:linear-gradient(155deg,#102d42,#0a1d2e);border-color:#356b84}
:root[data-v2-theme="tech"] :is(.v2-board .v2-rail-input,.v2-board .v2-rail-input textarea,.v2-board .v2-filters button,.v2-board .v2-rail-modes button,.steps,.config .chip,.thread .msg.ai) {background:var(--surface-sunk);color:var(--ink);border-color:var(--line)}
:root[data-v2-theme="glass"] :is(.v2-board .v2-progress,.v2-board .v2-conversation,.archive-river .river-panel) {
  background:linear-gradient(132deg,#f5fcffe8,#d6e9f2d9);
  box-shadow:inset 0 0 0 2px #ffffffad,inset 0 1px 5px #fff,0 8px 26px #33588029;
  border:1px solid #e8fbff;border-radius:20px;
}
:root[data-v2-theme="brutal"] :is(.v2-board .v2-conversation,.v2-board .v2-progress,.archive-river .river-panel,.v2-lab .v2-lab-setup) {border:2px solid #14120c;border-radius:0;box-shadow:6px 6px #14120c}
:root[data-v2-theme="editorial"] :is(.v2-board .v2-conversation,.v2-board .v2-progress,.archive-river .river-panel) {background:#fff;border:0;border-left:1px solid #bababa;border-radius:0;box-shadow:none}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .fixed-strata .pdf-slab .reference-slab-art {filter:none;opacity:1}
:root[data-v2-theme="glass"] .fixed-strata .pdf-slab[data-layer="0"]:not(.is-selected) .reference-slab-art {filter:saturate(.10) brightness(1.19)}
:root[data-v2-theme="tech"] .fixed-strata .pdf-slab[data-layer="0"]:not(.is-selected) .reference-slab-art {filter:saturate(.35) brightness(.67)}
:root[data-v2-theme="brutal"] .fixed-strata .pdf-slab[data-layer="0"]:not(.is-selected) .reference-slab-art {filter:grayscale(1) contrast(1.25) sepia(.13)}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .fixed-strata .pdf-slab.is-selected::after {
 display:block;mask-image:var(--reference-art);background:var(--layer-chosen);opacity:.48;
}
:root[data-v2-theme="brutal"] .fixed-strata .pdf-slab.is-selected::after {opacity:.70}
:root[data-v2-theme="editorial"] .fixed-strata .pdf-slab.is-selected::after {opacity:.35}
:root[data-v2-theme="tech"] .fixed-strata .pdf-slab.is-selected::after {opacity:.33}
:root[data-v2-theme]:not([data-v2-theme="editorial"]) .fixed-strata .pdf-slab.is-selected[data-layer="0"]::after {display:none}
:root[data-v2-theme="brutal"] .fixed-strata .pdf-strata-tag button[aria-pressed="true"] {background:#ffe200;color:#0e0d07}
:root[data-v2-theme="tech"] .fixed-strata .pdf-strata-tag button[aria-pressed="true"] {background:#53deef;color:#071823}

.archive-track-painted .archive-scenic-art {width:calc(100% + 170px)}
.archive-track-painted .archive-history-point {width:28px;height:28px}
.archive-track-painted .archive-date {left:30px;bottom:16px;translate:0}
.archive-track-painted .archive-date::after {width:22px;height:1px;left:-21px;top:auto;bottom:4px}
.archive-track-painted [data-many-records="true"] button:not([aria-pressed="true"]):not(:hover):not(:focus-visible) .archive-date {visibility:hidden}
:root[data-v2-theme="glass"] .archive-track-painted .archive-date {
  display:grid;justify-items:start;min-width:clamp(120px,18vw,255px);padding:12px 18px;border-color:#fff;
  border-radius:12px;box-shadow:inset 0 1px 3px white,0 9px 23px #4a81913b;background:#e3f1f7c9;backdrop-filter:blur(12px);
}
:root[data-v2-theme="glass"] .archive-track-painted [aria-pressed="true"] .archive-date {border-color:#2a9ba2;background:#c8f1f6df}
:root[data-v2-theme="glass"] .archive-version {background:#adcad4a1;padding:2px 10px;border-radius:30px}
:root[data-v2-theme="tech"] .archive-track-painted .archive-date {background:#081d2ef0;border-color:#278eac;color:#e4faff}
:root[data-v2-theme="tech"] .archive-track-painted [aria-pressed="true"] .archive-date {border-color:#53edfd;box-shadow:0 0 14px #43eaf858}
:root[data-v2-theme="tech"] .archive-pin {border-color:#5fbbd3;box-shadow:0 0 0 2px #5fe7ff5c}
:root[data-v2-theme="editorial"] .archive-track-index {
  overflow:hidden auto;max-height:530px;overscroll-behavior-y:contain;touch-action:pan-y;
  border:0;min-height:290px;background:#fff;
}
.archive-index {padding:0 clamp(12px,3vw,42px) 20px 0}
.archive-index-art {width:100%;height:clamp(75px,11vw,154px);object-fit:cover;display:block}
.archive-index ol {list-style:none;position:relative;margin:16px 0 0;padding:0 0 0 37px}
.archive-index ol::before {content:"";position:absolute;left:12px;top:24px;bottom:48px;border-left:1px solid #222}
.archive-index li {position:relative}
.archive-index li::before {content:"";position:absolute;left:-29px;top:24px;width:9px;height:9px;border-radius:50%;background:#111}
.archive-index .archive-history-point {
  position:static;transform:none;width:100%;height:auto;text-align:left;display:grid;justify-items:start;
  gap:6px;padding:6px 8px 14px;border-bottom:1px solid #999;color:#111;box-shadow:none;
}
.archive-index time {font:clamp(24px,3.25vw,45px)/1.2 var(--theme-heading)}
.archive-index [aria-pressed="true"] time {font-weight:750}
.archive-index .archive-version {padding:2px 12px;color:#111;background:#e7e7e7}
.archive-index [aria-pressed="true"] .archive-version {color:white;background:#111}
:root[data-v2-theme="editorial"] .archive-river.river .river-panel {border-width:0 0 0 1px;background:white;border-radius:0;box-shadow:none}
:root[data-v2-theme="brutal"] .archive-date {border-width:3px;box-shadow:4px 4px #15140c;padding:9px 16px;}
@media(max-width:760px) {
  :root[data-v2-theme="editorial"] .archive-river.river .river-panel {border-width:1px 0 0}
}

:root[data-v2-theme]:not([data-v2-theme="lavender"]) #root>.bar {
  background:var(--surface);box-shadow:inset 0 -1px var(--line);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2-board .v2-agent-mark {
  background:var(--primary-soft);border-color:var(--line);color:var(--primary-deep);
}
:root[data-v2-theme]:not([data-v2-theme="lavender"]) .v2d-page:not(:has(.v2d-claim)) .v2d-content>.v2d-section:first-child {
  background:var(--pdf-card);
}
:root[data-v2-theme="editorial"] .archive-index .archive-history-point {
  border-radius:0;background:transparent;color:#111;
}
:root[data-v2-theme="editorial"] .archive-index .archive-history-point:is(:hover,:focus-visible) {background:#f2f2f2}

/* Non-scenic claim cards only need room for the text and their entry marker. */
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));
  gap:clamp(9px,1.1vw,18px);
  margin-bottom:16px;
}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts>div:nth-child(n) {
  min-height:0;
  padding:clamp(12px,1.5vw,22px) clamp(11px,1.35vw,19px) 34px;
}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts>div::after {
  left:auto;right:13px;bottom:9px;translate:none;font-size:22px;color:var(--ink-2);
}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts dd {margin-top:7px;overflow-wrap:anywhere}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim>:is(.v2d-section-heading,.v2d-claim-text,.v2d-claim-back) {
  background:var(--surface-solid);color:var(--ink);
}
:root[data-v2-theme="tech"] {
  --muted:#b2cddb;
  --focus:#81e8fb;
  --line-faint:#2f566b;
  --v2d-quiet:#b2cddb;
}
:root[data-v2-theme="tech"] :is(.v2d-page .v2d-hero p,.v2d-page .v2d-topic,.v2d-page .v2d-claim-back) {color:var(--ink-2)}
:root[data-v2-theme="tech"] :is(.v2d-page .v2d-back,.v2d-page .v2d-claim .v2d-facts>div::after) {color:#a7e8f6}
:root[data-v2-theme="tech"] .river-compare-page :is(.compare-stance small,.river-compare-body .diff b) {
  color:#a4eafb;
  border-color:#4c93aa;
}
:root[data-v2-theme="tech"] .river-compare-page :is(.river-compare-head button,.river-compare-body .actions button) {
  color:#e5f8ff;
  background:#143347;
  border-color:#5490a5;
}
:root[data-v2-theme="tech"] .river-compare-head button:hover {background:#20516a}
:root[data-v2-theme="tech"] .river-compare-body .compare-stance p:last-child {background:#133348;border-color:#4c93aa}
:root[data-v2-theme="tech"] .river-compare-body .diff p {color:var(--ink-2)}
:root[data-v2-theme="tech"] :is(
  .v2-lab-heading p,.v2-lab-stage-header p,.v2-lab-live,.v2-lab-foot,
  .v2-lab-setup .config,.v2-lab-setup .config p,.v2-lab-setup .config label,
  .v2-lab-setup .config legend,.v2-lab-controls .v2-lab-variable-hint,
  .v2-lab-controls .v2-lab-range-edge,.v2-road-legend
) {color:var(--ink-2)}
:root[data-v2-theme="tech"] :is(.v2-lab-main-column,.v2-lab-controls,.v2-lab-references,.v2-lab-compare,.v2-lab-page) {
  background-color:var(--bg);color:var(--ink)
}
:root[data-v2-theme="tech"] :is(.v2-lab-main-column>:not(.v2-lab-stage),.v2-lab-controls,.v2-lab-page>.v2-lab-references,.v2-lab-page>.v2-lab-compare) {
  background:var(--surface);color:var(--ink);border-color:var(--line);
}
:root[data-v2-theme="tech"] .v2-lab-page :is(.v2-lab-step,.v2-lab-detail,.v2-lab-variable,.v2-lab-preview,.v2-lab-setup .config) {
  background:var(--surface);color:var(--ink);border-color:var(--line);
}
:root[data-v2-theme="tech"] .v2-lab-page :is(.v2-lab-segment button,.v2-lab-constraint-chip,.v2-lab-variable-state,.v2-lab-variable input,.v2-lab-variable select) {
  background:var(--surface-sunk);color:var(--ink-2);border-color:#48768b;
}
:root[data-v2-theme="tech"] .v2-lab-page .v2-lab-segment button[aria-pressed="true"] {background:var(--primary-soft);color:var(--ink)}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts dt {font-size:clamp(16px,1.45vw,22px);line-height:1.27}
:root:is([data-v2-theme="glass"],[data-v2-theme="brutal"],[data-v2-theme="editorial"],[data-v2-theme="tech"])
  .v2d-page .v2d-claim .v2d-facts dd {font-size:clamp(13px,1vw,15px);line-height:1.5}

/* Keep the tech lab and archive on one dark, readable palette. */
:root[data-v2-theme="tech"] {
  --mod-time:#e9f7fe;
  --mod-lab:#e9f7fe;
}
:root[data-v2-theme="tech"] :is(.v2-lab-page,.v2-history-surface,.dialog.history) :is(
  .v2-secondary,.v2-lab-controls-more,.v2-lab-controls-more>span,.v2-lab-live,
  .v2-lab-controls-footer,.v2-lab-segment,.v2-lab-compare-tabs,.v2-lab-result-status,
  .v2-lab-checkpoint,.v2-lab-verify,.v2-lab-archive,.v2-lab-compare-picks label,
  .history-content>.search,.history-content .record,.history-content>.empty,
  .history-content .v2-lab-archives
) {
  background:#102d41;
  color:#e9f7fe;
  border-color:#416c82;
}
:root[data-v2-theme="tech"] .v2-lab-page :is(.v2-secondary,.v2-lab-controls-more,.v2-lab-live,.v2-lab-compare-tabs button) {
  color:#baf1ff;
}
:root[data-v2-theme="tech"] .v2-lab-page :is(
  .v2-lab-compare-tabs button[aria-pressed="true"],.v2-lab-compare-picks label:has(input:checked)
) {
  background:#1a465b;
  color:#effbff;
  border-color:#4c8299;
}
:root[data-v2-theme="tech"] .v2-lab-page :is(
  .v2-lab-variable-head strong,.v2-lab-variable-head label,.v2-lab-variable h3,
  .v2-lab-controls-title svg,.v2-lab-detail h3,.v2-lab-detail h4
) {color:#e9f7fe}
:root[data-v2-theme="tech"] .v2-lab-page .v2-lab-table :is(th,td) {
  background:#102637;color:#daeef8;border-color:#34586d;
}
:root[data-v2-theme="tech"] .v2-lab-page .v2-lab-table tbody th {
  background:#153348;color:#e2f5fc;
}
:root[data-v2-theme="tech"] .v2-lab-page .v2-lab-table thead th {
  background:#1a4257;color:#e7faff;
}
:root[data-v2-theme="tech"] .v2-lab-slider input[type="range"]::-webkit-slider-runnable-track {
  background:linear-gradient(to right,#6dddf2 var(--v2-lab-fill),#365c73 var(--v2-lab-fill));
}
:root[data-v2-theme="tech"] .v2-lab-slider input[type="range"]::-moz-range-track {
  background:linear-gradient(to right,#6dddf2 var(--v2-lab-fill),#365c73 var(--v2-lab-fill));
}
:root[data-v2-theme="tech"] .dialog.history>.dialog-head h2,
:root[data-v2-theme="tech"] .history-content .record h3 {color:#e9f7fe}
:root[data-v2-theme="tech"] .river-compare-page .river-plate {opacity:1}
:root[data-v2-theme="tech"] .river-compare-page .river-plate .river-svg {opacity:.44}
:root[data-v2-theme="tech"] .river-compare-page .river-plate .river-tag.is-top {
  background:#102d41;color:#e2f6ff;border-color:#54899f;
}
:root[data-v2-theme="tech"] .river-compare-page .river-compare-body .compare>button {
  background:#1a465b;color:#e9faff;border-color:#54899f;
}

/* Chat keeps the source transcript, answer handlers, and accessibility controls. */
.pdf-chat {
  --chat-width:min(1066px, calc(100% - 56px));
  min-height:100dvh;height:100dvh;position:relative;isolation:isolate;
  display:flex;flex-direction:column;
}
.pdf-chat .chat-plate {position:absolute;inset:0;opacity:1}
.pdf-chat>.bar {
  flex:none;width:min(1332px,calc(100% - 52px));height:78px;margin:0 auto;
  padding:0;gap:16px;border-bottom:1px solid var(--line-strong);background:transparent;
}
.pdf-chat>.bar .brand {width:34px;min-width:34px;padding:0;flex:none;border:0;justify-content:center;color:var(--primary-deep)}
.pdf-chat>.bar .brand :is(svg,span) {display:none}
.pdf-chat>.bar .brand::before {content:"←";font:500 28px/1 var(--font-sans)}
.pdf-chat>.bar .module {
  padding:0;margin:0;color:var(--primary-deep);font:750 clamp(20px,1.7vw,30px)/1.2 var(--font-sans);
  white-space:nowrap;background:transparent;border:0
}
.pdf-chat .steps {position:static;margin:0 auto;align-self:flex-end;opacity:.94;max-width:calc(100% - 44px)}
.pdf-chat .bar-mid {gap:12px;margin-left:auto;flex:1 1 auto;min-width:0}
.pdf-chat .meter {gap:11px;flex-direction:row;color:var(--ink);font-size:clamp(13px,1.3vw,21px);white-space:nowrap}
.pdf-chat .meter .track {height:7px;width:clamp(50px,11vw,170px);background:var(--line);mask-image:none}
.pdf-chat .meter .track i {background:var(--primary);border-radius:5px}
.pdf-chat .gaps {font-size:13px;gap:0}
.pdf-chat .gaps>:not(button) {display:none}
.pdf-chat .gaps button {margin:0;color:var(--primary-deep)}
.pdf-chat .chat-scroll {min-height:0;flex:1 1 auto;overflow-y:auto;position:relative;z-index:1;mask-image:none}
.pdf-chat .thread,.pdf-chat .dock-inner {width:var(--chat-width);margin:0 auto}
.pdf-chat .thread {
  padding:clamp(34px,12.5vh,118px) 0 30px;
  display:flex;flex-direction:column;gap:clamp(19px,4.2vh,39px);
}
.pdf-chat .msg.ai {
  position:relative;display:block;align-self:flex-start;max-width:calc(100% - 62px);margin:0 0 0 62px;
  padding:12px 20px;background:color-mix(in srgb,var(--surface-solid) 72%,transparent);
  border:1px solid var(--line-strong);border-radius:var(--r-md);box-shadow:none;
}
.pdf-chat .msg.ai .ai-mark {
  display:grid;place-items:center;position:absolute;left:-62px;top:9px;width:44px;height:42px;
  padding:0;border:0;background:transparent;color:var(--primary-deep);
}
.pdf-chat .msg.ai .ai-mark svg {width:34px;height:34px;color:inherit}
.pdf-chat .msg.ai .ai-text,.pdf-chat .msg.user .bubble {font:500 clamp(15px,1.48vw,23px)/1.48 var(--font-sans);color:var(--ink)}
.pdf-chat .msg.ai.live {padding:0 7px 0;background:none;border-color:transparent}
.pdf-chat .msg.ai.live .ai-mark {top:0}
.pdf-chat .msg.ai.live .ai-text {font:750 clamp(19px,2vw,30px)/1.34 var(--font-sans);color:var(--primary-deep)}
.pdf-chat .msg.ai .why {color:var(--muted);font-size:13px}
.pdf-chat .msg.user {padding:0;display:flex;width:100%;justify-content:flex-end}
.pdf-chat .msg.user .bubble {padding:13px 22px;max-width:min(84%,780px);border:0;border-radius:var(--r-md);background:var(--bubble-user);box-shadow:none}
.pdf-chat .thread>.pills {display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;margin:-14px 0 0 62px;padding:0}
.pdf-chat .pills .pill {
  flex:1 1 120px;max-width:305px;min-width:0;min-height:48px;white-space:normal;
  padding:7px 14px;border-radius:var(--r-md);font:700 clamp(15px,1.5vw,22px)/1.35 var(--font-sans);
  color:var(--primary-deep);background:color-mix(in srgb,var(--surface-solid) 64%,transparent);
  border:1px solid var(--line-strong);box-shadow:none
}
.pdf-chat .pills .pill:hover,.pdf-chat .pills .pill[aria-pressed="true"] {background:var(--primary-soft);border-color:var(--primary-mid)}
.pdf-chat .pills .pill-own {flex:0 1 auto;font-size:14px;min-height:42px}
.pdf-chat .pills-note {margin:-12px 0 0 62px;color:var(--muted);font-size:13px}
.pdf-chat .dock {flex:none;padding:12px 0 clamp(15px,4vh,38px);position:relative;z-index:2;background:none}
.pdf-chat .chat-composer {display:flex;min-height:62px;margin:0;border:1px solid var(--line-strong);border-radius:var(--r-md);background:color-mix(in srgb,var(--surface-solid) 88%,transparent);box-shadow:none;padding:7px 9px 7px 17px}
.pdf-chat .chat-composer textarea {padding:9px 3px;font:500 clamp(15px,1.35vw,22px)/1.35 var(--font-sans);color:var(--ink)}
.pdf-chat .chat-composer .send {width:45px;height:45px;min-height:45px;color:var(--primary-ink);background:var(--primary);border-radius:9px}
.pdf-chat .chat-composer .send:disabled {opacity:.70;background:var(--primary)}
.pdf-chat .board-hint {background:var(--surface-solid);border:1px solid var(--line);border-radius:var(--r-md);color:var(--ink);margin-bottom:12px}
.pdf-chat .bar .profile-btn,.pdf-chat .bar .time-btn {color:var(--primary-deep)}
:root[data-v2-theme="brutal"] .pdf-chat :is(.msg.ai,.bubble,.pill,.chat-composer,.send) {border-radius:0}
:root[data-v2-theme="brutal"] .pdf-chat :is(.chat-composer,.pill) {border:2px solid #17150e}
:root[data-v2-theme="editorial"] .pdf-chat :is(.msg.ai,.bubble,.pill,.chat-composer,.send) {border-radius:0}
:root:is([data-v2-theme="tech"],[data-v2-theme="editorial"],[data-v2-theme="brutal"]) .pdf-chat .chat-plate img {opacity:.19}
@media(max-width:700px) {
 .pdf-chat {--chat-width:calc(100% - 30px)}
 .pdf-chat>.bar {width:calc(100% - 28px);gap:9px;height:58px}
 .pdf-chat .bar-mid {gap:5px}
 .pdf-chat .meter {font-size:12px}
 .pdf-chat .meter .track {width:45px!important}
 .pdf-chat .bar .time-btn:not(.profile-btn),.pdf-chat .bar .env {display:none}
 .pdf-chat .bar .profile-btn {min-width:28px;padding-inline:4px}
 .pdf-chat .bar .profile-btn span {display:none}
 .pdf-chat .gaps button {font-size:11px}
 .pdf-chat .thread {padding-top:32px}
 .pdf-chat .msg.ai {margin-left:35px;max-width:calc(100% - 35px);padding:8px 11px}
 .pdf-chat .msg.ai .ai-mark {left:-35px;width:26px;height:28px}
 .pdf-chat .msg.ai .ai-mark svg {width:25px;height:25px}
 .pdf-chat .thread>.pills,.pdf-chat .pills-note {margin-left:35px}
}

/* The non-scenic routes share interactions and use independent diagram geometries. */
.v2-lab-stage:has(.themed-fork) {
  min-height:0;
  pointer-events:auto;
}
.v2-lab-stage:has(.themed-fork) .v2-lab-stage-note {
  position:static!important;
  max-width:none;
  margin:8px 0 0;
  padding:8px 12px!important;
  background:var(--surface-sunk);
  color:var(--ink-2);
  border-radius:var(--theme-radius);
}
.themed-fork {
  position:relative;
  margin:12px 0 0;
  min-width:0;
}
.fork-diagram-viewport {
  overflow:auto hidden;
  border:1px solid var(--line);
  border-radius:var(--theme-radius);
  scrollbar-color:var(--primary-mid) var(--surface-sunk);
}
.fork-diagram {
  isolation:isolate;
  width:100%;
  min-width:590px;
  aspect-ratio:960/460;
  position:relative;
  background:var(--surface);
}
.fork-diagram-svg {width:100%;height:100%;position:absolute;inset:0;z-index:0;pointer-events:none}
.fork-diagram-svg path {fill:none;vector-effect:non-scaling-stroke}
.fork-track-shadow,.fork-track-shine {stroke:none}
.fork-track-rail {stroke:var(--fork-rail);stroke-width:var(--fork-rail-width)}
.fork-track-core {stroke:var(--fork-core);stroke-width:var(--fork-core-width)}
.fork-diagram-svg .fork-track-target {stroke:transparent;stroke-width:22;pointer-events:stroke;cursor:pointer}
.fork-traces {stroke:var(--line-strong);stroke-width:1;opacity:.42}
.fork-junction,.fork-preview-dot {fill:var(--surface);stroke:var(--fork-rail);stroke-width:3}
.fork-hub,.themed-fork .fork-sign,.themed-fork .fork-node {
  position:absolute;
  transform:translate(-50%,-50%);
  translate:none;
  z-index:2;
  pointer-events:auto;
}
.fork-hub {
  padding:6px 9px;
  font-size:clamp(11px,1.04vw,15px);
  font-weight:700;
  white-space:nowrap;
  background:var(--surface-solid);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--theme-radius);
}
.themed-fork .fork-sign {
  display:grid;
  min-width:0;
  width:20%;
  height:auto;
  min-height:40px;
  max-width:228px;
  gap:3px;
  text-align:left;
  justify-content:stretch;
  padding:6px 9px;
  background:var(--surface-solid);
  color:var(--ink);
  border:1px solid var(--line-strong);
  border-radius:var(--theme-radius);
  box-shadow:none;
}
.themed-fork .fork-sign strong {
  display:block;
  font-size:clamp(12px,1.05vw,15px);
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}
.fork-route-id {font-size:11px;line-height:1.15;color:var(--muted);font-weight:700}
.themed-fork .fork-node {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  min-height:30px;
  padding:0;
  margin:0;
  border:1px solid var(--line-strong);
  border-radius:50%;
  color:var(--ink);
  background:var(--surface-solid);
  box-shadow:none;
}
.themed-fork :is(.fork-node,.fork-sign)[aria-pressed="true"] {
  border-color:var(--fork-selected-border,var(--primary-deep));
  background:var(--fork-selected,var(--primary-soft));
}
.themed-fork .fork-node[aria-pressed="true"] {
  color:var(--primary-ink);
  background:var(--primary);
  box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--fork-selected-border,var(--primary-deep));
}
.themed-fork .fork-node[aria-pressed="false"]:hover {background:var(--surface-hover)}
.fork-diagram .is-on .fork-track-core {stroke:var(--fork-selected-border,var(--primary))}
.fork-preview {align-self:stretch;display:grid;align-items:center;min-height:218px;overflow:hidden}
.fork-preview .fork-diagram {min-width:0;min-height:0}

[data-diagram="glass"] {
  --fork-rail:#a1c8d9;--fork-rail-width:21;--fork-core:var(--fork-ribbon);--fork-core-width:17;
  --fork-selected-border:#187988;
  background:radial-gradient(ellipse at 16% 11%,#f9fdff,transparent 52%),linear-gradient(155deg,#e1eff9,#b6d5e6 68%,#e8f5fb);
}
[data-diagram="glass"] .fork-track-shadow {stroke:#426c89;stroke-width:27;opacity:.26;filter:blur(3px);transform:translateY(5px)}
[data-diagram="glass"] :is(.fork-track-rail,.fork-track-core,.fork-track-shine) {stroke-linecap:round}
[data-diagram="glass"] .fork-track-shine {stroke:#fff;stroke-width:2;opacity:.88}
[data-diagram="glass"] :is(.fork-hub,.fork-sign,.fork-node) {
  box-shadow:inset 0 1px 2px #fff,0 3px 9px #52829d42;
  background:linear-gradient(145deg,#f9fdfff7,#d8eaf6f5);
  border-color:#83a9bb;
}
[data-diagram="glass"] .fork-sign[aria-pressed="true"] {background:#c8eff4}
:root[data-v2-theme="glass"] .v2-lab-setup {background:linear-gradient(135deg,#f2fbff,#e0f0f7);border:1px solid #b7d5e2}
:root[data-v2-theme="glass"] .fork-preview {background:#dcecf7;border-color:#bad9e7}

[data-diagram="brutal"] {
  --fork-rail:#16150f;--fork-rail-width:15;--fork-core:#ffe21a;--fork-core-width:9;
  --fork-selected-border:#16150f;--fork-selected:#ffe21a;
  background-color:#fff6df;
  background-image:radial-gradient(#1a190f28 .65px,transparent .7px);
  background-size:8px 8px;
}
[data-diagram="brutal"] .fork-track-shine {stroke:#16150f;stroke-width:1.5;stroke-dasharray:3 7}
[data-diagram="brutal"] .is-on .fork-track-core {stroke:#ffbf00}
[data-diagram="brutal"] .fork-traces {stroke-width:3;opacity:1}
[data-diagram="brutal"] :is(.fork-hub,.fork-sign,.fork-node) {
  border:2px solid #15140d;
  border-radius:0;
  box-shadow:3px 3px #15140d;
}
[data-diagram="brutal"] .fork-hub {background:#17150e;color:#fff9e9}
[data-diagram="brutal"] .fork-sign {text-align:center}
:root[data-v2-theme="brutal"] .fork-diagram-viewport {border:2px solid #15140d;box-shadow:4px 4px #15140d}
:root[data-v2-theme="brutal"] .fork-preview {background:#fff6df}
:root[data-v2-theme="brutal"] .v2-lab-setup .config button {border-width:2px;border-radius:0}

[data-diagram="editorial"] {
  --fork-rail:#656565;--fork-rail-width:1.25;--fork-core:none;--fork-core-width:0;
  --fork-selected-border:#181818;--fork-selected:#f0f0f0;
  background:repeating-linear-gradient(0deg,transparent 0 29px,#1515150a 30px 31px),#fff;
}
[data-diagram="editorial"] .is-on .fork-track-core {stroke-width:2}
[data-diagram="editorial"] .fork-junction {fill:#1c1c1c;stroke-width:0}
[data-diagram="editorial"] .fork-hub {
  border:0;border-radius:0;
  color:#fff;background:#161616;
  font-family:var(--theme-heading);
}
[data-diagram="editorial"] .fork-sign {
  border:0;border-bottom:1px solid #888;border-radius:0;
  font-family:var(--theme-heading);
  padding-inline:6px;
}
[data-diagram="editorial"] .fork-node {border-radius:0;border-width:1px}
:root[data-v2-theme="editorial"] .fork-preview {border-width:1px 0;background:white}
:root[data-v2-theme="editorial"] .v2-lab-setup {background:#fff;border:1px solid #bdbdbd;border-radius:0}

[data-diagram="tech"] {
  --fork-rail:#247685;--fork-rail-width:7;--fork-core:#73e6f6;--fork-core-width:1.8;
  --fork-selected-border:#88efff;--fork-selected:#185165;
  background-color:#081a2a;
  background-image:radial-gradient(ellipse at 19% 51%,#16627765,transparent 43%),linear-gradient(0deg,#6fcbf021 1px,transparent 1px),linear-gradient(90deg,#6fcbf021 1px,transparent 1px);
  background-size:auto,26px 26px,26px 26px;
}
[data-diagram="tech"] .fork-track-shadow {stroke:#44dcfc;stroke-width:11;filter:blur(6px);opacity:.24}
[data-diagram="tech"] .fork-track-shine {stroke:#cefbff;stroke-width:2;stroke-dasharray:2 20;opacity:.55}
[data-diagram="tech"] .is-on .fork-track-core {stroke-width:3;filter:drop-shadow(0 0 4px #32d9fb)}
[data-diagram="tech"] .fork-traces {stroke:#61cce6;opacity:.42}
[data-diagram="tech"] .fork-junction {fill:#0a2b39;stroke:#81edff;filter:drop-shadow(0 0 5px #32d9fb)}
[data-diagram="tech"] :is(.fork-hub,.fork-sign,.fork-node) {background:#102a3c;color:#edfaff;border-color:#4a96af}
[data-diagram="tech"] .fork-hub {box-shadow:0 0 14px #46bed66e}
[data-diagram="tech"] .fork-sign {border-radius:5px;border-left:3px solid #6bdef2}
[data-diagram="tech"] .fork-node {border-radius:5px}
[data-diagram="tech"] .fork-route-id {color:#9ce6f5}
:root[data-v2-theme="tech"] :is(.v2-lab-setup,.fork-preview) {background:#102a3c;border:1px solid #3b7894}

@media(max-width:760px) {
  .fork-preview {min-height:156px}
  .fork-preview .fork-diagram {max-height:218px}
  .fork-diagram-viewport:not(.fork-preview) {max-width:100%}
}

:root{--archive-scene:url("./2275cc63b03fced00d18.webp")}