/* ReStart90 design system v3: signage for a life
   Kai Lin is a wayfinding designer, so the product speaks the language of city signage:
   sign navy on cool paper, one marker yellow for "I did it myself", Overpass (from the
   US highway-sign lineage) with Noto Sans SC for Chinese. One signature element, the Handover
   Line: the patient's line runs to day 90 while the family line steps away stop by stop.
   Surfaces are flat sign plates, not floating cards. Motion only shows what changed. */

:root {
  /* wayfinding: sign navy on cool paper; one yellow marker colour for "I did it myself" */
  --ink: oklch(28% 0.075 258);
  --ink-2: oklch(38% 0.06 258);
  --muted: oklch(50% 0.03 255);
  --bg: oklch(97.2% 0.004 250);
  --paper: oklch(99.6% 0.002 250);
  --line: oklch(89.5% 0.01 250);
  --line-2: oklch(82% 0.016 250);
  --wash: oklch(94% 0.01 250);

  --lv1: oklch(80% 0.008 250);
  --lv2: oklch(80% 0.065 232);
  --lv3: oklch(54% 0.13 256);
  --lv4: oklch(85% 0.165 92);
  --lv1-bg: oklch(94% 0.005 250);
  --lv2-bg: oklch(94.5% 0.03 232);
  --lv3-bg: oklch(91.5% 0.045 256);
  --lv4-bg: oklch(96.5% 0.07 95);
  --lv4-ink: oklch(44% 0.1 80);

  --red: oklch(52% 0.18 27);
  --red-bg: oklch(95.5% 0.025 27);
  --amber: oklch(52% 0.11 68);
  --amber-bg: oklch(96% 0.04 85);

  --display: "Overpass Variable", "Noto Sans SC Variable", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: "Overpass Variable", "Noto Sans SC Variable", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Classic typographic scale (Bringhurst): 14 · 17 · 21 · 24 · 36 · 48/60 · 72/96, fluid between phone and desktop */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --t-xl: clamp(1.3125rem, 1.2rem + 0.5vw, 1.5rem);
  --t-2xl: clamp(1.75rem, 1.35rem + 1.5vw, 2.25rem);
  --t-3xl: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --t-hero: clamp(3rem, 1.4rem + 6.4vw, 6rem);

  /* radius follows hierarchy: chips are pills, plates are signs, small controls are tight */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 0 0 1px var(--line);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--t-base)/1.7 var(--sans);
  padding-bottom: 96px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 750; line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
p, li { text-wrap: pretty; }
p { margin: 0 0 0.8em; }
a { color: var(--lv3); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lv4); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- view transitions (route changes only) ---------- */
.top { view-transition-name: top; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; animation-timing-function: var(--ease); }

