/* Dash website — proof of concept.
   Colours, type and card shapes come from the Dash app. */

/* ---------- Colour themes ----------
   The same five themes as the app (Email Dash: shared/services/theme.service.ts).
   Keep the values in sync with that file. Meadow, the green, is the default.
   `data-theme` on <html> picks one; the -rgb triplets feed translucent fills. */
:root,
:root[data-theme="meadow"] {
  --primary: #6e8f4c; --primary-strong: #556b3f; --primary-light: #86b55c;
  --primary-deep: #4a6a37; --primary-soft: #e8f0db; --primary-border: #ccd8bf;
  --accent: #906640; --theme-bg: #eef2e8; --text: #1f2a17;
  --primary-rgb: 110, 143, 76; --primary-strong-rgb: 85, 107, 63;
  --primary-light-rgb: 134, 181, 92; --primary-deep-rgb: 74, 106, 55; --text-rgb: 31, 42, 23;
  --leaf-tint: none;
}
:root[data-theme="ocean"] {
  --primary: #3f7fb0; --primary-strong: #2f5f86; --primary-light: #6ba8d8;
  --primary-deep: #2c5a80; --primary-soft: #dceaf4; --primary-border: #b6cfe2;
  --accent: #2f6d8c; --theme-bg: #e9f0f4; --text: #16242e;
  --primary-rgb: 63, 127, 176; --primary-strong-rgb: 47, 95, 134;
  --primary-light-rgb: 107, 168, 216; --primary-deep-rgb: 44, 90, 128; --text-rgb: 22, 36, 46;
  --leaf-tint: linear-gradient(rgba(63, 127, 176, .62), rgba(63, 127, 176, .62));
}
:root[data-theme="clay"] {
  --primary: #bf6f4a; --primary-strong: #8f5230; --primary-light: #d89067;
  --primary-deep: #8a4f30; --primary-soft: #f4e6dc; --primary-border: #e3c5b0;
  --accent: #8a5a3c; --theme-bg: #f4ece6; --text: #2e211a;
  --primary-rgb: 191, 111, 74; --primary-strong-rgb: 143, 82, 48;
  --primary-light-rgb: 216, 144, 103; --primary-deep-rgb: 138, 79, 48; --text-rgb: 46, 33, 26;
  --leaf-tint: linear-gradient(rgba(191, 111, 74, .6), rgba(191, 111, 74, .6));
}
:root[data-theme="plum"] {
  --primary: #8a5a9c; --primary-strong: #664079; --primary-light: #a87ab8;
  --primary-deep: #66457a; --primary-soft: #efe4f4; --primary-border: #d4bfe0;
  --accent: #6f5a8c; --theme-bg: #f1ecf4; --text: #291f2e;
  --primary-rgb: 138, 90, 156; --primary-strong-rgb: 102, 64, 121;
  --primary-light-rgb: 168, 122, 184; --primary-deep-rgb: 102, 69, 122; --text-rgb: 41, 31, 46;
  --leaf-tint: linear-gradient(rgba(138, 90, 156, .6), rgba(138, 90, 156, .6));
}
:root[data-theme="midnight"] {
  --primary: #4a6fa5; --primary-strong: #354f78; --primary-light: #7fa0e8;
  --primary-deep: #38547e; --primary-soft: #e6ecf6; --primary-border: #c3d0e4;
  --accent: #5a6a8c; --theme-bg: #eef0f4; --text: #1c2433;
  --primary-rgb: 74, 111, 165; --primary-strong-rgb: 53, 79, 120;
  --primary-light-rgb: 127, 160, 232; --primary-deep-rgb: 56, 84, 126; --text-rgb: 28, 36, 51;
  --leaf-tint: linear-gradient(rgba(34, 44, 66, .7), rgba(34, 44, 66, .7));
}

