/* MOCHI - soft neumorphic widget system. Spec: ../DESIGN.md
   One warm material, raised or pressed by light alone. */

/* ============ tokens - light (default) ============ */
:root {
  /* the material */
  --ground: #ece9e2;
  --plate: #f7f5f0;
  --seam: #efece5;
  --light: #ffffff;
  --shade: #a69e90;

  /* ink */
  --ink: #5d574e;
  --ink-soft: #6b665c;
  --on-deep: #fbfaf7;
  --lit: #fbfaf7;
  --track: #d6d1c5;

  /* the one deep plate, the one spark, the ring */
  --anchor: #3e5c68;
  --glint: #d4a94e;
  --focus: #3e5c68;

  /* fill roles: fill / -deep (carries --on-deep, large bold) / -tint (carries --ink) */
  --level: #93a9cb;
  --level-deep: #6d87b1;
  --level-tint: #c9d4e6;
  --cue: #d698a0;
  --cue-deep: #bd747f;
  --cue-tint: #eccfd3;
  --active: #8fb5a4;
  --active-deep: #679181;
  --active-tint: #cfdfd7;
  --decor: #e5c39c;
  --decor-tint: #f2dfc8;

  /* the material rule - written once, in terms of --light and --shade.
     A theme changes the two lights, never the recipe. */
  --raised: -6px -6px 14px color-mix(in srgb, var(--light) 85%, transparent),
    7px 7px 16px color-mix(in srgb, var(--shade) 42%, transparent);
  --pressed: inset -4px -4px 10px color-mix(in srgb, var(--light) 80%, transparent),
    inset 5px 5px 12px color-mix(in srgb, var(--shade) 40%, transparent);
  --plate-shadow: -3px -3px 8px color-mix(in srgb, var(--light) 55%, transparent),
    3px 3px 8px color-mix(in srgb, var(--shade) 30%, transparent);
  --knob-shadow: 2px 2px 6px color-mix(in srgb, var(--shade) 50%, transparent);
  --thumb-shadow: 2px 2px 7px color-mix(in srgb, var(--shade) 55%, transparent),
    -2px -2px 6px color-mix(in srgb, var(--light) 80%, transparent);
  --deep-inset: inset 3px 3px 8px rgba(20, 35, 42, 0.35);

  /* form */
  --r-sm: 18px;
  --r-md: 22px;
  --r-lg: 28px;
  --r-shell: 44px;

  /* type */
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Yuanti SC", "PingFang SC", sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* motion */
  --press-ease: 120ms ease-out;
  --fade-ease: 240ms ease-out;

  color-scheme: light;
}

/* ============ tokens - dark: the same mochi, dusted in roasted sesame ============ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #2d2926;
    --plate: #36322e;
    --seam: #2f2b28;
    --light: #45403b;
    --shade: #0d0b09;
    --ink: #ebe4d8;
    --ink-soft: #b3ab9e;
    --on-deep: #f6f1e8;
    --lit: #e4ddd1;
    --track: #45403a;
    --anchor: #3b6170;
    --glint: #d9b566;
    --focus: #93c3cf;
    --level: #8398ba;
    --level-deep: #56709a;
    --level-tint: #3a4150;
    --cue: #c98f98;
    --cue-deep: #a25f6b;
    --cue-tint: #4a3a3c;
    --active: #84a998;
    --active-deep: #4f7b6b;
    --active-tint: #34443d;
    --decor: #cfae88;
    --decor-tint: #4a4033;
    color-scheme: dark;
  }
}

/* explicit choice wins in both directions - the catalog has a toggle */
:root[data-theme="dark"] {
  --ground: #2d2926;
  --plate: #36322e;
  --seam: #2f2b28;
  --light: #45403b;
  --shade: #0d0b09;
  --ink: #ebe4d8;
  --ink-soft: #b3ab9e;
  --on-deep: #f6f1e8;
  --lit: #e4ddd1;
  --track: #45403a;
  --anchor: #3b6170;
  --glint: #d9b566;
  --focus: #93c3cf;
  --level: #8398ba;
  --level-deep: #56709a;
  --level-tint: #3a4150;
  --cue: #c98f98;
  --cue-deep: #a25f6b;
  --cue-tint: #4a3a3c;
  --active: #84a998;
  --active-deep: #4f7b6b;
  --active-tint: #34443d;
  --decor: #cfae88;
  --decor-tint: #4a4033;
  color-scheme: dark;
}

