/* Multiculator · 混算器
   Layout: one long page that follows the film. The lockup (name around the core) opens it; then the two
   halves of the name each get an act, "Multi-" (the home that splits) and "-culator" (say it, filled in).
   English follows the dark landscape film; Chinese follows the light 混 / 算 / 器 film. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "MC Hei";
  src: url("/assets/fonts/mc-hei-black.woff") format("woff");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* ground and ink (the film's near-black with a blue cast) */
  --bg: #06080e;
  --bg2: #0a0d17;
  --ink: #f4f7fc;
  --ink2: rgba(206, 216, 234, 0.8);
  --ink3: rgba(206, 216, 234, 0.56);
  --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.045);
  --card-rim: rgba(255, 255, 255, 0.13);
  --card-shadow: 0 0 0 rgba(0, 0, 0, 0);
  --field: rgba(255, 255, 255, 0.07);
  --ghost: rgba(244, 247, 252, 0.13);
  --nav: rgba(8, 10, 17, 0.66);
  /* the app's four section colours (dark-mode set) */
  --classic: #4c9aff;
  --life: #30d158;
  --finance: #ff9f0a;
  --custom: #ff375f;
  --accent: #4c9aff;
  --on-accent: #06101f;
  /* solid result cards (Chinese film) carry white type */
  --solid-classic: #1b6fe0;
  --solid-life: #1f8f3a;
  --solid-finance: #c46c00;
  --solid-custom: #d81f48;
  /* the home-screen glass */
  --pane: rgba(11, 14, 22, 0.55);
  --pane-rim: rgba(255, 255, 255, 0.2);
  --key: rgba(255, 255, 255, 0.06);
  --key-rim: rgba(255, 255, 255, 0.07);
  --key-shadow: none;
  --socket: rgba(255, 255, 255, 0.035);
  --dock: rgba(24, 24, 30, 0.86);
  --hub: rgba(14, 18, 28, 0.72);
  --hub-rim: rgba(255, 255, 255, 0.34);
  --hub-sheen: rgba(255, 255, 255, 0.13);
  --tick: rgba(255, 255, 255, 0.5);
  --tick2: rgba(255, 255, 255, 0.24);
  --plate: rgba(255, 255, 255, 0.06);
  --plate-rim: rgba(255, 255, 255, 0.16);
  --plate-shadow: none;
  --arc-glow: 0.3;
  --orb: 0.8;
  --aurora: 0.42;
  --frame: #05060a;

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-zh: "Geist", "MC Hei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.35, 0.5, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --bg2: #e4eaf3;
  --ink: #12203a;
  --ink2: rgba(18, 32, 58, 0.74);
  --ink3: rgba(18, 32, 58, 0.56);
  --line: rgba(18, 32, 58, 0.1);
  --card: rgba(255, 255, 255, 0.72);
  --card-rim: rgba(255, 255, 255, 1);
  --card-shadow: 0 10px 30px rgba(26, 43, 76, 0.08);
  --field: rgba(18, 32, 58, 0.06);
  --ghost: rgba(18, 32, 58, 0.1);
  --nav: rgba(243, 246, 251, 0.7);
  --classic: #1973e8;
  --life: #28a745;
  --finance: #f08a00;
  --custom: #e5254e;
  --accent: #1973e8;
  --on-accent: #ffffff;
  --pane: rgba(255, 255, 255, 0.56);
  --pane-rim: rgba(255, 255, 255, 0.95);
  --key: rgba(255, 255, 255, 0.78);
  --key-rim: rgba(255, 255, 255, 0.95);
  --key-shadow: 0 2px 6px rgba(26, 43, 76, 0.08);
  --socket: rgba(255, 255, 255, 0.3);
  --dock: rgba(255, 255, 255, 0.92);
  --hub: rgba(255, 255, 255, 0.72);
  --hub-rim: rgba(18, 32, 58, 0.14);
  --hub-sheen: rgba(255, 255, 255, 0.8);
  --tick: rgba(18, 32, 58, 0.42);
  --tick2: rgba(18, 32, 58, 0.2);
  --plate: rgba(255, 255, 255, 0.86);
  --plate-rim: rgba(18, 32, 58, 0.08);
  --plate-shadow: 0 3px 8px rgba(26, 43, 76, 0.14);
  --arc-glow: 0.18;
  --orb: 0.42;
  --aurora: 0.3;
  --frame: #12141a;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* ───────── navigation ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--nav);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1160px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; font-size: 17px; white-space: nowrap; }
