/* whit — website. Every token comes from lib/theme/app_theme.dart and is set
   at runtime by js/theme.js; the values below are only the first-paint
   defaults so nothing flashes before the module loads. */

@font-face { font-family: 'Syne'; src: url('../fonts/Syne.ttf') format('truetype'); font-weight: 400; font-display: swap; }
/* Plus Jakarta Sans: the app's own cut (+50 weight, −0.02 em baked into the files). */
@font-face { font-family: 'PJS'; src: url('../fonts/PlusJakartaSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('../fonts/PlusJakartaSans-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('../fonts/PlusJakartaSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('../fonts/PlusJakartaSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0F0C14; --ink: #F3E7E1; --ink-2: #9B97A3; --muted: #8B8794; --disabled: #66626D;
  --bg-2: #16121D; --border: rgba(193,188,204,.12); --success: #6A9A70;
  --bold: #F3E7E1; --on-bold: #231814; --on-card: #2C2930;
  --veil: rgba(227,222,237,.05); --chip: rgba(227,222,237,.10); --glass-rgb: 227,222,237;
  --rim-w: .8px; --rim-sub-p: .40; --rim-sub-d: .06; --rim-med-p: .50; --rim-med-d: .08;
  --ink-08: rgba(243,231,225,.08); --ink-12: rgba(243,231,225,.12); --ink-60: rgba(243,231,225,.6); --ink-85: rgba(243,231,225,.85);
  --body-w: 400; --header-shadow: rgba(0,0,0,.22);
  --gutter: 20px; --maxw: 1180px;
  --syne: 'Syne', system-ui, sans-serif;
  --body: 'PJS', system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #EEDCD4; --ink: #231814; --ink-2: #5E504B; --muted: #5E504B; --disabled: #8B7D76;
  --bg-2: #E7D3CA; --bold: #231814; --on-bold: #F3E7E1; --body-w: 500; color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--body-w) 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 999px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Type ──────────────────────────────────────────────────────────────
   Display copy follows the store screenshots: Syne at its default weight,
   lowercase, tight. In-app replicas use Skia's synthetic bold, rebuilt as a
   stroke (factor 1/24 at 9 px → 1/32 at ≥36 px), advances untouched. */
.display, .display-2, .display-3 { font-family: var(--syne); font-weight: 400; margin: 0; text-wrap: balance; font-synthesis: none;
  /* Skia's synthetic bold at ≥36 px: a stroke of size/32, advances untouched —
     exactly how the app renders Syne w600/w700 (docs/BRAND.md). */
  -webkit-text-stroke: .03125em currentColor; }
.display   { font-size: clamp(46px, 7.2vw, 100px); line-height: 1.04; letter-spacing: -0.025em; }
.display-2 { font-size: clamp(40px, 5.4vw, 78px);  line-height: 1.06; letter-spacing: -0.025em; }
.display-3 { font-size: clamp(30px, 3.6vw, 52px);  line-height: 1.1; letter-spacing: -0.005em; -webkit-text-stroke: .0332em currentColor; }
.lede { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.5; color: var(--ink-2); margin: 22px 0 0; max-width: 34ch; text-wrap: pretty; }

.syne-fb15, .syne-fb17, .syne-fb18, .syne-fb20, .syne-fb22, .syne-fb40 { font-family: var(--syne); font-weight: 400; line-height: 1; font-synthesis: none; }
.syne-fb15 { font-size: 15px; letter-spacing: -0.3px;  -webkit-text-stroke: .590px currentColor; }
.syne-fb17 { font-size: 17px; letter-spacing: -0.17px; -webkit-text-stroke: .656px currentColor; }
.syne-fb18 { font-size: 18px; letter-spacing: -0.36px; -webkit-text-stroke: .688px currentColor; }
.syne-fb20 { font-size: 20px; letter-spacing: -0.4px;  -webkit-text-stroke: .748px currentColor; }
.syne-fb22 { font-size: 22px; letter-spacing: -0.44px; -webkit-text-stroke: .806px currentColor; }
.syne-fb40 { font-size: 40px; letter-spacing: -1.2px;  -webkit-text-stroke: 1.25px currentColor; }

.ic { display: block; flex: none; }

/* ── Glass (glass_painters.dart) ───────────────────────────────────────
   Thin tinted veil + directional rim: bright at TL & BR, dim at TR & BL,
   linear between — exactly paintGlassBorder's four anchors, as a conic ring. */
.glass { position: relative; background: var(--chip); --p: var(--rim-sub-p); --d: var(--rim-sub-d); }
.glass-medium { --p: var(--rim-med-p); --d: var(--rim-med-d); }
.glass::after, .glass-medium::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: var(--rim-w); pointer-events: none;
  background: conic-gradient(from 315deg,
    rgba(var(--glass-rgb), var(--p)) 0deg, rgba(var(--glass-rgb), var(--d)) 90deg,
    rgba(var(--glass-rgb), var(--p)) 180deg, rgba(var(--glass-rgb), var(--d)) 270deg,
    rgba(var(--glass-rgb), var(--p)) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ── Header — the app's glass band: flush top, bottom corners r28 ────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-radius: 0 0 28px 28px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1);
  box-shadow: 0 6px 19.5px var(--header-shadow);
  padding-top: env(safe-area-inset-top);
}
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: auto; color: var(--ink); display: block; }
.wordmark {
  display: block; height: 24px; width: calc(24px * 2.498); background: currentColor;
  -webkit-mask: url('../img/wordmark.svg') no-repeat left center / contain; mask: url('../img/wordmark.svg') no-repeat left center / contain;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; font: 600 12px/1 var(--body); letter-spacing: .2px; display: inline-flex; align-items: center; }
.circle { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; }
.circle .ic { width: 18px; height: 18px; }

/* WhitButton(primary): onSurface fill, Bold.on label, Syne 15 w600, −0.02 em. */
.btn-bold {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bold); color: var(--on-bold); text-decoration: none; border-radius: 999px;
  font-family: var(--syne); font-size: 15px; letter-spacing: -0.3px; -webkit-text-stroke: .59px currentColor; line-height: 1;
  transition: transform .1s cubic-bezier(.25,.1,.25,1); white-space: nowrap;
}
.btn-bold:active { transform: scale(.97); }
.btn-dense { height: 44px; padding: 0 20px; }
.btn-prominent { height: 56px; padding: 0 28px; font-size: 16px; -webkit-text-stroke: .62px currentColor; }
.btn-hero { height: 60px; padding: 0 32px; font-size: 17px; -webkit-text-stroke: .656px currentColor; }
.btn-bold .ic { -webkit-text-stroke: 0; }
.show-sm { display: none; }


/* ── Motion ────────────────────────────────────────────────────────────
   One ease for arrivals — the app's collapse-open Cubic(0.22, 1, 0.36, 1). */
:root { --ease: cubic-bezier(.22,1,.36,1); --back: cubic-bezier(.175,.885,.32,1.275); }
.js [data-split] .wd { display: inline-block; overflow: clip; overflow-clip-margin: .25em; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js [data-split] .wd > span { display: inline-block; transform: translateY(.5em); opacity: 0; filter: blur(10px);
  transition: transform 1.1s var(--ease), opacity .9s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.js [data-split].on .wd > span { transform: none; opacity: 1; filter: none; }
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms + 120ms); }
.js [data-reveal="scale"] { transform: translateY(18px) scale(.965); }
.js [data-reveal="blur"] { transform: none; filter: blur(12px); }
.js [data-reveal].on { opacity: 1; transform: none; filter: none; }
.shot [data-split] .wd > span, .shot [data-reveal], .shot .ht > span, .shot .hero-foot, .shot .hero-now, .shot .hero-try { transition: none !important; }
.shot .mf-word .w { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-split] .wd > span, .js [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Hero: meet [blob] whit. ─────────────────────────────────────────────
   The words sit BEHIND the blob canvas and glide out of it; the blob is the mark. */
.hero { position: relative; height: clamp(640px, 100svh, 1040px); overflow: clip; --sk: 0; }
.hero-canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-title { position: absolute; left: 0; right: 0; top: var(--cy); height: 0; margin: 0; z-index: 0; pointer-events: none;
  font: 400 clamp(64px, 11.5vw, 210px)/0.9 var(--syne); letter-spacing: -0.035em; -webkit-text-stroke: .03125em currentColor; font-synthesis: none; }
.ht { position: absolute; top: 0; transform: translateY(-58%); white-space: nowrap; }
.ht > span { display: inline-block; opacity: 0; filter: blur(14px);
  transition: transform 1.5s var(--ease), opacity 1.1s var(--ease), filter 1.4s var(--ease); }
.ht-l { right: calc(50% + var(--blob) * .41); }
.ht-r { left: calc(50% + var(--blob) * .39); }
.ht-l > span { transform: translateX(calc(var(--blob) * .6)); }
.ht-r > span { transform: translateX(calc(var(--blob) * -.6)); transition-delay: .08s; }
.hero.on .ht > span { opacity: 1; filter: none; }
.hero.on .ht-l > span { transform: translateX(calc(var(--sk) * -9vw)); }
.hero.on .ht-r > span { transform: translateX(calc(var(--sk) * 9vw)); }
.hero-now { position: absolute; z-index: 2; left: 50%; top: calc(var(--cy) + var(--blob) * .5 + 18px); transform: translate(-50%, 10px);
  height: 38px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px; color: var(--ink);
  -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1);
  opacity: 0; transition: opacity .9s var(--ease) 1.2s, transform 1.1s var(--ease) 1.2s; }
.hero.on .hero-now { opacity: calc(1 - var(--sk) * 2); transform: translate(-50%, 0); }
.now-dot { width: 10px; height: 10px; border-radius: 50%; transition: background-color .6s; }
.now-word { display: inline-block; min-width: 4ch; }
.now-word.swap { animation: wordin .45s var(--ease); }
@keyframes wordin { from { opacity: 0; filter: blur(6px); transform: translateY(4px); } }
.hero-foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(28px, 6vh, 72px); text-align: center; padding: 0 var(--gutter);
  opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) 1.45s, transform 1.2s var(--ease) 1.45s; }