/* ============ base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
p { max-width: 62ch; }
a { color: inherit; }
strong, b { font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--focus); /* the one permitted outline */
  outline-offset: 3px;
}

/* ============ material primitives ============ */
.m-raised { background: var(--ground); border-radius: var(--r-md); box-shadow: var(--raised); }
.m-pressed { background: var(--ground); border-radius: var(--r-md); box-shadow: var(--pressed); }

/* widget: the only container - a raised pillow of ground material */
.widget {
  background: var(--ground);
  border-radius: var(--r-md);
  box-shadow: var(--raised);
  padding: 16px;
}

/* plate: flat fill inside a widget */
.plate {
  border-radius: var(--r-sm);
  box-shadow: var(--plate-shadow);
}

/* tray: a pressed well that stages raised things */
.tray {
  background: var(--ground);
  border-radius: var(--r-md);
  box-shadow: var(--pressed);
  padding: 22px;
}

.cap { font-size: 13px; color: var(--ink-soft); }

/* fill roles as backgrounds */
.fill-level { background: var(--level); }
.fill-cue { background: var(--cue); }
.fill-active { background: var(--active); }
.fill-decor { background: var(--decor); }
.fill-plate { background: var(--plate); }

/* glyph fills - inline SVG paints from tokens, so glyphs theme too */
.gf-deep { fill: var(--on-deep); }
.gf-anchor { fill: var(--anchor); }
.gf-active { fill: var(--active); }
.gf-glint { fill: var(--glint); }
.gf-cue { fill: var(--cue); }
.gs-anchor { stroke: var(--anchor); }

/* ============ buttons ============ */
.btn {
  font: 600 15px/1 var(--font);
  color: var(--ink);
  background: var(--ground);
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 24px;
  box-shadow: var(--raised);
  cursor: pointer;
  transition: box-shadow var(--press-ease), background var(--press-ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn:active, .btn.is-pressed { box-shadow: var(--pressed); }
.btn:disabled { box-shadow: none; color: color-mix(in srgb, var(--ink) 45%, transparent); cursor: default; }
.btn-primary { background: var(--anchor); color: var(--on-deep); }
.btn-primary:active { box-shadow: var(--pressed), var(--deep-inset); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-round { width: 54px; height: 54px; padding: 0; border-radius: 50%; justify-content: center; }
.btn-round svg { margin-left: 3px; } /* optically centre the play triangle */

/* ============ toggle ============ */
.toggle {
  width: 62px; height: 34px;
  flex: none;
  border: none;
  border-radius: 17px;
  background: var(--ground);
  box-shadow: var(--pressed);
  position: relative;
  cursor: pointer;
  transition: background var(--press-ease);
}
.toggle .knob {
  position: absolute; top: 4px; left: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lit);
  box-shadow: var(--knob-shadow);
  transition: left var(--press-ease);
}
.toggle[aria-checked="true"] { background: var(--active); }
.toggle[aria-checked="true"] .knob { left: 32px; }

/* ============ slider ============ */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  cursor: pointer;
  --fill: 60%;
  --fill-color: var(--level);
}
.slider::-webkit-slider-runnable-track {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, var(--fill-color) 0 var(--fill), var(--ground) var(--fill));
  box-shadow: var(--pressed);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  margin-top: -5px;
  border-radius: 50%;
  border: none;
  background: var(--lit);
  box-shadow: var(--thumb-shadow);
}
.slider::-moz-range-track {
  height: 16px;
  border-radius: 8px;
  background: var(--ground);
  box-shadow: var(--pressed);
}
.slider::-moz-range-progress { height: 16px; border-radius: 8px; background: var(--fill-color); }
.slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--lit);
  box-shadow: var(--thumb-shadow);
}
.slider:disabled { cursor: default; --fill-color: var(--track); }

