/* WUFAN — two apps on one page: WuShi (white board, category papers) and WUJI (a green ledger). */

:root {
  --ground: #faf9f5;
  --ink: #141413;
  --muted: #66645c;
  --hairline: #e6e3da;
  --tint: #f0eee6;
  --peach: #fbe3cc;
  --on-peach: #5a3512;
  --alarm: #fadad3;
  --on-alarm: #7a281b;
  --green: #5abe7e;
  --green-ink: #1d6b40;
  --green-tint: #eaf6ef;
  --dot: rgba(36, 36, 36, 0.11);
  --shadow: 0 1px 1px rgba(20, 20, 20, 0.04), 0 10px 30px -10px rgba(20, 20, 20, 0.16);
  --shadow-lift: 0 2px 2px rgba(20, 20, 20, 0.05), 0 30px 60px -18px rgba(20, 20, 20, 0.3);

  --serif: "Source Serif 4", "New York", ui-serif, Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  --spring-soft: cubic-bezier(0.34, 1.32, 0.42, 1);
  color-scheme: light;
}
:root:lang(zh-Hant) { --serif: "Source Serif 4", "Noto Serif TC", "Songti TC", serif; --sans: "Hanken Grotesk", "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
:root:lang(zh-Hans) { --serif: "Source Serif 4", "Noto Serif SC", "Songti SC", serif; --sans: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:root:lang(ja) { --serif: "Source Serif 4", "Noto Serif JP", "Hiragino Mincho ProN", serif; --sans: "Hanken Grotesk", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }

/* Dark: follows the system unless the visitor picked a theme (html[data-theme], set by the toggle). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #000000; --ink: #ededed; --muted: #a0a0a0; --hairline: #262626; --tint: #141414;
    --peach: #3b2a16; --on-peach: #f6dfc4; --alarm: #3e1d17; --on-alarm: #ffc5ba;
    --green: #5abe7e; --green-ink: #9be0b5; --green-tint: #0d2117;
    --dot: rgba(237, 237, 237, 0.13);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 12px 30px -10px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 2px 2px rgba(0, 0, 0, 0.5), 0 30px 60px -18px rgba(0, 0, 0, 0.95);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) [style*="--paper"] { --paper: var(--paper-night) !important; --paper-ink: var(--paper-night-ink) !important; }
}
:root[data-theme="dark"] {
    --ground: #000000; --ink: #ededed; --muted: #a0a0a0; --hairline: #262626; --tint: #141414;
    --peach: #3b2a16; --on-peach: #f6dfc4; --alarm: #3e1d17; --on-alarm: #ffc5ba;
    --green: #5abe7e; --green-ink: #9be0b5; --green-tint: #0d2117;
    --dot: rgba(237, 237, 237, 0.13);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 12px 30px -10px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 2px 2px rgba(0, 0, 0, 0.5), 0 30px 60px -18px rgba(0, 0, 0, 0.95);
    color-scheme: dark;
}
:root[data-theme="dark"] [style*="--paper"] { --paper: var(--paper-night) !important; --paper-ink: var(--paper-night-ink) !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
em { font-style: italic; }
/* Chinese and Japanese have no true italic; slanting them is a fake. Emphasis is colour only there. */
:lang(zh-Hant) em, :lang(zh-Hans) em, :lang(ja) em, :lang(zh-Hant) .door-verb, :lang(zh-Hans) .door-verb, :lang(ja) .door-verb { font-style: normal; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--ground); }
.skip:focus { left: 8px; }
.glyph { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.eyebrow { margin: 0 0 14px; font: 600 12px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
:lang(zh-Hant) .eyebrow, :lang(zh-Hans) .eyebrow, :lang(ja) .eyebrow { letter-spacing: 0.06em; }

/* ---------- top bar: a floating capsule, like WuShi's tab bar ---------- */

.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.top {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: center;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.bar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 4px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--hairline) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ground) 74%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: var(--shadow);
  transition: box-shadow 0.4s, padding 0.4s var(--ease);
}
.scrolled .bar { box-shadow: var(--shadow-lift); }
.bar > * + * { position: relative; }
.bar > nav::before, .bar > .langs::before {
  content: ""; position: absolute; left: -3px; top: 25%; bottom: 25%; width: 1px; background: var(--hairline);
}
.mark { display: inline-flex; align-items: center; gap: 9px; padding: 0 14px 0 0; text-decoration: none; font: 700 15px/1 var(--sans); letter-spacing: 0.2em; }
.mark svg { width: 34px; height: 34px; color: var(--ink); transition: rotate 0.6s var(--spring); }
.mark:hover svg { rotate: -12deg; }
.top nav { display: flex; gap: 2px; padding: 0 4px; font: 600 14px/1 var(--sans); }
.top nav a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--muted); transition: background 0.2s, color 0.2s; }
.top nav a:hover { background: var(--tint); color: var(--ink); }
.nav-app { padding-left: 6px !important; }
.nav-app img { width: 24px; height: 24px; border-radius: 7px; box-shadow: 0 0 0 1px var(--hairline); transition: transform 0.4s var(--spring); }
.nav-app:hover img { transform: translateY(-2px) rotate(-6deg); }
.langs { position: relative; padding: 0 2px 0 6px; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font: 600 13px/1 var(--sans); color: var(--muted); transition: background 0.2s, color 0.2s; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { background: var(--tint); color: var(--ink); }
.langs summary .glyph { width: 17px; height: 17px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; min-width: 168px;
  display: grid; padding: 6px; border-radius: 18px;
  background: var(--ground); border: 1px solid var(--hairline); box-shadow: var(--shadow-lift);
  transform-origin: 90% 0; animation: menu-in 0.35s var(--spring-soft);
}
@keyframes menu-in { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }
.lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font: 500 15px/1.2 var(--sans); color: var(--ink); }
.lang-menu a:hover { background: var(--tint); }
.lang-menu a[aria-current] { font-weight: 700; }
.lang-menu .glyph { width: 16px; height: 16px; color: var(--green-ink); }
.theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--tint); cursor: pointer; transition: transform 0.5s var(--spring); }
.theme:hover { transform: rotate(24deg); }
.theme .glyph { width: 17px; height: 17px; }

