:root {
  --ease-in-quad: cubic-bezier(.55, .085, .68, .53);
  --ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
  --ease-in-quart: cubic-bezier(.895, .03, .685, .22);
  --ease-in-quint: cubic-bezier(.755, .05, .855, .06);
  --ease-in-expo: cubic-bezier(.95, .05, .795, .035);
  --ease-in-circ: cubic-bezier(.6, .04, .98, .335);
  --ease-out-quad: cubic-bezier(.25, .46, .45, .94);
  --ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  --ease-out-quint: cubic-bezier(.23, 1, .32, 1);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-out-circ: cubic-bezier(.075, .82, .165, 1);
  --ease-in-out-quad: cubic-bezier(.455, .03, .515, .955);
  --ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);
  --ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);
  --ease-in-out-quint: cubic-bezier(.86, 0, .07, 1);
  --ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
  --ease-in-out-circ: cubic-bezier(.785, .135, .15, .86);
}

/* Inter 4 (rsms.me/inter), variable with optical sizing, self-hosted: the site and its rebuilt screens */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/InterVariable.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('fonts/InterVariable-Italic.woff2') format('woff2'); }
/* Mynerve (OFL, fonts/Mynerve-LICENSE.txt): a felt-tip hand for text that sits beside the handwritten notes */
@font-face { font-family: 'Mynerve'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Mynerve.woff2') format('woff2'); }

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  /* A barely-pink white and a soft charcoal; mint and pink only where you touch something:
   * mint for hover and the field note card, pink for highlights. (Granola, before: #f7f7f2 / #1d1f1a.) */
  --bg: #fffafb;
  --fg: #2b2c28;
  --muted: #7c7a78;
  --line: #e9e5e5;
  --hover: #e9fae3;
  --skeleton: #f0ecec;
  --card: #e9fae3;
  --mark: 255, 193, 207;
  --mark-a: 1;
  --new: var(--fg);

  /* 01 Easing: one curve to enter, one to exit, one with overshoot */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);     /* things arriving (Emil's strong ease-out) */
  --ease-in: cubic-bezier(0.23, 1, 0.32, 1);      /* things leaving: still ease-out, never ease-in — exits just run shorter */
  --ease-in-out: cubic-bezier(.645, .045, .355, 1); /* things moving across the screen: ease-in-out-cubic, never a drop */
  --ease-spring: cubic-bezier(0.34, 1.25, 0.64, 1); /* 03 Overshoot, kept subtle */

  --step: 55ms; /* 04 Stagger: delay between neighbors */
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #2b2c28;
  --fg: #fffafb;
  --muted: #aaa8a7;
  --line: #3d3e3a;
  --hover: #363b33;
  --skeleton: #353632;
  --card: #333830;
  --mark: 255, 193, 207;
  --mark-a: 0.42;
  --new: var(--fg);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #2b2c28;
    --fg: #fffafb;
    --muted: #aaa8a7;
    --line: #3d3e3a;
    --hover: #363b33;
    --skeleton: #353632;
    --card: #333830;
    --mark: 255, 193, 207;
    --mark-a: 0.42;
    --new: var(--fg);
    color-scheme: dark;
  }
}

/* ───────────────────────── Base ───────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.45 'Inter', system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  /* 16 Color shift: theme changes fade instead of snapping */
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

.page {
  max-width: 582px;
  margin: 0 auto;
  padding: 88px 16px 96px;
}

h1, h2, h3, p { margin: 0; font-size: inherit; font-weight: inherit; }
.muted { color: var(--muted); transition: color 0.5s var(--ease-out); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent);
  text-underline-offset: 2.5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s var(--ease-out);
}
a:hover { text-decoration-color: var(--fg); }

:focus-visible { outline: 2px solid var(--new); outline-offset: 3px; border-radius: 4px; }

/* ─────────────── 07 Choreography / 04 Stagger reveal ─────────────── */
.reveal {
  opacity: 0;
  animation: rise 0.5s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * var(--step) + 80ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────── 23 Kinetic type ─────────────── */
.name { font-weight: 500; }
.name .word {
  display: inline-block;
  opacity: 0;
  animation: word-in 0.6s var(--ease-out) forwards;
  animation-delay: calc(var(--w) * 90ms);
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(60%) rotate(4deg); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ───────────────────────── Intro / bio ───────────────────────── */
.intro { margin-bottom: 28px; display: grid; gap: 4px; }
/* Memoji: cut out of their backdrops, on a soft circle that follows the theme. Changing face is one quick bob of the
   whole head (main.js); the faces swap instantly at the bottom of the dip, so you never see two heads at once. */
.avatar { all: unset; cursor: pointer; position: relative; display: block; width: 52px; height: 52px; margin-bottom: 14px;
  border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--fg) 7%, var(--bg)); box-shadow: 0 0 0 1px var(--line); -webkit-tap-highlight-color: transparent; }
.avatar:focus-visible { box-shadow: 0 0 0 1px var(--line), 0 0 0 4px color-mix(in srgb, var(--fg) 20%, transparent); }
.av-face { position: absolute; inset: 0; transform-origin: 50% 100%; }
.av-face img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.av-wink, .avatar.wink .av-rest { visibility: hidden; }
.avatar.wink .av-wink { visibility: visible; }
.bio { display: grid; gap: 16px; margin-bottom: 64px; }

/* Bio focus (after joshpuckett.me): the middle paragraph of the bio blurs back, leaving one thing and what it connects to.
   The blur is a text-shadow in place of the glyphs, so it can ease in and out; it arrives quickly and clears a little slower. */
.bio p, .bio a, .bio .hl, .bio .copy-label {
  text-shadow: 0 0 0 transparent;
  transition: color 0.3s var(--ease-out), text-shadow 0.3s var(--ease-out), text-decoration-color 0.3s var(--ease-out);
}
.bio-focus { display: grid; gap: 16px; }
.bio .hl-key { cursor: default; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent); text-underline-offset: 3px; }
.bio .hl-key:focus-visible { outline: none; text-decoration-color: var(--fg); }
.bio .focusing p, .bio .focusing a, .bio .focusing .hl {
  color: transparent; text-shadow: 0 0 5px color-mix(in srgb, var(--fg) 45%, transparent); text-decoration-color: transparent;
  transition-duration: 0.16s;
}
.bio .focusing .lit { color: var(--fg); text-shadow: 0 0 0 transparent; }
.bio .focusing a.lit, .bio .focusing .hl-key.lit { text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent); }
@media (prefers-reduced-motion: reduce) { .bio p, .bio a, .bio .hl, .bio .copy-label { transition: none; } }
/* Company names (after joshpuckett.me): no underline; hovering one turns it the company's own colour. Pale brand
   colours can't be read on the light page, so light mode uses a deeper shade of the same hue (--brand-ink). */
.bio a.co { --co: var(--brand-ink); text-decoration: none; font-weight: 500; }
:root[data-theme='dark'] .bio a.co { --co: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .bio a.co { --co: var(--brand); } }
.bio a.co:hover, .bio a.co:focus-visible, .bio .focusing a.co.lit:hover, .bio .focusing a.co.lit:focus-visible { color: var(--co); }
.bio a.co:focus-visible { outline: none; }

/* ─────────────── 24 Morph: email → copied ─────────────── */
.copy {
  all: unset;
  cursor: pointer;
  display: inline-grid;
  vertical-align: bottom;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent);
  text-underline-offset: 2.5px;
  overflow: hidden;
  transition: width 0.45s var(--ease-spring);
}
.copy:hover { text-decoration-color: var(--fg); }
.copy-label {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: opacity 0.25s var(--ease-out), transform 0.45s var(--ease-spring), filter 0.25s;
}
.copy-label[data-state='done'] { color: #16a34a; opacity: 0; transform: translateY(100%); filter: blur(3px); }
.copy-label svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16; stroke-dashoffset: 16; }
.copy.copied .copy-label[data-state='idle'] { opacity: 0; transform: translateY(-100%); filter: blur(3px); }
.copy.copied .copy-label[data-state='done'] { opacity: 1; transform: none; filter: none; }
.copy.copied .copy-label svg { animation: draw 0.35s 0.12s var(--ease-out) forwards; }

/* ───────────────────────── Lists ───────────────────────── */
.list { margin-bottom: 56px; }
.list h2 { margin-bottom: 12px; }

.group {
  display: grid;
  grid-template-columns: 108px 1fr;
  border-top: 1px solid var(--line);
  transition: border-color 0.5s var(--ease-out);
}
.group-year { padding: 10px 0; color: var(--muted); }
.rows { display: grid; }

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: border-color 0.5s var(--ease-out);
}
.rows .row:first-child { border-top: 0; }

/* 22 Shadow lift (quiet version): a soft pill rises behind the hovered row */
.row::before {
  content: '';
  position: absolute;
  inset: 2px -10px;
  border-radius: 8px;
  background: var(--hover);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.2s var(--ease-in), transform 0.3s var(--ease-out);
  z-index: -1;
}
.row:hover::before,
.row:focus-visible::before { opacity: 1; transform: none; transition-timing-function: var(--ease-out); }
.row:focus-visible { outline: none; }

/* Writing and field notes (after benji.org): hover one row and the rest step back */
:is(#writing-list, #field-list) :is(.row-head, .row-date) { transition: opacity 0.3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  :is(#writing-list, #field-list):has(.row:hover) .row:not(:hover) :is(.row-head, .row-date) { opacity: 0.3; transition-duration: 0.15s; }
}
.row-title { display: inline-block; }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-head { display: flex; align-items: center; gap: 10px; }
/* one result line under each project, quiet so five numbers don't shout at once */
.row-result { color: var(--muted); font-size: 0.875em; }
.row:has(.row-result) { align-items: flex-start; }
.row-date { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 06 Secondary action: after the pill lands, a small arrow slides in */
.row-arrow {
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s var(--ease-in), transform 0.25s var(--ease-in);
}
.row:hover .row-arrow,
.row:focus-visible .row-arrow {
  opacity: 1;
  transform: none;
  transition: opacity 0.25s 0.08s var(--ease-out), transform 0.35s 0.08s var(--ease-spring);
}

/* ─────────────── 13 Path draw: hand-drawn "New" circle ─────────────── */
.new {
  position: relative;
  display: inline-grid;
  place-items: center;
  color: var(--new);
  font-size: 13px;
  padding: 0 7px;
  margin: -4px 0;
}
.new svg {
  position: absolute;
  inset: -3px -4px;
  width: calc(100% + 8px);
  height: calc(100% + 6px);
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.new path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * var(--step) + 500ms);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ───────────────────────── Footer ───────────────────────── */
.foot hr { width: 50px; margin: 0 0 40px; border: 0; border-top: 1px solid var(--line); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#clock-time { font-variant-numeric: tabular-nums; }
#clock-time .colon { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.theme {
  all: unset;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  transition: background-color 0.2s var(--ease-out), color 0.2s;
}
.theme:hover { background: var(--hover); color: var(--fg); }
.theme:active svg { transform: scale(0.88); }
.theme svg { transition: transform 0.5s var(--ease-spring); overflow: visible; }
.theme .sun-core { fill: currentColor; transition: r 0.5s var(--ease-spring); }
.theme .moon-bite { transition: cx 0.5s var(--ease-out), cy 0.5s var(--ease-out); }
.theme .sun-rays { stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform-origin: 12px 12px;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s; }
/* 24 Morph: sun → moon */
:root[data-theme='dark'] .theme svg { transform: rotate(-40deg); }
:root[data-theme='dark'] .theme .sun-core { r: 8px; }
:root[data-theme='dark'] .theme .moon-bite { cx: 17px; cy: 7px; }
:root[data-theme='dark'] .theme .sun-rays { transform: scale(0.4) rotate(45deg); opacity: 0; }

/* ─────────────── 08 Shared element via the View Transitions API ─────────────── */
::view-transition-old(root) { animation: 0.22s var(--ease-in) both fade-out; }
::view-transition-new(root) { animation: 0.38s var(--ease-out) both fade-in; }
::view-transition-group(*) { animation-duration: 0.5s; animation-timing-function: var(--ease-out); }
@keyframes fade-out { to { opacity: 0; filter: blur(3px); } }
@keyframes fade-in { from { opacity: 0; filter: blur(3px); } }

/* ───────────────────────── Writing: post page ───────────────────────── */
.post-side { margin-bottom: 40px; }
.post-side .back { margin-bottom: 0; }
/* narrow screens: the back link stays pinned in the blurred header strip, so leaving is always one tap away */
@media (max-width: 1099px) {
  .post-side { position: sticky; top: 0; z-index: 51; margin: 0 0 28px; padding: 14px 0 6px; }
}
.toc { display: none; }

@media (min-width: 1100px) {
  /* Benji-style left rail: back link + table of contents, pinned while you read */
  .post-side {
    position: fixed;
    top: 88px;
    left: max(24px, calc(50vw - 275px - 260px));
    width: 200px;
    margin: 0;
  }
  .toc {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 64px 0 0;
    padding: 0;
    font-size: 13px;
  }
  .toc a {
    position: relative;
    display: block;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.35;
    transition: color 0.25s var(--ease-out), transform 0.35s var(--ease-spring);
  }
  .toc a:hover { color: var(--fg); }
  .toc a.active { color: var(--fg); transform: translateX(10px); }
  .toc a::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0.62em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--new);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s, transform 0.3s var(--ease-out);
  }
  .toc a.active::before { opacity: 1; transform: scale(1); }
}

/* back to the index: a return arrow (after benji.org); it nudges left on hover */
.back .back-ic { flex: none; transition: transform 0.25s var(--ease-out); }
.back:hover .back-ic { transform: translateX(-2px); }

.post-head { display: grid; gap: 4px; margin-bottom: 28px; }

/* Body text */
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-weight: 500; margin-top: 44px; scroll-margin-top: 32px; }
.prose h3 {
  margin-top: 36px;
  font-weight: 500;
  color: var(--muted);
  scroll-margin-top: 32px;
}
.prose h2 + *, .prose h3 + * { margin-top: 8px; }
.prose strong { font-weight: 500; }
.prose ul, .prose ol { padding-left: 18px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.prose figure { margin: 28px 0; }
.prose figure > img,
.prose figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--skeleton);
}
/* 11 Skeleton → fade */
.prose figure > img { opacity: 0; filter: blur(10px); transform: scale(1.01);
  transition: opacity 0.6s var(--ease-out), filter 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.prose figure > img.loaded { opacity: 1; filter: none; transform: none; }
.prose figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }

.prose blockquote {
  margin: 24px 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line);
}
.prose blockquote.pullquote {
  border: 0;
  padding: 8px 0;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.prose blockquote > * + * { margin-top: 12px; }

.prose aside.callout {
  margin: 28px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--hover);
  transition: background-color 0.5s var(--ease-out);
}
.prose aside.callout > * + * { margin-top: 8px; }
.prose aside.callout h3 { margin-top: 0; }

.prose .post-link a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s;
}
.prose .post-link a::after { content: '→'; color: var(--muted); transition: transform 0.3s var(--ease-spring); }
.prose .post-link a:hover { background: var(--hover); }
.prose .post-link a:hover::after { transform: translateX(3px); }

/* 07 Choreography on scroll: blocks rise in as they reach the viewport */
.prose > .flow {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--step));
}
.prose > .flow.shown { opacity: 1; transform: none; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 64px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.post-nav a { display: grid; gap: 2px; text-decoration: none; }
.post-nav a.next { text-align: right; }
.post-nav a .muted { font-size: 12px; }
.post-nav a:hover { text-decoration: underline; text-decoration-color: var(--fg); }

.no-entrance #home .reveal,
.no-entrance #home .name .word,
.no-entrance #home .new path { animation: none; opacity: 1; stroke-dashoffset: 0; }

/* ───────────────────────── Article basics ───────────────────────── */
.back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.back:hover { color: var(--fg); }
.p-title { font-weight: 500; display: inline-block; }

/* Section headings (case studies and posts alike): a hairline running to the right */
.prose h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 64px;
}
.prose h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.prose h2 + * { margin-top: 20px; }
.prose figure.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prose figure.duo figcaption { grid-column: 1 / -1; }

/* ───────────────────────── Demo frames ───────────────────────── */
:root {
  --data: #14b4e0;
  --data-warn: #ff3ea5;
  --frame: #f5f0f1;
}
:root[data-theme='dark'] { --frame: #363733; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --frame: #363733; } }

.prose figure.demo { margin: 32px 0; }
.stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--frame);
  transition: background-color 0.5s var(--ease-out), border-color 0.5s;
}
.prose figure.demo figcaption { margin-top: 12px; }
.prose figure.demo.bare .stage { border: 0; background: none; overflow: visible; }

.replay {
  all: unset;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}
.stage:hover .replay, .replay:focus-visible { opacity: 1; }
.replay:hover { background: var(--hover); color: var(--fg); }
.replay svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.replay:active svg { transform: rotate(-60deg); transition: transform 0.2s var(--ease-out); }
.bare .replay { top: -34px; }

/* 12 Count-up tiles */
.d-stats {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.d-stat { display: flex; flex-direction: column; background: var(--bg); padding: 14px 16px; min-width: 0; transition: background-color 0.5s var(--ease-out); }
.d-stat dt { flex: 1; color: var(--muted); font-size: 12px; line-height: 1.35; margin-bottom: 6px; } /* numbers line up along the bottom, however long the label */
.d-stat small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.d-stat dd { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 14 Bar grow */
.d-bars { display: grid; gap: 18px; padding: 28px 28px 30px; }
.d-bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.d-bar-label span { color: var(--muted); }
.d-bar-label b { font-weight: 500; font-variant-numeric: tabular-nums; }
.d-bar-track { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 6%, transparent); overflow: hidden; }
.d-bar-track i {
  display: block;
  height: 100%;
  width: calc(var(--w) * 100%);
  border-radius: inherit;
  background: var(--data);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-out);
}
.d-bar.on i { transform: scaleX(1); }
.d-bar.muted i { background: color-mix(in srgb, var(--fg) 22%, transparent); }
.d-bar.warn i { background: var(--data-warn); }

/* 13 Path draw */
.d-trend { display: block; width: 100%; height: auto; padding: 8px 4px 0; overflow: visible; }
.d-trend .axis { stroke: var(--line); stroke-width: 1; }
.d-trend .line {
  fill: none;
  stroke: var(--data);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.d-trend .area { opacity: 0; transition: opacity 0.8s 1s var(--ease-out); }
.d-trend.on .line { transition: stroke-dashoffset 1.4s var(--ease-out); stroke-dashoffset: 0; }
.d-trend.on .area { opacity: 1; }
.d-trend .pt circle { fill: var(--bg); stroke: var(--data); stroke-width: 2.5; }
.d-trend .pt circle, .d-trend .pt text { transform: scale(0.6); opacity: 0; transform-box: fill-box; transform-origin: center; }
.d-trend.on .pt circle, .d-trend.on .pt text {
  transform: none;
  opacity: 1;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
  transition-delay: calc(var(--d) * 0.45s + 0.15s);
}
.d-trend text { font: 500 13px Inter, system-ui, sans-serif; fill: var(--fg); text-anchor: middle; }
.d-trend .xl { font-weight: 400; font-size: 12px; fill: var(--muted); }

/* 24 Morph + 04 Stagger: long flow → short flow */
.d-screens { padding: 26px 20px 30px; display: grid; justify-items: center; gap: 18px; }
.d-screens-label { display: grid; font-size: 13px; color: var(--muted); }
.d-screens-label span { grid-area: 1 / 1; text-align: center; transition: opacity 0.35s, transform 0.5s var(--ease-spring), filter 0.35s; }
.d-screens-label .b { opacity: 0; transform: translateY(8px); filter: blur(3px); color: var(--fg); }
.after .d-screens-label .a { opacity: 0; transform: translateY(-8px); filter: blur(3px); }
.after .d-screens-label .b { opacity: 1; transform: none; filter: none; }
.d-screens-row { display: flex; justify-content: center; height: 104px; }
.mini {
  position: relative;
  width: 52px;
  height: 104px;
  margin: 0 5px;
  padding: 14px 7px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 5px;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring), width 0.5s var(--ease-out), margin 0.5s var(--ease-out), padding 0.5s var(--ease-out), border-width 0.5s;
  transition-delay: calc(var(--i) * 60ms);
}
.mini i { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--fg) 12%, transparent); }
.mini i:nth-child(2) { width: 70%; }
.mini i:nth-child(3) { width: 50%; }
.mini b { position: absolute; left: 7px; right: 7px; bottom: 10px; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 75%, transparent); }
.in .mini { opacity: 1; transform: none; }
.mini.gone {
  opacity: 0;
  transform: scale(0.6);
  width: 0;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  border-width: 0;
  transition-delay: 0s;
}
.after .mini.keep b { background: var(--data); transition: background-color 0.4s 0.4s; }