.brand img { width: 28px; height: 28px; animation: turn 24s linear infinite; }
.brand-zh { display: none; font-family: var(--font-zh); font-weight: 900; font-size: 18px; }
[data-lang="zh"] .brand-zh { display: inline; }
[data-lang="zh"] .brand-en { display: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink2); font-size: 15px; padding: 7px 11px; border-radius: 9px; white-space: nowrap; transition: color 0.2s, background-color 0.2s; }
.nav-links a:hover { color: var(--ink); background: var(--field); }
.nav-tools { display: flex; align-items: center; gap: 8px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--field); }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 5px 10px; font-size: 13.5px; font-weight: 600; color: var(--ink2); line-height: 1.3; min-width: 38px; transition: background-color 0.2s, color 0.2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg-lg button { padding: 8px 0; width: 52px; font-size: 16px; font-variant-numeric: tabular-nums; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--field); display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: opacity 0.3s, transform 0.5s var(--ease); }
.icon-btn .i-moon { fill: currentColor; stroke: none; }
[data-theme="dark"] .i-sun, [data-theme="light"] .i-moon { opacity: 0; transform: rotate(-70deg) scale(0.6); }

.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; border-radius: 14px; padding: 13px 22px; font-size: 16px; line-height: 1.2; white-space: nowrap; transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 34%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { background: var(--field); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: color-mix(in srgb, var(--field) 60%, var(--ink) 10%); }
.btn-sm { padding: 8px 13px; font-size: 14px; border-radius: 11px; background: var(--accent); color: var(--on-accent); }

/* ───────── the core (disc): glass, 60 ticks, four arcs, the two phoenixes ───────── */
.disc {
  --d: 200px;
  position: relative; display: inline-block; flex: none;
  width: var(--d); height: var(--d); border-radius: 50%;
  background: linear-gradient(180deg, var(--hub-sheen), transparent 55%), var(--hub);
  box-shadow: inset 0 0 0 1px var(--hub-rim), 0 18px 50px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.disc > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.disc .tk { stroke: var(--tick2); stroke-width: 1.3; }
.disc .tk.major { stroke: var(--tick); stroke-width: 2; }
.disc .arc { fill: none; stroke-linecap: round; stroke-width: 5.4; transition: stroke-dashoffset 0.6s var(--ease), opacity 0.4s; }
.disc .arc-glow { fill: none; stroke-linecap: round; stroke-width: 14; opacity: var(--arc-glow); transition: opacity 0.4s; }
.disc-plate { position: absolute; inset: 16.3%; border-radius: 50%; background: var(--plate); box-shadow: inset 0 0 0 1px var(--plate-rim), var(--plate-shadow); }
.disc-phx { position: absolute; inset: 22.2%; animation: turn 24s linear infinite; }
.disc-phx img { width: 100%; height: 100%; }
/* in the home, the phoenix takes the colours of the sections that are on, by position */
.disc-phx.tinted { inset: 18.2%; -webkit-mask: url("/assets/img/phoenix-mask.webp") center / 100% 100% no-repeat; mask: url("/assets/img/phoenix-mask.webp") center / 100% 100% no-repeat; }
.disc-phx.tinted i { position: absolute; inset: -4%; border-radius: 50%; background: var(--fill, var(--classic)); animation: turn 24s linear infinite reverse; }
@keyframes turn { to { transform: rotate(360deg); } }

/* ───────── hero ───────── */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(64px, 12vh, 132px) clamp(64px, 10vh, 112px); }
.aurora { position: absolute; inset: -10% -20% 0; z-index: -1; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); opacity: var(--aurora); filter: blur(60px) saturate(120%); pointer-events: none; }
.aurora i { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: 4%; top: -18%; background: radial-gradient(closest-side, var(--classic), transparent); }
.aurora i:nth-child(2) { right: 4%; top: -22%; background: radial-gradient(closest-side, var(--life), transparent); animation-delay: -7s; }
.aurora i:nth-child(3) { left: 0; bottom: -34%; background: radial-gradient(closest-side, var(--custom), transparent); animation-delay: -13s; }
.aurora i:nth-child(4) { right: 0; bottom: -30%; background: radial-gradient(closest-side, var(--finance), transparent); animation-delay: -19s; }
@keyframes drift { from { transform: translate3d(-4%, -3%, 0) scale(1); } to { transform: translate3d(5%, 4%, 0) scale(1.12); } }