/* ---------- hero: WU + FAN / SHI / JI / ? ---------- */

.type-hero { position: relative; height: 340svh; margin-top: calc(-1 * var(--top-h, 62px)); }
.type-hero.still { height: auto; }
.type-stage {
  --stage: var(--ground);
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 92px var(--gutter) 36px;
  background: var(--stage); transition: background 0.7s var(--ease);
}
.still .type-stage { position: static; height: auto; min-height: 86svh; }
[data-state="1"] .type-stage { --stage: color-mix(in srgb, var(--peach) 55%, var(--ground)); }
[data-state="2"] .type-stage { --stage: var(--green-tint); }
[data-state="3"] .type-stage { --stage: var(--tint); }

.type-word {
  --lh: 1em;
  display: flex; align-items: flex-start; justify-content: center; margin: 0;
  font: 700 clamp(84px, 19vw, 320px)/1 var(--sans); letter-spacing: 0.02em;
  white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.type-wu, .type-roll, .type-col { display: inline-flex; height: var(--lh); }
.type-wu { transform-origin: 50% 100%; }
.type-wu.nudge { animation: nudge 0.6s var(--spring-soft); }
@keyframes nudge { 30% { transform: scale(1.03, 0.94); } 60% { transform: scale(0.99, 1.02); } }
.type-wu span { display: block; height: var(--lh); transition: transform 0.45s var(--ease); }
/* The odometer: each column rolls a beat after the one before; a column with no letter folds away. */
/* Clip top and bottom only: the letters may lean past their cell sideways (an A's foot does). */
.type-col { clip-path: inset(0 -0.5em); transition: width 0.7s var(--spring-soft); }
.type-track { flex: none; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; transition: transform 0.75s var(--spring-soft); }
.type-track > span { flex: none; display: block; width: max-content; height: var(--lh); white-space: pre; clip-path: inset(0 -0.5em); }
.type-col.rolling .type-track { animation: smear 0.6s ease-out; }
@keyframes smear { 0% { filter: blur(0); } 35% { filter: blur(5px); } 100% { filter: blur(0); } }
.t-0 { color: var(--ink); }
.t-1 { color: #e2793a; }
.t-2 { color: var(--green); }
.t-3 { color: var(--muted); }

.type-caps { position: relative; min-height: 236px; margin: clamp(10px, 2vw, 28px) auto 0; width: min(780px, 100%); text-align: center; }
.cap { position: absolute; left: 0; top: 0; right: 0; pointer-events: none; }
.cap > * { opacity: 0; filter: blur(10px); transform: translateY(12px); transition: opacity 0.3s, filter 0.3s, transform 0.3s; }
.cap.is-on { pointer-events: auto; }
.cap.is-on > * { opacity: 1; filter: blur(0); transform: none; transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.8s var(--spring-soft); }
.cap.is-on > :nth-child(1) { transition-delay: 0.18s; }
.cap.is-on > :nth-child(2) { transition-delay: 0.26s; }
.cap.is-on > :nth-child(3) { transition-delay: 0.34s; }
.cap .eyebrow { margin-bottom: 10px; }
.type-hero h1 { margin: 0 0 12px; font: 420 clamp(30px, 3.6vw, 52px)/1.05 var(--serif); letter-spacing: -0.02em; }
.type-hero h1 em { color: var(--green-ink); }
:lang(zh-Hant) .type-hero h1, :lang(zh-Hans) .type-hero h1, :lang(ja) .type-hero h1 { font-weight: 600; font-size: clamp(26px, 3vw, 42px); line-height: 1.3; letter-spacing: 0; }
.cap-line { margin: 0 auto; max-width: 34em; font-size: clamp(17px, 1.7vw, 22px); color: var(--muted); }
.cap-app { display: inline-flex; align-items: center; gap: 16px; margin-bottom: 14px; text-decoration: none; font: 700 clamp(26px, 2.6vw, 36px)/1 var(--sans); letter-spacing: 0.02em; }
.cap-app img { width: 56px; height: 56px; border-radius: 15px; box-shadow: var(--shadow); }
.cap-app span { display: inline-flex; align-items: center; gap: 10px; }
.cap-app .glyph { width: 26px; height: 26px; transition: translate 0.3s var(--ease); }
.cap-app:hover .glyph { translate: 6px 0; }
.cap-badge { display: inline-block; margin: 16px 0 0; padding: 6px 12px; border-radius: 999px; background: var(--ground); font: 600 13px/1 var(--sans); color: var(--muted); }
.cap-get { display: inline-flex; align-items: center; gap: 16px; margin-top: 18px; }
.cap-get .qr { width: 64px; height: 64px; border-radius: 10px; background: #fff; padding: 4px; box-shadow: var(--shadow); }
.cap-more { font: italic 400 clamp(28px, 3.4vw, 46px)/1.15 var(--serif); color: var(--ink); }
:lang(zh-Hant) .cap-more, :lang(zh-Hans) .cap-more, :lang(ja) .cap-more { font-style: normal; font-weight: 600; font-size: clamp(24px, 2.8vw, 38px); }

.type-steps { position: relative; display: inline-flex; align-self: center; gap: 4px; margin-top: 18px; padding: 4px; border: 1px solid var(--hairline); border-radius: 999px; }
.step-pill { position: absolute; left: 0; top: 4px; height: 34px; border-radius: 999px; background: var(--ink); transition: transform 0.6s var(--spring-soft), width 0.6s var(--spring-soft); }
.type-steps button {
  position: relative; z-index: 1; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 600 12px/1 var(--sans); letter-spacing: 0.08em; color: var(--muted); transition: color 0.35s;
}
.type-steps button:hover { color: var(--ink); }
.type-steps button[aria-current="true"] { color: var(--ground); }

/* ---------- app sections ---------- */

.app {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 12vw, 160px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "head glimpse" "lede glimpse" "foot glimpse";
  column-gap: clamp(32px, 5vw, 80px); align-items: start;
}
.app > .app-head { grid-area: head; }
.app > .app-lede { grid-area: lede; }
.app > .glimpse { grid-area: glimpse; align-self: center; margin: 0; width: 100%; }
.app > .app-foot { grid-area: foot; }
.app-wuji { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "glimpse head" "glimpse lede" "glimpse foot"; }
.app-head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.app-head picture, .app-icon { flex: none; }
.app-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); }
.badge { display: inline-block; margin-left: 10px; padding: 5px 10px; border-radius: 999px; background: var(--peach); color: var(--on-peach); letter-spacing: 0.04em; text-transform: none; font-weight: 600; }
.badge-live { background: var(--green-tint); color: var(--green-ink); }
.app h2, .contact h2 { margin: 0; font: 420 clamp(36px, 4.6vw, 64px)/1.04 var(--serif); letter-spacing: -0.025em; text-wrap: balance; }
.app-wuji h2 em { color: var(--green-ink); }
:lang(zh-Hant) .app h2, :lang(zh-Hans) .app h2, :lang(ja) .app h2,
:lang(zh-Hant) .contact h2, :lang(zh-Hans) .contact h2, :lang(ja) .contact h2 { font-weight: 600; line-height: 1.22; letter-spacing: 0; }
.app-lede { max-width: 38em; margin: 0 0 36px; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }

.tile { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--paper-ink) 9%, var(--paper)); color: var(--paper-ink); }
.tile-big { width: 112px; height: 112px; border-radius: 24px; }
.tile-big .glyph { width: 46px; height: 46px; stroke-width: 1.6; }