.hero.on .hero-foot { opacity: 1; transform: none; }
.hero-sub { margin: 0; font-size: clamp(24px, 2.6vw, 38px); }
.hero-meta { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.hero-foot .cta-row { justify-content: center; margin-top: 26px; }
.hero-try { position: absolute; z-index: 2; right: clamp(20px, 4vw, 56px); top: calc(72px + 28px); display: inline-flex; gap: 8px; align-items: center;
  font: 500 12px/1 var(--body); color: var(--muted); opacity: 0; transition: opacity 1s 2.2s; }
.hero.on .hero-try { opacity: 1; }
.try-touch { display: none; }
@media (hover: none) { .try-mouse { display: none; } .try-touch { display: inline; } }
.cta-row { margin-top: 38px; display: flex; gap: 12px; flex-wrap: wrap; }
/* WhitButton(secondary): the quiet surface tone + hairline, secondary label. */
.btn-quiet { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; text-decoration: none;
  background: var(--on-card); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--border);
  font: 400 15px/1 var(--syne); letter-spacing: -0.3px; -webkit-text-stroke: .59px currentColor; transition: transform .1s; }
.btn-quiet:active { transform: scale(.97); }


/* Mobile dock — the app's floating glass bar */
.dock { position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, 160%);
  display: none; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--veil);
  -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1);
  box-shadow: 0 6px 19.5px var(--header-shadow); transition: transform .6s var(--ease); }
.dock.on { transform: translate(-50%, 0); }
.dock .brand-mark { width: 24px; color: var(--ink); }
.dock-word { color: var(--ink); margin-right: 6px; }


/* Footer */
.site-footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; border-top: 1px solid var(--border); padding-top: 28px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font: 400 15px/1 var(--syne); letter-spacing: -0.3px; }
.footer-brand .brand-mark { width: 28px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-2); font-size: 14px; }
.footer-links a:hover { color: var(--ink); }
.disclaimer { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12px; color: var(--muted); }


@media (max-width: 720px) {
  .ht { left: 0; right: 0; text-align: center; transform: none; }
  /* The words tuck further behind the drop, so the stack breathes. */
  .ht-l { top: calc(var(--blob) * -.44 - .8em); }
  .ht-r { top: calc(var(--blob) * .42 - .1em); }
  .ht-l > span { transform: translateY(calc(var(--blob) * .45)); }
  .ht-r > span { transform: translateY(calc(var(--blob) * -.45)); }
  .hero.on .ht-l > span { transform: translateY(calc(var(--sk) * -14vh)); }
  .hero.on .ht-r > span { transform: translateY(calc(var(--sk) * 10vh)); }
  .hero-now { display: none; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .wordmark { height: 20px; width: calc(20px * 2.498); }
  .brand-mark { width: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
  .lang-toggle { padding: 0 13px; }
  .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) { .hero-foot .btn-quiet { display: none; } }

/* Peek (glass_peek.dart) */
.peek-layer { position: fixed; inset: 0; z-index: 80; }
.peek-scrim { position: absolute; inset: 0; opacity: 0; }
.peek { position: fixed; opacity: 0; }
/* sigma 24 in Flutter; Impeller's ScaleSigma renders that at ~22. */
.peek-glass { position: absolute; inset: 0; -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); }
.peek-rim { position: absolute; left: 0; top: 0; pointer-events: none; }
.peek-shadow { position: absolute; pointer-events: none; }
.peek-body { position: relative; padding: 24px 20px 24px; color: var(--ink); }
.syne-fb16 { font-family: var(--syne); font-weight: 400; font-size: 16px; line-height: 1.1; letter-spacing: -0.16px; -webkit-text-stroke: .62px currentColor; font-synthesis: none; }
.dp-title { margin-bottom: 16px; line-height: 1.15; }
.dp-entry + .dp-entry { margin-top: 16px; }
.dp-row { display: flex; align-items: center; gap: 12px; }
.dp-row img { flex: none; }
.dp-time { margin-top: 2px; font: 400 12px/1 var(--body); color: var(--muted); }
.dp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dp-note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.menu-links { display: flex; flex-direction: column; }
.menu-links a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; text-decoration: none; color: var(--ink); font: 500 15px/1.2 var(--body); }
.menu-links a + a { border-top: 1px solid var(--border); }
.menu-row { display: flex; gap: 8px; margin-top: 14px; }


/* ══ Round 5 — the scroll story ═══════════════════════════════════════════ */

