/* The playground. Layout for the experiments only: colours, type, spacing and controls are g-design and fasra.css. */
body.pl { margin: 0; background: var(--surface-2); color: var(--text-primary); }
.pl code { font-family: var(--font-mono); font-size: 13px; line-height: var(--lh-1); color: var(--text-secondary); white-space: nowrap; }
.pl b { font-weight: 500; }
.pl-frame { max-width: var(--frame); margin: 0 auto; padding: 0 var(--gutter) var(--sp-8); box-sizing: border-box; }

/* Head of the page */
.pl-hero { padding: var(--sp-8) 0 0; }
.pl-hero h1 { margin: 0; font-family: var(--font-brand); font-weight: 400; font-size: 48px; line-height: 56px; letter-spacing: -0.01em; }
.pl-hero > p { margin: var(--sp-4) 0 0; max-width: 40em; font-size: 16px; line-height: 28px; }
.pl-toc { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle); font-size: 13px; line-height: var(--lh-2); }
.pl-toc a { display: inline-flex; align-items: center; min-height: var(--h-1); text-decoration: none; color: var(--text-secondary); transition: color var(--dur-base) var(--ease-out); }
.pl-toc a:hover { color: var(--leaf-text); }

/* Sections: a head, then the stage beside its controls */
.pl-sec { padding-top: var(--sp-8); scroll-margin-top: var(--sp-5); }
.pl-head { margin-bottom: var(--sp-5); }
.pl-head h2 { margin: 0; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -0.02em; }
.pl-head p { margin: var(--sp-3) 0 0; max-width: 40em; font-size: 15px; line-height: var(--lh-3); }
.pl-panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-5); align-items: start; }
.pl-stage { position: relative; min-width: 0; padding: 0; overflow: hidden; scroll-margin: var(--sp-5); }
.pl-ctl { display: grid; gap: var(--sp-5); min-width: 0; }
.pl-field { display: grid; gap: var(--sp-2); }
.pl-lbl { font-size: 13px; line-height: var(--lh-2); font-weight: 500; color: var(--text-primary); }
.pl-field .g-slider { margin-top: calc(-1 * var(--sp-2)); }
.pl-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pl-wrapseg { flex-wrap: wrap; height: auto; }
.pl-method { margin: 0; padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle); font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.pl-method b { display: block; color: var(--text-primary); }
.pl-foot { margin-top: var(--sp-8); padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle); font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.pl-foot p { margin: 0; }

/* Labels arrive under a soft edge that sweeps across them and leave the same way. */
.wipe { -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%); mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0; transition: -webkit-mask-position 560ms var(--ease-out), mask-position 560ms var(--ease-out); }
.wipe.in { -webkit-mask-position: 0 0; mask-position: 0 0; }

