/* ===== shared by quettabench.css and efficiency.css (one source, copied into both) =====
   The bench app in the illustrated-stack language: flat lilac/indigo panels with chamfered corners drawn in 1px ink lines,
   mono HUD labels, tick scales, and pink neon kept for the one thing that matters on each panel. */

/* ---------- palette: qf-bench.css sets its own tokens on html.qb, which outranks skin.css's :root, so restate them here ---------- */
html.qb, html.qb[data-theme="light"] {
  --qf-paper: #f5f1fc; --qf-paper-2: #ebe4f8; --qf-panel: #fcfaff; --qf-ink: #1d1640; --qf-ink-2: #3d3570; --qf-ink-3: #6f669e;
  --qf-line: rgba(45, 30, 110, .14); --qf-line-2: rgba(45, 30, 110, .3); --qf-grid: rgba(45, 30, 110, .05);
  --qf-signal: #ff5aa8; --qf-signal-ink: #c8166a; --qf-signal-soft: #ffc6e2; --qf-signal-wash: #fbe3f1; --qf-on-signal: #1d1640;
  --qf-band: #1c1645; --qf-on-band: #ece8ff; --qf-on-band-2: rgba(236, 232, 255, .62);
  --qf-teal: #00a89a; --qf-amber: #e8902a; --qf-peri: #8c95f0;
  --qf-sky: linear-gradient(180deg, #dfe2fd 0%, #ece3fb 380px, var(--qf-paper) 760px);
  --qf-field: var(--qf-signal-wash); --qf-field-2: var(--qf-signal-soft); --qf-cta-bg: var(--qf-ink); --qf-cta-fg: var(--qf-panel);
  --qfx-well: #f0eafb; --qfx-hover: rgba(140, 149, 240, .1); --qfx-tick: rgba(45, 30, 110, .26);
  --grid: rgba(45, 30, 110, .07); --gold: var(--qf-amber);
  /* glass retired: every glass token becomes a flat fill and a hairline */
  --g-fill: var(--qfx-well); --g-fill-hi: var(--qf-panel); --g-rim: transparent; --g-line: var(--qf-line-2);
  --g-shadow: none; --g-face: linear-gradient(var(--qf-panel), var(--qf-panel)); --g-ring: var(--qf-signal); --g-glow: none;
  --g-ink-face: linear-gradient(var(--qf-ink), var(--qf-ink)); --g-ink-line: var(--qf-ink); --g-ink-shadow: none; --g-knob-shadow: none;
  --g-row: linear-gradient(var(--qf-panel), var(--qf-panel)); --g-chip: none; --g-blur: none;
  --shadow: none; --shadow-up: none;
  color-scheme: light;
}
html.qb[data-theme="dark"] {
  --qf-paper: #120d2c; --qf-paper-2: #1a1440; --qf-panel: #1c1544; --qf-ink: #ece8ff; --qf-ink-2: #c4bce6; --qf-ink-3: #8d84b8;
  --qf-line: rgba(200, 190, 255, .13); --qf-line-2: rgba(200, 190, 255, .28); --qf-grid: rgba(200, 190, 255, .05);
  --qf-signal: #ff4fa3; --qf-signal-ink: #ff7ab8; --qf-signal-soft: #ff9ccd; --qf-signal-wash: #3a1838; --qf-on-signal: #1a0a26;
  --qf-band: #0d0924; --qf-teal: #3ff0dc; --qf-amber: #ffb04a;
  --qf-sky: linear-gradient(180deg, #1c1645 0%, #241a55 340px, var(--qf-paper) 760px);
  --qfx-well: #160f36; --qfx-hover: rgba(140, 149, 240, .09); --qfx-tick: rgba(200, 190, 255, .26);
  --grid: rgba(200, 190, 255, .08);
  color-scheme: dark;
}
html.qb .e2, html.qb[data-theme] .e2 { --g-fill: var(--qfx-well); --g-fill-hi: var(--qf-panel); --g-rim: transparent; --g-line: var(--qf-line-2); --g-shadow: none;
  --glass: var(--qf-panel); --glass-edge: var(--qf-line-2); --pillbg: var(--qf-panel); }

/* ---------- ground: the dusk sky and a fine drafting grid that fades down the first screen ---------- */
html.qb { background: var(--qf-paper) var(--qf-sky) no-repeat; background-size: 100% 900px; }
html.qb .qf-graticule { -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 0%, rgba(0,0,0,.4) 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 0%, rgba(0,0,0,.4) 55%, transparent 100%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(var(--qf-grid), var(--qf-grid)) 0 0 / 100% 100%,
    linear-gradient(90deg, var(--qfx-tick) 1px, transparent 1px) 0 0 / 128px 128px,
    linear-gradient(var(--qfx-tick) 1px, transparent 1px) 0 0 / 128px 128px !important; }
html.qb .qf-graticule { opacity: .32 !important; }
html.qb[data-theme="dark"] .qf-graticule { opacity: .5 !important; }
html.qb ::selection { background: var(--qf-signal-soft); color: #1d1640; }
html.qb body { color: var(--qf-ink-2); }

/* ---------- the chamfer: two corners cut at 45°, the outline drawn as 1px gradients, so nothing inside is ever clipped ---------- */
html.qb :where(.card, .e2-card, .wcard, .rc, .legendpanel, .wart, .e2-eqrow .t, .search, .ddb, .btn, .seg, .e2-views, .subnav, .lgi, .qb-dl,
  .qsim-go, .pi-deepgo, .e2-eqwhy > summary, .e2-costwrap > summary, .chip, [id="resetHide"], .qf-sub-knob, .e2-knob, .e2-views .knob, .e2-gcard, .qfx-cham,
  .e2-rail, .e2-rail .pill, .pi-x, #detail .iconbtn, .e2-li) {
  --qfx-c: 9px; --qfx-bd: var(--qf-line-2); --qfx-fill: var(--qf-panel);
  border: 1px solid transparent !important; border-radius: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background:
    linear-gradient(225deg, transparent calc(var(--qfx-c) - .5px), var(--qfx-bd) calc(var(--qfx-c) - .5px), var(--qfx-bd) calc(var(--qfx-c) + .6px), transparent calc(var(--qfx-c) + .6px),
      transparent calc(100% - var(--qfx-c) - .6px), var(--qfx-bd) calc(100% - var(--qfx-c) - .6px), var(--qfx-bd) calc(100% - var(--qfx-c) + .5px), transparent calc(100% - var(--qfx-c) + .5px)) border-box,
    linear-gradient(var(--qfx-bd), var(--qfx-bd)) 0 0 / calc(100% - var(--qfx-c) * 1.4142) 1px no-repeat border-box,
    linear-gradient(var(--qfx-bd), var(--qfx-bd)) 100% 100% / 1px calc(100% - var(--qfx-c) * 1.4142) no-repeat border-box,
    linear-gradient(var(--qfx-bd), var(--qfx-bd)) 100% 100% / calc(100% - var(--qfx-c) * 1.4142) 1px no-repeat border-box,
    linear-gradient(var(--qfx-bd), var(--qfx-bd)) 0 0 / 1px calc(100% - var(--qfx-c) * 1.4142) no-repeat border-box,
    linear-gradient(225deg, transparent var(--qfx-c), var(--qfx-fill) var(--qfx-c), var(--qfx-fill) calc(100% - var(--qfx-c)), transparent calc(100% - var(--qfx-c))) border-box,
    linear-gradient(var(--qfx-back, transparent), var(--qfx-back, transparent)) border-box !important;
}
/* sizes: panels cut deep, inner panels less, controls least */
html.qb :where(.card, .e2-card, .wcard) { --qfx-c: 11px; }
html.qb :where(.btn, .seg, .e2-views, .lgi, .qb-dl, .qsim-go, .pi-deepgo, .e2-eqwhy > summary, .e2-costwrap > summary, .chip, [id="resetHide"], .ddb, .search, .e2-gcard) { --qfx-c: 6px; }
html.qb :where(.qf-sub-knob, .e2-knob, .e2-views .knob) { --qfx-c: 5px; --qfx-bd: var(--qf-signal); --qfx-fill: var(--qf-signal-wash); }
html.qb :where(.subnav) { --qfx-c: 8px; --qfx-fill: color-mix(in srgb, var(--qf-panel) 82%, transparent); }
html.qb :where(.seg, .e2-views) { --qfx-fill: var(--qfx-well); --qfx-bd: var(--qf-line); }
html.qb :where(.legendpanel, .wart, .e2-eqrow .t) { --qfx-c: 7px; --qfx-fill: var(--qfx-well); --qfx-bd: var(--qf-line); }
html.qb .legendpanel::before, html.qb .legendpanel::after, html.qb .wcard::before, html.qb .qf-sub-knob::before,
  html.qb .e2-knob::before, html.qb .e2-knob::after, html.qb .e2-views .knob::before, html.qb .e2-views .knob::after { display: none !important; }
/* an empty detail slot stays invisible until it holds a selection */
html.qb .card.detail:not(.on) { background: none !important; border-color: transparent !important; }
html.qb .card.detail:not(.on)::after { display: none; }

/* states: hairlines brighten to signal, nothing grows a glow */
html.qb :is(.mcard, .wcard):is(:hover, :focus-visible) { --qfx-bd: var(--qf-signal); }
html.qb :is(.btn, .lgi, .qb-dl, .pi-deepgo, .e2-eqwhy > summary, .e2-costwrap > summary, .chip, [id="resetHide"], .ddb):hover { --qfx-bd: var(--qf-ink-3); }
html.qb .dd.open > .ddb, html.qb .ddb:focus-visible { --qfx-bd: var(--qf-signal); }
html.qb .search:focus-within { --qfx-bd: var(--qf-signal); }
html.qb :is(.btn, .seg button, .lgi, .ddb, .qb-dl, .qsim-go, .pi-deepgo, summary, .chip):focus-visible { outline: 1px solid var(--qf-signal-ink); outline-offset: 2px; }

/* the brackets: teal corner ticks on chart panels (skin.css) — also on model and workload cards while hovered */
html.qb :is(.mcard, .wcard)::after { content: ""; position: absolute; inset: -6px; pointer-events: none; opacity: 0; transition: opacity .18s, inset .28s var(--qf-ease);
  --t: var(--qf-teal); --l: 10px;
  background: linear-gradient(var(--t), var(--t)) 0 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
html.qb :is(.mcard, .wcard):hover::after { opacity: 1; inset: -9px; }
html.qb .wcard { overflow: visible !important; }

/* ---------- type: headlines heavier and tighter; every small label a HUD readout ---------- */
html.qb h1, html.qb h2 { color: var(--qf-ink); }
html.qb h1.ph, html.qb section.page > h1 { font-weight: 400; letter-spacing: -.05em; }
html.qb .lede { color: var(--qf-ink-2); }
html.qb .lede b, html.qb .qsa-head b { color: var(--qf-signal-ink); }
html.qb :is(.fld > label, .pi-f > label, .e2-strip label, .cfgh, .k, .qsa-axes label, .lbl) { font: 500 10.5px/1.3 var(--mono) !important; letter-spacing: .14em !important;
  text-transform: uppercase; color: var(--qf-ink-3) !important; }
html.qb :is(.fld > label, .pi-f > label)::before { content: "◢ "; color: var(--qf-teal); font-size: 8px; vertical-align: .12em; }
/* a page title carries a drafting mark above it: a diamond on a short tick scale */
html.qb h1.ph::before { content: ""; display: block; width: 148px; height: 9px; margin: 0 0 18px 1px;
  --qfx-dia: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M4.5 0 9 4.5 4.5 9 0 4.5z' fill='%2300a89a'/%3E%3C/svg%3E");
  background: var(--qfx-dia) 0 0 / 9px 9px no-repeat,
    repeating-linear-gradient(90deg, var(--qfx-tick) 0 1px, transparent 1px 12px) 18px 100% / calc(100% - 18px) 5px no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 18px 100% / calc(100% - 18px) 1px no-repeat,
    linear-gradient(var(--qf-signal), var(--qf-signal)) 18px 100% / 30px 1px no-repeat; }
html.qb[data-theme="dark"] h1.ph::before {
  --qfx-dia: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M4.5 0 9 4.5 4.5 9 0 4.5z' fill='%233ff0dc'/%3E%3C/svg%3E"); }

/* section headings: a teal diamond, the title, then a ruled scale running to the edge */
html.qb :is(#r-home .sect > h2, .pi-sh h2) { display: flex; align-items: center; gap: 14px; }
html.qb #r-home .sect > h2::before, html.qb .pi-sh h2::before { content: ""; flex: none; width: 9px !important; height: 9px !important; align-self: center;
  background: var(--qf-teal) !important; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%) !important; }
html.qb #r-home .sect > h2::after { content: ""; flex: 1; height: 7px; align-self: center; margin-left: 10px;
  background: repeating-linear-gradient(90deg, var(--qfx-tick) 0 1px, transparent 1px 16px) 0 100% / 100% 4px no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 0 100% / 100% 1px no-repeat,
    linear-gradient(var(--qf-signal), var(--qf-signal)) 0 100% / 36px 1px no-repeat; }

/* ---------- panel header bars: title, then a hairline with a short teal lead ---------- */
html.qb :is(.charthead, .e2-head, .pi-ch, .pi-card > header) { position: relative; }
html.qb :is(.charthead, .e2-head, .pi-ch, .pi-card > header)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--qf-teal) 0 28px, var(--qf-line) 28px); }
html.qb .card.hard > .charthead::after, html.qb #r-dashboard .card > .charthead::after, html.qb .qsa-card > .charthead::after { left: 22px; right: 22px; }
html.qb #stepDetail .charthead::after { bottom: -12px; }
html.qb :is(.charthead h3, #cTitle, .e2-head h2, .pi-ch h2, .pi-card h3, .pi-deep h3) { color: var(--qf-ink); font-weight: 500; }
html.qb :is(.charthead .sub, #cSub, .e2-head .sub, .pi-sub) { color: var(--qf-ink-3); }

/* ---------- controls ---------- */
/* one button system: primary is solid ink (lilac in dark), secondary a 1px outline; both chamfered, mono, uppercase; hover turns pink */
html.qb .btn { font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--qf-ink); transition: color .15s ease-out; }
html.qb .btn:not(.primary):hover { --qfx-bd: var(--qf-signal) !important; color: var(--qf-signal-ink) !important; }
html.qb :is(.btn.primary, .qsim-go, .pi-deepgo) { --qfx-fill: var(--qf-ink); --qfx-bd: var(--qf-ink); color: var(--qf-paper) !important;
  font: 600 11.5px/1 var(--mono) !important; letter-spacing: .12em !important; text-transform: uppercase; transition: color .15s ease-out; }
html.qb :is(.btn.primary, .qsim-go, .pi-deepgo):hover { --qfx-fill: var(--qf-signal) !important; --qfx-bd: var(--qf-signal) !important; color: #1d1640 !important; box-shadow: none !important; }
/* the arrow is the bare double chevron after the label, in the label's colour: no chip behind it */
html.qb .qsim-go .qsim-arrow { background: none !important; color: inherit !important; box-shadow: none !important; }
html.qb .seg button, html.qb .e2-views button { border-radius: 0 !important; font-family: var(--mono); letter-spacing: .06em; }
html.qb .seg button.on, html.qb .e2-views button.on { color: var(--qf-ink) !important; }
html.qb .seg:not(.knobbed) button.on { background: var(--qf-signal-wash) !important; box-shadow: inset 0 0 0 1px var(--qf-signal) !important; }
html.qb .ddb { color: var(--qf-ink); }
/* the open list: a HUD readout that unfolds from its top edge (150ms) with one scan line passing down it, teal corner
   ticks, mono section labels on a hairline, hairlines between options, a pink tick on the lit option and a pink bar
   marking the chosen one */
html.qb .ddm { --t: var(--qf-teal); border: 1px solid var(--qf-line-2) !important; border-radius: 0 !important; box-shadow: var(--shadow-up) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background: linear-gradient(var(--t), var(--t)) 0 0 / 9px 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px 9px,
    linear-gradient(var(--t), var(--t)) 100% 100% / 9px 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px 9px, var(--qf-panel) !important;
  background-repeat: no-repeat !important;
  transform: scaleY(.6) !important; transform-origin: top !important; transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s linear .15s !important; }
html.qb .dd.up .ddm { transform-origin: bottom !important; }
html.qb .dd.open .ddm { transform: none !important; transition-delay: 0s !important; }
html.qb .ddm::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--qf-signal) 20%, var(--qf-signal) 80%, transparent) 0 0 / 100% 1px no-repeat; }
html.qb .dd.open .ddm::before { animation: qfx-dd-scan .3s ease-out; }
@keyframes qfx-dd-scan { 0% { opacity: .9; background-position: 0 0; } 100% { opacity: 0; background-position: 0 100%; } }
html.qb .ddo { border-radius: 0 !important; }
html.qb .ddo + .ddo { box-shadow: inset 0 1px 0 var(--qf-line); }
html.qb .ddhl { border-radius: 0 !important; background: var(--qfx-hover) !important; border: 0 !important; box-shadow: inset 2px 0 0 var(--qf-signal) !important; }
html.qb .ddo[aria-selected="true"]::after { width: 10px; height: 2px; border-radius: 0; transform: none; background: var(--qf-signal); }
html.qb .ddg { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; font-size: 10px; color: var(--qf-ink-3);
  margin-top: 4px; border-top: 1px solid var(--qf-line-2); }
