/* GENERATED from site/components/ by site/tools/build_components.py — do not edit. */
/* The components' shared rules (C7a). A component's own rules sit beside it (site/components/<name>/<name>.css);
   build_components.py concatenates them into site/web/styles/components.css. Colours are tokens only (Law #13). */

/* the night band: the dark theme's own tokens, whatever the page's theme (the scope is generated: .night) */
.night {
  background: var(--paper);
  color: var(--ink);
}

/* motion plays on view (components.js adds .js and .seen) and rests on the final frame without it */
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pop {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--cold) 55%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0.5rem transparent;
  }
}
.tiny {
  font-size: 0.6875rem;
}

/* The box as an object (W108 S1, site_v3.md §4.1): the approved label at 102 × 51 on a frosted lid over the box's body.
   The lid and the body are the box's own material — paper-white with a breath of cold — in both themes, as the label is
   paper in both (a real object keeps its material at night); a soft bloom of frost from the top-left and a few crystal
   specks instead of a hatch; the contact shadow under the body, the ambient one around it. Sizes follow the container
   (cqw), so it holds at every width. Tokens only. */
.box-hero {
  container-type: inline-size;
  position: relative;
  display: block;
  width: min(100%, 34rem);
  margin-inline: auto;
  text-decoration: none;
  color: inherit;
  border-radius: calc(var(--r) * 1.4);
  outline-offset: 6px;
}
.box-hero.photo .media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--r) * 1.4);
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--ink) 10%, transparent),
    0 24px 48px -20px color-mix(in srgb, var(--ink) 45%, transparent);
}
/* the lid: pale in both themes (the material), lit from the top-left */
.box-hero .box-lid {
  position: relative;
  z-index: 1;
  aspect-ratio: 17 / 11.5;
  border-radius: calc(var(--r) * 1.4);
  background-color: color-mix(in srgb, var(--print-paper) 90%, var(--cold));
  background-image:
    radial-gradient(70% 55% at 16% 6%, var(--print-paper), transparent 72%),
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--print-paper) 96%, var(--cold)) 0%,
      color-mix(in srgb, var(--print-paper) 84%, var(--cold)) 100%
    );
  box-shadow:
    inset 0 1px 0 var(--print-paper),
    inset 0 -2px 0 color-mix(in srgb, var(--print-paper) 70%, var(--cold)),
    0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent);
  display: grid;
  place-items: center;
  padding: 5cqw 5.5cqw 5.5cqw;
}
/* frost: a few crystal specks catching the light, never a hatch */
.box-hero .box-lid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 9% 22%, var(--print-paper) 0 1.2px, transparent 2px),
    radial-gradient(circle at 23% 9%, var(--print-paper) 0 0.9px, transparent 1.6px),
    radial-gradient(circle at 88% 14%, var(--print-paper) 0 1px, transparent 1.8px),
    radial-gradient(circle at 94% 61%, var(--print-paper) 0 0.8px, transparent 1.5px),
    radial-gradient(circle at 6% 78%, var(--print-paper) 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 80% 90%, var(--print-paper) 0 0.9px, transparent 1.6px),
    radial-gradient(circle at 48% 95%, var(--print-paper) 0 0.7px, transparent 1.4px),
    radial-gradient(circle at 60% 4%, var(--print-paper) 0 0.8px, transparent 1.5px);
  opacity: 0.9;
  pointer-events: none;
}
/* the light along the lid's top edge */
.box-hero .box-lid::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 26%;
  border-radius: calc(var(--r) * 1.4) calc(var(--r) * 1.4) 0 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--print-paper) 85%, transparent),
    transparent
  );
  pointer-events: none;
}
/* the body: the box's thickness below the lid, overhung by it, ONE face shading down (no seam); the shadows are the body's */
.box-hero .box-body {
  display: block;
  height: 13cqw;
  margin: -1cqw 1.6cqw 0;
  border-radius: 0 0 calc(var(--r) * 1.2) calc(var(--r) * 1.2);
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--print-paper) 84%, var(--cold)) 0%,
    color-mix(in srgb, var(--print-paper) 76%, var(--cold)) 55%,
    color-mix(in srgb, var(--print-paper) 68%, var(--cold)) 100%
  );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--print-paper) 60%, var(--cold)),
    0 10px 14px -10px color-mix(in srgb, var(--ink) 55%, transparent),
    0 34px 56px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}