/* ---------- WuShi: the working screen (timeline | detail, as on iPhone Duo's inner display) ---------- */

.screen {
  position: relative; margin: 0 0 72px;
  border: 1px solid var(--hairline); border-radius: 34px;
  background: var(--ground);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.screen-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 28px; border-bottom: 1px solid var(--hairline); }
.screen-title { font: 600 30px/1 var(--serif); }
.hint { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 9px 14px; border-radius: 999px; background: var(--peach); color: var(--on-peach); font: 600 14px/1.25 var(--sans); }
.hint-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.5); opacity: 0.45; } }
.screen-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; }
.timeline-col { padding: 26px 28px 26px 30px; }
.detail-col { position: relative; padding: 26px 28px; border-left: 1px solid var(--hairline); background: var(--tint); }

.timeline { list-style: none; margin: 0; padding: 0; }
.entry { position: relative; padding-left: 30px; display: grid; grid-template-rows: auto 1fr; transition: grid-template-rows 0.45s var(--ease), opacity 0.35s; }
.entry::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: -14px; width: 1.5px; background: var(--hairline); }
.entry:last-child::before { bottom: 0; }
.entry > * { min-height: 0; }
.entry-head { position: relative; display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.entry-head .dot { position: absolute; left: -30px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--ground); }
.entry[data-due="today"] .dot { background: var(--ink); border-color: var(--ink); }
.entry-head time { font: 600 18px/1 var(--serif); }
:lang(zh-Hant) .entry-head time, :lang(zh-Hans) .entry-head time, :lang(ja) .entry-head time { font: 600 15px/1 var(--sans); }
.entry-head .rel { font: 600 13px/1 var(--sans); color: var(--muted); }
.entry[data-due="today"] .entry-head .rel { color: var(--ink); }
.entry[data-due="today"] .entry-head::after { content: ""; flex: 1; height: 1.5px; background: var(--ink); align-self: center; }
.entry.is-gone { opacity: 0; grid-template-rows: 0fr 0fr; }
.entry.is-gone .card { transform: scale(0.94); }
.entry.is-moving { opacity: 0; transform: translateY(-8px); transition: opacity 0.3s, transform 0.3s; }
.entry.is-new { animation: settle 0.6s var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateY(18px); } }

.card {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  padding: 14px; border-radius: 22px;
  background: var(--paper); color: var(--paper-ink);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 0 0 0 var(--paper-ink);
  transition: transform 0.35s var(--spring), box-shadow 0.25s;
}
.card:hover { transform: translateY(-2px); }
.card:active { transform: scale(0.98); }
.card.is-selected { box-shadow: inset 0 0 0 2px var(--paper-ink); }
.card.is-renewed { animation: renewed 1.1s var(--ease); }
@keyframes renewed { 20% { transform: scale(1.03); box-shadow: inset 0 0 0 2px var(--paper-ink), var(--shadow-lift); } }
.card-name { flex: 1; min-width: 0; font: 600 17px/1.25 var(--sans); }
.qty { margin-left: 8px; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--paper-ink) 10%, transparent); font: 600 12px/1 var(--sans); vertical-align: 2px; }
.pill { flex: none; padding: 6px 10px; border: 1.5px solid var(--paper-ink); border-radius: 999px; font: 600 12.5px/1 var(--sans); }

.detail-empty { position: absolute; inset: 0; margin: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font: 500 16px/1.3 var(--sans); text-align: center; }
.detail-empty .glyph { rotate: 180deg; width: 28px; height: 28px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { translate: -8px 0; } }
.pop[hidden], .detail-empty[hidden] { display: none; }
.pop { position: relative; z-index: 2; }
.pop.is-open .pop-card { animation: pop-in 0.5s var(--spring) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }

.detail { padding: 22px 22px 26px; border-radius: 28px; background: var(--paper); color: var(--paper-ink); }
.detail-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.detail-cat { display: block; margin: 6px 0 6px; font: 600 12px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.detail-title { display: block; margin-bottom: 12px; font: 600 clamp(28px, 3vw, 38px)/1.08 var(--serif); letter-spacing: -0.01em; }
:lang(zh-Hant) .detail-title, :lang(zh-Hans) .detail-title, :lang(ja) .detail-title { letter-spacing: 0; }
.detail ul { list-style: none; margin: 0; padding: 0; font: 500 15px/1.55 var(--sans); }
.pop-label { margin-top: 14px; }
.pop-date { display: block; font: 600 20px/1.25 var(--sans); }
.leave { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 9px 14px 9px 10px; border: 0; border-radius: 999px; cursor: pointer; background: color-mix(in srgb, var(--paper-ink) 10%, var(--paper)); color: var(--paper-ink); font: 600 15px/1 var(--sans); }
.leave .glyph { width: 16px; height: 16px; }

.slide {
  --p: 0;
  position: relative; height: 64px; border-radius: 999px; padding: 6px;
  background: color-mix(in srgb, var(--ground) 70%, var(--paper));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--paper-ink) 18%, transparent);
  display: flex; align-items: center; overflow: hidden;
}
.slide::before { content: ""; position: absolute; inset: 6px auto 6px 6px; width: calc(52px + var(--p) * (100% - 64px)); border-radius: 999px; background: color-mix(in srgb, var(--paper-ink) 14%, transparent); transition: width 0.45s var(--spring); }
.knob {
  position: relative; z-index: 2; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: grab; touch-action: none;
  display: grid; place-items: center; background: var(--paper-ink); color: var(--paper);
  transform: translateX(calc(var(--p) * var(--room, 300px)));
  transition: transform 0.45s var(--spring);
}
.slide.is-dragging .knob, .slide.is-dragging::before { transition: none; }
.slide.is-dragging .knob { cursor: grabbing; }
.slide-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 50px; font: 600 16px/1 var(--sans); pointer-events: none; opacity: calc(1 - var(--p) * 1.6); }
.slide-label::after { content: "  »"; white-space: pre; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: 0.35; } }
.slide.is-done { animation: done 0.4s var(--ease); }
@keyframes done { 50% { transform: scale(1.02); } }

.tally { position: absolute; z-index: 7; right: 24px; bottom: 22px; margin: 0; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 999px; background: var(--ink); color: var(--ground); font: 600 14px/1 var(--sans); box-shadow: var(--shadow-lift); animation: pop-in 0.45s var(--spring); }
.tally[hidden] { display: none; }
.tally button { border: 0; padding: 7px 12px; border-radius: 999px; background: var(--ground); color: var(--ink); cursor: pointer; font-weight: 600; }

/* ---------- the glimpses: a little of each app, fading out — the rest is in the app ---------- */

.glimpse {
  position: relative; max-width: 560px; margin: 0 0 56px; padding: 28px 28px 0;
  border: 1px solid var(--hairline); border-radius: 34px; background: var(--ground);
  box-shadow: var(--shadow-lift);
  height: 360px; overflow: hidden;
  mask-image: linear-gradient(#000 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 45%, transparent 100%);
}
.glimpse .card { cursor: default; }
.glimpse .card:hover, .glimpse .card:active { transform: none; }
.glimpse-ledger { padding-top: 24px; }
.glimpse-ledger .calc-total { justify-content: space-between; margin-bottom: 12px; }
.glimpse-ledger .calc-total b { font: 500 clamp(34px, 4.6vw, 48px)/1 var(--mono); letter-spacing: -0.03em; }
.glimpse-ledger .row { grid-template-columns: 28px minmax(0, 1fr) 32px auto 18px 32px; padding: 12px 0; font: 500 17px/1.2 var(--sans); }
.glimpse-ledger .row-amt, .glimpse-ledger .row-qty { font: 500 16px/1 var(--mono); text-align: right; }
.glimpse-ledger .sign { display: grid; place-items: center; cursor: default; }

/* ---------- facts and section foot ---------- */

.facts { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.fact-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 14px; background: var(--tint); }
.app-wuji .fact-icon { background: var(--green-tint); color: var(--green-ink); }
.facts h3 { margin: 0 0 6px; font: 600 19px/1.25 var(--sans); }
.facts p { margin: 0; color: var(--muted); font-size: 16px; }
.app-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.button { display: inline-flex; align-items: center; padding: 16px 26px; border-radius: 999px; background: var(--ink); color: var(--ground); font: 600 16px/1 var(--sans); text-decoration: none; transition: transform 0.25s var(--spring), box-shadow 0.25s; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.button-green { background: var(--green); color: #fff; }
.price, .legal-links { margin: 0; color: var(--muted); font-size: 15px; }
.qr { border-radius: 10px; background: #fff; padding: 5px; box-shadow: var(--shadow); }

/* ---------- WUJI: the live ledger ---------- */

.calc { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(24px, 4vw, 56px); align-items: center; margin: 0 0 96px; }
.calc-note { padding: clamp(18px, 3vw, 30px); border-radius: 30px; background: var(--ground); border: 1px solid var(--hairline); box-shadow: var(--shadow-lift); }
.calc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.calc-try { margin: 0; font: 500 13px/1.4 var(--mono); color: var(--muted); max-width: 22em; }
.calc-total { margin: 0; display: flex; align-items: baseline; gap: 14px; color: var(--green-ink); }
.calc-total > span { font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.odo { display: inline-flex; font: 500 clamp(34px, 4.6vw, 52px)/1 var(--mono); letter-spacing: -0.03em; }
.odo .d { display: inline-block; height: 1em; overflow: hidden; }
.odo .d > span { display: flex; flex-direction: column; transition: transform 0.7s var(--spring); }
.odo .d > span > span { height: 1em; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px 112px 18px 56px; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--hairline); animation: line-in 0.4s var(--spring) both; }
.row-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-tint); color: var(--green-ink); font: 600 13px/1 var(--mono); }
.row input { width: 100%; min-width: 0; padding: 9px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 500 17px/1.2 var(--sans); }
.row .row-amt, .row .row-qty { font: 500 16px/1.2 var(--mono); text-align: right; }
.row input:hover { background: var(--tint); }
.row input:focus { outline: 2px solid var(--green); background: var(--ground); }
.row.neg .row-amt { color: var(--on-alarm); }
.times { color: var(--muted); text-align: center; font: 400 15px/1 var(--mono); }
.sign { width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer; background: var(--green-tint); color: var(--green-ink); font: 500 18px/1 var(--mono); transition: transform 0.3s var(--spring), background 0.2s; }
.sign[data-sign="-"] { background: var(--alarm); color: var(--on-alarm); }
.sign:active { transform: scale(0.82) rotate(-90deg); }
.calc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.ghost { padding: 10px 16px; border: 1px dashed var(--muted); border-radius: 999px; background: none; cursor: pointer; font: 600 15px/1 var(--sans); }
.ghost:hover { border-style: solid; }
.split-ctl { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--sans); color: var(--muted); }
.split-ctl button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--ground); cursor: pointer; font: 500 17px/1 var(--mono); color: var(--ink); transition: transform 0.25s var(--spring); }
.split-ctl button:active { transform: scale(0.85); }
.split-ctl output { min-width: 1.6em; text-align: center; color: var(--ink); font: 600 18px/1 var(--mono); }
.calc-chart { margin: 0; text-align: center; }
.calc-chart svg { width: 100%; max-width: 260px; height: auto; rotate: -90deg; }
.calc-chart circle { transition: stroke-dasharray 0.6s var(--ease), stroke-dashoffset 0.6s var(--ease); }
.calc-chart figcaption { margin-top: 14px; font: 500 18px/1.3 var(--mono); color: var(--green-ink); min-height: 1.3em; }

