/* Ekorn website. Colors and type come from the iOS app's design system
   (Ekorn-iOS/Ekorn/DesignSystem, spec §5): Palette light/dark tokens, Figtree. */

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched stand-ins while Figtree loads, so the swap does not move the layout. Measured in Chromium:
   Figtree Regular sets as wide as Arial, Figtree Bold 4% narrower than Arial Bold. Figtree's ascent is .95, descent .25. */
@font-face {
  font-family: "Figtree Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  font-weight: 400;
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Figtree Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold");
  font-weight: 600 700;
  size-adjust: 96%;
  ascent-override: 99%;
  descent-override: 26%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --sunken: #F1EADF;
  --ink: #241C16;
  --ink-2: #6F6359;
  --ink-3: #73685E;
  --line: #E6DDD0;
  --accent: #B4532A;
  --on-accent: #FFFFFF;
  --accent-soft: #F6DFD0;
  --positive: #4F7A52;
  --warning: #D69A2D;
  --plum: #8A5A7A;
  --bezel: #241C16;
  /* The app icon's brown; the same in both appearances (iOS spec §11). */
  --brown: #4A2A1A;
  --cream: #FBF7F0;
  --font: "Figtree", "Figtree Fallback", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.45, .55, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110E;
    --surface: #1F1915;
    --sunken: #2A221C;
    --ink: #F4ECE2;
    --ink-2: #B5A99C;
    --ink-3: #93887D;
    --line: #352C25;
    --accent: #E58A55;
    --on-accent: #1B120C;
    --accent-soft: #4A2A1A;
    --positive: #86B489;
    --warning: #E3B04F;
    --plum: #B98BAA;
    --bezel: #2E2620;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Header: the app's chat header. Its second line appears once the hero phone scrolls away. */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand-head { width: 36px; height: 36px; flex: none; transform-origin: 50% 85%; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name, .brand-count { grid-area: 1 / 1; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.brand-count {
  font-size: .875rem; color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(14px);
}
.show-count .brand-name { transform: translateY(-9px); }
.show-count .brand-count { opacity: 1; transform: translateY(12px); }
.lang-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.lang-link:hover { background: var(--sunken); }

/* Type */
.display {
  font-size: clamp(2.75rem, 1.35rem + 5.4vw, 6rem);
  line-height: .98; letter-spacing: -.037em; font-weight: 700;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2.125rem, 1.35rem + 3vw, 3.75rem);
  line-height: 1.02; letter-spacing: -.03em; font-weight: 700;
  text-wrap: balance;
}
.h3 { font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 700; }
.lead { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.3; color: var(--ink-2); }
.body-l { font-size: clamp(1.0625rem, .98rem + .35vw, 1.25rem); line-height: 1.5; color: var(--ink-2); }

