/* Palette Girlies, lab.css (V2, phase 10, nov 2026): /test, /tests and every page under /tests.
   The October lab (cool light box, grid, window light, the window/bulb switch, instrument cards with a ruler) is gone: the pages read like the rest of
   the site, on paper, with the page grammar of site.css (.ph-hero .ph-split .ph-faq .ph-links .ph-close). What stays here:
   1. the old --lab-* names, mapped to the tokens, so the tool sheets (test.css, quick-read.css, your-frame.css, style-word.css, color-check.css, games.css)
      keep working; 2. the stage, the one surface with a radius, where a tool runs; 3. the hub's list of tools; 4. the light table of the test's light
      screen (the same cards under the window and under a lamp, a circle she drags); 5. the change of screen as a view transition.
   Swatches and the gray strip stay flat and exact. Loaded after the tool's own sheet, so these rules win. */

body.lab {
  --lab-ink: var(--ink);
  --lab-sub: var(--ink-2);
  --lab-edge: var(--line-2);
  --lab-tick: var(--graphite);
  --lab-accent: var(--berry);
  --lab-box: var(--paper-2);
  --lab-head: var(--paper-2);
  --lab-lit: var(--card);
  --lab-lamp: var(--gold);
  --stage-pad: clamp(18px, 4vw, 44px);
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 2. the stage: where a tool runs ---------- */
.lab-run { padding: 0 0 var(--s6); }
.lab-stage-box { max-width: 860px; padding: var(--stage-pad); border-radius: var(--r-lg); background: var(--paper-2); }
.lab-stage-box .mini { max-width: none; margin: 0; }
.lab .mt-card { padding: 0; background: transparent; box-shadow: none; border-radius: 0; gap: var(--s3); }
.lab .mini-q { font: 400 clamp(24px, 3vw, 34px)/1.12 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.lab .mini-count { display: inline-flex; align-items: center; gap: 12px; font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.lab .mini-count::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.lab .mini-dots { gap: 3px; }
.lab .mini-dots li { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--line-2); transition: background-color .3s var(--ease); }
.lab .mini-dots li.done { background: var(--ink); }
.lab .mini-dots li.skip { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.lab .mini-dots li.now { background: var(--berry); box-shadow: none; }
.lab .mini-help summary, .lab .lab-stage-box .ed-fold > summary { font: 600 13px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--berry); }
.lab .mini-help p { font-size: var(--fs-3); }
.lab .mini-skip { font-size: var(--fs-2); color: var(--ink-2); }
.lab .mini-why { font-size: var(--fs-2); color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line); }
.lab .mini-in { animation: none; }
.lab .mini-big { color: var(--ink); }
.lab .btn-ghost { min-height: 48px; padding: 12px 22px; background: transparent; border: 1px solid var(--ink); border-radius: var(--r-pill); color: var(--ink); font: 600 15px/1.2 var(--sans); }
.lab .btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* the answers and the notes inside a page body */
.lab .answer, .lab .rule, .lab .myth { margin: 0; padding: var(--s4) 0 0; border: 0; border-top: 1px solid var(--line); border-image: none; border-radius: 0; background: none; }
.lab .answer::after { display: none; }
.lab .answer-label { font: 600 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.lab .myth-claim { background: none; font: 400 clamp(22px, 2.4vw, 30px)/1.2 var(--serif); letter-spacing: -.015em; }
.lab .myth-verdict, .lab .rule-why, .lab .rule-seal { margin-top: var(--s2); color: var(--ink); }
.lab .rule-do { font: 400 clamp(22px, 2.4vw, 30px)/1.2 var(--serif); letter-spacing: -.015em; }
.lab .ph-body .ed-fold > summary, .lab .ph-body .no-why > summary { cursor: pointer; font: 600 13px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--berry); }
.lab .ph-body .ed-fold > p, .lab .ph-body .no-why > p { margin-top: var(--s2); }

/* ---------- 3. the hub: the main test, then the tools as hairline rows with a photograph ---------- */
.lab-tools { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lab-tools > li { border-bottom: 1px solid var(--line); }
.lab a.tool { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "no name" "no line" "no time"; gap: 4px var(--s3); align-items: baseline; padding: var(--s4) 0; color: var(--ink); text-decoration: none; }
.lab a.tool .tool-no { grid-area: no; font: 600 13px/1 var(--sans); letter-spacing: .08em; color: var(--graphite); }
.lab a.tool .tool-name { grid-area: name; font: 400 clamp(24px, 2.8vw, 36px)/1.08 var(--serif); letter-spacing: -.02em; transition: color .3s var(--ease); }
.lab a.tool .tool-name::after { content: " \2192"; font: 400 .6em/1 var(--sans); color: var(--berry); }
.lab a.tool .tool-line { grid-area: line; max-width: 46ch; font-size: var(--fs-3); line-height: 1.5; color: var(--ink); }
.lab a.tool .tool-time { grid-area: time; font: 600 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.lab a.tool .lab-plate { display: none; }
.lab a.tool:hover .tool-name { color: var(--berry); }
@media (min-width: 720px) {
  .lab a.tool { grid-template-columns: 64px minmax(0, 1fr) 200px; grid-template-areas: "no name plate" "no line plate" "no time plate"; }
  .lab a.tool .lab-plate { display: block; grid-area: plate; align-self: center; margin: 0; }
  .lab a.tool .lab-plate img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); }
}
.lab .sysmap--strip { margin: 0; padding: var(--s4) 0 0; border: 0; border-top: 1px solid var(--line); border-image: none; border-radius: 0; background: none; }
.lab .sm-strip-head { align-items: center; padding-bottom: 8px; }
.lab .sm-strip-count { font: 600 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.lab .sm-tiles { margin-top: 10px; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lab .sm-tile .sm-link { min-height: 64px; padding: 10px 12px; background: transparent; border: 1px dashed var(--line-2); border-radius: var(--r-sm); text-decoration: none; }
.lab .sm-tile[data-state="filled"] .sm-link { background: var(--card); border: 1px solid var(--line-2); }
.lab .sm-tile .sm-name { font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.lab .sm-tile .sm-val { font: 400 18px/1.2 var(--serif); color: var(--berry); }
.lab .sm-tile[data-state="filled"] .sm-val { color: var(--ink); }
.lab .sm-tile--word { grid-column: 1 / -1; }
@media (min-width: 640px) { .lab .sm-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } .lab .sm-tile--word { grid-column: auto; } }

/* a plate: a photograph in the page (the hub's rows, the result of a tool) */
.lab-plate { margin: 0; }
.lab-plate img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }

/* a row of two gray steps: how far apart the features sit (exact steps of the gray strip) */
.lab-gap { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lab-gap li { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-3); }
.lab-gap b { display: block; font: 400 clamp(22px, 2.4vw, 28px)/1.1 var(--serif); letter-spacing: -.015em; }
.lab-pair { display: grid; grid-template-columns: 1fr 1fr; height: 56px; overflow: hidden; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); }
.lab-pair i { display: block; background: var(--a); }
.lab-pair i + i { background: var(--b); }

/* ---------- 4. the light table: the same cards under the window and under a lamp, the other light inside a circle she moves (site/js/lab.js) ---------- */
.lab-stage { position: relative; height: 196px; overflow: hidden; border-radius: var(--r-md); background: #E9EEF3; cursor: crosshair; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lab-lit { position: absolute; inset: 0; pointer-events: none; background: #F6E3BE;
  -webkit-mask-image: radial-gradient(circle at var(--lx, 70%) var(--ly, 46%), #000 0 70px, transparent 71px); mask-image: radial-gradient(circle at var(--lx, 70%) var(--ly, 46%), #000 0 70px, transparent 71px); }
.lab-cards { position: absolute; left: 0; right: 0; top: 28px; display: flex; justify-content: center; gap: 14px; margin: 0; padding: 0 12px; list-style: none; z-index: 1; pointer-events: none; }
.lab-cards li { display: grid; justify-items: center; align-content: start; gap: 8px; }
.lab-cards li i { display: block; width: 64px; height: 84px; border-radius: var(--r-sm); background: var(--c); box-shadow: inset 0 0 0 1px var(--line); }
.lab-cards li span { font: 600 12.5px/1.15 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-align: center; min-height: 2.3em; }
.lab-lens { position: absolute; left: var(--lx, 70%); top: var(--ly, 46%); z-index: 2; width: 142px; height: 142px; margin: -71px 0 0 -71px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: none; cursor: grab; display: none; place-items: center; }
.lab-lens::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: var(--ink); }
.lab-stage.is-live .lab-lens { display: grid; }
.lab-stage.is-held .lab-lens { cursor: grabbing; }
.lab-lens:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
.lab-stage-cap { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; margin: 0; font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); pointer-events: none; }
.lab-stage-cap span { padding: 3px 8px; border-radius: var(--r-sm); background: rgba(255, 253, 248, .9); }
@media (min-width: 720px) {
  .lab-stage { height: 230px; }
  .lab-cards { gap: 28px; top: 38px; }
  .lab-cards li i { width: 80px; height: 104px; }
}

/* the gray strip of the one minute contrast, with a rule under it that fills up to her step */
.lab .strip9 { height: 92px; padding: 6px; border-radius: var(--r-sm); box-shadow: none; border: 1px solid var(--line-2); margin-bottom: 14px; --n: 0; background: var(--card); }
.lab .strip9:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; box-shadow: none; }
.lab .strip9-frame { border-color: var(--ink); border-width: 3px; border-radius: var(--r-sm); }
.lab .strip9-frame::after { background: var(--ink); border-radius: 2px; }
.lab .strip9-fill { position: absolute; left: 0; right: 0; bottom: -10px; height: 3px; border-radius: 2px; background: var(--line-2); pointer-events: none; }
.lab .strip9-fill::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--n) / 9 * 100%); border-radius: 2px; background: var(--ink); transition: width .22s var(--ease); }
.lab .strip9-picked { font: 600 var(--fs-3)/1.3 var(--sans); font-style: normal; margin-top: 4px; }

/* ---------- 5. a change of screen: the new one comes in from the window side, as a view transition ---------- */
.lab .lab-view { view-transition-name: lab-screen; }
::view-transition-group(lab-screen) { animation-duration: .36s; animation-timing-function: var(--ease); }
::view-transition-old(lab-screen) { animation: lab-out .26s ease-in both; }
::view-transition-new(lab-screen) { animation: lab-in .38s var(--ease) both; }
@keyframes lab-out { to { opacity: 0; transform: translateX(-10px); } }
@keyframes lab-in { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .lab .strip9-fill::after { transition: none; }
  ::view-transition-group(lab-screen), ::view-transition-old(lab-screen), ::view-transition-new(lab-screen) { animation: none; }
}
@media (forced-colors: active) { .lab-stage-box, .lab-pair { border: 1px solid CanvasText; } }