/* The promise: no sign-up, your data stays yours. */
.promise { list-style: none; margin: 18px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.promise li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--tint); font: 600 13px/1.2 var(--sans); color: var(--ink); }
.promise .glyph { width: 15px; height: 15px; color: var(--green-ink); }
.p-hero .promise { margin: -10px auto 26px; }

/* ---------- app pages: /wushi/ and /wuji/ ---------- */

.product-page-wushi { --app: #e2793a; --app-wash: color-mix(in srgb, var(--peach) 45%, var(--ground)); }
.product-page-wuji { --app: var(--green); --app-wash: var(--green-tint); }
.product { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.p-label { margin: 0 0 22px; font: 600 13px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
:lang(zh-Hant) .p-label, :lang(zh-Hans) .p-label, :lang(ja) .p-label { letter-spacing: 0.06em; font-size: 14px; }

/* Rise in: blurred to sharp, a beat apart. */
.rise { opacity: 0; filter: blur(10px); transform: translateY(18px); transition: opacity 0.7s var(--ease), filter 0.7s var(--ease), transform 0.9s var(--spring-soft); transition-delay: calc(var(--ri, 0) * 70ms); }
.rise.is-in { opacity: 1; filter: blur(0); transform: none; }

/* Hero: the name, huge, then what it is. */
.p-hero { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 56px; }
.p-word, .p-next-word { display: flex; justify-content: center; font: 700 clamp(84px, 21vw, 300px)/0.95 var(--sans); letter-spacing: 0.02em; user-select: none; }
.p-word span, .p-next-word span { display: inline-block; }
.p-word .acc, .p-next-word .acc { color: var(--app); }
.p-next-wuji .acc { color: var(--green); }
.p-next-wushi .acc { color: #e2793a; }
.p-word span { animation: drop 0.9s var(--spring-soft) both; animation-delay: calc(var(--i, 0) * 60ms); }
.p-word span:nth-child(2) { --i: 1; } .p-word span:nth-child(3) { --i: 2; } .p-word span:nth-child(4) { --i: 3; } .p-word span:nth-child(5) { --i: 4; }
@keyframes drop { from { opacity: 0; filter: blur(12px); transform: translateY(0.25em); } }
.p-hero-copy { display: grid; justify-items: center; text-align: center; margin-top: clamp(16px, 3vw, 36px); }
.p-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow-lift); margin-bottom: 22px; animation: drop 0.9s var(--spring-soft) 0.35s both; }
.p-hero h1 { margin: 0 0 16px; max-width: 18em; font: 420 clamp(30px, 3.6vw, 50px)/1.1 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.p-hero h1 em { color: var(--app); }
:lang(zh-Hant) .p-hero h1, :lang(zh-Hans) .p-hero h1, :lang(ja) .p-hero h1 { font-weight: 600; font-size: clamp(26px, 3vw, 42px); line-height: 1.3; letter-spacing: 0; }
.product-lede { margin: 0 auto 28px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.p-cta { display: inline-flex; align-items: center; gap: 16px; }
.p-cta .qr { width: 64px; height: 64px; }

/* How it works, assembled: the paragraph on one side, a small copy of the app on the other; the
   marked words fly across as the section scrolls (the stage stays put while they do). */
.assemble { position: relative; height: 260svh; }
.asm-stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: clamp(28px, 5vw, 72px); padding: 80px 0 40px; }
.asm-text { margin: 0; font: 420 clamp(22px, 2.5vw, 32px)/1.5 var(--serif); letter-spacing: -0.01em; }
:lang(zh-Hant) .asm-text, :lang(zh-Hans) .asm-text, :lang(ja) .asm-text { font-weight: 500; font-size: clamp(19px, 2vw, 26px); line-height: 1.75; letter-spacing: 0; }
.asm-text .u { color: color-mix(in srgb, var(--ink) 22%, var(--ground)); transition: color 0.35s; }
.asm-text .u.lit { color: var(--ink); }
mark.kw { background: none; color: inherit; border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent); transition: background 0.4s, color 0.4s, border-color 0.4s; border-radius: 4px; padding: 0 2px; }
mark.kw.flying { color: color-mix(in srgb, var(--ink) 30%, transparent); border-color: transparent; }
mark.kw.sent { background: color-mix(in srgb, var(--app) 22%, transparent); border-color: transparent; }
.kw-ghost { position: absolute; z-index: 90; pointer-events: none; transform-origin: 0 0; padding: 0 2px; border-radius: 6px; background: var(--app); color: #fff; font-family: var(--serif); font-weight: 600; line-height: 1.5; white-space: nowrap; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.4); }

.asm-card { position: relative; padding: 22px; border-radius: 28px; background: color-mix(in srgb, var(--tint) 70%, var(--ground)); border: 1px solid var(--hairline); box-shadow: var(--shadow-lift); font: 500 15px/1.3 var(--sans); }
.slot { opacity: 0; transition: opacity 0.25s; }
.slot.on { opacity: 1; animation: pop 0.5s var(--spring); }
@keyframes pop { 40% { transform: scale(1.12); } }
.asm-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 12px 14px; border-bottom: 1px solid var(--hairline); }
.asm-total .slot { font: 700 15px/1 var(--sans); }
.asm-total .odo { font: 600 clamp(28px, 3.2vw, 38px)/1 var(--sans); color: var(--green-ink); opacity: 0; transition: opacity 0.3s; }
.asm-total .slot.on + .odo { opacity: 1; }
/* A line as in the app: number, name, a round sign, amount × quantity. */
/* The rows share the card's columns (subgrid), so the amount and quantity columns are as wide as
   their widest entry — in any language — and every row lines up. */
.asm-ledger { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content max-content max-content max-content; column-gap: 10px; }
.asm-ledger > .asm-total, .asm-ledger > .asm-units { grid-column: 1 / -1; }
.asm-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 12px; border-bottom: 1px solid var(--hairline); opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.5s var(--spring-soft); }
.asm-row.on { opacity: 1; transform: none; }
.asm-row .no { font: 600 14px/1 var(--sans); }
.asm-row > .slot:not(.num) { font-weight: 500; }
.asm-row .sg { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, var(--ground)); color: var(--muted); font: 500 16px/1 var(--sans); }
.asm-row .sg.neg { color: #d9473a; }
.asm-row b, .asm-row .num { font: 500 15px/1 var(--sans); text-align: right; font-variant-numeric: tabular-nums; }
.asm-row b.neg { color: #d9473a; }
.asm-row i { font-style: normal; color: var(--ink); text-align: center; font-weight: 700; }
.asm-row .q { color: var(--muted); }
.asm-row-blank .ph { color: var(--muted); white-space: nowrap; }
.asm-row-blank .ph.on { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.asm-units { display: flex; gap: 8px; margin-top: 16px; padding: 0 12px; }
.chip { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--green-tint); color: var(--green-ink); font: 600 13px/1 var(--sans); }

/* Rail, dots and entries all hang off --rail, so they stay together whatever the card's padding. */
.asm-card.asm-timeline { --rail: 30px; padding-left: calc(var(--rail) + 24px); }
.rail-label { position: absolute; left: calc(var(--rail) - 8px); top: 18px; font: 600 11px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.asm-rail { position: absolute; left: calc(var(--rail) - 1px); top: 44px; bottom: 30px; width: 2px; border-radius: 2px; background: var(--hairline); transform-origin: top; transform: scaleY(0); transition: transform 0.9s var(--spring-soft); }
.rail-on .asm-rail { transform: none; }
.asm-entry { position: relative; margin-top: 22px; opacity: 0; transform: translateX(14px); transition: opacity 0.3s, transform 0.55s var(--spring-soft); }
.asm-entry:first-of-type { margin-top: 30px; }
.asm-entry.on { opacity: 1; transform: none; }
.asm-when { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--serif); }
.asm-when .dot { position: absolute; left: -30px; width: 12px; height: 12px; border-radius: 50%; background: var(--ground); border: 2px solid var(--hairline); }
.asm-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--paper); color: var(--paper-ink); }
.asm-item .tile { width: 40px; height: 40px; border-radius: 12px; }
.asm-item .tile .glyph { width: 20px; height: 20px; }
.asm-name { font: 600 16px/1.2 var(--sans); }
.asm-item .chip { background: color-mix(in srgb, var(--paper-ink) 12%, var(--paper)); color: var(--paper-ink); }

