/* ii live playground: the components only. Tokens, fonts, type, the header and
   buttons come from ../static/site.css, which every page on the site shares. */

.ftitle, .lead-num { font-family: var(--serif); font-weight: 400; letter-spacing: var(--serif-track); }
.muted { color: var(--ink-2); margin: 0 0 12px; }
.small, .fine, .tray-note, .stage-key, .fid { font-size: var(--t-small); }

.model-pill {
  font-size: var(--t-small); color: var(--ink-2);
  padding: 6px 14px; border-radius: 999px; background: var(--well);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw;
}

main { padding: 0 var(--gutter) 80px; max-width: 1320px; margin: 0 auto; }

.intro { max-width: 1120px; padding: 28px 0 28px; }
.intro .lede { max-width: 860px; }

/* ------------------------------------------------------------ loader */
/* Bring your own model: one quiet line under the intro until opened. */
.byom { margin: 18px 0 0; max-width: 640px; }
.byom summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-small); width: max-content; }
.byom summary:hover { color: var(--ink); }
.byom .fine { color: var(--ink-2); margin: 10px 0 12px; }
.byom-form { display: flex; gap: 8px; }
.byom-form input { flex: 1; min-width: 0; font: inherit; font-size: var(--t-small); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--sheet); color: var(--ink); }
.byom-form input:focus { outline: none; border-color: var(--ink); }
.byom .loader-track { margin: 12px 0 0; }
.byom-status { font-size: var(--t-small); color: var(--ink-2); margin: 8px 0 0; }
.byom-status.failed { color: var(--fail); }
.byom-status:empty { display: none; }

.loader { max-width: 820px; padding: 24px 0 48px; }
.loader-track { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.loader-fill { height: 100%; width: 3%; background: var(--signal); border-radius: 999px; transition: width 0.25s ease; }
.loader p { color: var(--ink-2); margin: 12px 0 0; }
.loader.failed .loader-fill { background: var(--fail); }

/* ------------------------------------------------------------ workspace */
.work {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--plate, #1f1e1b);
  cursor: crosshair;
  touch-action: manipulation;
}
.stage img, .stage video, .stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.stage img, .stage video { object-fit: fill; }
.stage canvas { pointer-events: none; }
/* Under a map the picture dims a little, so ember and cobalt read without losing its colours. */
.stage img, .stage video { transition: filter 0.2s ease; }
.stage.mapping img, .stage.mapping video { filter: brightness(0.62) saturate(0.7); }
.drop-hint {
  position: absolute; inset: 0; display: none; place-items: center;
  background: rgba(20, 20, 19, 0.55); color: #fff; font-size: var(--t-lead); font-family: var(--serif);
}
body.dragging .drop-hint { display: grid; }

.stage-key { display: flex; align-items: center; gap: 8px; color: var(--ink-2); min-height: 22px; margin: 10px 2px 0; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.swatch.ember { background: var(--signal); }
.swatch.cobalt { background: var(--steer); }
.stage-key { align-items: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; border: 0; background: none;
  font: inherit; color: var(--ink-2); cursor: pointer;
}
.chip:hover, .chip.on { color: var(--ink); }
.chip.on { text-decoration: underline; text-underline-offset: 3px; }

.tray { margin-top: 14px; }
.tray-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pill-btn {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sheet);
  font-size: var(--t-small); font-weight: 500; color: var(--ink);
}
.pill-btn:hover { border-color: var(--ink); }
/* One row of examples, scrolled sideways, so they sit just under the picture. */
.thumbs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 8px;
  overflow-x: auto; scrollbar-width: thin; padding: 3px 3px 6px; margin: 0 -3px;
}
.thumb {
  position: relative; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 3; background: var(--well); outline-offset: 2px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.on { outline: 2px solid var(--ink); }
.tray-note { color: var(--ink-3); }
@media (hover: none) { .tray-note { display: none; } }

.first-step {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  margin: 4px 0 18px; padding: 12px 16px; border: 0; border-radius: var(--radius-sm); background: var(--well);
}
.first-step b { font-weight: 500; }
.first-step:hover { background: var(--line); }
.share { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ panel */
.panel {
  position: sticky; top: 16px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 24px;
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.find input {
  width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper);
}
.find input:focus { outline: none; border-color: var(--ink); }
.view { margin-top: 20px; }

.flist { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.frow {
  display: grid; grid-template-columns: minmax(0, 1fr) 30%; gap: 12px; align-items: center;
  width: 100%; padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px);
  border: 0; border-radius: var(--radius-sm); background: none; text-align: left; cursor: pointer;
}
.frow:hover, .frow:focus-visible { background: var(--signal-wash); }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname.unnamed { color: var(--ink-2); }
.fbar { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.fbar span { display: block; height: 100%; background: var(--signal); border-radius: 999px; }
.frow:has(.fcount) { grid-template-columns: minmax(0, 1fr) 30% auto; }
.across { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.fcount { font-size: var(--t-small); color: var(--ink-3); white-space: nowrap; }
.tick {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; vertical-align: -3px;
  border-radius: 50%; background: var(--real); color: #fff; font-size: 11px; font-weight: 500;
}
.hint { margin-top: 24px; color: var(--ink-2); font-size: var(--t-small); }

.back { border: 0; background: none; padding: 0; color: var(--ink-2); cursor: pointer; font-size: var(--t-small); }
.back:hover { color: var(--ink); }
.fid { color: var(--ink-3); margin: 16px 0 2px; }
.ftitle { margin-bottom: 10px; }
.status { margin: 0 0 8px; color: var(--ink-2); }
.status.real { color: var(--real); }
.status.real .tick { margin: 0 4px 0 0; }

.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: var(--t-small); }
.checks li { display: flex; align-items: baseline; gap: 8px; color: var(--ink-2); }
.mark-dot { width: 16px; flex: none; text-align: center; font-weight: 500; }
.checks .ok .mark-dot { color: var(--real); }
.checks .no .mark-dot { color: var(--fail); }
.checks .na .mark-dot { color: var(--ink-3); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--well); margin: 4px 0 8px; }
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: var(--t-small); color: var(--ink-2);
}
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 19, 0.08); }
.seg.small { margin-top: 4px; }