/* ============ list rows ============ */
.list { display: grid; gap: 4px; }
.lrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 12px 16px;
  font: 500 15px/1.3 var(--font);
  color: var(--ink);
  background: none; border: none; text-align: left;
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--press-ease);
}
.lrow .sub { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.lrow.is-active { background: var(--active-tint); box-shadow: var(--plate-shadow); }
.lrow.is-active .sub { color: var(--ink); }
.lrow .chev { flex: none; color: var(--ink-soft); }

/* ============ chips ============ */
.chip {
  white-space: nowrap;
  font: 600 13px/1 var(--font);
  color: var(--ink);
  background: var(--ground);
  border: none;
  border-radius: 15px;
  padding: 9px 16px;
  box-shadow: var(--raised);
  cursor: pointer;
  transition: box-shadow var(--press-ease), background var(--press-ease);
}
.chip.is-on { box-shadow: var(--pressed); background: var(--active-tint); }

/* ============ tooltip ============ */
.tipwrap { position: relative; display: inline-flex; }
.tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink);
  background: var(--ground);
  border-radius: 12px;
  padding: 7px 14px;
  box-shadow: var(--raised);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--press-ease);
}
.tipwrap:hover .tooltip, .tipwrap:focus-within .tooltip { opacity: 1; }

/* ============ input ============ */
.field {
  font: 400 15px/1.3 var(--font);
  color: var(--ink);
  background: var(--ground);
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  box-shadow: var(--pressed);
  width: 100%;
}
.field::placeholder { color: var(--ink-soft); opacity: 1; }
.field:disabled { box-shadow: none; color: color-mix(in srgb, var(--ink) 45%, transparent); }
.field:disabled::placeholder { color: color-mix(in srgb, var(--ink) 45%, transparent); }

/* ============ motif: flip digits ============ */
.flip { display: flex; align-items: center; justify-content: center; gap: 12px; }
.flip .tile {
  flex: 1;
  max-width: 118px;
  border-radius: var(--r-sm);
  /* soft centre seam, no hard edge */
  background: linear-gradient(180deg, var(--plate) 0 46%, var(--seam) 54%, var(--plate) 100%);
  box-shadow: var(--plate-shadow);
  font-size: clamp(46px, 13vw, 62px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  padding: 14px 0;
  color: var(--ink);
}
.flip.is-small .tile { font-size: 40px; padding: 8px 0; }
.flip .colon { display: flex; flex-direction: column; gap: 12px; animation: mochi-blink 1s steps(1) infinite; }
.flip .colon i { width: 9px; height: 9px; border-radius: 50%; background: var(--cue); }
@keyframes mochi-blink { 50% { opacity: 0.15; } }

.flip-caption {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 14px;
  font-size: 15px; font-weight: 600;
}
.flip-caption .pill {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  border-radius: 12px; padding: 5px 12px;
  box-shadow: var(--pressed);
}

/* ============ motif: pill gauge ============ */
.pgauge {
  position: relative;
  border-radius: 37px;
  box-shadow: var(--pressed);
  overflow: hidden;
  min-height: 170px;
  --v: 50%;
  --liquid: var(--level-deep);
}
.pgauge .fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--v);
  background: var(--liquid);
  border-radius: 16px 16px 0 0;
}
.pgauge .txt {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 4px 16px;
  text-align: center;
  color: var(--on-deep);
}
.pgauge .txt .num { display: block; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pgauge .txt .lbl { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; }

/* ============ motif: dial ============ */
.dial {
  position: relative;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: var(--anchor);
  box-shadow: var(--plate-shadow), var(--deep-inset);
  margin: 0 auto;
}
.dial .dot {
  position: absolute; top: 50%; left: 50%;
  width: 5px; height: 5px; margin: -2.5px;
  border-radius: 50%;
  background: var(--glint);
}
.dial .dot.q { width: 7px; height: 7px; margin: -3.5px; }
.dial .hand {
  position: absolute; left: 50%; bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 3px;
  background: var(--on-deep);
}
.dial .hand.h { width: 6px; height: 32px; margin-left: -3px; }
.dial .hand.m { width: 4px; height: 46px; margin-left: -2px; }
.dial .cap-dot {
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 12px; margin: -6px;
  border-radius: 50%;
  background: var(--on-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-deep) 25%, transparent);
}