/* Try it. */
.p-demo { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(36px, 6vw, 72px); border-radius: 36px; background: var(--app-wash); }
.p-demo .p-label { color: var(--ink); font-size: 15px; }
.p-demo-hint { margin: 0; font: 420 clamp(24px, 2.6vw, 34px)/1.25 var(--serif); }
:lang(zh-Hant) .p-demo-hint, :lang(zh-Hans) .p-demo-hint, :lang(ja) .p-demo-hint { font-weight: 600; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.45; }

/* WuShi's card, as on the item page: tile, kind, name, expiry, days left, slide to renew. */
.rcard { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 20px; border-radius: 28px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-lift); }
.rtile { width: 92px; height: 92px; border-radius: 22px; background: color-mix(in srgb, var(--paper-ink) 9%, var(--paper)); }
.rtile .glyph { width: 46px; height: 46px; stroke-width: 1.6; }
.rtext p { margin: 0; }
.rkind, .rlabel { font: 600 11.5px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.rname { font: 600 30px/1.1 var(--serif); margin: 2px 0 10px !important; }
.rdate { font: 600 22px/1.2 var(--sans); overflow: hidden; }
.rdate time { display: inline-block; }
.rdate time.roll { animation: roll 0.7s var(--spring-soft); }
@keyframes roll { 0% { transform: translateY(100%); filter: blur(6px); opacity: 0; } }
.rleft { font-size: 15px; opacity: 0.75; }
.slider { --p: 0; grid-column: 1 / -1; position: relative; height: 64px; border-radius: 999px; background: color-mix(in srgb, var(--paper-ink) 7%, var(--paper)); border: 1.5px solid color-mix(in srgb, var(--paper-ink) 12%, transparent); overflow: hidden; }
.slider::before { content: ""; position: absolute; inset: 0; width: calc(32px + var(--p) * (100% - 32px)); background: color-mix(in srgb, var(--paper-ink) 10%, transparent); }
.slider-track { position: absolute; inset: 0; display: grid; place-items: center; font: 600 17px/1 var(--sans); }
.slider-label, .slider-done { grid-area: 1 / 1; transition: opacity 0.3s, transform 0.5s var(--spring-soft); display: inline-flex; align-items: center; gap: 8px; }
.slider-label { opacity: calc(1 - var(--p) * 1.6); }
.slider-done { opacity: 0; transform: scale(0.8); }
.slider-done .glyph { width: 20px; height: 20px; }
.done .slider-done { opacity: 1; transform: none; }
.done .slider-label { opacity: 0; }
.knob { position: absolute; left: 4px; top: 4px; z-index: 1; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--paper-ink); color: var(--paper); cursor: grab; touch-action: none; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.4); }
.knob:active { cursor: grabbing; }
.knob .glyph { width: 24px; height: 24px; }
.done .knob { animation: spin 0.8s var(--spring-soft); }
@keyframes spin { to { rotate: 360deg; } }

