/* Layout: one long scroll that moves from a scattered student desk to a single pinned checklist,
   then four chapters with a sticky live demo, one oversized checkbox, and the plain facts. */
:root {
  /* Color: planner paper, deep ink, the brand's forest green and its highlighter-lime fold. */
  --paper: #f4f5ef;
  --paper-2: #e9ebe2;
  --surface: #ffffff;
  --surface-2: #f8f9f4;
  --ink: #141c18;
  --ink-2: #46504b;
  --ink-3: #78817c;
  --ink-4: #a6ada8;
  --line: #e0e2d9;
  --line-2: #cfd3c8;
  --brand-l: #246b54;
  --brand-d: #62c79c;
  --mark: #d4f36b;
  --brand: var(--brand-l);
  --on-brand: #ffffff;
  --mark-ink: #141c18;
  --hl: color-mix(in oklab, var(--mark) 88%, transparent);
  --danger: #c43d2b;
  --danger-soft: #fbebe7;
  --warn: #93600c;
  --plan-c: #e2703a;
  --note-bg: #fbe58a;
  --note-ink: #3b3212;
  --toast-bg: #1a201d;
  --toast-ink: #f1f4f2;
  --bezel: #141c18;
  --brand-soft: color-mix(in oklab, var(--brand) 10%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 18%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 32%, var(--surface));
  --brand-text: color-mix(in oklab, var(--brand) 88%, var(--ink));
  --shadow-1: 0 1px 2px rgb(20 28 24 / 6%);
  --shadow-2: 0 1px 2px rgb(20 28 24 / 5%), 0 8px 22px rgb(20 28 24 / 8%);
  --shadow-3: 0 2px 6px rgb(20 28 24 / 6%), 0 30px 70px rgb(20 28 24 / 16%);
  --grid-dot: rgb(20 28 24 / 9%);

  /* Type: a sturdy grotesk for Latin, Noto Sans SC Black for Chinese display, a mono for times and keys. */
  --f-display: "Schibsted Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --f-body: "Schibsted Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;

  --fs-hero: clamp(2.45rem, 1.1rem + 4.6vw, 5.4rem);
  --fs-h2: clamp(2rem, 1.15rem + 2.9vw, 3.75rem);
  --fs-h3: 1.3rem;
  --fs-lede: clamp(1.05rem, 0.98rem + 0.3vw, 1.22rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
}

/* The app's own eight palettes: [brand light, brand dark, fold accent]. */
:root[data-palette="blue"] { --brand-l: #2c6fae; --brand-d: #74afe9; --mark: #f5cd70; }
:root[data-palette="lavender"] { --brand-l: #337889; --brand-d: #63bccb; --mark: #f3c85a; }
:root[data-palette="rose"] { --brand-l: #98601b; --brand-d: #dba45a; --mark: #f1ca48; }
:root[data-palette="teal"] { --brand-l: #2859cf; --brand-d: #7d9af3; --mark: #f4d63e; }
:root[data-palette="sand"] { --brand-l: #8059a6; --brand-d: #b997de; --mark: #f0c94e; }
:root[data-palette="midnight"] { --brand-l: #625fc4; --brand-d: #9d9bf2; --mark: #ffd166; }
:root[data-palette="plum"] { --brand-l: #9a6248; --brand-d: #d59f84; --mark: #f1c85b; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1311;
    --paper-2: #151b18;
    --surface: #181d1b;
    --surface-2: #1d2321;
    --ink: #e9eeeb;
    --ink-2: #b6beba;
    --ink-3: #87918c;
    --ink-4: #5e6763;
    --line: #262d2a;
    --line-2: #343c38;
    --brand: var(--brand-d);
    --on-brand: #0b110e;
    --hl: color-mix(in oklab, var(--mark) 42%, transparent);
    --danger: #ff8572;
    --danger-soft: #33201c;
    --warn: #eeb653;
    --plan-c: #f08a55;
    --toast-bg: #eef2ef;
    --toast-ink: #141c18;
    --bezel: #323a37;
    --brand-soft: color-mix(in oklab, var(--brand) 14%, var(--surface));
    --brand-soft-2: color-mix(in oklab, var(--brand) 24%, var(--surface));
    --brand-line: color-mix(in oklab, var(--brand) 40%, var(--surface));
    --brand-text: var(--brand);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 26px rgb(0 0 0 / 32%);
    --shadow-3: 0 2px 8px rgb(0 0 0 / 35%), 0 30px 80px rgb(0 0 0 / 55%);
    --grid-dot: rgb(255 255 255 / 7%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1311;
  --paper-2: #151b18;
  --surface: #181d1b;
  --surface-2: #1d2321;
  --ink: #e9eeeb;
  --ink-2: #b6beba;
  --ink-3: #87918c;
  --ink-4: #5e6763;
  --line: #262d2a;
  --line-2: #343c38;
  --brand: var(--brand-d);
  --on-brand: #0b110e;
  --hl: color-mix(in oklab, var(--mark) 42%, transparent);
  --danger: #ff8572;
  --danger-soft: #33201c;
  --warn: #eeb653;
  --plan-c: #f08a55;
  --toast-bg: #eef2ef;
  --toast-ink: #141c18;
  --bezel: #323a37;
  --brand-soft: color-mix(in oklab, var(--brand) 14%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 24%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 40%, var(--surface));
  --brand-text: var(--brand);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 26px rgb(0 0 0 / 32%);
  --shadow-3: 0 2px 8px rgb(0 0 0 / 35%), 0 30px 80px rgb(0 0 0 / 55%);
  --grid-dot: rgb(255 255 255 / 7%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--hl); color: var(--ink); }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--max), 100%); margin-inline: auto; padding-inline: var(--gutter); }
kbd {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
  background: var(--surface); color: var(--ink-2); font: 600 .78em/1 var(--f-mono);
}
code { font-family: var(--f-mono); font-size: .9em; padding: .1em .4em; border-radius: 6px; background: var(--paper-2); }

.logo-body { fill: var(--logo-body, var(--brand-l)); }
.logo-fold { fill: var(--logo-fold, var(--mark)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  color: var(--brand-text); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 2px 2px 2px 0; background: var(--brand); box-shadow: 3px -3px 0 -1px var(--mark); }
.hl {
  color: inherit; padding: 0 .08em; margin: 0 -.04em;
  background: linear-gradient(transparent 56%, var(--hl) 56%, var(--hl) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.h2 {
  margin: 0; font-family: var(--f-display); font-size: var(--fs-h2); font-weight: 900;
  line-height: 1.08; letter-spacing: -.035em; text-wrap: balance;
}
.section { padding-block: clamp(80px, 12vw, 150px); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-lede { margin: 20px 0 0; max-width: 34em; color: var(--ink-2); font-size: var(--fs-lede); line-height: 1.7; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px 12px 12px 4px;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}
.btn svg { font-size: 1.1em; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-2); }
.btn-primary:hover { background: color-mix(in oklab, var(--brand) 86%, var(--ink)); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-text); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink-2); font-size: 18px;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.text-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font-weight: 600; opacity: .8; }
.text-btn:hover { opacity: 1; background: color-mix(in oklab, currentColor 8%, transparent); }

/* Brand mark */
.brand-mark { position: relative; display: inline-grid; width: 30px; height: 30px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; stroke: none; }
.brand-mark.sm { width: 22px; height: 22px; }
.brand-mark.lg { width: 56px; height: 56px; }
.brand-mark.xl { width: .78em; height: .78em; }
.badge {
  position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 999px;
  background: var(--danger); color: #fff; font: 700 10px/1 var(--f-mono);
  transition: transform .35s var(--spring);
}
.badge.is-bump { animation: bump .45s var(--spring); }
.badge.is-off { transform: scale(0); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: var(--nav-h); width: min(1320px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; text-decoration: none; }
.nav-brand .brand-mark { transition: transform .4s var(--spring); }
.nav-brand.is-wiggle .brand-mark { animation: wiggle .5s var(--spring); }
@keyframes wiggle { 30% { transform: rotate(-14deg) scale(1.12); } 60% { transform: rotate(9deg) scale(1.05); } }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-size: .95rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 270vh; height: 270svh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-paper {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 40%, transparent 100%);
}
.chaos { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.hero-copy { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); }
.hero-a {
  top: 50%; max-width: min(790px, 60vw); transform-origin: 0 50%; will-change: transform, opacity;
  transform: translateY(calc(var(--a-y, -44%) - var(--fa, 0) * 70px)) scale(calc(1 - var(--fa, 0) * .04));
  opacity: calc(1 - var(--fa, 0));
}
.hero-title {
  margin: 0; font-family: var(--f-display); font-size: var(--fs-hero); font-weight: 900;
  line-height: 1.04; letter-spacing: -.045em; text-wrap: balance;
  text-shadow: 0 0 28px var(--paper), 0 0 10px var(--paper);
}
.lede { margin: 26px 0 0; max-width: 31em; color: var(--ink-2); font-size: var(--fs-lede); line-height: 1.7; text-shadow: 0 0 12px var(--paper); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.scroll-hint { display: flex; align-items: center; gap: 10px; margin: 30px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.mouse { position: relative; width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 10px; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px; border-radius: 2px; background: currentColor; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }

.hero-b { top: calc(var(--nav-h) + 24px); opacity: 0; pointer-events: none; will-change: transform, opacity; }
.hero-b.is-live { pointer-events: auto; }
.hero-b-title { margin: 0; font-family: var(--f-display); font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.hero-b-sub { margin: 8px 0 0; color: var(--ink-2); }

.clock {
  position: absolute; z-index: 3; right: var(--gutter); top: calc(var(--nav-h) + 28px);
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px;
  border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; background: var(--surface);
  box-shadow: var(--shadow-1); color: var(--ink-2); font-size: var(--fs-sm);
}
.clock svg { color: var(--danger); font-size: 16px; }
.clock-time { color: var(--ink); font: 700 1rem/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* Chaos fragments */
.cc { position: absolute; left: 0; top: 0; width: 230px; will-change: transform, opacity, width; }
.cc-in {
  position: relative; padding: 11px 13px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-2); font-size: 13px; line-height: 1.4;
  animation: bob var(--bob, 7s) ease-in-out var(--bob-delay, 0s) infinite alternate;
}
.hero-stage.is-moving .cc-in { animation-play-state: paused; }
@keyframes bob { from { transform: translateY(-4px) rotate(-.6deg); } to { transform: translateY(5px) rotate(.6deg); } }
.cc-course { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.cc-course i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cc-title { margin: 4px 0 6px; color: var(--ink); font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.cc-due { color: var(--ink-3); font: 500 11.5px/1.3 var(--f-mono); }
.cc-task .cc-in { border-top: 3px solid var(--c); }
.cc-note .cc-in { background: var(--note-bg); border-color: transparent; color: var(--note-ink); font-weight: 700; font-size: 15px; border-radius: 3px; padding: 16px 16px 18px; box-shadow: 0 10px 24px rgb(60 50 10 / 18%); }
.cc-note .cc-in::before { content: ""; position: absolute; top: -9px; left: 50%; width: 54px; height: 18px; margin-left: -27px; background: color-mix(in oklab, var(--surface) 70%, transparent); transform: rotate(-3deg); }
.cc-pill .cc-in { display: flex; align-items: center; gap: 9px; border-radius: 999px; padding: 9px 14px; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.cc-pill .cc-in b { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--danger); color: #fff; font: 700 11px/1 var(--f-mono); }
.cc-cal .cc-in { width: 92px; padding: 0; overflow: hidden; text-align: center; }
.cc-cal .cc-in span { display: block; padding: 3px 0; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.cc-cal .cc-in strong { display: block; padding: 6px 0 2px; font: 800 30px/1 var(--f-display); }
.cc-cal .cc-in small { display: block; padding-bottom: 8px; color: var(--ink-3); font-size: 10.5px; }
.cc-file .cc-in { display: flex; gap: 10px; align-items: center; }
.cc-file .cc-in b { display: grid; place-items: center; width: 30px; height: 36px; flex: none; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font: 800 9px/1 var(--f-mono); }
.cc-file .cc-in span { color: var(--ink-2); font-size: 12px; }

/* App window (mock of the real Today page) */
.app-window {
  --app-top: calc(var(--nav-h) + 122px);
  position: absolute; z-index: 1; left: 0; right: 0; top: var(--app-top); margin-inline: auto;
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  height: calc(100% - var(--app-top) - 20px);
  border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow-3);
  opacity: 0; transform-origin: 50% 0; will-change: transform, opacity;
}
.app-window.is-live { z-index: 4; }
.app-window::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; pointer-events: none;
  background: linear-gradient(transparent, var(--paper));
}
.app { display: grid; grid-template-columns: 196px minmax(0, 1fr) 272px; height: 100%; font-size: 13.5px; line-height: 1.45; }
.app-side { display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--paper-2); }
.app-brand { display: flex; align-items: center; gap: 9px; padding: 2px 4px 6px; font-weight: 800; font-size: 14.5px; }
.app-search { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-3); font-size: 12.5px; }
.app-search kbd { margin-left: auto; font-size: 10px; }
.app-nav { display: grid; gap: 2px; }
.app-nav span { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; color: var(--ink-2); }
.app-nav span.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-1); }
.app-nav span.on svg { color: var(--brand); }
.app-nav em { margin-left: auto; color: var(--ink-3); font: 600 12px/1 var(--f-mono); font-style: normal; }
.app-sync { display: flex; gap: 9px; margin-top: auto; padding: 8px; color: var(--ink-2); font-size: 12.5px; }
.app-sync svg { margin-top: 3px; }
.app-sync small { display: block; color: var(--ink-3); font-size: 11px; }
.app-main { min-width: 0; padding: 20px 26px; overflow: hidden; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.app-head small { color: var(--ink-3); font-size: 12px; }
.app-head h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.app-new { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 12.5px; }
.app-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); }
.app-summary-text { display: grid; min-width: 0; flex: 1 1 180px; }
.app-summary-text strong { font-size: 17px; letter-spacing: -.01em; }
.app-summary-text span { color: var(--ink-3); font-size: 12.5px; }
.app-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.chip.danger { border-color: color-mix(in oklab, var(--danger) 30%, var(--surface)); background: var(--danger-soft); color: var(--danger); }
.ring { position: relative; display: grid; place-items: center; width: 54px; height: 54px; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring-track { stroke: var(--brand-soft-2); }
.ring-value { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .7s var(--ease); }
.ring b { font: 700 12px/1 var(--f-mono); }

.app-list { margin-top: 6px; }
.group-h { display: flex; align-items: center; gap: 8px; margin: 16px 2px 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.group-h.danger { color: var(--danger); }
.group-h .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); font: 600 11px/1 var(--f-mono); }
.group-h.danger .n { background: var(--danger-soft); color: var(--danger); }
.rows { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); transition: background-color .3s; }
.row + .row { border-top: 1px solid var(--line); }
.row-title { font-weight: 700; font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .3s; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--c, var(--ink-4)); vertical-align: 1px; }
.tag { padding: 0 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.6; }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.brand { color: var(--brand-text); }
.when { color: var(--ink-2); font: 600 12px/1.3 var(--f-mono); text-align: right; white-space: nowrap; }
.when.danger { color: var(--danger); }
.when.warn { color: var(--warn); }
.when small { display: block; color: var(--ink-3); font: 500 10.5px/1.3 var(--f-body); }
.check {
  position: relative; display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--on-brand);
  transition: border-color .2s, background-color .25s, transform .3s var(--spring);
}
.check::before { content: ""; position: absolute; inset: -10px; }
.check svg { font-size: 13px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring); }
.check:hover { border-color: var(--brand); }
.check:hover svg { opacity: .35; transform: scale(1); color: var(--brand); }
.row.is-done .check, .check.is-on { border-color: var(--brand); background: var(--brand); transform: scale(1.08); }
.row.is-done .check svg, .check.is-on svg { opacity: 1; transform: scale(1); color: var(--on-brand); }
.row.is-done { background: var(--brand-soft); }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.done-group summary { display: flex; align-items: center; gap: 8px; margin: 16px 2px 7px; color: var(--ink-3); font-size: 12.5px; font-weight: 700; cursor: pointer; list-style: none; }
.done-group summary::-webkit-details-marker { display: none; }
.done-group summary svg { transition: transform .2s; }
.done-group[open] summary svg { transform: rotate(90deg); }
.done-group .row-title { color: var(--ink-3); text-decoration: line-through; }
.empty { display: grid; justify-items: start; gap: 6px; padding: 22px 18px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--ink-2); }
.empty b { color: var(--ink); font-size: 15px; }

.app-next { min-width: 0; padding: 18px 16px; border-left: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.app-next-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.app-next-head span { color: var(--ink-3); font-size: 12px; }
.up-day { padding: 9px 0; border-bottom: 1px solid var(--line); }
.up-day:last-child { border-bottom: 0; }
.up-day-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; font-size: 12.5px; font-weight: 700; }
.up-day-h small { color: var(--ink-3); font: 500 11px/1 var(--f-mono); }
.up-day-h em { margin-left: auto; color: var(--ink-3); font: 500 11px/1 var(--f-mono); font-style: normal; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; color: var(--ink-2); font-size: 12px; }
.up-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row small { color: var(--ink-3); font-size: 11px; }
.up-row small.plan { color: var(--plan-c); }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.ticker-track { display: flex; align-items: center; gap: 28px; width: max-content; padding-block: 18px; animation: tick-scroll 38s linear infinite; }
.ticker span { font-family: var(--f-display); font-size: clamp(1.05rem, .9rem + .7vw, 1.5rem); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.ticker i { width: 14px; height: 14px; border-radius: 4px 4px 4px 1px; background: var(--brand); box-shadow: 4px -4px 0 -2px var(--mark); }
@keyframes tick-scroll { to { transform: translateX(-50%); } }

/* ---------- Flow ---------- */
.flow-grid { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); }
.flow-steps { margin: 0; padding: 0; list-style: none; }
.flow-step { display: flex; flex-direction: column; justify-content: center; min-height: 78vh; padding-block: 40px; color: var(--ink-3); transition: color .4s; }
.flow-step:first-child { min-height: 64vh; justify-content: flex-start; padding-top: 12vh; }
.flow-step.is-active { color: var(--ink); }
.flow-step h3 { margin: 14px 0 12px; font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.1; }
.flow-step p { margin: 0; max-width: 28em; font-size: 1.04rem; line-height: 1.75; }
.flow-step.is-active p { color: var(--ink-2); }
.step-no {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px 12px 12px 4px; background: var(--paper-2); color: var(--ink-3);
  font: 800 1rem/1 var(--f-mono); transition: background-color .4s, color .4s;
}
.flow-step.is-active .step-no { background: var(--brand); color: var(--on-brand); }
.facts { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .95rem; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts svg { color: var(--brand); font-size: 18px; }
.facts kbd { font-size: .8rem; }
.flow-step:not(.is-active) .facts svg { color: inherit; }
.demo-slot:empty { display: none; }

.flow-stage { position: relative; }
.flow-sticky { position: sticky; top: calc(var(--nav-h) + 24px); height: calc(100vh - var(--nav-h) - 48px); min-height: 560px; max-height: 760px; }
.flow-progress { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 6px; }
.flow-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background-color .4s; }
.flow-progress i.on { background: var(--brand); }
.flow-sticky .demo { position: absolute; inset: 22px 0 0; opacity: 0; visibility: hidden; transform: translateY(18px) scale(.985); transition: opacity .45s var(--ease), transform .55s var(--ease), visibility 0s .45s; }
.flow-sticky .demo.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease), transform .55s var(--ease), visibility 0s; }
.demo-frame { position: relative; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper-2); box-shadow: var(--shadow-2); overflow: hidden; }
.demo-slot .demo-frame { height: auto; }
.demo-slot { margin-top: 28px; }