/* ---------- header ---------- */
.top { background: var(--ink); color: oklch(95% 0.01 250); position: sticky; top: 0; z-index: 15; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: baseline; gap: 10px; margin-right: auto; white-space: nowrap; }
.brand b { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.02em; }
.brand span { font-size: 0.82rem; opacity: 0.7; }
.roles { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.roles a { color: oklch(84% 0.03 250); text-decoration: none; padding: 6px 13px; border-radius: 999px; font-size: 0.92rem; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.roles a:hover { color: #fff; background: oklch(38% 0.045 258); }
.roles a[aria-current="page"] { background: oklch(95% 0.01 250); color: var(--ink); }
.tools { display: flex; gap: 6px; }
.pill-btn { background: none; border: 1px solid oklch(50% 0.04 258); color: inherit; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.82rem; white-space: nowrap; }
.pill-btn:hover { background: oklch(38% 0.045 258); }
.pill-btn[aria-pressed="true"] { background: oklch(80% 0.1 290); border-color: oklch(80% 0.1 290); color: oklch(25% 0.08 290); }

/* ---------- buttons & choices ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 10px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; font-size: 0.95rem; line-height: 1.3;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { background: var(--ink-2); }
.btn:active { transform: scale(0.98); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--wash); border-color: var(--ink-2); }
.btn.sun { background: var(--lv4); border-color: var(--lv4); color: oklch(24% 0.05 70); }
.btn.sun:hover { background: oklch(73% 0.15 72); }
.btn.light { background: oklch(95% 0.01 250); color: var(--ink); border-color: transparent; }
.btn.light:hover { background: #fff; }
.btn.outline-light { background: transparent; color: #fff; border-color: oklch(58% 0.04 258); }
.btn.outline-light:hover { background: oklch(38% 0.045 258); }
.btn.sm { padding: 6px 13px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button {
  border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; padding: 7px 15px; cursor: pointer; font-size: 0.9rem;
  transition: background 0.18s var(--ease), border-color 0.18s, color 0.18s;
}
.choice button:hover { border-color: var(--ink-2); }
.choice button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice.status button.st-done[aria-pressed="true"] { background: var(--lv3); border-color: var(--lv3); }
.choice.status button.st-partial[aria-pressed="true"] { background: var(--lv2); border-color: var(--lv2); color: var(--ink); }
.choice.status button.st-cant[aria-pressed="true"] { background: var(--lv1); border-color: var(--lv1); color: var(--ink); }
.choice.quiet button { padding: 4px 12px; font-size: 0.84rem; background: transparent; }
.choice.quiet button[aria-pressed="true"] { background: var(--lv4-bg); border-color: var(--lv4); color: var(--lv4-ink); }

/* ---------- signature: handover track ---------- */
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.track .seg { height: 10px; background: var(--wash); border-radius: 3px; position: relative; transition: background 0.5s var(--ease); }
.track .seg.on.s1 { background: var(--lv1); }
.track .seg.on.s2 { background: var(--lv2); }
.track .seg.on.s3 { background: var(--lv3); }
.track .seg.on.s4 { background: var(--lv4); }
.track .seg.cur::after { content: ""; position: absolute; right: -2px; top: -4px; width: 4px; height: 18px; background: var(--ink); border-radius: 2px; }
.track-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 8px; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.track-labels span.cur { color: var(--ink); font-weight: 600; }
.track.lg .seg { height: 24px; border-radius: 5px; }
.track.lg .seg.cur::after { top: -7px; height: 38px; width: 5px; }
.track.lg + .track-labels { font-size: 0.9rem; }

/* the family dot stepping away from the patient */
.gap-glyph { display: block; overflow: visible; max-width: 100%; }
.gap-glyph .me { fill: var(--ink); }
.gap-glyph .fam { fill: var(--paper); stroke: var(--ink-2); stroke-width: 2; transition: transform 0.9s var(--ease), opacity 0.9s; }
.gap-glyph .fam.far { stroke-dasharray: 3 3; opacity: 0.6; }
.gap-glyph .tie { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 2 4; }
.gap-glyph text { font-size: 11px; fill: var(--muted); font-family: var(--sans); transition: transform 0.9s var(--ease); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; background: var(--wash); color: var(--ink); white-space: nowrap; line-height: 1.6; }
.chip.lv1 { background: var(--lv1-bg); }
.chip.lv2 { background: var(--lv2-bg); }
.chip.lv3 { background: var(--lv3-bg); color: oklch(36% 0.1 256); }
.chip.lv4 { background: var(--lv4-bg); color: var(--lv4-ink); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.chip.goal { background: transparent; box-shadow: inset 0 0 0 1px var(--lv4); color: var(--lv4-ink); }
.chip.plan { background: var(--lv4-bg); color: var(--lv4-ink); }

/* ---------- design rationale overlay ---------- */
.why { display: none; }
body.why-on .why {
  display: block; margin: 10px 0; padding: 10px 14px; border-radius: var(--r-sm);
  background: oklch(97% 0.025 290); border: 1px dashed oklch(62% 0.12 290); color: oklch(33% 0.08 290);
  font-size: 0.82rem; line-height: 1.55; font-family: var(--sans); font-weight: 400; text-align: left;
}
body.why-on .why b { display: block; font-size: 0.85rem; margin-bottom: 2px; }
body.why-on .why cite { font-style: normal; opacity: 0.75; }

/* ---------- landing ---------- */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: var(--t-hero); line-height: 1.04; letter-spacing: 0.015em; }
.hero .lead { font-size: var(--t-xl); font-family: var(--display); margin: 28px 0 12px; max-width: 22em; color: var(--ink-2); line-height: 1.45; }
.hero .scope { color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hand-demo { background: var(--paper); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.hand-demo .who-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.hand-demo .life { font-family: var(--display); font-size: var(--t-xl); margin: 2px 0 22px; }
.hand-demo dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 22px 0 0; font-size: 0.95rem; }
.hand-demo dt { color: var(--muted); }
.hand-demo dd { margin: 0; font-weight: 600; min-height: 1.6em; }
.hand-demo .day { font-size: 0.85rem; color: var(--muted); }
.hand-demo .glyph-wrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.band { padding: clamp(56px, 8vw, 112px) 0; }
.band + .band { border-top: 1px solid var(--line); }
.band h2 { max-width: 20em; }
.band .intro { color: var(--muted); max-width: 40em; margin: 14px 0 clamp(28px, 4vw, 48px); font-size: var(--t-lg); }
.contrast { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.contrast > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contrast > div:nth-child(odd) { padding-right: 28px; color: var(--muted); }
.contrast > div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.contrast .h { font-size: 0.85rem; padding-top: 12px; padding-bottom: 12px; }
.contrast .h:nth-child(2) { color: var(--ink); font-weight: 600; }

.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-radius: var(--r); overflow: hidden; }
.steps4 > div { padding: 22px 20px 24px; }
.steps4 > div:nth-child(1) { background: var(--lv1-bg); }
.steps4 > div:nth-child(2) { background: var(--lv2-bg); }
.steps4 > div:nth-child(3) { background: var(--lv3-bg); }
.steps4 > div:nth-child(4) { background: var(--lv4-bg); }
.steps4 .n { font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.steps4 .p { font-weight: 600; font-size: 1.05rem; margin: 16px 0 4px; }
.steps4 .gap-glyph { margin-top: 18px; }

.science { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(28px, 5vw, 64px); }
.science article { padding: 24px 0 26px; border-top: 1px solid var(--line-2); }
.science h3 { font-size: var(--t-xl); margin-bottom: 8px; }
.science .plain { font-size: var(--t-lg); color: var(--ink-2); margin-bottom: 10px; font-family: var(--display); line-height: 1.5; }
.science .apply b { color: var(--lv3); font-weight: 600; }
.science cite { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.science-note { color: var(--muted); font-size: var(--t-sm); margin-top: 28px; max-width: 46em; }

.roles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.roles3 > div { border-top: 3px solid var(--ink); padding-top: 18px; }
.roles3 > div:nth-child(2) { border-color: var(--lv3); }
.roles3 > div:nth-child(3) { border-color: var(--lv4); }
.roles3 .q { font-family: var(--display); font-size: var(--t-lg); color: var(--ink-2); margin: 8px 0 12px; }
.roles3 ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
.roles3 li { margin-bottom: 4px; }

.nots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.nots div { padding: 18px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-2); }
.nots b { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 4px; color: var(--ink); }

.cta { background: var(--ink); color: oklch(95% 0.01 250); padding: clamp(64px, 9vw, 120px) 0; }
.cta h2 { font-size: var(--t-3xl); color: #fff; }
.cta p { color: oklch(84% 0.03 250); font-size: var(--t-lg); max-width: 34em; margin-top: 16px; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.foot { padding: 28px 0 40px; font-size: var(--t-sm); color: var(--muted); }

/* ---------- app pages ---------- */
.page { padding: clamp(24px, 4vw, 44px) 0 24px; }
.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 28px; }
.head .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; color: var(--muted); font-size: 0.9rem; }
.head h1 { font-size: var(--t-3xl); line-height: 1.08; }
.head .sub { color: var(--ink-2); font-size: var(--t-lg); margin: 12px 0 0; max-width: 34em; font-family: var(--display); }
.head-stats { display: flex; gap: 28px; align-items: center; }
.stat b { display: block; font-family: var(--display); font-size: 2.1rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.82rem; color: var(--muted); }
.stat.red b { color: var(--red); }
.stat.amber b { color: var(--amber); }
.ring { display: flex; gap: 12px; align-items: center; }
.ring svg circle { transition: stroke-dashoffset 0.8s var(--ease); }
.ring .stat b { font-size: 1.6rem; }
.meter { min-width: 220px; }
.meter .label { font-size: 0.82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.meter .bar { height: 8px; background: var(--wash); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lv2), var(--lv3) 55%, var(--lv4)); border-radius: 999px; transition: width 0.8s var(--ease); }

.cols { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.panel { background: var(--paper); border-radius: var(--r); padding: clamp(18px, 2.2vw, 26px); margin-bottom: 20px; box-shadow: var(--shadow); }
.panel > h3 { margin-bottom: 14px; }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.sec:first-child { margin-top: 0; }
.sec h2 { font-size: var(--t-xl); }

.banner { border-radius: var(--r); padding: 18px 22px; margin-bottom: 18px; }
.banner.red { background: var(--red-bg); box-shadow: inset 4px 0 0 var(--red); }
.banner.emergency { background: var(--red); color: #fff; }
.banner.amber { background: var(--amber-bg); box-shadow: inset 4px 0 0 var(--amber); }
.banner.sun { background: var(--lv4-bg); box-shadow: inset 4px 0 0 var(--lv4); }
.banner.calm { background: var(--wash); box-shadow: inset 4px 0 0 var(--lv3); }
.banner h3 { margin-bottom: 6px; }
.banner .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.summary { white-space: pre-wrap; background: oklch(100% 0 0 / 0.75); border-radius: var(--r-sm); padding: 14px 16px; font-size: 0.86rem; line-height: 1.75; margin: 12px 0 0; font-family: var(--sans); color: var(--ink); }
details summary { cursor: pointer; font-weight: 600; margin-top: 8px; }

/* check-in */
.checkin { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 18px 28px; align-items: start; }
.checkin .lbl { font-size: 0.82rem; color: var(--muted); display: block; margin-bottom: 6px; }
.painrow { display: flex; align-items: center; gap: 12px; }
.painrow input { flex: 1; }
.painval { font-family: var(--display); font-size: 1.7rem; min-width: 1.4em; text-align: right; font-variant-numeric: tabular-nums; }
.checkin-done { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.more { margin-top: 14px; }
.more[open] { padding-top: 4px; }

/* tasks */
.task { padding: clamp(18px, 2.4vw, 26px); border-radius: var(--r); background: var(--paper); margin-bottom: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.task.body::before { background: var(--lv3); }
.task.life::before { background: var(--lv4); }
.task.social::before { background: var(--lv2); }
.task.safe { background: var(--red-bg); }
.task.safe::before { background: var(--red); }
.task.is-done { background: oklch(98.6% 0.03 95); }
.task .kind { font-size: 0.8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task h3 { margin: 8px 0 8px; font-size: var(--t-xl); }
.task .do { font-size: 1.05rem; margin-bottom: 14px; color: var(--ink-2); }
.task .when { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.task .when .lbl { font-size: 0.82rem; color: var(--muted); }
.task .grad { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 0.88rem; color: var(--ink-2); flex-wrap: wrap; }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--wash); box-shadow: inset 0 0 0 1px var(--line-2); }
.pips i.on { background: var(--lv4); box-shadow: none; }
.task .src { font-size: 0.76rem; color: var(--muted); margin-top: 12px; }
.task .after { margin-top: 14px; padding: 12px 14px; background: var(--wash); border-radius: var(--r-sm); font-size: 0.93rem; }
.task .after.good { background: var(--lv4-bg); }
.task .fam { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
.peer { font-family: var(--serif); font-size: 1rem; margin: 10px 0 0; padding-left: 14px; border-left: 2px solid var(--lv2); }
.peer cite { display: block; font-style: normal; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.peak { padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: linear-gradient(135deg, var(--lv4-bg), oklch(96% 0.02 240)); margin-bottom: 18px; }
.peak h2 { font-size: var(--t-2xl); margin-bottom: 10px; }
.peak ul { margin: 8px 0 0; padding-left: 1.1em; }

.rows { border-top: 1px solid var(--line); }
.rowi { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.rowi .t { font-weight: 600; }
.rowi .d { color: var(--ink-2); font-size: 0.92rem; grid-column: 1; }
.rowi .choice { grid-column: 2; grid-row: 1 / span 2; }

.abil { padding: 14px 0; border-bottom: 1px solid var(--line); }
.abil:last-child { border-bottom: 0; }
.abil .nm { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; font-size: 0.95rem; }
.abil .nm b { font-weight: 600; }
.abil.inactive { opacity: 0.45; }
.mile { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; align-items: center; }
.mile:last-child { border-bottom: 0; }
.mile .s { grid-column: 1 / -1; color: var(--muted); font-size: 0.82rem; }

/* family */
.letgo { margin: 0; padding-left: 1.1em; }
.letgo li { margin-bottom: 10px; }
.own { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.own:last-child { border-bottom: 0; }
.own .who { font-size: 0.76rem; color: var(--muted); }
.care { background: oklch(95% 0.025 240); border-radius: var(--r); padding: 20px 22px; margin-bottom: 20px; }
.care h3 { margin-bottom: 6px; }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 0.86rem; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=number], textarea, select { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: oklch(99% 0.003 150); transition: border-color 0.2s, box-shadow 0.2s; }
input[type=text]:focus, input[type=number]:focus, textarea:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px oklch(78% 0.145 74 / 0.35); }
textarea { min-height: 84px; resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--ink); }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; cursor: pointer; }
.checks input { margin-top: 5px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* wizard */
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 28px; padding: 0; }
.stepper li { list-style: none; padding: 10px 0 0; border-top: 4px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.stepper li.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.stepper li.done { border-color: var(--lv3); color: var(--ink-2); }
.doc { white-space: pre-wrap; font-size: 0.9rem; line-height: 1.9; background: var(--paper); border-radius: var(--r); padding: 22px; max-height: 640px; overflow: auto; box-shadow: var(--shadow); }
.doc mark { background: var(--lv4-bg); color: inherit; box-shadow: inset 0 -2px 0 var(--lv4); padding: 0 1px; border-radius: 2px; transition: background 0.3s; }
.doc mark.active { background: var(--lv4); }
.field { border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; background: var(--paper); box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.field.ok { box-shadow: inset 0 0 0 2px var(--lv3), var(--shadow); }
.field .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.field .quote { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }

/* rehab */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
table.list tr:last-child td { border-bottom: 0; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 15px; height: 15px; border-radius: 4px; background: var(--wash); display: inline-block; position: relative; }
.dots i.done { background: var(--lv3); }
.dots i.partial { background: var(--lv2); }
.dots i.cant { background: var(--lv1); }
.dots i.over::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--red); border-radius: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.ab-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.feed .it { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.feed .it:last-child { border-bottom: 0; }
.feed .it .who { font-size: 0.76rem; color: var(--muted); }
.spark { display: block; max-width: 100%; }
.allclear { display: flex; gap: 10px; align-items: center; color: var(--ink-2); padding: 16px 0; }

/* map */
.map { overflow-x: auto; padding-bottom: 6px; }
.map svg { display: block; min-width: 920px; }
.map text { font-family: var(--sans); fill: var(--muted); font-size: 11px; }
.map .ph { font-size: 12px; fill: var(--ink-2); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button { border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 0.86rem; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.review-grid > div { border-top: 3px solid var(--line-2); padding-top: 14px; }
.review-grid > div:first-child { border-color: var(--lv4); }
.review-grid > div:nth-child(2) { border-color: var(--lv3); }
.review-grid h3 { font-size: 1.05rem; margin-bottom: 8px; }
.review-grid ul { margin: 0; padding-left: 1.1em; }
.review-grid li { margin-bottom: 6px; font-size: 0.94rem; }
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* demo bar */
.demobar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  background: oklch(27% 0.04 258 / 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: oklch(95% 0.01 250); border-radius: 999px; padding: 7px 8px 7px 18px;
  display: flex; gap: 6px; align-items: center; box-shadow: 0 10px 30px -8px oklch(31% 0.045 258 / 0.5); font-size: 0.86rem;
  max-width: calc(100vw - 20px); overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.demobar b { font-weight: 600; margin-right: 6px; }
.demobar button { background: oklch(38% 0.045 258); color: inherit; border: 0; border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 0.84rem; }
.demobar button:hover { background: oklch(45% 0.05 258); }
.demobar button.warn { background: oklch(42% 0.1 27); }
.demobar button.warn:hover { background: oklch(48% 0.12 27); }

.toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 999px; z-index: 30; font-size: 0.92rem; box-shadow: 0 10px 30px -8px oklch(31% 0.045 258 / 0.5); animation: toast-in 0.3s var(--ease); }
.toast.err { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.sos { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.empty { color: var(--muted); padding: 8px 0; }
.loading { padding: 120px 0; text-align: center; color: var(--muted); font-family: var(--display); font-size: 1.4rem; }

@media (max-width: 1000px) {
  .nots { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr 1fr; }
  .checkin { grid-template-columns: 1fr 1fr; }
  .checkin > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero .wrap, .cols, .cols.even, .science, .roles3, .voices { grid-template-columns: minmax(0, 1fr); }
  .steps4 { grid-template-columns: 1fr 1fr; }
  .contrast > div:nth-child(odd) { padding-right: 14px; }
  .contrast > div:nth-child(even) { padding-left: 14px; }
  .grid2, .checkin { grid-template-columns: 1fr; }
  .head { grid-template-columns: 1fr; }
  .head-stats { flex-wrap: wrap; }
  .rowi { grid-template-columns: 1fr; }
  .rowi .choice { grid-column: 1; grid-row: auto; }
  .top .wrap { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  .roles { order: 3; width: 100%; }
  .meter { min-width: 0; width: 100%; }
  .top { position: static; }
}
@media (max-width: 520px) {
  .nots, .review-grid, .steps4 { grid-template-columns: 1fr; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- V0.2 additions: map paper, pin, route strip, agent, upgrade steps ---------- */

.brand .pin { align-self: center; }
.pin path { fill: var(--lv4); stroke: var(--ink); stroke-width: 1.4; }
.pin circle { fill: var(--ink); }
.top .pin path { stroke: oklch(28% 0.075 258); }

.taskcard { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.taskcard .tc-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.taskcard .tc-head b { font-size: 1.05rem; }
.taskcard .tc-life { padding: 18px 24px 4px; font-size: var(--t-xl); font-weight: 700; }
.taskcard .tc-track { padding: 10px 24px 18px; }
.taskcard .tc-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); align-items: start; }
.taskcard .tc-row .k { font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.taskcard .tc-row .v { font-size: 0.98rem; }
.taskcard .tc-row.ok .v b { color: var(--lv3); }
.taskcard .tc-row.wait .v b { color: var(--lv4-ink); }
.why-link { display: inline-block; margin-top: 22px; color: var(--ink-2); font-size: 0.95rem; }

.route { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; margin-top: 10px; position: relative; }
.route i { height: 10px; border-radius: 2px; background: var(--wash); }
.route i.l1 { background: var(--lv1); }
.route i.l2 { background: var(--lv2); }
.route i.l3 { background: var(--lv3); }
.route i.l4 { background: var(--lv4); }
.route i.red { background: var(--red); }
.route i.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.route-wrap { min-width: 260px; flex: 1; }
.route-wrap .label { font-size: 0.82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.goalline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 0.95rem; color: var(--ink-2); }

.steps3 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.steps3 span { font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.steps3 span.ok { background: var(--lv3-bg); box-shadow: none; color: oklch(36% 0.1 256); }
.steps3 span.no { background: var(--red-bg); box-shadow: none; color: var(--red); }

.agent { border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); padding: clamp(18px, 2.2vw, 24px); margin-bottom: 20px; }
.agent .ah { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.agent .ah b { font-size: 1.05rem; }
.agent .doors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agent .doors button { text-align: left; border: 1px solid var(--line-2); background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; font-size: 0.92rem; }
.agent .doors button:hover, .agent .doors button[aria-pressed="true"] { border-color: var(--ink); background: var(--paper); }
.agent .bubble { margin-top: 14px; padding: 14px 16px; border-radius: 4px var(--r) var(--r) var(--r); background: var(--lv4-bg); font-size: 0.95rem; }
.agent .bubble.danger { background: var(--red-bg); box-shadow: inset 3px 0 0 var(--red); }
.agent .bubble .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.agent .fine { font-size: 0.76rem; color: var(--muted); margin-top: 10px; }

.desk-list .it { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.desk-list .it:last-child { border-bottom: 0; }
.desk-list .it .s { font-size: 0.8rem; color: var(--muted); }
.peer { font-family: var(--serif); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .agent .doors { grid-template-columns: 1fr; }
  .taskcard .tc-row { grid-template-columns: 1fr; gap: 2px; }
}

/* Rehab tables on phones: the patient list scrolls sideways, ability rows stack. */
@media (max-width: 860px) {
  .panel:has(> table.list) { overflow-x: auto; }
  table.list.abl, table.list.abl tbody, table.list.abl tr, table.list.abl td { display: block; width: auto !important; }
  table.list.abl tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.list.abl tr:last-child { border-bottom: 0; }
  table.list.abl td { border-bottom: 0; padding: 6px 4px; }
}
@media (max-width: 520px) {
  .demobar { flex-wrap: wrap; justify-content: center; border-radius: 18px; row-gap: 6px; width: calc(100vw - 20px); }
}


/* ==========================================================================
   v3: signage for a life
   ========================================================================== */
body { font-feature-settings: "kern"; line-height: 1.72; }
:lang(en) body, html[lang="en"] body { line-height: 1.6; }
.num, .stat b, .painval, .shield { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 3px solid var(--lv4); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); border-radius: 6px; }

/* header: a sign band with pictograms */
.top { border-bottom: 4px solid var(--lv4); }
.brand b { font-weight: 800; letter-spacing: 0; font-size: 1.32rem; }
.roles a { display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; padding: 7px 12px; }
.roles a[aria-current="page"] { background: var(--lv4); color: var(--ink); font-weight: 650; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pill-btn { border-radius: 8px; }

/* buttons: sign-plate corners, not pills */
.btn { border-radius: 8px; font-weight: 650; padding: 12px 22px; letter-spacing: 0.005em; }
.btn.sm { border-radius: 6px; padding: 7px 13px; font-weight: 600; }
.btn.sun:hover { background: oklch(80% 0.16 88); }

/* surfaces: flat sign plates */
.panel, .task, .agent, .field, .doc { box-shadow: none; border: 1px solid var(--line); }
.task { padding-left: clamp(22px, 2.6vw, 30px); }
.task::before { width: 6px; }
.task h3 { font-weight: 750; }
.banner { border-radius: var(--r); }

/* ---------- landing ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero .wrap { display: block; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero h1 { font-size: var(--t-hero); font-weight: 850; line-height: 1.02; letter-spacing: -0.02em; }
:lang(zh-CN) .hero h1 { letter-spacing: 0.01em; line-height: 1.06; }
.hero .lead { font-size: var(--t-lg); margin: 0 0 4px; max-width: 26em; color: var(--ink-2); line-height: 1.6; font-weight: 450; }
.hero .actions { margin-top: 24px; }
.why-link { margin-top: 18px; font-size: 0.92rem; }

/* the Handover Line plate */
.hl-plate { margin-top: clamp(40px, 6vw, 72px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 40px) clamp(18px, 2.6vw, 32px); }
.hl-plate.quiet { margin-top: 0; }
.hl-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(18px, 3vw, 30px); }
.hl-head h2 { font-size: var(--t-2xl); margin-top: 4px; }
.hl-row { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.hl-here { min-height: 30px; }
.here { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 700; color: var(--ink); background: var(--lv4); padding: 3px 10px 3px 7px; border-radius: 6px; }
.here .pin path { stroke-width: 1.6; }
.hl-p { margin-top: 10px; }
.hl-lb { justify-self: center; font-size: clamp(0.78rem, 0.7rem + 0.35vw, 1rem); font-weight: 600; color: var(--muted); padding: 6px 8px; border-radius: 6px; line-height: 1.3; }
.hl-lb.cur { color: var(--ink); }
button.hl-lb { background: none; border: 0; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s; }
button.hl-lb:hover { background: var(--wash); color: var(--ink); }
button.hl-lb.sel { background: var(--ink); color: #fff; }
.hl-f .hl-lb { font-weight: 500; font-size: clamp(0.72rem, 0.66rem + 0.3vw, 0.9rem); }
.hl-f .hl-lb.sel { color: var(--ink); font-weight: 700; }
.hl-svg .tie.sel { stroke: var(--lv3); stroke-width: 4; stroke-dasharray: none; }
.hl-svg { display: block; width: 100%; height: auto; margin: 6px 0 2px; overflow: visible; }
.hl-svg .p-line { fill: none; stroke: var(--lv4); stroke-linecap: round; }
.hl-svg .p-arrow { fill: var(--lv4); }
.hl-svg .f-line { fill: none; stroke: var(--ink); stroke-linejoin: round; stroke-linecap: round; }
.hl-svg .f-end { stroke: var(--ink); stroke-linecap: round; }
.hl-svg .tie { stroke: var(--ink-2); stroke-width: 2.5; stroke-dasharray: 4 6; }
.hl-svg .tie.near { stroke-dasharray: none; stroke-width: 4; }
.hl-svg .st { fill: var(--paper); stroke: var(--ink); transform-box: fill-box; transform-origin: center; transition: transform 0.35s var(--ease), stroke 0.2s; }
.hl-svg .st.passed { fill: var(--ink); }
.hl-svg .st.cur { fill: var(--lv4); }
.hl-svg .st.sel:not(.cur) { stroke: var(--lv3); transform: scale(1.18); }
.hl-cap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: clamp(18px, 3vw, 30px) 0 0; border-top: 2px solid var(--ink); }
.hl-cap > div { padding: 14px 18px 4px 0; }
.hl-cap > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.hl-cap dt { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.hl-cap dd { margin: 0; font-size: 1rem; font-weight: 500; text-wrap: pretty; }

/* one orchestrated entrance: the lines draw, the stops arrive, the pin lands */
@keyframes hl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hl-pop { from { transform: scale(0); } }
@keyframes hl-drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes hl-fade { from { opacity: 0; } }
.hl.intro .p-line { stroke-dasharray: 1; animation: hl-draw 1.1s var(--ease) 0.1s both; }
.hl.intro .f-line { stroke-dasharray: 1; animation: hl-draw 1.2s var(--ease) 0.45s both; }
.hl.intro .p-arrow, .hl.intro .f-end, .hl.intro .tie { animation: hl-fade 0.4s var(--ease) 1.2s both; }
.hl.intro .st { animation: hl-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: calc(0.35s + var(--i) * 0.2s); }
.hl.intro .here { animation: hl-drop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) 1.45s both; }

/* ---------- small track = the same line, miniature ---------- */
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; height: 18px; align-items: center; }
.track::before, .track::after { content: ""; position: absolute; left: 12.5%; height: 4px; top: 7px; border-radius: 2px; }
.track::before { right: 12.5%; background: var(--line-2); }
.track::after { width: 0; background: var(--ink); transition: width 0.6s var(--ease); }
.track.at2::after { width: 25%; }
.track.at3::after { width: 50%; }
.track.at4::after { width: 75%; background: linear-gradient(90deg, var(--ink), var(--lv4)); }
.track .seg { justify-self: center; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--line-2); position: relative; z-index: 1; transition: background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease); }
.track .seg.on { box-shadow: inset 0 0 0 3px var(--ink); background: var(--ink); }
.track .seg.cur { background: var(--lv4); box-shadow: inset 0 0 0 3.5px var(--ink); transform: scale(1.25); }
.track .seg.cur::after { content: none; }
.track .seg.on.s1, .track .seg.on.s2, .track .seg.on.s3 { background: var(--ink); }
.track .seg.cur.s1, .track .seg.cur.s2, .track .seg.cur.s3, .track .seg.cur.s4 { background: var(--lv4); }
.track-labels { text-align: center; }
.track.lg { height: 26px; }
.track.lg .seg { width: 20px; height: 20px; }
.track.lg::before, .track.lg::after { top: 10px; height: 6px; }

/* ---------- patient head: day as a route marker ---------- */
.dayh { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); }
.dayh small { display: block; font-size: 0.32em; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.shield { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 0.18em; border-radius: 0.2em; background: var(--lv4); color: var(--ink); font-weight: 850; letter-spacing: -0.03em; box-shadow: inset 0 0 0 0.06em var(--ink); line-height: 1; padding-top: 0.08em; }
.route { gap: 1.5px; }
.route i { height: 12px; border-radius: 1.5px; }
.route i.today { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); position: relative; z-index: 1; }
.route-ph { display: grid; grid-template-columns: repeat(90, 1fr); margin-top: 8px; font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.route-ph span { border-left: 2px solid var(--line-2); padding: 2px 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-ph span.on { border-color: var(--ink); color: var(--ink); font-weight: 650; }
.head-stats { gap: clamp(20px, 3vw, 40px); }
.route-wrap { min-width: min(420px, 100%); }

@media (max-width: 860px) {
  .hero-top { grid-template-columns: minmax(0, 1fr); }
  .hl-cap { grid-template-columns: minmax(0, 1fr); }
  .hl-cap > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .hl-f { display: none; }
  .roles a .ico { width: 16px; height: 16px; }
  .route-ph span { font-size: 0.66rem; padding-left: 4px; }
}
@media (max-width: 520px) {
  .hl-head h2 { font-size: var(--t-xl); }
  .hl-lb { padding: 4px 2px; }
  .here { font-size: 0.72rem; padding: 2px 6px 2px 5px; }
  .route-ph span:not(.on) { color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .hl.intro .p-line, .hl.intro .f-line { stroke-dasharray: none; }
}
.head h1.dayh { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
.dayh > span:last-child { white-space: nowrap; }
.head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.head-stats { justify-content: flex-end; }
.choice button { border-radius: 8px; }
.tabs button { border-radius: 8px; }
.demobar { border-radius: 14px; }
.demobar button { border-radius: 8px; }
.hl-svg.narrow { display: none; }
.hl-svg.narrow .tie { stroke-width: 1.5; stroke-dasharray: 2 3; }
.hl-svg.narrow .tie.near { stroke-width: 2.5; }
.hl-svg.narrow .tie.sel { stroke-width: 2.5; }
@media (max-width: 600px) {
  .hl-svg.wide { display: none; }
  .hl-svg.narrow { display: block; }
}
@media (max-width: 860px) {
  .head { grid-template-columns: minmax(0, 1fr); }
  .head-stats { justify-content: flex-start; }
}
.goalline { flex-wrap: nowrap; align-items: flex-start; }
.goalline .pin { flex: none; margin-top: 3px; }
@media (max-width: 520px) {
  .route-ph span.on { overflow: visible; position: relative; z-index: 1; }
}
/* English is wider: keep the headline on two lines and the sign band on one row */
:lang(en) .hero-top { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
:lang(en) .hero h1 { font-size: clamp(2.75rem, 1rem + 4.6vw, 5.25rem); }
.roles a { padding: 7px 10px; }
:lang(en) .brand span { display: none; }
@media (max-width: 1100px) { .brand span { display: none; } }
.daystat { display: flex; align-items: center; gap: 12px; }
.daystat .shield { font-size: 2.2rem; }
.daystat b { font-size: 1.35rem; }

/* ==========================================================================
   v4 landing: an immersive scroll story (dark sign → light → dark → light)
   ========================================================================== */
:root { --head-h: 64px; }

/* hero: the whole first screen is a sign */
.xhero { background: var(--ink); color: oklch(97% 0.01 250); min-height: calc(100svh - var(--head-h)); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 52px) 0 clamp(20px, 3vw, 32px); position: relative; overflow: hidden; isolation: isolate; }
.xhero::before { content: ""; position: absolute; width: 60vw; height: 60vw; right: -18vw; top: -30vw; border-radius: 50%; background: radial-gradient(circle, oklch(60% 0.1 258 / 0.22), transparent 66%); filter: blur(12px); z-index: -1; pointer-events: none; }
.xhero-in { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr); gap: clamp(28px, 5vw, 76px); align-items: center; }
.xhero-copy { min-width: 0; }
.xhero-scope { color: var(--lv4); font-weight: 650; font-size: var(--t-base); margin: 0 0 clamp(16px, 3vw, 28px); }
.xhero h1 { color: #fff; font-size: clamp(3.7rem, 1.5rem + 5.4vw, 7.6rem); font-weight: 850; line-height: 0.98; letter-spacing: -0.01em; }
:lang(en) .xhero h1 { font-size: clamp(3.2rem, 1.25rem + 4.4vw, 6.4rem); letter-spacing: -0.035em; line-height: 0.95; }
.xhero-foot { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; flex-wrap: wrap; margin-top: clamp(24px, 4vw, 48px); }
.xhero .lead { color: oklch(86% 0.025 250); font-size: var(--t-base); max-width: 30em; margin: 22px 0 0; line-height: 1.65; }
.xhero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn.sun { color: var(--ink); }
.btn.outline-light { border-color: oklch(62% 0.04 258); }

/* Moss Island-inspired composition: one strong focal object with three quiet satellites.
   Unlike a decorative 3D scene, the focal object is a live slice of the working demo. */
.hero-stage { min-height: 500px; position: relative; display: grid; place-items: center; perspective: 1200px; }
.hero-orbit { position: absolute; inset: 8% 2% 2%; border: 1px solid oklch(65% 0.06 258 / 0.38); border-radius: 50%; transform: rotate(-7deg); }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed oklch(62% 0.05 258 / 0.28); }
.hero-orbit::before { inset: 10% 14%; transform: rotate(12deg); }
.hero-orbit::after { inset: 28% 2%; transform: rotate(-18deg); }
.hero-product { width: min(100%, 570px); position: relative; z-index: 2; color: var(--ink); background: oklch(99% 0.005 250 / 0.96); border: 1px solid oklch(82% 0.025 250 / 0.65); border-radius: 26px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 42px 100px -38px oklch(7% 0.07 258 / 0.95), inset 0 1px #fff; transform: rotateX(2.5deg) rotateY(-3.5deg); transform-origin: 50% 55%; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); backdrop-filter: blur(16px); }
.hero-stage:hover .hero-product { transform: rotateX(0) rotateY(0) translateY(-5px); box-shadow: 0 52px 110px -36px oklch(7% 0.07 258 / 0.95), inset 0 1px #fff; }
.hero-product-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.hero-day { display: inline-flex; align-items: center; min-height: 38px; padding: 5px 12px; border-radius: 8px; background: var(--lv4); color: var(--ink); font-weight: 850; }
.hero-auto { text-align: right; color: var(--muted); font-size: 0.75rem; line-height: 1.3; }
.hero-auto b { display: block; color: var(--ink); font-size: 1.5rem; line-height: 1; }
.hero-mini-route { height: 7px; margin: 26px 0 24px; background: var(--line); border-radius: 99px; position: relative; }
.hero-mini-route i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lv3), var(--lv4)); }
.hero-mini-route b { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--lv4); box-shadow: 0 0 0 5px var(--paper); transform: translate(-50%, -50%); }
.hero-kicker { margin: 0 0 5px; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-product h2 { font-size: clamp(1.65rem, 1.3rem + 1vw, 2.35rem); font-weight: 850; max-width: 13em; }
.hero-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.hero-two p { margin: 0; padding: 14px 15px; background: var(--wash); border-radius: 10px; font-size: 0.86rem; line-height: 1.55; }
.hero-two span { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 700; margin-bottom: 3px; }
.hero-agent { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; margin-top: 12px; padding: 13px 15px; color: #fff; background: var(--ink); border-radius: 12px; }
.hero-agent-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); background: var(--lv4); border-radius: 50%; }
.hero-agent-mark .pin { fill: currentColor; }
.hero-agent p { margin: 0; min-width: 0; line-height: 1.25; }
.hero-agent b, .hero-agent small { display: block; }
.hero-agent small { color: oklch(80% 0.025 250); font-size: 0.75rem; margin-top: 3px; }
.hero-agent-live { color: var(--lv4); font-size: 0.76rem; font-weight: 800; }
.hero-role { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; color: #fff; background: oklch(34% 0.06 258 / 0.9); border: 1px solid oklch(62% 0.05 258 / 0.45); border-radius: 999px; font-size: 0.8rem; font-weight: 650; backdrop-filter: blur(12px); box-shadow: 0 12px 34px -18px #000; }
.hero-role .ico { width: 19px; height: 19px; }
.hero-role.rp { top: 9%; left: 2%; }
.hero-role.rf { right: -1%; top: 22%; }
.hero-role.rr { left: 5%; bottom: 8%; }

.hroute { position: relative; margin-top: clamp(36px, 6vw, 72px); padding-top: 40px; }
.hroute-pin { position: absolute; top: 0; left: calc(var(--day) / 90 * 100%); transform: translateX(-50%); }
.hroute-line { height: 14px; border-radius: 7px; background: oklch(38% 0.05 258); position: relative; overflow: hidden; }
.hroute-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--day) / 90 * 100%); background: var(--lv4); border-radius: 7px; }
.hroute-ticks { display: grid; grid-template-columns: repeat(90, 1fr); height: 14px; margin-top: 6px; }
.hroute-ticks i { border-left: 1px solid oklch(46% 0.04 258); height: 6px; }
.hroute-ticks i.ph { height: 14px; border-left: 2px solid oklch(80% 0.03 250); }
.hroute-ticks i.done { border-color: oklch(70% 0.08 92); }
.hroute-ph { display: grid; grid-template-columns: repeat(90, 1fr); font-size: 0.8rem; color: oklch(80% 0.03 250); margin-top: 4px; }
.hroute-ph span { padding-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hroute-end { position: absolute; right: 0; top: 10px; font-size: 0.8rem; font-weight: 700; color: var(--lv4); }
.scroll-hint { position: absolute; right: clamp(16px, 4vw, 32px); bottom: 14px; color: oklch(78% 0.03 250); font-size: 0.82rem; text-decoration: none; display: none; }

/* the one orchestrated entrance: headline rises line by line, the route fills to today, the pin lands */
@keyframes x-rise { from { opacity: 0; transform: translateY(0.35em); } }
@keyframes x-fill { from { width: 0; } }
@keyframes x-pin { from { opacity: 0; transform: translate(-50%, -16px); } }
.xhero.intro h1 { animation: x-rise 0.9s var(--ease) both; }
.xhero.intro .xhero-scope { animation: x-rise 0.7s var(--ease) 0.05s both; }
.xhero.intro .xhero-foot { animation: x-rise 0.8s var(--ease) 0.3s both; }
.xhero.intro .hroute-fill { animation: x-fill 1.3s var(--ease) 0.6s both; }
.xhero.intro .hroute-pin { animation: x-pin 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) 1.8s both; }

/* scroll story */
.story { position: relative; height: 280svh; background: var(--bg); }
.story-stage { position: sticky; top: var(--head-h); height: calc(100svh - var(--head-h)); display: flex; align-items: center; overflow: hidden; }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 72px); align-items: center; width: 100%; }
.story h2 { font-size: var(--t-3xl); font-weight: 850; }
.story-intro { color: var(--ink-2); font-size: var(--t-lg); margin: 14px 0 clamp(20px, 4vw, 40px); max-width: 26em; }
.sto-stack { display: grid; }
.sto { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); pointer-events: none; }
.story[data-step="1"] .sto[data-n="1"], .story[data-step="2"] .sto[data-n="2"], .story[data-step="3"] .sto[data-n="3"], .story[data-step="4"] .sto[data-n="4"] { opacity: 1; transform: none; pointer-events: auto; }
.sto-n { font-size: clamp(3.5rem, 2rem + 5vw, 6.5rem); font-weight: 850; line-height: 0.9; color: var(--ink); letter-spacing: -0.04em; }
.sto h3 { font-size: var(--t-2xl); margin: 10px 0 16px; }
.sto dl { margin: 0; display: grid; gap: 12px; border-top: 2px solid var(--ink); padding-top: 14px; }
.sto dt { font-size: 0.82rem; color: var(--muted); }
.sto dd { margin: 0; font-size: var(--t-lg); font-weight: 500; line-height: 1.5; }
.story-marks { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(4, 1fr); pointer-events: none; }

.story-vis { position: relative; padding-top: 44px; }
.story { --s: 0; }
.story[data-step="2"] { --s: 1; }
.story[data-step="3"] { --s: 2; }
.story[data-step="4"] { --s: 3; }
.story-here { position: absolute; top: 0; left: calc(12.5% + var(--s) * 25%); transform: translateX(-50%); transition: left 0.6s var(--ease); }
.story-vis .hl-svg .st { transition: fill 0.4s, transform 0.45s var(--ease); }
.story[data-step="1"] .st:nth-of-type(1), .story[data-step="2"] .st:nth-of-type(2), .story[data-step="3"] .st:nth-of-type(3), .story[data-step="4"] .st:nth-of-type(4) { fill: var(--lv4); transform: scale(1.3); }
.story[data-step="2"] .st:nth-of-type(1), .story[data-step="3"] .st:nth-of-type(-n+2), .story[data-step="4"] .st:nth-of-type(-n+3) { fill: var(--ink); }
.story-vis .hl-svg .tie { transition: stroke 0.3s, stroke-width 0.3s; }
.story[data-step="1"] line:nth-of-type(2), .story[data-step="2"] line:nth-of-type(3), .story[data-step="3"] line:nth-of-type(4) { stroke: var(--lv3); stroke-width: 6; stroke-dasharray: none; }
.story-vis .hl-svg .f-line, .story-vis .hl-svg .f-end { transition: opacity 0.5s var(--ease); }
.story[data-step="4"] .f-line, .story[data-step="4"] .f-end { opacity: 0.18; }
.story-labels { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.story-labels span { transition: color 0.3s; padding: 0 4px; }
.story-labels small { display: block; font-size: 0.78rem; opacity: 0.8; }
.story[data-step="1"] .story-labels [data-n="1"], .story[data-step="2"] .story-labels [data-n="2"], .story[data-step="3"] .story-labels [data-n="3"], .story[data-step="4"] .story-labels [data-n="4"] { color: var(--ink); font-weight: 700; }

/* three lists */
.xroles { padding: clamp(72px, 10vw, 144px) 0; background: var(--paper); border-top: 1px solid var(--line); }
.xroles h2, .xcta h2, .xsafe h2 { font-size: var(--t-3xl); font-weight: 850; max-width: 14em; }
.xintro { color: var(--ink-2); font-size: var(--t-lg); max-width: 36em; margin: 16px 0 clamp(36px, 5vw, 64px); }
.xroles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.xroles-grid article { border-top: 6px solid var(--ink); padding-top: 22px; }
.xroles-grid article:nth-child(2) { border-color: var(--lv3); }
.xroles-grid article:nth-child(3) { border-color: var(--lv4); }
.xr-ico .ico { width: 44px; height: 44px; stroke-width: 1.4; color: var(--ink); }
.xroles-grid h3 { font-size: var(--t-xl); margin: 14px 0 6px; }
.xroles-grid .q { font-size: var(--t-lg); color: var(--ink-2); margin-bottom: 14px; }
.xroles-grid ul { margin: 0; padding: 0; list-style: none; }
.xroles-grid li { padding: 10px 0; border-top: 1px solid var(--line); }

/* safety stop */
.xsafe { background: var(--ink); color: oklch(95% 0.01 250); padding: clamp(72px, 10vw, 144px) 0; }
.xsafe h2 { color: #fff; }
.xsafe-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.xsafe p { color: oklch(84% 0.025 250); font-size: var(--t-lg); margin: 18px 0 28px; max-width: 30em; line-height: 1.65; }
.ticket { margin: 0; white-space: pre-wrap; font: 500 1rem/1.9 var(--sans); font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 26px 28px; border-top: 10px solid var(--red); transform: rotate(-1.2deg); box-shadow: 0 30px 60px -30px oklch(10% 0.05 258 / 0.8); }

/* final call */
.xcta { padding: clamp(72px, 10vw, 144px) 0; }
.xcta p { color: var(--ink-2); font-size: var(--t-lg); margin: 16px 0 28px; max-width: 32em; }
.xcta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  :root { --head-h: 0px; }
  .xhero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { min-height: 470px; margin-top: 10px; }
  .hero-product { transform: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .story h2 { font-size: var(--t-2xl); }
  .story-intro { margin-bottom: 14px; font-size: var(--t-base); }
  .sto-n { font-size: 3rem; }
  .sto h3 { font-size: var(--t-xl); margin: 4px 0 10px; }
  .sto dd { font-size: var(--t-base); }
  .story-vis { order: -1; padding-top: 36px; }
  .story-labels small { display: none; }
  .story-labels { font-size: 0.72rem; }
  .xroles-grid, .xsafe-grid { grid-template-columns: minmax(0, 1fr); }
  .ticket { transform: none; }
  .hroute-ph span { font-size: 0.66rem; }
}
@media (max-width: 520px) {
  .hero-stage { min-height: 430px; }
  .hero-role { font-size: 0.7rem; padding: 6px 9px; }
  .hero-role.rp { top: 2%; left: 0; }
  .hero-role.rf { top: 16%; right: 0; }
  .hero-role.rr { left: 0; bottom: 1%; }
  .hero-product { padding: 20px; border-radius: 20px; }
  .hero-two { grid-template-columns: 1fr; }
  .hero-two p:nth-child(2) { display: none; }
  .hero-agent small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hroute-ph span:not(:first-child) { color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .sto, .story-here { transition: none; }
}
.xhero > .wrap { width: 100%; }
.story h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem); text-wrap: pretty; word-break: keep-all; }
.story-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); }
.story-labels { font-size: 0.95rem; }
/* Chinese headings break at punctuation, not mid-phrase */
:lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { word-break: keep-all; overflow-wrap: break-word; }

/* ==========================================================================
   v4 app pages: every page opens with a full-width navy sign band
   ========================================================================== */
.page { padding-top: 0; }
.page > .wrap > .head:first-child {
  background: var(--ink); color: oklch(95% 0.01 250);
  box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax);
  padding: clamp(28px, 4.5vw, 56px) 0 clamp(26px, 3.5vw, 40px); margin-bottom: clamp(24px, 3vw, 36px);
}
.page > .wrap > .head:first-child h1 { color: #fff; font-weight: 850; }
.page > .wrap > .head:first-child .sub { color: oklch(85% 0.025 250); }
.page > .wrap > .head:first-child .meta { color: oklch(78% 0.03 250); }
.page > .wrap > .head:first-child .meta b { color: #fff; }
.page > .wrap > .head:first-child .chip { background: oklch(36% 0.05 258); color: oklch(92% 0.02 250); }
.page > .wrap > .head:first-child .muted, .page > .wrap > .head:first-child small { color: oklch(76% 0.03 250); }
.page > .wrap > .head:first-child .stat b { color: #fff; }
.page > .wrap > .head:first-child .stat span { color: oklch(78% 0.03 250); }
.page > .wrap > .head:first-child .stat.red b { color: oklch(72% 0.16 27); }
.page > .wrap > .head:first-child .stat.amber b { color: oklch(82% 0.13 80); }
.page > .wrap > .head:first-child .meter .label { color: oklch(80% 0.03 250); }
.page > .wrap > .head:first-child .meter .bar { background: oklch(36% 0.05 258); }
.page > .wrap > .head:first-child .goalline { color: oklch(88% 0.02 250); }
.page > .wrap > .head:first-child .route-wrap .label { color: oklch(80% 0.03 250); }
.page > .wrap > .head:first-child .route i { background: oklch(36% 0.05 258); }
.page > .wrap > .head:first-child .route i.l1 { background: oklch(70% 0.01 250); }
.page > .wrap > .head:first-child .route i.l2 { background: var(--lv2); }
.page > .wrap > .head:first-child .route i.l3 { background: oklch(66% 0.13 256); }
.page > .wrap > .head:first-child .route i.l4 { background: var(--lv4); }
.page > .wrap > .head:first-child .route i.red { background: oklch(64% 0.19 27); }
.page > .wrap > .head:first-child .route i.today { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--lv4); }
.page > .wrap > .head:first-child .route-ph { color: oklch(72% 0.03 250); }
.page > .wrap > .head:first-child .route-ph span { border-color: oklch(46% 0.04 258); }
.page > .wrap > .head:first-child .route-ph span.on { border-color: var(--lv4); color: #fff; }
.page > .wrap > .head:first-child .shield { box-shadow: none; }
.page > .wrap > .head:first-child .why { color: oklch(33% 0.08 290); }
/* the pin's point sits on today; its label runs away from the nearer edge */
.hroute-pin { transform: translateX(-11px); }
.hroute.end .hroute-pin { transform: translateX(calc(-100% + 11px)); }
@keyframes x-pin { from { opacity: 0; translate: 0 -16px; } }
@media (max-width: 860px) {
  .xhero { min-height: auto; padding-bottom: 28px; }
  .xhero h1 { font-size: clamp(3.75rem, 1rem + 13vw, 6rem); }
  .xhero-foot { margin-top: 22px; }
  .hroute { margin-top: 44px; }
  .hroute-end { top: 6px; }
}
@media (max-width: 860px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-labels { font-size: 0.72rem; }
}

/* ==========================================================================
   v4 why page
   ========================================================================== */
.xopen { background: var(--ink); color: oklch(95% 0.01 250); padding: clamp(56px, 9vw, 128px) 0 clamp(56px, 8vw, 112px); }
.xopen h1 { color: #fff; font-size: clamp(2.6rem, 1rem + 5vw, 5.5rem); font-weight: 850; line-height: 1.02; max-width: 12em; }
.xopen .intro { color: oklch(84% 0.025 250); font-size: var(--t-lg); max-width: 34em; margin: 22px 0 clamp(36px, 6vw, 72px); }
.gap-rows { border-top: 2px solid oklch(46% 0.04 258); }
.gap-rows .gh, .gap-rows .gr { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; }
.gap-rows .gh { padding: 14px 0; font-size: 0.85rem; color: oklch(72% 0.03 250); }
.gap-rows .gh span:last-child { color: var(--lv4); font-weight: 650; }
.gap-rows .gr { padding: clamp(16px, 2vw, 24px) 0; border-top: 1px solid oklch(38% 0.05 258); align-items: baseline; }
.gap-rows .from { color: oklch(68% 0.03 250); font-size: var(--t-lg); text-decoration: line-through; text-decoration-color: oklch(52% 0.04 258); text-decoration-thickness: 1px; }
.gap-rows .to { color: #fff; font-size: var(--t-xl); font-weight: 650; line-height: 1.4; }

.sci-list article { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px clamp(20px, 3vw, 40px); padding: clamp(20px, 2.6vw, 32px) 0; border-top: 1px solid var(--line-2); align-items: start; }
.sci-list article:last-child { border-bottom: 1px solid var(--line-2); }
.sci-name h3 { font-size: var(--t-xl); }
.sci-name cite { display: block; font-style: normal; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.sci-list .plain { font-size: var(--t-lg); color: var(--ink); margin: 0; line-height: 1.55; }
.sci-list .apply { margin: 0; color: var(--ink-2); }
.sci-list .apply b { display: block; color: var(--lv3); font-weight: 650; font-size: 0.85rem; margin-bottom: 4px; }

.no-signs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-top: clamp(28px, 4vw, 48px); }
.no-signs > div { display: flex; flex-direction: column; gap: 8px; }
.no-ico { width: 52px; height: 52px; fill: none; stroke: var(--red); stroke-width: 4.5; }
.no-signs b { font-size: var(--t-xl); font-weight: 800; }
.no-signs span { color: var(--ink-2); font-size: 0.95rem; }

@media (max-width: 860px) {
  .gap-rows .gh, .gap-rows .gr { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .gap-rows .gh span:first-child { display: none; }
  .sci-list article { grid-template-columns: minmax(0, 1fr); }
  .no-signs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.band h2 { font-size: var(--t-3xl); font-weight: 850; }

/* wizard: the five setup steps are stops on a line */
.stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: clamp(24px, 3vw, 36px); }
.stepper li { border-top: 0; padding: 32px 12px 0 0; position: relative; font-size: 0.92rem; }
.stepper li::before { content: ""; position: absolute; top: 4px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--line-2); z-index: 1; transition: background 0.3s, transform 0.3s var(--ease); }
.stepper li::after { content: ""; position: absolute; top: 11px; left: 18px; right: 0; height: 4px; background: var(--line-2); }
.stepper li:last-child::after { content: none; }
.stepper li.done::before { background: var(--ink); box-shadow: none; }
.stepper li.done::after { background: var(--ink); }
.stepper li.on::before { background: var(--lv4); box-shadow: inset 0 0 0 3.5px var(--ink); transform: scale(1.3); }
.stepper li.on { color: var(--ink); }
@media (max-width: 860px) { .stepper li { font-size: 0.72rem; padding-right: 4px; } }

/* ==========================================================================
   v4 app details
   ========================================================================== */
.sec h2 { font-size: var(--t-2xl); font-weight: 850; }
.panel > h3 { font-size: var(--t-lg); font-weight: 800; }

/* Pin, the assistant, is a sign plate of its own: navy, with the yellow marker */
.agent { background: var(--ink); color: oklch(95% 0.01 250); border: 0; }
.agent .ah b { font-size: 1.25rem; font-weight: 850; color: #fff; }
.agent .ah .small.muted { color: oklch(78% 0.03 250); }
.agent .ah .pin path { stroke: var(--ink); }
.agent .doors button { background: oklch(34% 0.06 258); border: 1px solid oklch(44% 0.05 258); color: #fff; border-radius: 8px; padding: 12px 14px; font-weight: 600; transition: background 0.2s, border-color 0.2s; }
.agent .doors button:hover { background: oklch(40% 0.06 258); border-color: oklch(60% 0.05 258); }
.agent .doors button[aria-pressed="true"] { background: var(--lv4); border-color: var(--lv4); color: var(--ink); }
.agent textarea { background: oklch(99% 0.003 250); color: var(--ink); }
.agent .bubble { background: var(--paper); color: var(--ink); border-radius: 4px var(--r) var(--r) var(--r); }
.agent .bubble.danger { background: var(--red-bg); }
.agent .bubble .btn.ghost { color: var(--ink); }
.agent .fine { color: oklch(72% 0.03 250); }
.agent .btn.sm:not(.ghost):not(.danger) { background: var(--lv4); border-color: var(--lv4); color: var(--ink); }
.agent .sos { color: var(--ink-2); }

/* a task you did turns into a little yellow sign with a tick */
.task.is-done { background: var(--lv4-bg); border-color: oklch(86% 0.09 92); }
.task.is-done::after { content: ""; position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--lv4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231c2a48' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; animation: tick-in 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes tick-in { from { transform: scale(0); } }
.task h3 { padding-right: 44px; }

/* the end-of-day moment */
.peak { background: var(--ink); color: #fff; border-radius: var(--r-lg); }
.peak h2 { color: #fff; }
.peak .muted { color: oklch(80% 0.03 250); }
.peak ul { color: var(--lv4); font-weight: 650; }

/* ask banners read as signs too */
.banner.sun { background: var(--lv4); box-shadow: none; color: var(--ink); }
.banner.sun .btn.sun { background: var(--ink); border-color: var(--ink); color: #fff; }
.banner.sun .small { color: var(--ink); }
.banner.sun .track .seg.cur { background: #fff; }
.task.is-done .after, .task.is-done .after.good { background: var(--paper); }
