/* The coachbuilder's optical and mechanical studies. */
:is(#theater #stage[data-scene="valence"],html[data-ver-cursor="valence"]) .vb-instrument {
  --beam-paper:#242321;background:linear-gradient(148deg,#3b3833,#242321 39%,#1b1b1b 78%,#37342e);
  border:1px solid #7a7266;border-radius:11px;box-shadow:inset 0 0 0 3px #24231f,inset 0 0 0 4px #b5a78830,0 13px 25px -20px #000;
}
:is(#theater #stage[data-scene="valence"],html[data-ver-cursor="valence"]) .vb-head {
  background:linear-gradient(96deg,#252320,#37332f 50%,#23211f);color:#f4e6ce;
  margin:5px 5px 0;border-radius:6px 6px 0 0;
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-screen {
  aspect-ratio:2.1; background:#171715;
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-window .vb-screen img {
  object-fit:cover; object-position:54% 50%;
}
:is(#theater #stage[data-scene=valence],html[data-ver-cursor=valence]) .vb-reading {
  display:grid;grid-template-columns:minmax(0,1fr);align-items:center;
  min-width:0;margin:14px 0 0;overflow:hidden;
  padding:0;border:1px solid #575048;border-radius:6px;
  background:linear-gradient(120deg,#2b2824,#201f1c);
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-reading .vb-optic {
  display:block;width:100%;height:auto;max-width:none;max-height:none;aspect-ratio:3/2;object-fit:contain;
  margin:0;border:0;border-radius:0;box-shadow:none;
}
.vb-caption {display:grid;grid-template-columns:minmax(0,1fr);min-width:0;padding:clamp(13px,2.5cqi,22px);}
/* Enough room to show the whole bulb alongside the notes while the road sits above. */
@container beam-bench (min-width:480px) and (max-width:659.98px) {
  :is(#theater #stage[data-scene=valence],html[data-ver-cursor=valence]) .vb-reading {
    grid-template-columns:minmax(0,1.24fr) minmax(0,1fr);
  }
}
@container beam-bench (min-width:660px) {
  :is(#theater #stage[data-scene=valence],html[data-ver-cursor=valence]) .vb-reading {margin:0;}
}
/* Reserve exactly the space each caption needs at the current text size. */
.vb-caption :is(.vb-title-size,.vb-note-size) {visibility:hidden;pointer-events:none;user-select:none}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-caption :is(.vb-state,.vb-title-size) {
  grid-area:1/1;
  font:400 clamp(18px,3.8cqi,23px)/1.15 Georgia,serif;letter-spacing:-.025em;color:#f2e9dc;
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-caption :is(.vb-note,.vb-note-size,.vb-against) {
  grid-area:2/1;max-width:49ch;min-height:44px;margin:4px 0 0;letter-spacing:0;
  color:#d1c9bb;font:400 clamp(13px,2cqi,14px)/1.42 Arial,sans-serif;
}
.vb-caption .vb-against { gap:3px; flex-direction:column; align-items:flex-start; justify-content:center; }
.vb-instrument .vb-caption .vb-against[hidden] {display:flex!important;visibility:hidden}
.vb-ref-title { font:600 10px/1.3 Arial,sans-serif; letter-spacing:.12em; text-transform:uppercase; color:#d2c4a8; }
/* Two backlit road slides share a recessed metal carrier beneath the specimen. */
.vb-reference-options {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px;
  width:min(100%,258px); box-sizing:border-box; padding:3px;
  border-radius:6px; background:#141513; box-shadow:inset 0 1px 3px #000b,0 1px #afa18b52;
}
.vb-reference-options label {
  position:relative; display:block; min-width:0; cursor:pointer;
}
.vb-reference-options label[hidden] {display:none;}
.vb-reference-options input {
  position:absolute; inset:0; z-index:1; width:100%; height:100%; opacity:0; margin:0; cursor:pointer;
}
.vb-slide {
  position:relative; display:grid; grid-template-rows:37px 19px; gap:2px; padding:3px 3px 1px;
  overflow:hidden; border:1px solid; border-color:#9a9688 #5d5c54 #383a35 #726f63; border-radius:4px;
  background:linear-gradient(165deg,#605e5455,#232621b8),url("../surfaces/gunmetal.webp") center/180px;
  box-shadow:inset 0 1px #e1dbbf44,0 2px 2px #000a; color:#f1ebde;
}
.vb-reference-options .vb-slide img {
  display:block; width:100%; height:100%; object-fit:cover; object-position:50% 58%;
  border-radius:2px; box-shadow:0 0 0 1px #121411;
}
.vb-slide b {
  display:flex; align-items:center; justify-content:center; gap:6px;
  color:inherit; font:650 11px/1 system-ui,sans-serif; letter-spacing:.055em; text-shadow:0 1px #10110e;
}
.vb-slide b::before {
  content:""; width:6px; height:6px; box-sizing:border-box; border:1px solid #9a907c;
  border-radius:50%; background:#231f1a; box-shadow:0 1px #d2c8ab38;
}
.vb-reference-options input:checked + .vb-slide {
  transform:translateY(1px); border-color:#ccab72 #ac8d5e #91764e;
  box-shadow:inset 0 1px 2px #0008,0 -1px 2px #000a; color:#ffdc9c;
}
.vb-reference-options input:checked + .vb-slide b::before {
  background:radial-gradient(circle at 38% 32%,#fff7d8,#ffc462 50%,#b86219);
  border-color:#dfad67; box-shadow:0 0 5px #e9953b99;
}
.vb-reference-options input:focus-visible + .vb-slide {outline:2px solid #ffe4b0;outline-offset:2px;}
@media (hover:hover) {
  .vb-reference-options label:hover .vb-slide {border-color:#c9bda5;}
}
@media (prefers-reduced-motion:no-preference) {
  .vb-slide {transition:transform 100ms ease-out,border-color 100ms ease-out;}
}
@container beam-bench (max-width:365px) {
  :is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-screen {aspect-ratio:1.8}
}
html[data-ver-cursor=valence] #series .spec-strip {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:5px;
  border:1px solid #766e60;border-radius:8px;background:linear-gradient(118deg,#383530,#22211f 58%,#33302b);
}
html[data-ver-cursor=valence] #series .spec-strip>div {
  display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr;gap:4px;
  margin:0;padding:clamp(9px,1.45vw,21px);border:0;border-left:1px solid #77706760;
}
html[data-ver-cursor=valence] #series .spec-strip>div:first-child {border:0}
html[data-ver-cursor=valence] #series .spec-strip>div::before {
  content:"";display:block;width:100%;max-width:100%;aspect-ratio:2;height:auto;margin:0 0 7px;
  border:1px solid #50483f;border-radius:4px;background:var(--component) center/cover no-repeat;
}
html[data-ver-cursor=valence] #series .spec-strip>div:nth-child(1){--component:url("folio-pistons.webp")}
html[data-ver-cursor=valence] #series .spec-strip>div:nth-child(2){--component:url("folio-throttle.webp")}
html[data-ver-cursor=valence] #series .spec-strip>div:nth-child(3){--component:url("folio-gears.webp")}
html[data-ver-cursor=valence] #series .spec-strip>div:nth-child(4){--component:url("folio-differential.webp")}
html[data-ver-cursor=valence] #series .spec-strip small {color:#cfc8b8}
html[data-ver-cursor=valence] .hero .inspection-controls {gap:3px;align-items:stretch;padding:4px;background:#1b1918ed;border:1px solid #8e7d65;border-radius:7px}
html[data-ver-cursor=valence] .hero .inspection-controls>span {align-self:center;padding:0 6px}
html[data-ver-cursor=valence] .hero .inspection-controls button {display:grid;justify-items:center;align-content:center;gap:0;min-width:58px;min-height:48px;border:1px solid transparent;border-radius:4px;padding:1px 7px 5px}
html[data-ver-cursor=valence] .hero .inspection-controls button::before {content:"";display:block;width:47px;height:24px;border-radius:3px;background:var(--camera-photo) center/cover no-repeat}
html[data-ver-cursor=valence] .hero .inspection-controls [data-lamp="ambient"]{--camera-photo:url("inspection-exterior.webp")}
html[data-ver-cursor=valence] .hero .inspection-controls [data-lamp="body"]{--camera-photo:url("inspection-body.webp")}
html[data-ver-cursor=valence] .hero .inspection-controls [data-lamp="wheel"]{--camera-photo:url("inspection-wheel.webp")}
html[data-ver-cursor=valence] .hero .inspection-controls button[aria-pressed=true]{background:#4b4031;color:#fff1ce;border-color:#9e8b68}
html[data-ver-cursor=valence] #atelier .atelier-image {box-sizing:border-box;overflow:hidden;border:1px solid #696158;border-radius:5px;background:#23221f;box-shadow:0 12px 32px -21px black}
html[data-ver-cursor=valence] #atelier .atelier-image img {width:100%;height:100%;object-fit:cover;mask:none}
@media(max-width:700px){
  html[data-ver-cursor=valence] #series .spec-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-ver-cursor=valence] #series .spec-strip>div{gap:2px;padding:9px}
  html[data-ver-cursor=valence] #series .spec-strip>div:nth-child(3){border-left:0}
  html[data-ver-cursor=valence] .hero .inspection-controls {max-width:100%;flex-wrap:wrap}
}
@media(max-width:375px){html[data-ver-cursor=valence] .hero .inspection-controls>span{width:100%;padding:2px;text-align:center}}

/* The engineering selector uses details from the schematic on its facing page. */
html[data-ver-cursor=valence] #coachworks .coach-options {
 display:flex;gap:5px;flex-wrap:wrap;align-items:stretch;
}
html[data-ver-cursor=valence] #coachworks .coach-options button {
 display:grid;grid-template-rows:32px auto;place-items:center;gap:3px;min-width:78px;min-height:62px;padding:6px 10px;
 border:1px solid #736855;border-radius:4px;background:#242320;color:#e8dfd0;
}
html[data-ver-cursor=valence] #coachworks .coach-options button[aria-pressed=true] {border-color:#c6aa83;background:#3c342a;color:#fff2d8}
html[data-ver-cursor=valence] #coachworks .coach-options button>span {display:none}
html[data-ver-cursor=valence] #coachworks .coach-options button::before {content:"";display:block;width:65px;max-width:100%;height:32px;border-radius:3px;background:var(--system) center/cover no-repeat}
[data-ver-cursor=valence] [data-system="engine"]{--system:url("folio-throttle.webp")}
[data-ver-cursor=valence] [data-system="shift"]{--system:url("folio-gears.webp")}
[data-ver-cursor=valence] [data-system="axle"]{--system:url("folio-differential.webp")}
html[data-ver-cursor=valence] #build .view-controls button[data-view-action]::before {
 content:"";display:inline-block;vertical-align:middle;width:38px;height:22px;margin-right:5px;
 border-radius:3px;background:var(--view) center/cover no-repeat;
}
html[data-ver-cursor=valence] #build [data-view-action="exterior"]{--view:url("inspection-exterior.webp")}
html[data-ver-cursor=valence] #build [data-view-action="cabin"]{--view:url("inspection-cabin.webp")}
html[data-ver-cursor=valence] #build .garage {border-radius:8px;background:linear-gradient(120deg,#242321,#171817);border:1px solid #534b41;padding:clamp(16px,3.4vw,48px)}
html[data-ver-cursor=valence] #build .bay-actions{display:flex;flex-wrap:wrap;gap:4px}
html[data-ver-cursor=valence] #build .bay-actions button {
 display:inline-flex;align-items:center;gap:5px;min-height:44px;padding:6px 8px;color:#e5dfd2;border:1px solid #5c574b;border-radius:4px;background:#282723;
}
html[data-ver-cursor=valence] #build .bay-actions button:disabled{opacity:.52}
html[data-ver-cursor=valence] #build .bay-actions button::before{content:"";width:33px;height:20px;background:var(--bay) center/contain no-repeat}
[data-ver-cursor=valence] [data-slot-action="park"]{--bay:url("garage-park.svg")}
[data-ver-cursor=valence] [data-slot-action="recall"]{--bay:url("garage-recall.svg")}
[data-ver-cursor=valence] [data-slot-action="clear"]{--bay:url("garage-clear.svg")}
html[data-ver-cursor=valence] #drive .road-notes>div {position:relative;min-width:0;padding-left:44px}
html[data-ver-cursor=valence] #drive .road-notes>div::before{content:"";position:absolute;left:0;top:0;width:38px;height:30px;background:var(--note) center/contain no-repeat}
html[data-ver-cursor=valence] #drive .road-notes>div:first-child{--note:url("corner-line.svg")}
html[data-ver-cursor=valence] #drive .road-notes>div:nth-child(2){--note:url("pedal.svg")}
html[data-ver-cursor=valence] #atelier .atelier-content summary {display:flex;align-items:center;gap:10px;min-height:51px}
html[data-ver-cursor=valence] #atelier .atelier-content summary::before {content:"";flex:none;width:42px;height:27px;background:var(--folder) center/contain no-repeat}
html[data-ver-cursor=valence] #atelier details:nth-of-type(1){--folder:url("chassis-rails.svg")}
html[data-ver-cursor=valence] #atelier details:nth-of-type(2){--folder:url("stitch.svg")}
html[data-ver-cursor=valence] #atelier details:nth-of-type(3){--folder:url("build-file.svg")}
#theater #stage[data-scene=valence] .wk-valence .va-stage h2 em{color:#d9b795}
#theater #stage[data-scene=valence] .vb-heading .vb-mark, html[data-ver-cursor=valence] .vb-heading .vb-mark{width:34px;height:30px;object-fit:contain}
@media(max-width:430px){
 html[data-ver-cursor=valence] #build .garage {padding:13px}
 html[data-ver-cursor=valence] #coachworks .coach-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 html[data-ver-cursor=valence] #coachworks .coach-options button{min-width:0;padding-inline:4px}
}

.vb-reading button.vb-optic-open {
  display:block; position:relative; align-self:center; width:100%; min-width:0; margin:0; padding:0;
  border:0; border-radius:4px; background:transparent; box-shadow:none; cursor:zoom-in;
}
/* Jeweller's loupe mounted over the specimen photograph. */
.vb-optic-open .vb-enlarge {
  position:absolute; right:5px; bottom:5px; display:flex; gap:3px; align-items:center;
  padding:1px 7px 1px 2px; border:1px solid #a89777; border-radius:5px;
  background:linear-gradient(#353431ef,#171917f5); color:#fff1d6;
  box-shadow:0 2px 4px #0009; font:600 11px/1.1 system-ui,sans-serif;
}
.vb-enlarge::before {
  content:""; width:25px; height:25px; background:url("inspection-loupe.webp") center/contain no-repeat;
}
.vb-optic-open:is(:hover,:focus-visible) .vb-enlarge {border-color:#efc990;color:#fff8e9;}
.vb-instrument dialog.vb-optic-viewer {
  box-sizing:border-box; position:fixed; inset:0; width:min(722px,calc(100vw - 20px),calc(150dvh - 138px));
  max-width:100%; max-height:calc(100dvh - 16px); margin:auto; padding:0; overflow:auto;
  border:1px solid #73695a; border-radius:8px; background:#211f1c; color:#f4eadb;
  box-shadow:0 18px 74px #000b; overscroll-behavior:contain; text-align:left;
}
.vb-optic-viewer::backdrop {background:#090908df;}
.vb-optic-viewer:not([open]) {display:none;}
.vb-viewer-bar {
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:3px 8px 3px 15px;
  background:#26231f;
}
.vb-viewer-bar strong {font:400 clamp(18px,3vw,23px)/1.15 Georgia,serif;color:#f5ecdc;}
.vb-viewer-bar form {margin:0;padding:0;}
.vb-viewer-bar button {
  min-width:44px; min-height:44px; margin:0; padding:0 8px; border:0; border-radius:3px;
  color:#e8d8bd; background:transparent; box-shadow:none; font:600 14px/1 Arial,sans-serif; cursor:pointer;
}
.vb-viewer-bar button:is(:hover,:focus-visible) {color:white;background:#40392f;}
.vb-optic-viewer img.vb-viewer-photo {
  display:block; width:100%; height:auto; max-width:none; aspect-ratio:3/2; object-fit:contain; margin:0; border:0;
}
.vb-optic-viewer p.vb-viewer-note {
  margin:0; padding:12px 15px; max-width:68ch; color:#e2d9cc; font:400 15px/1.45 Arial,sans-serif;
}

/* Individual rocker caps move inside fixed nickel bezels set into the walnut. */
.vb-instrument .vb-dial-bank {
  justify-content:center; gap:clamp(8px,2cqi,22px); padding:7px clamp(8px,2cqi,18px);
  border:1px solid #65523e; border-radius:8px;
  background:linear-gradient(180deg,#26160b24,transparent 25%,#22130826 72%,#160b0780),
    url("dash-walnut.webp") center 51%/cover,#65381b;
  box-shadow:inset 0 1px #f4d4a380,inset 0 -2px #21130cc9,0 1px 2px #0009;
}
.vb-instrument .vb-dial-bank .vb-switches {flex:0 1 370px; min-width:0;}
.vb-instrument .vb-switches .va-caption {
  display:block; color:#fff1cf; text-shadow:0 1px 2px #130a03,0 0 4px #221005;
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-presets {
  gap:3px; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-presets :is(label span,button,input:checked + span,button[aria-pressed],label:active span,label:hover input:not(:checked) + span,button[aria-pressed=false]:hover) {
  display:block; height:clamp(46px,8cqi,54px); min-height:44px; padding:0; border:0; border-radius:7px;
  transform:none; box-shadow:none; color:#f4ecdc; background: url("dash-rocker.webp") center/100% 100% no-repeat;
  filter:drop-shadow(0 2px 1px #1b100c);
}
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-presets :is(label span,button)::before,
:is(#theater #stage .wk-valence,.vm-lamp-bench) .vb-presets :is(label span,button)::after {content:none;}
.vb-key-face {
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:0; padding:0 0 3px; box-sizing:border-box; border-radius:inherit;
  clip-path:inset(12% 4.5% 12% round 4px);
  background:url("dash-rocker.webp") center/100% 100% no-repeat;
  color:inherit; font:600 clamp(11px,2.15cqi,14px)/1.1 system-ui,sans-serif;
  letter-spacing:.01em; text-shadow:0 1px 1px #0b0907;
}
.vb-key-face i {width:22px;height:14px;background:currentColor;mask:var(--lamp-symbol) center/contain no-repeat;}
.vb-key-face::after {
  content:"";position:absolute;top:22%;right:12%;width:5px;height:5px;border:1px solid #241c11;
  border-radius:50%;background:var(--pilot);box-shadow:0 1px #dec59b77,var(--halo,0 0 transparent);
}
.vb-presets :is(input:checked + span,button[aria-pressed=true]) .vb-key-face {
  transform:perspective(140px) translateY(1px) rotateX(-11deg);color:#ffda98;
}
.vb-presets :is(label:active,button:active) .vb-key-face {transform:perspective(140px) translateY(2px) rotateX(-17deg);}
@media (prefers-reduced-motion:no-preference) {
  .vb-key-face {transition:transform 120ms ease-out,color 120ms ease-out;}
}
:is(#theater #stage[data-scene=valence],html[data-ver-cursor=valence]) .vb-reading {
  container:optic-plate / inline-size; border:1px solid #645b4b; border-radius:7px;
  background:linear-gradient(122deg,#302d27,#222420 58%,#191c1a);
}
.vb-reading .vb-optic-open {overflow:hidden;}
.vb-reading .vb-caption {align-content:center;}
.vb-reading figure.vb-projection {
  position:static; display:grid; grid-area:3/1; width:min(100%,210px); min-width:0;
  height:auto; margin:7px 0 0; padding:3px; box-sizing:border-box; overflow:hidden;
  background:#151715; border:1px solid #675e50; border-radius:4px; box-shadow:inset 0 1px 3px #0009;
}
.vb-reading .vb-projection img {
  display:block; width:100%; height:auto; max-width:none; aspect-ratio:3/1; object-fit:cover; margin:0;
}
.vb-reading .vb-projection figcaption {
  display:block; position:static; margin:0; padding:3px 1px 1px; color:#dfceaf; background:transparent;
  font:600 9px/1.2 system-ui,sans-serif; letter-spacing:.10em; text-align:center; text-transform:uppercase;
}
@container optic-plate (min-width:550px) {
  .vb-reading .vb-caption {grid-template-columns:minmax(0,1fr) minmax(95px,23%);column-gap:12px;}
  .vb-reading figure.vb-projection {grid-area:1/2/3/3;align-self:center;margin:0;}
}
@media (forced-colors:active) {
  .vb-presets .vb-key-face i {background:ButtonText;}
  .vb-reference-options input:checked + span,.vb-presets :is(input:checked + span,button[aria-pressed=true]) {outline:2px solid Highlight;outline-offset:-3px;}
}