/* Demo 1: connect */
.demo-connect .demo-frame { display: grid; place-items: center; background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.3px); background-size: 22px 22px; }
.dc-card { display: grid; justify-items: center; width: min(460px, 100%); padding: 26px 28px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-3); text-align: center; }
.dc-card h4 { margin: 10px 0 2px; font-size: 1.3rem; letter-spacing: -.02em; }
.dc-intro { margin: 0 0 14px; color: var(--ink-3); font-size: var(--fs-sm); }
.dc-form { display: grid; gap: 8px; width: 100%; text-align: left; }
.dc-form label { color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.dc-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font: 500 13.5px/1 var(--f-mono); }
.dc-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent); }
.dc-form .btn { margin-top: 6px; }
.dc-form .btn.is-pressed { transform: scale(.97); filter: brightness(.92); }
.dc-sync { width: 100%; margin-top: 16px; text-align: left; }
.dc-bar { height: 5px; border-radius: 5px; background: var(--brand-soft-2); overflow: hidden; }
.dc-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .5s var(--ease); }
.dc-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin: 10px 0 0; padding: 0; list-style: none; }
.dc-courses li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 5px 2px; font-size: 12.5px; animation: pop-in .4s var(--spring) both; }
.dc-courses li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-courses li small { color: var(--ink-3); font: 500 11.5px/1 var(--f-mono); }
.dc-courses li svg { color: var(--brand); stroke-width: 3; }
.dc-done { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; font-size: 13.5px; animation: pop-in .45s var(--spring) both; }
.dc-done svg { stroke-width: 3; }
.dc-note { margin: 12px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.5; }
.replay { position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.replay:hover { color: var(--ink); border-color: var(--line-2); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Demo 2: focus */
.demo-focus .demo-frame { display: flex; flex-direction: column; gap: 12px; }
.df-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-3); transition: border-color .2s, box-shadow .2s; }
.df-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent); }
.df-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--ink); font-size: .95rem; }
.df-search input::-webkit-search-cancel-button { display: none; }
.df-search.is-flash { animation: flash 0.9s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--brand) 25%, transparent); border-color: var(--brand); } }
.df-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in oklab, var(--ink) 5%, transparent); overflow-x: auto; scrollbar-width: none; }
.df-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.df-tabs button em { color: var(--ink-3); font: 600 11.5px/1 var(--f-mono); font-style: normal; }
.df-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.df-tabs button[aria-selected="true"] em { color: var(--brand-text); }
.df-tabs button.is-alert em { color: var(--danger); }
.df-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 30px; font-size: 13.5px; scrollbar-width: thin; }
.df-list .group-h:first-child { margin-top: 4px; }
.df-list mark { background: var(--hl); color: inherit; border-radius: 2px; }