.slider { display: grid; grid-template-columns: auto minmax(0, 1fr) 56px; gap: 12px; align-items: center; font-size: var(--t-small); color: var(--ink-2); margin: 4px 0 8px; }
.slider output { text-align: right; color: var(--ink); font-weight: 500; }
input[type="range"] { width: 100%; accent-color: var(--steer); }

.result { margin: 12px 0 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--steer-wash); }
.result p { margin: 0; }
.result .muted { margin-top: 6px; }
.lead-num { font-size: var(--t-lead); line-height: 1.35; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery > p { grid-column: 1 / -1; }
.gthumb { position: relative; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--well); }
.gthumb canvas { display: block; width: 100%; height: auto; }
.gthumb span {
  position: absolute; right: 4px; bottom: 4px; font-size: 11px; padding: 2px 6px; border-radius: 999px; background: rgba(250, 249, 245, 0.92);
}

/* ------------------------------------------------------------ how it works */
.how { max-width: 1320px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.how .fine { max-width: 90ch; }
details { margin-top: 10px; color: var(--ink-2); }
summary { cursor: pointer; font-weight: 500; color: var(--ink); }
details ul { padding-left: 18px; margin: 8px 0 0; }
.fine { color: var(--ink-3); max-width: 820px; margin: 28px 0 0; }
.perf { margin-top: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: var(--t-small);
}

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 980px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --t-display: 36px; --t-head: 24px; --t-lead: 18px; }
  .intro { padding: 24px 0 24px; }
  .bar { padding: 14px var(--gutter); }
  .mark span { display: none; }
}

/* Features folded away by default (edges of the frame). */
.fold { margin-top: 20px; }
.fold summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-small); }
.fold summary:hover { color: var(--ink); }
.fold[open] summary { margin-bottom: 4px; }

/* ------------------------------------------------------------ words first (index.html, see.js) */
.stage.square { aspect-ratio: 1 / 1; max-width: 640px; cursor: default; }
.stage.square img, .stage.square video { object-fit: cover; }
.see .stage-col { max-width: 640px; }
.see .work { grid-template-columns: minmax(0, 640px) minmax(320px, 1fr); }
body.working { cursor: progress; }