@property --fd1 { syntax: '<color>'; inherits: true; initial-value: #E89838; }
@property --fd2 { syntax: '<color>'; inherits: true; initial-value: #D0C040; }
@property --dot { syntax: '<color>'; inherits: true; initial-value: #E89838; }
:root { --spring: cubic-bezier(.34,1.45,.64,1); --padx: clamp(20px, 6vw, 96px); --H: 600px;
  --lift-c: 0,0,0; --lift-a: .42; }
:root[data-theme="light"] { --lift-c: 74,40,26; --lift-a: .2; }
.js .ic { transition: transform .55s var(--spring); }

/* ── Header: a narrow floating island. Brand · where you are · action. ── */
.site-header { top: calc(14px + env(safe-area-inset-top)); left: 50%; right: auto; padding-top: 0; color: var(--ink);
  width: min(calc(100% - 2 * var(--gutter)), var(--hw, 780px)); transform: translateX(-50%);
  border-radius: 999px; background: var(--veil);
  transition: width .9s var(--ease), top .6s var(--ease); }
.site-header.scrolled { --hw: 700px; }
.header-inner { height: 58px; padding: 0 8px 0 20px; display: flex; align-items: center; gap: 10px; }
.brand { flex: none; }
.brand-mark { transition: transform .6s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.08); }
.chapter { position: relative; margin: 0 auto; height: 38px; width: 0; overflow: hidden; opacity: 0; flex: none;
  transition: width .7s var(--spring), opacity .45s var(--ease); }
.chapter.on { opacity: 1; }
.ch-in { display: inline-flex; align-items: baseline; gap: 10px; height: 32px; padding: 0 12px; white-space: nowrap; line-height: 32px; }
.ch-in.swap { animation: wordin .55s var(--ease); }
.ch-n { font: 600 12px/32px var(--body); letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-t { font: 400 15px/32px var(--syne); letter-spacing: -0.2px; -webkit-text-stroke: .59px currentColor; }
.ch-bar { position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--ink-12); overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.menu-btn { display: none; }
/* Over the inverted chapter the glass takes that chapter's theme. */
:root:not([data-theme="light"]) :is(.site-header, .to-top).over-inv { --ink: #231814; --ink-2: #5E504B; --muted: #5E504B; --ink-12: rgba(35,24,20,.12);
  --glass-rgb: 40,23,15; --veil: rgba(40,23,15,.035); --chip: rgba(40,23,15,.055); --bold: #231814; --on-bold: #F3E7E1;
  --rim-sub-p: .18; --rim-sub-d: .03; --rim-w: 1px; --header-shadow: rgba(41,24,17,.10); }
:root[data-theme="light"] :is(.site-header, .to-top).over-inv { --ink: #F3E7E1; --ink-2: #9B97A3; --muted: #9B97A3; --ink-12: rgba(243,231,225,.14);
  --glass-rgb: 227,222,237; --veil: rgba(227,222,237,.05); --chip: rgba(227,222,237,.10); --bold: #F3E7E1; --on-bold: #231814;
  --rim-sub-p: .40; --rim-sub-d: .06; --rim-w: .8px; --header-shadow: rgba(0,0,0,.22); }

/* Hover: lift + a hair larger; icons move with what holds them. */
.btn-bold, .btn-quiet, .chip, .circle, .fchip { transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, color .25s; }
@media (hover: hover) {
  .btn-bold:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--bold) 50%, transparent); }
  .btn-quiet:hover { transform: translateY(-2px) scale(1.02); color: var(--ink); }
  .chip:hover, .circle:hover { transform: translateY(-1px) scale(1.05); }
  .fchip:hover { transform: translateY(-2px); }
  :is(a, button):hover .ic-download { animation: icbob .8s var(--ease); }
  :is(a, button):hover .ic-sun { transform: rotate(90deg); }
  :is(a, button):hover .ic-moon { transform: rotate(-22deg); }
}
.btn-bold:active, .btn-quiet:active { transform: scale(.97); box-shadow: none; transition-duration: .1s; }
@keyframes icbob { 0%, 100% { transform: none; } 45% { transform: translateY(3px); } }
.btn-bold .ic, .btn-quiet .ic { flex: none; }
.btn-quiet { box-shadow: none; gap: 10px; }

/* ── Hero additions ───────────────────────────────────────────────────── */
.hero-now { overflow: hidden; white-space: nowrap;
  transition: opacity .9s var(--ease) 1.2s, transform 1.1s var(--ease) 1.2s, width .62s var(--spring) 0s, --dot .6s var(--ease); }
.now-word { min-width: 0; }
.now-dot { flex: none; border-radius: 50%; background: var(--dot); }
.hero-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; transition: --fd1 .8s var(--ease), --fd2 .8s var(--ease); }
.fchip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; color: var(--ink);
  font: 600 13px/1 var(--body); letter-spacing: .1px; -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); }
.fchip .ic { width: 16px; height: 16px; }
.fdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--fd1), var(--fd2)); }
.hero-try { display: none; top: calc(64px + 16px); left: 0; right: 0; justify-content: center; }
@media (hover: none) { .hero-try { display: inline-flex; } }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.scroll-cue { position: absolute; z-index: 2; left: var(--padx); bottom: clamp(28px, 6vh, 72px); display: flex; align-items: center; gap: 12px;
  font: 600 11px/1 var(--body); letter-spacing: .12em; color: var(--muted); opacity: 0; transition: opacity 1s var(--ease) 2.4s; }
.hero.on .scroll-cue { opacity: calc(1 - var(--sk) * 3); }
.scroll-cue i { position: relative; width: 1px; height: 44px; background: var(--ink-12); overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 18px; background: var(--ink); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-18px); } to { transform: translateY(44px); } }
.cta-hero .hero-foot { bottom: clamp(40px, 8vh, 96px); }

/* ── Scenes: a tall section, one pinned stage, everything centred ─────── */
.scene { position: relative; height: calc(var(--steps, 3) * 80svh + 100svh); }
.stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
/* No opacity, filter or transform here: this wraps every glass surface of a
   scene, and any of those would make it a backdrop root (glass inside stops
   blurring). Objects fade themselves, glass via --o on its own layers. */
.st-viz { position: absolute; inset: 0; pointer-events: none; }
[data-sq] > .sq-body, .phone > .ph-screen { filter: var(--bf, none); }
.anchor { position: absolute; left: 50%; top: var(--ay, 45%); width: 0; height: 0; }
.fl { position: absolute; left: 0; top: 0; will-change: transform; }

/* Title cards: big, centred, alone; the words arrive out of a blur. */
.st-title { position: absolute; z-index: 4; left: 50%; top: 45%; width: min(92vw, 1320px); text-align: center; pointer-events: none;
  font: 400 clamp(52px, 8vw, 148px)/1.02 var(--syne); letter-spacing: -0.04em; -webkit-text-stroke: .03125em currentColor; font-synthesis: none; text-wrap: balance;
  transform: translate(-50%, -50%); visibility: hidden; }
.st-title span { display: inline-block; opacity: 0; will-change: transform, filter, opacity; }

/* Captions centred beneath the object; the progress as slim vertical pills. */
.st-steps { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
/* Centred layouts: the caption follows the object (top set by main.js), so a
   tall or a flat window never leaves a gap or cuts it off. */
.st-cap { position: absolute; left: 50%; top: var(--cap-top, auto); bottom: auto; width: min(640px, 86vw); transform: translateX(-50%); text-align: center; }
.st-list { display: grid; }
.st-item { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); filter: blur(8px);
  transition: opacity .5s var(--ease), transform .8s var(--ease), filter .6s var(--ease); }