/* the printed label: white paper and one ink, whatever the theme (it is a real label) */
.box-hero .box-label {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 102 / 51;
  background: var(--print-paper);
  color: var(--print-ink);
  border-radius: 2cqw;
  padding: 4cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26%;
  gap: 3.5cqw;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 18%, transparent);
  font-family: var(--text);
  line-height: 1.25;
}
.box-hero .bl-main {
  display: grid;
  align-content: start;
  gap: 1.8cqw;
  min-width: 0;
}
.box-hero .bl-name {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  font-weight: 650;
  font-size: 6.4cqw;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.box-hero .bl-band {
  justify-self: start;
  background: var(--print-ink);
  color: var(--print-paper);
  font-weight: 600;
  font-size: 3cqw;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6cqw 1.6cqw;
  display: inline-flex;
  align-items: center;
  gap: 0.9cqw;
  margin-top: 0.6cqw;
}
.box-hero .bl-band .icon {
  width: 1.1em;
  height: 1.1em;
  stroke: currentColor;
}
.box-hero .bl-facts {
  font-size: 2.75cqw;
  line-height: 1.3;
  display: grid;
  gap: 0.9cqw;
  margin-top: 0.6cqw;
}
.box-hero .bl-m {
  font-family: var(--mono);
  font-weight: 500;
}
.box-hero .bl-qr {
  display: grid;
  gap: 0.9cqw;
  align-content: start;
  justify-items: center;
  text-align: center;
  font-size: 2.4cqw;
}
.box-hero .bl-qr .qr {
  display: block;
  width: 100%;
  height: auto;
  outline: 0 solid var(--brand);
  outline-offset: 0.8cqw;
}
/* with a record behind it the box is a link: hover or focus outlines the code and lifts the lid */
a.box-hero.drawn:hover .bl-qr .qr,
a.box-hero.drawn:focus-visible .bl-qr .qr {
  outline-width: 0.5cqw;
}
a.box-hero.drawn:hover .box-lid,
a.box-hero.drawn:focus-visible .box-lid {
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: no-preference) {
  a.box-hero.drawn .box-lid,
  a.box-hero .bl-qr .qr {
    transition:
      transform 0.35s ease,
      outline-width 0.2s ease;
  }
}

/* The record as four documents (W108 S1, site_v3.md §4.2): a strip of documents — four across on a wide screen, a
   snapping row on a phone with a dot per document — each one the real thing: a panel, a receipt, three readings over a
   sparkline, a stamp. Every document is paper: the label's paper and ink in both themes (its muted tone and hairlines
   mixed from them), the chart drawn with the tokens home's print-safe heat and cold. The documents share one grid row
   and the captions another (a subgrid), so four captions of different lengths never leave ragged feet. Tokens only. */
.rstrip {
  display: grid;
  gap: 0.75rem;
}
.rstrip-note {
  margin: 0;
}
.rstrip-docs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(82%, 22rem);
  grid-template-rows: 1fr auto;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.rstrip-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.rstrip-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--line);
}
.rstrip-dots i.on {
  background: var(--brand);
}
@media (min-width: 62em) {
  .rstrip-docs {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .rstrip-dots {
    display: none;
  }
}
.rdoc {
  margin: 0;
  scroll-snap-align: start;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 0.625rem;
  min-width: 0;
}
.rdoc figcaption {
  font-size: 0.9375rem;
  color: var(--muted);
}
.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem;
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent),
    0 14px 28px -18px color-mix(in srgb, var(--ink) 35%, transparent);
}
/* a paper document: the label's paper and ink, whatever the theme; its own muted tone and hairline from them */
.doc.paper {
  --doc-paper: var(--print-paper);
  --doc-ink: var(--print-ink);
  --doc-muted: color-mix(in srgb, var(--print-ink) 56%, var(--print-paper));
  --doc-line: color-mix(in srgb, var(--print-ink) 16%, var(--print-paper));
  background: var(--doc-paper);
  color: var(--doc-ink);
  border-color: var(--doc-line);
}
/* the macros panel: the shape of a nutrition panel — a heavy top rule, hairline rows, one big number */
.doc.panel {
  border-top: 4px solid var(--doc-ink);
  display: grid;
  align-content: start;
  gap: 0.4rem;
}
.panel-head {
  font-size: 0.8125rem;
  color: var(--doc-muted);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--doc-line);
}
.panel-kcal {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  line-height: 1.1;
  padding-block: 0.3rem 0.5rem;
  border-bottom: 2px solid var(--doc-ink);
}
.panel-kcal [data-v] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.panel-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding-block: 0.35rem;
  border-bottom: 1px solid var(--doc-line);
  font-size: 0.9375rem;
}
.panel-row:last-child {
  border-bottom: 0;
}
.panel-row .tnum {
  font-family: var(--mono);
  font-weight: 600;
}
.panel-tag {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--doc-muted);
  border: 1px solid var(--doc-line);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