/* ============ motif: ring gauge ============ */
.ring-gauge { position: relative; width: 128px; height: 128px; margin: 0 auto; }
.ring-gauge svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-gauge .track { stroke: var(--track); }
.ring-gauge .arc { stroke: var(--level); stroke-linecap: round; }
.ring-gauge .center {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; gap: 2px;
}
.ring-gauge .center .lbl { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.ring-gauge .center .num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ motif: face plate ============ */
.face-plate {
  background: var(--active-tint);
  border-radius: var(--r-md);
  box-shadow: var(--plate-shadow);
  display: grid;
  place-items: center;
  padding: 18px 0;
}
/* The face is a <use> of a shared symbol, and selectors cannot reach into a
   use tree - so the hover travels in as an inherited custom property. */
.face-line { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.blush { fill: var(--cue); opacity: var(--blush, 0); transition: opacity var(--fade-ease); }
.face-plate:hover { --blush: 1; }

/* ============ motif: squircle ============ */
.squircle {
  width: 60px; height: 60px;
  flex: none;
  border-radius: 20px;
  box-shadow: var(--raised);
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  transition: box-shadow var(--press-ease);
}
.squircle:active { box-shadow: var(--pressed); }
.squircle svg { width: 34px; height: 34px; }

/* ============ motif: feature plate ============ */
.feature-plate {
  background: var(--cue-deep);
  border-radius: var(--r-sm);
  box-shadow: var(--plate-shadow);
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  color: var(--on-deep);
  text-align: left;
}
.feature-plate .roundel {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--on-deep) 24%, transparent);
  display: grid; place-items: center;
}
.feature-plate .roundel svg { width: 22px; height: 22px; }
.feature-plate .t { font-size: 16px; font-weight: 700; line-height: 1.25; }
.feature-plate .s { font-size: 14px; font-weight: 700; line-height: 1.25; }

/* ============ motif: page dots ============ */
.page-dots { display: flex; justify-content: center; align-items: center; gap: 9px; }
.page-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--track); }
.page-dots i.on { width: 20px; background: var(--cue); }

/* ============ motif: bilingual label ============ */
.bilabel { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; }
.bilabel .gloss { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* ============ shell and board ============ */
.shell {
  width: min(392px, 100%);
  background: var(--ground);
  border-radius: var(--r-shell);
  box-shadow: var(--raised);
  padding: 22px 18px 26px;
}
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.board > .c2 { grid-column: span 2; }
.board > .c4 { grid-column: span 4; }
.shelf {
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 26px;
  box-shadow: var(--pressed);
  padding: 12px 14px;
}

/* ============================================================
   SPEC FURNITURE
   The catalog's own parts: masthead, brief, token tables, dual-theme
   swatches, scale bars, callouts, do / do not. Moulded from the same
   material as everything else - no borders, no lines, depth from light.
   None of this is a component the system ships.
   ============================================================ */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 22px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.page > main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }

/* ---- sticky masthead: a raised bar floating over the page ---- */
.masthead {
  position: sticky; top: 12px; z-index: 20;
  max-width: 1080px;
  margin: 12px auto 0;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 20px;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-md);
  box-shadow: var(--raised);
}
.masthead .brand { font-size: 17px; font-weight: 700; white-space: nowrap; letter-spacing: 0.02em; }
.masthead .brand span { color: var(--cue-deep); margin-left: 6px; }
.masthead nav { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 4px; }
.masthead nav::-webkit-scrollbar { display: none; }
.masthead nav a {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
  padding: 7px 8px; border-radius: 12px;
  transition: box-shadow var(--press-ease), color var(--press-ease);
}
.masthead nav a:hover { color: var(--ink); box-shadow: var(--pressed); }
.masthead .btn { flex: none; }