/* Site colours, worked out from the active theme */
:root {
  --bg: color-mix(in srgb, var(--theme-bg) 42%, #fff);
  --bg-2: var(--theme-bg);
  --surface: #fff;
  --ink: var(--text);
  --ink-2: color-mix(in srgb, var(--text) 78%, #fff);
  --muted: color-mix(in srgb, var(--primary-deep) 55%, #9a9a9a);
  --faint: color-mix(in srgb, var(--text) 38%, #fff);
  --line: color-mix(in srgb, var(--primary-border) 40%, #f2f2f2);
  --link: #326d9f;
  --topbar: 64px;
}

/* A short colour fade while switching themes */
html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

/* The leaf artwork has a white background: tint it the way the app does
   (a colour layer blended over it), then multiply the white away. */
.leaf-art {
  background-color: #fff;
  background-image: var(--leaf-tint), url("assets/leaf-background-image.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-blend-mode: color, normal;
  filter: brightness(1.07);
  mix-blend-mode: multiply;
  aspect-ratio: 601 / 1500;
  pointer-events: none;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
/* Phones may enlarge small text in boxes wider than the screen. The little
   demos are drawn 520px wide and scaled down, so that would break their
   layout: keep every text at the size it was given. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 Poppins, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; text-wrap: balance; }
.hero-sub, .section-head p, .cta p, .closing { text-wrap: balance; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: 500 15px/1 Poppins, sans-serif;
  text-decoration: none;
  box-shadow: 0 8px 22px -10px rgba(var(--primary-strong-rgb), .7);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--primary-strong); transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(var(--primary-strong-rgb), .8); }
.btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 3px; }
.btn-small { padding: 10px 16px; font-size: 14px; }
.btn-large { padding: 16px 30px; font-size: 16px; border-radius: 12px; }
.btn-light { background: #fff; color: var(--primary-strong); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .4); }
.btn-light:hover { background: var(--primary-soft); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font: 600 19px Poppins, sans-serif; letter-spacing: -.01em; }
/* The logo takes the theme's colour. The file is a mask; the shadow sits on the box around it. */
.brand .mark { flex: none; width: 28px; height: 22px; margin-right: 5px; filter: drop-shadow(0 6px 5px rgba(var(--primary-rgb), .19)); }
.brand .mark::before { content: ""; display: block; width: 100%; height: 100%; background: var(--primary); -webkit-mask: url(assets/logo.svg) center / contain no-repeat; mask: url(assets/logo.svg) center / contain no-repeat; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.topbar .link { font-size: 14px; text-decoration: none; color: var(--ink-2); }
.topbar .link:hover { color: var(--ink); }

/* Theme swatches */
.themes { display: flex; align-items: center; gap: 7px; }
.sw {
  width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.sw:hover { transform: scale(1.15); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--sw); }
.sw:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Top-bar picker: folded into a "Theme" pill. Opening fans the swatches out to
   the right; closing stacks them to the left, fades them, and brings the pill back.
   The pill and the swatch row share one grid cell, so the bar never shifts. */
.theme-pick { display: grid; align-items: center; padding-right: 18px; margin-right: -2px; border-right: 1px solid var(--line); }
.theme-pick > * { grid-area: 1 / 1; }
.theme-pick .themes { padding: 0 5px; }
.theme-pick .sw { position: relative; }
.theme-pick .sw:nth-child(2) { --i: 1; }
.theme-pick .sw:nth-child(3) { --i: 2; }
.theme-pick .sw:nth-child(4) { --i: 3; }
.theme-pick .sw:nth-child(5) { --i: 4; }
.theme-pick .sw[aria-pressed="true"] { z-index: 1; } /* the current colour lands on top of the stack */
.theme-toggle {
  height: 28px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px;
  background: transparent; color: var(--ink-2);
  font: 600 11px/1 Poppins, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--primary-border); background: var(--primary-soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Open: the pill fades at once; the swatches appear stacked, then fan out. */
.theme-pick .theme-toggle { opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility 0s linear .15s, color .2s ease, border-color .2s ease, background-color .2s ease; }
.theme-pick .sw { transition: opacity .2s ease .1s, transform .45s cubic-bezier(.2, .8, .2, 1) .18s, box-shadow .2s ease; }
.theme-pick.settled .sw { transition: transform .2s ease, box-shadow .2s ease; }

/* Closed: the swatches slide left into one stack, fade, then the pill returns. */
.theme-pick[data-open="false"] .themes { pointer-events: none; } /* the empty row must not cover the pill */
.theme-pick[data-open="false"] .sw {
  transform: translateX(calc(var(--i, 0) * -25px));
  opacity: 0; visibility: hidden;
  transition: transform .38s cubic-bezier(.5, 0, .25, 1), opacity .2s ease .32s, visibility 0s linear .52s, box-shadow .2s ease;
}
.theme-pick[data-open="false"] .theme-toggle { opacity: 1; visibility: visible; transition: opacity .25s ease .46s, visibility 0s, color .2s ease, border-color .2s ease, background-color .2s ease; }

:root:not([data-theme]) .theme-pick { display: none; } /* no script, no theme switching */
@media (max-width: 720px) { .theme-pick { display: none; } }
.foot-themes { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }

/* =========================================================
   1–3. The story stage
   ========================================================= */
.story { position: relative; height: 820svh; }
.stage {
  position: sticky; top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--bg); /* sticky makes its own layer; the leaf blends against this */
  --hp: 0;
}

/* A silhouette of the app's leaf plant (assets/plant-silhouette.png, made
   from the same photo), as tall as the screen and tinted by the theme. It is
   mirrored, so the photo's cut-off side sits on the screen's left edge. It is
   160px taller than the screen because home.js lifts it 160px as the hero
   scrolls away, so its cut-off base never shows. */
.leaf {
  position: absolute; left: 0; top: 0;
  height: calc(100% + 160px);
  aspect-ratio: 601 / 1500;
  background-color: var(--primary-deep);
  -webkit-mask: url("assets/plant-silhouette.png") 0 0 / 100% 100% no-repeat;
  mask: url("assets/plant-silhouette.png") 0 0 / 100% 100% no-repeat;
  opacity: .3;
  pointer-events: none;
  transition: opacity .6s ease;
}
.stage:not([data-step="0"]) .leaf { opacity: .1; }

/* Hero copy */
.hero-copy {
  position: absolute; inset: 0 0 auto 0;
  padding: calc(var(--topbar) + clamp(28px, 9svh, 110px)) 20px 0;
  text-align: center;
  z-index: 3;
}
.hero-copy h1 {
  font-size: clamp(42px, 7.4vw, 104px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.hero-sub {
  margin: clamp(14px, 2svh, 22px) auto clamp(22px, 3.4svh, 34px);
  max-width: 40ch;
  font-size: clamp(17px, 1.7vw, 23px);
  color: var(--ink-2);
  font-weight: 300;
}
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; margin: clamp(18px, 3svh, 30px) auto 0;
  font-size: 13px; color: var(--muted); text-decoration: none;
}
.scroll-cue i { width: 1px; height: 30px; background: linear-gradient(var(--muted), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* Captions */
.captions { position: absolute; z-index: 2; pointer-events: none; }
.cap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.stage[data-step="1"] .cap-mess,
.stage[data-step="2"] .cap-mess,
.stage[data-step="3"] .cap-stream,
.stage[data-step="4"] .cap-stream,
.stage[data-step="5"] .cap-stream,
.stage[data-step="6"] .cap-stream,
.stage[data-step="7"] .cap-stream { opacity: 1; transform: none; pointer-events: auto; }

.cap h2 { font-size: clamp(30px, 3.3vw, 50px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 18px; }
.cap p { margin: 0 0 14px; font-size: clamp(15px, 1.15vw, 17px); color: var(--ink-2); transition: opacity .4s ease; max-width: 42ch; }
.stage[data-step="1"] .cap-b { opacity: .3; }
.stage[data-step="2"] .cap-a { opacity: .3; }

.steps { list-style: none; margin: 10px 0 0; padding: 0; }
.steps li { position: relative; padding: 9px 0 9px 20px; border-left: 2px solid var(--line); transition: border-color .3s ease; }
.steps b { display: block; font-size: 15px; font-weight: 500; color: var(--faint); transition: color .3s ease; }
.steps span { display: block; max-height: 0; overflow: hidden; opacity: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; transition: max-height .5s ease, opacity .4s ease, margin .4s ease; }
.steps li.done b { color: var(--primary); }
.steps li.active { border-left-color: var(--primary); }
.steps li.active b { color: var(--ink); font-weight: 600; }
.steps li.active span { max-height: 90px; opacity: 1; margin-top: 3px; }

/* Floating details (hero parallax) */
.float {
  position: absolute; left: 0; top: 0; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px;
  background: #fff; border-radius: 12px;
  font-size: 13px; color: var(--ink);
  box-shadow: 0 18px 40px -14px rgba(var(--text-rgb), .35), 0 0 0 1px rgba(var(--text-rgb), .05);
  pointer-events: none;
  will-change: transform, opacity;
}
.float-b { padding-left: 14px; }
.thumb-mini { display: grid; place-items: center; width: 30px; height: 36px; border-radius: 4px; background: linear-gradient(#f3f4f2, #e3e6e1); font: 700 9px Poppins, sans-serif; color: #9aa196; }
.float .aud { width: 22px; height: 17px; stroke: var(--primary-deep); fill: none; stroke-width: 1.3; stroke-linecap: round; }

/* =========================================================
   The Dash window
   ========================================================= */
.win {
  position: absolute; left: 0; top: 0; z-index: 1;
  transform-origin: 0 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(var(--text-rgb), .45), 0 0 0 1px rgba(var(--text-rgb), .07);
  will-change: transform;
  font-family: Poppins, sans-serif;
  color: #000;
  line-height: 1.4;
}
.win-bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: color-mix(in srgb, var(--theme-bg) 55%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--theme-bg) 80%, #ccc); }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9ddd3; }
.app { position: relative; display: flex; height: calc(100% - 26px); background: #f9faf9; overflow: hidden; }

/* Rail */
.rail { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; background: #fff; border-right: 1px solid #eef0ea; }
.rail-logo { width: 30px; height: 29px; margin-bottom: 26px; overflow: visible; fill: var(--primary); filter: drop-shadow(0 6px 5px rgba(var(--primary-rgb), .19)); }
.rail-acct { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--primary); color: #fff; font: 700 10px "Anek Latin", sans-serif; }
.rail-label { font-size: 8px; color: #555; margin-bottom: 8px; }
.rail-add { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #dfe3da; color: #b9c0b2; font-size: 14px; line-height: 1; }

/* Sidebar */
.side {
  width: 170px; flex: none; position: relative;
  padding: 10px 12px;
  /* Same leaf as the app's sidebar, tinted by the theme */
  background-color: #fff;
  background-image: var(--leaf-tint), url("assets/leaf-background-image.png");
  background-position: center, right -64px top -80px;
  background-size: cover, 260px auto;
  background-repeat: no-repeat;
  background-blend-mode: color, normal;
  border-right: 1px solid #eef0ea;
}
.side-user b, .side-card .acct b { display: block; font-size: 10.5px; font-weight: 600; }
.side-user small, .side-card .acct small { display: block; font-size: 8px; color: var(--accent); }
.side-tabs { display: flex; margin: 22px -12px 12px 0; }
.tab { flex: 1; padding: 8px 4px; text-align: center; font: italic 600 9.5px Poppins, sans-serif; color: rgba(255, 255, 255, .85); background: color-mix(in srgb, var(--primary) 66%, #fff); transition: background-color .4s ease, color .4s ease; }
.tab-emails { border-radius: 4px 0 0 4px; }
.tab-streams { border-radius: 0 4px 4px 0; }
/* Gather (step 4) starts in the inbox, under Emails. home.js adds .gathered when
   the window switches to Your Strands, where there is no Message Stream. */
.stage:is([data-step="1"], [data-step="2"], [data-step="3"], [data-device="desk"][data-step="4"]:not(.gathered)) .tab-emails,
.stage:is([data-step="0"], [data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .tab-streams { background: var(--primary-strong); color: #fff; }

.side-card {
  position: absolute; left: 10px; right: 10px; top: 104px;
  background: #fff; border-radius: 6px; padding: 10px;
  box-shadow: 0 4px 18px rgba(var(--text-rgb), .12);
  transition: opacity .45s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.folders ul { list-style: none; margin: 10px 0 0; padding: 0; }
.folders li { position: relative; padding: 5px 8px 5px 14px; font-size: 10px; border-radius: 4px; }
.folders li::before { content: ""; position: absolute; left: 5px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: #000; }
.folders li.on { background: var(--primary-soft); font-weight: 600; }
.folders li em { font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: var(--primary-light); color: #fff; font-size: 8px; }
.stream-card b { display: block; font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.stream-card .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.stream-card .chips span { padding: 2px 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: 7.5px; }
.stream-card .tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 8.5px; font-style: italic; margin-bottom: 8px; }
.stream-card dl { display: grid; grid-template-columns: 1fr auto; gap: 3px; margin: 0; padding-top: 7px; border-top: 1px solid #f0f2ed; font-size: 8px; }
.stream-card dd { margin: 0; }

.folders, .stream-card { opacity: 0; transform: translateY(8px); pointer-events: none; }
.stage:is([data-step="1"], [data-step="2"], [data-step="3"], [data-device="desk"][data-step="4"]:not(.gathered)) .folders,
.stage[data-step="0"] .stream-card { opacity: 1; transform: none; }
/* Once gathered, the Japan trip card is in the next column (.streams). */

/* Message Stream list */
.list {
  position: relative; flex: none;
  width: 292px;
  background: #fff;
  border-right: 1px solid #eef0ea;
  overflow: hidden;
  transition: width .7s cubic-bezier(.2, .8, .2, 1), opacity .5s ease;
}
.stage[data-step="0"] .list { width: 0; opacity: 0; }
.stage:is([data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .list { width: 250px; }

/* The end of Gather, then Read, Reply, Continue: the column shows the Strand cards, drawn
   like the app's stream folders (a tab on top; the open one is theme-coloured). */
.streams { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.stage:is([data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .streams { opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s; }
.streams-body { height: calc(100% - 52px); padding: 24px 14px 0; background: #f6f7f3; }
.sf { position: relative; margin-bottom: 24px; padding: 9px 11px 10px; border-top: 2px solid transparent; border-radius: 4px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .07); opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.sf::before { content: ""; position: absolute; left: 16px; top: -10px; width: 56px; height: 11px; background: #fff; border-radius: 4px 9px 0 0; transform: skewX(18deg); }
.sf.on { border-top-color: var(--primary); }
.sf.on::before { background: var(--primary); }
.sf b { display: block; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.sf .chips { display: flex; gap: 4px; margin-bottom: 6px; overflow: hidden; }
.sf .chips span { padding: 2px 5px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: 7.5px; white-space: nowrap; }
.sf .tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 8px; font-style: italic; margin-bottom: 6px; }
.sf dl { display: grid; grid-template-columns: 1fr auto; gap: 3px; margin: 0; padding-top: 6px; border-top: 1px solid #f0f2ed; font-size: 7.5px; }
.sf dd { margin: 0; }
.sf-unread { position: absolute; right: 8px; top: -16px; font-size: 7.5px; font-weight: 600; color: var(--primary-strong); }
/* A group of streams, closed like a box (as in the app), and the expired box */
.sbox { position: relative; margin-bottom: 24px; padding-bottom: 5px; border: 1px solid #d9dece; border-radius: 4px 4px 7px 7px; background: #e9ecdf; box-shadow: 0 3px 7px rgba(0, 0, 0, .05); opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.sbox-lid { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 3px; align-items: center; margin: -4px -3px 0; padding: 8px 12px 7px; border: 1px solid #d3dac5; border-top: 5px solid #b5c49e; border-radius: 4px; background: #f9faf5; box-shadow: 0 2px 0 #cad2be; color: #25331d; }
.sbox-lid b { font-size: 11px; font-weight: 600; }
.sbox-lid svg { justify-self: end; width: 8px; height: 5px; fill: none; stroke: #25331d; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sbox-lid small { grid-row: 2; font-size: 7.5px; color: #78816e; }
.sbox-lid em { grid-row: 2; grid-column: 2; justify-self: end; font-style: normal; font-size: 7.5px; font-weight: 600; color: var(--primary-strong); }
.sbox.expired { background: #eeeae3; }
.sbox.expired .sbox-lid { border-top-color: #bcb7aa; }
.stage:is([data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) :is(.sf, .sbox) { opacity: 1; transform: none; transition-delay: calc(.12s + var(--n, 0) * 70ms); }

.list-head { position: relative; width: 292px; padding: 10px 14px 6px; border-bottom: 1px solid #f0f2ed; }
.list-head h3 { font-size: 15px; font-weight: 700; }
.list-head small { display: block; font-size: 8px; color: var(--accent); }
.list-head .counts { position: absolute; right: 12px; bottom: 7px; font-size: 8px; }
.list-head .counts em { font-style: normal; color: var(--primary); margin-right: 6px; }
.list-body { position: relative; width: 292px; height: calc(100% - 52px); }
.stage:is([data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .list-head,
.stage:is([data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .list-body { width: 250px; }

.date-head { height: 22px; display: grid; place-items: center; font-size: 9px; color: #000; }

.row, .bundle {
  position: absolute; left: 0; right: 0; top: 0;
  height: 64px;
  transform-origin: 50% 0;
  transition: transform .75s cubic-bezier(.2, .8, .2, 1), opacity .5s ease, filter .4s ease, background-color .4s ease;
}
.row { display: flex; gap: 9px; padding: 7px 12px 7px 10px; background: #fff; border-bottom: 1px solid #f0f2ed; }
.row.sel { background: linear-gradient(90deg, var(--primary-soft), #fff 85%); }
.row.dim { filter: opacity(.42) saturate(.7); }
.avcol { width: 30px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.row .av, .ghost .av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(var(--primary-rgb), .8); color: #fff; font: 700 13px "Anek Latin", sans-serif; }
.unread { font: 500 6px "Anek Latin", sans-serif; letter-spacing: .4px; text-transform: uppercase; color: var(--primary); }
.rb { flex: 1; min-width: 0; }
.rh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nm { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh time { font-size: 8.5px; white-space: nowrap; }
.sj { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sj .clip svg { width: 11px; height: 11px; fill: none; stroke: #8b9583; stroke-width: 1.8; }
.row p { margin: 2px 0 0; font-size: 10.5px; color: rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row.glow { background: linear-gradient(90deg, rgba(var(--primary-light-rgb), .22), rgba(var(--primary-light-rgb), .06)); box-shadow: inset 3px 0 0 var(--primary-light); animation: glow 1.6s ease-in-out infinite; }
.stage[data-device="desk"].gathered .row.glow { background: #fff; box-shadow: none; animation: none; } /* covered by the Strand cards */
@keyframes glow { 50% { background-color: rgba(var(--primary-light-rgb), .14); } }
.row[data-id="r9"] { background: linear-gradient(90deg, rgba(var(--primary-light-rgb), .22), #fff 90%); box-shadow: inset 3px 0 0 var(--primary-light); }

.bundle { display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 10px; background: #f7f4ee; border-bottom: 1px solid #efe9df; }
.bundle-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 7px; background: #c8b392; color: #fff; font: 700 13px "Anek Latin", sans-serif; }
.bundle b { display: block; font-size: 11px; font-weight: 700; }
.bundle small { display: block; font-size: 9.5px; color: rgba(0, 0, 0, .55); }

/* Then the tag's wording changes (see .lost-ring below for what comes first):
   "Sam's flights…" fades, the pill narrows, and "Not a Dash feature" types
   in one letter at a time (home.js wraps each letter in a span with --i).
   home.js also measures both wordings (--wa, --wb) so the pill narrows to fit. */
.lost-note { display: grid; overflow: hidden; box-sizing: content-box; width: var(--wa, auto); }
.say { grid-area: 1 / 1; justify-self: start; white-space: nowrap; transition: opacity .2s ease; }
.say-b > span { opacity: 0; }
.stage[data-step="2"] .say-a { opacity: 0; transition: opacity .2s ease 3.8s; }
.stage[data-step="2"] .say-b > span { opacity: 1; transition: opacity .05s linear calc(4.15s + var(--i, 0) * 55ms); }
.stage[data-step="2"] .lost-note { width: var(--wb, auto); }

/* Step 2: the tag, lifted just above the window. A dot lands on the Updates
   bundle, one straight line draws up from it, and the tag fades in at the
   line's end. --s is the window's scale (set by home.js), so the tag stays
   the size it was inside the window. On computers the line leans right and
   the tag sits beside its end; on phones the line goes straight up and the
   tag sits centred on top of it (never smaller than 10px there). */
.lost { position: absolute; inset: 0; z-index: 5; pointer-events: none; --lost: #b3261e; --s: 1; }
.stage[data-device="phone"] .lost-note { translate: -50% -100%; font-size: max(10px, calc(12px * var(--s))); }
.lost-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lost path { fill: none; stroke: var(--lost); stroke-width: 1.1; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .25s ease; }
.lost .lost-halo { stroke: #fff; stroke-width: 4; opacity: .85; } /* keeps window text readable where the line crosses it */
.lost circle { transform-box: fill-box; transform-origin: center; }
.lost-dot { fill: var(--lost); transform: scale(0); transition: transform .2s ease; }
.lost-ping { fill: none; stroke: var(--lost); stroke-width: 1.2; opacity: 0; }
.lost-note {
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  padding: calc(3px * var(--s)) calc(10px * var(--s)); border-radius: 999px;
  background: #fbeae9; color: var(--lost);
  font: 400 calc(12px * var(--s))/1.4 Poppins, sans-serif;
  opacity: 0; transform: translateY(3px);
  transition: opacity .2s ease, transform .2s ease;
}
.stage[data-step="2"] .lost-dot { transform: scale(1); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1) .5s; }
.stage[data-step="2"] .lost path { stroke-dashoffset: 0; transition: stroke-dashoffset .55s cubic-bezier(.5, 0, .2, 1) .7s; }
.stage[data-step="2"] .lost-note { opacity: 1; transform: none; transition: opacity .4s ease 1.2s, transform .5s cubic-bezier(.2, .8, .2, 1) 1.2s, width .3s cubic-bezier(.3, .7, .2, 1) 3.85s; }

/* 1.5s after the tag has appeared, the dot turns into a ring with an X in it:
   the ring grows out of the dot (filled with the row's own colour, so it
   looks empty and hides the line's end), then the X draws in two strokes. */
.lost-ring { fill: #f7f4ee; stroke: var(--lost); stroke-width: 1.3; transform: scale(0); transition: transform .2s ease; }
.lost-xs path { fill: none; stroke: var(--lost); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .15s ease, opacity 0s linear .15s; }
.stage[data-step="2"] .lost-ring { transform: scale(1); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1) 3.2s; }
.stage[data-step="2"] .lost-xs path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset .15s ease-out 3.45s, opacity 0s linear 3.45s; }
.stage[data-step="2"] .lost-xs path + path { transition-delay: 3.6s; }
.stage[data-step="2"] .lost-ping { animation: lost-ping 1.4s ease-out .8s 2; } /* a sonar ping from the dot, twice */
@keyframes lost-ping { from { transform: scale(1); opacity: .8; } to { transform: scale(4.5); opacity: 0; } }

.ghost { position: absolute; z-index: 30; right: auto !important; border-radius: 4px; overflow: hidden; pointer-events: none; transition: none !important; background: #fff; }

/* Right pane */
.pane { position: relative; flex: 1; min-width: 0; background: #f9faf9; }
.reader, .setup, .stream {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.stage:is([data-step="1"], [data-step="2"]) .reader,
.stage:is([data-step="3"], [data-device="desk"][data-step="4"]:not(.gathered)) .setup,
.stage:is([data-step="0"], [data-device="phone"][data-step="4"], [data-device="desk"].gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .stream {
  opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s;
}

.reader { background: #fff; padding: 14px 18px; }
.reader-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.reader-head b { display: block; font-size: 12px; font-weight: 500; }
.reader-head small { display: block; font-size: 9px; color: var(--accent); }
.av-lg { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(var(--primary-rgb), .8); color: #fff; font: 700 14px "Anek Latin", sans-serif; }
.new-email { margin-left: auto; padding: 6px 12px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 10px; }
.reader-body { border: 1px solid #ebedf6; border-radius: 6px; padding: 16px 18px; font-size: 11.5px; line-height: 1.6; }
.reader-body h4 { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.reader-body h4 time { font-size: 8.5px; font-weight: 400; color: #888; white-space: nowrap; }
.reader-body p { margin: 0 0 10px; }

.setup { display: grid; place-items: center; }
.setup-card { width: 300px; padding: 18px 18px 16px; background: #fff; border-radius: 10px; box-shadow: 0 14px 40px rgba(var(--text-rgb), .14); }
.setup-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.setup-card label { display: block; margin: 10px 0 4px; font-size: 9.5px; font-weight: 600; color: var(--primary-strong); }
.setup-card .field { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--primary-border); border-radius: 6px; font-size: 11.5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); font-size: 10px; }
.chip svg { width: 11px; height: 12px; }
.setup-btn { display: block; width: max-content; margin: 16px 0 0 auto; padding: 7px 14px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 10.5px; }
.t-name { display: inline-block; }
.stage[data-step="3"] .t-name { animation: typeIn .8s steps(10) .35s both; }
.stage[data-step="3"] .setup .chip { animation: pop .4s cubic-bezier(.2, .9, .3, 1.3) both; }
.stage[data-step="3"] .setup .c1 { animation-delay: 1.15s; }
.stage[data-step="3"] .setup .c2 { animation-delay: 1.45s; }
.stage[data-step="3"] .setup .c3 { animation-delay: 1.75s; }
.stage[data-step="3"] .setup .c4 { animation-delay: 2.2s; }
.stage[data-step="3"] .setup-btn { animation: press 2.9s ease both; }
@keyframes typeIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes press { 0%, 88% { transform: none; box-shadow: none; } 94% { transform: scale(.94); } 100% { transform: none; box-shadow: 0 0 0 4px rgba(var(--primary-light-rgb), .3); } }

/* Stream */
.stream { display: flex; flex-direction: column; }
.stream-head { background: #fff; padding: 12px 18px 10px; border-bottom: 1px solid #f0f2ed; }
.stream-head h4 { font-size: 17px; font-weight: 600; color: color-mix(in srgb, var(--primary-deep) 70%, var(--text)); margin-bottom: 8px; }
.people { display: flex; align-items: center; gap: 10px; }
.avs { display: flex; flex: none; }
.avs .av { display: grid; place-items: center; width: 22px; height: 22px; margin-right: -5px; border-radius: 50%; border: 2px solid #fff; background: var(--av); color: #fff; font: 700 8px Poppins, sans-serif; }
.people .names { flex: 1; min-width: 0; margin-left: 6px; }
.people .names b { display: block; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .names small { display: block; font-size: 8px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppl { flex: none; font-size: 9px; color: #333; }

.trail {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  padding: 12px 18px 12px 34px;
  overflow: hidden;
}

/* A message in a stream — full-width email cards, never chat bubbles */
.msg {
  position: relative; flex: none;
  display: none;
  padding: 9px 14px 10px;
  border: 1px solid #ebedf6; border-radius: 4px;
  background: transparent;
  font-size: 11px; line-height: 1.5; color: #000;
  opacity: .62;
  translate: 0 0;
  transition: opacity .3s ease, background-color .3s ease, box-shadow .3s ease, margin .3s ease, translate .6s cubic-bezier(.2, .8, .2, 1);
}
.msg.shown { display: block; }
.msg.pending { visibility: hidden; }
.msg.enter { animation: cardIn .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.msg.latest { opacity: 1; background: #fff; box-shadow: 0 6px 20px rgba(var(--primary-deep-rgb), .12); margin-left: -16px; }

/* Read (step 5): "Dad to Mia" is selected and opens up to show the rest of
   the email, who it went to, and its actions; the latest gives up its
   highlight. Reply (step 6) folds it back and the latest is selected again. */
.msg .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1); }
.msg .more > div { min-height: 0; overflow: hidden; }
.msg .more p { margin-top: .6em; }
.msg-meta { display: grid; grid-template-columns: auto 1fr; gap: .25em .9em; margin: .8em 0 0; padding-top: .6em; border-top: 1px solid #eef0ea; font-size: .86em; color: #444; }
.msg-meta dt { color: var(--muted); }
.msg-meta dd { margin: 0; }
.msg-acts { position: absolute; right: 1.2em; bottom: .75em; display: flex; align-items: center; gap: .9em; opacity: 0; transition: opacity .25s ease; }
.msg-acts svg { width: 1.25em; height: .95em; color: #6b6b6b; }
.msg-acts svg + svg { width: 1.1em; height: .35em; }
/* home.js sets --lift when the opened email would run off the top (phones):
   the messages slide down with it, as if the list scrolled to keep it in view.
   Delays are listed per property: opacity, background, shadow, margin, translate. */
.stage[data-step="5"] .msg { translate: 0 var(--lift, 0px); transition-delay: 0s, 0s, 0s, 0s, .7s; }
.stage[data-step="5"] .msg[data-c="c2"] { opacity: 1; background: #fff; box-shadow: 0 6px 20px rgba(var(--primary-deep-rgb), .12); margin-left: -16px; transition-delay: .35s, .35s, .35s, .35s, .7s; }
.stage[data-step="5"] .msg[data-c="c2"] .more { grid-template-rows: 1fr; transition: grid-template-rows .6s cubic-bezier(.2, .8, .2, 1) .7s; }
.stage[data-step="5"] .msg[data-c="c2"] .msg-acts { opacity: 1; transition-delay: .95s; }
.stage[data-step="5"] .msg.latest { opacity: .62; background: transparent; box-shadow: none; margin-left: 0; transition-delay: .35s, .35s, .35s, .35s, .7s; }
.msg header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: .55em; }
.msg .who { display: flex; align-items: center; gap: .55em; min-width: 0; }
.msg .av { display: grid; place-items: center; flex: none; width: 1.85em; height: 1.85em; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; font-size: .78em; }
.msg .nm { font-size: 1em; }
.msg .nm i { font-style: normal; }
.msg .nm u { text-decoration: none; color: var(--muted); }
.msg .aud { flex: none; width: 1.45em; height: 1.1em; fill: none; stroke: var(--primary-deep); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.msg time { flex: none; font-size: .82em; white-space: nowrap; }
.msg h5 { font-size: 1em; font-weight: 700; margin-bottom: .2em; }
.msg p { margin: 0; max-width: 60ch; }
.msg .open { display: inline-block; margin-top: .45em; color: var(--link); font-size: .9em; text-decoration: underline; }
.msg .thumbs { position: absolute; right: 1.3em; bottom: .8em; }
.thumb { display: grid; place-items: center; width: 3.6em; height: 4.2em; border: 2px solid #fff; border-radius: 3px; background: linear-gradient(#f2f3f1, #e1e4df); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); font-weight: 700; font-size: .95em; color: #a2a89e; }
.msg.has-thumb p { padding-right: 4.5em; }
.msg[data-c="c1"] p { padding-right: 4.2em; }

/* Composer */
.composer {
  flex: none; position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 18px 10px 24px;
  background: #fff;
  box-shadow: 0 -9px 19.8px rgba(var(--primary-deep-rgb), .09);
}
.type { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.45; color: rgba(0, 0, 0, .9); }
.ph { color: #abb6b2; }
.stage.typing .ph { display: none; }
.caret { display: none; width: 1px; height: 13px; margin-left: 1px; vertical-align: -2px; background: #000; animation: blink 1s steps(1) infinite; }
.stage.typing .caret { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }
.clip-ico { width: 16px; height: 16px; fill: none; stroke: #abb6b2; stroke-width: 1.6; flex: none; }
.reply-to { flex: none; text-align: right; }
.reply-to b { display: block; font-size: 10.5px; font-weight: 500; color: var(--primary); }
.reply-to small { display: block; font-size: 8.5px; text-decoration: underline; }
.send { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-border); transition: background-color .3s ease, transform .2s ease; }
.send svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.stage.typing .send { background: var(--primary); }
.stage.sending .send { transform: scale(.88); }

.toast { position: absolute; left: 50%; bottom: 18px; z-index: 40; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11px; white-space: nowrap; opacity: 0; transform: translate(-50%, 8px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Phone version of the window ---------- */
.win[data-mode="phone"] { border-radius: 30px; box-shadow: 0 30px 70px -24px rgba(var(--text-rgb), .5), 0 0 0 6px #fff, 0 0 0 7px rgba(var(--text-rgb), .1); }
.win[data-mode="phone"] .win-bar { justify-content: center; height: 26px; background: #fff; border: 0; }
.win[data-mode="phone"] .win-bar i { display: none; }
.win[data-mode="phone"] .win-bar::after { content: ""; width: 70px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--theme-bg) 70%, #ddd); }
.win[data-mode="phone"] .rail,
.win[data-mode="phone"] .side { display: none; }
.win[data-mode="phone"] .list { position: absolute; inset: 0; width: 100% !important; opacity: 1 !important; }
.win[data-mode="phone"] .list-head,
.win[data-mode="phone"] .list-body { width: 100% !important; }
.win[data-mode="phone"] .pane { position: absolute; inset: 0; z-index: 5; transform: translateX(102%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); box-shadow: -10px 0 30px rgba(0, 0, 0, .08); }
.stage:is([data-step="0"], [data-step="3"], [data-step="5"], [data-step="6"], [data-step="7"]) .win[data-mode="phone"] .pane { transform: none; }
/* Gather on phones: once the chosen emails have lifted off the list
   (home.js adds .gathered), the list slides left, the stream slides in under
   the lifted emails, and they settle into it. The list stays pushed left
   while the stream covers it. */
.win[data-mode="phone"] .list { transition: translate .6s cubic-bezier(.2, .8, .2, 1); }
.stage.gathered .win[data-mode="phone"] .pane { transform: none; }
.stage:is(.gathered, [data-step="5"], [data-step="6"], [data-step="7"]) .win[data-mode="phone"] .list { translate: -30% 0; }
.win[data-mode="phone"] .stream-head { padding: 10px 14px 8px; }
.win[data-mode="phone"] .people .names small,
.win[data-mode="phone"] .ppl { display: none; }
.win[data-mode="phone"] .trail { padding: 10px 12px 10px 22px; gap: 10px; }
.win[data-mode="phone"] .msg { font-size: 10.5px; }
.win[data-mode="phone"] .msg p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.win[data-mode="phone"] .composer { gap: 8px; padding: 10px 12px 12px 16px; }
.win[data-mode="phone"] .clip-ico { display: none; }
.win[data-mode="phone"] .setup-card { width: 272px; }
.win[data-mode="phone"] .reader { display: none; }

/* ---------- Stacked (tablet and phone) stage ---------- */
.stage[data-layout="stack"] .cap { justify-content: flex-start; padding-top: 10px; }
.captions .cap-measure { bottom: auto; visibility: hidden; pointer-events: none; } /* home.js measures phone captions in it */
/* Phones: each caption is moved (--cap-y, set by home.js) to sit centred
   between the top bar and the window; step 2's stays clear of its tag. */
.stage[data-device="phone"] .cap { transform: translateY(calc(var(--cap-y, 0px) + 18px)); }
.stage[data-device="phone"]:is([data-step="1"], [data-step="2"]) .cap-mess,
.stage[data-device="phone"]:is([data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .cap-stream { transform: translateY(var(--cap-y, 0px)); }
.stage[data-layout="stack"] .cap h2 { font-size: clamp(26px, 6.4vw, 38px); margin-bottom: 8px; }
.stage[data-layout="stack"] .cap p { font-size: 14.5px; line-height: 1.5; margin-bottom: 8px; }
.stage[data-layout="stack"] .steps { margin-top: 2px; }
.stage[data-layout="stack"] .steps li { display: none; border: 0; padding: 0; }
.stage[data-layout="stack"] .steps li.active { display: block; }
.stage[data-layout="stack"] .steps li.active b { font-size: 13px; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.stage[data-layout="stack"] .steps li.active span { font-size: 15px; color: var(--ink); }
.stage[data-layout="stack"]:not([data-step="3"]) .cap-stream .lead { display: none; }
.stage[data-layout="stack"][data-step="3"] .steps { display: none; }
.stage[data-layout="stack"][data-step="1"] .cap-b,
.stage[data-layout="stack"][data-step="2"] .cap-a { display: none; }
.stage[data-layout="stack"] .cap-b { opacity: 1 !important; }
.stage[data-layout="stack"][data-device="desk"] .cap { padding-top: 0; }
.stage[data-layout="stack"][data-device="desk"] .cap p { max-width: 56ch; }
/* Phones: the title card, played like a film's title. As the window glides
   down from the hero, still showing the stream, "Your Strands" fades in
   just above it, centred, one word above the other, drifting up a little
   and settling a moment after the window does. It holds, fades out, and
   step 1's caption comes in. home.js sets data-title: "in", then "out", then
   removes it. With no data-title the card waits, hidden and lowered, with no
   transition. home.js also sets the card's left, width and height: the demo
   window's left edge and width, and from the caption's top down to the
   window's white rim. */
.title-card { display: none; }
.stage[data-device="phone"] .title-card {
  position: absolute; top: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 12px;
  text-align: center;
  container-type: size;
  pointer-events: none;
  opacity: 0; translate: 0 18px;
}
/* About 10pt smaller than the window's width would allow, leaving a margin
   either side, unless two lines that size wouldn't fit above the window. */
.title-card span { display: block; font-size: min(17cqi, 46cqb); line-height: .98; font-weight: 700; letter-spacing: -.045em; color: var(--ink); }
.stage[data-title="in"] .title-card {
  opacity: 1; translate: 0 0;
  transition: opacity .9s cubic-bezier(.4, 0, .4, 1), translate 1.1s cubic-bezier(.22, .61, .36, 1);
}
.stage[data-title="out"] .title-card { opacity: 0; translate: 0 0; transition: opacity .4s cubic-bezier(.4, 0, .6, 1); }

.stage[data-layout="stack"] .leaf { translate: -30% 0; } /* narrower screens: lean in from further off the edge */
.stage[data-device="phone"] .leaf { translate: -42% 0; }

/* ---------- Phones: the page marker and the scroll stop ----------
   The marker sits to the left of the phone: one dot per step after the hero
   on a thin line, like the dot spine on the investment terms page. The
   current dot is filled and the line behind it coloured in. home.js places
   it, centred on the phone.
   The scroll stop is gate.js, the HUNGERY investor deck's section gate:
   each step holds the page, a sustained push moves on one step, and a
   hesitant one drains away. The deck shows the push in a bar at the bottom
   of the screen, which would sit on the phone here, so instead the line to
   the next dot fills (.pager-push). The thin line across the top of the
   screen on each catch is the deck's own (.gatemark). */
.pager { position: absolute; z-index: 6; left: 0; top: 0; display: none; flex-direction: column; justify-content: space-between; width: 7px; height: 104px; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.stage[data-device="phone"] .pager { display: flex; }
.stage[data-device="phone"]:not([data-step="0"]) .pager { opacity: 1; }
.pager b { position: relative; width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgba(var(--text-rgb), .32); background: var(--bg); transition: background-color .3s ease, border-color .3s ease; }
.pager b.done { border-color: var(--primary); }
.pager b.on { border-color: var(--primary); background: var(--primary); }
.pager-line { position: absolute; left: 3px; top: 3.5px; bottom: 3.5px; width: 1px; background: rgba(var(--text-rgb), .16); }
.pager-line i { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--primary); }
.pager-done { transition: height .4s ease; }
.pager-push { transition: height .08s linear; }
.stop { position: absolute; left: 0; width: 1px; height: 1px; visibility: hidden; pointer-events: none; } /* the gate's boundaries, one per step */
#gate { display: none; }
.gatemark { position: fixed; left: 0; top: 0; z-index: 57; width: 0; height: 2px; background: var(--primary); opacity: 0; pointer-events: none; transition: width .5s cubic-bezier(.22, .75, .28, 1), opacity .4s ease; }
.gatemark.show { width: 100%; opacity: .55; }

/* =========================================================
   Sections after the story
   ========================================================= */
.section { padding: clamp(84px, 12vw, 170px) 0; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 58px); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; }
.section-head p { margin: 18px auto 0; max-width: 54ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); }

/* 4. Markers */
.markers { background: linear-gradient(var(--bg), var(--bg-2) 30%, var(--bg-2) 70%, var(--bg)); }
.marker-stage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.msg.big {
  display: block; opacity: 1;
  font-size: clamp(13px, 1.3vw, 17.5px);
  padding: 1.3em 1.6em 1em;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 30px 70px -30px rgba(var(--text-rgb), .35);
}
.msg.big.reply-target { outline: 2px solid var(--primary-light); outline-offset: 3px; }
.msg.big p { padding-right: 5.2em; }
.msg.big .thumbs { right: 1.6em; bottom: 3.6em; }
.msg.big footer { display: flex; justify-content: space-between; align-items: center; margin-top: .9em; padding-top: .7em; border-top: 1px solid #f0f2ed; }
.att-tag { display: inline-flex; align-items: center; gap: .4em; padding: .2em .6em; border-radius: 4px; background: #f0f0f0; font-size: .75em; }
.att-tag svg { width: 1.1em; height: 1.2em; }
.acts { display: flex; gap: .4em; }
.act { position: relative; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 6px; color: #000; }
.act:hover { background: var(--primary-soft); }
.act svg { width: 1.15em; height: 1em; }
.act:last-child svg { width: .8em; height: .3em; }

/* Pins are placed on their detail by main.js (placePins). */
.pin {
  position: absolute; z-index: 2; left: 0; top: 0;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-strong); color: #fff;
  font: 600 12px Poppins, sans-serif;
  box-shadow: 0 0 0 4px rgba(var(--primary-light-rgb), .28);
  opacity: 0; transform: translate(-50%, -50%) scale(.4);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.4);
  transition-delay: calc(.25s + var(--d) * .22s);
}
.pin::before { content: attr(data-n); }
.reveal.in .pin { opacity: 1; transform: translate(-50%, -50%); }
/* Once they've all landed (home.js adds .rested), the pins fade back so the
   email reads cleanly. Pointing at a legend item, or at a pin, brings that
   pin back (home.js toggles .lit). */
.marker-stage.rested .pin { opacity: .2; transition: opacity .7s ease, transform .45s cubic-bezier(.2, .9, .3, 1.4); transition-delay: 0s; }
.marker-stage.rested .pin.lit { opacity: 1; transition-duration: .35s, .45s; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend li {
  position: relative; padding: 10px 0 10px 44px;
  opacity: 0; transform: translateX(14px);
  transition: opacity .4s ease, transform .5s ease;
  transition-delay: calc(.35s + var(--d) * .22s);
}
/* The number comes from data-n, not a counter: on phones the items go round. */
.legend li::before { content: attr(data-n); position: absolute; left: 0; top: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-strong); color: #fff; font: 600 12px Poppins, sans-serif; }
.legend b { display: block; font-size: 16px; font-weight: 600; }
.legend span { display: block; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.reveal.in .legend li { opacity: 1; transform: none; }
/* Phones: once the pins have landed, the legend turns like a ticker
   (home.js). The top item is the one being shown: solid, with its pin lit on
   the card. The rest sit at 80%. Every few seconds the list slides up one
   item, and the item that leaves the top goes round to the bottom. */
.legend.ticker { overflow: hidden; }
.reveal.in .legend.ticker li { opacity: .8; translate: 0 var(--shift, 0px); transition: opacity .4s ease, translate .6s cubic-bezier(.4, 0, .2, 1); transition-delay: 0s; }
.reveal.in .legend.ticker li.now { opacity: 1; }
.reveal.in .legend.ticker.snap li { transition: none; }
.section-head { position: relative; }
.stop-title { top: calc(-1 * (var(--topbar) + 24px)); } /* the title lands 24px below the top bar */
.closing { margin: calc(clamp(48px, 7vw, 88px) + 16px) auto 0; max-width: 30ch; text-align: center; font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; letter-spacing: -.02em; line-height: 1.35; }

/* 5. Who it's for */
.people-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); }
.people-col h3 { margin-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { position: relative; padding: 22px 44px 22px 0; cursor: pointer; list-style: none; font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; letter-spacing: -.01em; line-height: 1.35; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background-color: var(--primary-soft);
  background-image: linear-gradient(var(--primary-deep), var(--primary-deep)), linear-gradient(var(--primary-deep), var(--primary-deep));
  background-size: 10px 1.8px, 1.8px 10px;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .3s ease;
}
details[open] summary::after { transform: rotate(45deg); }
summary:hover { color: var(--primary-strong); }
summary:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 4px; border-radius: 4px; }
.persona { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; padding: 0 0 28px; }
.persona p { margin: -4px 0 0; font-size: 16px; color: var(--ink-2); max-width: 46ch; }
#for:not(.js-anim) details[open] .persona { animation: open .45s ease both; } /* without JavaScript */
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }
/* With JavaScript (site.js), opening a story is animated: the row grows, the
   words fade in, and the stream card follows 200ms later. Closing fades them
   out as the row shrinks. One story is open at a time. */
#for.js-anim details[open] summary::after { transform: none; }
#for.js-anim details.shown summary::after { transform: rotate(45deg); }
#for.js-anim .persona > p,
#for.js-anim .persona > :is(.mini-card, .mini-group, .mini-stream, .mini-deck) { opacity: 0; translate: 0 8px; transition: opacity .2s ease, translate .2s ease; }
#for.js-anim details.shown .persona > p { opacity: 1; translate: 0 0; transition: opacity .4s ease .12s, translate .5s cubic-bezier(.2, .8, .2, 1) .12s; }
#for.js-anim details.shown .persona > :is(.mini-card, .mini-group, .mini-stream, .mini-deck) { opacity: 1; translate: 0 0; transition: opacity .4s ease .32s, translate .5s cubic-bezier(.2, .8, .2, 1) .32s; }

/* Little Dash cards beside each story: the app's sidebar stream card, a
   stream group, a piece of a stream, or a stack of stream cards */
.mini-card, .mini-group, .mini-stream {
  width: 200px;
  background: #fff; border-radius: 8px;
  box-shadow: 0 14px 30px -14px rgba(var(--text-rgb), .35), 0 0 0 1px rgba(var(--text-rgb), .05);
  font-family: Poppins, sans-serif; line-height: 1.4;
  transform: rotate(1.5deg);
}
.mini-card { padding: 12px 12px 10px; }
.mini-card b { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mini-card .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.mini-card .chips span { padding: 2px 7px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: 9.5px; }
.mini-card .tags { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; font-size: 11px; }
.mini-card .tags svg { width: 13px; height: 14px; }
.mini-card dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 0; padding-top: 8px; border-top: 1px solid #f0f2ed; font-size: 10px; color: #333; }
.mini-card dd { margin: 0; font-weight: 500; }
.mini-group { overflow: hidden; padding-bottom: 4px; }
.mg-lid { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--primary-strong); color: #fff; font-size: 12px; }
.mg-lid b { font-weight: 600; }
.mg-lid span { font-size: 9.5px; opacity: .85; }
.mg-folder { display: flex; justify-content: space-between; align-items: center; margin: 8px 10px; padding: 8px 10px; border-radius: 6px; background: #fff; box-shadow: 0 3px 12px rgba(var(--text-rgb), .1); font-size: 11px; }
.mg-folder b { font-weight: 600; }
.mg-folder span { font-size: 9.5px; color: var(--primary-deep); }
/* A piece of a stream, drawn like the app's message-stream-list: the stream's
   name, its filter tags, and a few emails with their avatar, sender, subject,
   time, Unread label, Reply badge and attachments. */
.mini-stream { padding: 10px 10px 8px; }
.ms-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.ms-head b { overflow: hidden; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.ms-head span { flex: none; font-size: 9.5px; color: var(--primary-deep); }
.ms-filters { display: flex; gap: 4px; margin: 0 2px 6px; }
.ms-filters span { padding: 2px 6px; border: .5px solid rgba(var(--text-rgb), .45); border-radius: 4px; font-size: 9px; line-height: 13px; color: #333; white-space: nowrap; }
.ms-filters .on { border-color: var(--primary-strong); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.ms-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 7px; padding: 6px 2px; line-height: 1.3; }
.ms-row + .ms-row { border-top: 1px solid #f0f2ed; }
.ms-pic { grid-row: 1 / 3; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ms-pic i { width: 22px; height: 22px; border-radius: 50%; background: var(--av, var(--primary-light)); color: #fff; font: 500 9px/22px "Anek Latin", Poppins, sans-serif; font-style: normal; text-align: center; }
.ms-pic small { font: 500 6.5px/1 "Anek Latin", Poppins, sans-serif; letter-spacing: .4px; text-transform: uppercase; color: var(--primary-strong); }
.ms-row.own .ms-pic i { font-size: 8px; }
.ms-who { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; font-size: 10.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ms-who em { flex: none; padding: 0 4px; border-radius: 4px; background: #e0eaf3; color: #2c5184; font-size: 8px; font-style: normal; line-height: 13px; }
.ms-row time { padding-top: 2px; font-size: 8.5px; color: #8a918a; white-space: nowrap; }
.ms-sj { grid-column: 2 / 4; overflow: hidden; font-size: 10px; color: #4a524a; white-space: nowrap; text-overflow: ellipsis; }
.ms-att { grid-row: 3; grid-column: 2 / 4; justify-self: start; display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 1px 5px 1px 4px; border-radius: 2px; background: #f2f5f8; font-size: 9px; line-height: 14px; color: #333; }
.ms-att svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* The stream's reply bar, a small copy of the story window's .composer (the
   app's own): Type message, attachments, Reply all with its recipients, Send. */
.ms-composer { display: flex; align-items: center; gap: 6px; margin: 4px -10px -8px; padding: 8px 10px 8px 12px; border-radius: 0 0 8px 8px; background: #fff; box-shadow: 0 -6px 14px rgba(var(--primary-deep-rgb), .09); }
.ms-composer .ph { flex: 1; min-width: 0; font-size: 9.5px; }
.ms-composer .clip-ico { width: 12px; height: 12px; }
.ms-composer .reply-to b { font-size: 8.5px; }
.ms-composer .reply-to small { font-size: 7px; color: #333; }
.ms-composer .send { width: 24px; height: 24px; }
.ms-composer .send svg { width: 12px; height: 12px; }
/* Suppliers: a few supplier streams stacked like playing cards, each name
   showing above the card in front. Opening the story fans them out. */
.mini-deck { position: relative; width: 200px; margin-top: 54px; }
.mini-deck .mini-card { position: relative; }
.mini-deck .back { position: absolute; inset: 0; overflow: hidden; padding-top: 7px; transform-origin: 50% 100%; }
.mini-deck .b1 { transform: translate(-8px, -54px) rotate(-1deg); }
.mini-deck .b2 { transform: translate(8px, -27px) rotate(2.5deg); }
#for.js-anim .mini-deck .back { transform: rotate(1.5deg); transition: transform .2s ease; }
#for.js-anim details.shown .mini-deck .b1 { transform: translate(-8px, -54px) rotate(-1deg); transition: transform .6s cubic-bezier(.2, .8, .2, 1) .62s; }
#for.js-anim details.shown .mini-deck .b2 { transform: translate(8px, -27px) rotate(2.5deg); transition: transform .6s cubic-bezier(.2, .8, .2, 1) .5s; }
/* Trip: five emails arrive as separate cards, newest first, the way an inbox
   lists them. They gather into one stream, in the order they were sent, and
   the stream's card and name appear around them. Then the stream scrolls up
   to the newest email, and the reply line appears below it. The stream shows
   its last three emails (.ms-view), so the card stays short on phones. */
.gather .ms-view { height: 125px; clip-path: inset(0 -10px); }
.gather .ms-list { transform: translateY(var(--scroll)); }
#for.js-anim .persona > .mini-stream.gather { background-color: transparent; box-shadow: none; transition: opacity .2s ease, translate .2s ease, background-color 0s .45s, box-shadow 0s .45s; }
#for.js-anim details.shown .persona > .mini-stream.gather {
  background-color: #fff;
  box-shadow: 0 14px 30px -14px rgba(var(--text-rgb), .35), 0 0 0 1px rgba(var(--text-rgb), .05);
  transition: opacity .4s ease .32s, translate .5s cubic-bezier(.2, .8, .2, 1) .32s, background-color .4s ease 1.95s, box-shadow .4s ease 1.95s;
}
#for.js-anim .gather .ms-head { opacity: 0; transition: opacity 0s .45s; }
#for.js-anim details.shown .gather .ms-head { opacity: 1; transition: opacity .4s ease 2.05s; }
/* The view clips nothing while the emails are loose. Once they line up, it
   clips at the card's edges, so the newest email waits at the bottom, inside
   the card, until the stream scrolls it up. Then it clips above the reply. */
#for.js-anim .gather .ms-view { clip-path: inset(-40px -60px -80px); }
#for.js-anim details.shown .gather .ms-view { animation: gather-clip 3s linear both; }
@keyframes gather-clip {
  0%, 62% { clip-path: inset(-40px -60px -80px); }
  66%, 96% { clip-path: inset(0 -10px -44px); }
  100% { clip-path: inset(0 -10px 0); }
}
#for.js-anim .gather .ms-list { transform: none; transition: transform 0s .45s; }
#for.js-anim details.shown .gather .ms-list { transform: translateY(var(--scroll)); transition: transform .65s cubic-bezier(.4, 0, .2, 1) 2.2s; }
#for.js-anim .gather .ms-composer { opacity: 0; translate: 0 6px; transition: opacity 0s .45s, translate 0s .45s; }
#for.js-anim details.shown .gather .ms-composer { opacity: 1; translate: 0 0; transition: opacity .35s ease 2.85s, translate .45s cubic-bezier(.2, .8, .2, 1) 2.85s; }
#for.js-anim .gather .ms-row {
  opacity: 0;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 6px 16px -6px rgba(var(--text-rgb), .35), 0 0 0 1px rgba(var(--text-rgb), .07);
  border-top-color: transparent;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: opacity 0s .45s, transform 0s .45s, background-color 0s .45s, box-shadow 0s .45s, border-top-color 0s .45s;
}
#for.js-anim details.shown .gather .ms-row {
  opacity: 1;
  background-color: transparent;
  box-shadow: none;
  border-top-color: #f0f2ed;
  transform: none;
  transition:
    opacity .3s ease calc(.4s + (5 - var(--i)) * .1s),
    transform .7s cubic-bezier(.65, 0, .25, 1) calc(1.2s + var(--i) * .05s),
    background-color .3s ease 1.85s, box-shadow .3s ease 1.85s, border-top-color .3s ease 1.9s;
}
/* Best friend: the stream never expires. A highlight sweeps in behind
   "Never", and an infinity sign keeps tracing itself. */
.mini-card dd.never { display: inline-flex; align-items: center; gap: 5px; justify-self: end; margin: -3px -6px; padding: 2px 6px; border-radius: 4px; font-size: 12px; transform-origin: 100% 50%; background: linear-gradient(var(--primary-soft), var(--primary-soft)) no-repeat 0 0 / 100% 100%; color: var(--primary-deep); font-weight: 600; }
.never svg { width: 22px; height: 11px; overflow: visible; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.never .inf-base { stroke: color-mix(in srgb, var(--primary-strong) 28%, transparent); }
.never .inf-run { stroke: var(--primary-strong); stroke-dasharray: 28 72; animation: forever 2.6s linear infinite; }
@keyframes forever { to { stroke-dashoffset: -100; } }
#for.js-anim .never { background-size: 0% 100%; transition: background-size 0s .45s; }
#for.js-anim details.shown .never { background-size: 100% 100%; transition: background-size .6s cubic-bezier(.2, .8, .2, 1) .95s; animation: never-pop .6s cubic-bezier(.3, 1.5, .5, 1) 1.2s both; }
@keyframes never-pop { 40% { scale: 1.14; } }
#for.js-anim .never .inf-run { opacity: 0; animation-play-state: paused; transition: opacity 0s .45s; }
#for.js-anim details.shown .never .inf-run { opacity: 1; animation-play-state: running; transition: opacity .4s ease 1.15s; }
@media (max-width: 560px) {
  .persona { grid-template-columns: 1fr; gap: 18px; }
  .mini-card, .mini-group, .mini-stream { transform: none; }
}

/* 6. The little things */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.tile { padding: 16px 16px 26px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px -36px rgba(var(--text-rgb), .4); transition: transform .3s ease, box-shadow .3s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 26px 60px -34px rgba(var(--text-rgb), .45); }
.tile > h3 { margin: 22px 10px 8px; font-size: clamp(19px, 1.7vw, 22px); font-weight: 600; letter-spacing: -.015em; }
.tile > p { margin: 0 10px; font-size: 15.5px; color: var(--ink-2); }

/* Each demo is a small piece of the real app, drawn at 520×325 and scaled
   to fit the card by site.js. */
.demo { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; background: var(--bg-2); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(var(--text-rgb), .06); }
.demo-stage {
  position: absolute; left: 0; top: 0;
  width: 520px; height: 325px;
  transform-origin: 0 0;
  overflow: hidden;
  background: #f9faf9;
  font-family: Poppins, sans-serif; color: #000; line-height: 1.4;
}
.demo * { animation-play-state: paused !important; }
@media (hover: hover) {
  .tile:hover .demo * { animation-play-state: running !important; }
  /* A one-time cue on the first demo only (site.js adds it): as the demos
     come into view it darkens with "Hover to play" in the middle, then fades
     out after a moment, or as soon as the pointer moves onto it. */
  .demo-cue {
    position: absolute; inset: 0; z-index: 30;
    display: grid; place-items: center;
    background: rgba(var(--text-rgb), .6); color: #fff;
    font: 500 15px Poppins, sans-serif;
    opacity: 0; pointer-events: none;
    transition: opacity .6s ease;
  }
  .demo-cue.on { opacity: 1; transition-duration: .35s; }
}
.tile.playing .demo * { animation-play-state: running !important; }

.demo .row { position: relative; height: 46px; transform: none; transition: none; overflow: hidden; }
.demo .row p { display: none; }
.ds-search .row.hit { height: 58px; }
.ds-search .row.hit p { display: block; }
.demo .caret { display: inline-block; }
.ds-cursor { position: absolute; z-index: 20; left: 60%; top: 80%; width: 15px; height: 17px; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.ds-cursor svg { width: 100%; height: 100%; }
.ds-lhead { position: relative; height: 38px; padding: 7px 14px 0; background: #fff; border-bottom: 1px solid #f0f2ed; }
.ds-lhead b { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; }
.ds-lhead small { display: block; font-size: 7.5px; color: var(--accent); }
.ds-type, .ds-q { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; max-width: 0; }

/* Look back while you write */
.ds-head { position: relative; height: 46px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #f0f2ed; }
.ds-head b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; color: color-mix(in srgb, var(--primary-deep) 70%, var(--text)); }
.ds-head small { display: block; font-size: 8.5px; color: var(--accent); }
.ds-burger { position: absolute; right: 14px; top: 16px; display: grid; gap: 3px; width: 16px; animation: lookBurger 9s ease infinite; }
.ds-burger i { display: block; height: 2px; border-radius: 2px; background: #333; }
.ds-trail { position: absolute; top: 46px; bottom: 56px; left: 0; right: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 10px 18px 10px 30px; overflow: hidden; } /* messages never ride up over the title */
.ds-composer { position: absolute; left: 0; right: 0; bottom: 0; }
.ds-look .ds-type-a { animation: lookA 9s steps(26) infinite; }
.ds-look .ds-type-b { animation: lookB 9s steps(20) infinite; }
.ds-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: 262px; padding-top: 12px; background: #fff; box-shadow: -10px 4px 19px rgba(0, 0, 0, .1); transform: translateX(102%); animation: lookSide 9s cubic-bezier(.2, .8, .2, 1) infinite; }
.ds-side-head { padding: 0 14px 8px; border-bottom: 1px solid #e4e7dd; }
.ds-side-head b { display: block; font-size: 15px; font-weight: 700; }
.ds-side-head small { font-size: 8.5px; }
.ds-side-head em { font-style: normal; color: var(--primary); margin-right: 6px; }
.ds-date { padding: 6px 0 2px; text-align: center; font-size: 8.5px; }
.ds-hrow { display: flex; gap: 8px; padding: 6px 12px; border-bottom: 1px solid #f0f2ed; }
.ds-hrow .av { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--primary-rgb), .8); color: #fff; font: 700 11px "Anek Latin", sans-serif; }
.ds-hrow .rb { flex: 1; min-width: 0; }
.ds-hrow .nm { font-size: 10px; }
.ds-hrow time { font-size: 8px; }
.ds-hrow .sj { font-size: 10px; }
.ds-hrow p { margin: 1px 0 0; font-size: 9.5px; color: rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-hrow mark { padding: 0 1px; border-radius: 3px; background: transparent; animation: lookMark 9s ease infinite; }
.ds-look .ds-cursor { animation: lookCursor 9s ease infinite; }
@keyframes lookA { 0%, 3% { max-width: 0; } 20%, 100% { max-width: 190px; } }
@keyframes lookB { 0%, 70% { max-width: 0; } 88%, 100% { max-width: 150px; } }
@keyframes lookSide { 0%, 28% { transform: translateX(102%); } 34%, 62% { transform: none; } 68%, 100% { transform: translateX(102%); } }
@keyframes lookMark { 0%, 40% { background: transparent; } 45%, 62% { background: #f3e3a1; } 68%, 100% { background: transparent; } }
@keyframes lookBurger { 0%, 25% { transform: none; } 28% { transform: scale(1.3); } 31%, 100% { transform: none; } }
@keyframes lookCursor {
  0%, 20% { left: 52%; top: 86%; transform: none; }
  26% { left: 95.6%; top: 6.5%; transform: none; }
  28% { left: 95.6%; top: 6.5%; transform: scale(.82); }
  30% { left: 95.6%; top: 6.5%; transform: none; }
  40%, 60% { left: 69%; top: 29%; }
  67%, 100% { left: 44%; top: 86%; }
}

/* Your draft waits for you */
.ds-folders { position: absolute; left: 0; top: 0; bottom: 0; width: 132px; padding: 12px 10px; background: #fff; border-right: 1px solid #eef0ea; }
.ds-folders .acct b { display: block; font-size: 10.5px; font-weight: 600; }
.ds-folders .acct small { display: block; font-size: 8px; color: var(--accent); }
.ds-folders ul { list-style: none; margin: 14px 0 0; padding: 0; }
.ds-folders li { position: relative; padding: 6px 8px 6px 14px; border-radius: 4px; font-size: 10.5px; }
.ds-folders li::before { content: ""; position: absolute; left: 5px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: #000; }
.ds-folders li em { font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: var(--primary-light); color: #fff; font-size: 8px; }
.ds-folders .f-inbox { animation: draftInbox 9s ease infinite; }
.ds-main { position: absolute; left: 132px; right: 0; top: 0; bottom: 0; }
.ds-reader, .ds-list { position: absolute; inset: 0; background: #fff; }
.ds-reader { padding: 14px 18px; animation: draftReader 9s ease infinite; }
.ds-reader h4 { margin: 10px 0 6px; font-size: 13px; font-weight: 600; }
.ds-reader p { margin: 0 0 12px; font-size: 11px; color: #222; }
.ds-reply { padding: 10px 12px; border: 1px solid var(--primary-border); border-radius: 8px; font-size: 11px; line-height: 1.55; box-shadow: 0 8px 18px -12px rgba(var(--text-rgb), .35); }
.ds-reply small { display: block; margin-bottom: 4px; font-size: 9px; font-weight: 500; color: var(--primary); }
.ds-list { opacity: 0; animation: draftList 9s ease infinite; }
.ds-pill {
  position: absolute; right: 16px; bottom: 16px; z-index: 6;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 10px; border-radius: 999px;
  background: var(--primary); color: #fff;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), .35);
  font-size: 11.5px; line-height: 1.2;
  opacity: 0; transform: scale(.6); transform-origin: 100% 100%;
  animation: draftPill 9s cubic-bezier(.2, .9, .3, 1.3) infinite;
}
.draft-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.draft-icon svg { width: 12px; height: 12px; }
.draft-title { font-weight: 600; }
.draft-sender { font-size: 10.5px; opacity: .85; }
.ds-draft .ds-cursor { animation: draftCursor 9s ease infinite; }
@keyframes draftReader { 0%, 22% { opacity: 1; } 26%, 54% { opacity: 0; } 58%, 100% { opacity: 1; } }
@keyframes draftList { 0%, 22% { opacity: 0; } 26%, 54% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes draftInbox { 0%, 20% { background: transparent; font-weight: 400; } 22%, 54% { background: var(--primary-soft); font-weight: 600; } 58%, 100% { background: transparent; font-weight: 400; } }
@keyframes draftPill { 0%, 28% { opacity: 0; transform: scale(.6); } 33%, 50% { opacity: 1; transform: none; } 52% { opacity: 1; transform: scale(.93); } 54% { opacity: 1; transform: none; } 58%, 100% { opacity: 0; transform: scale(.6); } }
@keyframes draftCursor {
  0%, 6% { left: 60%; top: 74%; transform: none; }
  18% { left: 7%; top: 19%; transform: none; }
  20% { left: 7%; top: 19%; transform: scale(.82); }
  22%, 36% { left: 7%; top: 19%; transform: none; }
  50% { left: 75%; top: 88%; transform: none; }
  52% { left: 75%; top: 88%; transform: scale(.82); }
  54%, 70% { left: 75%; top: 88%; transform: none; }
  84%, 100% { left: 64%; top: 72%; }
}

/* Group without the shuffle (from the live Group filter) */
.ds-gbar {
  display: flex; align-items: center; gap: 10px;
  height: 0; margin: 0 12px; padding: 0 8px 0 10px;
  overflow: hidden; opacity: 0;
  border: 0 solid var(--primary-border); border-left: 3px solid var(--primary);
  border-radius: 8px; background: var(--primary-soft);
  animation: groupBar 9s ease infinite;
}
.gb-av { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--primary-rgb), .85); color: #fff; font: 700 12px "Anek Latin", sans-serif; }
.gb-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gb-eyebrow { font: 500 7.5px "Anek Latin", Poppins, sans-serif; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); }
.gb-name { font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.gb-meta { font-size: 9.5px; color: rgba(0, 0, 0, .6); }
.gb-exit { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 5px 3px 9px; border: 1px solid var(--primary-border); border-radius: 999px; background: #fff; color: var(--primary-deep); font-size: 9.5px; font-weight: 500; animation: groupExit 9s ease infinite; }
.gb-exit i { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: rgba(var(--primary-deep-rgb), .12); font-style: normal; font-size: 10px; line-height: 1; }
.ds-group .row.x { animation: groupHide 9s ease infinite; }
.ds-group .row.p:first-child { animation: groupPick 9s ease infinite; }
.ds-chips { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; gap: 6px; }
.chip-f { padding: 2px 6px; border: .5px solid #000; border-radius: 4px; background: #fff; font-size: 9px; white-space: nowrap; }
.chip-group { animation: groupChip 9s ease infinite; }
.ds-menu { position: absolute; left: 36%; top: 23%; z-index: 8; display: grid; padding: 5px; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); font-size: 10.5px; opacity: 0; transform-origin: 0 0; animation: groupMenu 9s ease infinite; }
.ds-menu span { padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.ds-menu span.on { animation: groupMenuOn 9s ease infinite; }
.ds-group .ds-cursor { animation: groupCursor 9s ease infinite; }
@keyframes groupBar {
  0%, 36% { height: 0; opacity: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; }
  42%, 76% { height: 46px; opacity: 1; margin-top: 8px; margin-bottom: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; }
  82%, 100% { height: 0; opacity: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; }
}
@keyframes groupHide {
  0%, 30% { height: 46px; padding-top: 7px; padding-bottom: 7px; opacity: 1; border-bottom-width: 1px; }
  40%, 80% { height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-width: 0; }
  90%, 100% { height: 46px; padding-top: 7px; padding-bottom: 7px; opacity: 1; border-bottom-width: 1px; }
}
@keyframes groupPick { 0%, 16% { background: #fff; } 18%, 28% { background: var(--primary-soft); } 32%, 100% { background: #fff; } }
@keyframes groupChip { 0%, 32% { font-weight: 400; background: #fff; } 36%, 80% { font-weight: 700; background: var(--primary-soft); } 84%, 100% { font-weight: 400; background: #fff; } }
@keyframes groupMenu { 0%, 17% { opacity: 0; transform: scale(.92); } 19%, 27% { opacity: 1; transform: none; } 29%, 100% { opacity: 0; transform: scale(.92); } }
@keyframes groupMenuOn { 0%, 21% { background: transparent; } 23%, 28% { background: var(--primary-soft); } 30%, 100% { background: transparent; } }
@keyframes groupExit { 0%, 75% { transform: none; } 77% { transform: scale(.92); } 79%, 100% { transform: none; } }
@keyframes groupCursor {
  0%, 6% { left: 62%; top: 82%; transform: none; }
  15% { left: 35%; top: 20%; transform: none; }
  17% { left: 35%; top: 20%; transform: scale(.82); }
  18% { left: 35%; top: 20%; transform: none; }
  24% { left: 44%; top: 27.5%; transform: none; }
  26% { left: 44%; top: 27.5%; transform: scale(.82); }
  28% { left: 44%; top: 27.5%; transform: none; }
  64% { left: 62%; top: 62%; }
  74% { left: 88.5%; top: 20%; transform: none; }
  77% { left: 88.5%; top: 20%; transform: scale(.82); }
  78% { left: 88.5%; top: 20%; transform: none; }
  92%, 100% { left: 62%; top: 82%; }
}

/* Find exactly what you typed */
.ds-search .row.x { animation: searchHide 9s ease infinite; }
.ds-search .row.hit mark { padding: 0 1px; border-radius: 3px; background: transparent; animation: searchMark 9s ease infinite; }
.ds-searchbar { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid #e4e7dd; border-radius: 6px; background: #fff; font-size: 11px; box-shadow: 0 -6px 16px -10px rgba(var(--text-rgb), .25); }
.ds-searchbar svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.ds-ph { position: absolute; left: 34px; color: #abb6b2; animation: searchPh 9s ease infinite; }
.ds-search .ds-q { animation: searchType 9s steps(4) infinite; }
@keyframes searchPh { 0%, 9% { opacity: 1; } 10%, 88% { opacity: 0; } 90%, 100% { opacity: 1; } }
@keyframes searchType { 0%, 10% { max-width: 0; } 24%, 86% { max-width: 30px; } 90%, 100% { max-width: 0; } }
@keyframes searchHide {
  0%, 28% { height: 46px; padding-top: 7px; padding-bottom: 7px; opacity: 1; border-bottom-width: 1px; }
  38%, 84% { height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-width: 0; }
  94%, 100% { height: 46px; padding-top: 7px; padding-bottom: 7px; opacity: 1; border-bottom-width: 1px; }
}
@keyframes searchMark { 0%, 34% { background: transparent; } 40%, 84% { background: #f3e3a1; } 90%, 100% { background: transparent; } }

/* 7. Try it */
.cta { position: relative; overflow: hidden; padding: clamp(96px, 13vw, 170px) 0; background: var(--primary-strong); color: #fff; text-align: center; }
.cta-leaf { position: absolute; right: -40px; top: -60px; width: 340px; opacity: .5; }
.cta .wrap { position: relative; z-index: 1; }
@media (max-width: 720px) { .cta-leaf { width: 220px; right: -70px; opacity: .35; } }
.cta h2 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; max-width: 18ch; margin: 0 auto; }
.cta p { margin: 18px auto 34px; font-size: clamp(16px, 1.4vw, 19px); color: rgba(255, 255, 255, .82); }

/* 8. Footer */
.foot { padding: 28px 0 36px; }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* =========================================================
   Pages: Privacy, Terms, Contact, 404
   ========================================================= */
.page-hero { position: relative; overflow: hidden; padding: calc(var(--topbar) + clamp(56px, 9vw, 110px)) 0 clamp(40px, 6vw, 64px); }
.page-leaf { position: absolute; right: -50px; top: 30px; width: clamp(150px, 18vw, 230px); opacity: .45; }
.page-hero .wrap { position: relative; }
.eyebrow { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.page-hero h1 { max-width: 16ch; font-size: clamp(40px, 6vw, 78px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.page-hero p { margin: 18px 0 0; max-width: 54ch; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; color: var(--ink-2); }
.page-hero .page-meta { margin-top: 12px; font-size: 14px; font-weight: 400; color: var(--muted); }
.draft-note { max-width: 760px; margin-top: 26px; padding: 14px 16px; border: 1px solid #f1df9c; border-radius: 12px; background: #fff8dc; color: #5c4a10; font-size: 14.5px; line-height: 1.55; }
.draft-note b { font-weight: 600; }
.todo { padding: 0 .3em; border-radius: 4px; background: #fff1b8; color: #6b4e00; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-bottom: clamp(80px, 10vw, 140px); }
.toc { position: sticky; top: calc(var(--topbar) + 24px); font-size: 14px; }
.toc b { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.35; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.toc a:hover { color: var(--ink); }
.toc a.on { border-left-color: var(--primary); color: var(--ink); font-weight: 500; }
.doc { min-width: 0; max-width: 70ch; }
.doc section { margin-bottom: 46px; scroll-margin-top: calc(var(--topbar) + 24px); }
.doc h2 { margin-bottom: 14px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.doc h3 { margin: 24px 0 8px; font-size: 17px; font-weight: 600; }
.doc p, .doc li { font-size: 16.5px; color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--primary); }
.doc b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--primary-deep); text-underline-offset: 3px; }
.doc code { padding: .1em .35em; border-radius: 4px; background: var(--primary-soft); color: var(--primary-deep); font: .86em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.doc .summary { padding: 22px 24px 8px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 20px 50px -40px rgba(var(--text-rgb), .4); }
.doc .summary h2 { font-size: 19px; }
.table-wrap { overflow-x: auto; margin: 6px 0 18px; }
.doc table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); }
.doc td code { white-space: nowrap; overflow-wrap: normal; }
.doc th { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 24px); padding-bottom: clamp(80px, 10vw, 140px); }
.contact-card { padding: 28px 28px 30px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 20px 50px -36px rgba(var(--text-rgb), .4); }
.contact-card .ico { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 13px; background: var(--primary-soft); }
.contact-card .ico svg { width: 22px; height: 22px; fill: none; stroke: var(--primary-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-card h2 { margin-bottom: 8px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.contact-card p { margin: 0 0 18px; font-size: 15.5px; color: var(--ink-2); }
.contact-card a:not(.btn) { color: var(--primary-deep); }
.contact-card .todo { font-size: 15.5px; font-weight: 500; }

.lost { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--topbar) + 40px) 20px 60px; text-align: center; }
.lost h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.lost > div > p { margin: 14px 0 0; font-size: 18px; color: var(--ink-2); }
.lost-card.msg.big { max-width: 520px; margin: 34px auto 32px; text-align: left; transform: rotate(-1deg); }
.lost-card.msg.big p { padding-right: 0; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
  .toc ol { columns: 2; column-gap: 20px; border: 0; }
  .toc a { margin: 0; padding: 4px 0; border: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .toc ol { columns: 1; } }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .marker-stage { grid-template-columns: 1fr; }
  .people-cols { grid-template-columns: 1fr; gap: 40px; }
  .tiles { grid-template-columns: 1fr; }
  .msg.big { font-size: 12.5px; padding: 1.2em 1.2em .9em; }
  .msg.big p { padding-right: 4.6em; }
}
@media (max-width: 520px) {
  .topbar .link { display: none; }
  .wrap { padding: 0 16px; }
  .hero-copy { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Reduced motion: still frames, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
  .scroll-cue i { animation: none; }
  .theme-pick * { transition-delay: 0s !important; }
  .lost-ping { animation: none !important; } /* the rest still appears in order, without movement */
  .demo * { animation: none !important; }
  .ds-cursor { display: none; }
  .ds-type, .ds-q { max-width: none; }
  .ds-side { transform: none; }
  .ds-hrow mark, .ds-search .row.hit mark { background: #f3e3a1; }
  .ds-draft .ds-reader { opacity: 0; }
  .ds-draft .ds-list, .ds-pill { opacity: 1; transform: none; }
  .ds-gbar { height: 46px; opacity: 1; margin: 8px 12px 4px; border-width: 1px 1px 1px 3px; }
  .ds-group .row.x, .ds-search .row.x { height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; }
  .ds-ph { opacity: 0; }
}