.st-item.up { transform: translateY(-18px); }
.st-item.on { opacity: 1; transform: none; filter: none; transition-delay: .06s; }
.st-item.swap :is(.st-t, .st-p) { animation: capswap .6s var(--ease); }
@keyframes capswap { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } }
.st-t { margin: 0 0 8px; font: 400 clamp(24px, 2.1vw, 34px)/1.05 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .032em currentColor; font-synthesis: none; }
.st-p { margin: 0 auto; max-width: 48ch; font-size: clamp(15px, 1.08vw, 17px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.st-rail { position: absolute; left: var(--padx); top: var(--rail-y, 45%); width: 4px; height: min(40vh, 340px); transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; transition: opacity .6s var(--ease); }
.st-steps.idle .st-rail { opacity: .5; }
.st-rail b { position: relative; flex: 1; border-radius: 999px; background: var(--ink-12); overflow: hidden; }
.st-rail b.gap { margin-top: 14px; }
.st-rail b i { position: absolute; inset: 0; border-radius: inherit; background: var(--ink); transform-origin: top; transform: scaleY(0); }

/* ── Light & structure behind the glass ───────────────────────────────── */
.glow { width: calc(var(--H) * 1.5); height: calc(var(--H) * 1.5); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--mood, #E89838)) 40%, transparent), color-mix(in srgb, var(--glow, var(--mood, #E89838)) 12%, transparent) 55%, transparent);
  filter: blur(20px); }
:root[data-theme="light"] .glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--mood, #E89838)) 30%, transparent), color-mix(in srgb, var(--glow, var(--mood, #E89838)) 9%, transparent) 55%, transparent); }
/* The soft grid: sharp where the page is open, softened wherever glass passes. */
.softgrid { position: absolute; left: 0; top: 0; width: 220vw; height: 220vh; pointer-events: none; transform: translate(-50%, -50%);
  background-image: linear-gradient(var(--grid-c) 1px, transparent 1px), linear-gradient(90deg, var(--grid-c) 1px, transparent 1px);
  background-size: 34px 34px; background-position: center;
  -webkit-mask: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.6) 30%, transparent 62%); mask: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.6) 30%, transparent 62%); }
:root { --grid-c: rgba(243,231,225,.07); }
:root[data-theme="light"] { --grid-c: rgba(35,24,20,.08); }
/* Big type BEHIND glass: full ink, the glass in front softens it. */
.bigword { width: max-content; white-space: nowrap; pointer-events: none; color: var(--ink);
  font: 400 200px/1 var(--syne); letter-spacing: -0.05em; -webkit-text-stroke: .03125em currentColor; font-synthesis: none; }
.bigword span { display: block; }
.j-e2e { font-size: calc(var(--H) * .58); }

/* ── Glass in the app's squircle (js/squircle.js) ─────────────────────── */
.sq > .sq-shadow { position: absolute; z-index: 0; pointer-events: none; }
.sq > .sq-fill { position: absolute; inset: 0; z-index: 0; background: var(--sq-tint, var(--veil));
  -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); }
.sq > .sq-rim { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }
.sq > .sq-body { position: relative; z-index: 2; }
.sq > * { opacity: var(--o, 1); }
/* Pill-shaped glass (the squircle's adaptive pill IS a stadium): CSS shape. */
.fl.glass { -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 calc(var(--lift, 0) * 22px + 6px) calc(var(--lift, 0) * 44px + 18px) -8px rgba(var(--lift-c), calc(var(--lift-a) * (var(--lift, 0) * .7 + .3))); }

/* ── The phone ────────────────────────────────────────────────────────── */
/* --ap is ONE APP PIXEL (the screen is a 360-wide phone): every size inside
   is the app's own number from checkin_modal / mood_field / context_step. */