/* ---- thesis ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 48px;
  align-items: center;
  padding-top: 18px;
}
.hero h1 { font-size: clamp(44px, 6vw, 64px); letter-spacing: 0.02em; }
.hero h1 span { color: var(--cue-deep); }
.hero .tag { font-size: 17px; margin-top: 14px; }
.hero .tag b, .lede b, .callout b, .brief b, .dodont b, table.spec-table td.d b { color: var(--ink); }
.hero-piece { width: min(340px, 100%); display: grid; gap: 14px; }

/* ---- sections ---- */
section.widget { padding: 28px clamp(18px, 4vw, 36px) 34px; border-radius: var(--r-lg); }
section.widget > h2 { font-size: 26px; margin-bottom: 6px; }
.eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 4px; }
.lede { font-size: 15px; color: var(--ink-soft); margin-bottom: 22px; }
section.widget h3 { font-size: 16px; margin: 28px 0 12px; }

/* ---- read this first: a plate, numbered with pressed dots ---- */
.brief {
  background: var(--plate);
  border-radius: var(--r-lg);
  box-shadow: var(--plate-shadow);
  padding: 24px clamp(18px, 4vw, 32px);
}
.brief .hd { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.brief ol { list-style: none; counter-reset: brief; display: grid; gap: 12px; }
.brief li {
  counter-increment: brief;
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start;
  color: var(--ink-soft); line-height: 1.6;
}
.brief li::before {
  content: counter(brief);
  width: 30px; height: 30px;
  border-radius: 50%;
  box-shadow: var(--pressed);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--ink);
}

/* ---- staged specimens ---- */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.spec { display: grid; gap: 10px; align-content: start; justify-items: center; text-align: center; }
.spec .stage {
  width: 100%;
  min-height: 108px;
  border-radius: var(--r-md);
  box-shadow: var(--pressed);
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: center;
  padding: 22px 16px;
}
.spec .stage.open { box-shadow: none; }
.spec .stage.tall { padding-top: 56px; }
.spec .cap { line-height: 1.45; }

/* ---- dual-theme swatches: both lights at once ---- */
.duo { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.duo .cell { background: var(--ground); border-radius: var(--r-md); box-shadow: var(--raised); padding: 10px; }
.duo .halves { display: flex; height: 58px; border-radius: 14px; overflow: hidden; box-shadow: var(--pressed); }
.duo .halves i { flex: 1; display: block; }
.duo .cap { padding: 10px 4px 2px; display: grid; gap: 4px; }
.duo .nm { font-family: var(--font-code); font-size: 12px; font-weight: 600; color: var(--ink); }
.duo .role { font-size: 13px; line-height: 1.45; }
.duo .hex { display: flex; gap: 8px; font-family: var(--font-code); font-size: 11px; }
.duo .hex span { flex: 1; }

/* ---- token tables: divider-free rows, like list rows ---- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); box-shadow: var(--pressed); padding: 10px; }
table.spec-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
table.spec-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  padding: 4px 14px 6px;
}
table.spec-table td { padding: 10px 14px; vertical-align: middle; }
table.spec-table tbody tr:nth-child(odd) td { background: color-mix(in srgb, var(--plate) 70%, transparent); }
table.spec-table td:first-child { border-radius: 12px 0 0 12px; font-family: var(--font-code); font-size: 12px; font-weight: 600; white-space: nowrap; }
table.spec-table td:last-child { border-radius: 0 12px 12px 0; }
table.spec-table td.v { font-family: var(--font-code); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
table.spec-table td.d { color: var(--ink-soft); line-height: 1.55; min-width: 220px; }

/* ---- scale bars and radii ---- */
.scale { height: 14px; border-radius: 7px; background: var(--level); box-shadow: var(--plate-shadow); }
.radius-demo { width: 72px; height: 44px; background: var(--ground); box-shadow: var(--raised); }

/* ---- type specimens ---- */
.type-row { display: flex; align-items: baseline; gap: 18px; padding: 10px 0; flex-wrap: wrap; }
.type-row .spec-note { font-family: var(--font-code); font-size: 12px; color: var(--ink-soft); min-width: 170px; }

/* ---- callout: a small plate that says why ---- */
.callout {
  position: relative;
  margin-top: 26px;
  max-width: 70ch;
  background: var(--plate);
  border-radius: var(--r-sm);
  box-shadow: var(--plate-shadow);
  padding: 16px 20px 16px 42px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.callout::before {
  content: "";
  position: absolute; left: 20px; top: 24px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cue);
}
.note { margin-top: 16px; color: var(--ink-soft); max-width: 70ch; line-height: 1.65; }
.note b { color: var(--ink); }

code.soft {
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--ink);
  background: var(--plate);
  border-radius: 8px;
  padding: 2px 7px;
  box-shadow: var(--plate-shadow);
  white-space: nowrap;
}
td code.soft, .spec code.soft { white-space: normal; }