/* App Store badge, drawn in the site's type. A link once APP_STORE_URL is set in assets/js/site.js. */
.store { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.store-badge {
  display: inline-grid; align-content: center; min-height: 56px; padding: 8px 22px;
  border-radius: 14px; background: var(--ink); color: var(--bg); line-height: 1.1; text-decoration: none;
}
.store-badge small { font-size: .75rem; font-weight: 600; opacity: .8; }
.store-badge b { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
a.store-badge:hover { background: var(--accent); color: var(--on-accent); }

/* Hero */
.hero { padding-block: clamp(28px, 3.5vw, 48px) clamp(72px, 10vw, 140px); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-copy .lead { margin-top: 20px; }
.hero-copy .intro { margin-top: 20px; max-width: 34ch; color: var(--ink-2); }
.hero-copy .store { margin-top: 36px; }
/* --perch-w is the squirrel's width, --perch-p the room above the phone; its feet land on the bezel. */
.hero-demo { --perch-w: 100px; --perch-p: 84px; --phone-w: 320px; position: relative; margin: 0; padding-top: var(--perch-p); }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(48px, 6vw, 96px); }
  .hero-demo { --perch-w: 112px; --perch-p: 92px; --phone-w: 336px; }
}

/* The squirrel sitting on the phone (hero). */
.perch {
  position: absolute; z-index: 2; width: var(--perch-w); aspect-ratio: 177 / 207;
  top: calc(var(--perch-p) - var(--perch-w) * 1.1695 + 5px);
  right: calc(50% - min(50%, var(--phone-w) / 2) + 26px);
  pointer-events: none;
}

/* Chat UI, rebuilt from the app's components. Sizes are in em of the app's 17 pt body. */
.chatui { font-size: 17px; line-height: 1.3; color: var(--ink); }
.stack { display: grid; gap: .941em; align-content: start; }
.bubble {
  justify-self: end; width: fit-content; max-width: 86%;
  background: var(--accent-soft); color: var(--ink);
  padding: .706em .941em; border-radius: 1.176em;
}
.erow { display: grid; grid-template-columns: 1.647em minmax(0, 1fr); gap: .47em; align-items: start; }
.erow > .av { width: 1.647em; height: 1.647em; }
.etext { padding-top: .1em; }
.slot { display: grid; position: relative; }
.slot > * { grid-area: 1 / 1; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.176em;
  padding: .941em; display: grid; gap: .941em; min-width: 0;
}
.ov {
  font-size: .706em; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.foods { display: grid; gap: .55em; font-size: .882em; }
.food { display: flex; justify-content: space-between; align-items: baseline; gap: .8em; }
.food .p { color: var(--ink-2); }
.food .k { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.food .pen { display: inline-flex; align-items: center; }
/* Pencils show only while the draft is editable; in the finished (logged) state they are folded away. */
.food .pen svg { width: 0; height: .95em; margin-left: 0; opacity: 0; color: var(--ink-3); }
.motion .food .pen svg { width: .95em; margin-left: .55em; opacity: 1; transition: width .3s var(--ease), margin .3s var(--ease), opacity .2s; }
.motion .food .pen svg.off { width: 0; margin-left: 0; opacity: 0; }
/* A row that is gone in the finished state; the negative margin cancels the card's gap while folded. */
.fold { display: grid; grid-template-rows: 0fr; margin-bottom: -.941em; }
.fold > * { overflow: hidden; min-height: 0; }
.fold > * > * { margin-bottom: .941em; }
.motion .fold { grid-template-rows: 1fr; transition: grid-template-rows .4s var(--ease), opacity .25s; }
.motion .fold.off { grid-template-rows: 0fr; }
.hr { height: 1px; background: var(--line); }
.day { display: grid; gap: .47em; font-size: .882em; }
.day-row { display: flex; justify-content: space-between; gap: .8em; }
.day-row .l { color: var(--ink-2); }
.day-row .v { font-variant-numeric: tabular-nums; }
.bar { height: .55em; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: inherit; background: var(--accent);
  width: 100%; transform-origin: left center; transform: scaleX(var(--to, 0));
}
.status { display: flex; justify-content: space-between; align-items: center; gap: .8em; min-height: 1.4em; }
.slot > .status { align-self: center; }
.badge { display: inline-flex; align-items: center; gap: .4em; font-size: .765em; color: var(--positive); }
.badge svg { width: 1.25em; height: 1.25em; }
.tbtn { color: var(--accent); font-weight: 600; font-size: 1em; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: .706em; }
.btn {
  display: grid; place-items: center; min-height: 2.59em; padding: 0 .9em; border-radius: .824em;
  font-weight: 600; background: var(--sunken); color: var(--ink);
  transition: transform .15s var(--ease);
}
.btn.pri { background: var(--accent); color: var(--on-accent); }
.chips { display: flex; gap: .47em; flex-wrap: wrap; align-self: start; }
.chip {
  font-size: .882em; padding: .5em .9em; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.collapsed {
  display: flex; justify-content: space-between; gap: .8em; align-items: baseline;
  font-size: .765em; color: var(--ink-3); padding: .92em 1.23em;
  border: 1px solid var(--line); border-radius: 1.54em; font-variant-numeric: tabular-nums;
}
.typing { display: inline-flex; align-self: start; align-items: center; gap: .6em; padding-top: .3em; color: var(--ink-2); font-size: .882em; }
.dots { display: inline-flex; gap: .28em; }
.dots i { width: .42em; height: .42em; border-radius: 50%; background: var(--ink-3); }
.reply { padding-left: 2.117em; }

/* Plan card */
.meal { display: grid; gap: .47em; }
.meal-h { display: grid; grid-template-columns: 1.18em 1fr auto; gap: 0 .47em; align-items: baseline; font-weight: 600; }
.meal-h svg { width: .9em; height: .9em; color: var(--ink-3); align-self: center; }
.meal-h .k { font-variant-numeric: tabular-nums; }
.meal-h .t { grid-column: 2 / -1; font-weight: 400; font-size: .882em; color: var(--ink-2); }
.meal .foods { padding-left: 1.87em; } /* 1.65em of the header row, in the rows' smaller type */

/* Draft card */
.pick { display: flex; justify-content: space-between; align-items: center; font-size: .882em; }
.pick .l { color: var(--ink-2); }
.pill {
  display: inline-flex; align-items: center; gap: .45em; padding: .5em .9em; border-radius: 99px;
  background: var(--sunken); font-weight: 600; font-size: 1.07em;
}
.pill svg { width: .8em; height: .8em; color: var(--ink-2); }
.hint { font-size: .765em; color: var(--ink-3); }

/* The phone */
.phone {
  position: relative; width: min(100%, var(--phone-w, 336px)); margin-inline: auto;
  aspect-ratio: 1 / 1.95; padding: 10px; border-radius: 52px; background: var(--bezel);
}
.screen {
  container-type: inline-size;
  position: relative; height: 100%; overflow: hidden; border-radius: 42px; background: var(--bg);
}
.screen .chatui { font-size: calc(17 * 100cqi / 402); position: absolute; inset: 0; display: flex; flex-direction: column; }
.sbar { display: flex; justify-content: space-between; align-items: center; padding: 1.1em 1.9em .3em 2.2em; font-weight: 600; font-size: .94em; }
.sbar svg { height: .8em; width: auto; }
.sbar .icons { display: flex; gap: .35em; align-items: center; }
.island { position: absolute; top: .65em; left: 50%; width: 6.9em; height: 2.05em; margin-left: -3.45em; border-radius: 99px; background: #000; }
.chead { display: flex; align-items: center; gap: .6em; padding: .55em .941em .7em; border-bottom: 1px solid var(--line); }
.chead .av { width: 2.35em; height: 2.35em; }
.chead .n { font-weight: 700; font-size: 1.18em; line-height: 1.1; }
.chead .s { color: var(--ink-2); font-size: .882em; font-variant-numeric: tabular-nums; }
.chat { flex: 1; padding: .941em; display: grid; gap: .706em; align-content: start; overflow: hidden; }
.composer {
  position: absolute; left: .941em; right: .941em; bottom: 5.4em;
  display: flex; align-items: flex-end; gap: .55em;
  background: var(--sunken); border-radius: 1.6em; padding: .55em .55em .55em .941em;
}
.composer > svg { width: 1.3em; height: 1.3em; color: var(--ink-2); flex: none; margin-bottom: .48em; }
.field { flex: 1; display: grid; min-height: 2.12em; align-items: center; }
.field > * { grid-area: 1 / 1; }
.field .ph { color: var(--ink-3); }
.field .typed { white-space: pre-wrap; }
.field .typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: var(--accent); opacity: 0; }
.typing-on .typed::after { opacity: 1; animation: caret 1s steps(1) infinite; }
.send {
  width: 2.12em; height: 2.12em; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink-3) 18%, transparent); color: var(--ink-3);
  transition: background-color .2s, color .2s;
}
.send svg { width: 1em; height: 1em; }
.has-text .send { background: var(--accent); color: var(--on-accent); }
.tabbar {
  position: absolute; left: 50%; bottom: 1.15em; transform: translateX(-50%);
  display: flex; gap: .2em; padding: .3em; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line);
}
.tab { display: grid; justify-items: center; gap: .1em; width: 4.9em; padding: .35em 0; border-radius: 99px; font-size: .66em; font-weight: 600; color: var(--ink); }
.tab svg { width: 1.9em; height: 1.9em; }
.tab.on { background: var(--sunken); color: var(--accent); }
.homebar { position: absolute; left: 50%; bottom: .45em; width: 8em; height: .3em; margin-left: -4em; border-radius: 99px; background: var(--ink); opacity: .85; }

/* Moments */
.moment { padding-block: clamp(64px, 8vw, 120px); }
.moment-grid { display: grid; gap: 40px; }
.moment-copy .body-l { margin-top: 20px; max-width: 32ch; }
.moment-demo { margin: 0; width: 100%; max-width: 520px; }
@media (min-width: 960px) {
  .moment-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .moment-demo { justify-self: end; }
  .moment-copy { position: sticky; top: 112px; }
}
.moment-demo .chatui { font-size: clamp(16px, 13px + .4vw, 19px); }

/* The photo moment */
.photo { justify-self: end; width: 68%; border-radius: 1.176em; overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; }

/* Diary */
.diary { display: grid; gap: .941em; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; padding-bottom: .7em; border-bottom: 1px solid var(--line); }
.wd { display: grid; justify-items: center; gap: .3em; }
.wd span { font-size: .882em; color: var(--ink-2); }
.wd b { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; font-size: 1.06em; font-weight: 600; font-variant-numeric: tabular-nums; }
.wd i { width: .3em; height: .3em; border-radius: 50%; background: var(--ink-3); }
.wd.later span, .wd.later b { color: var(--ink-3); opacity: .7; }
.wd.later i { visibility: hidden; }
.wd.sel span { color: var(--ink); }
.wd.sel b { background: var(--accent); color: var(--on-accent); }
.eaten { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 1.1em; align-items: center; }
.ring { position: relative; }
.ring svg { width: 100%; height: auto; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .track { stroke: var(--sunken); }
.ring .fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--to, 0)); }
.ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring .c b { font-size: 1.35em; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring .c span { font-size: .706em; color: var(--ink-2); }
.macros { display: grid; gap: .6em; font-size: .882em; }
.macro { display: grid; gap: .3em; }
.bar > i[data-c="positive"] { background: var(--positive); }
.bar > i[data-c="warning"] { background: var(--warning); }
.bar > i[data-c="plum"] { background: var(--plum); }
.weight .chart { width: 100%; height: auto; overflow: visible; }
.weight .line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--to, 0)); }
.weight .goal { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 4 4; }
.weight .dot { fill: var(--accent); }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.figs span { display: block; font-size: .765em; color: var(--ink-2); }
.figs b { font-size: 1.18em; font-weight: 700; }
.diary .two { display: grid; gap: .941em; }