/* the receipt: the kitchen's mono on paper, its lines, torn once at the foot (the teeth hang below the card) */
.doc.receipt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  position: relative;
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  padding-bottom: 1.25rem;
}
.rcp-head {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--doc-muted);
}
.rcp-store {
  font-weight: 600;
}
.rcp-date {
  color: var(--doc-muted);
}
.rcp-lines {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0;
  border-top: 1px dashed var(--doc-line);
  display: grid;
  gap: 0.3rem;
}
.rcp-lines li {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.rcp-photo .media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.rcp-tear {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 7px;
  background: conic-gradient(from 135deg at 50% 0, var(--doc-paper) 90deg, transparent 0) 0 0 / 14px 7px
    repeat-x;
}
/* the readings: three record numbers with their words, the story as a sparkline under them; on paper, the chart's
   tokens become the print-safe ones (a child scope reads the parent's mixes) */
.doc.readings {
  padding: 1rem 1rem 0.5rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  --doc-pass: color-mix(in srgb, var(--pass) 70%, var(--doc-ink));
  --doc-cold-soft: color-mix(in srgb, var(--print-cold) 14%, var(--doc-paper));
}
.doc.readings .tempstory {
  --heat: var(--print-heat);
  --cold: var(--print-cold);
  --pass: var(--doc-pass);
  --cold-soft: var(--doc-cold-soft);
  --surface: var(--doc-paper);
  --ink: var(--doc-ink);
  --muted: var(--doc-muted);
  --line: var(--doc-line);
}
.rdg-rows {
  display: grid;
  gap: 0.35rem;
}
.rdg-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--doc-muted);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--doc-line);
}
.rdg-row .tnum {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--doc-ink);
  white-space: nowrap;
}
/* the recall check: a stamp — turned a little, bordered, in capitals; inked with the pass colour once a check is fresh */
.doc.stamp {
  display: grid;
  place-items: center;
  text-align: center;
}
.stamp-ink {
  --stamp: var(--doc-muted);
  transform: rotate(-4deg);
  border: 2px solid var(--stamp);
  border-radius: 8px;
  padding: 0.75rem 0.875rem 0.625rem;
  width: min(100%, 15rem);
  color: var(--stamp);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
  display: grid;
  gap: 0.5rem;
}
.doc.stamp.inked .stamp-ink {
  --stamp: color-mix(in srgb, var(--pass) 70%, var(--doc-ink));
}
.stamp-ink p {
  margin: 0;
}
.stamp-check {
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}
.stamp-date {
  display: block;
  min-height: 1.2em;
  margin-top: 0.125rem;
  border-top: 1px solid var(--stamp);
  padding-top: 0.35rem;
  font-size: 0.75rem;
}