.phone { width: calc(var(--H) * .47); height: var(--H); --sq-tint: var(--veil); --ap: calc(var(--H) * .438 / 360); }
.phone > :not(.ph-body) { opacity: var(--o, 1); }
.ph-body { position: absolute; inset: 0; }
.ph-screen { position: absolute; inset: calc(var(--H) * .016); overflow: hidden; background: var(--bg); color: var(--ink); font-size: calc(var(--ap) * 14); }
.ph-island { position: absolute; z-index: 5; top: calc(var(--ap) * 12); left: 50%; width: calc(var(--ap) * 96); height: calc(var(--ap) * 28); transform: translateX(-50%); border-radius: 99px; background: #000; }
.ph-pages { height: 100%; will-change: transform; }
.ph-page { position: relative; height: 100%; }
/* Above the body's rim: what lies on the phone blurs its frame, never the reverse. */
.ph-over { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ph-over .fl { left: 50%; top: 50%; }
.pg { position: absolute; inset: 0; }
.ph-top { position: absolute; left: calc(var(--ap) * 12); right: calc(var(--ap) * 12); top: calc(var(--ap) * 50); height: calc(var(--ap) * 44);
  display: flex; align-items: center; justify-content: space-between; }
.ph-gc { width: calc(var(--ap) * 44); height: calc(var(--ap) * 44); border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--ink);
  box-shadow: inset 0 0 0 .8px rgba(var(--glass-rgb), .22); }
.ph-gc .ic { width: calc(var(--ap) * 20); height: calc(var(--ap) * 20); }
.ph-prog { position: absolute; left: 50%; top: 50%; width: calc(var(--ap) * 132); height: calc(var(--ap) * 8); transform: translate(-50%, -50%); border-radius: 99px; background: var(--ink-12); }
.ph-prog i { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.pg-title { position: absolute; left: calc(var(--ap) * 20); right: calc(var(--ap) * 20); top: calc(var(--ap) * 116); text-align: center;
  font: 400 calc(var(--ap) * 34)/1.1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; font-synthesis: none; }
.pt .pg-title { font-size: calc(var(--ap) * 32); line-height: 1.12; }
.ph-cont { position: absolute; left: 0; right: 0; top: calc(var(--ap) * 694); display: flex; flex-direction: column; align-items: center; gap: calc(var(--ap) * 2);
  color: var(--ink-60); font: 600 calc(var(--ap) * 14)/1 var(--body); letter-spacing: .2px; }
.ph-cont .ic { width: calc(var(--ap) * 28); height: calc(var(--ap) * 28); }
.ph-cont span { opacity: .92; }
.z { transform-origin: center; will-change: transform;
  filter: drop-shadow(0 calc(var(--lift, 0) * var(--ap) * 10) calc(var(--lift, 0) * var(--ap) * 18) rgba(var(--lift-c), calc(var(--lift-a) * var(--lift, 0)))); }
.pm-blobw { filter: none; }
.bars { display: flex; align-items: flex-end; gap: calc(var(--ap) * 3); height: calc(var(--ap) * 17); }
.bars i { width: calc(var(--ap) * 4); border-radius: 9px; background: currentColor; opacity: .25; }
.bars i.f { opacity: 1; }
/* mood (MoodField) */
.pm-blobw { position: absolute; left: calc(var(--ap) * 10); top: calc(var(--ap) * 127); width: calc(var(--ap) * 340); height: calc(var(--ap) * 340); }
.pm-blob { width: 100%; height: 100%; }
.pm-word { position: absolute; left: 0; right: 0; top: calc(var(--ap) * 402); height: calc(var(--ap) * 50); display: grid; place-items: center;
  font: 400 calc(var(--ap) * 40)/1 var(--syne); letter-spacing: -1.2px; -webkit-text-stroke: .031em currentColor; font-synthesis: none; }
.pm-word span { display: inline-block; }
.pm-word span.swap { animation: wordin .5s var(--ease); }
.pm-slider { position: absolute; left: calc(var(--ap) * 77); right: calc(var(--ap) * 77); top: calc(var(--ap) * 493); height: calc(var(--ap) * 48); --v: .5; }
.pm-slider .rail, .pm-slider .fill { position: absolute; left: 0; top: 50%; height: calc(var(--ap) * 5); transform: translateY(-50%); border-radius: 9px; }
.pm-slider .rail { right: 0; background: var(--ink-12); }
.pm-slider .fill { width: calc(var(--v) * 100%); background: var(--mood); }
.pm-slider .knob { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: calc(var(--ap) * 32); height: calc(var(--ap) * 32); transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--ink); box-shadow: 0 calc(var(--ap) * 2) calc(var(--ap) * 10) rgba(0,0,0,.22); }
.pm-energy, .pc-q { position: absolute; left: calc(50% - var(--ap) * 103); width: calc(var(--ap) * 206); height: calc(var(--ap) * 56); display: flex; justify-content: space-between; align-items: center; }
.pm-energy { top: calc(var(--ap) * 557); }
.pm-energy b, .pc-q b { width: calc(var(--ap) * 56); height: calc(var(--ap) * 56); border-radius: 99px; display: grid; place-items: center; background: var(--ink-08); color: var(--ink-60);
  transition: width .62s cubic-bezier(.34,1.56,.64,1), background-color .26s ease-out, color .26s ease-out; }
.pm-energy b.on, .pc-q b.on { width: calc(var(--ap) * 70); background: var(--ink); color: var(--bg); }
.pm-energy svg { width: calc(var(--ap) * 26); height: calc(var(--ap) * 26); }
/* context: ContextStep — the vertical amount slider + the quality pills */
.pc-v { position: absolute; inset: 0; opacity: 0; filter: blur(6px); transition: opacity .55s var(--ease), filter .55s var(--ease); --lv: 3; }
.pc-v.on { opacity: 1; filter: none; }
.pc-track { position: absolute; left: calc(var(--ap) * 8); right: calc(var(--ap) * 8); top: calc(var(--ap) * 205); height: calc(var(--ap) * 340); }
.pc-line { position: absolute; left: 50%; top: calc(var(--ap) * 18); bottom: calc(var(--ap) * 12); width: calc(var(--ap) * 5); transform: translateX(-50%); border-radius: 9px;
  background: linear-gradient(var(--mood), color-mix(in srgb, var(--mood) 4%, transparent)); }
.pc-knob { position: absolute; left: 50%; top: calc(var(--ap) * (274 - 222 * (var(--lv) - 1) / 4)); width: calc(var(--ap) * 60); height: calc(var(--ap) * 60);
  transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: #15151A;
  background: #E3DEED; box-shadow: 0 calc(var(--ap) * 2) calc(var(--ap) * 8) rgba(0,0,0,.22); transition: top .36s cubic-bezier(.215,.61,.355,1); }
:root[data-theme="light"] .pc-knob { background: #FFF7F2; }
.pc-knob .ic { width: calc(var(--ap) * 28); height: calc(var(--ap) * 28); }
.pc-l { position: absolute; left: calc(var(--ap) * 12); top: calc(var(--ap) * (274 - 222 * var(--i) / 4)); transform: translateY(-50%); white-space: nowrap;
  font: 400 calc(var(--ap) * 18)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; opacity: .42;
  transition: font-size .36s cubic-bezier(.215,.61,.355,1), opacity .36s; }
.pc-l.r { left: auto; right: calc(var(--ap) * 12); }
.pc-l[data-d="1"] { font-size: calc(var(--ap) * 20); opacity: .6; }
.pc-l[data-d="0"] { font-size: calc(var(--ap) * 26); opacity: 1; }
.pc-qt { position: absolute; left: 0; right: 0; top: calc(var(--ap) * 553); text-align: center; font: 400 calc(var(--ap) * 28)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.pc-q { top: calc(var(--ap) * 597); }
/* tags + note: the real page, the real action trio */
.pt-groups { position: absolute; left: calc(var(--ap) * 20); right: calc(var(--ap) * 20); top: calc(var(--ap) * 252); }
.pt-g { margin-top: calc(var(--ap) * 12); padding: calc(var(--ap) * 6) calc(var(--ap) * 8) calc(var(--ap) * 10); transform-origin: left center; }
.pt-h { margin: 0 0 calc(var(--ap) * 8) calc(var(--ap) * 4); font: 400 calc(var(--ap) * 22)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.pt-wrap { display: flex; flex-wrap: wrap; gap: calc(var(--ap) * 10); }
.pt-pill { display: inline-flex; align-items: center; gap: calc(var(--ap) * 7); padding: calc(var(--ap) * 12) calc(var(--ap) * 15); border-radius: 99px; background: var(--ink-08);
  font: 500 calc(var(--ap) * 15)/1.15 var(--body); color: var(--ink-85); transition: background-color .2s cubic-bezier(0,0,.58,1), color .2s; }
.pt-pill .ic { width: calc(var(--ap) * 20); height: calc(var(--ap) * 20); }
.pt-pill.on { background: var(--ink); color: var(--on-bold); }
.pt-actions { position: absolute; left: 50%; top: calc(var(--ap) * 691); width: calc(var(--ap) * 310); transform: translateX(-50%); display: flex; gap: calc(var(--ap) * 16); }
.pt-note, .pt-fab { width: calc(var(--ap) * 64); height: calc(var(--ap) * 64); flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: var(--veil); box-shadow: inset 0 0 0 .8px rgba(var(--glass-rgb), .3); transition: background-color .3s, color .3s, box-shadow .3s; }
.pt-note .ic, .pt-fab .ic { width: calc(var(--ap) * 28); height: calc(var(--ap) * 28); }
.pt-note.on { background: var(--ink); color: var(--bg); box-shadow: 0 calc(var(--ap) * 8) calc(var(--ap) * 22) rgba(0,0,0,.18); }
.pt-fab { background: var(--chip); }
.pt-done { width: calc(var(--ap) * 150); height: calc(var(--ap) * 64); flex: none; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--ap) * 8);
  background: var(--ink); color: var(--on-bold); box-shadow: 0 calc(var(--ap) * 8) calc(var(--ap) * 22) rgba(0,0,0,.18);
  font: 400 calc(var(--ap) * 18)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.pt-done .ic { width: calc(var(--ap) * 20); height: calc(var(--ap) * 20); }
.pt-pop { width: calc(var(--H) * .56); transform-origin: 18% 100%;
  --sq-tint: color-mix(in srgb, var(--bg) 62%, transparent); }
.pt-pop .sq-body { padding: calc(var(--ap) * 22) calc(var(--ap) * 24) calc(var(--ap) * 24); }
.pp-h { font: 400 calc(var(--ap) * 22)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.pp-t { margin: calc(var(--ap) * 14) 0 0; min-height: calc(var(--ap) * 92); font: 500 calc(var(--ap) * 17)/1.45 var(--body); color: var(--ink); }
.caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: var(--ink); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ps { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--ap) * 16); }
.ps-check { width: calc(var(--ap) * 64); height: calc(var(--ap) * 64); border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; }
.ps-t { font: 400 calc(var(--ap) * 22)/1 var(--syne); -webkit-text-stroke: .034em currentColor; }

/* ── Journey ──────────────────────────────────────────────────────────── */
/* explainer bentos beside the phone (wide screens only) */
.j-ex { display: none; width: calc(var(--H) * .4); font-size: calc(var(--H) * .022); color: var(--ink); }
.wide .j-ex { display: block; }
.j-ex .sq-body { padding: 1.25em 1.35em 1.35em; }
.ex-h { margin-bottom: 1em; font: 600 .78em/1 var(--body); letter-spacing: .08em; color: var(--muted); }
.ex-dots { display: flex; justify-content: space-between; align-items: center; height: 2.2em; }
.ex-dots img { width: 1.6em; height: 1.6em; opacity: .55; transition: transform .5s var(--spring), opacity .4s var(--ease); }
.ex-dots img.on { transform: scale(1.4); opacity: 1; }
.ex-ends { display: flex; justify-content: space-between; margin-top: .8em; font: 500 .74em/1 var(--body); color: var(--muted); }
.ex-row { display: flex; align-items: center; gap: .8em; padding: .32em 0; color: var(--muted); transition: color .4s var(--ease); }
.ex-row + .ex-row { margin-top: .2em; }
.ex-disc { width: 2.5em; height: 2.5em; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink-08); color: var(--ink-60); transition: background-color .4s, color .4s; }
.ex-disc svg { width: 1.2em; height: 1.2em; }
.ex-row span:last-child { font: 400 1.15em/1 var(--syne); -webkit-text-stroke: .034em currentColor; }
.ex-row.on { color: var(--ink); }
.ex-row.on .ex-disc { background: var(--ink); color: var(--bg); }
/* morning / evening: big discs that glow when it's their turn */
.j-day { display: flex; flex-direction: column; align-items: center; gap: 12px; --dayc: #E89838; }
.j-day[data-d="1"] { --dayc: #7068E0; }
.jd-disc { width: calc(var(--H) * .15); height: calc(var(--H) * .15); border-radius: 50%; display: grid; place-items: center; color: var(--ink-60);
  background: var(--chip); -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: inset 0 0 0 .8px rgba(var(--glass-rgb), .3); transition: background-color .6s var(--ease), color .6s, box-shadow .8s var(--ease), transform .7s var(--spring); }
.jd-disc .ic { width: 40%; height: 40%; }
.j-day.on .jd-disc { background: var(--ink); color: var(--bg); transform: scale(1.06);
  box-shadow: 0 0 calc(var(--H) * .08) calc(var(--H) * .01) color-mix(in srgb, var(--dayc) 55%, transparent), 0 0 calc(var(--H) * .02) color-mix(in srgb, var(--dayc) 40%, transparent); }
.jd-l { font: 600 12px/1 var(--body); letter-spacing: .08em; color: var(--muted); transition: color .5s; }
.j-day.on .jd-l { color: var(--ink); }
/* the whit as a glass card; the sealed side keeps the same layout */
.j-card { width: min(calc(var(--H) * .62), 88vw); font-size: calc(var(--H) * .024); pointer-events: auto; touch-action: pan-y; --bar: 0; --bar-a: 0;
  --sq-tint: color-mix(in srgb, var(--bg) 52%, transparent); }
.j-card .sq-body { overflow: hidden; }
.cd-plain { padding: 1.4em 1.5em 1.5em;
  -webkit-mask: linear-gradient(90deg, transparent calc(var(--bar) * 100% - 4px), #000 calc(var(--bar) * 100% + 26px));
  mask: linear-gradient(90deg, transparent calc(var(--bar) * 100% - 4px), #000 calc(var(--bar) * 100% + 26px)); }
.cd-plain.cd-cipher { position: absolute; inset: 0; color: var(--ink-2);
  -webkit-mask: linear-gradient(90deg, #000 calc(var(--bar) * 100% - 26px), transparent calc(var(--bar) * 100% + 4px));
  mask: linear-gradient(90deg, #000 calc(var(--bar) * 100% - 26px), transparent calc(var(--bar) * 100% + 4px)); }
.cd-cipher .cd-word, .cd-cipher .cd-note, .cd-cipher .cd-ctx span, .cd-cipher .pchip span { color: var(--ink-2); word-break: break-all; }
.cd-cipher .clear { color: var(--ink); font: 600 .74em/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .02em; transition: text-shadow .5s; }
.cd-cipher .cd-top { padding-right: 2.7em; }
.cd-cipher .cd-ts { margin-left: auto; }
.cd-cipher [data-c] { transition: opacity .5s; }
.j-card.cloud .cd-cipher [data-c] { opacity: .55; }
.j-card.cloud .cd-cipher .clear { text-shadow: 0 0 14px color-mix(in srgb, var(--mood) 70%, transparent); }
.cd-lockd { flex: none; width: 2.6em; height: 2.6em; margin: .5em; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.cd-bar { position: absolute; z-index: 3; top: 0; bottom: 0; left: calc(var(--bar) * 100%); width: 2px; margin-left: -1px; background: var(--ink); opacity: var(--bar-a);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--mood) 80%, transparent), 0 0 36px 8px color-mix(in srgb, var(--mood) 38%, transparent); }
/* On paper the bar is light itself: brighter than the beige, glowing white-warm. */
:root[data-theme="light"] .cd-bar { width: 3px; margin-left: -1.5px; background: #FFFCF9;
  box-shadow: 0 0 8px 2px rgba(255,252,248,.95), 0 0 26px 8px rgba(255,246,238,.85), 0 0 60px 18px color-mix(in srgb, var(--mood) 30%, transparent); }
.cd-top { display: flex; align-items: center; gap: .45em; color: var(--muted); font: 500 .8em/1 var(--body); }
.cd-main { display: flex; align-items: center; gap: .8em; margin-top: .8em; }
.cd-blob { flex: none; width: 3.6em; height: 3.6em; }
.cd-word { font: 400 1.6em/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .035em currentColor; font-synthesis: none; }
.cd-ctx { display: flex; align-items: center; gap: .35em; margin-top: .45em; font: 500 .74em/1 var(--body); color: var(--muted); }
.cd-tags { display: flex; flex-wrap: wrap; gap: .45em; margin-top: 1.1em; }
.cd-tags .pchip { font-size: .72em; background: var(--ink-08); }
.cd-note { margin: 1em 0 0; font: 500 .84em/1.45 var(--body); color: var(--ink-2); }
.cd-lock { position: absolute; z-index: 3; right: 1.1em; top: 1.05em; width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); transform: scale(0); transition: transform .55s var(--spring); }
.j-card.sealed .cd-lock { transform: none; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--ink); font: 600 12px/1 var(--body); letter-spacing: .2px; white-space: nowrap; }
.pchip .ic { width: 1.2em; height: 1.2em; }
.j-hint { display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.2em; border-radius: 999px; white-space: nowrap; font: 600 13px/1 var(--body); color: var(--ink);
  scale: .84; transition: scale 1.2s var(--ease); }
.j-hint.in { scale: 1; }

/* ── Patterns ─────────────────────────────────────────────────────────── */
.p-panel { width: min(calc(var(--H) * 1.1), 90vw); height: calc(var(--H) * .88); --sq-tint: var(--veil); }
.p-panel > .sq-body { position: absolute; inset: 0; }
.p-cv { display: block; width: 100%; height: 100%; }
.p-chip { display: inline-flex; align-items: center; gap: .55em; padding: .4em 1.1em .4em .4em; border-radius: 999px; white-space: nowrap; color: var(--ink);
  font: 400 calc(var(--H) * .034)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .032em currentColor; }
.p-chip-d { width: 1.55em; height: 1.55em; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.p-chip-d .ic { width: .8em; height: .8em; }
.p-num { font: 400 calc(var(--H) * .12)/1 var(--syne); letter-spacing: -0.04em; -webkit-text-stroke: .03125em currentColor; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-labs { display: grid; grid-template-columns: 1fr 1fr; width: calc(var(--H) * .8); justify-items: center; }
.p-labs .pchip { font-size: calc(var(--H) * .02); }
.p-mark { display: inline-flex; align-items: center; gap: .2em; font: 400 calc(var(--H) * .03)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .032em currentColor; color: var(--ink); white-space: nowrap; }
.p-mark .ic { width: .7em; height: .7em; opacity: .7; }
.p-days, .p-rans { display: grid; grid-template-columns: repeat(7, 1fr); width: calc(var(--H) * .826); justify-items: center; }
.p-days span { font: 600 calc(var(--H) * .019)/1 var(--body); color: var(--muted); letter-spacing: .04em; }
.p-rans span { color: var(--ink); display: grid; place-items: center; height: 28px; }

/* ── Habits ───────────────────────────────────────────────────────────── */
.ph-hab-h { position: absolute; left: calc(var(--ap) * 20); right: calc(var(--ap) * 16); top: calc(var(--ap) * 108); display: flex; align-items: center; gap: calc(var(--ap) * 8); }
.ph-hab-t { flex: 1; font: 400 calc(var(--ap) * 28)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.ph-hab-h i { width: calc(var(--ap) * 38); height: calc(var(--ap) * 38); border-radius: 50%; display: grid; place-items: center; background: var(--ink-08); }
.ph-hab-h .ic { width: calc(var(--ap) * 20); height: calc(var(--ap) * 20); }
.h-pill { width: calc(var(--ap) * 336); height: calc(var(--ap) * 84); --sw: 0; }
.hp-act { position: absolute; right: 0; top: 0; bottom: 0; width: calc(var(--sw) * 40%); border-radius: 999px; display: grid; place-items: center; overflow: hidden;
  color: #fff; background: color-mix(in srgb, var(--success) 82%, transparent); opacity: min(1, calc(var(--sw) * 4)); }
.h-pill.armed .hp-act { background: var(--success); }
.hp-act .ic { width: calc(var(--ap) * 24); height: calc(var(--ap) * 24); opacity: min(1, calc(var(--sw) * 2 - .4)); }
.hp-face { position: absolute; inset: 0; border-radius: 999px; display: flex; align-items: center; gap: calc(var(--ap) * 12); padding: 0 calc(var(--ap) * 16) 0 calc(var(--ap) * 14); color: var(--ink);
  transform: translateX(calc(var(--sw) * -42%)); background: color-mix(in srgb, var(--bg) 22%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 calc(var(--lift, 0) * 18px + 2px) calc(var(--lift, 0) * 36px + 6px) -6px rgba(var(--lift-c), calc(var(--lift-a) * (var(--lift, 0) * .8 + .2))); }
.hp-slot { position: relative; width: calc(var(--ap) * 50); height: calc(var(--ap) * 50); display: grid; place-items: center; flex: none; }
.hp-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.hp-ring circle { fill: none; stroke-width: 3; stroke-linecap: round; }
.hp-ring .bg { stroke: var(--ink-12); }
.hp-ring .fg { stroke: var(--ink); }
.hp-disc { width: calc(var(--ap) * 36); height: calc(var(--ap) * 36); border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.hp-disc .ic { width: calc(var(--ap) * 20); height: calc(var(--ap) * 20); }
.hp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--ap) * 6); }
.hp-name { font: 400 calc(var(--ap) * 18)/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; white-space: nowrap; }
.hp-name em { font: 500 calc(var(--ap) * 12)/1 var(--body); font-style: normal; color: var(--muted); -webkit-text-stroke: 0; }
.hp-st { display: flex; align-items: center; gap: calc(var(--ap) * 5); font: 500 calc(var(--ap) * 12)/1 var(--body); color: var(--muted); }
.hp-st i { width: calc(var(--ap) * 48); height: 2.5px; border-radius: 2px; background: var(--ink); opacity: .4; }
.hp-tick { width: calc(var(--ap) * 32); height: calc(var(--ap) * 32); flex: none; border-radius: 50%; display: grid; place-items: center; color: transparent;
  box-shadow: inset 0 0 0 1.4px var(--ink-60); transition: background-color .4s var(--ease), color .4s, box-shadow .4s, transform .5s var(--spring); }
.hp-tick .ic { width: calc(var(--ap) * 18); height: calc(var(--ap) * 18); }
.h-pill.done .hp-tick { background: var(--success); color: #fff; box-shadow: none; transform: scale(1.06); }
.h-badge { display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.2em; border-radius: 999px; white-space: nowrap; font: 600 calc(var(--H) * .021)/1 var(--body); color: var(--ink); }
/* the habit's detail sheet, in glass (wide screens) */
.h-sheet { display: none; z-index: 1; width: calc(var(--H) * .42); font-size: calc(var(--H) * .021); color: var(--ink); }
.wide .h-sheet { display: block; }
.h-sheet .sq-body { padding: 1.5em 1.5em 1.6em; }
.hs-head { display: flex; align-items: center; gap: .85em; }
.hs-disc { width: 2.7em; height: 2.7em; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.hs-name { font: 400 1.45em/1 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.hs-sub { margin-top: .35em; font: 500 .8em/1 var(--body); color: var(--muted); }
.hs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; margin-top: 1.3em; }
.hs-stats div { padding: .8em .7em; border-radius: 1.1em; background: var(--ink-08); }
.hs-stats b { display: block; font: 400 1.3em/1 var(--syne); -webkit-text-stroke: .034em currentColor; }
.hs-stats span { display: block; margin-top: .4em; font: 500 .7em/1.2 var(--body); color: var(--muted); }
.hs-h { margin: 1.3em 0 .6em; font: 600 .72em/1 var(--body); letter-spacing: .08em; color: var(--muted); }
.hs-grid { display: grid; grid-template-columns: repeat(7, 1.05em); justify-content: space-between; row-gap: .5em; }
.hs-grid i { width: 1.05em; height: 1.05em; border-radius: 50%; background: var(--ink-12); }
.hs-grid i.on { background: var(--success); }
.hs-mood { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.hs-mood div { display: flex; align-items: center; gap: .55em; }
.hs-mood img { width: 2em; height: 2em; flex: none; }
.hs-mood b { font: 400 1.2em/1 var(--syne); -webkit-text-stroke: .034em currentColor; }
.hs-mood span { font: 500 .74em/1 var(--body); color: var(--muted); }
.hs-goal { display: flex; gap: .4em; }
.hs-goal i { flex: 1; height: .55em; border-radius: 1em; background: var(--ink-12); transition: background-color .6s var(--ease); }
.hs-goal i.on { background: var(--ink); }

/* ── For everyone: the inverted chapter ───────────────────────────────── */
.f-panel { position: absolute; inset: 0; overflow: hidden; clip-path: inset(40% 40% round 60px); }
/* dark mode → warm paper · light mode → the cool violet ground (never brown) */
.inv-ground { --ink: #231814; --ink-2: #5E504B; --muted: #6E605A; --ink-08: rgba(35,24,20,.08); --ink-12: rgba(35,24,20,.12); --ink-60: rgba(35,24,20,.6);
  --glass-rgb: 40,23,15; --veil: rgba(40,23,15,.035); --chip: rgba(40,23,15,.055); --bg: #F3E7E1; --on-bold: #F3E7E1; --grid-c: rgba(35,24,20,.09);
  --rim-sub-p: .2; --rim-sub-d: .035; --rim-w: 1px; --lift-c: 74,40,26; --lift-a: .2; background: #F3E7E1; color: var(--ink); }
:root[data-theme="light"] .inv-ground { --ink: #F3E7E1; --ink-2: #9B97A3; --muted: #8B8794; --ink-08: rgba(243,231,225,.08); --ink-12: rgba(243,231,225,.12); --ink-60: rgba(243,231,225,.6);
  --glass-rgb: 227,222,237; --veil: rgba(227,222,237,.05); --chip: rgba(227,222,237,.10); --bg: #0F0C14; --on-bold: #231814; --grid-c: rgba(243,231,225,.07);
  --rim-sub-p: .4; --rim-sub-d: .06; --rim-w: .8px; --lift-c: 0,0,0; --lift-a: .45; background: #0F0C14; }
.f-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-c) 1px, transparent 1px), linear-gradient(90deg, var(--grid-c) 1px, transparent 1px); background-size: 34px 34px; background-position: center;
  -webkit-mask: radial-gradient(ellipse 70% 70% at 50% 46%, #000 10%, rgba(0,0,0,.5) 40%, transparent 75%); mask: radial-gradient(ellipse 70% 70% at 50% 46%, #000 10%, rgba(0,0,0,.5) 40%, transparent 75%); }
.f-anchor { position: absolute; left: 50%; top: 44%; width: 0; height: 0; }
.f-word { font: 400 clamp(72px, 13.5vw, 260px)/1 var(--syne); letter-spacing: -0.045em; -webkit-text-stroke: .03125em currentColor; font-synthesis: none; white-space: nowrap; text-align: center; }
.f-card { width: min(500px, 86vw); --sq-tint: var(--veil); }
.f-card .sq-body { display: flex; align-items: flex-start; gap: 18px; padding: 24px 28px 26px 24px; }
.f-disc { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.f-h { margin: 4px 0 8px; font: 400 clamp(20px, 1.6vw, 24px)/1.05 var(--syne); letter-spacing: -0.02em; -webkit-text-stroke: .034em currentColor; }
.f-card p { margin: 0; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.f-dots { position: absolute; left: 50%; bottom: max(34px, 7vh); transform: translateX(-50%); display: flex; gap: 14px; }
.f-dot { width: 52px; height: 52px; border: 0; padding: 0; cursor: pointer; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  transition: color .5s var(--ease), background-color .5s var(--ease), box-shadow .7s var(--ease), transform .6s var(--spring); }
.f-dot.past { color: var(--ink); }
.f-dot.on { color: var(--bg); background: var(--ink); transform: scale(1.12);
  box-shadow: 0 0 34px 4px color-mix(in srgb, var(--ink) 32%, transparent), 0 10px 26px -8px rgba(var(--lift-c), .5); }

/* ── The grid behind everything, the back-to-top, the footer ──────────── */
.grid-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background-image: linear-gradient(var(--grid-c) 1px, transparent 1px), linear-gradient(90deg, var(--grid-c) 1px, transparent 1px); background-size: 34px 34px;
  -webkit-mask: radial-gradient(ellipse 72% 72% at 50% 48%, #000 10%, rgba(0,0,0,.55) 40%, transparent 76%); mask: radial-gradient(ellipse 72% 72% at 50% 48%, #000 10%, rgba(0,0,0,.55) 40%, transparent 76%); }
.to-top { position: fixed; z-index: 45; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 6px 19.5px var(--header-shadow); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--spring); }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) { .to-top:hover .ic { transform: translateY(-2px); } }
/* The footer is a bento like the app's: the neumorphic face, painted by js/bento.js. */
[data-bento] { position: relative; isolation: isolate; }
.bento-canvas { position: absolute; left: -48px; top: -48px; z-index: -1; pointer-events: none; }
/* overflow-x: clip — the bento's shadow canvas bleeds 48 px and must not widen the page. */
.site-footer { padding: 30px 0 calc(34px + env(safe-area-inset-bottom)); overflow-x: clip; }
.footer-inner { border-top: 0; padding: 28px 34px; }

/* ── Wide screens: text on one side, the object on the other ──────────── */
.wide { --rail-y: var(--ay, 50%); }
.wide .lay-l .anchor { left: 64%; top: var(--ay, 50%); }
.wide .lay-r .anchor { left: 38%; top: var(--ay, 50%); }
.wide .lay-c .anchor { left: 50%; top: var(--ay, 50%); }
.h-phone { z-index: 2; }
.wide .scene:is(.lay-l, .lay-r, .lay-c) .st-cap { top: var(--ay, 50%); bottom: auto; transform: translateY(-50%); text-align: left; width: min(30vw, 470px); }
.wide .lay-l .st-cap, .wide .lay-c .st-cap { left: calc(var(--padx) + 44px); }
.wide .lay-c .st-cap { width: min(19vw, 290px); }
.wide .lay-r .st-cap { left: auto; right: var(--padx); }
.wide .scene:is(.lay-l, .lay-r, .lay-c) .st-t { margin-bottom: 14px; font-size: clamp(34px, 3vw, 50px); }
.wide .scene:is(.lay-l, .lay-r, .lay-c) .st-p { margin: 0; font-size: clamp(17px, 1.3vw, 20px); max-width: 32ch; }

/* ── Cursor: a light or dark dot ──────────────────────────────────────── */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor { display: contents; }
.cur-dot, .cur-label { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .3s; will-change: transform; }
.cursor.on .cur-dot { opacity: 1; }
.cur-dot::before { content: ''; position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #F3E7E1;
  box-shadow: 0 1px 8px rgba(0,0,0,.3); transition: transform .4s var(--spring), background-color .25s ease, box-shadow .25s; }
.cursor.ink .cur-dot::before { background: #231814; box-shadow: 0 1px 8px rgba(255,247,242,.25); }
.cursor.link .cur-dot::before { transform: scale(1.6); }
.cursor.down .cur-dot::before { transform: scale(.7); }
.cur-label { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; margin: 18px 0 0 20px; border-radius: 999px; color: var(--ink); white-space: nowrap;
  font: 400 15px/1 var(--syne); letter-spacing: -0.3px; -webkit-text-stroke: .59px currentColor;
  -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); scale: .85; transform-origin: 0 0; transition: opacity .25s, scale .45s var(--spring); }
.cursor.on.labelled .cur-label { opacity: 1; scale: 1; }


/* ── Phones & tablets: the same centred stage, a little tighter ───────── */
@media (max-width: 859px) {
  :root { --padx: 10px; }
  .st-title { font-size: clamp(40px, 11.5vw, 72px); }
  :root { --rail-y: var(--ay, 42%); }
  .anchor, .st-title { top: var(--ay, 42%); }
  .st-cap { width: calc(100% - 40px); }
  .st-t { font-size: 30px; margin-bottom: 8px; }
  .st-p { font-size: 16px; line-height: 1.45; }
  .j-day .jd-l { display: none; }
  .st-rail { height: 30vh; width: 3px; gap: 4px; }
  .st-rail b.gap { margin-top: 10px; }
  .j-e2e { font-size: calc(var(--H) * .5); }
  .f-anchor { top: 40%; }
  .f-word { font-size: clamp(52px, 17vw, 112px); }
  .f-dots { bottom: 18px; gap: 10px; }
  .f-dot { width: 44px; height: 44px; }
  .scroll-cue { display: none; }
}

@media (max-width: 720px) {
  .wide-only { display: none; }
  /* Phones: below the caption, at the edge — never on top of the text. */
  .to-top { bottom: calc(12px + env(safe-area-inset-bottom)); right: 12px; width: 40px; height: 40px; }
  .menu-btn { display: inline-grid; }
  .dock { display: flex; }
  .site-header { top: calc(10px + env(safe-area-inset-top)); }
  .header-inner { height: 54px; padding: 0 6px 0 16px; }
  .ch-t { font-size: 14px; }
}
@media (max-width: 560px) { .hide-sm { display: none; } }
@media (max-width: 400px) { .wordmark { display: none; } }
/* Phones: the hero fits the screen, "whit." drifts only a little, and a scroll cue
   sits at the very bottom of the viewport whatever the phone's height. */
.scroll-cue-m { display: none; }
@media (max-width: 720px) {
  .hero { height: max(560px, 100svh); }
  .hero-foot { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .hero.on .ht-l > span { transform: translateY(calc(var(--sk) * -6vh)); }
  .hero.on .ht-r > span { transform: translateY(calc(var(--sk) * 2.5vh)); opacity: calc(1 - var(--sk) * 1.4); }
  .scroll-cue-m { position: fixed; z-index: 3; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 11px/1 var(--body); letter-spacing: .12em; color: var(--muted);
    opacity: 0; transition: opacity .8s var(--ease) 2.2s; pointer-events: none; }
  .hero.on .scroll-cue-m { opacity: calc(1 - var(--sk) * 6); transition-delay: 0s, 0s; }
  .scroll-cue-m .ic { animation: cuebob 1.8s var(--ease) infinite; }
  .footer-inner { padding: 22px 22px; }
}
@keyframes cuebob { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after, .caret, .jn-t::after { animation: none; }
  .st-item, .st-hl { transition-duration: .01s; }
}