html.qb .ddg::before { content: ""; display: inline-block; width: 8px; height: 1px; margin-right: 7px; vertical-align: .3em; background: var(--qf-teal); }
html.qb .ddg.first { margin-top: 0; border-top: 0; }
html.qb .ddg + .ddo { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { html.qb .ddm { transform: none !important; } html.qb .dd.open .ddm::before { animation: none; } }
html.qb .search input { color: var(--qf-ink); }
html.qb .search kbd { border-radius: 0; background: var(--qfx-well); border: 1px solid var(--qf-line); color: var(--qf-ink-3); }
html.qb :is(.pill, .badge, .pi-load, .pv, .e2-pill) { border-radius: 2px !important; font-family: var(--mono); }
html.qb .pi-load { background: var(--qfx-well) !important; border: 1px solid var(--qf-line) !important; box-shadow: none !important; color: var(--qf-ink-2); }
html.qb .lgi { color: var(--qf-ink); }
html.qb .lgi i, html.qb .cmplg i, html.qb .chip i, html.qb .rg .dot, html.qb .srow .dot, html.qb .steplegend i { border-radius: 0 !important; }
html.qb .lgi i, html.qb .rg .dot, html.qb .srow .dot, html.qb .chip i { transform: rotate(45deg) scale(.86); }
/* ---------- the HUD control: one track and one knob for every switch and range slider ----------
   Track: a chamfered plate (top-right and bottom-left cut, like every panel) drawn as background layers, so the 2px
   outline runs unbroken round the cuts in every state. Knob: an ink square with three grip hairlines. The active part
   fills pink (a switch's whole track when on, a range from its start to the knob) and the outline stays drawn over it.
   --hc-frame is declared on the input itself, so a range's track pseudo-element inherits it already resolved. */
html.qb :is(.sw, .inl) input, html.qb input[type="range"] {
  --hc-w: 2px; --hc-cut: 3.5px; --hc-leg: calc(var(--hc-cut) * 1.4142);
  --hc-bd: var(--qf-ink-2); --hc-fill: var(--qf-panel); --hc-on: var(--qf-signal); --hc-p: 0%;
  --hc-ink: var(--qf-ink-2); --hc-grip: var(--qf-panel);
  --hc-frame:
    linear-gradient(225deg, transparent var(--hc-cut), var(--hc-bd) var(--hc-cut), var(--hc-bd) calc(var(--hc-cut) + var(--hc-w)), transparent calc(var(--hc-cut) + var(--hc-w)),
      transparent calc(100% - var(--hc-cut) - var(--hc-w)), var(--hc-bd) calc(100% - var(--hc-cut) - var(--hc-w)), var(--hc-bd) calc(100% - var(--hc-cut)), transparent calc(100% - var(--hc-cut))),
    linear-gradient(var(--hc-bd), var(--hc-bd)) 0 0 / calc(100% - var(--hc-leg)) var(--hc-w) no-repeat,
    linear-gradient(var(--hc-bd), var(--hc-bd)) 100% 100% / var(--hc-w) calc(100% - var(--hc-leg)) no-repeat,
    linear-gradient(var(--hc-bd), var(--hc-bd)) 100% 100% / calc(100% - var(--hc-leg)) var(--hc-w) no-repeat,
    linear-gradient(var(--hc-bd), var(--hc-bd)) 0 0 / var(--hc-w) calc(100% - var(--hc-leg)) no-repeat,
    linear-gradient(45deg, transparent var(--hc-cut), var(--hc-on) var(--hc-cut)) 0 0 / var(--hc-p) 100% no-repeat,
    linear-gradient(225deg, transparent var(--hc-cut), var(--hc-fill) var(--hc-cut), var(--hc-fill) calc(100% - var(--hc-cut)), transparent calc(100% - var(--hc-cut)));
  --hc-knob: repeating-linear-gradient(90deg, var(--hc-grip) 0 1px, transparent 1px 3px) center / 7px 8px no-repeat, var(--hc-ink);
  /* the knob is cut on the same two corners, 2.6px, so it sits 2px inside the outline everywhere, cut edges included
     (track cut 3.5px + 2px line + 2px gap, measured across the diagonal, less the knob's 4px inset). Whole-pixel line,
     inset and knob keep the gap even at every screen density (a 1.5px line rendered thicker on the top and left) */
  --hc-knob-cut: polygon(0 0, calc(100% - 2.6px) 0, 100% 2.6px, 100% 100%, 2.6px 100%, 0 calc(100% - 2.6px));
  cursor: pointer; }
html.qb :is(.sw, .inl):hover input, html.qb input[type="range"]:hover { --hc-bd: var(--qf-signal-ink); --hc-grip: var(--qf-teal); }

/* the switch: OFF or ON in mono caps beside the knob, which slides over the word that no longer applies. Off is an ink
   outline on the panel; on fills pink with dark ink, outlined in full ink. The native checkbox stays (label, keys, role). */
html.qb :is(.sw, .inl) input { width: 60px !important; height: 24px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: var(--hc-frame) !important; filter: none !important; transition: none; }
html.qb :is(.sw, .inl) input:checked { --hc-fill: var(--qf-signal); --hc-bd: var(--qf-ink); --hc-ink: var(--qf-on-signal); --hc-grip: var(--qf-signal); }
/* on: the outline stays full ink under the pointer; the grip lines turn teal instead */
html.qb :is(.sw, .inl):hover input:checked { --hc-bd: var(--qf-ink); --hc-grip: var(--qf-teal); }
html.qb :is(.sw, .inl) input::before { content: "OFF"; position: absolute; top: 0; bottom: 0; left: 22px; right: 2px; display: flex; align-items: center; justify-content: center;
  font: 600 9px/1 var(--mono); letter-spacing: .12em; color: var(--hc-ink); pointer-events: none; }
html.qb :is(.sw, .inl) input:checked::before { content: "ON"; left: 2px; right: 22px; }
html.qb :is(.sw, .inl) input::after { top: 4px !important; left: 4px !important; width: 16px !important; height: 16px !important; border-radius: 0 !important; box-shadow: none !important;
  background: var(--hc-knob) !important; clip-path: var(--hc-knob-cut); transform: none !important; transition: transform .12s ease-out !important; }
html.qb :is(.sw, .inl) input:checked::after { transform: translateX(36px) !important; }
html.qb :is(.sw, .inl) input:focus-visible { outline: 2px solid var(--qf-teal) !important; outline-offset: 3px; }

/* the range: the same track at 10px, filled pink up to the knob (--p, kept by the page's script), the same knob */
html.qb input[type="range"] { --hc-p: var(--p, 0%); -webkit-appearance: none; appearance: none; background: transparent !important; }
html.qb input[type="range"]::-webkit-slider-runnable-track { height: 10px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--hc-frame) !important; }
html.qb input[type="range"]::-moz-range-track { height: 10px; border: 0; border-radius: 0; box-shadow: none; background: var(--hc-frame); }
html.qb input[type="range"]::-moz-range-progress { background: transparent; }
html.qb input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px !important; height: 16px !important; margin-top: -3px !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--hc-knob) !important; clip-path: var(--hc-knob-cut); transform: none !important; }
html.qb input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 0; box-shadow: none; background: var(--hc-knob); clip-path: var(--hc-knob-cut); transform: none; }
html.qb input[type="range"]:focus-visible { outline: 2px solid var(--qf-teal) !important; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html.qb :is(.sw, .inl) input::after { transition: none !important; } }