/* the temperature story (C7a): the record's line, playable and touchable */
.tempstory {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  outline-offset: 4px;
  border-radius: var(--r);
}
.tempstory .curve {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
}
/* a spark sits in the record strip's horizontal scroll-snap: a swipe that starts on it moves the strip */
.tempstory.spark .curve {
  touch-action: auto;
}
.tempstory .line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tempstory .heat {
  stroke: var(--heat);
}
.tempstory .cold {
  stroke: var(--cold);
}
.tempstory .band {
  fill: var(--cold-soft);
  opacity: 0.9;
}
.tempstory .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.tempstory .lbl {
  font: 500 11px/1 var(--mono);
  fill: var(--muted);
}
.tempstory .val {
  font: 600 12px/1 var(--mono);
}
.tempstory .val.h {
  fill: var(--heat);
}
.tempstory .val.c {
  fill: var(--cold);
}
.tempstory .dot {
  r: 4.5;
  stroke: var(--surface);
  stroke-width: 2;
}
.tempstory .dot.h {
  fill: var(--heat);
}
.tempstory .dot.c {
  fill: var(--cold);
}
.tempstory .mark {
  stroke: var(--muted);
  stroke-dasharray: 3 4;
  stroke-width: 1;
  transition:
    stroke 0.3s ease,
    stroke-width 0.3s ease;
}
.tempstory .mark.passed {
  stroke: var(--pass);
  stroke-dasharray: none;
  stroke-width: 2.5;
}
.tempstory .cursor {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
}
.tempstory .playhead {
  fill: var(--heat);
  stroke: var(--surface);
  stroke-width: 3;
  opacity: 0;
}
.tempstory .playhead.cold {
  fill: var(--cold);
}
.tempstory.live .cursor,
.tempstory.live .playhead {
  opacity: 1;
}
.tempstory .readout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.75rem;
  align-items: baseline;
  font-size: 0.875rem;
  min-height: 1.75rem;
}
.tempstory .readout b {
  font-size: 1.25rem;
  color: var(--cold);
  transition: color 0.3s ease;
}
.tempstory.hot .readout b {
  color: var(--heat);
}
/* a spark's resting numbers are the record strip's own; its readout shows only while it is read */
.tempstory.spark .readout {
  display: none;
}
.tempstory.spark.live .readout {
  display: flex;
}
.tempstory .replay {
  justify-self: start;
}