.words { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 12px; }
.wrow {
  display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 7.5rem; gap: 12px; align-items: center;
  padding: 7px 10px; margin: 0 -10px; width: calc(100% + 20px);
  border: 0; border-radius: var(--radius-sm); background: none; text-align: left; font: inherit; color: var(--ink);
}
button.wrow { cursor: pointer; }
button.wrow:hover, button.wrow:focus-visible { background: var(--well); }
.wrow.on { background: var(--signal-wash); }
.wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbar { position: relative; height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.wbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.wbar .now { background: var(--steer); }
.wbar .was { background: var(--line-2); }
.wpct { font-size: var(--t-small); color: var(--ink-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.why-head { margin-top: 28px; }
.frow.why { grid-template-columns: auto minmax(0, 1fr) 18% auto; cursor: default; }
.frow.why.off .fname, .frow.why.off .also { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.fname-btn { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.fthumb { width: 44px; height: 44px; flex: none; border-radius: 6px; background: var(--well); }
.frow.why.off .fthumb { opacity: 0.35; }
.frow.why .fname.unnamed { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.fname-btn:hover .fname { text-decoration: underline; text-underline-offset: 3px; }
.also { font-size: var(--t-small); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.switch { position: relative; width: 34px; height: 20px; flex: none; border: 0; border-radius: 999px; background: var(--signal); cursor: pointer; padding: 0; transition: background 0.15s ease; }
.switch span { position: absolute; top: 3px; left: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--sheet); transition: left 0.15s ease; }
.switch[aria-checked="false"] { background: var(--line-2); }
.switch[aria-checked="false"] span { left: 3px; }
.row-actions { margin: 12px 0 0; }
.see .find { margin: 4px 0 0; }
.see .find input { font: inherit; font-size: var(--t-small); }
.see .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .see .work { grid-template-columns: minmax(0, 1fr); }
  .see .stage-col, .stage.square { max-width: none; }
}
.see .panel { position: static; max-height: none; overflow: visible; }
.see .result { margin: 4px 0 8px; }
.see .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.see .how .fine { margin-top: 12px; }
#credit { overflow-wrap: anywhere; }

/* Make it see a word: features to turn on (written onto every patch). */
.toward { margin-top: 28px; }
.frow.push { grid-template-columns: auto minmax(0, 1fr) 22%; cursor: default; }
.frow.push .fname { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.frow.push.on .fname { color: var(--ink); }
.frow.push .fname-btn .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toward .slider { margin-top: 12px; }
.frow.push .fname-btn .muted { line-height: 1; }

/* Find the switch: "Make it see ___", then before, switch on, random switch. */
.see-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--serif); font-size: var(--t-head); letter-spacing: var(--serif-track); line-height: 1.2; }
.see-input {
  flex: 1 1 8ch; min-width: 8ch; padding: 0 0 2px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: none; font: inherit; color: var(--signal);
}
.see-input:focus { outline: none; border-bottom-color: var(--ink); }
.see-input::-webkit-search-cancel-button { display: none; }
.see-head .chips { margin: 10px 0 16px; }
.answer { margin: 22px 0 4px; }
.alab { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
/* Each answer is a row: what was done (a feature shown by where it lights up in other photos),
   a bar, and the chance. The edit in ember, the random control and "as it is" in grey. */
.arow { display: grid; grid-template-columns: 224px minmax(0, 1fr) 76px; gap: 12px; align-items: center; min-height: 40px; }
.arow .what { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--t-small); color: var(--ink-3); white-space: nowrap; }
.arow.now .what { color: var(--ink); }
.arow .previews canvas { width: 30px; height: 30px; }
.arow .meter { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; }
.arow .meter i { display: block; height: 100%; min-width: 2px; border-radius: 3px; background: var(--ink-3); }
.arow.now .meter i { background: var(--signal); }
.arow b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: var(--serif-track); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-3); }
.arow.now b { color: var(--signal); }
@media (max-width: 520px) {
  .arow { grid-template-columns: minmax(0, 1fr) 64px; row-gap: 4px; padding: 4px 0; }
  .arow .what { grid-column: 1 / -1; justify-content: flex-start; }
  .arow b { font-size: 22px; }
}
.atop { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
.atop { margin-top: 2px; }
.atop.wins { color: var(--signal); }
.toward { margin-top: 18px; }
.curve { min-height: 116px; }
.curve-svg { display: block; width: 100%; height: auto; overflow: visible; }
.curve-svg .axis { stroke: var(--line-2); }
.curve-svg .grid { stroke: var(--line); stroke-dasharray: 2 3; }
.curve-svg .tick { fill: var(--ink-3); font-size: 11px; font-family: inherit; }
.curve-svg .now-line { stroke: var(--steer); stroke-width: 1; opacity: 0.5; }
.curve-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.curve-svg .line.on { stroke: var(--signal); }
.curve-svg .line.ctl { stroke: var(--ink-3); stroke-dasharray: 4 3; }
.curve-svg .dot.on { fill: var(--signal); }
.curve-svg .dot.ctl { fill: var(--ink-3); }
.curve-svg .lab { font-size: 12px; font-family: inherit; }
.curve-svg .lab.on { fill: var(--signal); }
.curve-svg .lab.ctl { fill: var(--ink-3); }
.strength { display: block; margin-top: 6px; }
.strength input { display: block; width: 100%; margin: 0; }
.strength-row { display: flex; justify-content: space-between; margin-top: 4px; font-size: var(--t-small); color: var(--ink-3); }
.strength-row output { color: var(--ink); font-weight: 500; }
.sw { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sw-name { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: var(--t-head); letter-spacing: var(--serif-track); }
.ex-cap { margin: 14px 0 8px; }
.says { margin: 0; color: var(--ink-2); }
.says b { font-weight: 500; color: var(--ink); }
.ex-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ex { position: relative; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1 / 1; background: var(--well); }
.ex img, .ex canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ex img { object-fit: cover; filter: brightness(0.8); }
.others { margin: 16px 0 0; align-items: baseline; }
.others .muted { margin: 0; font-size: var(--t-small); }
.detail-h { margin: 24px 0 6px; font-size: var(--t-body, 16px); font-family: var(--sans); font-weight: 500; letter-spacing: 0; }
.view > .sw-name { margin-top: 12px; }

/* What lights up inside: the switches on the picture, or at one spot (see.js insideView). */
.stage.square { touch-action: manipulation; }
.seen-line { margin: 0 0 22px; line-height: 1.6; }
.seen-word { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.seen-word:hover { text-decoration-color: var(--ink); }
.seen-word small { font-size: var(--t-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lit-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-head); letter-spacing: var(--serif-track); }
.lit-note { margin: 4px 0 6px; min-height: 2.6em; }
.frow.lit { grid-template-columns: minmax(0, 1fr) auto; font: inherit; color: var(--ink); }
.lit-mid { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.frow.lit .fname.unnamed { font-variant-numeric: tabular-nums; }
.frow.lit:hover .fname { text-decoration: underline; text-underline-offset: 3px; }
.previews { display: flex; gap: 3px; }
.previews canvas { width: 36px; height: 36px; border-radius: 4px; background: var(--well); }
.more { margin-top: 6px; }
.see-more { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.ex-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .frow .previews canvas:nth-child(3) { display: none; } }
.why-title { margin-top: 12px; }
.frow.lit.on { background: var(--signal-wash); }
.view > .examples + .says { margin-top: 14px; }

/* One set of building blocks for every screen of the playground (see.js): a section starts with a
   thin rule, a caption names it, headings share one serif size, a back link sits 12px above the
   heading, and every experiment's answer is the same before → after block (.answer). */
.section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.see-more.section, .sw.section { margin-top: 24px; padding-top: 20px; }
.cap { margin: 0 0 8px; font-size: var(--t-small); font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }
.lit-title, .sw-name, .why-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-head); letter-spacing: var(--serif-track); line-height: 1.2; }
.view > .back + * { margin-top: 12px; }
.view > .sw-name + .examples, .view > .why-title + p { margin-top: 14px; }
.lit-note { margin: 4px 0 6px; min-height: 0; color: var(--ink-3); }
.examples .cap { margin-top: 14px; }
.answer { margin: 18px 0 4px; }
.section > .cap + .strength { margin-top: 0; }
.section .answer { margin-top: 16px; }
.answer .atop { margin-top: 4px; }
.others .cap { margin: 0 4px 0 0; }
.frow.lit .fname.unnamed, .frow.why .fname.unnamed { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.says { margin: 14px 0 0; }
.frow.why { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.frow.why .fname-btn.lit-mid { align-items: stretch; flex-direction: column; gap: 7px; }
.frow.why.off .fbar span { background: var(--line-2); }
.sw-name + .examples .cap { margin-top: 12px; }
.examples + .says { margin-top: 12px; }
@media (max-width: 520px) { .wrow { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 6.2rem; gap: 10px; } }
/* The panel's own padding is the only space above and below its content, the same on every side. */
.see .panel { padding: 22px; }
.see #panel-body > .view { margin-top: 0; }
.see #panel-body > .view > :last-child { margin-bottom: 0; }

/* No blue: words and controls in the site's ink, activations in ember. */
.see input[type="range"] { accent-color: var(--ink); }
.see .wbar .now { background: var(--ink-2); }
.see .curve-svg .now-line { stroke: var(--ink-3); }
/* A word's jump: hollow dot where it was, filled where it is, the jump between them. */
.wtrack { position: relative; height: 12px; }
.wtrack::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; border-radius: 999px; background: var(--well); }
.wtrack .jump { position: absolute; top: 4px; height: 4px; border-radius: 999px; background: var(--line-2); }
.wtrack.up .jump { background: var(--signal); }
.wtrack .dot { position: absolute; top: 1px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-sizing: border-box; }
.wtrack .dot.now { background: var(--ink); }
.wtrack .dot.was { background: var(--sheet); border: 1.5px solid var(--ink-3); }
.wtrack.up .dot.now { background: var(--signal); }
.wpct small { font-size: 11px; margin-left: 2px; }
.wpct small.up { color: var(--signal); }
.wpct small.down { color: var(--ink-3); }

/* Make it see: a heading, a real text box with its button, and a few words to try as pills. */
.see-label { display: block; font-family: var(--serif); font-size: 24px; letter-spacing: var(--serif-track); line-height: 1.2; margin: 0 0 12px; }
.see-field { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--sheet); }
.see-field:focus-within { border-color: var(--ink-3); }
.see-field .see-input { flex: 1 1 auto; min-width: 0; padding: 8px 0; border: 0; font-family: var(--sans, inherit); font-size: 16px; color: var(--ink); }
.see-field .see-input::placeholder { color: var(--ink-3); }
.see-go { flex: none; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--sheet); font: inherit; font-size: var(--t-small); cursor: pointer; }
.see-go:hover { opacity: 0.88; }
.see-head .chips.pills { gap: 8px; margin: 12px 0 0; }
.chips.pills .chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--t-small); }
.chips.pills .chip:hover { border-color: var(--ink-3); }
/* Tighter between the list's "Show more" and the next section. */
.view > #active + .see-more, .see-more.section { margin-top: 16px; }
.more { margin: 6px 0 0; }
.view .back.more { margin: 6px 0 0; }
.chips.pills.others { align-items: center; gap: 8px; } .chips.pills.others .cap { margin-right: 4px; }
/* The fine print folds away under one quiet line. */
.see .how { margin-top: 32px; padding-top: 12px; }
.about summary { cursor: pointer; color: var(--ink-3); list-style: none; }
.about summary::-webkit-details-marker { display: none; }
.about summary::after { content: " +"; }
.about[open] summary::after { content: " −"; }
.about summary:hover { color: var(--ink-2); }
.about p { margin: 8px 0 0; max-width: 90ch; }
/* The picture's credit: a quiet tag in its corner that opens on a click. */
.credit-tag { position: absolute; right: 10px; bottom: 10px; z-index: 3; max-width: calc(100% - 20px); display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.credit-tag:has(#credit:empty) { display: none; }
.credit-tag summary { list-style: none; cursor: pointer; padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / 0.45); color: #fff; opacity: 0.75; }
.credit-tag summary::-webkit-details-marker { display: none; }
.credit-tag summary:hover, .credit-tag[open] summary { opacity: 1; }
.credit-tag #credit { order: -1; margin-bottom: 6px; padding: 8px 10px; border-radius: 10px; background: rgb(0 0 0 / 0.7); color: #fff; line-height: 1.4; overflow-wrap: anywhere; }
.fname .fnum { margin-left: 6px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Pictures | Robot: the playground's two tabs (index.html, robot.html). */
.pg-tabs { display: flex; gap: 18px; margin: 0 0 10px; font-size: var(--t-small); }
.pg-tabs a { color: var(--ink-3); text-decoration: none; padding-bottom: 2px; }
.pg-tabs a:hover { color: var(--ink); }
.pg-tabs a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* The robot tab (robot.js): a 16:9 camera frame, a scrubber, the clips, and the move buttons. */
.robot .stage.wide { aspect-ratio: 16 / 9; cursor: default; }
.robot .thumbs.wide { grid-auto-columns: 112px; }
.robot .thumbs.wide .thumb { aspect-ratio: 16 / 9; }
.robot .scrub { display: grid; grid-template-columns: minmax(0, 1fr) 3.5em; gap: 12px; align-items: center; margin: 10px 2px 0; }
.robot .scrub input[type="range"] { accent-color: var(--ink); }
.robot .scrub span { text-align: right; font-variant-numeric: tabular-nums; }
.robot .task { margin: 6px 2px 0; color: var(--ink-2); min-height: 1.4em; }
.robot .loader { padding: 8px 0 24px; }
.robot .previews img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--well); display: block; }
.robot .previews img.fades { opacity: 0.45; filter: grayscale(0.6); }
.robot .previews .nocrop { width: 36px; height: 36px; border-radius: 4px; background: var(--well); font-size: 10px; display: grid; place-items: center; color: var(--ink-3); }
.robot .frow.move.on, .robot .frow.lit.on { background: var(--signal-wash); }
.robot .verdict-line { margin: 10px 0 4px; font-family: var(--serif); font-size: var(--t-lead); line-height: 1.3; }
.robot .moves-cap { margin: 14px 0 0; }
.robot .always { margin: 8px 0 0; }

/* ------------------------------------------------------------ why it sees a word */
/* The features that push it towards the word, each a stack of the photos it lights up on most.
   Tap one to switch it off: its stack closes and greys, and the words above glide to the new
   answer. The arrow opens the feature's own card. */
.wstacks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (max-width: 520px) { .wstacks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wstack { position: relative; min-width: 0; }
.wtoggle {
  width: 100%; display: grid; justify-items: start; gap: 10px; padding: 14px 14px 12px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--sheet); color: var(--ink);
  font: inherit; font-size: var(--t-small); text-align: left; cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.wtoggle:hover { border-color: var(--line-2); }
.wtoggle:active { transform: scale(0.98); }
.wtoggle .fname { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.3s ease; }
.wtoggle .face .previews canvas { width: 40px; height: 40px; border-radius: 8px; box-shadow: 0 0 0 2px var(--sheet); transition: margin 0.45s cubic-bezier(.22, .9, .3, 1), filter 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease; }
.wtoggle .face .previews canvas + canvas { margin-left: -12px; }
.wstack:hover .wtoggle .face .previews canvas + canvas { margin-left: -6px; }
.wstack.off .wtoggle { background: var(--well); border-color: transparent; }
.wstack.off .wtoggle .face .previews canvas { filter: grayscale(1); opacity: 0.45; box-shadow: 0 0 0 2px var(--well); }
.wstack.off .wtoggle .face .previews canvas + canvas { margin-left: -32px; }
.wstack.off .fname { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.wmore {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.wstack:hover .wmore, .wmore:focus-visible { opacity: 1; }
.wmore:hover { background: var(--well); color: var(--ink); }
@media (hover: none) { .wmore { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wtoggle, .wtoggle .face .previews canvas { transition: none; } }