/* tooltips: a flat readout card, not frosted glass */
html.qb :is(.e2-tip, .ptip, .pi-tip, .pi-pop, .steptip) { background: var(--qf-panel) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid var(--qf-line-2) !important; border-radius: 2px !important; box-shadow: var(--shadow-up) !important; }

/* ---------- tables: mono header row, hairlines, a pink rule on the chosen row ---------- */
html.qb .page table th { font: 500 10.5px/1.3 var(--mono) !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--qf-ink-3) !important;
  border-bottom: 1px solid var(--qf-line-2) !important; background: transparent !important; }
html.qb .page table td { border-bottom: 1px solid var(--qf-line) !important; }
/* only the results table's rows are clickable (they select the point), so only they react to hover */
html.qb .page table:not(.e2-tok) tbody tr:hover td { background: var(--qfx-hover) !important; }
html.qb .page table:not(.e2-tok) tbody tr.on td { background: color-mix(in srgb, var(--qf-signal-wash) 80%, transparent) !important; }
html.qb .page table:not(.e2-tok) tbody tr.on td:first-child { box-shadow: inset 2px 0 0 var(--qf-signal) !important; }

/* ---------- charts: flat bars with square shoulders; the plot keeps its colours ---------- */
html.qb .e2-bar .col { border-radius: 1px 1px 0 0 !important; }

/* ---------- footer: an indigo band under a neon seam and a tick scale ---------- */
html.qb footer { background: var(--qf-band) !important; color: var(--qf-on-band) !important; overflow: hidden; }
html.qb[data-theme="dark"] footer { background: var(--qf-band) !important; }
html.qb footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--qf-signal) 25%, #3ff0dc 75%, transparent); opacity: .8; }
html.qb footer::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 8px; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(236, 232, 255, .4) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(236, 232, 255, .55) 0 1px, transparent 1px 120px);
  background-size: 100% 4px, 100% 8px; background-repeat: no-repeat; }
html.qb footer .wrap::before { color: var(--qf-on-band); }
html.qb body footer .qf-foot a, html.qb body footer a, html.qb body footer .c { color: var(--qf-on-band-2) !important; }
html.qb body footer .qf-foot a:hover, html.qb body footer a:hover { color: #ffffff !important; }
html.qb footer .qf-foot-h { color: #3ff0dc !important; opacity: .8; }
html.qb footer .qf-foot-h::before { content: "◢ "; color: var(--qf-signal); }

/* ---------- the hero art: one illustrated layer (or a stack) inside a HUD frame ---------- */
html.qb .qfx-art { position: relative; margin: 0; aspect-ratio: 870 / 592; pointer-events: none; user-select: none; }
html.qb .qfx-art .qfx-frame { position: absolute; inset: 0; --t: var(--qf-teal); --l: 18px;
  background: linear-gradient(var(--t), var(--t)) 0 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 0 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 100% / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
/* scales: ticks along the bottom and the left, a fine rule just inside the brackets */
html.qb .qfx-art .qfx-sx { position: absolute; left: 34px; right: 34px; bottom: -1px; height: 9px;
  background: repeating-linear-gradient(90deg, var(--qfx-tick) 0 1px, transparent 1px 14px) 0 100% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--qf-ink-3) 0 1px, transparent 1px 70px) 0 100% / 100% 9px no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 0 100% / 100% 1px no-repeat; }
html.qb .qfx-art .qfx-sy { position: absolute; top: 34px; bottom: 34px; left: -1px; width: 9px;
  background: repeating-linear-gradient(180deg, var(--qfx-tick) 0 1px, transparent 1px 14px) 0 0 / 5px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--qf-ink-3) 0 1px, transparent 1px 70px) 0 0 / 9px 100% no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 0 0 / 1px 100% no-repeat; }