/* Demo 3: plan */
.demo-plan .demo-frame { padding: 18px; }
.dp { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; height: 100%; }
.dp-board-scroll { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); scrollbar-width: thin; }
.dp-board { position: relative; display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); min-width: 600px; min-height: 100%; }
.dp-col { position: relative; border-right: 1px solid var(--line); transition: background-color .2s; }
.dp-col:last-of-type { border-right: 0; }
.dp-col.is-today { background: color-mix(in oklab, var(--brand) 6%, var(--surface)); }
.dp-col.is-over { background: var(--brand-soft-2); }
.dp-col.is-blocked { background: repeating-linear-gradient(-45deg, var(--paper-2) 0 6px, transparent 6px 12px); }
.dp-col.is-blocked .dp-head { opacity: .45; }
.dp-head { display: grid; justify-items: center; gap: 1px; padding: 10px 4px 9px; border-bottom: 1px solid var(--line); text-align: center; }
.dp-head small { color: var(--ink-3); font-size: 11.5px; }
.dp-head strong { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font: 800 19px/1 var(--f-display); }
.dp-col.is-today .dp-head strong { background: var(--brand); color: var(--on-brand); }
.dp-head em { min-height: 15px; color: var(--ink-3); font-size: 11px; font-style: normal; }
.dp-flag { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.dp-lanes { position: absolute; left: 0; right: 0; top: 78px; display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); grid-auto-rows: 82px; gap: 8px 0; padding: 8px 0 40px; pointer-events: none; }
.dp-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; margin: 0 4px; padding: 7px 14px 7px 9px;
  border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-2);
  font-size: 12px; line-height: 1.3; pointer-events: auto; touch-action: none; cursor: grab; user-select: none;
  animation: pop-in .35s var(--spring) both;
}
.dp-card.is-drag { opacity: .35; }
.dp-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; overflow-wrap: anywhere; }
.dp-card > div:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-card small { color: var(--ink-3); font-size: 11px; }
.dp-segs { display: flex; gap: 3px; margin-top: 4px; }
.dp-segs i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.dp-segs i.on { background: var(--brand); }
.dp-x { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: var(--surface); color: var(--ink-3); font-size: 12px; opacity: 0; transition: opacity .2s; }
.dp-card:hover .dp-x, .dp-x:focus-visible { opacity: 1; }
.dp-x:hover { background: var(--paper-2); color: var(--ink); }
.dp-handle { position: absolute; top: 50%; right: -5px; width: 10px; height: 34px; margin-top: -17px; border: 2px solid var(--surface); border-radius: 6px; background: var(--brand); cursor: ew-resize; touch-action: none; box-shadow: var(--shadow-1); }
.dp-handle::after { content: ""; position: absolute; inset: -10px -8px; }
.dp-pool { display: grid; gap: 8px; }
.dp-pool-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; font-size: 13.5px; }
.dp-pool-head span { color: var(--ink-3); font-size: 12px; }
.dp-pool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 196px; overflow: auto; scrollbar-width: thin; }
.dp-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 8px 8px 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-1); font-size: 12.5px; user-select: none; touch-action: pan-y; cursor: grab; transition: border-color .2s, transform .2s; }
.dp-item:hover { border-color: var(--brand-line); }
.dp-item.is-drag { opacity: .35; }
.dp-item.is-shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.dp-grip { display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; padding: 6px 4px; touch-action: none; cursor: grab; }
.dp-grip i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.dp-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.dp-item small { color: var(--ink-3); font-size: 11px; }
.dp-item small.danger { color: var(--danger); }
.dp-go { padding: 4px 9px; border: 1px solid var(--brand-line); border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 700; }
.dp-go:hover { background: var(--brand-soft-2); }
.dp-empty { grid-column: 1 / -1; padding: 12px; border: 1px dashed var(--line-2); border-radius: 11px; color: var(--ink-3); font-size: 13px; text-align: center; }
.ghost {
  position: fixed; left: 0; top: 0; z-index: 70; width: 200px; padding: 9px 12px; border: 1px solid var(--brand-line); border-left: 3px solid var(--c);
  border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-3); font-size: 12.5px; font-weight: 700; pointer-events: none;
}