/* ---- do / do not ---- */
.tag-do, .tag-dont {
  display: inline-block;
  font-size: 14px; font-weight: 700; color: var(--on-deep);
  border-radius: 11px; padding: 4px 12px;
}
.tag-do { background: var(--active-deep); }
.tag-dont { background: var(--cue-deep); }
.dodont { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 22px; }
.dodont section { border-radius: var(--r-md); box-shadow: var(--pressed); padding: 20px 22px; }
.dodont ul { margin-top: 14px; padding-left: 18px; display: grid; gap: 8px; }
.dodont li { color: var(--ink-soft); line-height: 1.6; }

/* the one deliberately wrong specimen on the page - raw values on purpose */
.anti-card {
  background: #fdfdfd;
  color: #33312d;
  border: 1px solid #8a857b;
  box-shadow: 5px 5px 0 rgba(70, 65, 55, 0.55);
  border-radius: 6px;
  padding: 18px;
  font-size: 14px;
}

/* ---- screen: the shader panels and their CSS fallback ---- */
.shaderRow { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shaderCell { display: flex; flex-direction: column; gap: 10px; }
.shaderStage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ground);
  display: grid; place-items: center;
}
/* the well is drawn OVER the canvas, so the live surface sits in the same tray */
.shaderStage::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: var(--pressed);
  pointer-events: none;
}
.shaderStage canvas {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  opacity: 0;                      /* transparent until the first frame lands */
  transition: opacity var(--fade-ease);
  cursor: pointer;
}
/* The fallback IS the design: one raised pillow of ground material. */
.shaderStage .pillow { width: 46%; height: 56%; border-radius: var(--r-lg); background: var(--ground); box-shadow: var(--raised); }
.shaderCap { font-size: 13px; color: var(--ink-soft); text-align: center; }

.footer-widget { text-align: center; display: grid; gap: 16px; justify-items: center; padding: 26px; }
.footer-widget p { font-size: 13px; color: var(--ink-soft); }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero .tag { margin-inline: auto; }
}
@media (max-width: 760px) {
  .page, .page > main { gap: 30px; }
  .page { padding: 24px 14px 48px; }
  .masthead { margin: 8px 8px 0; top: 8px; padding-left: 14px; }
  .masthead .brand span { display: none; }
  .spec-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .type-row { gap: 8px; }
}
@media (max-width: 420px) {
  .shell { border-radius: 36px; padding: 16px 12px 20px; }
  .board { gap: 10px; }
  .widget { padding: 13px; }
}

/* ============ motion discipline ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flip .colon { animation: none; }
  .face-plate { --blush: 1; }
  .blush { transition: none; }
  * { transition-duration: 0.01ms !important; }
}