html.qb .qfx-art .qfx-dot { position: absolute; width: 7px; height: 7px; background: var(--qf-signal); transform: rotate(45deg); }
html.qb .qfx-art .qfx-dot.a { right: -4px; top: 50%; }
html.qb .qfx-art .qfx-dot.b { left: 50%; top: -4px; background: var(--qf-teal); }
html.qb .qfx-art .qfx-l { position: absolute; display: block; }
/* drafting paper inside the frame, fading out toward the brackets */
html.qb .qfx-art::before { content: ""; position: absolute; inset: 10px;
  background: linear-gradient(var(--qf-line) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, var(--qf-line) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask: radial-gradient(ellipse 60% 55% at 50% 52%, #000 0%, rgba(0,0,0,.35) 60%, transparent 85%);
  mask: radial-gradient(ellipse 60% 55% at 50% 52%, #000 0%, rgba(0,0,0,.35) 60%, transparent 85%); opacity: .8; }
html.qb .qfx-art .qfx-l img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  html.qb .qfx-art .qfx-l { animation: qfx-float 9s ease-in-out infinite; }
  html.qb .qfx-art .qfx-l + .qfx-l { animation-delay: -4.5s; }
}
@keyframes qfx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- polish: the last glass, gloss and blur left in the app ---------- */
html.qb .e2-btn::after, html.qb .e2-railwrap::before, html.qb .e2-railwrap::after { display: none !important; }
@keyframes e2in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes e2glow { 0% { outline: 1px solid var(--qf-signal); outline-offset: 0; } 100% { outline: 1px solid transparent; outline-offset: 6px; } }
html.qb :is(.e2-li, .e2-seg, .e2-xl .x, #e2Ticks > span, #qsaATicks > span, .hx-formula, .hx-tag, .e2-mark, .e2-info),
  html.qb .skelbox::before, html.qb .skelbox::after, html.qb .tl::after, html.qb .e2-info::after { border-radius: 2px !important; }
html.qb :is(.e2-info, .pi-lnk, .sw input, .inl input, #labels, #optimal, #qsaLabels, .e2-eqwhy > ul), html.qb .e2-info::after { box-shadow: none !important; }
html.qb .e2-info::after { background: var(--qf-panel) !important; border: 1px solid var(--qf-line-2) !important; }
/* Assumptions opens like Prices and assumptions: the same summary control and +/− sign, its notes on the open page
   (no tinted panel, no frame), hairlines between them */
html.qb .e2-eqwhy > summary i.pm { display: none; }
html.qb :is(.e2-eqwhy, .e2-costwrap) > summary::before { content: "+" !important; display: inline-block !important; width: 1ch; margin-right: 8px; color: var(--qf-ink); font: 600 13px/1 var(--mono); transform: none !important; }
html.qb :is(.e2-eqwhy, .e2-costwrap)[open] > summary::before { content: "\2212" !important; }
html.qb .e2-eqwhy > ul { background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 10px 0 0 !important; margin-top: 10px !important; }
html.qb .e2-eqwhy li + li { border-top: 1px solid var(--qf-line) !important; }
html.qb .e2-eqwhy li::before { top: 14px !important; width: 8px !important; height: 1px !important; border-radius: 0 !important; background: var(--qf-ink-3) !important; opacity: 1 !important; }
html.qb .e2-info::after { color: var(--qf-ink-2) !important; }

/* ---------- Prices and assumptions: HUD motion. Each piece runs once, under 400ms, on transform and opacity only, and
   reduced motion turns it all off. Opening the panel boots the GPU cards in with their corner brackets locking on and
   passes one scan line down the token table; an edited price ticks its readout and flashes that card's brackets pink
   (eff2.js e2CostFigures); a focused field is bracketed in teal; each sample-days chip carries a status lamp. ---------- */
html.qb .e2-gcard { position: relative; }
html.qb .e2-gcard::after { content: ""; position: absolute; inset: -4px; pointer-events: none; opacity: 0; --b: var(--qf-teal);
  background: linear-gradient(var(--b), var(--b)) 0 0 / 10px 2px, linear-gradient(var(--b), var(--b)) 0 0 / 2px 10px,
    linear-gradient(var(--b), var(--b)) 100% 0 / 10px 2px, linear-gradient(var(--b), var(--b)) 100% 0 / 2px 10px,
    linear-gradient(var(--b), var(--b)) 0 100% / 10px 2px, linear-gradient(var(--b), var(--b)) 0 100% / 2px 10px,
    linear-gradient(var(--b), var(--b)) 100% 100% / 10px 2px, linear-gradient(var(--b), var(--b)) 100% 100% / 2px 10px;
  background-repeat: no-repeat; }
html.qb .e2-costwrap.opening .e2-gcard { animation: qfx-boot .24s ease-out both !important; }
html.qb .e2-costwrap.opening .e2-gcard::after { animation: qfx-lock .3s ease-out both; }
html.qb .e2-costwrap.opening .e2-gcard:nth-child(2), html.qb .e2-costwrap.opening .e2-gcard:nth-child(2)::after { animation-delay: .03s !important; }
html.qb .e2-costwrap.opening .e2-gcard:nth-child(3), html.qb .e2-costwrap.opening .e2-gcard:nth-child(3)::after { animation-delay: .06s !important; }
html.qb .e2-costwrap.opening .e2-gcard:nth-child(n+4), html.qb .e2-costwrap.opening .e2-gcard:nth-child(n+4)::after { animation-delay: .09s !important; }
html.qb .e2-gcard.flash::after { --b: var(--qf-signal); animation: qfx-flash .36s ease-out; }
@keyframes qfx-boot { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes qfx-lock { 0% { opacity: 0; transform: scale(1.08); } 45% { opacity: 1; } 100% { opacity: 0; transform: none; } }
@keyframes qfx-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
/* one scan line down the token table: an overlay that grows from the top (scale, so it never adds scroll area) with a
   pink leading edge */
html.qb .e2-costs .scroll { position: relative; }
html.qb .e2-costs .scroll::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transform-origin: top;
  background: linear-gradient(180deg, transparent 75%, color-mix(in srgb, var(--qf-signal) 12%, transparent) 97%, var(--qf-signal) 99.4%); }
html.qb .e2-costwrap.opening .e2-costs .scroll::after { animation: qfx-scan .32s ease-out .06s both; }
@keyframes qfx-scan { 0% { opacity: 1; transform: scaleY(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); } }
/* fields: square, and bracketed in teal while focused */
html.qb :is(.e2-gcard, .e2-shared) :is(input, select) { border-radius: 0 !important; }
html.qb :is(.e2-gcard, .e2-shared) input:focus-visible { outline: 0 !important; border-color: var(--qf-teal) !important; box-shadow: none !important; --b: var(--qf-teal);
  background: linear-gradient(var(--b), var(--b)) 0 0 / 6px 2px, linear-gradient(var(--b), var(--b)) 0 0 / 2px 6px,
    linear-gradient(var(--b), var(--b)) 100% 0 / 6px 2px, linear-gradient(var(--b), var(--b)) 100% 0 / 2px 6px,
    linear-gradient(var(--b), var(--b)) 0 100% / 6px 2px, linear-gradient(var(--b), var(--b)) 0 100% / 2px 6px,
    linear-gradient(var(--b), var(--b)) 100% 100% / 6px 2px, linear-gradient(var(--b), var(--b)) 100% 100% / 2px 6px, var(--qf-panel) !important;
  background-repeat: no-repeat !important; }
html.qb .e2-shared select:focus-visible { outline: 1px solid var(--qf-teal) !important; outline-offset: 2px; }
/* the sample-days chips: square, with a status lamp that lights once as the panel opens */
html.qb .e2-days { border-radius: 0 !important; background: transparent !important; border: 1px solid var(--qf-line-2); color: var(--qf-ink-3); }
html.qb .e2-days::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; vertical-align: 1px; background: var(--qf-teal); }
html.qb .e2-costwrap.opening .e2-days::before { animation: qfx-lamp .3s steps(3, end) .1s both; }
@keyframes qfx-lamp { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: .2; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.qb .e2-costwrap.opening .e2-gcard, html.qb .e2-gcard::after, html.qb .e2-costs .scroll::after, html.qb .e2-days::before { animation: none !important; }
}
html.qb .e2-bub { border-radius: 0 !important; }   /* the slider value readout: a flat tag, not a pill */

/* ===== chart download control and quettaflop.ai mark (dl/wm block, 11 Nov) =====
   Structure and motion live in eff2.css; this block gives them the HUD palette. The control takes the chamfer
   from the shared lists above, its export tick runs in signal pink, its hover hint is a flat tag with a pink edge. */
html.qb .qb-dl { --qfx-fill: var(--qf-panel); color: var(--qf-ink-2); }   /* chamfer, hover frame and focus ring: the shared lists above */
html.qb .qb-dl:is(:hover, :focus-visible) { color: var(--qf-ink); }
html.qb .qb-dl-tick { left: 6px; background: var(--qf-signal); }   /* clear of the cut bottom-left corner */
html.qb .qb-dl.dl-done { color: var(--qf-signal-ink); }
html.qb .qb-dl-hint { font-family: var(--qf-mono); color: var(--qf-ink-2); background: var(--qf-panel); border-color: var(--qf-line-2); box-shadow: inset 2px 0 0 var(--qf-signal); }
html.qb .qf-wm { font-family: var(--qf-mono); color: var(--qf-ink-3); }

/* every control reacts to the pointer, the selected one included: segment buttons and tabs turn pink, the search box
   and number fields brighten their outline */
html.qb :is(.seg, .e2-views, .e2-seg) button:hover, html.qb .subnav a:hover, html.qb .subnav a.on:hover { color: var(--qf-signal-ink) !important; }
html.qb .search:hover { --qfx-bd: var(--qf-ink-3); }
html.qb .e2-num:hover input { border-color: var(--qf-signal-ink) !important; }
/* the value readout shows while the track itself is hovered or in use, not for the whole slider block */
html.qb .e2-slider:hover:not(:has(.e2-sltrack:hover)):not(:focus-within) .e2-bub { opacity: 0 !important; }
/* cards cannot be pressed: the page's own stylesheet (qf-bench.css) brightens their corner brackets on hover; hold them
   at their resting look */
html.qb :is(.card.hard, .e2-card, .pi-card):hover::after { opacity: .55 !important; inset: -5px !important; --t: var(--qf-teal) !important; }

/* ===== hud3 (12 Nov): the last liquid glass in the efficiency view and the pop-ups, flattened =====
   Found by a computed-style sweep of every element and pseudo-element (backdrop blur, soft shadows, gloss gradients,
   rounding): the per-model metric rail and its glossy lens, the toast, the tooltips and open dropdowns (the dark
   theme's --shadow-up outranks the token reset above), and the bars' hover lift with its coloured glow. */
/* the metric rail: a chamfered well like the segmented controls, the chosen metric a pink-outlined plate with a pink rule */
html.qb .e2-rail { --qfx-c: 9px; --qfx-fill: var(--qfx-well); --qfx-bd: var(--qf-line); }
html.qb .e2-rail .pill { --qfx-c: 5px; --qfx-fill: var(--qf-signal-wash); --qfx-bd: var(--qf-signal); transition: transform .16s ease-out, height .16s ease-out; }
html.qb .e2-rail .pill.moving { animation: none; }
html.qb .e2-rail .pill::before { display: none; }
html.qb .e2-rail .pill::after { left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 0; background: var(--qf-signal); }
html.qb .e2-rail button { border-radius: 0; }
html.qb .e2-rail button.on b { transform: none; }
html.qb .e2-rail button span { font-family: var(--qf-mono, var(--mono)); }
/* pop-ups: flat panels on a hairline, square */
html.qb :is(.e2-tip, .ptip, .pi-tip, .pi-pop, .steptip, .ddm) { box-shadow: none !important; border-radius: 0 !important; }
html.qb .e2-note { border-radius: 0 !important; box-shadow: inset 2px 0 0 var(--qf-signal) !important; background: var(--qf-panel) !important;
  border: 1px solid var(--qf-line-2) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.qb :is(.e2-chip, .e2-pdform, .e2-mark.mono, .pricechips label, .pricechips input, .nsteady, .emptyover) { border-radius: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* bars: no lift and no coloured glow under the pointer (the HUD lock-on marks the bar instead) */
html.qb .e2-bar:hover .col, html.qb .e2-bar:focus-visible .col { transform: none; box-shadow: none; filter: none; }
html.qb .e2-bar.theo:hover .col { box-shadow: inset 0 3px 0 var(--c); }
html.qb .e2-bar.neg:hover .col, html.qb .e2-bar:hover .val { transform: none; }

/* Prices and assumptions: the same centred summary control as Assumptions above the score chart, its sign drawn (two
   1.5px bars, so it sits true in the box at any font), the panel it opens left-aligned under a hairline */
html.qb .e2-costwrap { display: flex; flex-direction: column; align-items: center; }
html.qb .e2-costwrap > .e2-costs { align-self: stretch; text-align: left; }
html.qb :is(.e2-eqwhy, .e2-costwrap) > summary { box-sizing: border-box; align-items: center; justify-content: center; gap: 9px; height: 34px; padding: 0 15px !important;
  font: 600 12.5px/1 var(--sans, inherit) !important; color: var(--qf-ink); }
html.qb :is(.e2-eqwhy, .e2-costwrap) > summary::before { content: "" !important; flex: none; width: 9px; height: 9px; margin: 0 !important;
  background: linear-gradient(currentColor, currentColor) center / 9px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 9px no-repeat; }
html.qb :is(.e2-eqwhy, .e2-costwrap)[open] > summary::before { content: "" !important; background: linear-gradient(currentColor, currentColor) center / 9px 1.5px no-repeat; }
html.qb :is(.e2-eqwhy, .e2-costwrap) > summary:hover { --qfx-bd: var(--qf-signal) !important; color: var(--qf-signal-ink); transform: none; }
html.qb .e2-costwrap[open] > summary { margin-bottom: 14px; }

/* close buttons: a chamfered square with a drawn ×, two 1.5px strokes crossing at the box's centre (the × character
   sits off-centre in every font) */
html.qb :where(.pi-x, #detail .iconbtn) { --qfx-c: 5px; position: relative; width: 32px; height: 32px; padding: 0; font-size: 0 !important; color: var(--qf-ink);
  cursor: pointer; transition: color .15s ease-out; }
html.qb :is(.pi-x, #detail .iconbtn)::before, html.qb :is(.pi-x, #detail .iconbtn)::after { content: ""; position: absolute; left: calc(50% - 6px); top: calc(50% - .75px);
  width: 12px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
html.qb :is(.pi-x, #detail .iconbtn)::after { transform: rotate(-45deg); }
html.qb :is(.pi-x, #detail .iconbtn):hover { --qfx-bd: var(--qf-signal) !important; color: var(--qf-signal-ink); transform: none; }
html.qb :is(.pi-x, #detail .iconbtn):active { transform: scale(.94); }
html.qb .pi-lnk { border-radius: 0 !important; }
html.qb .e2-bar { border-radius: 0 !important; }
html.qb .pi-dot { border-radius: 0 !important; transform: rotate(45deg) scale(.8); }

/* ===== hud3 centring pass (12 Nov): measured in Playwright, label box against the control's box =====
   the legend toggles centre their swatch and name on the box's middle line (they sat 3px high on touch screens) */
html.qb .lgi { align-items: center; }
/* the legend diamond centres on its label (the app's own rule lifted it 4px for top alignment) */
html.qb .lgi i { margin-top: 0; }
/* arrows are drawn, not typed: a text arrow sits off the box's centre in every font. One 12px stroke arrow, in the
   label's colour, centred on the line */
html.qb .qf-arrow { display: inline-block; flex: none; width: 12px; height: 12px; vertical-align: -1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6h8.6M6.6 2.5 10.1 6l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6h8.6M6.6 2.5 10.1 6l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat; }
html.qb :is(.pi-deepgo, .pi-go) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
/* the score's phone list: square rows and square bars, like every other bar on the site */
html.qb .e2-li, html.qb .e2-li .bar, html.qb .e2-li .bar i { border-radius: 0 !important; }

/* the score's phone list (hud3 follow-up, 12 Nov): each row is a chamfered plate drawn only when it matters, with no
   movement under the finger (the old hover nudge read as a jump after a tap). The chosen row takes the selected look of
   the desktop table and the kernel list: a closed pink chamfer outline, a pink rule on the left, pink corner ticks on
   its two square corners, and the signal wash */
html.qb .e2-li { --qfx-c: 6px; --qfx-bd: transparent; --qfx-fill: transparent; position: relative; transform: none !important; transition: none !important; }
html.qb .e2-li:hover { --qfx-fill: var(--qfx-hover); }
html.qb .e2-li.sel { --qfx-bd: var(--qf-signal); --qfx-fill: var(--qf-signal-wash); }
html.qb .e2-li:focus-visible { outline: 1px solid var(--qf-teal) !important; outline-offset: 2px !important; }
html.qb .e2-li::before, html.qb .e2-li::after { content: ""; position: absolute; pointer-events: none; opacity: 0; }
html.qb .e2-li::before { left: 0; top: 7px; bottom: 12px; width: 3px; background: var(--qf-signal); }
html.qb .e2-li::after { inset: 2px; --t: var(--qf-signal); --l: 7px;
  background: linear-gradient(var(--t), var(--t)) 0 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
html.qb .e2-li.sel::before, html.qb .e2-li.sel::after { opacity: 1; }

/* ===== QuettaBench only ===== */

/* ---------- subnav: a chamfered tab rail; the sliding knob (qf.js) is a pink-ruled plate ---------- */
html.qb .subnav { padding: 4px; gap: 2px; }
html.qb .subnav a { font: 500 11.5px/1 var(--mono); letter-spacing: .12em; color: var(--qf-ink-3); border-radius: 0 !important; }
html.qb .subnav a.on, html.qb .subnav a:hover { color: var(--qf-ink); }
html.qb .subnav:not(.qf-knobbed) a.on { background: var(--qf-signal-wash) !important; box-shadow: inset 0 0 0 1px var(--qf-signal) !important; }

/* ---------- overview hero: text left, the bench layer floating in a HUD frame right ---------- */
html.qb #r-home .hero > .qf-quiet { display: none !important; }
html.qb #r-home .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 72px);
  margin: 26px 0 0; padding: clamp(40px, 5vw, 72px) 0 clamp(52px, 5vw, 76px); }
html.qb #r-home .hero > div:not(.qf-quiet) { position: relative; z-index: 1; }
html.qb #r-home .hero .qfx-eye { margin: 0 0 22px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
html.qb #r-home .hero h1 { font-weight: 400; font-size: clamp(46px, 6.3vw, 104px); line-height: .96; letter-spacing: -.055em; max-width: 11ch; }
html.qb #r-home .hero .lede { max-width: 34rem; margin-top: 1.6rem; font-size: clamp(16px, 1.25vw, 19px); }
html.qb #r-home .hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }
html.qb #r-home .hero .btn { height: 48px; padding: 0 1.4rem; display: inline-flex; align-items: center; }
html.qb #r-home .hero .btn:not(.primary) { --qfx-fill: color-mix(in srgb, var(--qf-panel) 70%, transparent); }
/* the band: a neon seam on top and a tick scale at the foot, full bleed */
html.qb #r-home .hero::before, html.qb #r-home .hero::after { content: ""; position: absolute; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none; }
html.qb #r-home .hero::before { top: 0; height: 1px; background: linear-gradient(90deg, transparent 4%, var(--qf-signal) 30%, var(--qf-teal) 70%, transparent 96%); opacity: .7; }
html.qb #r-home .hero::after { bottom: 0; height: 9px;
  background: repeating-linear-gradient(90deg, var(--qfx-tick) 0 1px, transparent 1px 16px) 0 100% / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--qf-ink-3) 0 1px, transparent 1px 160px) 0 100% / 100% 9px no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 0 100% / 100% 1px no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
html.qb #r-home .hero .qfx-art { width: 100%; max-width: 660px; justify-self: end; }
html.qb #r-home .hero .qfx-art .qfx-l { inset: 3% 2% 3% 2%; }
html.qb #r-home .sect { margin-top: clamp(48px, 5vw, 80px); }

/* ---------- model cards: org as a readout, numbers on a ruled foot ---------- */
html.qb .mcard { padding: 20px 22px 18px !important; }
html.qb .mcard .org { color: var(--qf-ink-3); }
html.qb .mcard h3 { color: var(--qf-ink); }
html.qb .mcard .nums { border-top: 1px solid var(--qf-line) !important; position: relative; }
html.qb .mcard .nums::before { content: ""; position: absolute; left: 0; top: -1px; width: 22px; height: 1px; background: var(--qf-teal); }
html.qb .mcard .nums b, html.qb .mcard .nums > div { color: var(--qf-ink); }
html.qb .mcard:hover, html.qb .mcard:focus-visible { box-shadow: none !important; }

/* ---------- workload cards: the drawing sits on a drafting plate ---------- */
html.qb .wcard { --qfx-fill: var(--qf-panel); }
html.qb .wart { background-color: transparent; }
html.qb .wart { --qfx-fill: var(--qfx-well); }
html.qb .wcard b { font-weight: 500; color: var(--qf-ink); }
/* phone: two columns, every row the same height, equal 12px inset on all sides, the label centred in the space under the plate,
   and an odd last card spans both columns so no row is left with a lone item */
@media (max-width: 600px) {
  html.qb .wgrid { grid-auto-rows: 1fr; }
  html.qb .wcard { padding: 12px; text-align: center; }
  html.qb .wcard b { flex: 1; display: flex; align-items: center; justify-content: center; line-height: 1.25; text-wrap: balance; }
  html.qb .wgrid { grid-template-columns: repeat(4, 1fr); }
  html.qb .wcard { grid-column: span 2; }
  html.qb .wcard:last-child:nth-child(odd) { grid-column: 2 / span 2; }
  /* the hover arrow is invisible but still takes room, which pushed the label off centre */
  html.qb .wcard b::after { display: none; }
}
/* tablet and desktop: rows the same height. Every card is the same size at every width: the grid has two tracks per card, so a short
   last row is centred by starting its first card one track in, with the same gaps as the rest */
@media (min-width: 601px) { html.qb .wgrid { grid-auto-rows: 1fr; } }
@media (min-width: 601px) { html.qb .wcard { grid-column: span 2; } }
@media (min-width: 601px) and (max-width: 900px) { html.qb .wgrid { grid-template-columns: repeat(6, 1fr); } html.qb .wcard:last-child:nth-child(3n + 1) { grid-column: 3 / span 2; } }
@media (min-width: 901px) { html.qb .wgrid { grid-template-columns: repeat(8, 1fr); } html.qb .wcard:last-child:nth-child(4n + 3) { grid-column: span 2; } html.qb .wcard:nth-last-child(3):nth-child(4n + 1) { grid-column: 2 / span 2; } }
/* a press shows what the pointer's hover shows: the pink outline, the corner brackets, the faster drawing */
html.qb .wcard:active { --qfx-bd: var(--qf-signal); }
html.qb .wcard:active::after { opacity: 1; inset: -9px; }
/* touch has no hover: a tapped card must not stay lifted, pink or bracketed afterwards */
@media (hover: none) {
  html.qb .wcard:is(:hover, :focus-visible) { transform: none; }
  html.qb .wcard:hover:not(:active) { --qfx-bd: var(--qf-line-2); }
  html.qb .wcard:hover:not(:active)::after { opacity: 0; inset: -6px; }
}
/* the dropdown menu is the same custom one on touch (it used to hand over to the phone's own picker); its rows get a finger-sized height */
@media (pointer: coarse) { html.qb .ddo, html.qb .ddhl { height: 40px; } }
/* compare chart, phone: the target handle is just the grip arrows and the value (the axis title already says the unit), so it no longer
   reaches over the axis labels; the invisible strip that takes the finger is 44px wide */
@media (max-width: 760px) {
  html.qb .cmptgt { width: 44px; margin-left: -22px; }
  html.qb .cmptgt-tab em, html.qb .cmptgt-tab .cmptgt-u { display: none; }
}

/* ---------- dashboard ---------- */
html.qb #r-dashboard .strip { --qfx-fill: var(--qf-panel); }
/* the stuck filter strip rides just under the shared 64px header, flat (no lifted shadow) */
html.qb #r-dashboard .strip { top: calc(env(safe-area-inset-top, 0px) + 64px); }
html.qb #r-dashboard .strip.stuck { box-shadow: none !important; }
html.qb .legendpanel hr { border: 0; border-top: 1px solid var(--qf-line); }
html.qb .cfgi { font-family: var(--mono); }
html.qb .rc .rg { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--qf-ink-3); }
html.qb .rc .rcv { color: var(--qf-ink); }
html.qb .rc.ratio { --qfx-fill: var(--qf-signal-wash); --qfx-bd: var(--qf-signal); }
html.qb .rc.ratio .rcv { color: var(--qf-signal-ink); }
html.qb .cmpslide .k { color: var(--qf-ink-3); }
html.qb .cmpslide b { color: var(--qf-signal-ink); }
html.qb #footnote, html.qb .hint { font-family: var(--mono); color: var(--qf-ink-3); }

/* ---------- efficiency score (the in-app view) ---------- */
html.qb .e2-eqrow .t.r { --qfx-fill: var(--qf-signal-wash); --qfx-bd: var(--qf-signal); }
html.qb .e2-eqrow .t b { color: var(--qf-ink); }
html.qb .e2-eqrow .op { color: var(--qf-teal); font-family: var(--mono); }
html.qb .e2-eqwhy > summary, html.qb .e2-costwrap > summary { display: inline-flex; color: var(--qf-ink); }
html.qb .e2-eqwhy > summary i.pm, html.qb .e2-costwrap > summary i { border-radius: 0 !important; }
html.qb .e2-dhint { font-family: var(--mono); font-size: 12px; color: var(--qf-ink-3); }

/* ---------- kernel profiling: an instrument readout ----------
   A HUD strip names the step; each bar runs on a tick scale (--kt, one division, set by the page's script) with its time
   read out in mono; the run in the spec sheet below keeps a pink rule, a pink tint and a corner tick on its row.
   Only rows that can be picked react to the pointer; the motion is opacity and transform only. */
html.qb #r-kernel .ktag { color: var(--qf-ink); }
html.qb #r-kernel .ktag::before { content: "◢ "; color: var(--qf-teal); font-size: 8px; vertical-align: .12em; }

/* the HUD strip and the legend */
html.qb #r-kernel .khud { position: relative; align-items: baseline; gap: 6px 26px; padding: 14px 22px 12px; border-bottom: 1px solid var(--qf-line);
  font: 500 10.5px/1.3 var(--mono); letter-spacing: .14em; color: var(--qf-ink-3); }
html.qb #r-kernel .khud::after { content: ""; position: absolute; left: 22px; bottom: -1px; width: 28px; height: 1px; background: var(--qf-signal); }
html.qb #r-kernel .khud b { font-weight: 500; color: var(--qf-ink); letter-spacing: .06em; }
html.qb #r-kernel .steplegend { gap: 8px 20px; padding: 12px 22px 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .04em; color: var(--qf-ink-2); }
html.qb #r-kernel .steplegend i { width: 10px; height: 10px; }

/* the rows: one parts list, ruled */
html.qb #stepRows { position: relative; overflow: clip; padding-bottom: 6px; }
html.qb #stepRows .srow { position: relative; isolation: isolate; gap: 16px; padding: 10px 22px; border: 0 !important; border-bottom: 1px solid var(--qf-line) !important;
  border-radius: 0 !important; background: none !important; box-shadow: none !important; transition: none !important; }
html.qb #stepRows .srow:last-child { border-bottom: 0 !important; }
@media (min-width: 761px) { html.qb #stepRows .srow { grid-template-columns: minmax(240px, 520px) 112px 1fr 104px; } }
html.qb #stepRows .shead { align-items: end; padding-top: 14px; padding-bottom: 8px; border-bottom-color: var(--qf-line-2) !important; }
html.qb #stepRows .shead > div { font: 500 10.5px/1.3 var(--mono) !important; letter-spacing: .14em !important; color: var(--qf-ink-3) !important; }
html.qb #stepRows .shead .htot { text-align: right; }
/* the scale over the bars: a major tick at each division, figures above */
html.qb #stepRows .sscale { height: 17px; margin-top: 6px; letter-spacing: 0;
  background: repeating-linear-gradient(90deg, var(--qf-ink-3) 0 1px, transparent 1px var(--kt)) 0 100% / 100% 5px no-repeat,
    linear-gradient(var(--qf-line-2), var(--qf-line-2)) 0 100% / 100% 1px no-repeat; }
html.qb #stepRows .sscale i { font: 500 10px/1 var(--mono); color: var(--qf-ink-3); }

/* the pick layer: a faint wash under a pickable row while hovered; the shown run's row gets the pink rule and tint */
html.qb #stepRows .srow::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; background: var(--qfx-hover);
  transition: opacity .12s ease-out; }
html.qb #stepRows .srow[data-i]:not(.sel):hover::before { opacity: 1; }
html.qb #stepRows .srow.sel::before { opacity: 1; background: linear-gradient(var(--qf-signal), var(--qf-signal)) 0 0 / 3px 100% no-repeat, var(--qf-signal-wash); }
/* the corner tick: two pink brackets close on the right edge of the shown row */
html.qb #stepRows .srow::after { content: ""; position: absolute; inset: 3px; pointer-events: none; opacity: 0; transform: translateX(-4px);
  transition: opacity .15s ease-out, transform .15s ease-out; --t: var(--qf-signal); --l: 8px;
  background: linear-gradient(var(--t), var(--t)) 100% 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
html.qb #stepRows .srow.sel::after { opacity: 1; transform: none; }
html.qb #stepRows .srow[data-i] { cursor: pointer; }
html.qb #stepRows .srow:focus-visible { outline: 1px solid var(--qf-teal) !important; outline-offset: -4px !important; }
html.qb #stepRows .srow[data-i]:active::before { opacity: 1; }

/* per-row readouts */
html.qb #stepRows .sidx { color: var(--qf-ink-3); letter-spacing: .04em; }
html.qb #stepRows .slab .l1 { color: var(--qf-ink); }
html.qb #stepRows .slab .l1 b { font-weight: 500; }
html.qb #stepRows .badge { border-radius: 0 !important; border-color: var(--qf-line); background: var(--qfx-well); color: var(--qf-ink-2); letter-spacing: .02em; }
html.qb #stepRows .stot { font: 500 13px/1.2 var(--mono); color: var(--qf-ink); font-variant-numeric: tabular-nums; padding-left: 12px; border-left: 1px solid var(--qf-line); }
html.qb #stepRows .srow.sel .sidx, html.qb #stepRows .srow.sel .stot { color: var(--qf-signal-ink); }
html.qb #stepRows .srow.sel .badge { border-color: color-mix(in srgb, var(--qf-signal) 45%, transparent); }

/* the bars: a well with the same divisions as the scale, minor ticks along its foot, hairline joints between operations */
html.qb #stepRows .sbar { height: 16px; border-radius: 0 !important; box-shadow: inset 0 0 0 1px var(--qf-line) !important;
  background: repeating-linear-gradient(90deg, var(--qf-line-2) 0 1px, transparent 1px var(--kt)) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, var(--qfx-tick) 0 1px, transparent 1px calc(var(--kt) / 5)) 0 100% / 100% 3px no-repeat, var(--qfx-well) !important; }
html.qb #stepRows .srow.sel .sbar { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--qf-signal) 55%, transparent) !important; }
html.qb .sfill, html.qb .sfill > div { border-radius: 0 !important; }
html.qb #stepRows .sfill > div + div { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--qf-panel) 60%, transparent); }
html.qb #stepRows .sfill.fresh { animation-duration: .3s; animation-delay: calc(min(var(--i, 0), 14) * 30ms); }
/* the load-in: one pink scan line passes down the readout as the bars draw in */
html.qb #stepRows.scan::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent calc(100% - 36px), color-mix(in srgb, var(--qf-signal) 12%, transparent) calc(100% - 1px), var(--qf-signal) calc(100% - 1px));
  transform: translateY(-100%); animation: kscan .55s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes kscan { 0% { transform: translateY(-100%); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }

/* the spec sheet: a framed panel with teal corner ticks, a mono run counter and ruled fields */
html.qb #stepDetail.on::after { content: ""; position: absolute; inset: -5px; pointer-events: none; --t: var(--qf-teal); --l: 10px;
  background: linear-gradient(var(--t), var(--t)) 0 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
html.qb #stepDetail .dpad { animation: kspec-in .2s ease-out; }
@keyframes kspec-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html.qb #stepDetail .kspec { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--qf-line); position: relative;
  font: 500 10.5px/1.3 var(--mono); letter-spacing: .14em; color: var(--qf-ink-3); }
html.qb #stepDetail .kspec::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 28px; height: 1px; background: var(--qf-signal); }
html.qb #stepDetail .kspec b { color: var(--qf-signal-ink); font-weight: 500; }
html.qb #stepDetail dl { gap: 0 22px; margin-top: 30px; }
html.qb #stepDetail dl > div { position: relative; padding: 10px 0 12px; border-top: 1px solid var(--qf-line); }
html.qb #stepDetail dl > div::before { content: ""; position: absolute; left: 0; top: -1px; width: 14px; height: 1px; background: var(--qf-teal); }
html.qb #stepDetail dt { font: 500 10px/1.3 var(--mono); letter-spacing: .14em; color: var(--qf-ink-3); }
html.qb #stepDetail dd { margin-top: 5px; font: 500 14px/1.4 var(--mono); color: var(--qf-ink); }
html.qb #stepDetail table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
html.qb #stepDetail table tbody tr:hover td { background: transparent !important; }
html.qb #stepDetail .kmini { width: 72px; height: 6px; background: var(--qfx-well); box-shadow: inset 0 0 0 1px var(--qf-line); }
html.qb #stepDetail .dot { border-radius: 0; transform: rotate(45deg) scale(.8); }

@media (max-width: 760px) {
  html.qb #r-kernel .khud { gap: 4px 16px; padding: 12px 14px 10px; }
  html.qb #r-kernel .khud::after { left: 14px; }
  html.qb #r-kernel .steplegend { gap: 6px 14px; padding: 10px 14px 6px; }
  html.qb #stepRows .srow { gap: 8px 12px; padding: 10px 14px; }
  html.qb #stepRows .stot { border-left: 0; padding-left: 0; }
  html.qb #stepDetail .kmini { width: 40px; }
  html.qb #stepDetail dl { grid-template-columns: 1fr 1fr; gap: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html.qb #stepRows.scan::after { display: none; }
  html.qb #stepRows .srow::before, html.qb #stepRows .srow::after { transition: none; }
  html.qb #stepDetail .dpad { animation: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  html.qb #r-home .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 28px; }
  html.qb #r-home .hero .qfx-art { order: -1; justify-self: center; max-width: 440px; width: 92%; margin-bottom: 4px; }
  html.qb #r-home .hero h1 { font-size: clamp(42px, 12vw, 64px); }
}
@media (max-width: 767px) {
  html.qb .subnav { margin-top: 14px; }
  html.qb .subnav a:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  html.qb #r-home .hero { margin-top: 10px; padding-top: 18px; }
  html.qb #r-home .hero .qfx-eye { margin-bottom: 14px; }
}

/* ---------- provenance record pages (their own small template, not the app): same palette and lines ---------- */
html:not(.qb) { --paper: #f5f1fc; --panel: #fcfaff; --ink: #1d1640; --ink-2: #3d3570; --ink-3: #6f669e; --line: rgba(45, 30, 110, .16);
  --grid: rgba(45, 30, 110, .05); --signal: #c8166a; --pink: #ff5aa8; --field: #1c1645; --on-field: #ece8ff; --code: #1c1645; --teal: #00a89a; }
html:not(.qb)[data-theme=dark] { --paper: #120d2c; --panel: #1c1544; --ink: #ece8ff; --ink-2: #c4bce6; --ink-3: #8d84b8; --line: rgba(200, 190, 255, .15);
  --grid: rgba(200, 190, 255, .05); --signal: #ff7ab8; --pink: #ff4fa3; --field: #0d0924; --on-field: #ece8ff; --code: #0d0924; --teal: #3ff0dc; }
html:not(.qb) body { background: transparent; }
html:not(.qb) .links a::after { transition: transform .15s ease-out, background-color .15s ease-out; }
html:not(.qb) .links a:hover::after { transform: translate(2px, -2px); }
html:not(.qb) .bar { border-radius: 0; background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; position: relative;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
html:not(.qb) .bar a { border-radius: 0; }
html:not(.qb) .eyebrow { color: var(--teal); letter-spacing: .16em; }
html:not(.qb) .eyebrow::before { width: 7px; height: 7px; transform: rotate(45deg); }
html:not(.qb) h1 { font-weight: 400; letter-spacing: -.05em; }
html:not(.qb) .frame { border-radius: 0; }
html:not(.qb) .frame::before { --t: var(--teal); }
html:not(.qb) pre { border-radius: 0; box-shadow: inset 2px 0 0 var(--pink); color: #ece8ff; }
html:not(.qb) .links a::after { border-radius: 0; }
html:not(.qb) .links a.primary { border-radius: 0; background: var(--ink); color: var(--paper); transition: background-color .15s ease-out, color .15s ease-out;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
html:not(.qb) .links a.primary::after { background: var(--pink); color: #1d1640; }
html:not(.qb) .links a.primary:hover { background: var(--pink); color: #1d1640; }
html:not(.qb) .links a.primary:hover::after { background: #1d1640; color: var(--pink); }
html:not(.qb) footer::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--pink) 30%, #3ff0dc 70%, transparent); }
/* no full-width rules across the page under the hero */
html.qb #r-home .hero::before, html.qb #r-home .hero::after { display: none !important; }

/* ===== hud3 (12 Nov): the dashboard's stuck strip and results table ===== */
/* stuck under the header, the strip's cut corners show the page colour, never the content scrolling beneath them:
   the chamfer's own backing layer (common.css, --qfx-back) fills its whole box, so the outline stays a closed cut */
html.qb #r-dashboard .strip.stuck { --qfx-back: var(--qf-paper); }
/* the heading row is opaque and keeps its rule while rows scroll under it */
html.qb .page #table th { background: var(--qf-panel) !important; border-bottom: 0 !important; box-shadow: inset 0 -1px 0 var(--qf-line-2); }
html.qb .page #table th .tg { color: var(--qf-ink-2); }
html.qb .page #table .tk button { font: 500 10px/1.3 var(--mono); letter-spacing: .1em; color: var(--qf-ink-3); }
html.qb .page #table .tk.one button { font-size: 10.5px; letter-spacing: .14em; color: var(--qf-ink-2); }
html.qb .page #table .tk button:hover, html.qb .page #table .tk button.sorted { color: var(--qf-signal-ink); }
html.qb .page #table td .tv i { font-family: var(--mono); color: var(--qf-ink-3); }
html.qb .page #table td .tv.sorted, html.qb .page #table td .tsub .sorted { color: var(--qf-signal-ink); }
html.qb .page #table td .tsub { color: var(--qf-ink-3); }
html.qb .page #table td .dot { border-radius: 0; transform: rotate(45deg) scale(.8); }
/* rows: a wash under the pointer; the run open in the detail card gets the pink rule, a tint and four corner ticks */
html.qb .page #table tbody td { position: relative; overflow: hidden; }
html.qb .page #table tbody tr.on td { background: var(--qf-signal-wash) !important; }
html.qb .page #table tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--qf-signal) !important; }
html.qb .page #table tbody tr td:is(:first-child, :last-child)::after { content: ""; position: absolute; inset: 3px; pointer-events: none; opacity: 0; --t: var(--qf-signal); --l: 8px; }
html.qb .page #table tbody tr td:first-child::after { left: 6px;
  background: linear-gradient(var(--t), var(--t)) 0 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 0 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 0 100% / 1px var(--l); background-repeat: no-repeat; }
html.qb .page #table tbody tr td:last-child::after {
  background: linear-gradient(var(--t), var(--t)) 100% 0 / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 0 / 1px var(--l),
    linear-gradient(var(--t), var(--t)) 100% 100% / var(--l) 1px, linear-gradient(var(--t), var(--t)) 100% 100% / 1px var(--l); background-repeat: no-repeat; }
html.qb .page #table tbody tr.on td:is(:first-child, :last-child)::after { opacity: 1; }
/* the lock-on, once, when a run is chosen: the brackets close in from just outside and one scan line runs down the row */
html.qb .page #table tbody tr.lock td:first-child::after { animation: qfx-row-lock-l .2s ease-out both; }
html.qb .page #table tbody tr.lock td:last-child::after { animation: qfx-row-lock-r .2s ease-out both; }
html.qb .page #table tbody tr.lock td::before { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateY(-100%);
  background: linear-gradient(180deg, transparent calc(100% - 12px), color-mix(in srgb, var(--qf-signal) 16%, transparent) calc(100% - 1px), var(--qf-signal) calc(100% - 1px));
  animation: qfx-row-scan .32s ease-out .06s both; }
@keyframes qfx-row-lock-l { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes qfx-row-lock-r { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
@keyframes qfx-row-scan { 0% { opacity: 1; transform: translateY(-100%); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  html.qb .page #table tbody tr.lock td::before { display: none; }
  html.qb .page #table tbody tr.lock td::after { animation: none !important; }
}

/* ===== phone scale (12 Nov): Efficiency score settings and the dashboard's price panels fit 360-430 wide ===== */
@media (max-width: 600px) {
  /* Prices and assumptions: the drawer's content was centred at its own min-content width (the nowrap token table), so it spilled out
     of the card on both sides; it now takes the card's width, and the token table becomes one block per model */
  html.qb .e2-costwrap { align-items: stretch; }
  html.qb .e2-costwrap > summary { align-self: center; }
  html.qb .e2-costwrap::details-content { min-width: 0; }
  html.qb .e2-costs { min-width: 0; max-width: 100%; box-sizing: border-box; }
  html.qb .e2-costs .scroll { overflow: visible; max-width: 100%; }
  html.qb .e2-costs .e2-dlbl { gap: 8px; }
  html.qb .e2-costs .e2-btns { margin: 0; width: auto; }
  /* the shared assumption fields (write off, resale, power): one grid, so label, field and unit line up in the same three columns on every row */
  html.qb .e2-shared { gap: 10px; }
  html.qb .e2-shared label, html.qb .e2-shared label:has(select) { display: grid; grid-template-columns: minmax(0, 1fr) 104px 58px; align-items: center; column-gap: 8px; min-height: 44px; font-size: 13px; line-height: 1.25; white-space: normal; }
  html.qb .e2-shared label > :is(input, select) { grid-column: 2; width: 104px; height: 44px; max-width: none; min-width: 0; box-sizing: border-box; margin: 0; }
  html.qb .e2-gcard input { width: 100%; min-width: 96px; max-width: 132px; }
  html.qb .e2-tok, html.qb .e2-tok thead, html.qb .e2-tok tbody { display: block; width: 100%; }
  html.qb .e2-tok tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 8px; row-gap: 4px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--qf-line); }
  html.qb .e2-tok th, html.qb .e2-tok td { display: block; position: static; padding: 0; border: 0; text-align: left; white-space: nowrap; min-width: 0; }
  html.qb .page table.e2-tok :is(th, td) { border-bottom: 0 !important; }
  html.qb .e2-tok thead tr { padding: 0 0 6px; border-bottom: 1px solid var(--qf-line-2); }
  html.qb .e2-tok thead th:first-child, html.qb .e2-tok thead th:last-child { display: none; }
  html.qb .e2-tok tbody th { grid-column: 1 / 3; grid-row: 1; white-space: normal; overflow-wrap: anywhere; }
  html.qb .e2-tok tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  html.qb .e2-tok tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  html.qb .e2-tok tbody td:nth-child(4) { grid-column: 3; grid-row: 2; }
  html.qb .e2-tok tbody td[colspan] { grid-column: 1 / -1; grid-row: 2; }
  html.qb .e2-tok tbody td:last-child { grid-column: 3; grid-row: 1; justify-self: end; }
  html.qb #e2Title { font-size: 20px; }
  html.qb #e2Sub { font-size: 13px; }
  /* Busy time and Price window: equal halves, both fields 44px tall, labels on one line */
  html.qb .e2-row { display: flex; align-items: flex-end; gap: 12px; }
  html.qb .e2-row > div { flex: 1 1 0; min-width: 0; }
  html.qb .e2-row .e2-num, html.qb .e2-row .dd, html.qb .e2-row select { width: 100%; height: 44px; min-height: 44px; box-sizing: border-box; }
  /* the ranking's name and setup lines wrap instead of ending in an ellipsis */
  html.qb .e2-li .n b, html.qb .e2-li .n i, html.qb .e2-li .n .ev { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
}
@media (max-width: 899px) {
  /* below 900px the strip is not sticky (qf-bench.css), but its top offset still pushed it 64px down over the row beneath */
  html.qb #r-dashboard .strip { top: auto; }
  html.qb .dd > select.auto { min-width: 0; width: 100%; }
}
@media (max-width: 600px) {
  /* the chart's footnote sat on the card's border; it gets the card's inset */
  html.qb #r-dashboard .card.hard .hint { padding: 8px 14px 10px; }
}
@media (max-width: 899px) {
  /* dashboard: GPU prices and Token prices open inline under their buttons, full width, instead of floating off the right edge */
  html.qb #r-dashboard .pops { margin-left: 0; width: 100%; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  html.qb #r-dashboard .pricesd { position: static; }
  html.qb #r-dashboard .pricesd[open] { flex: 1 1 100%; }
  html.qb #r-dashboard .pricesd .pcard, html.qb #r-dashboard .pricesd .pcard.slim { position: relative; right: auto; top: auto; width: auto; max-width: 100%; box-sizing: border-box; margin-top: 8px; transform-origin: top left; }
}

/* ===== laptop and desktop (601px up): the Prices and assumptions drawer fills the card ===== */
@media (min-width: 601px) {
  html.qb .e2-costwrap { align-items: stretch; }
  html.qb .e2-costwrap > summary { align-self: center; }
  html.qb .e2-costs { min-width: 0; max-width: 100%; box-sizing: border-box; }
  html.qb .e2-gcards { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
  html.qb .e2-shared { gap: 10px 28px; }
  html.qb .e2-formulas { border-top: 1px solid var(--qf-line); padding-top: 14px; margin-top: 22px; }
  html.qb .page table.e2-tok tbody th { border-bottom: 1px solid var(--qf-line) !important; }
}
/* narrow cards (four across at 900-1179): the field label sits above its input instead of wrapping beside it */
@media (min-width: 601px) and (max-width: 1179px) {
  html.qb .e2-gcard label { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; }
  html.qb .e2-gcard input { width: 100%; box-sizing: border-box; }
}
/* two columns where the card is wide enough: GPU cost (cards, then the shared fields) on the left, token prices on the right, the
   formulas across the foot in two columns */
@media (min-width: 1180px) {
  html.qb .e2-costs { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
  html.qb .e2-costs > .e2-dlbl:first-child { grid-column: 1; grid-row: 1; }
  html.qb .e2-costs > .e2-gcards { grid-column: 1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.qb .e2-costs > .e2-shared { grid-column: 1; grid-row: 3; margin-top: 18px; }
  html.qb .e2-costs > .e2-dlbl:not(:first-child) { grid-column: 2; grid-row: 1; margin-top: 0 !important; }
  html.qb .e2-costs > .scroll { grid-column: 2; grid-row: 2 / span 2; }
  html.qb .e2-costs > .e2-formulas { grid-column: 1 / -1; grid-row: 4; columns: 2; column-gap: 48px; }
  html.qb .e2-costs > .e2-formulas p { break-inside: avoid; }
  html.qb .e2-tok th, html.qb .e2-tok td { padding: 8px 12px; }
}

/* ===== phone scale (12 Nov): the build-record pages (provenance) use the shared hero title and lede sizes ===== */
@media (max-width: 600px) {
  html:not(.qb) h1 { font-size: var(--qf-h1-phone); font-weight: 400; line-height: .96; }
  html:not(.qb) .lede { font-size: var(--qf-lede-phone); }
}
@media (max-width: 600px) {
  html:not(.qb) main { padding-top: 52px; }
  html:not(.qb) h1 { margin-top: 14px; }
  html:not(.qb) .lede { margin-top: 26px; }
}

/* ===== phone type floor (12 Nov): HUD labels are 11px, readable notes 12px (nothing below that) ===== */
@media (max-width: 600px) {
  html.qb .lbl, html.qb .e2-dlbl, html.qb .e2-costs .lbl, html.qb .e2-days, html.qb #e2Ticks > span { font-size: 11px; }
  html.qb #e2CV, html.qb #e2Ticks > span.on, html.qb .e2-gcard > b small, html.qb #r-dashboard .hint, html.qb #r-dashboard .card small { font-size: 12px; }
  html.qb .page table.e2-tok :is(th, td) { font-size: 12px !important; }
  html.qb .page table.e2-tok :is(thead th, tbody th) { font-size: 11px !important; }
}