/* Demo 4: insights */
.demo-insight .demo-frame { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; }
.di-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat small { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.stat small svg { color: var(--brand); }
.stat.danger small svg { color: var(--danger); }
.stat strong { display: block; margin: 6px 0 2px; font: 800 26px/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }
.stat .bar { height: 4px; margin-top: 8px; border-radius: 4px; background: var(--brand-soft-2); overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .7s var(--ease); }
.di-chart-card { padding: 14px 16px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.di-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 13px; }
.di-chart-head small { display: block; color: var(--ink-3); font-size: 11.5px; }
.legend { display: flex; gap: 12px; color: var(--ink-2); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.lg-due { background: var(--brand); }
.lg-plan { background: var(--plan-c); }
.di-chart { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 150px; margin-top: 10px; padding-bottom: 34px; }
.di-chart .gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.di-chart .gridline span { position: absolute; left: 0; top: -8px; padding-right: 4px; background: var(--surface); color: var(--ink-4); font: 500 10px/1 var(--f-mono); }
.di-day { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.di-day .b { position: relative; width: min(16px, 30%); border-radius: 4px 4px 1px 1px; transform-origin: bottom; transition: height .6s var(--ease); }
.di-day .b.due { background: var(--brand); }
.di-day .b.plan { background: var(--plan-c); }
.di-day .b span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); padding-bottom: 2px; color: var(--ink-2); font: 600 10.5px/1 var(--f-mono); }
.di-day label { position: absolute; left: 0; right: 0; bottom: -32px; display: grid; text-align: center; color: var(--ink-3); font-size: 11.5px; line-height: 1.25; }
.di-day label b { color: var(--ink); font-size: 12px; }
.di-day label small { font: 500 10px/1.3 var(--f-mono); }
.di-courses { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.di-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.di-table th { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; font-weight: 600; text-align: left; white-space: nowrap; }
.di-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.di-table tr:last-child td { border-bottom: 0; }
.di-table td.num, .di-table th.num { text-align: right; }
.di-table td.danger { color: var(--danger); font-weight: 700; }
.di-prog { display: flex; align-items: center; gap: 8px; }
.di-prog i { position: relative; width: 90px; height: 5px; border-radius: 5px; background: var(--brand-soft-2); overflow: hidden; }
.di-prog i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--brand); transition: width .6s var(--ease); }
.di-prog span { color: var(--ink-3); font: 500 11px/1 var(--f-mono); }