/* Languages */
.chorus { display: grid; gap: .706em; justify-items: end; }
.chorus .bubble:nth-child(even) { margin-right: 1.4em; }
.chorus .bubble:nth-child(3n) { margin-right: 2.6em; }

/* Notes */
.notes { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line); }
.notes-grid { display: grid; gap: 48px; }
.notes-grid p { margin-top: 14px; color: var(--ink-2); max-width: 46ch; }
.notes-grid .more { margin-top: 14px; display: inline-block; font-weight: 600; color: var(--accent); }
@media (min-width: 800px) { .notes-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Finale: the app icon at page scale. */
.finale { background: var(--brown); color: var(--cream); overflow: hidden; }
.finale-grid { display: grid; gap: 24px; align-items: end; padding-top: clamp(72px, 10vw, 136px); }
.finale .h2 { max-width: 12ch; }
.finale .store { margin-top: 32px; padding-bottom: clamp(56px, 8vw, 112px); }
.finale .store-badge { background: var(--cream); color: var(--brown); }
.finale a.store-badge:hover { background: #FFFFFF; color: var(--brown); }
.finale .squirrel { width: min(78%, 360px); justify-self: center; margin-bottom: -6px; }
@media (min-width: 800px) {
  .finale-grid { grid-template-columns: 1.2fr 1fr; }
  .finale .squirrel { justify-self: end; width: min(100%, 400px); }
}

/* Footer */
.site-footer { padding-block: 40px 48px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); }
.finale + .site-footer { border-top: 0; }
.foot { display: grid; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.foot-brand img { width: 28px; height: 28px; }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a, .foot-meta a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; color: var(--ink); }
.foot nav a:hover, .foot-meta a:hover { text-decoration: underline; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
@media (min-width: 900px) { .foot { grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; } .foot nav ul { justify-content: center; } }

/* Legal and support pages */
.doc { padding-block: clamp(40px, 6vw, 88px) clamp(72px, 9vw, 120px); }
.doc-in { max-width: 720px; }
.doc .updated { margin-top: 16px; color: var(--ink-3); font-size: .9375rem; }
.doc .summary { margin-top: 32px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.doc .summary p + p, .doc .summary ul { margin-top: 12px; }
.doc h2 { font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); line-height: 1.2; letter-spacing: -.015em; margin-top: 56px; scroll-margin-top: 88px; }
.doc h3 { font-size: 1.125rem; line-height: 1.3; margin-top: 32px; }
.doc p, .doc ul, .doc ol, .doc dl, .doc table { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--ink-3); }
.doc .toc { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc .toc ol { columns: 2 220px; column-gap: 32px; margin: 0; }
.doc .toc li { break-inside: avoid; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
.doc .path { font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; color: var(--ink); }
.doc td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
.doc-head .h2 { margin-top: 0; }

/* 404 */
.lost { min-height: calc(100vh - 64px - 140px); display: grid; align-content: center; padding-block: 64px; }
.lost img { width: 120px; height: 120px; margin-bottom: 28px; }
.lost p { margin-top: 16px; color: var(--ink-2); }
.lost a { font-weight: 600; color: var(--accent); }

/* How full each bar, ring and line is in the finished state (no inline styles: the CSP forbids them). */
.to-275 { --to: .1667; }   /* 275 of 1,650 kcal */
.to-640 { --to: .3879; }
.to-560 { --to: .3394; }
.to-1205 { --to: .7303; }
.to-p { --to: .769; }      /* protein 80 of 104 g */
.to-c { --to: .675; }      /* carbs 131 of 194 g */
.to-f { --to: .804; }      /* fat 41 of 51 g */
.to-all { --to: 1; }

/* Motion. Without JavaScript or with reduced motion, every demo shows its finished state:
   [data-at] parts are shown, .gone parts (typing dots, chips, the corrected card) are not.
   site.js adds .motion, then turns parts on (.on) and off (.off) on a timeline. */
.gone { visibility: hidden; opacity: 0; }
.motion .gone { visibility: visible; opacity: 1; }
.motion [data-at]:not(.on) { opacity: 0; visibility: hidden; }
.motion .off { opacity: 0; visibility: hidden; }
.motion [data-at]:not(.on) .bar > i,
.motion [data-at]:not(.on) .ring .fill,
.motion [data-at]:not(.on) .line { --to: 0 !important; }

@media (prefers-reduced-motion: no-preference) {
  .motion [data-at] { transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s; }
  .motion [data-at]:not(.on) { transform: translateY(8px); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
  .motion .bubble[data-at]:not(.on) { transform: translateY(10px) scale(.96); }
  .motion .bubble[data-at] { transform-origin: right bottom; }
  .motion .off { transition: opacity .25s var(--ease), visibility 0s .25s; }
  .motion .bar > i { transition: transform .45s var(--ease) .25s; }
  .motion .ring .fill { transition: stroke-dashoffset 1.1s var(--ease) .15s; }
  .motion .line { transition: stroke-dashoffset 1.6s var(--ease) .3s; }
  .motion .macro:nth-child(2) .bar > i { transition-delay: .35s; }
  .motion .macro:nth-child(3) .bar > i { transition-delay: .45s; }
  .motion .photo[data-at] img { transition: filter .7s var(--ease) .1s; }
  .motion .photo[data-at]:not(.on) img { filter: blur(10px) saturate(.6); }
  .btn.press { transform: scale(.95); }
  .dots i { animation: dot 1.1s ease-in-out infinite; }
  .dots i:nth-child(2) { animation-delay: .15s; }
  .dots i:nth-child(3) { animation-delay: .3s; }
  .motion .was.off { transition: clip-path .4s var(--ease), opacity .3s var(--ease) .15s, visibility 0s .45s; }
  .ride { transition: transform .4s var(--ease); }
  .eye { animation: blink 7s infinite; transform-box: fill-box; transform-origin: center; }
  .tail { transform-box: view-box; transform-origin: 112px 192px; }
  .flick .tail { animation: flick .9s var(--spring); }
  .nod { animation: nod .6s var(--spring); }
  .pupil { transition: transform .25s var(--ease); }
}
/* The correction moment: the first card sits over the space its replacement takes later. */
.was { position: absolute; top: 0; left: 0; right: 0; z-index: 1; clip-path: inset(0 0 0 0); }
.was.off { clip-path: inset(0 0 calc(100% - 3.1em) 0); }
.pre-fix .ride { transform: translateY(var(--shift, 0px)); }
.pupil { transform: translate(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px)); }

@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-.25em); opacity: 1; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes blink { 0%, 95.5%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes flick { 0% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 60% { transform: rotate(3deg); } 100% { transform: rotate(0); } }
@keyframes nod { 0% { transform: none; } 35% { transform: translateY(-3px) rotate(-6deg); } 70% { transform: translateY(0) rotate(3deg); } 100% { transform: none; } }
.doc .toc.plain ul { list-style: none; padding-left: 0; columns: 2 220px; column-gap: 32px; margin: 0; }
