/* The main page (mainpage.html): Margin's promise, the product shown live, the facts, plans and who we are.
   Built from the Margin palette in css/theme.css; green and red only where a P&L is shown. Motion lives at the end
   of this file; js/mainpage.js feeds it the scroll (--p hero, --q P&L band) and the pointer (--lx/--ly, --tx/--ty). */

.landing {
  --page: #F7F7F8;
  --body-text: #4A4A52;
  --glass: color-mix(in srgb, #FFFFFF 72%, transparent);
  --tile: #FFFFFF;
  --tile-edge: inset 0 0 0 1px rgba(17,17,19,.06);
  --well: #F4F4F5;
  --wrap: 1180px;
  background: var(--page);
  color: var(--ink);
  overflow-x: clip;
}
.landing main { display: block; padding: 0; }
.landing h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.045em; }
.landing h3 { font-size: 19px; letter-spacing: -0.02em; }
:where(.landing) p { margin: 0; }
.landing .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.landing section[id] { scroll-margin-top: 84px; }
.landing .story { scroll-margin-top: 0; }

/* the keyboard focus ring stays visible on the dark band and the dark plan */
.dark-band :focus-visible, .plan.featured :focus-visible { outline-color: #F4F4F5; }
:root[data-theme="dark"] .plan.featured :focus-visible { outline-color: #111113; }

/* P&L: green and red on light grounds; on dark ones Paper with a Profit/Loss dot */
.landing .up { color: var(--gain); }
.landing .dn { color: var(--loss); }
.landing .tw { color: var(--gain); }
.landing .tl { color: var(--loss); }
.fill.total .up, :root[data-theme="dark"] .landing .up, :root[data-theme="dark"] .landing .dn { color: inherit; }
.fill.total .up::before, :root[data-theme="dark"] .landing .up::before, :root[data-theme="dark"] .landing .dn::before {
  content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-right: 0.38em; border-radius: 50%; vertical-align: 0.12em; background: #15803D;
}
:root[data-theme="dark"] .landing .dn::before { background: #B91C1C; }
:root[data-theme="dark"] .landing .tw, :root[data-theme="dark"] .landing .tl { color: inherit; }

/* the floating navigation: glass that the page scrolls under */
.nav-wrap { position: fixed; inset: 12px 0 auto; z-index: 50; padding: 0 16px; pointer-events: none; }
.nav {
  pointer-events: auto; position: relative;
  max-width: var(--wrap); margin: 0 auto; height: 56px; padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 24px;
  border-radius: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(17,17,19,.06);
  transition: box-shadow 200ms ease, background-color 200ms ease;
}
.nav.scrolled { box-shadow: inset 0 0 0 1px rgba(17,17,19,.06), 0 10px 30px -18px rgba(17,17,19,.35); }
.nav-progress { position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--ink); opacity: .55; transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -0.06em; color: var(--ink); }
.mark-tile { display: block; width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.nav-link:hover, .nav-link.on, .nav-link[aria-expanded="true"] { color: var(--ink); background: rgba(17,17,19,.05); }
.nav-link svg { transition: transform 200ms var(--ease-out); }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-drop { position: relative; }
/* the product menu: comes down out of its button */
.drop-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 520px; margin-left: -260px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px;
  border-radius: 18px; background: var(--tile);
  box-shadow: inset 0 0 0 1px rgba(17,17,19,.06), 0 30px 60px -24px rgba(17,17,19,.4);
  transform-origin: 50% 0;
}
.drop-panel::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.drop-panel a { display: grid; gap: 3px; padding: 14px 16px; border-radius: 12px; transition: background-color 150ms ease; }
.drop-panel a:hover { background: var(--well); }
.drop-panel b { font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.drop-panel span { font-size: 13px; color: var(--muted); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-login { padding: 8px 12px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.nav-login:hover { color: var(--ink); }
.nav-burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.nav-burger i { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 260ms var(--ease-out); }
.nav-burger i:first-child { top: 15px; }
.nav-burger i:last-child { top: 23px; }
.nav-burger[aria-expanded="true"] i:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] i:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav-sheet {
  pointer-events: auto; max-width: var(--wrap); margin: 8px auto 0; padding: 10px;
  display: grid; gap: 2px; border-radius: 18px; background: var(--tile);
  box-shadow: inset 0 0 0 1px rgba(17,17,19,.06), 0 30px 60px -24px rgba(17,17,19,.4);
  transform-origin: 50% 0;
}
.nav-sheet a:not(.pill) { padding: 13px 14px; border-radius: 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.nav-sheet a:not(.pill):hover { background: var(--well); }
.nav-sheet .pill { margin-top: 6px; }
@media (max-width: 860px) {
  .nav-links, .nav-login { display: none; }
  .nav { gap: 8px; }
  .nav-actions { margin-left: auto; }
  .nav-burger { display: block; }
}
@media (min-width: 861px) { .nav-sheet { display: none; } }

/* pills: the page's buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease;
}
.pill.big { padding: 15px 24px; font-size: 16px; }
.pill.dark { background: var(--ink); color: #F4F4F5; box-shadow: 0 1px 2px rgba(17,17,19,.2), 0 10px 24px -12px rgba(17,17,19,.6); }
.pill.dark:hover { background: #26262A; color: #FFFFFF; }
.pill.light { background: #FFFFFF; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(17,17,19,.1); }
.pill.light:hover { background: #FAFAFA; color: var(--ink); }
.pill:active { transform: scale(0.97); }
.pill svg { transition: transform 200ms var(--ease-out); }
.pill:hover svg { transform: translateX(3px); }

/* hero */
.hero { position: relative; padding: 148px 20px 40px; text-align: center; }
.hero::before {
  /* a soft light behind the headline */
  content: ""; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 28%, #FFFFFF 0%, rgba(255,255,255,0) 72%);
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px;
  background: var(--tile); box-shadow: var(--tile-edge); font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.hero-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.hero-title { margin: 26px auto 0; font-size: clamp(48px, 8.4vw, 112px); line-height: 0.96; letter-spacing: -0.055em; font-weight: 800; }
.hero-title .line { display: block; }
.hero-title .soft-line { color: #8E8E96; }
/* the soft line's fade is drawn on every letter, so it survives being split */
.hero-title .soft-line .ch, .hero-title .soft-line:not(:has(.ch)) {
  background: linear-gradient(180deg, #6B6B73 0%, #A1A1AA 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.1em; margin-bottom: -0.1em;
}
.split .w { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; }
.hero-copy { max-width: 560px; margin: 26px auto 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--body-text); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }

/* the dashboard shot: the real dashboard's pieces, standing in depth (each has its own --z) */
.stage-wrap { --p: 1; position: relative; max-width: var(--wrap); margin: 72px auto 0; perspective: 2000px; perspective-origin: 50% 0; }
.shot {
  --s-bg: #F4F4F5; --s-card: #FFFFFF; --s-ink: #111113; --s-ink-3: #4A4A52; --s-muted: #6B6B73; --s-edge: rgba(17,17,19,.06); --s-well: rgba(17,17,19,.06);
  position: relative; border-radius: 22px; text-align: left;
  background: #0C0C0E; color: var(--s-ink);
  box-shadow: 0 0 0 1px rgba(17,17,19,.08), 0 60px 120px -40px rgba(17,17,19,.55), 0 20px 40px -20px rgba(17,17,19,.35);
  transform-style: preserve-3d;
  transform-origin: 50% 30%;
  transform: rotateX(calc((1 - var(--p)) * 24deg + var(--lx, 0deg))) rotateY(var(--ly, 0deg)) scale(calc(0.9 + var(--p) * 0.1));
  will-change: transform;
}
.shot-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 22px 22px 0 0; background: #111113; border-bottom: 1px solid #26262A; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2E2E33; }
.shot-bar span { margin-left: 12px; font-size: 12px; font-weight: 600; color: #8E8E96; }
.shot-body, .shot-main, .shot-kpis, .shot-grid { transform-style: preserve-3d; }
.shot-body { display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.shot-side {
  display: grid; align-content: start; gap: 3px; padding: 18px 12px; border-radius: 0 0 0 22px;
  background: linear-gradient(160deg, #26262A 0%, #0C0C0E 75%); color: #F4F4F5;
}
.shot-side small { margin: 12px 8px 4px; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8E8E96; }
.shot-brand { display: flex; align-items: center; gap: 8px; margin: 0 6px 12px; font-weight: 800; letter-spacing: -0.06em; font-size: 17px; }
.shot-new { padding: 8px; border-radius: 9px; background: #F4F4F5; color: #111113; font-size: 12px; font-weight: 700; text-align: center; }
.shot-pick { padding: 8px 10px; border-radius: 9px; background: rgba(244,244,245,.08); font-size: 12px; font-weight: 700; }
.shot-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #C4C4CA; }
.shot-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.shot-link.on { background: rgba(244,244,245,.1); color: #F4F4F5; }
.shot-main { display: grid; gap: 14px; align-content: start; padding: 22px 24px 24px; border-radius: 0 0 22px 0; background: var(--s-bg); }
.shot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.shot-head strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.045em; }
.shot-head strong span { font-weight: 400; color: var(--s-muted); }
.shot-head em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--s-muted); }
.shot-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--s-well); }
.shot-seg i { font-style: normal; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 600; color: var(--s-muted); }
.shot-seg i.on { background: var(--s-card); color: var(--s-ink); box-shadow: 0 1px 2px rgba(17,17,19,.1); }
.shot-kpis { display: grid; grid-template-columns: 1.35fr repeat(5, minmax(0, 1fr)); gap: 10px; }
.shot-kpi, .shot-card {
  display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 16px;
  background: var(--s-card); box-shadow: inset 0 0 0 1px var(--s-edge), 0 1px 2px rgba(17,17,19,.04);
  transform: translateZ(calc((1 - var(--p)) * var(--z, 60px)));
}
.shot-kpi:nth-child(1) { --z: 120px; }
.shot-kpi:nth-child(2) { --z: 70px; }
.shot-kpi:nth-child(3) { --z: 95px; }
.shot-kpi:nth-child(4) { --z: 55px; }
.shot-kpi:nth-child(5) { --z: 85px; }
.shot-kpi:nth-child(6) { --z: 65px; }
.shot-kpi.center { justify-items: center; text-align: center; }
.shot-kpi small, .shot-card small { justify-self: stretch; text-align: left; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--s-muted); }
.shot-kpi b { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.shot-kpi b.big { font-size: 27px; font-weight: 800; letter-spacing: -0.045em; }
.shot-kpi em { font-style: normal; font-size: 10px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.shot-split { display: block; height: 5px; margin: 2px 0; border-radius: 3px; background: linear-gradient(90deg, #15803D var(--w), #B91C1C var(--w)); }
.shot-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 10px; }
.shot-card.night { --z: 40px; padding: 14px 16px 10px; background: linear-gradient(160deg, #2E2E33 0%, #111113 75%); box-shadow: none; }
.shot-card.night small { color: #A1A1AA; }
.shot-card.score { --z: 100px; justify-items: center; }
.shot-card.score b { margin-top: -6px; font-size: 30px; font-weight: 800; letter-spacing: -0.05em; }
.shot-card.daily { --z: 30px; }
.shot-equity { width: 100%; height: 190px; display: block; overflow: visible; }
.shot-equity .eq-grid { stroke: #2E2E33; stroke-width: 1; vector-effect: non-scaling-stroke; }
.shot-equity .eq-line { fill: none; stroke: #F4F4F5; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.shot-equity .eq-end { fill: #F4F4F5; stroke: #111113; stroke-width: 2; }
.shot-radar { width: 100%; max-width: 240px; height: auto; overflow: visible; }
.shot-radar .rd-ring { fill: none; stroke: var(--s-edge); stroke-width: 1; }
.shot-radar polygon.rd-ring { stroke: color-mix(in srgb, var(--s-ink) 10%, transparent); }
.shot-radar line.rd-ring { stroke: color-mix(in srgb, var(--s-ink) 10%, transparent); }
.shot-radar .rd-shape { fill: color-mix(in srgb, var(--s-ink) 16%, transparent); stroke: var(--s-ink); stroke-width: 1.6; stroke-linejoin: round; }
.shot-radar text { fill: var(--s-muted); font-size: 7.5px; font-weight: 600; font-family: var(--sans); }
.shot-daily, .screen-hours { width: 100%; height: 120px; display: block; overflow: visible; }
.eq-zero { stroke: color-mix(in srgb, var(--s-ink, var(--ink)) 18%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.day-bar.win { fill: url(#dayGain); }
.day-bar.lose { fill: url(#dayLoss); }
.landing .g1 { stop-color: #15803D; }
.landing .g2 { stop-color: color-mix(in srgb, #15803D 62%, #FFFFFF); }
.landing .l1 { stop-color: #B91C1C; }
.landing .l2 { stop-color: color-mix(in srgb, #B91C1C 62%, #FFFFFF); }
/* the gauge (js/gauge.js) as the dashboard draws it */
.landing .gauge { display: block; max-width: 100%; overflow: visible; }
.landing .gauge .track, .landing .gauge .fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.landing .gauge .track { stroke: color-mix(in srgb, var(--s-ink, var(--ink)) 8%, transparent); }
.landing .gauge .g-from { stop-color: color-mix(in srgb, var(--s-ink, var(--ink)) 70%, var(--s-card, #FFFFFF)); }
.landing .gauge .g-to { stop-color: var(--s-ink, var(--ink)); }
.landing .gauge.low .g-from { stop-color: color-mix(in srgb, #B91C1C 70%, var(--s-card, #FFFFFF)); }
.landing .gauge.low .g-to { stop-color: #B91C1C; }
.landing .gauge .knob { fill: var(--s-ink, var(--ink)); stroke: var(--s-card, #FFFFFF); stroke-width: 2.5; }
.landing .gauge.low .knob { fill: #B91C1C; }
.landing .gauge .reading { fill: var(--s-ink, var(--ink)); font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
/* the P&L card in front of it, nearer still */
.hero-card {
  position: absolute; right: -28px; bottom: -48px; width: clamp(190px, 22vw, 270px); height: auto; aspect-ratio: 9 / 16;
  border-radius: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 50px 90px -30px rgba(17,17,19,.65), 0 18px 40px -18px rgba(17,17,19,.5);
  transform: translate3d(0, calc((1 - var(--p)) * 90px), calc(60px + (1 - var(--p)) * 160px)) rotateY(calc((1 - var(--p)) * -16deg + var(--ly, 0deg) * 1.6)) rotateX(var(--lx, 0deg));
  will-change: transform;
}
@media (max-width: 1240px) { .hero-card { right: 12px; } }
@media (max-width: 960px) { .shot-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hero { padding-top: 120px; }
  .shot-body { grid-template-columns: minmax(0, 1fr); }
  .shot-side, .shot-seg, .shot-card.score, .shot-card.daily { display: none; }
  .shot-main { padding: 16px; border-radius: 0 0 22px 22px; }
  .shot-kpis { grid-template-columns: 1fr 1fr; }
  .shot-kpi:nth-child(n+5) { display: none; }
  .shot-grid { grid-template-columns: 1fr; }
  .hero-card { width: 40%; right: 8px; bottom: -36px; }
}

/* facts under the hero */
.facts {
  max-width: var(--wrap); margin: 120px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.facts div { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid #D4D4D8; }
.facts b { font-size: clamp(36px, 4.2vw, 56px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--body-text); max-width: 22ch; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; margin-top: 96px; } }

/* the statement: pinned while it is read */
.statement { position: relative; height: 240vh; margin-top: 40px; }
.statement-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; padding: 0 20px; }
.statement-text { max-width: 1040px; font-size: clamp(30px, 4.6vw, 64px); font-weight: 800; line-height: 1.08; letter-spacing: -0.045em; }
.statement-text .sw { display: inline-block; will-change: opacity, filter; }

/* the product deck: pinned, its screens turned over by the scroll */
.story { position: relative; height: 480vh; }
.story-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; max-width: var(--wrap); margin: 0 auto; padding: 80px 20px 32px;
  display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 56px; align-items: center;
}
.story-copy { display: grid; gap: 22px; align-content: center; }
.story-copy h2 { font-size: clamp(34px, 4vw, 54px); }
.story-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.story-steps li {
  display: grid; gap: 4px; padding: 12px 0 12px 18px; border-left: 2px solid var(--line-soft);
  opacity: .4; transition: opacity 300ms ease, border-color 300ms ease;
}
.story-steps li.on { opacity: 1; border-color: var(--ink); }
/* six steps fit the column: a step says more only while its screen is in front */
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
  .story-steps li { gap: 0; padding-block: 8px; grid-template-rows: auto 0fr; transition: opacity 300ms ease, border-color 300ms ease, grid-template-rows 320ms var(--ease-out); }
  .story-steps li.on { grid-template-rows: auto 1fr; }
  .story-steps li > span { min-height: 0; overflow: hidden; }
}
.story-steps b { font-size: 20px; letter-spacing: -0.02em; }
.story-steps span { font-size: 15px; line-height: 1.45; color: var(--body-text); }
.story-bar { height: 3px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.story-bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.story-stage { position: relative; height: min(540px, 66vh); perspective: 1600px; perspective-origin: 50% 20%; }
.deck {
  position: relative; height: 100%; transform-style: preserve-3d;
  transform: rotateX(calc(9deg + var(--lx, 0deg))) rotateY(calc(-16deg + var(--ly, 0deg)));
}
.screen {
  position: absolute; inset: 0; margin: 0; padding: 22px; overflow: hidden;
  display: grid; align-content: start; gap: 14px;
  border-radius: 24px; background: var(--tile);
  box-shadow: var(--tile-edge), 0 50px 90px -40px rgba(17,17,19,.45), 0 16px 30px -18px rgba(17,17,19,.25);
  transform-origin: 50% 100%; backface-visibility: hidden; will-change: transform, opacity;
}
.screen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.screen-head b { font-size: 16px; letter-spacing: -0.02em; }
.screen-head span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.screen-head span.up, .screen-head span.dn { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; text-transform: none; }
.screen-sessions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.screen-session { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: var(--well); text-align: center; }
.screen-session b { font-size: 14px; }
.screen-session small { font-size: 11px; color: var(--muted); }
.screen-session em { font-style: normal; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.screen-hours { height: 150px; }
.screen-hours text { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
.screen-week, .screen-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.screen-week i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.screen-month i {
  --a: 0; display: grid; align-content: space-between; min-height: 62px; padding: 7px 8px; border-radius: 12px; background: var(--well);
  font-style: normal;
}
.screen-month i.off { background: transparent; }
.screen-month i.win { background: linear-gradient(160deg, color-mix(in srgb, #15803D calc(var(--a) * 28%), var(--tile)) 0%, color-mix(in srgb, #15803D calc(var(--a) * 12%), var(--tile)) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, #15803D 22%, transparent); }
.screen-month i.lose { background: linear-gradient(160deg, color-mix(in srgb, #B91C1C calc(var(--a) * 26%), var(--tile)) 0%, color-mix(in srgb, #B91C1C calc(var(--a) * 10%), var(--tile)) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, #B91C1C 20%, transparent); }
.screen-month span { font-size: 11px; font-weight: 700; color: var(--muted); }
.screen-month b { font-size: 11px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.screen-month .win b { color: #15803D; }
.screen-month .lose b { color: #B91C1C; }
.screen-rows { display: grid; }
.screen-row {
  display: grid; grid-template-columns: 0.8fr 1.4fr 1.5fr 0.6fr 0.55fr 0.95fr; align-items: center; gap: 10px;
  padding: 11px 4px; border-top: 1px solid var(--line-soft); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-3);
}
.screen-row.head { border-top: 0; padding-top: 0; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.screen-row > span:first-child { display: grid; }
.screen-row small { font-size: 11px; color: var(--muted); }
.screen-row b { color: var(--ink); }
.screen-row .sym { display: flex; align-items: center; gap: 8px; }
.screen-row .sym em { font-style: normal; padding: 1px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.screen-row > span:last-child { text-align: right; font-weight: 700; }
.screen-row .grade { font-style: normal; display: inline-block; min-width: 26px; padding: 2px 6px; border-radius: 7px; background: var(--well); font-size: 11px; font-weight: 800; text-align: center; color: var(--ink); }
.screen-card { padding: 0; place-content: center; background: #0C0C0E; }
.screen-card canvas { width: 100%; height: auto; display: block; }
/* the Strategies screen */
.screen-strat { grid-template-rows: auto auto minmax(0, 1fr); align-content: stretch; }
.strat-about { margin: 0; font-size: 14px; line-height: 1.45; color: var(--body-text); }
.strat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-height: 0; }
.strat p { margin: 0; }
.strat small { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.strat-list, .strat-side { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--well); min-height: 0; }
.strat-list p { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink-3); }
.strat-list p i { flex: none; position: relative; width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line); }
.strat-list p.done { color: var(--ink); }
.strat-list p.done i { background: var(--ink); box-shadow: none; }
.strat-list p.done i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--tile); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.strat-list em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.strat-valid { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: auto; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.strat-valid b { color: var(--ink); font-weight: 800; }
.strat-valid u { grid-column: 1 / -1; display: block; height: 6px; border-radius: 6px; background: var(--line-soft); overflow: hidden; text-decoration: none; }
.strat-valid s { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.strat-figures { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 4px; }
.strat-figures p { display: grid; gap: 3px; }
.strat-figures small { white-space: nowrap; }
.strat-equity { flex: 1 1 40px; min-height: 28px; width: 100%; display: block; overflow: visible; }
.strat-equity path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.strat-figures b { white-space: nowrap; font-size: 16px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.strat-grade { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.strat-grade .grade { font-style: normal; display: inline-block; min-width: 26px; padding: 2px 6px; border-radius: 7px; background: var(--tile); font-size: 11px; font-weight: 800; text-align: center; color: var(--ink); }
.strat-grade span { color: var(--muted); font-size: 12px; }
.strat-grade b { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
/* the PDF creator's screen: the tools, the pages, the page being edited */
.pdf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pdf-tools i { padding: 5px 10px; border-radius: 999px; background: var(--well); font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pdf-tools b { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--tile); font-size: 12px; font-weight: 700; }
.screen-pdf { grid-template-rows: auto auto minmax(0, 1fr); align-content: stretch; }
.pdf-body { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: stretch; min-height: 0; }
.pdf-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.pdf-inspect { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--well); }
.pdf-inspect p { display: grid; gap: 7px; margin: 0; min-width: 0; }
.pdf-inspect small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pdf-inspect b { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.pdf-inspect u { display: block; height: 5px; border-radius: 5px; background: var(--line-soft); overflow: hidden; text-decoration: none; }
.pdf-inspect s { display: block; height: 100%; border-radius: 5px; background: var(--ink); }
.pdf-swatches span { display: flex; gap: 6px; }
.pdf-swatches i { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--muted); }
.pdf-swatches i.white { background: #FFFFFF; }
.pdf-swatches i.black { background: #000000; }
.pdf-rail { display: grid; gap: 8px; align-content: start; }
.pdf-rail canvas { display: block; width: 100%; height: auto; border-radius: 6px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(17,17,19,.12); }
.pdf-rail canvas.on { box-shadow: 0 0 0 2px var(--ink); }
.pdf-page { display: block; width: 100%; height: auto; border-radius: 10px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(17,17,19,.1), 0 20px 40px -24px rgba(17,17,19,.5); }
@media (max-width: 900px) {
  .story { height: 460vh; }
  .story-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 20px; padding-top: 84px; align-items: start; }
  .story-copy { gap: 12px; }
  .story-copy h2 { font-size: 30px; }
  .story-steps li { display: none; border: 0; padding: 0; }
  .story-steps li.on { display: grid; }
  .story-stage { height: min(440px, 56svh); }
  .deck { transform: rotateX(6deg) rotateY(-6deg); }
  .screen { padding: 14px; gap: 10px; }
  .screen-sessions { grid-template-columns: 1fr 1fr; }
  .screen-month i { min-height: 40px; padding: 4px 5px; }
  .screen-month b { display: none; }
  .screen-row { grid-template-columns: 1fr 1.3fr 0.8fr; }
  .screen-row > span:nth-child(3), .screen-row > span:nth-child(4), .screen-row > span:nth-child(5) { display: none; }
  .strat-about, .strat-equity, .strat-side > small:last-of-type, .pdf-inspect { display: none; }
  .strat { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .strat-list, .strat-side { gap: 6px; padding: 10px 12px; }
  .strat-valid { display: none; }
  .pdf-body { grid-template-columns: minmax(0, 1fr); }
  .pdf-rail { order: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pdf-tools i:nth-of-type(n+5) { display: none; }
}

/* sections */
.section { max-width: var(--wrap); margin: 0 auto; padding: 140px 20px 0; }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 48px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.section-lead { font-size: 18px; line-height: 1.55; color: var(--body-text); max-width: 600px; }
@media (max-width: 760px) { .section { padding-top: 96px; } }

/* the journal in tiles */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile {
  position: relative; display: grid; align-content: space-between; gap: 26px; min-height: 300px; padding: 28px;
  border-radius: 26px; background: var(--tile); box-shadow: var(--tile-edge), 0 12px 32px -24px rgba(17,17,19,.25);
  overflow: hidden;
}
.tile-wide { grid-column: span 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
.tile-copy { display: grid; gap: 10px; }
.tile-copy p { font-size: 15px; line-height: 1.5; color: var(--body-text); max-width: 36ch; }
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } .tile-wide { grid-column: span 2; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .tile-wide { grid-column: auto; grid-template-columns: 1fr; } .tile { min-height: 0; } }

.fills { display: grid; gap: 8px; }
.fill {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--well); font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.fill b { color: var(--ink); font-size: 15px; }
.fill-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fill.total { grid-template-columns: 1fr auto; background: #111113; color: #A1A1AA; }
.fill.total b { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: #F4F4F5; }

.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.month i { aspect-ratio: 1; border-radius: 6px; background: var(--well); }
.month i.g { background: color-mix(in srgb, #15803D calc(var(--a) * 100%), var(--tile)); }
.month i.l { background: color-mix(in srgb, #B91C1C calc(var(--a) * 100%), var(--tile)); }

.bars { display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 64px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.bars i { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #111113 var(--w), #E4E4E7 var(--w)); }
.bars b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.streak { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.streak i { aspect-ratio: 1; border-radius: 50%; background: #111113; }
.streak i.off { background: #E4E4E7; }
.firms { display: flex; flex-wrap: wrap; gap: 8px; }
.firms span { padding: 8px 12px; border-radius: 999px; background: var(--well); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.themes i { aspect-ratio: 3 / 4; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(17,17,19,.08); position: relative; overflow: hidden; }
.themes i::after { content: ""; position: absolute; left: 14%; right: 14%; top: 18%; height: 22%; border-radius: 6px; background: currentColor; opacity: .9; }
.themes .t-light { background: #F4F4F5; color: #FFFFFF; }
.themes .t-medium { background: #A1A1AA; color: #FAFAFA; }
.themes .t-dark { background: #0C0C0E; color: #26262A; }
.note { display: grid; gap: 8px; padding: 18px; border-radius: 16px; background: var(--well); }
.note-grade { justify-self: start; padding: 3px 9px; border-radius: 7px; background: #111113; color: #F4F4F5; font-size: 12px; font-weight: 800; }
.note p { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* the dark band with the live card; it opens out to the page's edges as it comes up (--q) */
.dark-band {
  --q: 1;
  margin-top: 140px; padding: 120px 20px; background: linear-gradient(160deg, #26262A 0%, #0C0C0E 70%); color: #F4F4F5;
  clip-path: inset(0 calc((1 - var(--q)) * 5vw) round calc((1 - var(--q)) * 48px + 0.1px));
}
.band-inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 60px; align-items: center; }
.band-copy { display: grid; gap: 20px; align-content: center; }
.dark-band .kicker { color: #A1A1AA; }
.dark-band .soft { color: #8E8E96; }
.band-lead { font-size: 18px; line-height: 1.55; color: #C4C4CA; max-width: 520px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #E4E4E7; }
.ticks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none; background: rgba(244,244,245,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23F4F4F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 9.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center no-repeat; }
.format-pick { justify-self: start; display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(244,244,245,.08); }
.format-pick button {
  border: 0; padding: 8px 16px; border-radius: 9px; background: transparent; color: #A1A1AA; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.format-pick button[aria-pressed="true"] { background: rgba(244,244,245,.16); color: #F4F4F5; }
.format-pick button:active { transform: scale(0.97); }
.band-visual { --q: 1; display: grid; place-items: center; min-height: 560px; perspective: 1400px; }
.band-visual .show-card {
  width: min(100%, 340px); height: auto; border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 60px 100px -40px rgba(0,0,0,.9);
  transform: translateY(calc((1 - var(--q)) * 70px)) rotateY(calc((1 - var(--q)) * -34deg + var(--tx, 0deg))) rotateX(calc((1 - var(--q)) * 14deg + var(--ty, 0deg)));
  transition: width 300ms var(--ease-out), transform 160ms var(--ease-out);
}
.band-visual .show-card.wide { width: min(100%, 620px); border-radius: 18px; }
.band-visual .show-card.portrait { width: min(100%, 400px); }
@media (max-width: 900px) { .band-inner { grid-template-columns: 1fr; } .band-visual { min-height: 0; } }

/* PDF creator: the pages of a guide in a stack; js/showcase.js sets the transforms from the scroll and the pointer */
/* turned in 3D the fan reaches past the page on narrow screens: clipped sideways, or a phone would widen the whole page */
#pdf { overflow-x: clip; }
.spread { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.spread-stage { position: relative; aspect-ratio: 5 / 4; perspective: 1500px; }
/* the stage takes the pointer and js/showcase.js picks the page from where it is, so nothing in the stack needs it */
.spread-stack { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.sheet {
  position: absolute; left: 50%; top: 50%; width: 76%; margin: 0; overflow: hidden; border-radius: 12px; background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(17,17,19,.08), 0 34px 60px -28px rgba(17,17,19,.55); transform: translate(-50%, -50%); will-change: transform;
}
.sheet canvas { display: block; width: 100%; height: auto; }
.sheet i { position: absolute; inset: 0; background: #111113; opacity: 0; pointer-events: none; }
.spread-chip {
  position: absolute; padding: 8px 14px; border-radius: 999px; background: var(--tile); color: var(--ink);
  box-shadow: var(--tile-edge), 0 16px 30px -16px rgba(17,17,19,.5); font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none;
}
.spread-chip.strong { background: var(--ink); color: var(--page); }
.spread-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.spread-steps li { position: relative; display: grid; gap: 6px; padding: 22px 24px; overflow: hidden; border-radius: 20px; background: var(--tile); box-shadow: var(--tile-edge); }
.spread-steps b { font-size: 13px; font-weight: 800; color: var(--muted); }
.spread-steps p { font-size: 14px; line-height: 1.5; color: var(--body-text); }
@media (max-width: 900px) { .spread { grid-template-columns: 1fr; } }

/* AI assistant: a window on the dark band, with two figures floating in front of it */
.soon { display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(244,244,245,.14); color: #F4F4F5; font-size: 11px; letter-spacing: .04em; vertical-align: 1px; }
.ask-stage { display: grid; place-items: center; min-height: 560px; perspective: 1500px; }
.ask-rig { position: relative; width: min(100%, 480px); transform-style: preserve-3d; will-change: transform; }
.ask-window {
  display: grid; gap: 14px; padding: 18px; border-radius: 24px; background: var(--tile); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 60px 100px -40px rgba(0,0,0,.9);
}
.ask-window :focus-visible { outline-color: var(--ink); }
.ask-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
.ask-head b { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.ask-head small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.ask-thread { display: grid; gap: 12px; align-content: start; min-height: 318px; }
.ask-you { justify-self: end; max-width: 85%; padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: var(--ink); color: var(--page); font-size: 14px; font-weight: 600; }
.ask-typing { display: inline-flex; gap: 5px; justify-self: start; padding: 12px 14px; border-radius: 16px; background: var(--well); }
.ask-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .35; }
.ask-answer { display: grid; gap: 12px; }
.ask-answer > p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.ask-answer > small { font-size: 12px; color: var(--muted); }
.ask-word { display: inline-block; }
.ask-rows { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--well); }
.ask-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.ask-row u { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 10%, transparent); text-decoration: none; }
.ask-row s { display: block; height: 100%; border-radius: 4px; background: var(--ink); transform-origin: 0 50%; text-decoration: none; }
.ask-row b { font-weight: 800; font-variant-numeric: tabular-nums; }
.ask-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-prompts button {
  padding: 8px 12px; border: 0; border-radius: 999px; background: var(--well); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.ask-prompts button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.ask-prompts button:active { transform: scale(0.97); }
.ask-float {
  position: absolute; display: grid; gap: 1px; padding: 10px 14px; border-radius: 14px; background: var(--tile); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 40px -18px rgba(0,0,0,.8); pointer-events: none;
}
.ask-float small { font-size: 11px; font-weight: 600; color: var(--muted); }
.ask-float b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.ask-float.one { top: -26px; right: 8px; transform: translateZ(70px); }
.ask-float.two { top: 72px; left: -34px; transform: translateZ(90px); }
#assistant h2 .soft { display: block; }
@media (max-width: 900px) { .ask-stage { min-height: 0; } }
@media (max-width: 640px) { .ask-float { display: none; } .ask-thread { min-height: 352px; } }

/* recaps: the designs on a ring, turning on their own and by hand */
.recaps { max-width: none; padding-left: 0; padding-right: 0; }
.recaps .section-head { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding: 0 20px; }
.ring-stage {
  height: 520px; display: grid; place-items: center; perspective: 1500px; perspective-origin: 50% 30%; overflow: hidden;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ring-stage.dragging { cursor: grabbing; }
.ring { position: relative; width: 240px; height: 300px; transform-style: preserve-3d; transform: translateZ(-540px) rotateX(-7deg) rotateY(var(--turn, 0deg)); }
.ring canvas {
  position: absolute; inset: 0; width: 240px; height: 300px; border-radius: 18px; background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(17,17,19,.06), 0 24px 40px -24px rgba(17,17,19,.45);
  transform: rotateY(var(--a)) translateZ(540px); backface-visibility: hidden;
}
@media (max-width: 760px) { .ring-stage { height: 420px; } .ring { scale: 0.62; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { position: relative; display: grid; gap: 12px; align-content: start; padding: 28px; border-radius: 24px; background: var(--tile); box-shadow: var(--tile-edge); overflow: hidden; }
.steps b { font-size: 14px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps p { font-size: 15px; line-height: 1.5; color: var(--body-text); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 16px; padding: 28px; overflow: hidden;
  border-radius: 24px; background: var(--tile); box-shadow: var(--tile-edge);
}
/* Pro stands taller than its neighbours, with a ring around it and the label in the card's reverse colours */
.plan.featured { margin-block: -14px; background: #111113; color: #F4F4F5; box-shadow: 0 30px 60px -30px rgba(17,17,19,.6); outline: 2px solid #111113; outline-offset: 5px; }
.plan-tag { position: absolute; top: 24px; right: 24px; padding: 5px 12px; border-radius: 999px; background: #F4F4F5; color: #111113; font-size: 12px; font-weight: 800; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.price b { font-size: 44px; font-weight: 800; letter-spacing: -0.05em; }
.price span { font-size: 14px; color: var(--muted); }
.plan.featured .price span { color: #A1A1AA; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; font-size: 14px; color: var(--body-text); }
.plan.featured ul { color: #C4C4CA; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }
.plan.featured .pill.dark { background: #F4F4F5; color: #111113; }
.plan-note { margin-top: 18px; font-size: 13px; color: var(--muted); }
/* one way in under the plans; the top margin clears Pro's taller card and ring */
.plans-start { display: flex; justify-content: center; margin-top: 38px; }
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .plan.featured { margin-block: 0; }
}


/* about us */
/* the two sides share their rows (subgrid), so each habit stands level with its counterpart */
.versus { display: grid; grid-template-columns: clamp(140px, 17vw, 200px) repeat(2, minmax(0, 1fr)) clamp(140px, 17vw, 200px); grid-template-rows: repeat(6, auto); gap: 0 16px; }
/* with room to spare the figures grow and stand outside the page's column, so the cards keep their width */
@media (min-width: 1440px) { .versus { grid-template-columns: 260px repeat(2, minmax(0, 1fr)) 260px; margin-inline: -130px; } }
/* the figures stand beside the cards, on the same ground; green and red only on the trend, which is a P&L line */
.versus-figure { position: relative; grid-row: 1 / -1; align-self: end; display: grid; justify-items: center; gap: 12px; margin: 0; color: var(--ink); }
.versus-figure.low { grid-column: 1; --glow: var(--loss); }
.versus-figure.high { grid-column: 4; --glow: var(--gain); }
.versus-figure .person {
  position: relative; display: block; width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--glow) 55%, transparent)) drop-shadow(0 0 24px color-mix(in srgb, var(--glow) 45%, transparent));
}
/* a soft light behind each figure */
.versus-figure::before {
  content: ""; position: absolute; inset: -12% -10% 4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 34%, transparent), color-mix(in srgb, var(--glow) 12%, transparent) 55%, transparent);
}
.versus-figure figcaption { position: relative; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.versus-figure .trend { position: absolute; inset: 0 0 auto; width: 100%; height: auto; }
.versus-figure .trend path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.versus-figure.low .trend path { stroke: var(--loss); }
.versus-figure.high .trend path { stroke: var(--gain); }
.person-upper { transform-box: view-box; transform-origin: 50% 60%; }
.versus-side.without { grid-column: 2; }
.versus-side.with { grid-column: 3; }
.versus-side {
  position: relative; grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; padding: 30px; overflow: hidden;
  border-radius: 24px; background: var(--tile); box-shadow: var(--tile-edge);
}
.versus-side.with { background: #111113; color: #F4F4F5; box-shadow: 0 30px 60px -30px rgba(17,17,19,.6); }
.landing .versus-side h3 { padding-bottom: 14px; font-size: 24px; font-weight: 800; letter-spacing: -0.035em; }
.versus-side p {
  position: relative; padding: 13px 0 13px 28px; font-size: 15px; line-height: 1.5; color: var(--muted);
  box-shadow: inset 0 1px 0 color-mix(in srgb, currentColor 16%, transparent);
}
.versus-side p::before { content: ""; position: absolute; left: 3px; top: 23px; width: 10px; height: 2px; border-radius: 2px; background: currentColor; opacity: .6; }
.versus-side.with p { color: #E4E4E7; }
.versus-side.with p::before {
  left: 0; top: 15px; width: 18px; height: 18px; border-radius: 0; opacity: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 9.5 3.4 3.4L14 5.5'/%3E%3C/svg%3E") center no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 9.5 3.4 3.4L14 5.5'/%3E%3C/svg%3E") center no-repeat;
}
/* narrower: each figure stands on top of its card */
@media (max-width: 900px) {
  .versus { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto repeat(6, auto); }
  .versus-figure, .versus-figure.high { grid-row: 1; margin: 0 0 18px; justify-self: center; width: 190px; }
  .versus-figure.low { grid-column: 1; }
  .versus-figure.high { grid-column: 2; }
  .versus-side { grid-row: 2 / -1; }
  .versus-side.without { grid-column: 1; }
  .versus-side.with { grid-column: 2; }
}
@media (max-width: 760px) {
  .versus { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; }
  .versus-figure, .versus-side, .versus-figure.low, .versus-figure.high, .versus-side.without, .versus-side.with { grid-column: 1; grid-row: auto; }
  .versus-figure, .versus-figure.high { margin-bottom: 0; }
  .versus-side { grid-template-rows: none; }
  .versus-figure.low { order: 1; }
  .versus-side.without { order: 2; }
  .versus-figure.high { order: 3; margin-top: 24px; }
  .versus-side.with { order: 4; }
}

/* closing call */
.closer { max-width: var(--wrap); margin: 150px auto 0; padding: 0 20px; text-align: center; }
.closer h2 { font-size: clamp(40px, 6vw, 80px); }

/* footer */
.foot { margin-top: 140px; padding: 48px 20px 40px; border-top: 1px solid #E4E4E7; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 24px; }
.foot-inner > p { font-size: 14px; color: var(--muted); }
.foot-links { grid-column: -2; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.foot-links a { color: var(--ink-3); }
.foot-links a:hover { color: var(--ink); }
.foot-legal { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
/* right beside the logo, when it comes straight after it */
.foot-inner > .mark + .foot-legal { grid-column: auto; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; } }

/* ---- space: the same sky as Home (css/home.css) ---- */

/* stars behind the whole page (js/mainpage.js draws them); the page itself sits above */
.stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.landing main, .landing .foot { position: relative; z-index: 1; }

/* rings, arms and moons, shared by the hero and the closer */
.orbit-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orbit-rings .ring { fill: none; stroke: color-mix(in srgb, var(--ink) 15%, transparent); stroke-width: 1.2; }
.orbit-rings .ring.inner { stroke: color-mix(in srgb, var(--ink) 11%, transparent); stroke-dasharray: 2 7; }
.orbit-rings .ring.outer { stroke: color-mix(in srgb, var(--ink) 7%, transparent); stroke-dasharray: 1 12; }
.orbit-rings .arm { stroke: color-mix(in srgb, var(--ink) 32%, transparent); stroke-width: 1.4; stroke-linecap: round; }
.orbit-rings .joint { fill: var(--tile); stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.4; }
.orbit-rings .spark { fill: var(--ink); }
.moons { position: absolute; inset: 0; pointer-events: none; }
.moon {
  position: absolute; left: 0; top: 0; transform-origin: 50% 50%; will-change: transform, opacity;
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--tile) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--tile-edge), 0 18px 36px -22px rgba(17,17,19,.45);
}
.moon.far { background: color-mix(in srgb, var(--tile) 94%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 12px 24px -18px rgba(17,17,19,.35); }
.moon b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
/* each icon a small sphere, lit from the top left */
.moon-orb {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #111113;
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, #F4F4F5 35%, #D4D4D8 85%, #C4C4CA 100%);
  box-shadow: inset -5px -6px 12px rgba(17,17,19,.12), inset 3px 4px 8px rgba(255,255,255,.9), 0 0 0 1px rgba(17,17,19,.05);
}
.moon-orb svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
/* a sphere, as on Home */
.sphere {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, #FAFAFA 22%, #E4E4E7 62%, #C4C4CA 88%, #A1A1AA 100%);
  box-shadow: inset -22px -30px 70px rgba(17,17,19,.16), inset 14px 18px 40px rgba(255,255,255,.9), 0 0 0 1px rgba(17,17,19,.05), 0 60px 90px -40px rgba(17,17,19,.5);
}
.sphere::before { content: ""; position: absolute; inset: -20%; background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,.55) 40deg, transparent 90deg, transparent 360deg); mix-blend-mode: soft-light; opacity: .8; }
.sphere i { position: absolute; left: 20%; top: 12%; width: 34%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); filter: blur(2px); }

/* the hero: the product's parts circling behind the headline */
/* the planet, the floor and the orbits reach past the sides on purpose: each section trims them, so the page never
   grows wider than the window (clip, unlike hidden, leaves the pinned sections sticky) */
.hero, .story, .closer, .recaps { overflow-x: clip; }
.hero > *:not(.hero-space) { position: relative; z-index: 1; }
.hero-space { position: absolute; left: 0; right: 0; top: 60px; height: 640px; z-index: 0; pointer-events: none; }
@media (max-width: 760px) { .hero-space .moons { display: none; } .hero-space { top: 40px; height: 520px; } }

/* the dashboard rises over the edge of a planet, standing on a floor of light */
.planet {
  position: absolute; left: 50%; top: 26%; z-index: -1; width: 300%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  translate: -50% calc((1 - var(--p)) * 180px);
  background: radial-gradient(circle at 50% 0%, #FFFFFF 0%, #F4F4F5 6%, #E4E4E7 16%, #D4D4D8 30%);
  box-shadow: 0 -2px 0 rgba(255,255,255,1), 0 -50px 160px -30px rgba(255,255,255,1), inset 0 50px 90px -50px rgba(17,17,19,.14);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 260px, transparent 760px);
  mask-image: linear-gradient(180deg, #000 0, #000 260px, transparent 760px);
}
.stage-floor {
  position: absolute; left: -40%; right: -40%; top: 52%; height: 820px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(700px) rotateX(70deg); transform-origin: 50% 0;
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 60% at 50% 0%, #000 15%, transparent 72%);
}

/* the product deck floats over an orbit of its own */
.story-stage::before, .story-stage::after {
  content: ""; position: absolute; left: -14%; right: -14%; top: 62%; height: 64%; border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); transform: rotateX(76deg);
}
.story-stage::after { left: -2%; right: -2%; top: 70%; height: 46%; border-style: dashed; border-color: color-mix(in srgb, var(--ink) 10%, transparent); }
.deck { z-index: 1; }

/* the recap ring turns over a pool of light and a ring on the floor */
.ring-stage { position: relative; }
.ring-stage::before {
  content: ""; position: absolute; left: 50%; top: 66%; width: 1100px; height: 260px; translate: -50% 0; border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ink) 6%, transparent), transparent);
}

/* the closer: Home in small, the welcome in a sphere with the pages circling it */
.closer-space { position: relative; max-width: 1100px; height: 620px; margin: 30px auto 10px; }
.orbit-rings.back { z-index: 0; }
.orbit-rings.front { z-index: 15; }
.closer-sphere { position: absolute; left: 50%; top: 50%; z-index: 10; width: 300px; aspect-ratio: 1; translate: -50% -50%; display: grid; place-items: center; }
.closer-words { position: relative; z-index: 1; display: grid; gap: 6px; justify-items: center; }
.closer-words small { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #55555C; }
.closer-words b { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; color: #111113; }
@media (max-width: 640px) {
  .closer-space { height: 560px; }
  .closer-sphere { width: 190px; }
  .closer-words b { font-size: 20px; }
  .closer-space .moon { flex-direction: column; gap: 4px; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .closer-space .moon b { font-size: 11px; }
  .closer-space .moon-orb { width: 42px; height: 42px; }
}

:root[data-theme="dark"] .sphere {
  background: radial-gradient(circle at 34% 28%, #55555C 0%, #2E2E33 30%, #1C1C1F 66%, #111113 100%);
  box-shadow: inset -22px -30px 70px rgba(0,0,0,.55), inset 12px 16px 40px rgba(244,244,245,.1), 0 0 0 1px rgba(244,244,245,.08), 0 0 120px -30px rgba(244,244,245,.18);
}
:root[data-theme="dark"] .sphere::before { background: conic-gradient(from 0deg, transparent 0deg, rgba(244,244,245,.22) 40deg, transparent 90deg, transparent 360deg); mix-blend-mode: screen; opacity: .6; }
:root[data-theme="dark"] .sphere i { background: radial-gradient(closest-side, rgba(244,244,245,.28), rgba(244,244,245,0)); }
:root[data-theme="dark"] .closer-words b { color: #F4F4F5; }
:root[data-theme="dark"] .closer-words small { color: #A1A1AA; }
:root[data-theme="dark"] .moon-orb {
  background: radial-gradient(circle at 34% 28%, #55555C 0%, #2E2E33 40%, #1C1C1F 100%); color: #F4F4F5;
  box-shadow: inset -5px -6px 12px rgba(0,0,0,.5), inset 3px 4px 8px rgba(244,244,245,.12), 0 0 0 1px rgba(244,244,245,.08);
}
:root[data-theme="dark"] .moon { box-shadow: inset 0 0 0 1px rgba(244,244,245,.08), 0 18px 36px -22px rgba(0,0,0,.9); }
:root[data-theme="dark"] .moon.far { box-shadow: inset 0 0 0 1px rgba(244,244,245,.16), 0 12px 24px -18px rgba(0,0,0,.9); }
:root[data-theme="dark"] .orbit-rings .ring { stroke: color-mix(in srgb, var(--ink) 22%, transparent); }
:root[data-theme="dark"] .planet {
  background: radial-gradient(circle at 50% 0%, #2E2E33 0%, #1C1C1F 8%, #111113 20%, #0C0C0E 34%);
  box-shadow: 0 -1px 0 rgba(244,244,245,.4), 0 -60px 180px -30px rgba(244,244,245,.2), inset 0 50px 90px -50px rgba(244,244,245,.08);
}
@media (max-width: 640px) { :root[data-theme="dark"] .closer-space .moon { box-shadow: none; } }

/* dark theme: the page follows, the dashboard shot shows the dark dashboard */
:root[data-theme="dark"] .landing { --page: #0C0C0E; --body-text: #A1A1AA; --glass: color-mix(in srgb, #1C1C1F 72%, transparent); --tile: #1C1C1F; --tile-edge: inset 0 0 0 1px rgba(244,244,245,.06); --well: #26262A; }
:root[data-theme="dark"] .hero::before { background: radial-gradient(60% 50% at 50% 28%, #1C1C1F 0%, rgba(28,28,31,0) 72%); }
:root[data-theme="dark"] .shot { --s-bg: #0C0C0E; --s-card: #1C1C1F; --s-ink: #F4F4F5; --s-ink-3: #C4C4CA; --s-muted: #A1A1AA; --s-edge: rgba(244,244,245,.06); --s-well: rgba(244,244,245,.08); box-shadow: 0 0 0 1px rgba(244,244,245,.08), 0 60px 120px -40px rgba(0,0,0,.9); }
:root[data-theme="dark"] .shot-main { box-shadow: inset 1px 0 0 #26262A; }
:root[data-theme="dark"] .landing .g1 { stop-color: color-mix(in srgb, #15803D 78%, #F4F4F5); }
:root[data-theme="dark"] .landing .g2 { stop-color: color-mix(in srgb, #15803D 70%, #1C1C1F); }
:root[data-theme="dark"] .landing .l1 { stop-color: color-mix(in srgb, #B91C1C 78%, #F4F4F5); }
:root[data-theme="dark"] .landing .l2 { stop-color: color-mix(in srgb, #B91C1C 70%, #1C1C1F); }
:root[data-theme="dark"] .landing .gauge.low .g-to, :root[data-theme="dark"] .landing .gauge.low .knob { stop-color: color-mix(in srgb, #B91C1C 78%, #F4F4F5); fill: color-mix(in srgb, #B91C1C 78%, #F4F4F5); }
:root[data-theme="dark"] .screen-month .win b, :root[data-theme="dark"] .screen-month .lose b { color: var(--ink); }
:root[data-theme="dark"] .pill.light, :root[data-theme="dark"] .plan:not(.featured) { background: #1C1C1F; box-shadow: inset 0 0 0 1px rgba(244,244,245,.06); color: var(--ink); }
:root[data-theme="dark"] .bars i { background: linear-gradient(90deg, #F4F4F5 var(--w), #2E2E33 var(--w)); }
:root[data-theme="dark"] .streak i { background: #F4F4F5; }
:root[data-theme="dark"] .streak i.off { background: #2E2E33; }
:root[data-theme="dark"] .pill.dark, :root[data-theme="dark"] .hero-chip i, :root[data-theme="dark"] .note-grade { background: #F4F4F5; color: #111113; }
:root[data-theme="dark"] .facts div { border-color: #2E2E33; }
:root[data-theme="dark"] .foot { border-color: #26262A; }
:root[data-theme="dark"] .plan.featured { background: #F4F4F5; color: #111113; outline-color: #F4F4F5; }
:root[data-theme="dark"] .plan.featured ul { color: #4A4A52; }
:root[data-theme="dark"] .plan.featured .pill.dark { background: #111113; color: #F4F4F5; }
:root[data-theme="dark"] .plan-tag { background: #111113; color: #F4F4F5; }
:root[data-theme="dark"] .versus-figure .trend path { stroke: #F4F4F5; opacity: .35; }
/* on the dark ground the light is Paper: the palette's green and red are too dark here */
:root[data-theme="dark"] .versus-figure.low, :root[data-theme="dark"] .versus-figure.high { --glow: #F4F4F5; }
:root[data-theme="dark"] .versus-side.with { background: #F4F4F5; color: #111113; }
:root[data-theme="dark"] .versus-side.with p { color: #26262A; }
:root[data-theme="dark"] .nav-link:hover, :root[data-theme="dark"] .nav-link.on, :root[data-theme="dark"] .nav-link[aria-expanded="true"] { background: rgba(244,244,245,.07); }
:root[data-theme="dark"] .nav, :root[data-theme="dark"] .drop-panel, :root[data-theme="dark"] .nav-sheet { box-shadow: inset 0 0 0 1px rgba(244,244,245,.08), 0 30px 60px -24px rgba(0,0,0,.8); }
:root[data-theme="dark"] .screen { box-shadow: var(--tile-edge), 0 50px 90px -40px rgba(0,0,0,.9); }
:root[data-theme="dark"] .ring canvas { box-shadow: 0 0 0 1px rgba(244,244,245,.06), 0 24px 40px -24px rgba(0,0,0,.9); }

/* ---- motion: the delight lives here; everything is still for reduced motion ---- */
@media (prefers-reduced-motion: no-preference) {
  html:has(.landing) { scroll-behavior: smooth; }

  /* moving between Margin's pages: the old page sinks back, the new one rises (css/auth.css opts in too) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: page-out 240ms var(--ease-in-out) both; }
  ::view-transition-new(root) { animation: page-in 420ms var(--ease-out) both; }
  @keyframes page-out { to { opacity: 0; transform: scale(0.985); filter: blur(4px); } }
  @keyframes page-in { from { opacity: 0; transform: translateY(14px); } }

  /* the hero comes in: the chip, then the headline letter by letter out of a blur */
  [data-rise] { animation: rise 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  .split .ch { opacity: 0; filter: blur(12px); transform: translateY(0.32em); }
  [data-split].in .ch, .in [data-split] .ch { animation: glyph 760ms var(--ease-out) both; animation-delay: calc(var(--c, 0) * 20ms + var(--sd, 0ms) + 120ms); }
  @keyframes glyph { to { opacity: 1; filter: blur(0); transform: none; } }

  .stage-wrap { animation: lift 1300ms var(--ease-out) 500ms both; }
  @keyframes lift { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: none; } }
  .shot.in .eq-line { stroke-dasharray: 1; animation: draw 1800ms var(--ease-in-out) 200ms both; }
  .shot .eq-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .shot.in .eq-area, .shot.in .eq-end { animation: fade 800ms ease 1400ms both; }
  .shot .eq-area, .shot .eq-end { opacity: 0; }
  .shot.in .eq-area, .shot.in .eq-end { opacity: 1; }
  .shot .day-bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
  .shot .day-bar.lose { transform-origin: 50% 0; }
  .shot.in .day-bar { animation: grow 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms + 500ms); }
  .shot .rd-shape { transform-box: fill-box; transform-origin: center; }
  .shot.in .rd-shape { animation: bloom 900ms var(--ease-out) 300ms both; }
  .shot.in .gauge .fill { animation: sweep 900ms var(--ease-out) 300ms both; }
  .screen .gauge .fill { animation: sweep 900ms var(--ease-out) both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes bloom { from { transform: scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes sweep { from { stroke-dasharray: 0 100; } }

  /* the spheres' sheen sweeps round, the floor drifts towards you */
  .sphere::before { animation: sheen 16s linear infinite; }
  .stage-floor { animation: floor-drift 7s linear infinite; }
  @keyframes sheen { to { transform: rotate(360deg); } }
  @keyframes floor-drift { to { background-position: 0 72px, 0 0; } }

  /* the menus come out of what opened them */
  .drop-panel:not([hidden]) { animation: drop 220ms var(--ease-out); }
  .nav-sheet:not([hidden]) { animation: drop 260ms var(--ease-out); }
  .drop-panel:not([hidden]) a { animation: swap 300ms var(--ease-out) both; }
  .drop-panel a:nth-child(2) { animation-delay: 30ms; }
  .drop-panel a:nth-child(3) { animation-delay: 60ms; }
  .drop-panel a:nth-child(4) { animation-delay: 90ms; }
  .drop-panel a:nth-child(5) { animation-delay: 120ms; }
  .drop-panel a:nth-child(6) { animation-delay: 150ms; }

  /* the assistant's conversation: the question comes up, dots while it reads, the answer word by word, then the bars */
  .ask-thread { transition: opacity 140ms ease; }
  .ask-thread.leaving { opacity: 0; }
  .ask-you { animation: ask-up 300ms var(--ease-out) both; transform-origin: 100% 100%; }
  .ask-typing { animation: ask-up 240ms var(--ease-out) 120ms both; }
  .ask-typing i { animation: ask-dot 900ms ease-in-out infinite; }
  .ask-typing i:nth-child(2) { animation-delay: 150ms; }
  .ask-typing i:nth-child(3) { animation-delay: 300ms; }
  .ask-word { animation: ask-word 420ms var(--ease-out) both; animation-delay: calc(var(--w) * 26ms); }
  .ask-rows { animation: ask-up 420ms var(--ease-out) 320ms both; }
  .ask-row s { animation: ask-bar 700ms var(--ease-out) both; animation-delay: calc(var(--r) * 80ms + 440ms); }
  .ask-answer > small { animation: fade 400ms ease 800ms both; }
  @keyframes ask-up { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes ask-word { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
  @keyframes ask-dot { 0%, 100% { opacity: .25; transform: none; } 50% { opacity: .9; transform: translateY(-2px); } }
  @keyframes ask-bar { from { transform: scaleX(0); } to { transform: none; } }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  /* sections arrive as they scroll in (js/mainpage.js adds .in once); the tilt has its own transform */
  .moving [data-reveal] {
    opacity: 0; translate: 0 36px; scale: 0.985;
    transition: opacity 700ms var(--ease-out) var(--d, 0ms), translate 1000ms var(--ease-out) var(--d, 0ms), scale 1000ms var(--ease-out) var(--d, 0ms), transform 600ms var(--ease-out), box-shadow 300ms ease;
  }
  .moving [data-reveal].in { opacity: 1; translate: none; scale: none; }
  .in .bars i { animation: fill 900ms var(--ease-out) 200ms both; }
  @keyframes fill { from { clip-path: inset(0 100% 0 0 round 5px); } to { clip-path: inset(0 0 0 0 round 5px); } }
  .in .month i, .in .streak i { animation: pop 360ms var(--ease-out) both; animation-delay: calc(var(--k, 0) * 12ms + 200ms); }
  @keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
  /* the comparison plays out: rows answer each other left and right, one figure gives way, the other straightens up,
     each with its trend drawn behind it; afterwards they only breathe */
  .moving .versus-side p { opacity: 0; }
  .moving .versus-side.in p { animation: swap 500ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 260ms + var(--side, 0ms) + 300ms); }
  .versus-side.with { --side: 130ms; }
  .versus-side p:nth-of-type(2) { --n: 1; }
  .versus-side p:nth-of-type(3) { --n: 2; }
  .versus-side p:nth-of-type(4) { --n: 3; }
  .versus-side p:nth-of-type(5) { --n: 4; }
  .moving .versus-figure .trend path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .moving .versus-figure.in .trend path { animation: draw 1800ms var(--ease-in-out) 300ms both; }
  .moving .versus-figure.low.in .person-upper { animation: give-way 1100ms var(--ease-in-out) 900ms both, sigh 5s ease-in-out 2000ms infinite; }
  .moving .versus-figure.high.in .person-upper { animation: straighten 1000ms var(--ease-out) 900ms both, breathe 6s ease-in-out 1900ms infinite; }
  /* the light follows the mood: a slow flicker on the left, an even pulse on the right */
  .versus-figure::before { animation: glow-calm 5s ease-in-out infinite; }
  .versus-figure.low::before { animation: glow-low 7s ease-in-out infinite; }
  @keyframes give-way { from { transform: rotate(-22deg); } to { transform: none; } }
  @keyframes straighten { from { transform: translateY(10px) scale(0.97); } to { transform: none; } }
  @keyframes glow-calm { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
  @keyframes glow-low { 0%, 100% { opacity: .8; } 40% { opacity: .45; } 55% { opacity: .7; } 70% { opacity: .4; } }
  @keyframes sigh { 0%, 100% { transform: none; } 50% { transform: rotate(1.6deg); } }
  @keyframes breathe { 0%, 100% { transform: none; } 50% { transform: translateY(-1.5px); } }
  .in .fill { animation: swap 500ms var(--ease-out) both; }
  .in .fill:nth-child(2) { animation-delay: 80ms; }
  .in .fill:nth-child(3) { animation-delay: 160ms; }
  .in .fill:nth-child(4) { animation-delay: 240ms; }

  @media (hover: hover) and (pointer: fine) {
    /* a tile leans towards the pointer, lit where the pointer is */
    [data-tilt] { transform: perspective(1000px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); }
    [data-tilt].tilting { transition-duration: 700ms, 1000ms, 1000ms, 90ms, 300ms; transition-delay: 0ms; }
    [data-tilt].tilting { box-shadow: var(--tile-edge), 0 34px 60px -30px rgba(17,17,19,.42); }
    .plan.featured[data-tilt].tilting { box-shadow: 0 40px 70px -30px rgba(17,17,19,.7); }
    .ask-prompts button:hover { background: color-mix(in srgb, var(--ink) 14%, var(--well)); transform: translateY(-1px); }
    .ask-prompts button[aria-pressed="true"]:hover { background: var(--ink); }
    .versus-side.with[data-tilt].tilting { box-shadow: 0 40px 70px -30px rgba(17,17,19,.7); }
    .tile::after, .steps li::after, .plan::after, .versus-side::after, .spread-steps li::after {
      content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
      background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.5), transparent 45%);
      opacity: 0; transition: opacity 300ms ease; mix-blend-mode: soft-light;
    }
    .tilting::after { opacity: 1; }
    .band-visual .show-card.tilting { transition: width 300ms var(--ease-out), transform 90ms linear; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .shot, .hero-card, .deck, .band-visual .show-card { transform: none; }
  .dark-band { clip-path: none; }
  /* nothing is pinned: the statement reads at once, the deck's screens stand one under another */
  .statement, .story { height: auto; }
  .statement-pin { position: static; height: auto; padding: 120px 20px 0; }
  .story-pin { position: static; height: auto; grid-template-columns: 1fr; padding-top: 120px; }
  .story-steps li { opacity: 1; }
  .story-bar { display: none; }
  .story-stage { height: auto; perspective: none; }
  .deck { display: grid; gap: 16px; height: auto; }
  .screen { position: relative; inset: auto; }
  .ring-stage { height: auto; perspective: none; display: block; overflow-x: auto; cursor: auto; -webkit-mask-image: none; mask-image: none; padding: 0 20px 20px; }
  .ring { display: flex; gap: 18px; width: max-content; height: auto; transform: none; }
  .ring canvas { position: static; transform: none; }
}