/* ---------- Tick ---------- */
.tick { position: relative; overflow: hidden; padding-block: clamp(90px, 13vw, 160px); background: var(--paper-2); text-align: center; isolation: isolate; }
.tick-flood {
  position: absolute; inset: 0; z-index: -1; background: var(--brand);
  clip-path: circle(0px at var(--fx, 50%) var(--fy, 60%));
  transition: clip-path .7s cubic-bezier(.7, 0, .2, 1);
}
.tick.is-flood .tick-flood { clip-path: circle(150% at var(--fx, 50%) var(--fy, 60%)); transition-duration: .6s; }
.tick-in { display: grid; justify-items: center; transition: color .35s; }
.tick.is-flood .tick-in { color: var(--on-brand); }
.tick.is-flood .eyebrow, .tick.is-flood .tick-meta { color: color-mix(in oklab, var(--on-brand) 78%, transparent); }
.tick-title { margin: 0; font-family: var(--f-display); font-size: var(--fs-h2); font-weight: 900; letter-spacing: -.04em; line-height: 1.08; }
.tick-task { min-height: 92px; margin-top: 18px; transition: opacity .3s, transform .4s var(--ease); }
.tick-task.is-swap { opacity: 0; transform: translateY(12px); }
.tick-name { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; font-size: clamp(1.15rem, .95rem + 1vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.tick-name .dot { width: 11px; height: 11px; }
.tick-meta { margin: 6px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.big-check { position: relative; display: grid; place-items: center; width: clamp(150px, 22vw, 210px); aspect-ratio: 1; max-width: 100%; margin: 26px 0 30px; padding: 0; border: 0; border-radius: 50%; background: none; transition: transform .35s var(--spring); }
.big-check::before { content: ""; position: absolute; inset: -12px; border: 2px solid var(--brand); border-radius: 50%; opacity: 0; pointer-events: none; animation: halo 2.6s var(--ease) infinite; }
@keyframes halo { 0% { opacity: .55; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.22); } }
.big-check.is-on::before, .tick.is-clear .big-check::before { animation: none; }
.big-check:hover { transform: scale(1.04); }
.big-check:active { transform: scale(.94); }
.big-check svg { width: 100%; height: 100%; overflow: visible; }
.bc-ring { fill: var(--surface); stroke: var(--line-2); stroke-width: 4; transition: stroke .2s; }
.big-check:hover .bc-ring { stroke: var(--brand); }
.bc-fill { fill: var(--brand); stroke: none; transform-origin: 60px 60px; transform: scale(0); transition: transform .45s var(--spring); }
.bc-check { fill: none; stroke: var(--on-brand); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; transition: stroke-dashoffset .35s var(--ease) .12s; }
.big-check:hover .bc-check { stroke: var(--brand); stroke-dashoffset: 0; opacity: .25; transition-delay: 0s; }
.big-check.is-on .bc-fill { transform: scale(1); }
.big-check.is-on .bc-check { stroke: var(--on-brand); stroke-dashoffset: 0; opacity: 1; }
.tick.is-flood .bc-ring { fill: var(--on-brand); stroke: var(--on-brand); }
.tick.is-flood .bc-fill { fill: var(--mark); }
.tick.is-flood .bc-check { stroke: var(--mark-ink); }
.tick-foot { margin: 0; color: inherit; font-size: 1rem; }
.tick-foot b { font: 700 1.05em/1 var(--f-mono); }
.tick .text-btn { margin-top: 14px; }
.tick.is-clear .big-check { pointer-events: none; }

/* ---------- Themes ---------- */
.themes-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 30px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.seg button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: .92rem; font-weight: 600; }
.seg button[aria-checked="true"] { background: var(--brand); color: var(--on-brand); }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatch { display: grid; justify-items: center; gap: 8px; padding: 18px 8px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; transition: border-color .2s, transform .3s var(--spring), box-shadow .2s; }
.swatch:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.swatch svg { width: 44px; height: 44px; stroke: none; transition: transform .4s var(--spring); }
.swatch:hover svg { transform: rotate(-8deg) scale(1.06); }
.swatch b { font-size: .95rem; }
.swatch small { margin-top: -6px; color: var(--ink-3); font-size: 11px; line-height: 1.35; }
.swatch[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); background: var(--brand-soft); }
.toolbar-demo { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.tb-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--paper-2); }
.tb-dots { display: inline-flex; gap: 6px; }
.tb-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.tb-url { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 12px/1.2 var(--f-mono); white-space: nowrap; overflow: hidden; }
.tb-url svg { color: var(--ink-3); }
.tb-ext { color: var(--ink-3); font-size: 18px; }
.tb-icon { position: relative; width: 22px; height: 22px; }
.tb-icon svg { width: 100%; height: 100%; stroke: none; }
.tb-icon .badge { top: -8px; right: -10px; border-color: var(--paper-2); }
.switch-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; font-size: .95rem; font-weight: 600; cursor: pointer; }
.switch-row small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: none; width: 40px; height: 24px; margin-top: 1px; border-radius: 999px; background: var(--line-2); transition: background-color .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .3s var(--spring); }
.switch-row input:checked + .switch { background: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Tour ---------- */
.tour { background: var(--surface); border-block: 1px solid var(--line); }
.tour-tabs { display: flex; gap: 6px; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tour-tabs button { flex: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.tour-tabs button:hover { color: var(--ink); border-color: var(--line-2); }
.tour-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tour-stage { position: relative; padding-right: clamp(0px, 15vw, 180px); padding-bottom: 40px; perspective: 1800px; }
.browser { margin: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper-2); box-shadow: var(--shadow-3); overflow: hidden; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.browser-bar { display: flex; align-items: center; gap: 16px; padding: 10px 14px 0; }
.browser-tab { display: inline-flex; align-items: center; gap: 8px; max-width: 70%; padding: 8px 16px 9px; border-radius: 10px 10px 0 0; background: var(--surface); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.browser-tab svg { width: 14px; height: 14px; stroke: none; }
.browser-screen { position: relative; aspect-ratio: 16 / 10; max-width: 100%; background: var(--surface); overflow: hidden; }
.browser-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: opacity .35s, transform .6s var(--ease); }
.browser-screen img.is-out { opacity: 0; transform: scale(1.015); }
.browser figcaption { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); }
.phone { position: absolute; right: 0; bottom: 0; width: clamp(170px, 17vw, 230px); margin: 0; }
.phone-screen { aspect-ratio: 9 / 18.5; max-width: 100%; border: 7px solid var(--bezel); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-3); overflow: hidden; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; animation: phone-scroll 16s ease-in-out infinite alternate; }
@keyframes phone-scroll { 0%, 15% { object-position: 50% 0%; } 85%, 100% { object-position: 50% 100%; } }
.phone figcaption { margin-top: 10px; color: var(--ink-3); font-size: 12px; text-align: center; }

/* ---------- Privacy ---------- */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.trust-item { padding: 30px 28px 10px 0; }
.trust-item + .trust-item { padding-left: 28px; border-left: 1px solid var(--line); }
.trust-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px 14px 14px 4px; background: var(--brand-soft); color: var(--brand-text); font-size: 22px; }
.trust-item h3 { margin: 20px 0 10px; font-size: var(--fs-h3); letter-spacing: -.02em; }
.trust-item p { margin: 0; color: var(--ink-2); line-height: 1.75; }
.fineprint { margin: 44px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-sm); }