/* WUJI's ledger: description, sign, amount × quantity; the total rolls. */
.ledger { padding: 22px; border-radius: 28px; background: var(--ground); box-shadow: var(--shadow-lift); }
.lrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lrows li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 34px 96px 12px 48px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; background: var(--tint); }
.lno { font: 500 12px/1 var(--mono); color: var(--muted); }
.lname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsign { width: 34px; height: 34px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, var(--ground)); color: var(--muted); font: 600 18px/1 var(--mono); cursor: pointer; transition: transform 0.4s var(--spring), background 0.2s; }
.lsign:active { transform: scale(0.82) rotate(180deg); }
.neg .lsign { color: #d9473a; }
.neg .lamt { color: #d9473a; }
.lrows input { width: 100%; height: 36px; padding: 0 8px; border: 1.5px solid transparent; border-radius: 10px; background: var(--ground); color: var(--ink); font: 500 15px/1 var(--mono); text-align: right; transition: border-color 0.2s; }
.lrows input:focus { outline: none; border-color: var(--green); }
.lx { color: var(--muted); text-align: center; }
.ltotal { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 12px; color: var(--ink); }
.ltotal > span { font: 700 15px/1 var(--sans); }
.ltotal .odo { color: var(--green-ink); }
.ltotal .odo { font: 500 clamp(32px, 4vw, 46px)/1 var(--mono); }
.lsplit { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0 4px 14px; border-bottom: 1px solid var(--hairline); color: var(--muted); font-size: 15px; }
.lsplit button { width: 30px; height: 30px; border: 1px solid var(--hairline); border-radius: 50%; background: var(--ground); color: var(--ink); cursor: pointer; font: 500 16px/1 var(--mono); transition: transform 0.25s var(--spring); }
.lsplit button:active { transform: scale(0.8); }
.lsplit output { min-width: 1.4em; text-align: center; color: var(--ink); font: 600 17px/1 var(--mono); }
.lsplit .odo { margin-left: auto; color: var(--ink); font: 600 20px/1 var(--mono); }
.ledger.bump .ltotal .odo { animation: bump 0.45s var(--spring); }
.odo { display: inline-flex; font-variant-numeric: tabular-nums; }
.od { display: inline-block; height: 1em; overflow: hidden; }
.od-t { display: flex; flex-direction: column; transition: transform 0.7s var(--spring-soft); }
.od-t span { height: 1em; line-height: 1; }
.os { line-height: 1; }

/* WuShi's ten kinds, as the app lays them out: five to a row, a tile each, the name below. */
.kinds { list-style: none; margin: 0 auto; padding: 0; max-width: 780px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px 18px; }
.kinds li { position: relative; display: grid; justify-items: center; gap: 12px; outline: none; cursor: default; }
.kind-tile { width: 100%; max-width: 124px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 27%; background: var(--paper); color: var(--paper-ink); box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.35); transition: transform 0.55s var(--spring-soft), box-shadow 0.4s; }
.kind-tile .glyph { width: 40%; height: 40%; stroke-width: 1.6; }
.kinds b { font: 500 15px/1.3 var(--sans); color: var(--muted); text-align: center; }
.kinds li:hover .kind-tile, .kinds li:focus-visible .kind-tile { transform: translateY(-6px) rotate(-4deg); box-shadow: 0 22px 34px -18px rgba(0, 0, 0, 0.4); }
.kind-eg {
  position: absolute; left: 50%; top: -10px; z-index: 2; translate: -50% -100%;
  padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--ground);
  font: 600 13px/1.3 var(--sans); white-space: nowrap; pointer-events: none;
  opacity: 0; scale: 0.85; transform-origin: 50% 100%; transition: opacity 0.2s, scale 0.4s var(--spring);
}
.kinds li:hover .kind-eg, .kinds li:focus-visible .kind-eg { opacity: 1; scale: 1; }
.kinds-more { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 34px 0 0; color: var(--muted); font-size: 15px; }
.kind-q { width: 40px; max-width: none; border-radius: 12px; background: var(--ink); color: var(--ground); font: 700 18px/1 var(--sans); box-shadow: none; }

/* Uses, features, facts. */
.p-block { padding-top: clamp(64px, 9vw, 110px); }
.uses, .features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.uses { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.uses li { display: grid; gap: 4px; padding: 20px; border-radius: 22px; background: var(--green-tint); color: var(--green-ink); transition: transform 0.5s var(--spring-soft), box-shadow 0.5s var(--ease), opacity 0.7s var(--ease), filter 0.7s var(--ease); }
.uses li:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-lift); }
.uses li b { font: 600 17px/1.3 var(--sans); }
.uses li span { font-size: 15px; opacity: 0.85; }
/* Every kind card the same height, the name and examples kept together, centred against the tile. */
.uses-kinds { grid-auto-rows: 1fr; }
.uses-kinds li.use-paper, .uses-kinds li.use-more { grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 14px; row-gap: 3px; padding: 14px; }
.uses-kinds li.use-paper { background: var(--paper); color: var(--paper-ink); }
.uses-kinds li > b { align-self: end; }
.uses-kinds li > span:not(.tile) { align-self: start; font-size: 14px; line-height: 1.4; }
.uses-kinds .tile { grid-row: 1 / span 2; align-self: center; width: 48px; height: 48px; border-radius: 14px; }
.uses-kinds li.use-more { background: var(--tint); color: var(--ink); }
.uses-kinds li.use-more > b { grid-row: 1 / span 2; align-self: center; }
@media (min-width: 560px) { .uses-kinds li.use-more { grid-column: span 2; } }
.use-more .tile { background: var(--ink); color: var(--ground); font: 700 22px/1 var(--sans); }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.features li { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--hairline); }
.features b { font: 600 19px/1.3 var(--sans); }
.features span { color: var(--muted); font-size: 16px; }
.p-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.p-facts > div { padding: 24px; border-radius: 24px; background: var(--tint); }
.p-facts h3 { margin: 0 0 8px; font: 600 15px/1.3 var(--sans); }
.p-facts p { margin: 0; color: var(--muted); font-size: 15px; }