/* the probe scene (C7a; the other scenes retired by W108 S2): a display, its probe, a blinking LED */
.scene {
  background: var(--sunk);
  border-radius: var(--r);
  padding: 0.5rem;
  aspect-ratio: 240/150;
}
.scene-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.scene-svg .t-body {
  fill: var(--ink);
}
.scene-svg .t-lcd {
  fill: var(--cold-soft);
}
.scene-svg .t-num {
  font: 600 34px/1 var(--mono);
  fill: var(--ink);
  text-anchor: end;
}
.scene-svg .t-unit {
  font: 600 12px/1 var(--mono);
  fill: var(--ink);
}
.scene-svg .t-probe {
  fill: var(--muted);
}
.scene-svg .t-led {
  fill: var(--heat);
}
.scene-svg .t-dash {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}
.js .play-on-view.seen .probe .t-led {
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

/* The three moments of How it works (W108 S2, site_v3.md §4.3): objects with weight on the thread. Each drawing rests
   complete; when seen, ONE gesture plays once (≤ 1.2 s, `forwards`, never a loop): the box lifts, the box crosses to
   the cash, the brackets close. The label, the count and the screen line are HTML (words through `say`, values through
   `v`), laid over the drawing, never inside it. Tokens only. */
.moment {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.m-art {
  position: relative;
  background: var(--sunk);
  border-radius: var(--r);
  padding: 0.5rem;
  aspect-ratio: 240 / 150;
  overflow: hidden;
}
.m-art .media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r) - 4px);
}
.moment-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.moment-label {
  font: 600 0.8125rem/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.m-count {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  font: 600 0.9375rem/1 var(--mono);
  color: var(--cold);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 12%, transparent);
}
.m-screen {
  position: absolute;
  left: 66%;
  top: 24%;
  width: 24%;
  font: 600 0.6875rem/1.25 var(--text);
  color: var(--pass);
  background: color-mix(in srgb, var(--pass-soft) 80%, var(--surface));
  border-radius: 6px;
  padding: 0.3rem 0.35rem;
}
/* the freezer: a chest from the front, the lid up, frost in the air, boxes on two shelves */
.moment-svg .m-lid {
  fill: color-mix(in srgb, var(--print-paper) 82%, var(--cold));
  stroke: var(--cold);
  stroke-width: 2;
  stroke-linejoin: round;
}
.moment-svg .m-frost {
  fill: var(--print-paper);
  opacity: 0.9;
}
.moment-svg .m-chest {
  fill: var(--cold-soft);
  stroke: var(--cold);
  stroke-width: 2;
}
.moment-svg .m-rim {
  fill: var(--cold);
  opacity: 0.35;
}
.moment-svg .m-box {
  fill: var(--print-paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}
.moment-svg .m-strip,
.moment-svg .m-qr {
  fill: var(--ink);
}
.moment-svg .m-shadow {
  fill: var(--ink);
  opacity: 0.12;
}
/* the hand-off: a counter edge, the box one way, the cash the other, a slip beside */
.moment-svg .m-counter {
  fill: color-mix(in srgb, var(--surface) 70%, var(--line));
}
.moment-svg .m-counter-edge {
  fill: var(--line);
}
.moment-svg .m-note {
  fill: var(--pass-soft);
  stroke: var(--pass);
  stroke-width: 1.5;
}
.moment-svg .m-coin {
  fill: var(--warn-soft);
  stroke: var(--warn);
  stroke-width: 1.5;
}
.moment-svg .m-slip {
  fill: var(--print-paper);
  stroke: var(--line);
  stroke-width: 1.5;
}
.moment-svg .m-slip-lines {
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-linecap: round;
}
/* the scan: a phone held over the label, the brackets on the code */
.moment-svg .m-label {
  fill: var(--print-paper);
  stroke: var(--line);
  stroke-width: 1.5;
}
.moment-svg .m-phone {
  fill: var(--ink);
}
.moment-svg .m-glass {
  fill: var(--cold-soft);
}
.moment-svg .m-lens {
  fill: var(--surface);
}
.moment-svg .m-bracket {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.moment-svg .m-brackets {
  transform-box: fill-box;
  transform-origin: center;
}
/* the one gesture per moment, once, when seen (1.2 s: long enough to read as a motion, short enough never to wait for) */
.js .moment.freezer.seen .m-gesture {
  animation: m-lift 1.2s ease-out forwards;
}
.js .moment.hand_off.seen .m-gesture {
  animation: m-cross 1.2s ease-in-out forwards;
}
.js .moment.scan.seen .m-gesture {
  animation: m-close 1.2s ease-out forwards;
}
@keyframes m-lift {
  0% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(-14px);
  }
}
@keyframes m-cross {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(46px);
  }
}
@keyframes m-close {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

/* how it works: three readings on one hot-to-cold thread (C7a) */
.thread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  counter-reset: s;
  margin: 0;
  padding: 0;
}
@media (min-width: 56em) {
  .thread {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.thread li {
  list-style: none;
  counter-increment: s;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 0.5rem;
  align-content: start;
  position: relative;
  padding-left: 3.25rem;
}
.thread::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--heat), var(--cold));
}
.thread li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.375rem;
  height: 2.375rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  border: 3px solid var(--heat);
  font: 600 1.125rem/1 var(--mono);
  color: var(--heat);
  z-index: 1;
}
.thread li:nth-child(2)::before {
  border-color: color-mix(in srgb, var(--heat) 50%, var(--cold));
  color: color-mix(in srgb, var(--heat) 50%, var(--cold));
}
.thread li:nth-child(3)::before {
  border-color: var(--cold);
  color: var(--cold);
}
@media (min-width: 56em) {
  .thread li {
    padding-left: 0;
    padding-top: 3.5rem;
  }
  .thread::before {
    left: 1rem;
    right: 1rem;
    top: 1.05rem;
    bottom: auto;
    width: auto;
    height: 4px;
    background: linear-gradient(90deg, var(--heat), var(--cold));
  }
}