/* ---------- Install ---------- */
.install { background: var(--paper-2); }
.install-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 90px); }
.install-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.install-steps .step-no { background: var(--brand); color: var(--on-brand); }
.install-steps h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.install-steps p { margin: 0; color: var(--ink-2); }
.copy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.copy-line code { padding: 8px 12px; border-radius: 9px; font-size: .95rem; user-select: all; }
.install-note { display: flex; gap: 10px; margin-top: 30px; color: var(--ink-2); font-size: var(--fs-sm); }
.install-note svg { margin-top: 3px; color: var(--warn); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); }
.faq-list { border-top: 1px solid var(--line-2); }
.faq-list details { border-bottom: 1px solid var(--line-2); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { font-size: 20px; color: var(--ink-3); transition: transform .3s var(--ease); }
.faq-list details[open] summary svg { transform: rotate(45deg); color: var(--brand); }
.faq-list summary:hover { color: var(--brand-text); }
.faq-list details p { margin: -6px 0 22px; max-width: 38em; color: var(--ink-2); line-height: 1.75; }

/* ---------- Footer ---------- */
.foot { padding-block: 80px 40px; border-top: 1px solid var(--line); overflow: hidden; }
.foot-word { display: flex; align-items: center; gap: .14em; font-family: var(--f-display); font-size: clamp(3.4rem, 15vw, 13rem); font-weight: 900; letter-spacing: -.06em; line-height: .9; text-decoration: none; }
.foot-word .brand-mark { transform: translateY(.02em); transition: transform .5s var(--spring); }
.foot-word:hover .brand-mark { transform: rotate(-10deg) scale(1.05); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; margin-top: 36px; color: var(--ink-2); font-size: var(--fs-sm); }
.foot-row p { margin: 0; }
.foot-legal { color: var(--ink-3); }

/* ---------- Toast & splash ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 10px 10px 10px 16px;
  border-radius: 12px; background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--shadow-3);
  font-size: .92rem; transform: translateX(-50%); animation: toast-in .35s var(--spring);
}
.toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { flex: none; padding: 5px 11px; border: 0; border-radius: 8px; background: color-mix(in oklab, var(--toast-ink) 14%, transparent); color: inherit; font-weight: 700; font-size: .88rem; }
.toast button:hover { background: color-mix(in oklab, var(--toast-ink) 24%, transparent); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
.splash-layer { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
.spark { position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-height: 800px) and (min-width: 761px) {
  .dc-card .brand-mark.lg { width: 44px; height: 44px; }
  .dc-card { padding: 20px 24px 16px; }
  .hero-b { top: calc(var(--nav-h) + 14px); }
  .hero-b-title { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem); }
  .hero-b-sub { margin-top: 4px; font-size: .95rem; }
  .clock { top: calc(var(--nav-h) + 16px); }
  .app-window { --app-top: calc(var(--nav-h) + 96px); height: calc(100% - var(--app-top) - 12px); }
  .app-main { padding: 14px 22px; }
  .app-head { margin-bottom: 10px; }
  .app-head h3 { font-size: 21px; }
  .app-summary { padding: 10px 14px; }
  .ring { width: 46px; height: 46px; }
  .group-h { margin: 11px 2px 6px; }
  .row { padding: 8px 14px; }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr) 250px; }
  .app-side { display: none; }
  .nav-links a:nth-child(n+5) { display: none; }
}
@media (max-width: 1023px) {
  .flow-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-stage { display: none; }
  .flow-step, .flow-step:first-child { min-height: 0; padding-block: 34px; color: var(--ink); }
  .flow-step p { color: var(--ink-2); }
  .flow-step .step-no { background: var(--brand); color: var(--on-brand); }
  .flow-step .facts svg { color: var(--brand); }
  .demo-slot .demo { position: relative; }
  .demo-slot .demo-plan .demo-frame { height: 560px; }
  .demo-slot .demo-focus .demo-frame { height: 520px; }
  .demo-slot .demo-insight .demo-frame { grid-template-rows: auto auto auto; }
  .demo-slot .di-courses { max-height: 240px; }
  .themes-grid, .install-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .hero { height: 250vh; height: 250svh; }
  .hero-a { --a-y: -40%; max-width: none; }
  .hero-title { font-size: clamp(2.2rem, 1.2rem + 6vw, 3.2rem); }
  .lede { margin-top: 18px; }
  .cta-row { margin-top: 24px; }
  .cta-row .btn-lg { min-height: 50px; padding: 0 20px; font-size: 1rem; }
  .scroll-hint { display: none; }
  .clock { top: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: auto; left: var(--gutter); }
  .app-window { --app-top: calc(var(--nav-h) + 112px); border-radius: 20px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-next { display: none; }
  .app-main { padding: 14px 14px; }
  .app-head h3 { font-size: 20px; }
  .app-new { display: none; }
  .app-summary { padding: 12px; gap: 10px 12px; }
  .ring { width: 46px; height: 46px; }
  .row { padding: 9px 11px; gap: 10px; }
  .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .when { font-size: 11px; }
  .cc { width: 168px; }
  .cc-in { font-size: 12px; padding: 9px 10px; }
  .cc-title { font-size: 12.5px; }
  .di-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .trust-item, .trust-item + .trust-item { padding: 26px 0; border-left: 0; }
  .trust-item + .trust-item { border-top: 1px solid var(--line); }
  .tour-stage { padding-right: 0; padding-bottom: 0; display: grid; gap: 28px; justify-items: center; }
  .phone { position: relative; width: min(220px, 70%); }
  .install-steps li { padding: 18px; gap: 14px; }
  .nav-actions .btn { display: none; }
  .demo-frame { padding: 14px; }
  .dc-card { padding: 24px 18px 18px; }
  .replay { position: static; margin-top: 12px; }
  .demo-connect .demo-frame { display: grid; justify-items: center; }
}
@media (max-width: 420px) {
  .swatch small { display: none; }
  .tick-name { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero { height: auto; }
  .hero-stage { position: relative; height: auto; overflow: visible; padding: calc(var(--nav-h) + 30px) 0 40px; }
  .chaos, .scroll-hint, .clock { display: none; }
  .hero-copy { position: relative; left: auto; right: auto; top: auto; transform: none; padding-inline: var(--gutter); }
  .hero-a { max-width: 900px; }
  .hero-b { display: none; }
  .app-window { position: relative; top: auto; height: 640px; margin-top: 50px; opacity: 1; }
  .phone-screen img { animation: none; }
}