/* 1. Isometric map */
.pl-iso { padding: var(--sp-4); }
.iso-wrap { position: relative; height: 420px; transition: height 560ms var(--ease-out); }
.iso-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.iso-hub { cursor: pointer; outline: none; }
.iso-hub:focus-visible .iso-top { stroke: var(--focus-ring); stroke-width: 2; }
.iso-row { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); box-sizing: border-box; height: var(--lh-2); padding: 0 var(--sp-2); margin-top: calc(var(--lh-2) / -2); border: 0; border-radius: var(--radius); background: none; font: inherit; font-size: 13px; line-height: var(--lh-2); color: var(--text-primary); text-align: left; white-space: nowrap; cursor: pointer; }
.iso-row:hover { background: var(--fill-active); }
.iso-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.iso-row .n { overflow: hidden; text-overflow: ellipsis; }
.iso-row .c { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.iso-row.kid { font-size: 12px; cursor: default; }
.iso-row.kid:hover { background: none; }
.iso-row.open .n { font-weight: 500; }
.iso-row.locked .n, .iso-row.locked .c { color: var(--text-secondary); }
.iso-band { position: absolute; left: 0; top: 0; font-size: 12px; line-height: var(--lh-1); font-weight: 500; color: var(--text-secondary); white-space: nowrap; padding: 0 var(--sp-2); }

/* 2. Node forms */
.pl-forms { padding: var(--sp-4) var(--sp-5); }
.forms { display: grid; gap: 0; }
.form-row { display: grid; grid-template-columns: 120px repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--sp-4); min-height: 88px; padding: var(--sp-3) 0; border-top: 1px solid var(--border-subtle); }
.form-row:first-child { border-top: 0; }
.form-row.head { min-height: 0; padding: 0 0 var(--sp-2); font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.form-name b { display: block; font-size: 14px; line-height: var(--lh-2); }
.form-name span { display: block; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.form-set { display: flex; align-items: center; gap: var(--sp-5); min-width: 0; }
.form-set canvas, .form-set .orb { flex: none; }
.form-set .orb.lit-ref { outline: 2px solid color-mix(in oklab, var(--leaf) 55%, transparent); outline-offset: 0; }

/* 3. Growth */
.grow-stage { position: relative; height: 360px; }
.grow-canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.grow-parts { position: absolute; inset: 0; }
.grow-parts > * { position: absolute; }
.grow-card { left: 8%; top: 64px; width: 260px; display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); box-sizing: border-box; }
.grow-card h3 { margin: 0; font-size: 15px; line-height: var(--lh-3); font-weight: 500; }
.grow-card p { margin: 0; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.grow-card .num { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.grow-btn { right: 12%; top: 76px; }
.grow-input { left: 30%; right: 22%; bottom: 72px; width: auto; height: var(--h-4); box-sizing: border-box; }

/* 4. Dithering */
.pl-dith { padding: var(--sp-4); }
.dith { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.dith figure { margin: 0; min-width: 0; }
.dith canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius); image-rendering: pixelated; background: var(--surface-2); }
.dith figcaption { margin-top: var(--sp-2); font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }

/* 5. Backgrounds */
.bg-fig { margin: 0; min-width: 0; }
.bg-box { position: relative; height: 300px; padding: 0; overflow: hidden; }
.bg-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-box.flat { background-image: radial-gradient(var(--slate-a5) 1px, transparent 1.5px); background-size: 8px 8px; }
.bg-copy { position: absolute; left: var(--sp-5); right: var(--sp-5); bottom: var(--sp-5); }
.bg-copy h3 { margin: 0; font-size: 20px; line-height: var(--lh-4); font-weight: 500; letter-spacing: -0.01em; }
.bg-copy p { margin: var(--sp-1) 0 var(--sp-4); font-size: 14px; line-height: var(--lh-2); color: var(--text-secondary); }
.bg-fig figcaption { margin-top: var(--sp-3); font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.bg-fig figcaption b { color: var(--text-primary); }
.bg-cost { margin-top: var(--sp-1); font-family: var(--font-mono); line-height: var(--lh-1); }

@media (max-width: 960px) {
  .pl-panel { grid-template-columns: minmax(0, 1fr); }
  .pl-ctl { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
  .pl-method { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  .pl-hero { padding-top: var(--sp-6); }
  .pl-hero h1 { font-size: 40px; line-height: 48px; }
  .pl-sec { padding-top: var(--sp-7); }
  .pl-head h2 { font-size: 24px; line-height: 32px; }
  .pl-ctl { grid-template-columns: minmax(0, 1fr); }
  .pl-forms { padding: var(--sp-3) var(--sp-4); }
  .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "n n" "a b"; gap: var(--sp-2) var(--sp-4); }
  .form-row .form-name { grid-area: n; }
  .form-row.head { grid-template-areas: "a b"; }
  .form-row.head > :first-child { display: none; }
  .form-set { gap: var(--sp-3); }
  .grow-stage { height: 440px; }
  .grow-card { left: 16px; right: 16px; top: 40px; width: auto; }
  .grow-btn { left: 16px; right: auto; top: 200px; }
  .grow-input { left: 16px; right: 16px; bottom: 64px; }
  .dith { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
  /* Every control is a 40px target on a phone. */
  .pl .btn, .pl .g-segmented > label, .pl .select { height: var(--h-4); }
  .pl .g-segmented { height: auto; }
  .pl .g-slider input[type="range"] { height: var(--h-4); margin: -12px 0 0; }
  .pl .g-slider input[type="range"]::-webkit-slider-runnable-track { height: var(--h-4); }
  .pl .g-slider input[type="range"]::-webkit-slider-thumb { margin-top: 24px; }
  .pl-toc a { min-height: var(--h-4); }
}
@media (prefers-reduced-motion: reduce) {
  .wipe, .iso-wrap { transition: none; }
}

/* What a reader learns from an asset, above its method */
.pl-learn { margin: 0; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.pl-learn b { display: block; color: var(--text-primary); }

/* 3a. Moss rim */
.rim-pair { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-7); padding: var(--sp-6) var(--sp-6) var(--sp-5); border-bottom: 1px solid var(--border); }
.rim-pair figure { position: relative; margin: 0; }
.rim-pair figcaption { margin-top: var(--sp-5); font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.rim-stage { position: relative; padding: var(--sp-6); }
.rim-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.rim-cards { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
.rim-card { padding: var(--sp-4); }
.rim-card h3 { margin: 0 0 var(--sp-1); font-size: 15px; line-height: var(--lh-3); font-weight: 500; }
.rim-card p { margin: 0; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.rim-card .num { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rim-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-6); margin-top: var(--sp-6); }
.rim-load { display: flex; align-items: center; gap: var(--sp-4); }
.rim-load .num { min-width: 21ch; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
@media (max-width: 699px) {
  .rim-stage { padding: var(--sp-5) var(--sp-4); }
  .rim-pair { gap: var(--sp-6); padding: var(--sp-6) var(--sp-5) var(--sp-5); }
  .rim-cards { gap: var(--sp-5) var(--sp-4); }
  .rim-row { flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
}

/* 2a. Organised dust */
.dust-stage { display: grid; gap: var(--sp-4); padding: var(--sp-4); }
.dust-box { height: 340px; }
.dust-lbls { position: absolute; inset: 0; pointer-events: none; }
.dust-lbls > span { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
/* Labels sit on the tile's own colour, the halo the contour labels use, so a link passing under one never cuts the words. */
.dust-lbls > span { background: var(--surface-1); padding: 0 var(--sp-1); border-radius: 3px; box-shadow: 0 0 0 2px var(--surface-1); }
.dust-lbls b { font-weight: 500; color: var(--text-primary); }
.dust-lbls .num { font-variant-numeric: tabular-nums; }
.dust-lbls > span.two { text-align: center; }
.dust-lbls > span.two > b { display: block; }
@media (max-width: 699px) {
  .dust-stage { padding: var(--sp-3); }
}

/* 1b. Counted cubes */
.cnt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-4); padding: var(--sp-4) 0; align-items: end; }
.cnt[hidden], .iso-wrap[hidden], .pl-field[hidden] { display: none; }
.cnt-hub { margin: 0; display: grid; justify-items: center; gap: var(--sp-3); min-width: 0; }
.cnt-hub svg { display: block; overflow: visible; }
.cnt-hub figcaption { display: grid; justify-items: center; text-align: center; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.cnt-hub b { font-size: 13px; line-height: var(--lh-2); font-weight: 500; color: var(--text-primary); }
.cnt-key { color: var(--text-primary); font-variant-numeric: tabular-nums; }
@media (max-width: 699px) { .cnt { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-set { flex-wrap: wrap; } }

/* 3b. Survey drawings */
.sv-block { display: grid; gap: var(--sp-4); padding: var(--sp-4) 0; min-width: 0; }
.sv-h { margin: 0; font-size: 14px; line-height: var(--lh-2); font-weight: 500; }
.sv-q { margin: calc(-1 * var(--sp-2)) 0 0; max-width: 62ch; font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.sv-more { margin-top: var(--sp-7); }
.sv-more > summary { display: inline-flex; width: max-content; list-style: none; }
.sv-more > summary::-webkit-details-marker { display: none; }
.sv-more[open] > summary { margin-bottom: var(--sp-5); }
@media (max-width: 699px) { .sv-more > summary { min-height: 40px; } }
.strata { display: flex; flex-wrap: wrap; gap: var(--sp-6); align-items: flex-end; }
.core { margin: 0; display: grid; justify-items: center; gap: var(--sp-2); min-width: 72px; }
.core svg { display: block; }
.core figcaption { display: grid; justify-items: center; text-align: center; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.core b { font-size: 13px; line-height: var(--lh-2); font-weight: 500; color: var(--text-primary); }
/* Cards share the stage's width in equal columns, each core centred in its own, so no band is left empty at the end. */
@media (min-width: 700px) { .strata:not(.section) { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); justify-items: center; } }
.strata.section { flex-wrap: nowrap; gap: 0; }
.strata.section .core { flex: 1 1 0; min-width: 0; }
.strata.section .core svg { width: 100%; height: 180px; }
.strata.section .core svg rect:last-child { display: none; }
.strata.section .core figcaption { padding: 0 var(--sp-1); }
.veins { min-width: 0; }
.veins svg { display: block; max-width: 100%; height: auto; }
.vein { transition: stroke-dashoffset 560ms var(--ease-out) var(--d); }
.vein-end { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 300ms var(--ease-out) var(--d); }
.grown .vein { stroke-dashoffset: 0; }
.grown .vein-end { transform: scale(1); }
.contour { position: relative; height: 320px; min-width: 0; }
.contour canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ct-lbls > span { position: absolute; font-size: 12px; line-height: var(--lh-1); white-space: nowrap; color: var(--text-secondary); background: var(--surface-1); padding: 2px var(--sp-1); margin-top: -2px; border-radius: 3px; box-shadow: 0 0 0 2px var(--surface-1); }
.ct-lbls b { color: var(--text-primary); font-weight: 500; }
.ct-key { margin: 0; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
@media (max-width: 699px) {
  .strata { gap: var(--sp-4); }
  .strata.section .core figcaption { font-size: 12px; }
  .contour { height: 420px; }
}

/* Swaps: the old picture's copy sits over the new one while it is swept off. */
.dust-cover { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.dust-cover > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html.pl-theme-sweep::view-transition-old(root) { animation: none; }
html.pl-theme-sweep::view-transition-new(root) { animation: pl-theme-in 560ms cubic-bezier(0.65, 0, 0.35, 1); }
@keyframes pl-theme-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Site header, the same pattern as the design page, with the theme switch at the end. */
.pl-top nav.mid a[aria-current] { color: var(--leaf-text); }
.pl-top .end .g-segmented > label { min-width: 56px; justify-content: center; }

/* Stage and notes on the left, controls on the right riding along as the stage scrolls past. */
.pl-main { display: grid; gap: var(--sp-5); min-width: 0; }
.pl-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.pl-notes .pl-learn, .pl-notes .pl-method { padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle); }
.pl-notes .pl-pick { grid-column: 1 / -1; }
.pl-ctl { position: sticky; top: calc(64px + var(--sp-5)); }

/* Survey: inset blocks, a gap between the three panels. */
#survey .pl-panel + .pl-panel { margin-top: var(--sp-7); }
.sv-block { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.contour { margin: 0 var(--sp-1); }
.ct-lbls > span { display: inline-flex; gap: var(--sp-1); align-items: baseline; }

@media (max-width: 960px) {
  .pl-ctl { position: static; }
  .pl-main { display: contents; }
  .pl-panel > .pl-main > .pl-stage { order: 1; }
  .pl-panel > .pl-ctl { order: 2; }
  .pl-panel > .pl-main > .pl-more { order: 3; }
}
@media (max-width: 699px) {
  .pl-notes { grid-template-columns: minmax(0, 1fr); }
  .pl-notes .pl-pick { grid-column: auto; }
  .sv-block { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
  /* The page's sections as chips that wrap, so every name shows whole and nothing hides off the edge. */
  .pl-toc { gap: var(--sp-2); }
  .pl-toc a { flex: none; padding: 0 var(--sp-3); border: 1px solid var(--border-subtle); border-radius: var(--radius); background: var(--surface-1); }
  .pl-top .end .g-segmented > label { height: var(--h-4); }
}
@media (max-width: 900px) {
  .pl-top { position: static; }
  .pl-top .in { height: auto; min-height: 64px; grid-template-rows: 64px auto; grid-template-columns: minmax(0, 1fr) auto; }
  /* The links wrap rather than scroll, so every name shows whole down to 320. */
  .pl-top nav.mid { min-width: 0; display: flex; flex-wrap: wrap; grid-column: 1 / -1; grid-row: 2; gap: 0 var(--sp-5); padding-bottom: var(--sp-2); }
  .pl-top nav.mid a { display: inline-flex; align-items: center; flex: none; min-height: var(--h-4); }
}

/* Reserved heights: each stage holds its size before its module draws, so nothing below it moves. */
.veins { aspect-ratio: 100 / 62; max-height: 360px; width: 100%; }
.veins svg { width: 100%; height: 100%; }
.strata { min-height: 236px; }
#forms-stage { min-height: 760px; }
.pl-top .mark { display: flex; align-items: center; height: 40px; min-width: 120px; }
@media (max-width: 699px) {
  #forms-stage { min-height: 1090px; }
  .strata { min-height: 520px; }
  .iso-row:not(.kid) { height: 40px; line-height: 40px; margin-top: -20px; align-items: center; }
}
/* Method lines that change with a control hold the height of their longest text. */
#grow-method, #dith-method { min-height: 140px; }
.bg-cost { min-height: calc(2 * var(--lh-1)); }
.iso-wrap { height: 345px; }
@media (max-width: 699px) { .iso-wrap { height: 555px; } }
@media (min-width: 700px) and (max-width: 960px) { .iso-wrap { height: 379px; } }

/* Wide screens: the control column is a rail ruled down the whole panel, so it never stops short of the stage.
   On a .side panel the notes sit in the rail under the controls, which suits a tall stage with few controls. */
@media (min-width: 961px) {
  .pl-panel { grid-template-rows: auto 1fr; }
  .pl-panel::before { content: ""; align-self: stretch; grid-column: 2; grid-row: 1 / span 2; margin-left: calc(var(--sp-5) / -2); border-left: 1px solid var(--border-subtle); pointer-events: none; }
  .pl-panel > .pl-main { grid-column: 1; grid-row: 1 / span 2; }
  .pl-panel > .pl-ctl { grid-column: 2; grid-row: 1 / span 2; }
  .pl-panel.side > .pl-main { display: contents; }
  .pl-panel.side > .pl-main > .pl-stage { grid-column: 1; grid-row: 1 / span 2; }
  .pl-panel.side > .pl-ctl { grid-row: 1; position: static; }
  .pl-panel.side > .pl-main > .pl-more { grid-column: 2; grid-row: 2; }
  .pl-panel.side .pl-notes { grid-template-columns: minmax(0, 1fr); }
  .pl-panel.side .pl-notes .pl-pick { grid-column: auto; }
}
@media (min-width: 961px) {
  .contour { height: 264px; }
}
@media (max-width: 960px) { .pl-notes { grid-template-columns: minmax(0, 1fr); } .pl-notes .pl-pick { grid-column: auto; } }

/* Each panel leads with its picture and one Reads as line. Method, and a pick where there is one, sit behind one
   closed disclosure at every width. */
.pl-more { position: relative; min-width: 0; display: grid; gap: 0; align-content: start; }
.pl-more > .pl-learn { padding-top: var(--sp-4); border-top: 1px solid var(--border-subtle); }
/* The Method toggle shares the Reads as label's row, at its right, so a closed panel spends no line on it. */
.pl-meth { margin-top: 0; }
.pl-meth[open] { margin-top: var(--sp-3); }
.pl-more > .pl-meth > summary { position: absolute; top: calc(var(--sp-4) + (var(--lh-2) - 40px) / 2); right: 0; padding-left: var(--sp-3); }
.pl-more > .pl-learn > b { padding-right: 96px; }
.pl-meth > summary { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; font-size: 13px; line-height: var(--lh-2); font-weight: 500; color: var(--text-secondary); cursor: pointer; list-style: none; transition: color var(--dur-base) var(--ease-out); }
.pl-meth > summary:hover { color: var(--text-primary); }
.pl-meth > summary::-webkit-details-marker { display: none; }
.pl-meth > summary::after { content: ""; width: 7px; height: 7px; margin-left: var(--sp-1); border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform 300ms var(--ease-out); }
.pl-meth[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.pl-meth > .pl-notes { padding-bottom: var(--sp-2); }
.pl-meth > .pl-notes > .pl-method:first-child, .pl-meth > .pl-notes > .pl-pick:first-child { border-top: 0; padding-top: 0; }
.pl-meth .pl-notes .pl-pick { grid-column: auto; }
.pl-meth > .pl-notes { grid-template-columns: minmax(0, 1fr); max-width: 72ch; }

/* Frame costs and source paths are for builders: one page switch shows them, off by default, and they unfold. */
.bg-cost, .pl-cost { display: none; }
.costs .bg-cost, .costs .pl-cost, .bg-cost.pl-say { display: block; }
.bg-cost, .pl-cost { font-size: 12px; }
.pl-costsw { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 40px; margin-top: var(--sp-3); font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.pl-cost { margin: var(--sp-2) 0 0; font-family: var(--font-mono); line-height: var(--lh-1); color: var(--text-secondary); }

@media (pointer: coarse) { .iso-row:not(.kid) { height: 40px; line-height: 40px; margin-top: -20px; align-items: center; } }
/* A finger gets 40px targets at any width, a tablet or a phone on its side too. A mouse keeps the compact sizes. */
@media (pointer: coarse) {
  .pl .btn, .pl .g-segmented > label, .pl .select { height: var(--h-4); }
  .pl .g-segmented { height: auto; }
  .pl .g-slider input[type="range"] { height: var(--h-4); margin: -12px 0 0; }
  .pl .g-slider input[type="range"]::-webkit-slider-runnable-track { height: var(--h-4); }
  .pl .g-slider input[type="range"]::-webkit-slider-thumb { margin-top: 24px; }
  .pl-toc a, .pl-top nav.mid a { display: inline-flex; align-items: center; min-height: var(--h-4); }
  .pl-top .end .g-segmented > label { height: var(--h-4); }
  .sv-more > summary { min-height: 40px; }
  /* A word that labels a select shares its 40px row, so a tap on the word lands on the select. */
  .pl-field:has(> label.pl-lbl + .select) { display: flex; align-items: center; gap: var(--sp-3); }
  .pl-field > label.pl-lbl { display: inline-flex; align-items: center; min-height: var(--h-4); flex: none; }
  .pl-field > label.pl-lbl + .select { flex: 1; min-width: 0; }
}

/* Phone length: the first four forms with the rest a press away, controls two to a row where their labels fit, shorter
   cores, and section gaps a step smaller. */
.forms-all { display: none; }
@media (max-width: 699px) {
  .forms:not(.all) > .form-row:nth-child(n+6) { display: none; }
  #forms-stage { min-height: 0; }
  .forms-all { display: inline-flex; margin-top: var(--sp-3); }
  .pl-sec { padding-top: var(--sp-6); }
  .pl-ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .pl-ctl > .pl-btns, .pl-ctl > .pl-field:has(.g-segmented), .pl-ctl > .pl-field:has(.pl-btns) { grid-column: 1 / -1; }
  #iso .pl-ctl > .pl-field[data-iso-height]:has(.g-segmented) { grid-column: auto; }
  .core svg { height: 120px; }
  .strata.section .core svg { height: 120px; }
  .strata { min-height: 340px; }
  .dust-box { height: 360px; }
  .grow-stage { height: 360px; }
}

/* 1a. In use: a page section on a background, its copy and card along the foot so the background has the top. */
.use-box { height: 440px; }
.use-box > canvas.use-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.use-cover { z-index: auto; }
.use-box .use-in { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: var(--sp-7); align-items: end; padding: var(--sp-6) var(--sp-7) var(--sp-7); }
.use-copy h3 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; }
.use-copy p { margin: var(--sp-2) 0 var(--sp-5); max-width: 40ch; font-size: 15px; line-height: var(--lh-3); color: var(--text-secondary); }
.use-card { transition: border-color var(--dur-base) var(--ease-out); outline: none; }
.use-card .num { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.use-card:hover, .use-card:focus-visible, .use-box.hover .use-card { border-color: color-mix(in oklab, var(--leaf) 55%, var(--border-subtle)); }
@media (max-width: 699px) {
  .use-box { height: 440px; }
  #inuse .pl-ctl > .pl-field:has([name=use-rim]), #inuse .pl-ctl > .pl-field:has([name=use-state]) { grid-column: auto; }
  .pl-why { min-height: 0; }
  .pl-why:empty { display: none; }
  .use-box .use-in { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-5); }
  .use-copy h3 { font-size: 20px; line-height: 28px; }
  .use-copy p { margin-bottom: var(--sp-4); }
}

/* Controls that do not apply right now stay where they are, dimmed, with one line under them saying why. */
.pl-field.off { opacity: 0.5; transition: opacity var(--dur-base) var(--ease-out); }
.pl-field { transition: opacity var(--dur-base) var(--ease-out); }
.pl-why { margin: 0; grid-column: 1 / -1; min-height: calc(2 * var(--lh-2)); font-size: 13px; line-height: var(--lh-2); color: var(--text-secondary); }
.vn-key { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: var(--sp-3) 0 0; font-size: 12px; line-height: var(--lh-1); color: var(--text-secondary); }
.vn-key span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.vn-key i { width: 8px; height: 8px; border-radius: 50%; }
/* Touch screens say tap, pointers say click. */