/* 20 Zoom in */
.d-zoom { position: relative; overflow: hidden; }
.d-zoom img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: var(--x) var(--y);
  transition: transform 1.8s var(--ease-out);
}
.prose figure .d-zoom img { opacity: 1; filter: none; transition: transform 1.8s var(--ease-out); }
.prose figure .d-zoom.on img { transform: scale(var(--s)); }
.d-zoom .ping {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 2px solid var(--data);
  opacity: 0;
}
.d-zoom.on .ping { animation: ping 1.6s 1.7s var(--ease-out) 2; }
@keyframes ping { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }

/* 15 Progress ring */
.d-ring { position: relative; display: grid; justify-items: center; gap: 10px; padding: 28px 20px 24px; }
.d-ring svg { width: 170px; height: 170px; transform: rotate(-90deg); overflow: visible; }
.d-ring circle { fill: none; stroke-width: 12; }
.d-ring .bg { stroke: color-mix(in srgb, var(--fg) 7%, transparent); }
.d-ring .fg { stroke: var(--data); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.d-ring.on .fg { stroke-dashoffset: calc(1 - var(--v)); transition: stroke-dashoffset 1.4s var(--ease-out); }
.d-ring .tick { stroke: var(--fg); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.d-ring.on .tick { opacity: 1; transition: opacity 0.4s 1.3s; }
.d-ring-num { position: absolute; top: 28px; height: 170px; display: grid; place-content: center; text-align: center; }
.d-ring-num b { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.d-ring-num small { font-size: 11px; color: var(--muted); max-width: 110px; line-height: 1.3; }
.d-ring-target { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); opacity: 0; }
.d-ring-target i { width: 10px; height: 2px; background: var(--fg); border-radius: 1px; }
.d-ring.on .d-ring-target { opacity: 1; transition: opacity 0.4s 1.4s; }

/* Galleries */
.stage-gallery { padding: 0; }
/* a carousel: screens fill the frame edge to edge and slide; nothing else moves */
.g-car { position: relative; overflow: hidden; }
.g-kind-screens .g-car { aspect-ratio: var(--ar); background: #fff; }
.g-track { display: flex; height: 100%; will-change: transform; transition: transform 0.75s var(--ease-in-out); }
.g-car.vert .g-track { flex-direction: column; }
.g-kind-screens .g-slide { flex: none; width: 100%; height: 100%; }
.prose figure .g-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; margin: 0; border: 0; border-radius: 0; background: none; opacity: 1; filter: none; transform: none; box-shadow: none; }
.g-kind-phones .g-car { padding: 48px 0 92px; }
.g-kind-phones .g-step { bottom: 26px; }
.g-kind-phones .g-track { gap: 28px; width: max-content; height: auto; }
.g-phone { flex: none; width: 166px; aspect-ratio: 166 / 350; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #1b1b1b, 0 0 0 5px #3a3a3a; margin: 5px 0; opacity: 0.45; transition: opacity 0.6s var(--ease-out); }
.g-phone.cur { opacity: 1; }
/* stepper: prev · dots · next, floating over the screens */
.g-step { position: absolute; z-index: 5; left: 50%; bottom: 14px; display: flex; align-items: center; gap: 6px; translate: -50% 0; }
.g-step.vert { flex-direction: column; left: 14px; top: 50%; bottom: auto; translate: 0 -50%; }
.g-arrow, .g-dots { background: rgba(28, 27, 26, 0.55); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); }
.g-arrow { all: unset; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(28, 27, 26, 0.55); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); color: #fff; cursor: pointer; transition: transform 0.16s var(--ease-out), background-color 0.2s; }
.g-arrow svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .g-arrow:hover { background: rgba(28, 27, 26, 0.72); } }
.g-arrow:active { transform: scale(0.92); }
.g-dots { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 99px; }
.g-step.vert .g-dots { flex-direction: column; height: auto; width: 28px; padding: 10px 0; }
.g-dots button { all: unset; position: relative; cursor: pointer; width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.45); transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), background-color 0.25s; }
.g-dots button::after { content: ''; position: absolute; inset: -5px; }
.g-dots button.on { width: 20px; background: #fff; }
.g-step.vert .g-dots button.on { width: 6px; height: 20px; }
.g-arrow:focus-visible, .g-dots button:focus-visible { outline: 2px solid var(--data); outline-offset: 2px; }

/* ───────── Magic Textbox: real flow, drawn at 375×812 and scaled into the phone ───────── */
.stage-magic-textbox { height: 400px !important; }
.d-phone.mt-phone { width: 280px; height: 588px; margin-left: -140px; top: 30px; }
.d-screen.mt-screen { padding: 0; border-radius: 31px; font-size: 14px; }
.mt-canvas { position: absolute; left: 0; top: 0; width: 375px; height: 812px; transform: scale(0.704); transform-origin: 0 0; font-family: Roboto, Inter, system-ui, sans-serif; color: #222; }
.mt-page {
  position: absolute;
  inset: 0;
  padding: 0 24px;
  background: #fff;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.5s var(--ease-in-out);
}
.mt-page.on { opacity: 1; transform: none; }
.mt-page.left { transform: translateX(-18px); transition-duration: 0.2s, 0.35s; }
.mt-back { position: absolute; left: 22px; top: 22px; width: 22px; height: 22px; fill: none; stroke: #777; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mt-title { position: absolute; left: 24px; right: 24px; top: 68px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.mt-title.big { font-size: 21px; top: 80px; }
.mt-title.center { text-align: center; font-size: 25px; top: 286px; font-weight: 700; }

/* the box: tall and inviting, then shrinks to fit once typing starts */
.mt-box {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 104px;
  min-height: 170px;
  padding: 12px 15px;
  border: 1.5px solid #cfcfcf;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  transition: min-height 0.5s var(--ease-spring), border-color 0.3s;
}
.typing .mt-box { min-height: 50px; border-color: #222; }
.mt-box .ph { position: absolute; color: #9b9b9b; transition: opacity 0.12s; }
.typing .mt-box .ph { opacity: 0; }
.mt-box .caret { display: inline-block; width: 1.5px; height: 16px; margin-left: 1px; vertical-align: -3px; background: #222; animation: blink-caret 1s steps(1) infinite; }
.kb-off .mt-box .caret { display: none; }

/* suggestions loading (11 Skeleton) */
.mt-sk {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 172px;
  padding: 14px 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  display: grid;
  gap: 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out), top 0.5s var(--ease-out);
}
.loading .mt-sk { opacity: 1; transform: none; }
.nomatch .mt-sk { opacity: 0.12; top: 240px; }
.mt-sk > b, .mt-sk i, .mt-sk span b {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f1f1 25%, #e6e6e6 50%, #f1f1f1 75%) 0 0 / 200% 100%;
  animation: sk 1.1s linear infinite;
}
.mt-sk > b { height: 18px; }
.mt-sk div { display: flex; gap: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.mt-sk i { flex: none; width: 16px; height: 16px; margin-top: 6px; }
.mt-sk span { flex: 1; display: grid; gap: 8px; }
.mt-sk span b { height: 18px; }
.mt-sk span b + b { width: 45%; }

/* nothing matched: the toggle appears (17 Scale pop) */
.mt-toggle {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 172px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  border-radius: 10px;
  background: #f6f6f6;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.3s, transform 0.5s var(--ease-spring);
}
.nomatch .mt-toggle { opacity: 1; transform: none; }
.mt-toggle i { position: relative; width: 36px; height: 21px; border-radius: 99px; background: #e4e4e4; transition: background-color 0.35s var(--ease-out); }
.mt-toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 0.4s var(--ease-spring); }
.gps .mt-toggle i { background: #3a3a3a; }
.gps .mt-toggle i::after { transform: translateX(15px); }

.mt-kb { position: absolute; left: 0; bottom: 0; width: 375px; height: 375px; transform: translateY(100%); transition: transform 0.45s var(--ease-out); }
.typing .mt-kb { transform: none; }
.mt-kb img { display: block; width: 375px; height: 375px; }
/* the return key is the search key: grey while empty, blue once there's text (16 Color shift) */
.mt-go {
  position: absolute;
  left: 281px;
  top: 258px;
  width: 91px;
  height: 42px;
  border-radius: 6px;
  background: #acb1ba;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
  transition: background-color 0.3s var(--ease-out), transform 0.12s;
}
.mt-go svg { width: 19px; height: 19px; fill: none; stroke: #2b2b2b; stroke-width: 2.4; stroke-linecap: round; transition: stroke 0.3s; }
.typing .mt-go { background: #0a84ff; }
.typing .mt-go svg { stroke: #fff; }
.mt-go.press { transform: scale(0.94); filter: brightness(0.9); }
/* searching: keyboard closes, a short spinner while the model looks */
.mt-finding { position: absolute; left: 0; right: 0; top: 268px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #666; font-size: 14px; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.4s var(--ease-out); }
.searching .mt-finding { opacity: 1; transform: none; transition-delay: 0.15s; }
.mt-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #e3e3e3; border-top-color: #3a3a3a; animation: spin 0.8s linear infinite; }
.searching .mt-sk { opacity: 0; }
.typing.kb-off .mt-kb { transform: translateY(100%); transition-timing-function: var(--ease-in); }

/* buttons */
.mt-btn {
  all: unset;
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 40px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #3a3a3a;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.15s var(--ease-out), filter 0.15s, opacity 0.3s, translate 0.5s var(--ease-spring);
}
.mt-input .mt-btn { opacity: 0; translate: 0 20px; }
.mt-input .mt-btn, .mt-confirm .mt-btn { }
.gps .mt-input .mt-btn { opacity: 1; translate: 0 0; }
.mt-btn.press { transform: scale(0.97); filter: brightness(1.25); }
.mt-btn span { grid-area: 1 / 1; transition: opacity 0.2s; }
.mt-btn .spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; opacity: 0; animation: spin 0.8s linear infinite; }
.mt-btn.busy .lbl { opacity: 0; }
.mt-btn.busy .spin { opacity: 1; }
@keyframes spin { to { transform: rotate(1turn); } }

/* confirm: 20 Zoom in on the map, 03 Overshoot on the pin, 06 pulse after */
.mt-map { position: absolute; left: 0; right: 0; top: 127px; height: 200px; overflow: hidden; }
.mt-map img { display: block; width: 100%; height: 100%; transform: scale(1.25); transition: transform 1.4s var(--ease-out); }
.mt-confirm.on .mt-map img { transform: none; }
.mt-pin { position: absolute; left: 157px; top: 68px; width: 30px; height: 40px; opacity: 0; transform: translateY(-70px); }
.mt-pin path { fill: #e8462e; }
.mt-pin circle { fill: #8a2a1a; }
.mt-confirm.on .mt-pin { animation: pin-drop 0.75s 0.55s var(--ease-out) forwards; }
@keyframes pin-drop {
  0% { opacity: 0; transform: translateY(-70px); }
  55% { opacity: 1; transform: translateY(4px) scaleY(0.88); }
  75% { transform: translateY(-6px); }
  100% { opacity: 1; transform: none; }
}
.mt-shadow { position: absolute; left: 164px; top: 104px; width: 16px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(1.5px); opacity: 0; transform: scale(0.3); }
.mt-confirm.on .mt-shadow { opacity: 1; transform: none; transition: opacity 0.3s 0.9s, transform 0.5s 0.9s var(--ease-spring); }
.mt-pulse { position: absolute; left: 152px; top: 88px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; opacity: 0; }
.mt-confirm.on .mt-pulse { animation: mt-pulse 1.6s 1.4s var(--ease-out) infinite; }
@keyframes mt-pulse { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.8); } }
.mt-chip { position: absolute; right: 24px; bottom: 22px; padding: 9px 14px; border-radius: 6px; background: rgba(245,245,245,.95); font-size: 13px; color: #333; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.mt-addr { position: absolute; left: 24px; right: 24px; top: 352px; display: grid; gap: 6px; font-size: 14px; }
.mt-addr b { font-weight: 600; }
.mt-addr p { color: #333; }
.mt-addr em { color: #444; font-size: 13.5px; line-height: 1.4; }
.mt-addr > * { opacity: 0; transform: translateY(8px); }
.mt-confirm.on .mt-addr > * { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.mt-confirm.on .mt-addr > :nth-child(1) { transition-delay: 0.9s; }
.mt-confirm.on .mt-addr > :nth-child(2) { transition-delay: 1s; }
.mt-confirm.on .mt-addr > :nth-child(3) { transition-delay: 1.1s; }
.mt-edit { position: absolute; left: 24px; right: 24px; top: 470px; display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; color: #11706f; font-weight: 500; font-size: 14px; }

/* verification started: amber hourglass */
.mt-badge {
  position: absolute;
  left: 50%;
  top: 110px;
  width: 116px;
  height: 116px;
  margin-left: -58px;
  border-radius: 50%;
  background: #fff3d6;
  display: grid;
  place-items: center;
  transform: scale(0.85);
  opacity: 0;
}
.mt-done.on .mt-badge { opacity: 1; transform: none; transition: opacity 0.25s 0.2s, transform 0.7s 0.2s var(--ease-spring); }
.mt-badge::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #f2b33d; opacity: 0; }
.mt-done.on .mt-badge::after { animation: mt-pulse-amber 2.4s 1s var(--ease-out) infinite; }
@keyframes mt-pulse-amber { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
.mt-hg { width: 52px; height: 52px; }
.mt-hg .frame, .mt-hg .stream { fill: none; stroke: #c98400; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mt-hg .sand-top, .mt-hg .sand-bot { fill: #f2a516; }
.mt-hg .stream { stroke-width: 1.6; stroke-dasharray: 2 3; opacity: 0; }
.mt-done.on .mt-hg { animation: hg-flip 2.4s 0.9s var(--ease-spring) infinite; }
.mt-done.on .mt-hg .sand-top { animation: sand-top 2.4s 0.9s linear infinite; transform-origin: 24px 21px; }
.mt-done.on .mt-hg .sand-bot { animation: sand-bot 2.4s 0.9s linear infinite; transform-origin: 24px 40px; }
.mt-done.on .mt-hg .stream { animation: stream 2.4s 0.9s linear infinite; }
@keyframes hg-flip { 0%, 72% { transform: rotate(0); } 88%, 100% { transform: rotate(180deg); } }
@keyframes sand-top { 0% { transform: scaleY(1); } 70%, 100% { transform: scaleY(0.05); } }
@keyframes sand-bot { 0% { transform: scaleY(0.15); } 70%, 100% { transform: scaleY(1); } }
@keyframes stream { 0% { opacity: 1; stroke-dashoffset: 0; } 68% { opacity: 1; stroke-dashoffset: -20; } 72%, 100% { opacity: 0; } }
.mt-sub { position: absolute; left: 24px; right: 24px; top: 340px; text-align: center; color: #444; font-size: 15px; }
.mt-done .mt-title, .mt-sub { opacity: 0; transform: translateY(8px); }
.mt-done.on .mt-title, .mt-done.on .mt-sub { opacity: 1; transform: none; transition: opacity 0.4s 0.55s, transform 0.5s 0.55s var(--ease-out); }
.mt-done.on .mt-sub { transition-delay: 0.65s; }
.mt-list { position: absolute; left: 24px; right: 24px; top: 400px; margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.mt-list li { display: flex; align-items: center; gap: 14px; font-size: 14.5px; line-height: 1.35; color: #333; opacity: 0; transform: translateX(-10px); }
.mt-done.on .mt-list li { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.5s var(--ease-out); transition-delay: calc(0.85s + var(--k) * 0.15s); }
.mt-list span { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #f1f1f1; display: grid; place-items: center; }
.mt-list svg { width: 20px; height: 20px; fill: none; stroke: #222; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.stage-gps-toggle { height: 400px !important; }

/* Form morph */
.stage-form-morph { height: 430px; }
.d-form-tag { position: absolute; left: 0; right: 0; top: 14px; display: grid; justify-items: center; font-size: 12px; color: var(--muted); z-index: 2; }
.d-form-tag span { grid-area: 1 / 1; transition: opacity 0.35s, transform 0.5s var(--ease-spring), filter 0.35s; }
.d-form-tag .b { opacity: 0; transform: translateY(6px); filter: blur(3px); color: var(--fg); }
.d-form.morphed .d-form-tag .a { opacity: 0; transform: translateY(-6px); filter: blur(3px); }
.d-form.morphed .d-form-tag .b { opacity: 1; transform: none; filter: none; }
.d-phone.flat { top: 44px; }
.d-bar-top.dark { background: #2b2b2b; color: #bbb; margin: -16px -16px 16px; padding: 22px 16px 10px; }
.d-bar-top.dark .d-brand { color: #fff; }
.d-chips { display: flex; gap: 6px; margin-bottom: 14px; font-size: 10px; }
.d-chips b, .d-chips i { font-style: normal; font-weight: 500; padding: 5px 12px; border-radius: 6px; border: 1px solid #333; }
.d-chips b { background: #2b2b2b; color: #fff; }
.d-fields { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.d-f {
  position: relative;
  display: grid;
  height: 32px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  font-size: 9.5px;
  color: #666;
  overflow: hidden;
  transition: height 0.55s var(--ease-spring), border-color 0.3s, grid-column 0s;
  transition-delay: calc(var(--i) * 70ms);
}
.d-f.full { grid-column: 1 / -1; }
.d-f span { grid-area: 1 / 1; white-space: nowrap; transition: opacity 0.3s, transform 0.5s var(--ease-spring), filter 0.3s; transition-delay: inherit; }
.d-f .n, .d-cta .n { opacity: 0; transform: translateY(8px); filter: blur(2px); }
.morphed .d-f .o, .morphed .d-cta .o { opacity: 0; transform: translateY(-8px); filter: blur(2px); }
.morphed .d-f .n, .morphed .d-cta .n { opacity: 1; transform: none; filter: none; color: #222; }
.morphed .d-f { border-color: #9a9a9a; }
.morphed .d-f.tall { height: 52px; align-items: start; padding-top: 8px; }
/* old layout: building + apartment each take a full row */
.d-form:not(.morphed) .d-f:nth-child(3), .d-form:not(.morphed) .d-f:nth-child(4) { grid-column: 1 / -1; }
.d-cta { display: grid; place-items: center; height: 32px; margin-top: 14px; border-radius: 6px; background: #c9c9c9; color: #fff; font-size: 11px; transition: background-color 0.4s 0.35s; }
.d-cta span { grid-area: 1 / 1; transition: opacity 0.3s 0.35s, transform 0.5s 0.35s var(--ease-spring), filter 0.3s 0.35s; }
.morphed .d-cta { background: #b5b5b5; }

/* Giving ritual (dark app) */
.stage-giving { height: 440px; }
.d-phone.dark .d-screen { background: #17181b; color: #f1f1f1; }
.d-phone.dark .d-bar-top { color: #777; }
.d-phone.dark .d-brand { color: #f1f1f1; }
.d-give { transition: opacity 0.3s var(--ease-in), transform 0.4s var(--ease-in); }
.given .d-give { opacity: 0; transform: scale(0.96); pointer-events: none; }
.d-give-label { font-size: 11px; color: #8a8a8a; margin-top: 18px; }
.d-give-amt { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 22px; font-variant-numeric: tabular-nums; }
.d-give-method { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: #222428; font-size: 11px; }
.d-give-method i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #e5333a; }
.d-give-btn {
  all: unset;
  display: block;
  margin-top: 70px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  width: 100%;
  border-radius: 8px;
  background: #e5333a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.15s var(--ease-out), filter 0.15s;
}
.d-give-btn.press { transform: scale(0.96); filter: brightness(0.9); }
.d-done { position: absolute; inset: 60px 18px 0; display: grid; justify-items: center; align-content: start; text-align: center; pointer-events: none; }
.d-check { position: relative; width: 74px; height: 74px; margin-top: 10px; opacity: 0; transform: scale(0.85); }
.given .d-check { opacity: 1; transform: none; transition: opacity 0.2s, transform 0.6s var(--ease-spring); }
.d-check svg { width: 100%; height: 100%; }
.d-check circle { fill: #2fb84f; }
.d-check path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.given .d-check path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.45s 0.3s var(--ease-out); }
.d-confetti i { position: absolute; left: 50%; top: 50%; width: 6px; height: 9px; margin: -4px 0 0 -3px; border-radius: 1px; background: var(--c); opacity: 0; }
.given .d-confetti i { animation: burst 1.1s 0.25s var(--ease-out) forwards; }
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 30px)) rotate(var(--r)) scale(1); }
}
.d-done-title { margin-top: 16px; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(6px); }
.given .d-done-title { opacity: 1; transform: none; transition: opacity 0.3s 0.6s, transform 0.5s 0.6s var(--ease-spring); }
.d-verse { margin-top: 40px; font-size: 12px; font-style: italic; line-height: 1.5; color: #c9c9c9; }
.d-verse span { display: inline-block; opacity: 0; transform: translateY(5px); filter: blur(3px); }
.given .d-verse span { opacity: 1; transform: none; filter: none; transition: opacity 0.5s, transform 0.5s var(--ease-out), filter 0.5s; transition-delay: calc(1.1s + var(--w) * 90ms); }
.d-ref { margin-top: 8px; font-size: 10px; color: #8a8a8a; opacity: 0; }
.given .d-ref { opacity: 1; transition: opacity 0.4s 2.4s; }

/* Narrow phone screenshots inside prose */
.prose figure.phone { max-width: 250px; margin-left: auto; margin-right: auto; }
.prose figure.duo.phones { max-width: 440px; margin-left: auto; margin-right: auto; }

/* ───────── Phone demos ───────── */
.stage-magic-textbox, .stage-gps-toggle { height: 440px; }
.d-phone {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 260px;
  height: 520px;
  margin-left: -130px;
  padding: 8px;
  border-radius: 38px;
  background: #1b1b1b;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}
.d-screen {
  position: relative;
  height: 100%;
  border-radius: 31px;
  background: #fff;
  color: #111;
  padding: 16px 16px 0;
  overflow: hidden;
  font-size: 12px;
  transition: opacity 0.4s var(--ease-in);
}
.d-screen.fade { opacity: 0; }
.d-bar-top { display: flex; justify-content: space-between; color: #9a9a9a; font-size: 13px; margin: 4px 2px 14px; }
.d-brand { color: #111; font-weight: 500; font-size: 11px; }
.d-q { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 12px; }
.d-field {
  position: relative;
  min-height: 62px;
  padding: 10px 12px;
  border: 1.5px solid #e6e6e6;
  border-radius: 10px;
  line-height: 1.4;
  transition: border-color 0.3s;
}
.typing .d-field, .d-field.filled { border-color: #111; }
.d-field .ph { position: absolute; color: #aaa; transition: opacity 0.15s; }
.typing .d-field .ph, .d-field.filled .ph { opacity: 0; }
.d-field .caret { display: none; width: 1.5px; height: 14px; background: var(--data); vertical-align: -2px; margin-left: 1px; animation: blink-caret 1s steps(1) infinite; }
.typing:not(.found) .d-field .caret { display: inline-block; }
@keyframes blink-caret { 50% { opacity: 0; } }

/* 11 Skeleton while the model looks */
.d-sk { display: grid; gap: 8px; margin-top: 12px; height: 0; overflow: hidden; opacity: 0; transition: height 0.4s var(--ease-out), opacity 0.3s; }
.loading .d-sk { height: 64px; opacity: 1; }
.d-sk i {
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0ee 25%, #e4e4e1 50%, #f0f0ee 75%) 0 0 / 200% 100%;
  animation: sk 1.1s linear infinite;
}
.d-sk i:nth-child(2) { width: 80%; }
.d-sk i:nth-child(3) { width: 60%; }
@keyframes sk { to { background-position: -200% 0; } }

/* 17 Scale pop: the match lands */
.d-found {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3fbfe;
  border: 1px solid #cdeefa;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s, transform 0.5s var(--ease-spring);
}
.found .d-found { opacity: 1; transform: none; }
.d-found .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--data); box-shadow: 0 0 0 4px #d4f2fb; }
.d-found b { display: block; font-weight: 600; font-size: 11px; }
.d-found small { color: #666; font-size: 11px; }

/* 18 Mask reveal: satellite view wipes in, 03 Overshoot: pin drops past and settles */
.d-map {
  position: relative;
  height: 120px;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  clip-path: inset(0 0 100% 0 round 12px);
  transition: clip-path 0.8s var(--ease-out);
}
.mapped .d-map, .d-map.on { clip-path: inset(0 0 0 0 round 12px); }
.d-sat { display: block; width: 100%; height: 100%; }
.d-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 30px; margin: -30px 0 0 -11px; fill: #e5484d; opacity: 0; transform: translateY(-40px); filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.mapped .d-pin { opacity: 1; transform: none; transition: transform 0.6s 0.45s var(--ease-spring), opacity 0.2s 0.45s; }
.d-chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
}
.mapped .d-chip { opacity: 1; transform: none; transition: opacity 0.3s 1.05s, transform 0.5s 1.05s var(--ease-spring); }

.d-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 22px;
  margin: -2px 0 0 -2px;
  fill: #111;
  stroke: #fff;
  stroke-width: 1.2;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.3s, scale 0.12s;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.d-cursor.press { scale: 0.85; }
.d-ripple { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--data); opacity: 0; pointer-events: none; z-index: 2; }
.d-ripple.go { animation: ripple 0.6s var(--ease-out); }
@keyframes ripple { from { opacity: 0.35; scale: 0.2; } to { opacity: 0; scale: 1.4; } }

/* ───────────────────────── Small screens ───────────────────────── */
@media (max-width: 560px) {
  .page { padding-top: 56px; }
  .group { grid-template-columns: 56px 1fr; }
  .row::before { inset: 2px -6px; }
}

/* ───────────────────────── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Between loops, fade the phone's content (not the screen) so it never flashes black */
.d-screen.mt-screen.fade { opacity: 1; }
.mt-canvas { transition: opacity 0.4s var(--ease-in); }
.mt-screen.fade .mt-canvas { opacity: 0; }


/* ───────── Camera: short frames that push in on the detail (20 Zoom in) ───────── */
.mt-cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 0.9s var(--ease-in-out); }

/* Empty state: big title, roomy box, and the current-location card; typing tightens it all up (24 Morph) */
.mt-input .mt-title { font-size: 22px; line-height: 1.25; top: 76px; transition: font-size 0.5s var(--ease-out), top 0.5s var(--ease-out); }
.typing .mt-input .mt-title { font-size: 15.5px; top: 68px; }
.mt-input .mt-box { top: 104px; transform: translateY(46px); min-height: 96px; border-color: #ececec; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); transition: transform 0.5s var(--ease-in-out), min-height 0.5s var(--ease-out), border-color 0.3s, box-shadow 0.3s; }
.typing .mt-input .mt-box { transform: none; min-height: 50px; border-color: #222; box-shadow: none; }
.mt-here {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 266px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #efefef;
  border-radius: 10px;
  background: #fff;
  transition: opacity 0.25s, transform 0.4s var(--ease-out);
}
.mt-here svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #0e7c7b; stroke-width: 2; stroke-linecap: round; }
.mt-here .dot { fill: #0e7c7b; stroke: none; }
.mt-here b { display: block; font-size: 14.5px; font-weight: 600; color: #333; }
.mt-here span { display: block; font-size: 13px; color: #555; margin-top: 2px; }
.typing .mt-here { opacity: 0; transform: translateY(10px); }

/* ───────── Pin adjust: confirm page ↔ map edit page (from the designs) ───────── */
.stage-pin-adjust { height: 400px !important; }
/* one full-size map layer; the banner is a clip of it, so growing is a clip-path reveal (GPU), not a layout change */
.mt-amap { position: absolute; left: 0; right: 0; top: 114px; height: 604px; overflow: hidden; z-index: 2; clip-path: inset(13px 0 391px 0); transition: clip-path 0.6s var(--ease-in-out); }
.full .mt-amap { clip-path: inset(0 0 0 0); }
.mt-world { position: absolute; left: 0; top: 0; width: 545px; height: 814px; transform: translate(-162px, -292px); transition: transform 0.6s var(--ease-in-out); }
.full .mt-world { transform: translate(-170px, -198px); }
.saved .mt-world { transform: translate(-170px, -483px); }
.mt-world img, .mt-street { position: absolute; left: 0; top: 0; display: block; width: 545px; height: 814px; }
.mt-street { opacity: 0; transition: opacity 0.45s var(--ease-out); }
.street .mt-street { opacity: 1; }
.mt-roof { position: absolute; left: 330px; top: 520px; width: 142px; height: 152px; }
.mt-gpsdot { position: absolute; left: 303px; top: 311px; width: 16px; height: 16px; border-radius: 50%; background: #4285f4; border: 2.5px solid #fff; box-shadow: 0 0 0 9px rgba(66,133,244,.25), 0 1px 3px rgba(0,0,0,.3); }
.mt-dpin { position: absolute; left: 334px; top: 365px; width: 30px; height: 40px; }
.mt-dpin .mt-lift { position: absolute; inset: 0; transition: transform 0.35s var(--ease-spring); }
.lift .mt-dpin .mt-lift { transform: translateY(-12px) scale(1.18); }
.mt-dpin .mt-pin { left: 0; top: 0; }
.dropped .mt-dpin .mt-pin { animation: pin-drop 0.75s 0.4s var(--ease-out) forwards; }
.mt-shadow2 { position: absolute; left: 8px; top: 36px; width: 14px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.5); filter: blur(1.5px); opacity: 0; transition: transform 0.35s var(--ease-spring), opacity 0.3s; }
.dropped .mt-shadow2 { opacity: 1; transition-delay: 0.8s; }
.lift .mt-shadow2 { transform: scale(1.8); opacity: 0.35; transition-delay: 0s; }
/* 06 Secondary action: a ring pulses once the pin lands on the building */
.mt-ring { position: absolute; left: -5px; top: 19px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; opacity: 0; }
.placed .mt-ring, .saved .mt-ring { animation: mt-pulse 1.6s 0.1s var(--ease-out) 2; }
.mt-adjust .mt-chip { bottom: 413px; transition: opacity 0.2s; }
.full .mt-chip { opacity: 0; }
/* address appears with the page and never changes */
.dropped .mt-adjust .mt-addr > * { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.dropped .mt-adjust .mt-addr > :nth-child(1) { transition-delay: 0.7s; }
.dropped .mt-adjust .mt-addr > :nth-child(2) { transition-delay: 0.8s; }
.dropped .mt-adjust .mt-addr > :nth-child(3) { transition-delay: 0.9s; }

/* edit page chrome: header, search band, map controls, footer */
.mt-ehead, .mt-efoot, .mt-layer, .mt-zoom, .mt-locate { opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out); }
.full .mt-ehead, .full .mt-efoot, .full .mt-layer, .full .mt-zoom, .full .mt-locate { opacity: 1; transition-delay: 0.25s; }
.mt-ehead { position: absolute; left: 0; right: 0; top: 0; height: 114px; background: #fff; z-index: 3; }
.mt-ehead .mt-back { top: 22px; }
.mt-help { position: absolute; right: 22px; top: 21px; width: 24px; height: 24px; fill: none; stroke: #777; stroke-width: 1.8; stroke-linecap: round; }
.mt-help .dot { fill: #777; stroke: none; }
.mt-eband { position: absolute; left: 0; right: 0; top: 56px; height: 58px; background: #eeeeee; }
.mt-esearch { position: absolute; left: 25px; right: 22px; top: 9px; height: 39px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 8px; background: #fff; color: #888; font-size: 14px; }
.mt-esearch svg { width: 18px; height: 18px; fill: none; stroke: #222; stroke-width: 2.2; stroke-linecap: round; }
.mt-esearch i { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; background: #e6e6e6; color: #777; font-style: normal; font-size: 12px; display: grid; place-items: center; }
.mt-efoot { position: absolute; left: 0; right: 0; top: 718px; bottom: 0; background: #fff; z-index: 3; }
.mt-efoot .mt-btn { bottom: 26px; height: 47px; }
.full .mt-adjust .mt-conf { opacity: 0; }

/* satellite ↔ map toggle (16 Color shift) */
.mt-layer {
  all: unset;
  position: absolute;
  left: 24px;
  top: 30px;
  width: 59px;
  padding: 4px 4px 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  color: #222;
  opacity: 0;
  transition: transform 0.15s, opacity 0.35s;
}
.full .mt-layer { opacity: 1; transition-delay: 0s, 0.25s; }
.mt-layer.press { transform: scale(0.94); }
.mt-layer .thumb { position: relative; display: block; height: 52px; border-radius: 4px; overflow: hidden; }
.mt-layer .thumb i { position: absolute; inset: 0; transition: opacity 0.4s; }
.mt-layer .sat { background: url(work/media/mt-map-warehouses.webp) 62% 70% / 300% auto; opacity: 0; }
.mt-layer .map { background:
  linear-gradient(90deg, transparent 44%, #fff 44% 56%, transparent 56%),
  linear-gradient(transparent 40%, #fff 40% 52%, transparent 52%),
  linear-gradient(135deg, #e8eaed, #f6f7f8); }
.street .mt-layer .sat { opacity: 1; }
.street .mt-layer .map { opacity: 0; }
.mt-layer .lbl { display: grid; padding: 4px 0 5px; }
.mt-layer .lbl b { grid-area: 1 / 1; font-weight: 500; transition: opacity 0.3s; }
.mt-layer .to-sat { opacity: 0; }
.street .mt-layer .to-map { opacity: 0; }
.street .mt-layer .to-sat { opacity: 1; }
.mt-zoom { position: absolute; right: 24px; top: 377px; display: grid; gap: 7px; }
.mt-zoom span { width: 41px; height: 41px; border-radius: 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); display: grid; place-items: center; font-size: 24px; color: #222; line-height: 1; }
.mt-locate { position: absolute; left: 131px; top: 543px; height: 41px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 8px; background: #fff; border: 1px solid #ddd; color: #11706f; font-size: 14px; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mt-locate svg { width: 20px; height: 20px; fill: none; stroke: #11706f; stroke-width: 1.8; stroke-linecap: round; }
.mt-locate .dot { fill: #11706f; stroke: none; }

/* Locate me: the map pans to centre the blue GPS dot, which pulses once */
.full.recentre .mt-world { transform: translate(-124px, -60px); }
.mt-locate { transition: opacity 0.35s var(--ease-out), transform 0.15s; }
.mt-locate.press { transform: scale(0.95); }
.recentre .mt-gpsdot { animation: dot-ping 1.2s 0.5s var(--ease-out); }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 9px rgba(66,133,244,.25), 0 1px 3px rgba(0,0,0,.3); } 40% { box-shadow: 0 0 0 22px rgba(66,133,244,.18), 0 1px 3px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 9px rgba(66,133,244,.25), 0 1px 3px rgba(0,0,0,.3); } }

/* ───────── Flow diagram (clean redraw of the sticky-note flow) ───────── */
.stage-flow { background: var(--frame) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M22 0H0V22' fill='none' stroke='%23000' stroke-opacity='.045'/%3E%3C/svg%3E"); }
.f-wrap { padding: 16px 14px 10px; }
.f-top { display: flex; align-items: baseline; gap: 10px; height: 20px; margin: 0 6px 6px; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.f-k { color: var(--muted); }
.f-scn { color: var(--data); }
.f-scn.swap { animation: label-in 0.45s var(--ease-out); }
.f-svg { display: block; width: 100%; height: auto; overflow: visible; }
:root { --f-line: #dededa; }
:root[data-theme='dark'] { --f-line: #33332f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --f-line: #33332f; } }
.f-node rect { fill: var(--bg); stroke: var(--f-line); stroke-width: 1.2; transition: stroke 0.3s, fill 0.3s; }
.f-node .t { font: 500 12.5px Inter, system-ui, sans-serif; fill: var(--fg); text-anchor: middle; }
.f-node .s { font: 9.5px ui-monospace, SFMono-Regular, Menlo, monospace; fill: var(--muted); text-anchor: middle; }
.f-node.decision rect { stroke-dasharray: 4 3; }
.f-node { opacity: 0; transform-box: fill-box; transform-origin: center; }
.f-svg.in .f-node { opacity: 1; transition: opacity 0.5s var(--ease-out); transition-delay: calc(var(--i) * 90ms); }
.f-node.on rect { stroke: var(--data); stroke-width: 1.6; }
.f-node.pop { animation: f-pop 0.4s var(--ease-spring); }
@keyframes f-pop { 40% { transform-origin: center; scale: 1.05; } }
.f-node.done rect { fill: color-mix(in srgb, var(--data) 10%, var(--bg)); }
.f-edge path { fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.f-edge .base { stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-dasharray: 1; stroke-dashoffset: 1; marker-end: url(#f-arrow); }
.f-svg.in .f-edge .base { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s var(--ease-out); transition-delay: calc(0.5s + var(--i) * 60ms); }
.f-arrow { fill: none; stroke: color-mix(in srgb, var(--fg) 35%, transparent); stroke-width: 1.2; }
.f-edge .hot { stroke: var(--data); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.f-edge.on .hot { stroke-dashoffset: 0; transition: stroke-dashoffset 0.95s cubic-bezier(0.45, 0, 0.55, 1); }
.f-edge .l { font: 9.5px ui-monospace, SFMono-Regular, Menlo, monospace; fill: var(--muted); paint-order: stroke; stroke: var(--frame); stroke-width: 4px; stroke-linejoin: round; opacity: 0; transition: opacity 0.4s, fill 0.3s; transition-delay: calc(0.9s + var(--i) * 60ms); }
.f-svg.in .f-edge .l { opacity: 1; }
.f-edge.on .l { fill: var(--data); transition-delay: 0s; }
.f-svg.running .f-edge:not(.on) .base { stroke: color-mix(in srgb, var(--fg) 12%, transparent); transition: stroke 0.4s; }
.f-svg.running .f-edge:not(.on) .l { opacity: 0.45; transition-delay: 0s; }
.f-dot { fill: var(--data); stroke: var(--bg); stroke-width: 2; opacity: 0; transition: opacity 0.3s; }
.f-dot.show { opacity: 1; }

/* Press feedback: things you press should feel heard */
.copy { transition: width 0.45s var(--ease-spring), transform 0.12s var(--ease-out); }
.copy:active { transform: scale(0.97); }
.row:active::before { transform: scale(0.985); transition-duration: 0.1s; }
.theme:active svg { transform: scale(0.94); }

/* Touch screens: no hover motion (a tap would trigger it) */
@media (hover: none) {
  .row:hover::before { opacity: 0; transform: scale(0.97); }
  .row:hover .row-arrow { opacity: 0; transform: translateX(-6px); }
  .prose .post-link a:hover::after, .back:hover span { transform: none; }
}


/* ───────── Magic Textbox: positions measured from the designs (375-wide) ───────── */
/* empty state (design 1): title at 108, box 190–279, current-location card 296–357 */
.mt-input .mt-title { top: 108px; right: auto; max-width: 300px; font-size: 22px; line-height: 26px; font-weight: 600; transition: font-size 0.45s var(--ease-out), top 0.45s var(--ease-out), max-width 0s 0.2s; }
.mt-input .mt-box { top: 103px; transform: translateY(87px); min-height: 89px; padding: 17px 16px; font-size: 15px; line-height: 20px; border: 1px solid #ebebeb; border-radius: 9px; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.mt-here { top: 296px; padding: 12px 16px; border-color: #ececec; border-radius: 9px; }
.mt-here b { font-size: 15px; font-weight: 500; color: #2b2b2b; }
.mt-here span { font-size: 13.5px; color: #444; margin-top: 3px; }
/* typing state (design 2): title at 70 on one line, box 103–153, toggle row 170–222, list below */
.typing .mt-input .mt-title { top: 70px; max-width: 330px; font-size: 16px; line-height: 20px; }
.typing .mt-input .mt-box { transform: none; min-height: 50px; padding: 5px 15px; border: 1.2px solid #2b2b2b; box-shadow: none; }
.mt-input .mt-toggle { top: 170px; height: 52px; border-radius: 9px; font-size: 15px; }
.mt-input .mt-sk { top: 166px; }
.nomatch .mt-input .mt-sk { top: 240px; }
/* buttons */
.mt-btn { bottom: 29px; height: 48px; border-radius: 8px; font-size: 17px; }
/* verification started (design 3): badge centred at 142 (92 across), title 256, sub 301, list from 350 */
.mt-badge { top: 96px; width: 92px; height: 92px; margin-left: -46px; }
.mt-hg { width: 42px; height: 42px; }
.mt-title.center { top: 243px; font-size: 21px; font-weight: 700; }
.mt-sub { top: 290px; font-size: 15px; }
.mt-list { top: 348px; gap: 26px; }
.mt-list span { width: 40px; height: 40px; }
.mt-done .mt-btn { bottom: 54px; height: 51px; }

/* the touch indicator (a fingertip): soft, translucent, presses in, ring belongs to it */
.d-touch {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(30, 30, 30, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.2s var(--ease-out), scale 0.14s var(--ease-out), background-color 0.14s;
}
.d-touch.show { opacity: 1; }
.d-touch.press { scale: 0.82; background: rgba(30, 30, 30, 0.26); }
.d-touch::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); opacity: 0; }
.d-touch.tap::after { animation: touch-ring 0.45s var(--ease-out); }
@keyframes touch-ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }

/* type sizes measured from the designs (Roboto, as in the app) */
.mt-input .mt-title { font-size: 21px; font-weight: 500; letter-spacing: -0.005em; }
.typing .mt-input .mt-title { font-size: 15px; font-weight: 500; }
.mt-input .mt-box { font-size: 14px; }
.mt-input .mt-toggle { font-size: 14px; }
.mt-here b { font-size: 14px; }
.mt-here span { font-size: 12.5px; }
.mt-title.big { font-weight: 500; }
.mt-input .mt-title { max-width: 268px; }
.typing .mt-input .mt-title { max-width: 330px; }


/* ───────── Benji-style timing inside the phone demos ─────────
 * The frame holds still; only what changes animates, briefly (0.15–0.36s) on cubic-bezier(0.22,1,0.36,1).
 * Page changes are cuts (a 0.13s dip), not slides. One short camera move at most per page.
 */
:root { --ease-ui: cubic-bezier(0.22, 1, 0.36, 1); }
.mt-cam { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.mt-canvas { transition: opacity 0.2s ease; }
.mt-canvas.dip { opacity: 0; transition-duration: 0.12s; }
.mt-page, .mt-page.left { transform: none; transition: opacity 0.2s ease; }
.mt-input .mt-title { transition: font-size 0.28s var(--ease-ui), top 0.28s var(--ease-ui), max-width 0s 0.14s; }
.mt-input .mt-box { transition: transform 0.3s var(--ease-ui), min-height 0.3s var(--ease-ui), padding 0.3s var(--ease-ui), border-color 0.2s ease, box-shadow 0.2s ease; }
.mt-here { transition: opacity 0.16s ease, transform 0.24s var(--ease-ui); }
.typing .mt-here { transform: translateY(6px); }
.mt-input .mt-toggle { transition: opacity 0.2s ease, transform 0.25s var(--ease-ui); }
.mt-toggle i { transition: background-color 0.2s ease; }
.mt-toggle i::after { transition: transform 0.25s var(--ease-ui); }
.mt-sk { transition: opacity 0.2s ease, transform 0.25s var(--ease-ui), top 0.25s var(--ease-ui); }
.mt-kb { transition: transform 0.3s var(--ease-ui); }
.typing.kb-off .mt-kb { transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1); }
.mt-go { transition: background-color 0.2s ease, transform 0.12s ease-out; }
.mt-finding { transition: opacity 0.2s ease, transform 0.25s var(--ease-ui); }
.mt-map img { transition: transform 0.7s var(--ease-ui); }
.mt-confirm.on .mt-pin { animation: pin-drop 0.5s 0.25s var(--ease-ui) forwards; }
.mt-confirm.on .mt-shadow { transition: opacity 0.2s 0.5s, transform 0.3s 0.5s var(--ease-ui); }
.mt-confirm.on .mt-pulse { animation: mt-pulse 1.4s 0.8s var(--ease-out) 2; }
.mt-confirm.on .mt-addr > * { transition: opacity 0.25s ease, transform 0.3s var(--ease-ui); }
.mt-confirm.on .mt-addr > :nth-child(1) { transition-delay: 0.15s; }
.mt-confirm.on .mt-addr > :nth-child(2) { transition-delay: 0.2s; }
.mt-confirm.on .mt-addr > :nth-child(3) { transition-delay: 0.25s; }
.mt-done.on .mt-badge { transition: opacity 0.2s 0.1s, transform 0.36s 0.1s cubic-bezier(0.34, 1.3, 0.64, 1); }
.mt-done.on .mt-title, .mt-done.on .mt-sub { transition: opacity 0.25s 0.2s, transform 0.3s 0.2s var(--ease-ui); }
.mt-done.on .mt-list li { transition: opacity 0.25s, transform 0.3s var(--ease-ui); transition-delay: calc(0.3s + var(--k) * 0.06s); }
.mt-btn { transition: transform 0.12s ease-out, filter 0.12s, opacity 0.2s ease, translate 0.3s var(--ease-ui); }
/* pin adjust */
.mt-amap { transition: clip-path 0.4s var(--ease-ui); }
.mt-world { transition: transform 0.4s var(--ease-ui); }
.mt-street { transition: opacity 0.25s ease; }
.full .mt-ehead, .full .mt-efoot, .full .mt-zoom, .full .mt-locate { transition-delay: 0.12s; }
.mt-ehead, .mt-efoot, .mt-zoom, .mt-locate { transition: opacity 0.22s ease; }
.mt-dpin .mt-lift { transition: transform 0.22s var(--ease-ui); }
.dropped .mt-dpin .mt-pin { animation: pin-drop 0.5s 0.25s var(--ease-ui) forwards; }

/* Page text is simply on the page, as in the app: no fade-in for addresses or the Verification page text */
.mt-addr > *,
.mt-confirm.on .mt-addr > *,
.dropped .mt-adjust .mt-addr > *,
.mt-done .mt-title, .mt-sub,
.mt-done.on .mt-title, .mt-done.on .mt-sub,
.mt-list li, .mt-done.on .mt-list li {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ───────── One card for every visual: plain images sit in the same frame as the demos ───────── */
.prose figure > img,
.prose figure.duo {
  box-sizing: border-box;
  padding: 28px;
  background: var(--frame);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prose figure.duo > img { padding: 0; border: 0; background: none; border-radius: 6px; }
.prose figure.redrawn > img { padding: 0; } /* the redrawn screens carry their own margin for the window's shadow */
.prose figure.phone > img { padding: 20px 36px; }

/* ───────── Annotate: notes beside the design (or below), never over it ───────── */
.an { position: relative; padding: 28px; }
.an-img { position: relative; }
.prose figure .an img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; padding: 0; opacity: 1; filter: none; transform: none; background: none; }
.an.side { display: grid; grid-template-columns: var(--imgw) 1fr; column-gap: 26px; align-items: start; }
/* a still shown as a clean white card: hairline edge, soft lift */
.an-card { border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 10px 24px -14px rgba(0, 0, 0, 0.18); }
.prose figure .an-card img { border-radius: 14px; }
.an-notes { position: relative; }
.an.side .an-notes { align-self: stretch; }
.an-note {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font: 12.5px/1.45 Inter, system-ui, sans-serif;
  color: var(--fg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.an-note b { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #3c82f7; color: #fff; font: 600 10px/18px Inter, system-ui, sans-serif; text-align: center; margin-top: 1px; }
.an-note.cur { opacity: 1; transform: none; transition-delay: 0.18s; }
.an.side .an-note { position: absolute; left: 0; right: 0; top: var(--y); translate: 0 -10px; }
.an.below .an-notes { display: grid; margin-top: 18px; min-height: 40px; }
.an.below .an-note { grid-area: 1 / 1; }
.an.below .an-line { display: none; }

.an-pin { position: absolute; width: 0; height: 0; z-index: 1; }
.an-pin.cur { z-index: 3; }
.an-dot {
  position: absolute;
  left: -10px;
  top: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3c82f7;
  color: #fff;
  font: 600 10.5px/20px Inter, system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.16s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), background-color 0.2s ease;
}
.an-pin.on .an-dot { opacity: 1; transform: none; }
.an-pin.on:not(.cur) .an-dot { background: #8fb4f5; }
/* hairline from the marker out to the notes column (13 Path draw) */
.an-line { position: absolute; left: 0; top: -0.5px; height: 1px; background: color-mix(in srgb, var(--fg) 35%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.an-pin.cur .an-line { transform: scaleX(1); transition-delay: 0.05s; }
.an-pin.out .an-dot { opacity: 0; transition: opacity 0.25s ease; }

@media (max-width: 560px) {
  .an { padding: 16px; }
  .an.side { display: block; }
  .an.side .an-notes { display: grid; margin-top: 16px; min-height: 40px; }
  .an.side .an-note { position: static; grid-area: 1 / 1; translate: none; }
  .an-line { display: none; }
  .prose figure > img, .prose figure.duo { padding: 16px; }
}

/* no connector lines: the matching number and the highlighted marker link note to detail */
.an-line { display: none; }

/* ───────── Google Places demo ───────── */
.stage-places { height: 400px !important; }
.mt-sugg {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 172px;
  padding: 10px 16px 2px;
  border: 1px solid #ececec;
  border-radius: 9px;
  background: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.suggest .mt-sugg { opacity: 1; }
.suggest .mt-sk { opacity: 0; }
.mt-sugg p { margin: 2px 0 10px; font-size: 13px; color: #8a8a8a; }
.mt-sugg ul { margin: 0; padding: 0; list-style: none; }
.mt-sugg ul.swap li { animation: sugg-in 0.22s var(--ease-ui); }
@keyframes sugg-in { from { opacity: 0.35; } }
.mt-sugg li { display: flex; gap: 14px; align-items: center; padding: 11px 0 12px; border-top: 1px solid #efefef; border-radius: 6px; transition: background-color 0.15s ease; }
.mt-sugg li svg { flex: none; width: 17px; height: 17px; fill: none; stroke: #777; stroke-width: 1.8; margin-left: 4px; }
.mt-sugg li b { display: block; font-size: 14px; font-weight: 400; color: #2b2b2b; }
.mt-sugg li b strong { font-weight: 600; }
.mt-sugg li small { display: block; margin-top: 2px; font-size: 12px; color: #8a8a8a; }
.mt-sugg li.press, .mt-sugg li.picked { background: #f3f3f3; }
/* the keyboard in this design: a "." key and a blue "go" key in place of return */
.mt-dotkey, .mt-gokey { position: absolute; top: 258px; height: 42px; border-radius: 6px; display: grid; place-items: center; font: 16px -apple-system, system-ui, sans-serif; box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.mt-dotkey { left: 280px; width: 23px; background: #fff; color: #111; }
.mt-gokey { left: 308px; width: 64px; background: #0a84ff; color: #fff; }
/* confirm page for this address: the pin lands on the roof at the centre of the estate */
.mt-confirm.raymond .mt-pin { left: 185px; top: 38px; }
.mt-confirm.raymond .mt-shadow { left: 192px; top: 74px; }
.mt-confirm.raymond .mt-pulse { left: 180px; top: 58px; }
.mt-sugg li { margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.mt-sugg li + li { border-top-color: #efefef; }

/* the typed address sits centred in the box; the box hugs one line and grows with the text */
.mt-input .mt-box { display: flex; align-items: center; }
.typing .mt-input .mt-box { min-height: 44px; padding: 10px 15px; box-sizing: border-box; }
.mt-line { display: block; }
.mt-input:not(.x) .mt-box .ph { top: 17px; }
.mt-input .mt-box { align-items: flex-start; }
.typing .mt-input .mt-box { align-items: center; padding: 8px 15px; }

/* ───────── Funnel (redrawn analytics) ───────── */
.fn { display: grid; grid-template-columns: repeat(var(--g), minmax(0, 1fr)); gap: 28px; padding: 26px 26px 22px; }
.fn-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.fn-h b { font-size: 22px; font-weight: 500; color: var(--fg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fn-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.fn-col { position: relative; height: 130px; border-bottom: 1px solid var(--line); }
.fn-bar, .fn-drop { position: absolute; left: 0; right: 0; bottom: 0; display: block; border-radius: 4px 4px 0 0; }
.fn-bar { height: calc(var(--p) * 1%); background: color-mix(in srgb, var(--fg) 22%, transparent); transform: scaleY(0); transform-origin: bottom; }
.fn-g.accent .fn-bar { background: var(--data); }
.fn-g.muted .fn-step:last-child .fn-bar { background: color-mix(in srgb, var(--fg) 32%, transparent); }
.fn-step.warn .fn-bar { background: var(--data-warn); }
/* the drop: the space between the previous step and this one, shaded */
.fn-drop {
  bottom: calc(var(--p) * 1%);
  height: calc((var(--prev) - var(--p)) * 1%);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--fg) 9%, transparent) 0 4px, transparent 4px 8px);
  border-radius: 4px 4px 0 0;
  opacity: 0;
}
.fn-drop em { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 2px 6px; border-radius: 5px; background: var(--bg); font: 500 11px ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; color: var(--fg); white-space: nowrap; }
.fn-n { margin: 8px 0 0; font-size: 12px; line-height: 1.3; color: var(--fg); }
.fn-v { margin: 2px 0 0; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.fn.on .fn-bar { transform: none; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--gi) * 0.15s + var(--si) * 0.25s); }
.fn.on .fn-drop { opacity: 1; transition: opacity 0.4s ease; transition-delay: calc(var(--gi) * 0.15s + var(--si) * 0.25s + 0.55s); }
@media (max-width: 560px) { .fn { grid-template-columns: 1fr; gap: 22px; padding: 20px 16px; } }
.fn-g .fn-step.warn .fn-bar { background: var(--data-warn); }
.fn-step.warn .fn-drop { display: none; }
.fn .fn-g .fn-step.warn .fn-bar { background: var(--data-warn); }
/* annotated images use the full card width; one note slot underneath */
.an { padding: 22px 22px 18px; }
.an.below .an-notes { margin-top: 16px; min-height: 38px; }
.an.below .an-note { font-size: 13px; }

/* ───────── Charts, Liveline-style ───────── */
/* trend */
.d-trend { padding: 14px 6px 4px; overflow: visible; }
.d-trend .grid { stroke: color-mix(in srgb, var(--fg) 12%, transparent); stroke-width: 1; stroke-dasharray: 2 4; }
.d-trend .yl { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; fill: var(--muted); text-anchor: start; }
.d-trend .xl { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; fill: var(--muted); text-anchor: unset; }
.d-trend .line { fill: none; stroke: var(--data); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
.d-trend .area { opacity: 1; transition: none; }
.d-trend.on .line { stroke-dashoffset: 0; }
.d-trend .pt { fill: var(--bg); stroke: var(--data); stroke-width: 2; opacity: 0; transform: none; transition: opacity 0.2s ease; }
.d-trend .pt.on { opacity: 1; }
.d-trend .guide { stroke: var(--data); stroke-opacity: 0.45; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity 0.3s ease; }
.d-trend .head, .d-trend .tag { opacity: 0; transition: opacity 0.3s ease; }
.d-trend.on .guide, .d-trend.on .head, .d-trend.on .tag { opacity: 1; }
.d-trend .dot { fill: var(--data); stroke: var(--bg); stroke-width: 2; }
.d-trend .halo { fill: var(--data); opacity: 0.18; transform-box: fill-box; transform-origin: center; }
.d-trend.done .halo { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.8); opacity: 0.22; } 50% { transform: scale(1.5); opacity: 0.06; } }
.d-trend .tag path { fill: color-mix(in srgb, var(--fg) 70%, transparent); transition: fill 0.25s ease; }
.d-trend.rising .tag path, .d-trend.done .tag path { fill: var(--rise); }
.d-trend .tag text { font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #fff; text-anchor: middle; font-variant-numeric: tabular-nums; }

/* bars */
.d-bars { position: relative; gap: 20px; padding: 26px 26px 28px; }
.d-grid { position: absolute; inset: 26px 26px 28px; display: flex; justify-content: space-between; pointer-events: none; }
.d-grid i { width: 0; border-left: 1px dashed color-mix(in srgb, var(--fg) 9%, transparent); }
.d-grid i:first-child { visibility: hidden; }
.d-bar { position: relative; }
.d-bar-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.d-bar-track { position: relative; height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 5%, transparent); overflow: visible; }
.d-bar-track i {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: calc(var(--w) * 100%);
  border-radius: inherit;
  background: var(--data);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.d-bar.muted .d-bar-track i { background: color-mix(in srgb, var(--fg) 22%, transparent); }
.d-bar.warn .d-bar-track i { background: var(--data-warn); }
.d-bar.on .d-bar-track i { transform: scaleX(1); }
/* the tag rides the tip of the bar while it grows */
.d-tag {
  position: absolute;
  top: 50%;
  left: 0;
  translate: 8px -50%;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--fg);
  color: var(--bg);
  font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: left 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.d-bar.on .d-tag { left: calc(var(--w) * 100%); opacity: 1; }
.d-bar.accent .d-tag, .d-bar:not(.muted):not(.warn) .d-tag { background: var(--data); color: #fff; }
.d-bar.warn .d-tag { background: var(--data-warn); color: #fff; }
.d-bar.on::after { content: none; }

/* funnels: solid bars with a tag riding the top */
.fn-col { border-bottom: 0; background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--fg) 9%, transparent) 0 1px, transparent 1px 32.5px); }
.fn-bar { background: color-mix(in srgb, var(--fg) 18%, var(--frame)); }
.fn-g.accent .fn-bar { background: var(--data); }
.fn .fn-g .fn-step.warn .fn-bar { background: var(--data-warn); }
.fn .fn-g.muted .fn-step:last-child:not(.warn) .fn-bar { background: color-mix(in srgb, var(--fg) 26%, var(--frame)); }

/* form demo: field labels are placeholders (grey); the button stays disabled (white label on grey) */
.d-f span, .morphed .d-f .n { color: #9a9a9a; }
.d-cta, .morphed .d-cta { background: #c4c4c4; }
.d-cta span, .morphed .d-cta .n, .morphed .d-cta .o { color: #fff; }

/* ───────── Old vs new form, built in code ───────── */
.fp { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 22px 26px 0; }
.fp-k { margin: 0 0 10px; text-align: center; font-size: 12px; color: var(--muted); }
.fp .d-phone.fp-phone { position: relative; left: auto; top: auto; margin: 0 auto; width: 100%; max-width: 225px; height: 380px; border-radius: 30px 30px 0 0; padding: 7px 7px 0; }
.fp .d-screen { border-radius: 24px 24px 0 0; padding: 14px 13px 0; }
.fp .d-bar-top.dark { margin: -14px -13px 16px; padding: 18px 14px 10px; font-size: 12px; }
.fp .d-brand { font-weight: 400; font-size: 11px; }
.fp .d-brand b { font-weight: 700; }
.fp .d-chips { gap: 6px; margin-bottom: 14px; }
.fp .d-chips b, .fp .d-chips i { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 10px; }
.fp .d-chips svg { width: 10px; height: 10px; fill: currentColor; }
.fp .d-fields { grid-template-columns: 52px 1fr; gap: 8px; }
.fp .d-f { height: 30px; font-size: 9.5px; transition: none; }
.fp .d-f.full { grid-column: 1 / -1; }
.fp .d-f.tall { height: 48px; align-items: start; padding-top: 8px; }
.fp .d-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp .d-cta { margin-top: 14px; height: 30px; }
.fp-okhi { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; margin: 0; padding: 3px 8px; border-radius: 4px; background: #f3f3f3; font-size: 8.5px; color: #888; white-space: nowrap; }
.fp-okhi b { color: #555; font-style: italic; }
@media (max-width: 560px) { .fp { gap: 12px; padding: 16px 14px 0; } .fp .d-phone.fp-phone { height: 330px; } }
.fp .d-phone.fp-phone { max-width: 240px; }
.fp .d-fields { grid-template-columns: 50px 1fr; gap: 7px; }
.fp .d-f { padding: 0 7px; font-size: 9px; }
.fp .d-f span { text-overflow: clip; }
.fp .d-bar-top.dark { justify-content: flex-start; gap: 12px; }
.fp .d-bar-top.dark span:last-child { margin-left: auto; }
.fp { width: 520px; max-width: none; box-sizing: border-box; transform-origin: 0 0; }
.stage-formpair { overflow: hidden; }
@media (max-width: 560px) { .fp { gap: 22px; padding: 22px 26px 0; } .fp .d-phone.fp-phone { height: 380px; } }
.fp { width: 556px; }
.fp .d-phone.fp-phone { max-width: 246px; }

/* form demo: empty fields keep a light grey border in both states (nothing is focused) */
.d-f, .morphed .d-f { border-color: #dcdcdc; }
/* header and chips match the rebuilt comparison */
.d-form .d-bar-top.dark { justify-content: flex-start; gap: 12px; }
.d-form .d-bar-top.dark span:last-child { margin-left: auto; }
.d-form .d-brand { font-weight: 400; }
.d-form .d-brand b { font-weight: 700; }
.d-form .d-chips b, .d-form .d-chips i { display: inline-flex; align-items: center; gap: 5px; }
.d-form .d-chips svg { width: 10px; height: 10px; fill: currentColor; }

/* ───────── Form entry demo ───────── */
.stage-form-entry { height: 430px; }
.fe .d-screen { transition: opacity 0.3s ease; }
.fe.fade .d-screen { opacity: 0; }
.fe-f { position: relative; }
.fe-f .v { color: #222; opacity: 1; transform: none; filter: none; white-space: nowrap; overflow: hidden; }
.fe-f.tall .v { white-space: normal; line-height: 1.35; }
.fe-f.filled .o { opacity: 0; transition: none; }
.fe-f.focus { border-color: #2b2b2b; }
.fe-f.focus .v::after { content: ''; display: inline-block; width: 1px; height: 10px; margin-left: 1px; vertical-align: -1px; background: #222; animation: blink-caret 1s steps(1) infinite; }
.fe-f, .fe .d-f { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
/* error: street + number missing → directions required */
.fe.error .fe-f[data-k="num"], .fe.error .fe-f[data-k="street"] { border-color: #f0a5a8; }
.fe.error .fe-f[data-k="dir"] { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.12); }
.fe-err { margin: 8px 2px 0; font-size: 9px; line-height: 1.35; color: #d93d42; opacity: 0; transform: translateY(-3px); max-height: 0; transition: opacity 0.2s ease, transform 0.25s var(--ease-ui), max-height 0.25s var(--ease-ui); }
.fe.error .fe-err { opacity: 1; transform: none; max-height: 30px; }
/* button: disabled until there's input, then enabled; success state */
.fe-cta { transition: background-color 0.25s ease, transform 0.12s ease-out; }
.fe.ready .fe-cta { background: #2b2b2b; }
.fe .fe-cta.press { transform: scale(0.97); }
.fe .fe-cta .n { color: #fff; }
.fe.done .fe-cta { background: #1f9d48; }
.fe.done .fe-cta .o { opacity: 0; transform: translateY(-8px); }
.fe.done .fe-cta .n { opacity: 1; transform: none; filter: none; }
.fe .d-fields .d-f:nth-child(3), .fe .d-fields .d-f:nth-child(4) { grid-column: auto; }

/* ───────── Winners Chapel demos ───────── */
.stage-wc-flow, .stage-wc-switch, .stage-wc-done { height: 400px !important; }
.wc-phone .d-screen.mt-screen { background: #17161d; }
.wc-page { padding: 0; background: #17161d; }
.wc-bg { position: absolute; inset: 0; width: 375px; height: 812px; display: block; }
.wc-spot { position: absolute; width: 1px; height: 1px; pointer-events: none; }
/* giving type sheet slides up over home */
.wc-sheet { position: absolute; inset: 0; z-index: 4; transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1); }
.wc-sheet.up { transform: none; }
.wc-sheet.gone { transition: none; }
.wc-sheet img { width: 375px; height: 812px; display: block; }
/* amount: covers the design's 0.00 (two-tone card) */
.wc-amount { position: absolute; left: 68px; top: 166px; width: 190px; height: 50px; background: linear-gradient(#262730 0 32px, #1e1f25 32px); display: flex; align-items: flex-end; }
.wc-amount span { font: 700 50px/1 Inter, system-ui, sans-serif; letter-spacing: -1.5px; color: #fff; padding-left: 5px; transform: translateY(5px); font-variant-numeric: tabular-nums; }
/* button label */
.wc-btnlabel { position: absolute; left: 70px; right: 70px; top: 726px; height: 24px; background: #f02621; color: #fff; font: 500 16.5px/24px Inter, system-ui, sans-serif; text-align: center; }
/* recurring toggle */
.wc-toggle { position: absolute; left: 298px; top: 350px; width: 42px; height: 28px; background: #262730; }
.wc-toggle i { position: absolute; left: 4px; top: 4.5px; width: 34px; height: 19px; border-radius: 99px; background: #373747; transition: background-color 0.25s ease; }
.wc-toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease-ui); }
.wc-toggle.on i { background: #f02621; }
.wc-toggle.on i::after { transform: translateX(15px); }
/* success: check draws and pops, confetti bursts */
.wc-check { position: absolute; left: 117px; top: 167px; width: 140px; height: 140px; }
.wc-check svg { width: 140px; height: 140px; overflow: visible; }
.wc-check .ring { fill: none; stroke: #43ad4b; stroke-width: 4; }
.wc-check .fill { fill: #43ad4b; }
.wc-check path { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.wc-check svg { opacity: 0; transform: scale(0.85); }
.go .wc-check svg { opacity: 1; transform: none; transition: opacity 0.2s, transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1); }
.go .wc-check path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.4s 0.25s var(--ease-ui); }
.wc-confetti i { position: absolute; left: 50%; top: 50%; width: 9px; height: 12px; margin: -6px 0 0 -4px; border-radius: 1px; background: var(--c); opacity: 0; }
.go .wc-confetti i { animation: wc-burst 1.4s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes wc-burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.5); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)) scale(1); } }
/* switch sheet over fund wallet */
.wc-dim { position: absolute; inset: 0; z-index: 3; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.wc-switch { position: absolute; left: 0; right: 0; bottom: 0; height: 307px; z-index: 4; transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1); }
.wc-switch img { display: block; width: 375px; height: 307px; }
.sheet .wc-dim { opacity: 1; }
.sheet .wc-switch { transform: none; }
.wc-row { position: absolute; left: 20px; right: 20px; top: 157px; height: 59px; border-radius: 6px; border: 1.5px solid #f02621; opacity: 0; transition: opacity 0.15s ease; }
.picked .wc-row { opacity: 1; }
/* the card screen: the fund screen's box and button, re-set for a debit card */
.wc-cardbox { position: absolute; left: 19.5px; top: 160px; width: 336.5px; height: 146px; border: 1px solid #393743; border-radius: 6px; overflow: hidden; background: #1e1f25;
  font-family: Inter, system-ui, sans-serif; color: #fff; }
.wc-cardbox > div { padding: 12px 18px; height: 73px; box-sizing: border-box; }
.wc-cardbox > div:first-child { background: #262730; }
.wc-cardbox small { display: block; font-size: 11.5px; color: #8a8f9c; margin-bottom: 6px; }
.wc-cardbox b { font-weight: 400; font-size: 15.5px; letter-spacing: 0.3px; font-variant-numeric: tabular-nums; }
.wc-cardbox .wc-cardrow { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.wc-cardrow > div { padding: 12px 18px; }
.wc-cardrow > div + div { border-left: 1px solid #393743; }
.wc-paybtn { position: absolute; left: 19px; top: 659px; width: 337px; height: 48px; border-radius: 5px; background: #f02621; color: #fff;
  display: grid; place-items: center; font: 500 16.5px/1 Inter, system-ui, sans-serif; }
.wc-paybtn > * { grid-area: 1 / 1; transition: opacity 0.2s ease, transform 0.3s var(--ease-out-cubic); }
.wc-paybtn i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; opacity: 0; transform: scale(0.6); animation: wc-spin 0.7s linear infinite; }
.wc-paybtn.busy span { opacity: 0; transform: scale(0.9); }
.wc-paybtn.busy i { opacity: 1; transform: none; }
@keyframes wc-spin { to { rotate: 360deg; } }
/* light, not dark */
.stage-wc-theme { padding: 18px 0 26px; }
.wc-tl { display: grid; justify-items: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.wc-tl span { grid-area: 1 / 1; transition: opacity 0.3s ease; }
.wc-tl .b { opacity: 0; color: var(--fg); }
.light .wc-tl .a { opacity: 0; }
.light .wc-tl .b { opacity: 1; }
.wc-tps { display: flex; justify-content: center; gap: 22px; }
.wc-tp { width: 168px; padding: 6px; border-radius: 30px; background: #1b1b1b; box-shadow: 0 16px 30px -18px rgba(0,0,0,.45); }
.wc-tp-screen { position: relative; aspect-ratio: 375 / 812; border-radius: 24px; overflow: hidden; background: #17161d; }
.wc-tp-screen img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.prose figure .wc-tp-screen img { border: 0; border-radius: 0; padding: 0; opacity: 1; filter: none; transform: none; background: none; }
.wc-tp-screen .lt { clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.light .wc-tp-screen .lt { clip-path: inset(0 0 0 0); }
/* the sheet slides without its own status bar; the screen behind dims */
.wc-sheet img { clip-path: inset(40px 0 0 0 round 14px 14px 0 0); }
.wc-amount span { transition: font-size 0.15s ease; }

/* ───────── Journey (experience map) ───────── */
.jn { padding: 26px 26px 24px; }
.jn-track { position: relative; height: 14px; margin: 0 calc(50% / var(--n)) 22px; }
.jn-line, .jn-fill { position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; }
.jn-line { background: color-mix(in srgb, var(--fg) 10%, transparent); }
.jn-fill { background: linear-gradient(90deg, #9aa1ab, #e3a93a 50%, #3fae4b); transform-origin: left; transform: scaleX(calc(var(--at, -1) / (var(--n) - 1))); transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.jn:not(.in) .jn-fill { transform: scaleX(0); }
.jn-node { position: absolute; top: 0; left: calc(var(--i) / (var(--n) - 1) * 100%); width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--frame); border: 2px solid color-mix(in srgb, var(--fg) 18%, transparent); box-sizing: border-box; transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
.jn-node.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--frame)); transform: scale(1.15); transition-delay: 0.6s; }
.jn-dot { position: absolute; top: 2px; left: calc(var(--at, 0) / (var(--n) - 1) * 100%); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--fg); opacity: 0; transition: left 0.9s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease; z-index: 1; }
.jn.in .jn-dot { opacity: 1; }
.jn.rest .jn-dot { opacity: 0; }
.jn-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 18px; }
.jn-col { opacity: 0.38; transition: opacity 0.45s ease; }
.jn-col.on { opacity: 1; }
.jn-col p, .jn-col dl, .jn-col dd { margin: 0; }
.jn-k { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.jn-t { font-size: 13px; font-weight: 500; margin-top: 2px !important; }
.jn-num { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 10px !important; }
.jn-num b { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--fg); }
.jn-col.cur .jn-num b { color: var(--c); }
.jn-num span { font-size: 11px; color: var(--muted); }
.jn-q { font-size: 12.5px; line-height: 1.4; padding-left: 9px; border-left: 2px solid var(--c); margin-bottom: 14px !important; }
.jn-col dt { font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; }
.jn-col dd { font-size: 12px; line-height: 1.4; margin-top: 2px; color: var(--fg); }
.jn-col dd.op { color: color-mix(in srgb, #3fae4b 75%, var(--fg)); }
@media (max-width: 560px) {
  .jn { padding: 20px 16px; }
  .jn-track { display: none; }
  .jn-cols { grid-template-columns: 1fr; gap: 22px; }
  .jn-col { opacity: 1; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--c) 50%, transparent); }
}
.jn-fill { transform: none; clip-path: inset(0 calc((1 - var(--at, 0) / (var(--n) - 1)) * 100%) 0 0); transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.jn:not(.in) .jn-fill { transform: none; clip-path: inset(0 100% 0 0); }

/* ───────── Mockup frames ───────── */
.mk { display: flex; justify-content: center; gap: 28px; padding: 26px 24px 28px; }
.mk-item { width: min(210px, calc((100% - (var(--n) - 1) * 28px) / var(--n))); }
.mk-k { margin: 0 0 10px; text-align: center; font-size: 12px; color: var(--muted); }
.mk-phone { padding: 6px; border-radius: 32px; background: #1b1b1b; box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 18px 34px -20px rgba(0,0,0,.5); }
.mk-screen { position: relative; aspect-ratio: 375 / 812; border-radius: 26px; overflow: hidden; background: #17161d; }
.prose figure .mk-screen img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; border-radius: 0; padding: 0; opacity: 1; filter: none; transform: none; background: none; }
@media (max-width: 560px) { .mk { gap: 14px; padding: 18px 14px; } }

/* Winners Chapel: taller frames so whole screens fit; bigger mockups */
.stage-wc-flow, .stage-wc-switch, .stage-wc-done { height: 600px !important; }
.mk-item { width: min(270px, calc((100% - (var(--n) - 1) * 28px) / var(--n))); }
.wc-tp { width: min(240px, 44%); }
.wc-tps { gap: 26px; }
.stage-wc-flow, .stage-wc-switch, .stage-wc-done { height: 640px !important; }

/* ───────── Affinity map (stickies) ───────── */
.st { display: grid; gap: 18px; padding: 24px 22px; }
.st-k { margin: 0 0 8px; font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.st-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.st-n {
  position: relative;
  aspect-ratio: 1;
  padding: 9px 9px 8px;
  background: var(--c);
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 6px 12px -8px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(-10px) rotate(var(--r)) scale(1.04);
}
.st-n.ins { --c: #f8df9f; }
.st-n p { margin: 0; font: 500 11.5px/1.3 Inter, system-ui, sans-serif; color: #2a2a2a; }
.st-n.ins p { font-weight: 600; }
.st-n small { font-size: 8.5px; color: rgba(0,0,0,.45); }
.st.on .st-n { opacity: 1; transform: rotate(calc(var(--r) * 0.3)); transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--k) * 70ms); }
@media (max-width: 560px) {
  .st-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-n { aspect-ratio: auto; min-height: 84px; }
  .st-n.ins { grid-column: 1 / -1; min-height: 0; }
}
.st-n { aspect-ratio: auto; min-height: 96px; }
.st-n p { font-size: 11px; }
.st-n.ins p { font-weight: 500; font-size: 10.5px; }
.st-n small { margin-top: 8px; }

/* flow: the finger fades rather than blinking; cuts dip briefly and come back with ease-out */
.d-touch { transition: opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1), scale 0.1s ease-out, background-color 0.1s; will-change: transform; }
.mt-canvas.dip { opacity: 0.15; transition: opacity 0.09s ease-in; }
.mt-canvas { transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
.mt-cam { transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1); }

/* ───────── Light screens built in code (375×812, scaled to fit) ───────── */
.wc-tp-screen .lt { position: absolute; inset: 0; overflow: hidden; background: #fff; clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.light .wc-tp-screen .lt { clip-path: inset(0 0 0 0); }
.lt-c { position: absolute; left: 0; top: 0; width: 375px; height: 812px; transform-origin: 0 0; font-family: Inter, system-ui, sans-serif; color: #111; background: #fff; }
.lt-c svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lt-status { position: relative; height: 47px; display: flex; align-items: center; padding: 0 26px 0 36px; font-size: 16px; }
.lt-status b { font-weight: 600; }
.lt-status .island { position: absolute; left: 50%; top: 11px; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
.lt-status .sig { margin-left: auto; display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.lt-status .sig i { width: 3px; background: #111; border-radius: 1px; }
.lt-status .sig i:nth-child(1) { height: 4px; } .lt-status .sig i:nth-child(2) { height: 6px; } .lt-status .sig i:nth-child(3) { height: 8px; } .lt-status .sig i:nth-child(4) { height: 11px; }
.lt-status .bat { margin-left: 22px; width: 24px; height: 12px; border: 1.3px solid #888; border-radius: 4px; position: relative; }
.lt-status .bat::after { content: ''; position: absolute; inset: 1.5px 4px 1.5px 1.5px; background: #111; border-radius: 2px; }
/* giving type (a sheet) */
.lt-sheet { position: absolute; left: 0; right: 0; top: 40px; bottom: 0; background: #f6f6f7; border-radius: 14px 14px 0 0; padding: 0 20px; }
.lt-chevdown { width: 22px; height: 22px; margin: 34px 0 0 -2px; color: #222; }
.lt-sheet h4 { margin: 26px 0 30px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.lt-types { list-style: none; margin: 0; padding: 0 0 0 10px; }
.lt-types li { display: flex; align-items: center; height: 52.6px; font-size: 14.5px; color: #222; }
.lt-ic { width: 30px; height: 30px; margin-right: 14px; border-radius: 50%; background: #fbeaea; color: #e2342d; display: grid; place-items: center; }
.lt-ic svg { width: 14px; height: 14px; stroke-width: 1.6; }
.lt-chev { margin-left: auto; color: #999; } .lt-chev svg { width: 16px; height: 16px; }
.lt-homebar { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #111; }
/* giving history */
.lt-hist { padding: 0 18px; }
.lt-top { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 14.5px; }
.lt-top > svg { width: 24px; height: 24px; }
.lt-top b { font-weight: 600; }
.lt-hist h4 { margin: 22px 0 22px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.lt-search { display: flex; gap: 12px; }
.lt-search span { flex: 1; height: 42px; border-radius: 6px; background: #f1f2f4; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: #9a9ca3; font-size: 14px; }
.lt-search span svg { width: 18px; height: 18px; }
.lt-search i { width: 42px; height: 42px; border-radius: 6px; background: #f1f2f4; display: grid; place-items: center; color: #555; }
.lt-search i svg { width: 17px; height: 17px; }
.lt-d { margin: 20px 0 6px; font-size: 12px; color: #888; }
.lt-hist ul { list-style: none; margin: 0; padding: 0; }
.lt-hist li { display: flex; align-items: center; gap: 13px; height: 58px; }
.lt-hist li div { display: grid; gap: 4px; }
.lt-hist li .r { margin-left: auto; text-align: right; }
.lt-hist li b { font-size: 15.5px; font-weight: 600; }
.lt-hist li small { font-size: 11.5px; color: #8a8a8a; }
.lt-dir { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #f0f0f0; display: grid; place-items: center; }
.lt-dir svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; stroke: #fff; stroke-width: 2.4; }
.lt-dir.in svg { background: #1fae63; }
.lt-dir.out svg { background: #e84a3f; transform: rotate(180deg); }
.lt-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; border-top: 1px solid #eee; background: #fff; display: flex; justify-content: space-around; padding-top: 10px; }
.lt-tabs span { display: grid; justify-items: center; gap: 4px; font-size: 10.5px; color: #8b8d93; }
.lt-tabs span svg { width: 22px; height: 22px; }
.lt-tabs span.on { color: #e2342d; }
.lt-chev { display: grid; }

/* ───────── Progressive blur at the top edge (content dissolves as it scrolls under) ───────── */
.edge-blur { position: fixed; left: 0; right: 0; top: 0; height: 96px; z-index: 50; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.scrolled .edge-blur { opacity: 1; }
.edge-blur i { position: absolute; inset: 0; }
/* each layer blurs a bit more and covers a narrower band nearer the top */
.edge-blur i:nth-child(1) { backdrop-filter: blur(0.5px); -webkit-backdrop-filter: blur(0.5px); mask: linear-gradient(to top, transparent 0%, #000 25%, #000 100%); -webkit-mask: linear-gradient(to top, transparent 0%, #000 25%, #000 100%); }
.edge-blur i:nth-child(2) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to top, transparent 20%, #000 45%, #000 100%); -webkit-mask: linear-gradient(to top, transparent 20%, #000 45%, #000 100%); }
.edge-blur i:nth-child(3) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask: linear-gradient(to top, transparent 40%, #000 65%, #000 100%); -webkit-mask: linear-gradient(to top, transparent 40%, #000 65%, #000 100%); }
.edge-blur i:nth-child(4) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to top, transparent 60%, #000 85%); -webkit-mask: linear-gradient(to top, transparent 60%, #000 85%); }
/* and a fade into the page colour */
.edge-blur i:nth-child(5) { background: linear-gradient(to bottom, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 35%, transparent 100%); }
@media (prefers-reduced-transparency: reduce) { .edge-blur i:not(:last-child) { display: none; } }

/* one timing family for the phone demos: moves start promptly and land softly */
.mt-cam { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.mt-canvas { transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
.mt-canvas.dip { opacity: 0.15; transition: opacity 0.08s ease-in; }

/* deliberate taps: the fingertip lands (slight settle), presses in, releases with its ring, lifts away */
.d-touch { transition: opacity 0.14s ease-out, scale 0.12s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.1s; }
.d-touch.land { animation: touch-land 0.16s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes touch-land { from { scale: 1.25; opacity: 0; } }
.d-touch.press { scale: 0.86; }

/* ───────── One chart palette across every project (after Josh Puckett's Interface Craft cards) ─────────
 * blue = the result · orange = the problem · green = the improvement · stone = the baseline · ink = neutral */
:root {
  /* Apple system colours: each has a light and a dark version tuned to stay clean on black */
  --data: #007aff;
  --data-warn: #ff9500;
  --rise: #34c759;
  --rise-ink: #fff;
  --base: #d9cbb2;
  --base-strong: #c4b394;
  --ink: #211f1e;
}
/* on black, warm stone turns muddy: the baseline goes neutral grey instead */
:root[data-theme='dark'] { --data: #0a84ff; --data-warn: #ff9f0a; --rise: #30d158; --rise-ink: #04260f; --base: #48484a; --base-strong: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --data: #0a84ff; --data-warn: #ff9f0a; --rise: #30d158; --rise-ink: #04260f; --base: #48484a; --base-strong: #636366; } }

/* bars */
.d-bar.muted .d-bar-track i { background: var(--base); }
.d-bar.muted .d-tag { background: var(--ink); color: #fff; }
:root[data-theme='dark'] .d-bar.muted .d-tag { background: var(--base-strong); }
.d-bar.warn .d-bar-track i { background: var(--data-warn); }
.d-bar.warn .d-tag { background: var(--data-warn); color: #fff; }
.d-bar:not(.muted):not(.warn) .d-tag { background: var(--data); color: #fff; }
/* trend: the riding tag turns green with dark ink while the value rises and at the end */
.d-trend.rising .tag path, .d-trend.done .tag path { fill: var(--rise); }
.d-trend.rising .tag text, .d-trend.done .tag text { fill: var(--rise-ink); }
.d-trend .tag path { fill: var(--ink); }
:root[data-theme='dark'] .d-trend .tag path { fill: #3a3a3c; } /* neutral, not warm, while it waits */
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .d-trend .tag path { fill: #3a3a3c; } }
:root .d-trend:is(.rising, .done) .tag path { fill: var(--rise); } /* green always wins once it's rising, whatever the theme */
/* funnels */
.fn .fn-g.muted .fn-step .fn-bar, .fn .fn-g.muted .fn-step:last-child:not(.warn) .fn-bar { background: var(--base); }
.fn-g.accent .fn-bar { background: var(--data); }
.fn .fn-g .fn-step.warn .fn-bar { background: var(--data-warn); }
/* journey track: unsure (stone) → friction (orange) → convinced (green), three solid stretches */
.jn-fill { background: linear-gradient(90deg, var(--base-strong) 0 33.33%, var(--data-warn) 33.33% 66.66%, var(--rise) 66.66%); }
.jn-col dd.op { color: color-mix(in srgb, #0f9b4f 85%, var(--fg)); }
/* progress ring target tick, flow diagram and screens morph use --data already */
.d-ring .fg { stroke: var(--data); }
.after .mini.keep b { background: var(--data); }

/* ───────── Highlighter pen (sweeps in once, slightly uneven like a real marker) ───────── */
.prose mark {
  color: inherit;
  padding: 0 2px;
  margin: 0 -2px;
  border-radius: 3px 6px 4px 5px / 6px 3px 6px 3px;
  background: linear-gradient(100deg, rgba(var(--mark), calc(var(--mark-a) * 0.7)), rgba(var(--mark), var(--mark-a)) 6%, rgba(var(--mark), calc(var(--mark-a) * 0.85)) 94%, rgba(var(--mark), calc(var(--mark-a) * 0.5))) no-repeat 0 60% / 0% 78%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
}
.prose mark.inked { background-size: 100% 78%; }

/* ───────── Handwritten margin notes ───────── */
.has-note { position: relative; }
.mnote { position: absolute; left: calc(100% + 18px); top: 0; bottom: 0; width: 210px; display: flex; align-items: center; gap: 10px; pointer-events: none; color: color-mix(in srgb, var(--fg) 72%, transparent); }
.mnote svg { flex: none; width: 13px; height: 100%; overflow: visible; }
.mnote path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mnote em { font: 400 16px/1.25 'Mynerve', 'Bradley Hand', cursive; font-style: normal; opacity: 0; transform: translateX(-4px); }
.inked > .mnote path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s cubic-bezier(0.65, 0, 0.35, 1); }
.inked > .mnote em { opacity: 1; transform: none; transition: opacity 0.4s 0.45s ease, transform 0.5s 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
/* on figures: an arrow from the note back toward the card, near the top */
.mnote.fig { top: 34px; bottom: auto; height: 46px; align-items: flex-start; }
.mnote.fig svg { width: 46px; height: 32px; order: 0; }
.mnote.fig em { margin-top: -4px; }
/* only where there's room in the right margin; otherwise notes are dropped and the highlights carry the emphasis */
/* no room in the margin: the note sits under its paragraph or figure, a short handwritten line with a tick */
@media (max-width: 1099px) {
  .mnote, .mnote.fig { position: static; display: block; width: auto !important; height: auto; margin: 10px 0 0; padding-left: 12px; border-left: 1.5px solid currentColor; }
  .mnote svg { display: none; }
  .mnote em { display: block; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .prose mark, .mnote path, .mnote em { transition: none !important; } }

/* ───────── Fund management walkthrough, rebuilt in code (fm-dash) ───────── */
.stage-fm-dash { padding: 0; }
.fmd-view { position: relative; aspect-ratio: var(--ar); overflow: hidden; background: #f7f8fa; }
.fmd-cam { position: absolute; left: 0; top: 0; width: 820px; transform-origin: 0 0; transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1); will-change: transform; }
.fmd-app {
  position: relative; width: 820px; height: 1000px; background: #f7f8fa; color: #2f3447;
  font: 400 12px/1.35 Inter, system-ui, sans-serif; letter-spacing: 0;
  transition: opacity 0.4s var(--ease-out);
}
.fmd-app.fade { opacity: 0; }
.fmd-app small { display: block; color: #8b90a0; font-size: 10.5px; }
.fmd-app b { font-weight: 500; }
.fmd-av { display: inline-block; flex: none; width: 24px; height: 24px; border-radius: 50%; background: url(work/media/fm-avatars.webp) 0 0 / 1400% 100% no-repeat; }
.fmd-i { width: 9px; height: 9px; vertical-align: -1px; } .fmd-i circle { fill: #6b7083; } .fmd-i path { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.fmd-caret { width: 11px; height: 11px; fill: none; stroke: #6b7083; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fmd-nav { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid #e7e8ee; }
.fmd-org { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 6px; border: 1px solid #e3e4ea; border-radius: 99px; background: #fff; font-weight: 500; }
.fmd-org > i { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; box-shadow: 0 0 0 1px #eee; font-size: 8px; font-weight: 600; line-height: 1; font-style: normal; color: #f08c1a; }
.fmd-tabs { position: relative; display: flex; gap: 4px; }
.prose .fmd-app a, .fmd-tabs a { text-decoration: none; background: none; border: 0; }
.fmd-app.snap, .fmd-app.snap * { transition: none !important; }
.fmd-tabs a { position: relative; z-index: 1; padding: 6px 12px; color: #4f5468; transition: color 0.2s; }
.fmd-tabs a.on, .fmd-tabs a.hover { color: #23273a; }
.fmd-pill { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px #e3e4ea; transition: left 0.35s var(--ease-out), width 0.35s var(--ease-out); }
.fmd-tabs a.press { transform: scale(0.97); }
.fmd-me { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 3px; border: 1px solid #e3e4ea; border-radius: 99px; background: #fff; }
.fmd-me .fmd-av { width: 21px; height: 21px; }
.fmd-me svg { width: 12px; height: 12px; stroke: #8b90a0; stroke-width: 1.2; }

.fmd-page { position: absolute; left: 24px; right: 24px; top: 68px; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.fmd-page.on { opacity: 1; visibility: visible; transition: opacity 0.25s var(--ease-out); }
.fmd-rp { translate: 0 6px; transition: opacity 0.2s, translate 0.3s var(--ease-out), visibility 0s 0.2s; }
.fmd-rp.on { translate: 0 0; transition: opacity 0.25s var(--ease-out), translate 0.35s var(--ease-out); }
.fmd-card { background: #fff; border: 1px solid #e8e9ee; border-radius: 14px; }
.fmd-ov { display: grid; grid-template-columns: 214px 1fr; gap: 14px; align-items: start; }

.fmd-side { padding: 16px 14px; }
.fmd-search { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px; background: #f3f4f7; color: #9a9eae; }
.fmd-search svg { width: 13px; height: 13px; fill: none; stroke: #8b90a0; stroke-width: 1.4; stroke-linecap: round; }
.fmd-rule { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; color: #8b90a0; font-size: 11px; }
.fmd-rule::after { content: ''; flex: 1; height: 1px; background: #eceef2; order: 1; }
.fmd-add { order: 2; padding: 3px 7px; border-radius: 3px; background: #5b2ff2; color: #fff; font-size: 10.5px; }
.fmd-side ul { margin: 0; padding: 0; list-style: none; }
.fmd-side li { display: flex; align-items: center; gap: 9px; height: 40px; }
.fmd-side li span { flex: 1; min-width: 0; } .fmd-side li b { display: block; color: #5d6276; font-weight: 400; white-space: nowrap; } .fmd-side li small { color: #3a3f52; font-size: 10px; }
.fmd-side li em { font-style: normal; color: #5d6276; font-size: 11px; }

.fmd-main { padding: 18px 22px 20px; }
.fmd-top { display: flex; align-items: center; gap: 9px; }
.fmd-toggle { width: 30px; height: 16px; border-radius: 99px; background: #5b2ff2; padding: 2px; } .fmd-toggle i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.fmd-hide { flex: 1; color: #6b7083; font-size: 11.5px; }
.fmd-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 6px; background: linear-gradient(#6a3cf7, #5626ee); box-shadow: 0 0 0 1px #4b1fd9 inset, 0 1px 2px rgba(60, 20, 200, 0.25); color: #fff; font-size: 11.5px; }
.fmd-btn svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.fmd-stats { display: grid; grid-template-columns: 1.1fr 1.1fr 0.7fr; margin: 16px -22px 0; padding: 0 22px 16px; border-bottom: 2px solid #eef0f3; }
.fmd-stats div { padding-left: 8px; border-left: 2px solid #8b90a0; }
.fmd-stats small { margin-bottom: 4px; }
.fmd-stats b { font-size: 16px; color: #2f3447; }
.fmd-inc { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 16px; }
.fmd-inc b.big { display: block; margin-top: 4px; font-size: 20px; }
.fmd-select { display: inline-flex; align-items: center; gap: 18px; height: 26px; padding: 0 9px; border: 1px solid #e5e6eb; border-radius: 5px; color: #6b7083; font-size: 11px; }

.fmd-chart { position: relative; margin: 14px 0 0 44px; height: 150px; }
.fmd-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fmd-y { position: absolute; left: -46px; top: -6px; bottom: -6px; display: flex; flex-direction: column; justify-content: space-between; color: #6b7083; font-size: 10px; text-align: right; width: 38px; }
.fmd-chart .grid { stroke: #d5d8e0; stroke-width: 1; stroke-dasharray: 1.5 3; vector-effect: non-scaling-stroke; }
.fmd-chart .guide { stroke: #d9dbe2; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.3s; }
.fmd-chart .ln { fill: none; stroke: #6a43ff; stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fmd-chart .area { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.fmd-x { display: flex; justify-content: space-between; margin-top: 10px; color: #4f5468; font-size: 10px; }
.fmd-tip { position: absolute; z-index: 2; margin: -50px 0 0 4px; padding: 6px 10px 7px; min-width: 88px; background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px #edeef2, 0 6px 16px -6px rgba(30, 30, 60, 0.18);
  opacity: 0; transform: translateY(4px) scale(0.97); transform-origin: 0 100%; transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out); }
.fmd-tip b { font-size: 12.5px; }
.fmd-app.drawn .ln { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s cubic-bezier(0.45, 0, 0.2, 1); }
.fmd-app.drawn .area { opacity: 1; transition-delay: 0.9s; }
.fmd-app.drawn .guide { opacity: 1; transition-delay: 1.5s; }
.fmd-app.drawn .fmd-tip { opacity: 1; transform: none; transition-delay: 1.55s; }

.fmd-rev { margin: 24px -22px 0; padding: 18px 22px 0; border-top: 2px solid #eef0f3; }
.fmd-h { margin: 0 0 10px; color: #4f5468; font-size: 11.5px; }
.fmd-seg, .fmd-sbar { display: flex; gap: 3px; }
.fmd-seg i, .fmd-sbar i { height: 3px; border-radius: 2px; background: var(--c); width: 0; transition: width 0.7s var(--ease-out); transition-delay: calc(var(--k) * 70ms); }
.fmd-app.rev .fmd-seg i { width: calc(var(--w) - 3px); }
.fmd-rev table, .fmd-rt { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 11px; }
.fmd-rev th, .fmd-rt th { text-align: left; font-weight: 400; color: #6b7083; font-size: 10px; padding: 7px 8px; background: #f6f7f9; }
.fmd-rev td { padding: 8px; color: #6b7083; }
.fmd-rev td i { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 1px; vertical-align: 1px; }
.fmd-rev tbody tr { opacity: 0; transition: opacity 0.35s var(--ease-out); }
.fmd-rev tbody tr:nth-child(2) { background: #f6f7f9; }
.fmd-app.rev .fmd-rev tbody tr { opacity: 1; }
.fmd-app.rev .fmd-rev tbody tr:nth-child(1) { transition-delay: 0.25s; }
.fmd-app.rev .fmd-rev tbody tr:nth-child(2) { transition-delay: 0.31s; }
.fmd-app.rev .fmd-rev tbody tr:nth-child(3) { transition-delay: 0.37s; }

.fmd-rcard { padding: 22px 26px 10px; }
.fmd-rhead { display: flex; justify-content: space-between; align-items: center; }
.fmd-rhead h4 { margin: 0; font-size: 17px; font-weight: 500; color: #2f3447; }
.fmd-rstats { display: flex; gap: 12px; margin: 18px -26px 0; padding: 0 26px 18px; border-bottom: 2px solid #eef0f3; }
.fmd-box { padding: 14px 16px; border: 1px solid #e8e9ee; border-radius: 6px; }
.fmd-box > small { padding-left: 7px; border-left: 2px solid #c9ccd5; margin-bottom: 6px; }
.fmd-box > b { font-size: 16px; }
.fmd-status { width: 300px; padding: 12px 12px 10px; }
.fmd-sbar i { height: 3px; }
.fmd-app.rp-in .fmd-sbar i { width: calc(var(--w) * 1.0 - 2px); transition-delay: calc(0.15s + var(--k) * 90ms); }
.fmd-chips { display: flex; gap: 8px; margin-top: 12px; }
.fmd-chips span { flex: 1; padding: 5px 8px; border: 1px solid #e3e4ea; border-radius: 4px; border-left: 0; box-shadow: inset 2px 0 0 var(--c); font-size: 11px; color: #3a3f52; }
.fmd-chips small { font-size: 9px; }
.fmd-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.fmd-all { color: #6b7083; font-size: 11px; }
.fmd-tools .fmd-search { flex: none; width: 300px; border-radius: 5px; border: 1px solid #e3e4ea; }
.fmd-rt th:first-child { border-radius: 6px 0 0 6px; } .fmd-rt th:last-child { border-radius: 0 6px 6px 0; }
.fmd-rt td { padding: 15px 8px; color: #4f5468; white-space: nowrap; }
.fmd-rt td:first-child { white-space: normal; }
.fmd-rt td b { font-weight: 600; color: #3a3f52; }
.fmd-chip { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 10px; }
.fmd-chip.closed { background: #e0f2ea; color: #2f6f52; } .fmd-chip.processing { background: #fdebb8; color: #7a5300; }
.fmd-rt tbody tr { opacity: 0; translate: 0 4px; transition: opacity 0.3s var(--ease-out), translate 0.35s var(--ease-out); }
.fmd-app.rp-in .fmd-rt tbody tr { opacity: 1; translate: 0 0; transition-delay: calc(0.35s + var(--k) * 55ms); }

.fmd-cursor { position: absolute; left: 0; top: 0; z-index: 5; width: 13px; height: 18px; margin: -1px 0 0 -1px; opacity: 0; transition: opacity 0.2s, scale 0.1s var(--ease-out); transform-origin: 2px 2px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.3)); pointer-events: none; }
.fmd-cursor path { fill: #111; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.fmd-cursor.show { opacity: 1; }
.fmd-cursor.down { scale: 0.88; }
@media (prefers-reduced-motion: reduce) { .fmd-cam, .fmd-app * { transition: none !important; } }

/* a small label directly above a section heading belongs to it; a divider right under a heading repeats its hairline */
.prose h3 + h2 { margin-top: 10px; }
.prose h2 + hr { display: none; }
.prose h2 + hr + * { margin-top: 20px; }

/* screens open full size on click */
.g-kind-screens .g-slide { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 19, 18, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: zoom-out; }
.lb img { position: fixed; display: block; max-width: none; border-radius: 10px; transform-origin: 0 0; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); background: #fff; }
.lb-close { all: unset; position: fixed; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; transition: opacity 0.15s, background-color 0.2s; }
.lb-close:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Process map, drawn in code */
.pm-fig .pm { display: block; width: 100%; height: auto; padding: 24px 12px 20px; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pm text { font-family: Inter, system-ui, sans-serif; text-anchor: middle; }
.pm .pm-t { font-size: 11.5px; font-weight: 500; }
.pm .pm-s { font-size: 10.5px; opacity: 0.8; }
.pm .pm-c { font-size: 9.5px; font-weight: 500; }
.pm .pm-n { font-size: 10px; fill: #8a8d99; }

/* Solution architecture, drawn in code */
.ar-fig .ar { display: block; width: 100%; height: auto; padding: 8px 0; box-sizing: border-box; background: var(--frame); border: 1px solid var(--line); border-radius: 12px; }
.ar text { font-family: Inter, system-ui, sans-serif; }
.ar .ar-root { font-size: 12.5px; font-weight: 600; fill: #23273a; }
.ar .ar-num { font-size: 10.5px; font-weight: 600; fill: #5b2ff2; font-variant-numeric: tabular-nums; }
.ar .ar-head { font-size: 12.5px; font-weight: 600; fill: #23273a; }
.ar .ar-row { font-size: 11.5px; fill: #3d4152; }
.ar .ar-sub { fill: #6b7083; }

/* A detailed original, set on the frame like every other figure; click to see it full size */
.map-frame { padding: 14px; background: var(--frame); border: 1px solid var(--line); border-radius: 12px; }
.prose figure.map-fig img { display: block; box-sizing: border-box; width: 100%; height: auto; padding: 0; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 20, 40, 0.06), 0 6px 18px -10px rgba(20, 20, 40, 0.25); cursor: zoom-in; opacity: 1; filter: none; transform: none; }

/* Bank9ja low-fi contact sheet, drawn in code */
.lf-fig .lf { display: block; width: 100%; height: auto; background: var(--frame); border: 1px solid var(--line); border-radius: 12px; }
.lf text { font-family: Inter, system-ui, sans-serif; }
.lf .lf-k, .lf .lf-n { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; fill: #9a9894; }
.lf .lf-n { font-size: 10px; }
.lf .lf-h { font-size: 15px; font-weight: 600; fill: #2a2a2a; }
.lf .lf-s { font-size: 9.5px; fill: #9a9894; }
.lf .lf-v { font-size: 10.5px; fill: #2a2a2a; }
.lf .lf-b { font-size: 11px; font-weight: 500; fill: #fff; }

/* Bank9ja onboarding flow, drawn in code */
.ob-fig .ob { display: block; width: 100%; height: auto; background: var(--frame); border: 1px solid var(--line); border-radius: 12px; }
.ob text { font-family: Inter, system-ui, sans-serif; text-anchor: middle; }
.ob .ob-t { font-size: 11px; }
.ob .ob-q { font-size: 10.5px; fill: #3d4152; }
.ob .ob-c { font-size: 9.5px; font-weight: 500; }

/* Before / after: one large screen, a toggle, notes in the margins on green dotted leaders */
.stage-before-after { padding: 24px 0 36px; }
.ba { --g: #3f8a52; }
.ba-seg { position: relative; display: flex; width: max-content; margin: 0 auto 28px; padding: 3px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 7%, transparent); }
.ba-seg button { all: unset; position: relative; z-index: 1; padding: 5px 16px; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: color 0.2s; }
.ba-seg button[aria-selected='true'] { color: var(--fg); }
.ba-seg button:focus-visible { outline: 2px solid var(--data); outline-offset: 2px; border-radius: 99px; }
.ba-pill { position: absolute; top: 3px; bottom: 3px; border-radius: 99px; background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); transition: left 0.35s var(--ease-out), width 0.35s var(--ease-out); }
.ba-stage { --w: 214px; --gap: 24px; position: relative; width: var(--w); margin: 0 auto; }
.stage-before-after { overflow: clip; }
.ba-phone { position: relative; aspect-ratio: 600 / 1340; border-radius: 26px; overflow: hidden; background: #f8fafb; box-shadow: 0 0 0 3px #8e97ad, 0 18px 30px -14px rgba(30, 40, 60, 0.3); }
.prose figure .ba-phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top; margin: 0; border: 0; border-radius: 0; background: none; opacity: 0; filter: none; transform: none; transition: opacity 0.45s var(--ease-out), filter 0.3s; }
.ba[data-view='before'] .ba-phone img[data-k='before'], .ba[data-view='after'] .ba-phone img[data-k='after'] { opacity: 1; }
.ba.focusing .ba-phone img { filter: brightness(0.82) saturate(0.85); }
/* the lit band: the part of the screen the note is about, at full brightness */
.ba-glow { position: absolute; left: 4%; right: 4%; top: calc((var(--gy, 0.5) - var(--gh, 0.14) / 2) * 100%); height: calc(var(--gh, 0.14) * 100%); opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(20, 20, 20, 0), inset 0 0 0 2px var(--g); border-radius: 10px; transition: opacity 0.25s, top 0.4s var(--ease-out), height 0.4s var(--ease-out); backdrop-filter: brightness(1.22) saturate(1.18); -webkit-backdrop-filter: brightness(1.22) saturate(1.18); }
.ba.focusing .ba-glow { opacity: 1; }

/* margin notes: text outside the phone, a dotted leader in, a dot on the screen */
.ba-note { all: unset; position: absolute; top: calc(var(--y) * 100%); width: 136px; cursor: pointer; display: none; }
.ba[data-view='before'] .ba-note[data-v='before'], .ba[data-view='after'] .ba-note[data-v='after'] { display: block; }
.ba-note.l { right: calc(100% + var(--gap)); text-align: right; }
.ba-note.r { left: calc(100% + var(--gap)); }
.ba-text { display: block; translate: 0 -50%; font-size: 12px; line-height: 1.5; color: var(--fg); opacity: 0.72; transition: opacity 0.2s; }
.ba-text b { display: inline-grid; place-items: center; width: 16px; height: 16px; margin: 0 6px 0 0; border-radius: 50%; background: var(--g); color: #fff; font-size: 9.5px; font-weight: 600; vertical-align: 1px; }
.ba-note.l .ba-text b { margin: 0 0 0 6px; float: right; }
.ba-lead { position: absolute; top: 0; height: 0; border-top: 1.5px dotted var(--g); }
.ba-note.l .ba-lead { left: calc(100% + 4px); width: calc(var(--gap) - 4px + var(--x) * var(--w)); }
.ba-note.r .ba-lead { right: calc(100% + 4px); width: calc(var(--gap) - 4px + (1 - var(--x)) * var(--w)); }
.ba-dot { position: absolute; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 2px #fff; transition: scale 0.2s var(--ease-out); }
.ba-note.l .ba-dot { left: calc(100% + var(--gap) + var(--x) * var(--w) - 5px); }
.ba-note.r .ba-dot { right: calc(100% + var(--gap) + (1 - var(--x)) * var(--w) - 5px); }
.ba-note.on .ba-text, .ba-note:hover .ba-text, .ba-note:focus-visible .ba-text { opacity: 1; }
.ba-note.on .ba-dot { scale: 1.35; }
.ba-note:focus-visible .ba-text { outline: 2px solid var(--data); outline-offset: 3px; border-radius: 4px; }
.ba-list { display: none; }

/* narrow: numbered dots on the screen, notes listed under it */
@media (max-width: 560px) {
  .ba-stage { --w: min(260px, 72vw); }
  .ba-note { width: 0; }
  .ba-note .ba-text, .ba-note .ba-lead { display: none; }
  .ba-note.l, .ba-note.r { left: calc(var(--x) * 100%); right: auto; }
  .ba-note.l .ba-dot, .ba-note.r .ba-dot { left: -5px; right: auto; }
  .ba-list { display: grid; gap: 8px; margin: 18px 16px 0; padding: 0; list-style: none; font-size: 12.5px; }
  .ba-list li { display: none; gap: 8px; cursor: pointer; opacity: 0.75; }
  .ba[data-view='before'] .ba-list li[data-v='before'], .ba[data-view='after'] .ba-list li[data-v='after'] { display: flex; }
  .ba-list li.on { opacity: 1; }
  .ba-list b { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--g); color: #fff; font-size: 9.5px; }
}

/* Low-fi sheet, animated: the highlight walks the frames, the big frame shows each screen */
.stage-lowfi { padding: 0; border: 0; background: none; }
.lf .lf-logo { font-size: 20px; font-weight: 600; fill: #2a2a2a; letter-spacing: -0.01em; }
.lf .lf-key { font-size: 13px; fill: #2a2a2a; }
.lf .lf-th { cursor: pointer; outline: none; }
.lf .lf-card { transition: stroke 0.3s ease, stroke-width 0.3s ease; }
.lf .lf-th.on .lf-card { stroke: #3c82f7; stroke-width: 1.4; }
.lf .lf-th .lf-n { transition: fill 0.3s ease; }
.lf .lf-th.on .lf-n { fill: #3c82f7; }
@media (hover: hover) { .lf .lf-th:not(.on):hover .lf-card { stroke: #b9b8b4; } }
.lf .lf-th:focus-visible .lf-card { stroke: #3c82f7; stroke-dasharray: 3 2; }
.lf .lf-cur, .lf .lf-num { fill: #3c82f7; }
.lf .lf-wire { transition: d 0.45s cubic-bezier(0.45, 0, 0.1, 1); }
.lf .lf-from { transition: cx 0.45s cubic-bezier(0.45, 0, 0.1, 1), cy 0.45s cubic-bezier(0.45, 0, 0.1, 1); }
/* a screen leaves at once; the next one's parts rise in, one after another */
.lf .lf-pg { pointer-events: none; }
.lf .lf-p { opacity: 0; transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease; }
.lf .lf-pg.on .lf-p { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1); transition-delay: calc(0.12s + var(--k) * 70ms); }
/* each screen's one small moment */
.lf .lf-pin { opacity: 0; }
.lf .lf-pg.on .lf-pin { animation: lf-pin 0.2s ease forwards; }
.lf .lf-pg.on .lf-pin0 { animation-delay: 0.8s; } .lf .lf-pg.on .lf-pin1 { animation-delay: 1.05s; }
.lf .lf-pg.on .lf-pin2 { animation-delay: 1.3s; } .lf .lf-pg.on .lf-pin3 { animation-delay: 1.55s; }
@keyframes lf-pin { from { opacity: 0; } to { opacity: 1; } }
.lf .lf-radio { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.lf .lf-pg.on .lf-radio { animation: lf-pop 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) 0.9s forwards; }
.lf .lf-opt-on { transition: stroke 0.3s ease 0.9s; }
.lf .lf-pg.on .lf-opt-on { stroke: #2a2a2a; }
@keyframes lf-pop { to { transform: scale(1); } }
.lf .lf-typed { clip-path: inset(0 100% 0 0); }
.lf .lf-pg.on .lf-typed { animation: lf-type 0.9s steps(12) 0.85s forwards; }
@keyframes lf-type { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .lf .lf-p, .lf .lf-pin, .lf .lf-radio, .lf .lf-typed { transition: none; animation: none; opacity: 1; transform: none; clip-path: none; } }
.d-trend .sparks circle { fill: var(--rise); }

/* ── Easing pass for the phone demos ──
 * The camera travels with ease-in-out-cubic: a gentle start and a gentle landing, never a drop.
 * Screens and controls arriving use ease-out-quart/quint; small state changes (toggles, fills) ease-out-cubic. */
.mt-cam { transition: transform 0.7s var(--ease-out-cubic); } /* responds at once, lands softly: no lag at the start, no drop at the end */
.mt-input .mt-box { transition: transform 0.55s var(--ease-in-out-cubic), min-height 0.5s var(--ease-out-quart), border-color 0.3s var(--ease-out-cubic), box-shadow 0.3s var(--ease-out-cubic); }
.mt-amap { transition: clip-path 0.65s var(--ease-in-out-cubic); }
.mt-world { transition: transform 0.7s var(--ease-in-out-cubic); }
.mt-canvas { transition: opacity 0.4s var(--ease-out-quad); }
/* the fingertip lifts away whenever the view moves */
.d-touch.lifted { opacity: 0 !important; transition: none !important; }
.d-touch.lifted::after { animation: none; }
/* the caret holds still while keys are going, and blinks only when the typing stops */
.keying .caret, .keying .d-field .caret { animation: none; opacity: 1; }

/* screen changes after a button: soften out quickly, come back gently while the camera glides up */
.mt-canvas { transition: opacity 0.4s var(--ease-out-quart); }
.mt-canvas.dip { opacity: 0.4; transition: opacity 0.12s var(--ease-out-quad); }
/* the keyboard slides away on the same curve the camera glides on */
.typing.kb-off .mt-kb { transition: transform 0.5s var(--ease-in-out-cubic); }

/* loop seam: the reset is instant and hidden; only the fade back in is seen */
.stage.snap, .stage.snap * { transition: none !important; animation: none !important; }
.mt-canvas.veil, .d-screen.veil:not(.mt-screen) { opacity: 0 !important; }
.mt-canvas { transition: opacity 0.4s var(--ease-out-quart); }
/* Finish takes exactly Continue's place: same bottom, same height */
.mt-done .mt-btn { bottom: 29px; height: 48px; }

/* Save pin pops the edit screen; the confirm page underneath takes its final state with no morph */
.nomorph, .nomorph * { transition: none !important; }
.mt-ghost { pointer-events: none; }
.wc-phone .mt-canvas { border-radius: 44px; overflow: hidden; } /* the source screenshots have square white corners; match the screen's radius */
.wc-amount span { font-size: 40px; letter-spacing: -1px; transform: translateY(2px); transition: none; } /* one size that fits the largest amount, so typing never makes it shrink */

/* Project cards that float with the cursor (after joshpuckett.me): one white card, a soft light shadow */
.hcard { position: fixed; left: 0; top: 0; z-index: 60; width: 190px; aspect-ratio: 1000 / 622; /* a print: 5:3 photo in a thin, even border */ pointer-events: none; visibility: hidden; }
.hcard.live { visibility: visible; will-change: transform; }
.hcard-layer, .hcard-stack { position: absolute; inset: 0; }
.hcard-stack { opacity: 0; transform: scale(0.1); }
/* one picture per project, each at its own tilt; switching shrinks one away as the next grows in */
.hcard-item { position: absolute; inset: 0; border-radius: 3px;
  opacity: 0; transform: scale(0.5) rotate(var(--tilt));
  transition: opacity 0.22s var(--ease-out-quad), transform 0.3s var(--ease-out-cubic); }
.hcard-item.on { opacity: 1; transform: rotate(var(--tilt)); }
.hcard-item.instant { transition: none; }
@media (prefers-reduced-motion: reduce) { .hcard { display: none; } }

/* ───────── Split bar ───────── */
.d-split { padding: 34px 28px 28px; }
.d-split-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--fg) 5%, transparent); }
.d-split-bar i { flex: none; width: 0; height: 100%; background: var(--base); transition: width 1s var(--ease-out-cubic); }
.d-split-bar i.accent { background: var(--data); }
.d-split.on .d-split-bar i { width: var(--w); }
.d-split.on .d-split-bar i + i { transition-delay: 0.35s; }
.d-split-legend { display: flex; margin-top: 14px; }
.d-split-legend p { flex: none; width: var(--w); margin: 0; padding-right: 12px; opacity: 0; transform: translateY(4px); transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out-cubic); }
.d-split.on .d-split-legend p { opacity: 1; transform: none; transition-delay: 0.5s; }
.d-split.on .d-split-legend p + p { transition-delay: 0.8s; }
.d-split-legend b { display: block; font-weight: 500; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.d-split-legend p.accent b { color: var(--data); }
.d-split-legend span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .d-split-bar i, .d-split-legend p { transition: none; } }

/* ───────── Writing covers (covers.js): attio-style geometric sketches ───────── */
.stage-cover { padding: 0 !important; }
.cv { display: block; width: 100%; height: auto; background: var(--bg); border-radius: 11px;
  --cv-line: color-mix(in srgb, var(--fg) 10%, transparent); --cv-guide: color-mix(in srgb, var(--fg) 18%, transparent);
  --cv-dotc: color-mix(in srgb, var(--fg) 22%, transparent); --cv-hatch: color-mix(in srgb, var(--fg) 13%, transparent);
  --cv-ink: color-mix(in srgb, var(--fg) 52%, transparent); --cv-bar: color-mix(in srgb, var(--fg) 12%, transparent); }
.cv .cv-line { fill: none; stroke: var(--cv-line); stroke-width: 1; }
.cv .cv-dot { fill: var(--cv-dotc); }
.cv .cv-hl { stroke: var(--cv-hatch); stroke-width: 1.1; }
.cv .cv-dash { fill: none; stroke: var(--cv-guide); stroke-width: 1; stroke-dasharray: 4 4; }
.cv .cv-ink { fill: none; stroke: var(--cv-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.cv .cv-ink-fill { fill: var(--cv-ink); }
.cv .cv-card, .cv .cv-node { fill: var(--bg); stroke: var(--cv-ink); stroke-width: 1.3; }
.cv .cv-shadow { stroke: var(--cv-line); }
.cv .cv-bar { fill: var(--cv-bar); }
.cv .cv-acc { fill: none; stroke: var(--data); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cv .cv-card.cv-acc { fill: color-mix(in srgb, var(--data) 7%, var(--bg)); }
.cv .cv-acc-fill { fill: var(--data); }
.cv .cv-faint { opacity: 0.45; }
.cv .cv-dashed { stroke-dasharray: 5 4; fill: color-mix(in srgb, var(--data) 5%, transparent); }
.cv .cv-thin { stroke-width: 0.8; opacity: 0.55; }
.cv .cv-mono { font: 500 9.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.6px; fill: var(--muted); }
.cv * { transform-box: fill-box; }

/* valeent: wishes travel in, the card beats, one thanks travels back out */
.cv .cv-move { offset-rotate: 0deg; opacity: 0; }
.cv.on .cv-move { animation: cv-in 2.7s cubic-bezier(0.4, 0, 0.2, 1) var(--d) infinite; }
@keyframes cv-in { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.cv .cv-beat { transform-origin: center; }
.cv.on .cv-beat { animation: cv-beat 2.7s ease-in-out infinite; }
@keyframes cv-beat { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.18); } 88% { transform: scale(0.96); } }
.cv .cv-reply { stroke-dasharray: 1; stroke-dashoffset: 0; }
.cv.on .cv-reply { animation: cv-draw 5.4s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-draw { 0%, 35% { stroke-dashoffset: 1; opacity: 1; } 70%, 88% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* react one: one brick cracks, slides out; a new one slides in and settles into the wall */
.cv .cv-in { opacity: 0; }
.cv .cv-out path { opacity: 0; }
.cv.on .cv-out { animation: cv-brick-out 6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.cv.on .cv-out path { animation: cv-crack 6s linear infinite; }
.cv.on .cv-in { animation: cv-brick-in 6s cubic-bezier(0.22, 1, 0.36, 1) infinite; }
.cv.on .cv-in rect { animation: cv-settle 6s ease infinite; }
@keyframes cv-crack { 0%, 15% { opacity: 0; } 22%, 100% { opacity: 1; } }
@keyframes cv-brick-out { 0%, 30% { transform: none; opacity: 1; } 48%, 100% { transform: translateX(240px); opacity: 0; } }
@keyframes cv-brick-in { 0%, 50% { transform: translateX(240px); opacity: 0; } 72%, 100% { transform: none; opacity: 1; } }
@keyframes cv-settle { 0%, 84% { stroke: var(--data); fill: color-mix(in srgb, var(--data) 7%, var(--bg)); } 100% { stroke: var(--cv-ink); fill: var(--bg); } }

/* rereading old research: a scan passes, two old lines light up and connect to a new insight */
.cv .cv-scan { opacity: 0; }
.cv.on .cv-scan { animation: cv-scan 6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes cv-scan { 0% { transform: none; opacity: 0; } 4% { opacity: 1; } 46% { transform: translateY(198px); opacity: 1; } 52%, 100% { transform: translateY(198px); opacity: 0; } }
.cv.on .cv-hit.a { animation: cv-hit-a 6s ease infinite; }
.cv.on .cv-hit.b { animation: cv-hit-b 6s ease infinite; }
@keyframes cv-hit-a { 0%, 15% { fill: var(--cv-bar); } 19%, 90% { fill: var(--data); } 100% { fill: var(--cv-bar); } }
@keyframes cv-hit-b { 0%, 29% { fill: var(--cv-bar); } 33%, 90% { fill: var(--data); } 100% { fill: var(--cv-bar); } }
.cv .cv-link { stroke-dasharray: 1; }
.cv.on .cv-link.a { animation: cv-link 6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.cv.on .cv-link.b { animation: cv-link 6s cubic-bezier(0.65, 0, 0.35, 1) 0.3s infinite; }
@keyframes cv-link { 0%, 50% { stroke-dashoffset: 1; opacity: 1; } 64%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.cv .cv-pop { transform-origin: center; }
.cv-research.on .cv-pop { animation: cv-pop-r 6s cubic-bezier(0.34, 1.5, 0.64, 1) infinite; }
@keyframes cv-pop-r { 0%, 64% { transform: scale(0); } 72%, 90% { transform: none; } 100% { transform: scale(0); } }

/* feeling the problem first: the feature drops in, cut to the shape of the problem */
.cv.on .cv-drop { animation: cv-drop 5s cubic-bezier(0.34, 1.25, 0.64, 1) infinite; }
@keyframes cv-drop { 0%, 12% { transform: translateY(-96px); opacity: 0; } 20% { opacity: 1; } 42%, 84% { transform: none; opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }

/* borrowed assumptions: the borrowed grid keeps shifting, never fitting */
.cv .cv-try { transform-origin: center; }
.cv.on .cv-try { animation: cv-try 9s ease-in-out infinite alternate; }
@keyframes cv-try { 0% { transform: translate(-70px, -14px) rotate(-5deg); } 35% { transform: translate(36px, 18px) rotate(4deg); } 70% { transform: translate(-10px, 24px) rotate(-2deg); } 100% { transform: translate(60px, -18px) rotate(3deg); } }

/* first design sprint: the week runs; on Wednesday something new arrives and the plan forks */
.cv .cv-walk { offset-rotate: 0deg; opacity: 0; }
.cv.on .cv-walk { animation: cv-walk 6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes cv-walk { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 84% { offset-distance: 100%; opacity: 1; } 92%, 100% { offset-distance: 100%; opacity: 0; } }
.cv .cv-fork { stroke-dasharray: 1; }
.cv.on .cv-fork { animation: cv-fork 6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-fork { 0%, 40% { stroke-dashoffset: 1; } 62%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
.cv.on .cv-plan { animation: cv-plan 6s ease infinite; }
@keyframes cv-plan { 0%, 42% { opacity: 1; } 56%, 92% { opacity: 0.25; } 100% { opacity: 1; } }
.cv-sprint.on .cv-pop { animation: cv-pop-s 6s cubic-bezier(0.34, 1.5, 0.64, 1) infinite; }
@keyframes cv-pop-s { 0%, 36% { transform: scale(0); } 44%, 92% { transform: none; } 100% { transform: scale(0); } }

/* first principles: the answer comes apart into its primitives, then goes back together */
.cv .cv-parts { opacity: 0; }
.cv.on .cv-p { animation: 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.cv.on .cv-p.sq { animation-name: cv-sq; } .cv.on .cv-p.tri { animation-name: cv-tri; } .cv.on .cv-p.ci { animation-name: cv-ci; } .cv.on .cv-p.ln { animation-name: cv-ln; }
.cv.on .cv-parts { animation: cv-parts 7s ease infinite; }
@keyframes cv-sq { 0%, 20%, 90%, 100% { transform: none; } 40%, 70% { transform: translateX(160px); } }
@keyframes cv-tri { 0%, 20%, 90%, 100% { transform: none; } 40%, 70% { transform: translate(250px, 64px); } }
@keyframes cv-ci { 0%, 20%, 90%, 100% { transform: none; } 40%, 70% { transform: translate(320px, 16px); } }
@keyframes cv-ln { 0%, 20%, 90%, 100% { transform: none; } 40%, 70% { transform: translate(160px, 0) scaleX(1.9); } }
@keyframes cv-parts { 0%, 30%, 80%, 100% { opacity: 0; } 42%, 70% { opacity: 1; } }

/* falling for your idea: the favourite lifts into the light, and the blind spot behind it grows */
.cv .cv-cone { transform-origin: 50% 0; }
.cv.on .cv-lift { animation: cv-lift 6s cubic-bezier(0.34, 1.2, 0.64, 1) infinite; }
.cv.on .cv-cone { animation: cv-cone 6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-lift { 0%, 10%, 92%, 100% { transform: none; } 32%, 80% { transform: translateY(-78px); } }
@keyframes cv-cone { 0%, 14%, 92%, 100% { transform: scaleY(0.15); opacity: 0.3; } 40%, 80% { transform: none; opacity: 1; } }
.cv-idea .cv-cone { transform: scaleY(0.15); }
.cv-idea .cv-lift { transform: none; }

/* wega: one interview is picked, carried across, and the day's card turns over */
.cv .cv-pick { transform-origin: center; }
.cv.on .cv-pick { animation: cv-pick 5s cubic-bezier(0.34, 1.5, 0.64, 1) infinite; }
@keyframes cv-pick { 0%, 6% { transform: scale(0); } 14%, 34% { transform: none; } 40%, 100% { transform: scale(0); } }
.cv .cv-carry { offset-rotate: 0deg; opacity: 0; }
.cv.on .cv-carry { animation: cv-carry 5s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-carry { 0%, 30% { offset-distance: 0%; opacity: 0; } 34% { opacity: 1; } 56% { offset-distance: 100%; opacity: 1; } 60%, 100% { offset-distance: 100%; opacity: 0; } }
.cv .cv-day { transform-origin: 50% 50%; }
.cv.on .cv-day { animation: cv-day 5s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-day { 0%, 56% { transform: none; } 64% { transform: scaleX(0.04); } 72%, 100% { transform: none; } }

/* systems: the rail draws in, then work flows along it into the box */
.cv .cv-rail { stroke-dasharray: 1; }
.cv.on .cv-rail { animation: cv-rail 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cv-rail { 0% { stroke-dashoffset: 1; } 22%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
.cv .cv-flow { offset-rotate: 0deg; opacity: 0; }
.cv.on .cv-flow { animation: cv-flow 3.6s linear calc(1.6s + var(--d)) infinite; }
@keyframes cv-flow { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* ───────── Polaroids (after ja.mt): the project covers, framed like prints. The same frame sits in the hover card
   and at the top of each case study, so one can fly into the other. ───────── */
.polaroid { box-sizing: border-box; background: #fdfdfb; padding: 2.75%; /* a thin, even border (after ja.mt) */ border-radius: 3px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 28px -12px rgba(0, 0, 0, 0.24); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 1.5px; }
:root[data-theme='dark'] .polaroid { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 14px 30px -12px rgba(0, 0, 0, 0.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .polaroid { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 14px 30px -12px rgba(0, 0, 0, 0.6); } }
.cs-cover { width: 100%; margin: 0 0 32px; view-transition-name: cover; } /* as wide as every other figure on the page */

/* the flight: the hover card's polaroid travels up and grows into the case study's, soft in the air, sharp on landing */
::view-transition-group(cover) { animation-duration: 0.72s; animation-timing-function: cubic-bezier(0.22, 0.9, 0.24, 1); z-index: 10; }
::view-transition-image-pair(cover) { isolation: auto; }
::view-transition-old(cover), ::view-transition-new(cover) { mix-blend-mode: normal; height: 100%; object-fit: fill; }
::view-transition-old(cover) { animation: cover-old 0.72s cubic-bezier(0.22, 0.9, 0.24, 1) both; }
::view-transition-new(cover) { animation: cover-new 0.72s cubic-bezier(0.22, 0.9, 0.24, 1) both; }
@keyframes cover-old { 0% { opacity: 1; filter: none; } 40% { opacity: 1; filter: blur(5px); } 60%, 100% { opacity: 0; filter: blur(3px); } }
@keyframes cover-new { 0%, 25% { opacity: 0; filter: blur(5px); } 55% { opacity: 1; filter: blur(4px); } 100% { opacity: 1; filter: none; } }

/* after a cover flight: hold the page back until the polaroid lands, then write it in beneath it */
.from-cover .p-title { view-transition-name: none !important; }
.from-cover #article .reveal { animation: none; }
.from-cover #article :is(.p-title, .post-head .muted, .prose > *, .post-side, .post-nav, .reveal) { opacity: 0; transform: translateY(6px); }
.from-cover.landed #article :is(.p-title, .post-head .muted, .prose > *, .post-side, .post-nav, .reveal) { opacity: 1; transform: none;
  transition: opacity 0.5s var(--ease-out) var(--k, 0ms), transform 0.6s var(--ease-out-cubic) var(--k, 0ms); }

/* closing: the polaroid flies back into its row, shrinking and tilting, and is gone as it arrives (after ja.mt) */
.row-ghost { position: absolute; left: 0; top: 50%; width: 44px; aspect-ratio: 1000 / 622; margin-top: -13.7px;
  transform: rotate(-5deg); opacity: 0; pointer-events: none; view-transition-name: cover; }
.closing::view-transition-group(cover) { animation-duration: 0.46s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.closing::view-transition-old(cover) { animation: cover-close 0.46s cubic-bezier(0.4, 0, 0.2, 1) both; }
.closing::view-transition-new(cover) { animation: none; opacity: 0; }
@keyframes cover-close { 0% { opacity: 1; filter: none; } 45% { filter: blur(2px); } 75% { opacity: 1; } 100% { opacity: 0; filter: blur(1px); } }

/* ───────── The flip: the case study polaroid turns over to its back ───────── */
.cs-cover { perspective: 1600px; }
.cs-cover[role='button'] { cursor: pointer; }
.cs-cover:focus-visible { outline: none; }
.cs-cover:focus-visible .face { box-shadow: 0 0 0 2px var(--data), 0 12px 28px -12px rgba(0, 0, 0, 0.24); }
.flip { position: relative; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.3, 1.25, 0.5, 1); }
.cs-cover.flipped .flip { transform: rotateY(180deg); }
.face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face-front { position: relative; }
.face-back { position: absolute; inset: 0; transform: rotateY(180deg); background: #fbfaf5; }
/* the only hint: a faint pencil mark in the strip, a little clearer when you hover */
.flip-hint { position: absolute; right: 5.5%; bottom: 6%; font: 400 17px/1 'Mynerve', 'Bradley Hand', cursive; color: #fff; opacity: 0.55; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: opacity 0.25s var(--ease-out), transform 0.4s var(--ease-out-cubic); }
.cs-cover:hover .flip-hint { opacity: 0.85; transform: rotate(40deg); }
/* the back: plain cream paper, a dashed guide, one line in pen */
.back-paper { position: absolute; inset: 0; border-radius: 2px; } /* plain cream: no dot grid */
/* the drawing: attio's construction language (hairline grid, dashed guides, a crosshair, one hatched part) */
.back-art { position: absolute; left: 0; top: 2%; width: 100%; height: 60%; overflow: hidden; } /* the drawing fits the top; the words sit below */
.back-art .g { stroke: rgba(60, 55, 45, 0.09); stroke-width: 1; fill: none; }
.back-art .d { stroke: rgba(60, 55, 45, 0.28); stroke-width: 1; stroke-dasharray: 4 4; fill: none; }
.back-art .k { stroke: #4b4944; stroke-width: 1.2; fill: none; }
.back-art .s { stroke: #4b4944; stroke-width: 1.4; fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.back-art .h { stroke: none; opacity: 0; }
.back-art pattern line { stroke: rgba(60, 55, 45, 0.3); stroke-width: 1; }
.cs-cover.flipped .back-art .s { stroke-dashoffset: 0; transition: stroke-dashoffset 1s cubic-bezier(0.65, 0, 0.35, 1) 0.4s; }
.cs-cover.flipped .back-art .h { opacity: 1; transition: opacity 0.5s var(--ease-out) 1.15s; }
.back-line { position: absolute; left: 7%; right: 9%; top: auto; bottom: 18%; transform: rotate(-1deg); margin: 0;
  font: 400 clamp(15px, 3.4vw, 19px)/1.3 'Mynerve', 'Bradley Hand', cursive; color: #33312c; text-wrap: balance; }
.back-meta { position: absolute; left: 7%; bottom: 7%; font: 400 13px/1 'Mynerve', 'Bradley Hand', cursive; color: #8b877d; transform: rotate(-1deg); }
@media (prefers-reduced-motion: reduce) { .flip, .back-art .s, .back-art .h { transition: none !important; } }


/* memoji dust: the canvas reaches past the circle so the dust can spill out; the crisp face hides while it moves */
.av-wrap { position: relative; width: 52px; height: 52px; margin-bottom: 14px; }
.av-wrap .avatar { margin-bottom: 0; }
.av-dust { position: absolute; left: -64px; top: -64px; width: 180px; height: 180px; pointer-events: none; z-index: 2; }
.av-face, .av-dust { transition: opacity 0.2s var(--ease-out); }
.av-wrap.dusting .av-face { opacity: 0; transition-duration: 0s; }
.av-wrap.dusting.handoff .av-face { opacity: 1; transition-duration: 0.2s; }
.av-wrap.handoff .av-dust { opacity: 0; }

/* hypotheses: one format across the site; the label, the statement, and (where known) what happened */
.prose .hyp { margin: 22px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--data); }
.prose .hyp-k { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.prose .hyp-r { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.prose blockquote:has(> .hyp) { border: 0; padding: 0; margin: 0; }

/* annotation ink: a touch darker than --muted, so notes and chart labels read clearly in both themes */
:root { --note-ink: color-mix(in srgb, var(--fg) 64%, var(--bg)); }
.d-bar-label { color: var(--note-ink); }

/* further reading as footnotes (after benji.org): small, quiet, linked */
.prose .further { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; color: var(--note-ink); }
.prose .further-k { margin: 0 0 8px; font-size: 12px; color: var(--note-ink); }
.prose .further ol { margin: 0; padding-left: 16px; display: grid; gap: 6px; }
.prose .further li { padding-left: 2px; }
.prose .further li::marker { font-size: 10px; font-variant-numeric: tabular-nums; }
.prose .further a { color: var(--fg); text-decoration: none; white-space: nowrap; }
.prose .further a:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--fg) 40%, transparent); }
.prose .further .ext { display: inline-block; margin: 0 1px 0 3px; vertical-align: -1px; color: var(--note-ink); }

/* no floating project cards on phone-sized layouts */
@media (max-width: 767px) { .hcard { display: none !important; } }

/* ───────── Handwriting (media/ink): her own notes, filled with the text colour so they follow the theme ───────── */
.ink { display: block; max-width: 100%; height: auto; background: currentColor;
  -webkit-mask: var(--m) left top / 100% 100% no-repeat; mask: var(--m) left top / 100% 100% no-repeat; }
/* margin notes: the ink writes itself in, left to right */
.mnote { width: min(290px, calc((100vw - 100%) / 2 - 36px)); }
.mnote em { min-width: 0; }
.mnote .ink { clip-path: inset(0 100% 0 0); }
.inked > .mnote .ink { clip-path: inset(0 0 0 0); transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.4s; }
/* polaroid backs */
.back-line .ink { max-width: 100%; }
.back-meta .ink { width: auto !important; height: 28px; }
/* field notes on the home page */
.field-notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; align-items: start; }
@media (max-width: 600px) { .field-notes { grid-template-columns: 1fr; } }
.field-notes a { display: grid; gap: 4px; justify-items: start; text-decoration: none; color: color-mix(in srgb, var(--fg) 86%, transparent); }
.field-notes .fn-src { font-size: 12px; color: var(--muted); transition: color 0.2s var(--ease-out); }
.field-notes a:hover .fn-src { color: var(--fg); }
.field-notes .fn-src::before { content: '— '; }
.field-key { margin: 22px 0 0; font-size: 12px; color: var(--muted); }
.field-key .ebar { display: inline-block; text-decoration: overline; text-decoration-thickness: 1px; text-underline-offset: 2px; color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .mnote .ink { clip-path: none !important; transition: none !important; } }
.field-notes li { min-width: 0; } .field-notes a { width: 100%; } .field-notes .ink { max-width: 100%; }
.field-notes a { grid-template-columns: minmax(0, 1fr); }

/* the note, picked up */
.snf-layer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.snf-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.snf { position: relative; width: min(470px, 100%); aspect-ratio: 4 / 3; color: var(--fg); outline: none; }
.snf-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.34, 1.15, 0.64, 1); }
.snf.flipped .snf-flip { transform: rotateY(180deg); }
.snf-face { position: absolute; inset: 0; box-sizing: border-box; display: grid; place-items: center; padding: 40px 34px 56px; border-radius: 6px;
  background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.snf-face { grid-template-columns: minmax(0, 1fr); }
.snf-face .ink { max-width: 100%; justify-self: center; }
.snf-back { transform: rotateY(180deg); place-items: center start; }
.snf-back p { margin: 0; font-family: 'Mynerve', cursive; font-size: 23px; line-height: 1.4; text-wrap: pretty; }
.snf-bar { position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-size: 12px; transition: opacity 0.2s ease; }
.snf-turn { justify-self: start; }
.snf-src { justify-self: end; }
.snf-nav { display: flex; align-items: center; gap: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.snf-nav[hidden] { display: none; }
.snf-prev, .snf-next { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 14px; color: var(--fg); cursor: pointer; transition: background-color 0.2s ease; }
.snf-prev:hover, .snf-next:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.snf-prev:focus-visible, .snf-next:focus-visible { outline: 1px solid var(--fg); outline-offset: 0; }
.snf { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.snf-layer.closing .snf-bar, .snf-layer.closing .snf-x { opacity: 0; }
.snf-x { transition: opacity 0.2s ease; }
.sticky-burn { position: absolute; pointer-events: none; z-index: 2; }
.snf-layer .sticky-burn { z-index: 3; }
.snf-turn { padding: 5px 12px; border: 0; border-radius: 99px; font: inherit; color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); cursor: pointer; transition: background-color 0.2s ease; }
.snf-turn:hover { background: color-mix(in srgb, var(--fg) 12%, transparent); }
.snf-src { color: var(--muted); text-decoration: none; }
.snf-src:hover { color: var(--fg); }
.snf-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; }
.snf-x svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.snf-x:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.snf-turn:focus-visible, .snf-src:focus-visible, .snf-x:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

/* shards from a burnt note can blow past the edge of the screen; never let them add sideways scroll */
html, body { overflow-x: clip; }

.snf-ghost { pointer-events: none; }
.snf-backdrop { z-index: 0; }

/* field notes set in Mynerve (while HANDWRITING is off in main.js) */
.snf-text { margin: 0; justify-self: start; font: 400 25px/1.38 'Mynerve', cursive; text-wrap: pretty; }
.snf-nav { grid-column: 2; }
.snf-src { grid-column: 3; }

/* a field note card: the note, then its context in plain words */
.snf { aspect-ratio: auto; height: 400px; }
.snf-face { place-items: center start; padding: 44px 40px 60px; }
.snf-body { display: grid; gap: 18px; }
.snf-text { font-size: 24px; line-height: 1.36; }
.snf-ctx { margin: 0; max-width: 44ch; font: 400 14px/1.6 Inter, system-ui, sans-serif; color: var(--muted); text-wrap: pretty; }
.snf-entry { grid-column: 1; justify-self: start; color: var(--muted); }
@media (max-width: 560px) {
  .snf { height: min(470px, 84vh); }
  .snf-face { padding: 40px 24px 60px; }
  .snf-text { font-size: 21px; }
  .snf-bar .snf-entry { display: none; }
}

/* a field note's small heading (its group) and who said it */
.snf-group { margin: 0 0 -6px; font: 500 11px/1.4 Inter, system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.snf-who { margin: -6px 0 0; font: 400 12px/1.5 Inter, system-ui, sans-serif; color: var(--muted); }
.snf-face { overflow-y: auto; overscroll-behavior: contain; }