/* an app screen in a phone frame, drawn in the app's dark style (C7a): the .night scope is the dark theme's tokens */
.phone {
  width: min(100%, 12.5rem);
  justify-self: center;
  aspect-ratio: 9/18.5;
  border-radius: 1.9rem;
  padding: 0.45rem;
  background: var(--sunk);
  box-shadow:
    0 0 0 2px var(--line),
    0 24px 48px -20px rgb(0 0 0 / 0.55);
}
.phone .screen {
  height: 100%;
  border-radius: 1.5rem;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.6rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.35;
}
.a-status {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.a-title {
  font: 650 1.125rem/1.1 var(--display);
}
.a-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.25rem;
}
.a-card.dim {
  opacity: 0.55;
}
.a-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem;
}
.a-tag {
  font-size: 0.625rem;
  color: var(--cold);
}
.a-sub {
  color: var(--muted);
}
.a-temp {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  color: var(--cold);
}
.a-temp b {
  font-size: 1.75rem;
}
.a-curve {
  width: 100%;
  height: auto;
}
.a-curve polyline {
  fill: none;
  stroke: var(--cold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.a-pass {
  color: var(--pass);
  font-weight: 600;
}
.a-tabs {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0.3rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.5625rem;
  color: var(--muted);
}
.a-tabs .on {
  color: var(--cold);
  font-weight: 700;
}
.a-pass {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.a-pass .icon {
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
}

/* a photo or a video, or the animation standing in for it (C7a) */
.media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r);
  object-fit: cover;
  aspect-ratio: 16/10;
  background: var(--sunk);
}
.owed-media {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* one dish from the freezer (C7a): two on the landing, the rest in the shop */
.pick {
  display: grid;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.pick:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgb(0 0 0 / 0.4);
}
.pick .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.count {
  display: inline-flex;
  gap: 0.375rem;
  align-items: baseline;
  color: var(--cold);
  font-weight: 600;
}
.count b {
  font-size: 1.25rem;
}
@media (prefers-reduced-motion: reduce) {
  .pick:hover {
    transform: none;
  }
}

/* how far back an ingredient is traced (C7a) */
.trace-row {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.75rem;
}
.ladder {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}
.ladder li {
  flex: 1;
  padding: 0.375rem 0.5rem 0;
  border-top: 4px solid var(--line);
  color: var(--muted);
  transition: border-color 0.4s ease calc(var(--n) * 160ms);
}
.ladder li.on {
  border-top-color: var(--pass);
  color: var(--ink);
  font-weight: 600;
}

/* where it came from, by weight, and the share traced to the farm (C7a) */
.origin .bars {
  display: grid;
  gap: 0.625rem;
}
.origin .bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
}
.origin .track {
  grid-column: 1/-1;
  display: block;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--sunk);
  overflow: hidden;
}
.origin .track i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--brand);
  border-radius: 999px;
  transition: width 1.3s ease;
}
.origin .bar.unknown .track i {
  background: repeating-linear-gradient(
    45deg,
    var(--muted),
    var(--muted) 3px,
    transparent 3px,
    transparent 6px
  );
}
.traced {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--r);
  background: var(--sunk);
  margin-bottom: 1rem;
}
.traced-fig {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.traced-fig b {
  font: 600 clamp(2rem, 1.5rem + 2vw, 3rem)/1 var(--mono);
  color: var(--pass);
}
.traced .track.big {
  grid-column: auto;
  height: 0.75rem;
  background: var(--surface);
}
.traced .track.big i {
  background: var(--pass);
}
.js .play-on-view:not(.seen) .track i {
  width: 0;
}