/* Questions. */
.p-faq details { border-top: 1px solid var(--hairline); padding: 20px 0; }
.p-faq details:last-of-type { border-bottom: 1px solid var(--hairline); }
.p-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 600 18px/1.35 var(--sans); }
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq summary::after { content: "+"; font: 400 24px/1 var(--mono); color: var(--muted); transition: rotate 0.4s var(--spring); }
.p-faq details[open] summary::after { rotate: 45deg; }
.faq-a { overflow: hidden; }
.faq-a p { margin: 12px 0 0; color: var(--muted); max-width: 46em; }

/* The other app, as a big word to follow. */
.p-next { display: grid; justify-items: center; gap: 10px; margin-top: clamp(80px, 12vw, 160px); padding: 40px 0; text-decoration: none; }
.p-next-word { font-size: clamp(64px, 14vw, 200px); }
.p-next-line { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 17px; }
.p-next .glyph { width: 20px; height: 20px; transition: translate 0.3s var(--ease); }
.p-next:hover .glyph { translate: 6px 0; }

/* ---------- contact, docs, footer ---------- */

.contact { max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 12vw, 150px) var(--gutter) 24px; text-align: center; }
.contact p { color: var(--muted); font-size: 19px; margin: 18px auto 22px; max-width: 32em; }
.mail { display: inline-block; font: 420 clamp(28px, 4.4vw, 56px)/1.15 var(--serif); color: var(--ink); text-decoration-thickness: 1.5px; transition: color 0.2s; }
.mail:hover { color: var(--green-ink); }

.doc { max-width: 740px; margin: 0 auto; padding: 56px var(--gutter) 40px; }
.doc h1 { font: 420 clamp(38px, 5vw, 58px)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 18px; }
:lang(zh-Hant) .doc h1, :lang(zh-Hans) .doc h1, :lang(ja) .doc h1 { font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.doc h2 { font: 600 22px/1.3 var(--sans); margin: 46px 0 12px; }
.doc h3 { font: 600 18px/1.3 var(--sans); margin: 26px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc-lede { font-size: 19px; }
.prevail { margin-top: 48px; padding: 14px 18px; border-radius: 14px; background: var(--tint); font-size: 14px; }
.doc details { border-top: 1px solid var(--hairline); padding: 16px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--hairline); }
.doc summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 600 18px/1.35 var(--sans); }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); transition: rotate 0.25s; }
.doc details[open] summary::after { rotate: 45deg; }
.doc details p { margin: 12px 0 0; }

.foot { max-width: var(--wrap); margin: 96px auto 0; padding: 0 var(--gutter) 48px; }
.foot-mark { font: 700 clamp(64px, 17vw, 236px)/0.8 var(--sans); letter-spacing: 0.06em; color: transparent; -webkit-text-stroke: 1.5px var(--hairline); text-align: center; margin-bottom: 48px; user-select: none; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.foot-cols a { display: block; margin: 8px 0; color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: var(--ink); }
.foot-title { margin: 0 0 12px; font: 600 15px/1 var(--sans); }
.foot-line { margin: 40px 0 0; color: var(--muted); font: 400 13px/1 var(--mono); }
.foot-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- motion helpers ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.split-words .w { display: inline-block; opacity: 0; transform: translateY(0.4em); transition: opacity 0.7s ease, transform 0.8s var(--ease); transition-delay: calc(var(--wi) * 50ms); }
.split-words.is-in .w { opacity: 1; transform: none; }

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .asm-stage { grid-template-columns: 1fr; align-content: center; }
  .type-hero { height: 320svh; }
  .type-stage { padding-top: 84px; justify-content: flex-start; padding-block-start: max(96px, 18svh); }
  .type-caps { min-height: 230px; }
  .screen-panes { grid-template-columns: 1fr; min-height: 0; }
  .timeline-col { padding: 22px 18px; }
  .detail-col { position: absolute; inset: auto 0 0 0; z-index: 6; padding: 0; border: 0; background: none; }
  .detail-empty { display: none; }
  .pop .detail { border-radius: 28px 28px 0 0; box-shadow: 0 -20px 40px -10px rgba(0, 0, 0, 0.25); }
  .calc { grid-template-columns: 1fr; }
  .app, .app-wuji { grid-template-columns: 1fr; grid-template-areas: "head" "lede" "glimpse" "foot"; }
  .app > .glimpse { margin-bottom: 32px; }
  .calc-chart svg { max-width: 200px; }
  .row { grid-template-columns: 24px minmax(0, 1fr) 32px 84px 14px 44px; gap: 4px; }
  .tile-big { width: 76px; height: 76px; }
  .tile-big .glyph { width: 34px; height: 34px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .app-head { align-items: flex-start; }
  .app-icon { width: 68px; height: 68px; border-radius: 17px; }
  .badge { margin: 8px 0 0; display: table; }
}

@media (max-width: 640px) {
  .asm-stage { grid-template-columns: 1fr; align-content: center; gap: 22px; padding: 76px 0 20px; }
  .asm-text { font-size: 17px; line-height: 1.65; }
  .asm-card { padding: 16px; }
  .asm-card.asm-timeline { --rail: 24px; }
  .asm-ledger { column-gap: 7px; }
  .asm-row { padding: 10px 6px; }
  .kinds { gap: 20px 10px; }
  .kinds b { font-size: 12px; }
  .kind-tile { border-radius: 24%; }
  .cap-get .qr, .p-cta .qr { display: none; }
  .features, .p-facts { grid-template-columns: 1fr; }
  .p-demo { grid-template-columns: 1fr; padding: 24px 18px; border-radius: 28px; }
  .lrows li { grid-template-columns: 18px minmax(0, 1fr) 30px 76px 10px 40px; gap: 6px; padding: 6px 8px; }
  .rtile { width: 68px; height: 68px; }
  .rname { font-size: 24px; }
  .mark span, .nav-app span, .top nav .nav-text { display: none; }
  .mark { padding: 0 4px 0 0; }
  .nav-app { padding: 0 6px !important; }
  .nav-app img { width: 28px; height: 28px; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split-words .w { opacity: 1; transform: none; }
}