.lockup { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.6vw, 22px); font-size: clamp(40px, 10.2vw, 132px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; white-space: nowrap; }
.lockup .disc { --d: 1.42em; }
.lock-a, .lock-b { display: inline-block; }
.lock-a { animation: in-left 1s var(--ease) both; }
.lock-b { animation: in-right 1s var(--ease) both; }
.lockup .disc { animation: in-disc 1.1s var(--spring) both; }
@keyframes in-left { from { transform: translateX(-0.9em); opacity: 0; } }
@keyframes in-right { from { transform: translateX(0.9em); opacity: 0; } }
@keyframes in-disc { from { transform: scale(0.6) rotate(-40deg); opacity: 0; } }
.hero-tag { margin-top: clamp(26px, 4vw, 44px); font-size: clamp(19px, 2.3vw, 27px); font-weight: 550; letter-spacing: -0.01em; }
.hero-sub { margin-top: 6px; font-size: 15px; color: var(--ink3); }
.cta-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { margin-top: 18px; font-size: 14.5px; color: var(--ink3); max-width: 40ch; }

/* Chinese lockup: the core above the three characters, as in the 混算器 film */
[data-lang="zh"] .lockup { flex-direction: column; gap: clamp(18px, 3vw, 30px); font-family: var(--font-zh); font-weight: 900; letter-spacing: 0.02em; font-size: clamp(64px, 13vw, 148px); }
[data-lang="zh"] .lockup .disc { order: -1; --d: clamp(150px, 22vw, 230px); }
[data-lang="zh"] .lock-a { animation-name: in-up; }
[data-lang="zh"] .lock-b { display: none; }
[data-lang="zh"] .hero-tag { font-weight: 600; letter-spacing: 0.08em; }
[data-lang="zh"] .hero-sub { letter-spacing: 0.42em; font-size: 12px; margin-top: 12px; padding-left: 0.42em; }
@keyframes in-up { from { transform: translateY(0.4em); opacity: 0; } }

/* ───────── acts ───────── */
.act { position: relative; padding-block: clamp(72px, 11vw, 136px); }
.act + .act { border-top: 1px solid var(--line); }
.act-head { max-width: 760px; }
.act-head.center { margin-inline: auto; text-align: center; }
.act h2, .end h2 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; text-wrap: balance; }
.lede { margin-top: 18px; font-size: clamp(17px, 1.5vw, 19.5px); color: var(--ink2); max-width: 62ch; text-wrap: pretty; }
.act-head.center .lede { margin-inline: auto; }
.fine { font-size: 14px; color: var(--ink3); }
.ctl-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink3); }
[data-lang="zh"] .ctl-label { letter-spacing: 0.12em; }
[data-lang="zh"] .act h2, [data-lang="zh"] .end h2, [data-lang="zh"] .burst-title { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0; line-height: 1.2; }
[data-lang="zh"] .act h2 { white-space: pre-line; font-size: clamp(28px, 4vw, 50px); }
[data-lang="zh"] body { line-height: 1.75; }

/* the giant word behind each act: frosted English halves, or the film's three characters */
.ghost { font-size: clamp(76px, 15.5vw, 212px); font-weight: 750; letter-spacing: -0.05em; line-height: 0.86; color: var(--ghost); margin-bottom: -0.16em; margin-left: -0.04em; user-select: none; white-space: nowrap; }
[data-lang="zh"] .ghost { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0; font-size: clamp(120px, 20vw, 250px); line-height: 1; margin: 0 0 6px -0.06em; width: 1em; -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-lang="zh"] .g-multi { background-image: conic-gradient(from 200deg at 46% 54%, #e5254e, #f08a00, #f5c400, #28a745, #1973e8, #7a3ff2, #e5254e); }
[data-lang="zh"] .g-cul { background-image: linear-gradient(var(--ink), var(--ink)); }
[data-lang="zh"] .g-yours { position: relative; height: 0.92em; background: none; }
/* Colour only the four mouths. The mask uses the existing headline font's outline. */
[data-lang="zh"] .g-yours::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(#1973e8, #1973e8),
    linear-gradient(#28a745, #28a745),
    linear-gradient(#ff375f, #ff375f),
    linear-gradient(#ff9f0a, #ff9f0a);
  background-repeat: no-repeat;
  /* Font coordinates mapped into the mask's 1000 × 920 viewBox. */
  background-size: 0.344em 0.303em, 0.358em 0.303em, 0.345em 0.321em, 0.357em 0.321em;
  background-position: 0.116em 0.004em, 0.532em 0.004em, 0.116em 0.594em, 0.534em 0.594em;
  -webkit-mask: url('/assets/img/qi-mask.svg') center / 100% 100% no-repeat;
  mask: url('/assets/img/qi-mask.svg') center / 100% 100% no-repeat;
}

.act-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.act-copy { min-width: 0; }
.split-ctl { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.legend { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; max-width: 520px; }
.legend li { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: center; transition: opacity 0.4s; }
.legend li.off { opacity: 0.32; }
.legend .badge { grid-row: span 2; }
.legend b { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.legend b span { color: var(--c); font-variant-numeric: tabular-nums; margin-left: 5px; font-weight: 600; }
.legend small { font-size: 13.5px; color: var(--ink3); }
.legend + .fine { margin-top: 22px; }
.badge { width: 30px; height: 30px; border-radius: 9px; background: var(--c); display: grid; place-items: center; flex: none; }
.badge svg { width: 19px; height: 19px; fill: #fff; }
[data-sec="classic"] { --c: var(--classic); --solid: var(--solid-classic); }
[data-sec="life"] { --c: var(--life); --solid: var(--solid-life); }
[data-sec="finance"] { --c: var(--finance); --solid: var(--solid-finance); }
[data-sec="custom"] { --c: var(--custom); --solid: var(--solid-custom); }

/* ───────── the home screen, laid out by the app's own layout function ───────── */
.act-stage { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone { position: relative; width: min(100%, 372px); aspect-ratio: 393 / 846; }
.phone-scale { position: absolute; left: 0; top: 0; width: 393px; height: 846px; transform-origin: 0 0; transform: scale(var(--k, 0.9466)); }
.home { position: absolute; inset: 0; font-family: var(--font); }
[data-lang="zh"] .home { font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.phone-orbs { position: absolute; inset: 0; filter: blur(46px); opacity: var(--orb); pointer-events: none; }
.phone-orbs i { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; margin: -31% 0 0 -31%; background: radial-gradient(closest-side, var(--c), transparent); transition: left 0.7s var(--ease), top 0.7s var(--ease), opacity 0.5s; }
/* Chinese film: the home sits in an iPhone */
[data-lang="zh"] .phone::before { content: ""; position: absolute; inset: -3.2% -4.6% -2.4%; border-radius: 15% / 7%; background: var(--bg); box-shadow: 0 0 0 calc(var(--k, 1) * 9px) var(--frame), 0 30px 70px rgba(18, 32, 58, 0.28); }
[data-lang="zh"] .phone-orbs { clip-path: inset(-3.2% -4.6% -2.4% round 13% / 6.4%); }
[data-lang="zh"] .phone { width: min(84%, 330px); margin-block: 30px 34px; }

.panes { position: absolute; left: 0; top: 0; width: 393px; height: 758px; overflow: visible; }
.panes path { fill: var(--pane); stroke: var(--pane-rim); stroke-width: 1; transition: opacity 0.22s; }
.panes .tint { stroke: none; }
.bar { position: absolute; left: 0; top: 0; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 4px; transition: transform 0.6s var(--ease), opacity 0.3s, width 0.6s var(--ease); }
.bar .badge { width: 22px; height: 22px; border-radius: 7px; }
.bar .badge svg { width: 15px; height: 15px; }
.bar b { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.bar em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--ink3); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 2px; }
.bar em svg { width: 13px; height: 13px; fill: currentColor; opacity: 0.7; }
.tile, .socket { position: absolute; left: 0; top: 0; border-radius: 15px; }
.socket { background: var(--socket); transition: opacity 0.3s; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--key); box-shadow: inset 0 0 0 1px var(--key-rim), var(--key-shadow);
  border: 0; padding: 0; color: var(--ink);
  transition: transform 0.62s var(--spring), width 0.5s var(--ease), height 0.5s var(--ease), opacity 0.3s, background-color 0.2s;
  will-change: transform;
}
.tile svg { width: 22px; height: 22px; fill: var(--c); flex: none; }
.tile span { font-size: 12.5px; font-weight: 650; line-height: 1.1; white-space: nowrap; letter-spacing: 0; }
.tile.long span { font-size: 10.6px; letter-spacing: -0.02em; }
.tile:hover, .tile:focus-visible { background: color-mix(in srgb, var(--c) 22%, var(--key)); }
.tile.gone { opacity: 0; pointer-events: none; }
.hub { position: absolute; left: 0; top: 0; transition: transform 0.6s var(--ease); }
.hub .disc { display: block; box-shadow: inset 0 0 0 1px var(--hub-rim), 0 6px 18px rgba(0, 0, 0, 0.2); }
.dock { position: absolute; left: 16px; top: 772px; width: 361px; height: 62px; border-radius: 28px; background: var(--dock); box-shadow: inset 0 0 0 1px var(--card-rim), 0 6px 16px rgba(26, 43, 76, 0.12); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.dock > span { width: 52px; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink3); }
.dock > span svg { width: 21px; height: 21px; fill: currentColor; }
.dock .say-btn { width: 216px; height: 48px; border-radius: 22px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 17px; font-weight: 700; }
.dock .say-btn svg { width: 18px; height: 18px; fill: #fff; }
.dock .say-btn .mic { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: grid; place-items: center; }
.tile-cap { min-height: 1.5em; font-size: 14px; color: var(--ink3); text-align: center; }
.tile-cap b { color: var(--ink); font-weight: 600; }

/* ───────── say it ───────── */
.say { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 22px; align-items: stretch; }
.say-left, .say-right { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.say-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; border-radius: 999px; padding: 8px 14px; font-size: 14.5px; font-weight: 600; background: var(--field); color: var(--ink2); display: inline-flex; align-items: center; gap: 7px; transition: background-color 0.2s, color 0.2s; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 20%, var(--field)); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.say-sheet { flex: 1; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rim), var(--card-shadow); padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.say-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink3); font-weight: 600; }
.say-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); }
.say.listening .say-status .dot { background: var(--custom); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.say-text { margin-block: auto; font-size: clamp(24px, 2.9vw, 36px); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; min-height: 2.5em; text-wrap: balance; }
.say-text .w { opacity: 0.3; transition: opacity 0.25s; }
.say-text .w.on { opacity: 1; }
.say-mic { margin-top: auto; display: flex; align-items: center; gap: 16px; }
.wave { flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.mic-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: background-color 0.3s, transform 0.3s var(--spring); }
.mic-btn svg { width: 24px; height: 24px; fill: #fff; }
.say.listening .mic-btn { background: var(--custom); transform: scale(1.08); }
.wave i { width: 3px; border-radius: 2px; background: var(--accent); height: 12%; opacity: 0.55; transition: height 0.3s; }
.say.listening .wave i { animation: wave 0.7s ease-in-out infinite alternate; opacity: 1; }
@keyframes wave { from { height: 12%; } to { height: var(--h, 70%); } }
.say-route { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink2); min-height: 30px; transition: opacity 0.3s; }
.say-route .badge { width: 24px; height: 24px; border-radius: 8px; }
.say-route .badge svg { width: 15px; height: 15px; }
.say-route b { color: var(--ink); font-weight: 650; }
.say.listening .say-route { opacity: 0; }

.res { flex: 1; border-radius: 26px; padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 250px;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%), var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 34%, var(--card-rim)), var(--card-shadow);
  animation: card-in 0.5s var(--spring) both; }
@keyframes card-in { from { transform: scale(0.94); opacity: 0; } }
.res-q { font-size: 15px; color: var(--ink2); }
.res-v { font-size: clamp(40px, 6vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.res-sub { font-size: 15px; color: var(--ink3); }
[data-lang="zh"] .res-v { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0; font-size: clamp(38px, 5.2vw, 68px); }
[data-lang="zh"] .res.solid { background: var(--solid); box-shadow: none; color: #fff; align-items: center; text-align: center; }
[data-lang="zh"] .res.solid .res-q, [data-lang="zh"] .res.solid .res-sub { color: rgba(255, 255, 255, 0.86); }

/* the live mortgage card */
.loan { flex: 1; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rim), var(--card-shadow); padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; animation: card-in 0.5s var(--spring) both; }
.loan-top { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.loan-top .badge { width: 24px; height: 24px; border-radius: 8px; }
.loan-top .badge svg { width: 15px; height: 15px; }
.loan-top small { margin-left: auto; font-weight: 500; font-size: 13px; color: var(--ink3); text-align: right; }
.loan-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; font-size: 15px; }
.loan-row label { color: var(--ink2); }
.loan-row output { font-weight: 650; font-variant-numeric: tabular-nums; }
.loan-row output small { font-weight: 500; color: var(--ink3); font-size: 12.5px; margin-left: 4px; }
.loan-row input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--finance); height: 22px; margin: 0; }
.loan-terms { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.loan-terms button { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 600; background: var(--field); color: var(--ink2); font-variant-numeric: tabular-nums; }
.loan-terms button[aria-pressed="true"] { background: var(--finance); color: #201300; }
.loan .seg { width: 100%; }
.loan .seg button { flex: 1; padding: 7px 8px; font-size: 13.5px; }
.loan-res { border-radius: 18px; padding: 16px 18px; background: radial-gradient(130% 140% at 100% 0%, color-mix(in srgb, var(--finance) 34%, transparent), transparent 62%), var(--field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--finance) 30%, transparent); }
.loan-res .k { font-size: 13.5px; color: var(--ink2); }
.loan-res .v { font-size: clamp(34px, 4.4vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.loan-res .v small { font-size: 0.36em; font-weight: 700; color: var(--finance); letter-spacing: 0.02em; margin-left: 6px; }
.loan-res dl { margin-top: 10px; display: grid; gap: 4px; font-size: 14px; }
.loan-res dl div { display: flex; justify-content: space-between; gap: 12px; }
.loan-res dt { color: var(--ink3); }
.loan-res dd { font-weight: 600; font-variant-numeric: tabular-nums; }

.burst-title { margin-top: clamp(56px, 8vw, 88px); font-size: clamp(22px, 2.6vw, 30px); font-weight: 650; letter-spacing: -0.02em; }
.burst { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rc { min-width: 0; border-radius: 22px; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 3px; min-height: 148px;
  background: radial-gradient(130% 130% at 100% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%), var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, var(--card-rim)), var(--card-shadow); }
.rc:nth-child(n + 5) { grid-column: span 2; }
.rc-k { font-size: 13px; font-weight: 650; color: var(--c); letter-spacing: 0.01em; }
.rc-q { font-size: 14.5px; color: var(--ink2); }
.rc-v { margin-top: auto; padding-top: 14px; font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rc-v:lang(zh-Hans) { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; }
[data-lang="zh"] .rc { background: var(--solid); box-shadow: none; color: #fff; }
[data-lang="zh"] .rc-k { color: #fff; }
[data-lang="zh"] .rc-q { color: rgba(255, 255, 255, 0.88); }

/* ───────── yours ───────── */
.yours-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.yc { min-width: 0; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-rim), var(--card-shadow); padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 8px; }
.yc h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
[data-lang="zh"] .yc h3 { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0; font-size: 23px; }
.yc > p { color: var(--ink2); font-size: 15.5px; max-width: 48ch; }
.yc-more { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink3); font-weight: 600; min-width: 0; }
.field input { width: 100%; min-width: 0; border: 0; border-radius: 12px; padding: 11px 13px; background: var(--field); font-size: 16px; font-weight: 600; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.field input:focus-visible { outline-offset: 0; }
.rename-demo, .formula-demo { margin-top: auto; padding-top: 18px; display: grid; gap: 14px; }
.bar-demo { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 12px 14px; background: radial-gradient(120% 200% at 0% 100%, color-mix(in srgb, var(--custom) 26%, transparent), transparent 70%), var(--field); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--custom) 26%, transparent); }
.bar-demo .badge { width: 28px; height: 28px; }
.bar-name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
.bar-count { margin-left: auto; color: var(--ink3); font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.f-eq { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--custom); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--custom) 10%, var(--field)); overflow-wrap: anywhere; }
.f-sigma { font-weight: 700; }
.f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.f-out { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink2); font-size: 15px; }
.f-out output { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--custom); font-variant-numeric: tabular-nums; }
.shelf { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.shelf li { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 550; padding: 7px 13px 7px 10px; border-radius: 999px; background: var(--field); }
.shelf li::before { content: "+"; color: var(--c); font-weight: 700; }

/* ───────── film ───────── */
.act-film { padding-block: clamp(16px, 2vw, 28px); }
.act-film > .wrap { max-width: 1600px; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
.film-frame { position: relative; border-radius: clamp(10px, 1.4vw, 20px); overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 0 0 1px var(--line); }
.film-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ───────── privacy ───────── */
.priv-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.text-link { display: inline-block; margin-top: 22px; font-weight: 600; color: var(--accent); text-decoration: none; }
.text-link:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.priv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.priv-list > div { padding: 20px 0 22px; border-top: 1px solid var(--line); }
.priv-list dt { font-weight: 650; font-size: 17.5px; letter-spacing: -0.01em; }
.priv-list dd { margin-top: 6px; color: var(--ink2); font-size: 15.5px; }

/* ───────── close and footer ───────── */
.end { position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); }
.end-in { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(72px, 11vw, 128px); }
.end .disc { --d: 112px; margin-bottom: 30px; }
.foot { border-top: 1px solid var(--line); padding-block: 30px calc(34px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--ink3); }
.foot-in { display: grid; gap: 18px; }
.foot-clin { max-width: 78ch; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ───────── scroll reveal (content is visible without it) ───────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ───────── narrower screens ───────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .act-grid, .priv-grid { grid-template-columns: minmax(0, 1fr); }
  .say { grid-template-columns: minmax(0, 1fr); }
  .burst { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-stage { order: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-cta { display: none; }
  .nav-in { gap: 10px; }
  .yours-grid { grid-template-columns: minmax(0, 1fr); }
  .priv-list { grid-template-columns: minmax(0, 1fr); }
  .legend { gap: 12px 14px; }
  .legend b { font-size: 15.5px; }
  .legend small { font-size: 12.5px; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
  .rc { min-height: 128px; padding: 15px 16px 17px; }
  .say-sheet, .res { min-height: 210px; }
  .f-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .brand-en { display: none; }
  .legend { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* the closing aurora fades at both edges; on phones the lights are larger so they still read */
.aurora-end { -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent); }
@media (max-width: 640px) {
  .aurora i { width: 86%; }
  .aurora i:nth-child(1) { left: -20%; top: -8%; }
  .aurora i:nth-child(2) { right: -24%; top: -10%; }
  .aurora i:nth-child(3) { left: -26%; bottom: -8%; }
  .aurora i:nth-child(4) { right: -22%; bottom: -6%; }
}
