/* FinTelli · fintelli-ai.com
 * Two voices: Figtree is the firm (headings, body, every sentence a person says); the mono stack is the machine
 * (the game HUD, levels, form codes, labels). FinTelli keeps its plum; the DaoBrew family shows in the cream paper,
 * the 3px ink outline with a hard shadow, and yellow for the moment a person decides.
 * Colour means something in the run: violet = you, plum = agents, ink = the rule engine, yellow = the CPA, green = cleared.
 */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('../fonts/figtree-latin.woff2') format('woff2'); }

:root {
  --ink: #2c1c42; --ink-2: #493769; --text: #2a2533; --muted: #5d566a;
  --paper: #f7f2e7; --paper-2: #f1eadb; --surface: #fffdfa; --line: #ddd5c4;
  --accent: #62518b; --accent-2: #8a76b8; --tint: #efe9f6; --tint-2: #ddd2ea;
  --client: #9b7fd4; --client-soft: #ece4fa;
  --yellow: #ffc91f; --yellow-soft: #fff0bd;
  --ok: #17734a; --ok-bright: #22a565; --ok-soft: #dcf2e5;
  --focus: #6b4fd8;
  --bd: 3px solid var(--ink); --bd-sm: 2.5px solid var(--ink);
  --sh: 6px 6px 0 var(--ink); --sh-sm: 3px 3px 0 var(--ink);
  --r-panel: 16px; --r-ctl: 10px;
  --e-out: cubic-bezier(.22, 1, .36, 1);
  --font: 'Figtree', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, Menlo, Consolas, 'PingFang SC', 'Noto Sans SC', monospace;
  --nav-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 14px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.game__hud :focus-visible, .xp :focus-visible { outline-color: #fff; }
:lang(zh) :is(h1, h2, h3), :lang(zh) .cap__t { letter-spacing: 0; line-height: 1.22; word-break: keep-all; overflow-wrap: break-word; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--surface); border: var(--bd); border-radius: var(--r-ctl); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 10px; }

/* ---------- buttons, sticker, kicker ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 22px; border: var(--bd); border-radius: var(--r-ctl); font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap; transition: transform .15s var(--e-out), box-shadow .15s var(--e-out), background .15s; }
.btn--primary { background: var(--ink); color: #fff; box-shadow: 5px 5px 0 var(--yellow); }
.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--yellow); }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.btn--ghost:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn--primary:active, .btn--ghost:active { transform: translate(3px, 3px); box-shadow: 0 0 0 transparent; }
.btn--solid { background: var(--ink); color: #fff; border-width: 2.5px; }
.btn--solid:hover { background: var(--accent); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: .9375rem; }
.btn svg { flex: none; }
.btn--wechat { min-height: 44px; padding: 0 14px; border-width: 2.5px; background: #e9f7ee; color: var(--ink); font-size: .92rem; }
.btn--wechat svg { color: #07a14a; }
.btn--wechat:hover { background: #d6f0e0; }
html[lang="zh-Hans"] .hero__cta .btn--wechat { order: -1; min-height: 50px; padding: 0 20px; border-width: 3px; background: #07c160; color: var(--ink); font-size: 1rem; box-shadow: 5px 5px 0 var(--ink); }
html[lang="zh-Hans"] .hero__cta .btn--wechat svg { color: var(--ink); }
html[lang="zh-Hans"] .hero__cta .btn--primary { box-shadow: var(--sh-sm); }
.copy { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none; font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 80; max-width: calc(100% - 32px); padding: 12px 18px; background: var(--ink); color: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--yellow); font-weight: 650; transform: translate(-50%, 140%); opacity: 0; transition: transform .3s var(--e-out), opacity .2s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.is-copied { background: var(--ok-soft) !important; color: var(--ink) !important; }
.copy.is-copied { background: none !important; color: var(--ok) !important; }

/* booking panel */
.book { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: var(--bd); border-radius: var(--r-panel); background: var(--surface); color: var(--ink); box-shadow: var(--sh); }
.book::backdrop { background: rgba(44, 28, 66, .5); }
.book__in { position: relative; display: grid; gap: 14px; padding: 24px 22px 22px; }
.book__in h2 { font-size: 1.55rem; padding-right: 48px; }
.book__in > p { color: var(--text); }
.book__x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: var(--bd-sm); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); cursor: pointer; }
.book__list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 2px dashed var(--line); }
.book__list li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 2px dashed var(--line); }
.book__l { font: 650 .78rem/1.3 var(--mono); color: var(--muted); }
.book__v { font-weight: 650; color: var(--ink); overflow-wrap: anywhere; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.book__copy { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: var(--bd-sm); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); font: 700 .88rem/1 var(--font); cursor: pointer; white-space: nowrap; }
.book__mail { justify-self: stretch; margin-top: 4px; }

.sticker { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 7px; background: var(--surface); border: var(--bd); border-radius: var(--r-ctl); box-shadow: 3px 3px 0 var(--yellow); font: 700 .8125rem/1 var(--mono); color: var(--ink); text-decoration: none; transform: rotate(-2deg); transition: transform .2s var(--e-out); }
.sticker:hover { transform: rotate(0) translateY(-1px); }
.sticker img { border-radius: 6px; display: block; border: 2px solid var(--ink); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); border: 2px solid var(--ink); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: var(--bd); }
.nav__in { max-width: 1360px; height: 100%; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; flex-direction: column; justify-content: center; text-decoration: none; line-height: 1; flex: none; }
.brand__name { font-size: 1.62rem; font-weight: 750; letter-spacing: -.05em; color: var(--ink); }
.brand__sub { font-size: .6875rem; letter-spacing: .09em; color: var(--muted); margin-top: 4px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin-left: 10px; }
.nav__links a { font-weight: 600; font-size: .97rem; color: var(--ink-2); text-decoration: none; padding: 8px 2px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--yellow); }
.nav__links .nav__signin-m, .nav__links .nav__book-m { display: none; }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__signin { font-weight: 650; font-size: .95rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav__signin:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.lang { display: inline-flex; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 7px 13px; font-weight: 700; font-size: .8125rem; min-width: 46px; min-height: 38px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.nav__menu { display: none; width: 44px; height: 44px; border: 2.5px solid var(--ink); border-radius: var(--r-ctl); background: var(--surface); align-items: center; justify-content: center; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: var(--bd); background:
  radial-gradient(60% 70% at 82% 38%, rgba(182, 162, 202, .55), rgba(182, 162, 202, 0) 70%),
  radial-gradient(40% 50% at 10% 100%, rgba(255, 201, 31, .16), rgba(255, 201, 31, 0) 70%), var(--paper); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(44, 28, 66, .16) 1.2px, transparent 1.3px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.hero__in { max-width: 1360px; margin: 0 auto; padding: clamp(28px, 3.6vw, 52px) clamp(16px, 3vw, 40px) clamp(40px, 5vw, 70px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.8fr); gap: clamp(24px, 3.6vw, 56px); align-items: center; }
.hero__copy { display: grid; gap: 22px; justify-items: start; align-content: center; }
.hero__title { font-size: clamp(2.6rem, 1rem + 3.4vw, 4.3rem); line-height: 1.01; letter-spacing: -.05em; font-weight: 750; color: var(--ink); }
.hero__l1, .hero__l2 { display: block; }
.hl { background: linear-gradient(transparent 55%, var(--yellow) 55%, var(--yellow) 93%, transparent 93%); color: inherit; padding: 0 .06em; margin: 0 -.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero__sub { font-size: clamp(1.0625rem, .95rem + .45vw, 1.25rem); line-height: 1.5; color: var(--ink); max-width: 30em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px 18px; padding-top: 4px; }

/* ---------- the game ---------- */
.game { --who: var(--accent); position: relative; min-width: 0; background: var(--surface); border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); overflow: hidden; }
.game[data-who="in"] { --who: var(--client); } .game[data-who="ai"] { --who: var(--accent); }
.game[data-who="code"] { --who: var(--ink); } .game[data-who="you"] { --who: var(--yellow); } .game[data-who="done"] { --who: var(--ok-bright); }
.game__hud { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ink); color: #fff; font: 700 .8rem/1 var(--mono); }
.lvl { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: #fff; color: var(--ink); white-space: nowrap; }
.game[data-who="you"] .lvl { background: var(--yellow); }
.hud-name { text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clock { margin-left: auto; display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 10px; border-radius: 7px; background: rgba(255, 255, 255, .1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock__k { color: rgba(255, 255, 255, .62); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.clock b { font-size: .95rem; min-width: 3.2em; text-align: right; }
.clock.is-wait { background: var(--client); color: var(--ink); } .clock.is-wait .clock__k { color: rgba(44, 28, 66, .78); }
.clock.is-day { background: var(--yellow); color: var(--ink); } .clock.is-day .clock__k { color: rgba(44, 28, 66, .7); }
.game__ctl { display: inline-flex; gap: 6px; flex: none; }
.ctl { height: 34px; min-width: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 2px solid #fff; border-radius: 7px; background: transparent; color: #fff; font: 700 .75rem/1 var(--mono); }
.ctl:hover { background: rgba(255, 255, 255, .16); }
.ctl:active { transform: translateY(1px); }

.xp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 0 12px 10px; background: var(--ink); }
.xp__seg { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.xp__seg i { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: var(--accent-2); border-radius: 99px; }
.xp__seg[data-who="in"] i { background: var(--client); } .xp__seg[data-who="code"] i { background: #fff; } .xp__seg[data-who="you"] i { background: var(--yellow); }

.screen { position: relative; aspect-ratio: 16 / 10; background: var(--tint); border-top: var(--bd); border-bottom: var(--bd); overflow: hidden; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.scene.is-on { opacity: 1; }
.game.is-done .scene--cpa { opacity: .16; }
.game.is-done .scene--cpa * { animation: none !important; }

/* the picture vocabulary: one ink, three stroke weights, flat fills */
.scene text { font-family: var(--mono); font-weight: 700; fill: var(--ink); }
.scene .k { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.scene .k2 { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.scene .k1 { stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scene .nf { fill: none; }
.scene .shade { fill: var(--ink); }
.scene .f-paper { fill: var(--surface); } .scene .f-tint { fill: var(--tint); } .scene .f-tint2 { fill: var(--tint-2); }
.scene .f-ink { fill: var(--ink); } .scene .f-yellow { fill: var(--yellow); } .scene .f-ysoft { fill: var(--yellow-soft); }
.scene .f-green { fill: var(--ok-bright); } .scene .f-gsoft { fill: var(--ok-soft); }
.scene .f-agent { fill: var(--accent); } .scene .f-agent-soft { fill: var(--tint-2); }
.scene .f-client { fill: var(--client); } .scene .f-client-soft { fill: var(--client-soft); }
.scene .lbl { font-size: 23px; text-anchor: middle; dominant-baseline: central; }
.scene .lbl--l { text-anchor: start; } .scene .lbl--r { text-anchor: end; } .scene .lbl--s { font-size: 20px; }
.scene .code { font-size: 23px; }
.scene .num { font-size: 31px; text-anchor: middle; dominant-baseline: central; }
.scene .num--s { font-size: 20px; } .scene .num--w { fill: var(--ink); }
.scene .braces { font-size: 52px; text-anchor: middle; dominant-baseline: central; fill: var(--yellow); }
.scene .tick { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.scene .tick--s { stroke-width: 2.8; }
.scene .todo .tick { stroke: #fff; }
.scene .w { stroke: #fff; } .scene .w2 { stroke: rgba(255, 255, 255, .7); stroke-width: 2.5; stroke-dasharray: 3 4; }
.scene .w3 { stroke: rgba(255, 255, 255, .85); stroke-width: 5; stroke-linecap: round; }
.scene .dz { fill: rgba(239, 233, 246, .7); stroke: var(--accent-2); stroke-width: 2.5; stroke-dasharray: 7 6; }
.scene .open, .scene .open2 { stroke-dasharray: 4 3; }
.scene .flow { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 2 10; }
.scene .scanline { stroke: var(--muted); stroke-dasharray: 2 3; }
.scene .dash { stroke-dasharray: 5 5; }
.scene .ring { stroke: var(--accent); stroke-width: 3; }
.scene .scanbar { fill: var(--accent); opacity: .85; }
.scene .tl-fill { fill: var(--accent); transform-box: fill-box; transform-origin: 0 50%; }
.scene .fill-line { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 150; stroke-dashoffset: 0; }
.scene .sig { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 240; stroke-dashoffset: 0; }
.scene .sig--you { stroke: var(--client); } .scene .sig--cpa { stroke: #c99300; stroke-width: 5; }
.scene .todo .box { fill: var(--ok-bright); }
.scene .flag .card { fill: var(--ok-soft); }
.scene .caret { stroke: var(--accent-2); stroke-dasharray: 3 5; }

/* scene animations run while a level is on; resting frames are the finished state */
.scene.is-on .tile { transform-box: fill-box; transform-origin: 50% 50%; animation: fly .62s var(--e-out) calc(.15s + var(--i) * .11s) both; }
.scene.is-on .pill-pop { transform-box: fill-box; transform-origin: 50% 50%; animation: pop .38s var(--e-out) calc(.12s + var(--k, 0) * .12s) both; }
.scene.is-on .flow { animation: flowmove .8s linear infinite; }
.scene.is-on .send { transform-box: fill-box; transform-origin: 50% 50%; animation: nudge 1.2s ease-in-out .4s 2; }
.scene.is-on .bot__eyes { animation: look 1.1s ease-in-out infinite alternate; }
.scene.is-on .bot { animation: bob 1.4s ease-in-out infinite; }
.scene.is-on .rtile .scanbar { animation: scan .72s linear infinite, gone 0s linear var(--d) forwards; }
.scene .rtile .scanbar { opacity: 0; }
.scene.is-on .rtile .done { transform-box: fill-box; transform-origin: 50% 50%; animation: pop .3s var(--e-out) calc(var(--d) + .08s) both; }
.scene.is-on .tl-fill { animation: grow 3.2s linear both; }
.scene.is-on .cell { transform-box: fill-box; transform-origin: 50% 50%; animation: pop .26s var(--e-out) calc(.2s + var(--j) * .052s) both; }
.scene.is-on .bub { transform-box: fill-box; transform-origin: 0 100%; animation: rise .42s var(--e-out) var(--bd) both; }
.scene.is-on .bub--you { transform-origin: 100% 100%; }
.scene.is-on .bub--you .dots { animation: typing .5s ease-in-out 1.9s 1 both, gone 0s linear 2.42s forwards; }
.scene .bub--you .dots { opacity: 0; }
.scene.is-on .bub--you .ans { animation: draw .35s ease-out 2.45s both; stroke-dasharray: 110; }
.scene.is-on .todo .box { animation: boxon .25s linear calc(2.9s + var(--k) * .14s) both; }
.scene.is-on .todo .tick { animation: drawtick .25s ease-out calc(2.9s + var(--k) * .14s) both; stroke-dasharray: 20; }
.scene.is-on .form { transform-box: fill-box; transform-origin: 50% 100%; animation: slidein .5s var(--e-out) calc(.1s + var(--k) * .2s) both; }
.scene.is-on .fill-line { animation: draw .3s ease-out calc(.6s + var(--k) * .2s + var(--r) * .12s) both; }
.scene.is-on .sig--you { animation: draw .75s ease-out calc(1.55s + var(--k) * .5s) both; }
.scene.is-on .receipt { animation: receipt .5s var(--e-out) 2.75s both; }
.scene.is-on .flag .card { animation: cardok .25s linear calc(.5s + var(--k) * .38s) both; }
.scene.is-on .flag .ok { transform-box: fill-box; transform-origin: 50% 50%; animation: pop .3s var(--e-out) calc(.5s + var(--k) * .38s) both; }
.scene.is-on .sig--cpa { animation: draw 1s ease-out 2.9s both; }
.scene.is-on .seal-mark { transform-box: fill-box; transform-origin: 50% 50%; animation: stamp .5s var(--e-out) 3.95s both; }
.scene .seal-mark { transform: rotate(-12deg); }

/* overlays on the screen: the level-cleared stamp and the run summary */
.stamp-cleared { position: absolute; left: 50%; top: 50%; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--ok-bright); color: var(--ink); border: var(--bd); border-radius: 12px; box-shadow: var(--sh-sm); font: 800 clamp(.9rem, .7rem + .8vw, 1.3rem)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(.6); pointer-events: none; transition: opacity .18s, transform .3s var(--e-out); }
.stamp-cleared.is-on { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
.summary { position: absolute; inset: 7% 10%; z-index: 4; display: none; align-content: center; gap: clamp(10px, 1.6vw, 18px); padding: clamp(14px, 2.4vw, 28px); background: var(--surface); border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); }
.game.is-done .summary { display: grid; animation: pop .4s var(--e-out) both; }
.summary__t { display: inline-flex; justify-self: start; padding: 6px 12px; background: var(--ok-bright); color: var(--ink); border: var(--bd-sm); border-radius: 9px; font: 800 clamp(.85rem, .7rem + .6vw, 1.15rem)/1.1 var(--mono); letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }
.summary ul { display: grid; gap: clamp(4px, .8vw, 9px); }
.summary li { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: clamp(.86rem, .74rem + .5vw, 1.08rem); color: var(--ink); line-height: 1.25; }
.summary li svg { flex: none; color: var(--ok); }
.summary__cta { display: flex; flex-wrap: wrap; gap: 10px 12px; }

/* caption under the screen */
.cap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 10px; min-height: 116px; padding: 12px 18px; align-content: start; }
.who { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--tint-2); color: var(--ink); font: 700 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.who--in { background: var(--client-soft); } .who--ai { background: var(--tint-2); } .who--code { background: var(--ink); color: #fff; }
.who--you { background: var(--yellow); } .who--done { background: var(--ok-bright); color: var(--ink); }
.tag-final { justify-self: start; font: 700 .72rem/1 var(--mono); color: var(--ink); background: var(--yellow-soft); border: 2px dashed var(--ink); border-radius: 999px; padding: 3px 8px; text-transform: uppercase; letter-spacing: .05em; }
.cap__t { grid-column: 1 / -1; margin-top: 5px; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.15; font-weight: 750; letter-spacing: -.025em; color: var(--ink); }
.cap__l { grid-column: 1 / -1; font-size: .98rem; line-height: 1.4; color: var(--text); }
.cap__s { grid-column: 1 / -1; justify-self: start; margin-top: 5px; padding: 4px 9px; background: var(--tint); border: 2px solid var(--ink); border-radius: 8px; font: 700 .8rem/1.2 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* level map */
.map { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 10px 8px 10px; border-top: var(--bd); background: var(--paper); }
.map::before { content: ''; position: absolute; left: 8.33%; right: 8.33%; top: 31px; height: 0; border-top: 3px dashed var(--ink-2); opacity: .45; }
.node { position: relative; display: grid; justify-items: center; gap: 5px; width: 100%; padding: 2px 0; border: 0; background: transparent; color: var(--ink); }
.node__dot { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: var(--bd-sm); border-radius: 50%; background: var(--surface); font: 700 .9rem/1 var(--mono); transition: transform .2s var(--e-out), background .2s; }
.node__ok { position: absolute; inset: 0; display: none; place-items: center; color: #fff; }
.node__name { font-size: .8rem; font-weight: 700; line-height: 1.1; }
.node:hover .node__dot { transform: translateY(-2px); }
.node.is-on .node__dot { background: var(--tint-2); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--ink); }
.node[data-who="you"].is-on .node__dot { background: var(--yellow); }
.node.is-done .node__dot { background: var(--ok-bright); }
.node.is-done .node__dot b { visibility: hidden; }
.node.is-done .node__ok { display: grid; }
.node.is-done.is-on .node__dot { background: var(--ok-bright); }
.node[data-who="you"] .node__dot { border-style: double; border-width: 4px; }
.game__note { position: absolute; z-index: 2; left: 10px; top: 10px; max-width: calc(100% - 20px); padding: 4px 8px; background: rgba(255, 253, 250, .9); border: 2px solid var(--ink); border-radius: 7px; font: 700 .72rem/1.25 var(--mono); color: var(--ink-2); pointer-events: none; }
.game.is-done .game__note { display: none; }
.note-s { display: none; }
.game.is-paused .scene.is-on, .game.is-paused .scene.is-on * { animation-play-state: paused !important; }
.game.is-idle .scene * { animation: none !important; }

/* ---------- three promises ---------- */
.promise { padding: clamp(40px, 6vw, 76px) 0; background: var(--paper); }
.promise__in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 28px); }
.pcard { display: grid; gap: 10px; align-content: start; padding: clamp(18px, 2.2vw, 26px); border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); background: var(--surface); }
.pcard h2 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.6rem); line-height: 1.1; letter-spacing: -.03em; }
.pcard p { color: var(--text); }
.pcard { position: relative; }
.pcard__n { position: absolute; top: clamp(18px, 2.2vw, 26px); right: clamp(18px, 2.2vw, 26px); font: 800 clamp(1.3rem, 1rem + 1vw, 1.9rem)/1 var(--mono); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard--fast .pcard__n { color: var(--accent); } .pcard--signed .pcard__n { background: linear-gradient(transparent 55%, var(--yellow) 55%); padding: 0 3px; }
.pcard__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border: var(--bd-sm); border-radius: 12px; box-shadow: var(--sh-sm); color: var(--ink); }
.pcard--fast .pcard__icon { background: var(--tint-2); color: var(--accent); }
.pcard--light .pcard__icon { background: var(--client-soft); }
.pcard--signed .pcard__icon { background: var(--yellow); }

/* ---------- sections ---------- */
section { position: relative; }
.sec-head { display: grid; gap: 14px; max-width: 48rem; margin-bottom: clamp(24px, 3.4vw, 40px); }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.05rem); line-height: 1.06; letter-spacing: -.045em; font-weight: 750; color: var(--ink); text-wrap: balance; }
h3 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.025em; font-weight: 750; color: var(--ink); }
.sec-head p { color: var(--text); max-width: 42rem; }

/* services: the firm's five blocks */
.svc { padding: clamp(56px, 8vw, 104px) 0; background: var(--surface); border-top: var(--bd); border-bottom: var(--bd); }
.asks { display: grid; gap: 12px; margin-bottom: clamp(22px, 3vw, 34px); }
.asks__k { font: 700 .8rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.asks__list { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.ask { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 15px 8px 9px; border: var(--bd-sm); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 650; font-size: .95rem; line-height: 1.25; text-align: left; box-shadow: var(--sh-sm); transition: transform .15s var(--e-out), box-shadow .15s var(--e-out), background .15s; }
.ask::before { content: '?'; display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--tint-2); border: 2px solid var(--ink); font: 800 .85rem/1 var(--mono); }
.ask:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.ask[aria-pressed="true"] { background: var(--ink); color: #fff; }
.forms { display: grid; border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); overflow: hidden; background: var(--surface); }
.form { --c: var(--accent); display: grid; grid-template-columns: minmax(150px, 15rem) minmax(0, 1fr); transition: opacity .25s, background .25s; }
.form + .form { border-top: var(--bd); }
.form__code { display: flex; align-items: flex-end; padding: 18px 20px; background: var(--ink); color: #fff; border-right: var(--bd); font: 800 clamp(2rem, 1.3rem + 2vw, 3.1rem)/1 var(--mono); letter-spacing: -.04em; }
.form__body { display: grid; gap: 6px; padding: 18px clamp(16px, 2.4vw, 28px) 20px; align-content: start; }
.form__who { color: var(--muted); font-size: .98rem; }
.form ol { display: grid; gap: 5px; margin-top: 6px; counter-reset: f; }
.form ol li { position: relative; padding-left: 28px; color: var(--text); counter-increment: f; }
.form ol li::before { content: counter(f); position: absolute; left: 0; top: .08em; font: 800 .95rem/1.4 var(--mono); color: var(--c); }
.form.is-hit { background: var(--yellow-soft); }
.form.is-dim { opacity: .38; }

/* team */
.seal { display: grid; place-items: center; justify-self: center; width: 64px; height: 64px; border: var(--bd); border-radius: 50%; background: var(--surface); font: 800 1.15rem/1 var(--mono); color: var(--ink); box-shadow: var(--sh-sm); transform: rotate(-4deg); }
.db-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 20px; border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); background: var(--surface); text-decoration: none; transition: transform .2s var(--e-out), box-shadow .2s var(--e-out); }
.db-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.db-card img { border: var(--bd); border-radius: 12px; display: block; }
.db-card h3 { margin-bottom: 6px; }
.db-card p { font-size: .98rem; color: var(--text); }
.contact__cpa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 0 16px; border-bottom: 3px solid var(--ink); }
.seal--cpa { width: 66px; height: 66px; background: var(--yellow); font-size: 1.25rem; }
.contact__k { display: block; font: 650 .78rem/1.3 var(--mono); color: var(--muted); margin-bottom: 4px; }
.contact__cpa h3 { font-size: 1.35rem; }
.contact__cpa p { margin-top: 6px; font-size: .95rem; color: var(--text); }
.db-card--strip { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; margin-bottom: 26px; }
.db-card--strip .db-card__link { margin-top: 0; white-space: nowrap; justify-self: start; }
.db-card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font: 700 .85rem/1 var(--mono); color: var(--ink); border-bottom: 3px solid var(--yellow); padding-bottom: 2px; }

/* close */
.close { position: relative; isolation: isolate; padding: clamp(56px, 8vw, 100px) 0; background:
  radial-gradient(70% 90% at 90% 20%, rgba(182, 162, 202, .5), rgba(182, 162, 202, 0) 70%), var(--paper-2); border-top: var(--bd); border-bottom: var(--bd); }
.close__in { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.close__copy { display: grid; gap: 18px; justify-items: start; }
.close__copy p { color: var(--ink); max-width: 36rem; }
.contact { display: grid; padding: 8px 22px; background: var(--surface); border: var(--bd); border-radius: var(--r-panel); box-shadow: var(--sh); }
.contact__list > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 13px 0; align-items: baseline; }
.contact__list > div + div { border-top: 2px dashed var(--line); }
.contact dt { font: 650 .82rem/1.3 var(--mono); color: var(--muted); }
.contact dd { font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.contact a { text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

/* footer */
.foot { background: var(--paper); padding: 26px 0 34px; }
.foot__in { display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: center; }
.foot__id { display: grid; gap: 2px; }
.foot__name { font-weight: 750; font-size: 1.1rem; letter-spacing: -.03em; color: var(--ink); }
.foot__tag { font-size: .88rem; color: var(--muted); }
.foot__links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: .92rem; }
.foot__links a { color: var(--ink); font-weight: 600; }
.foot__db { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--mono); font-size: .8rem !important; }
.foot__db img { border-radius: 5px; border: 2px solid var(--ink); }
.foot__c { font: .78rem/1.3 var(--mono); color: var(--muted); }

/* reveal on scroll: one fade-up per block */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--e-out), transform .6s var(--e-out); }
.js [data-reveal].is-in, .js.static [data-reveal] { opacity: 1; transform: none; }

/* keyframes */
@keyframes fly { from { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.35) rotate(-18deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateY(40px) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes receipt { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: none; } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(52px); } }
@keyframes gone { to { opacity: 0; visibility: hidden; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }
@keyframes drawtick { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes boxon { from { fill: var(--surface); } to { fill: var(--ok-bright); } }
@keyframes cardok { from { fill: var(--yellow-soft); } to { fill: var(--ok-soft); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-24deg); } 70% { opacity: 1; transform: scale(.92) rotate(-12deg); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); } }
@keyframes look { from { transform: translateX(-2.5px); } to { transform: translateX(2.5px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: scale(1.12); } }
@keyframes typing { 0% { opacity: 0; } 30%, 80% { opacity: 1; } 100% { opacity: .4; } }
@keyframes flowmove { to { stroke-dashoffset: -24; } }

/* ---------- responsive ---------- */
@media (max-width: 1079px) {
  .nav__links { position: absolute; top: var(--nav-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px clamp(16px, 4vw, 40px) 16px; background: var(--paper); border-bottom: var(--bd); }
  .nav--open .nav__links { display: flex; }
  .nav__links a { padding: 14px 2px; font-size: 1.05rem; border-bottom: 2px dashed var(--line); }
  .nav__links .nav__signin-m { display: block; }
  .nav__links .nav__book-m { display: inline-flex; margin-top: 14px; border-bottom: var(--bd); color: #fff; }
  .nav__menu { display: inline-flex; }
  .nav__signin { display: none; }
  .hero__in { grid-template-columns: minmax(0, 1fr); }
  .close__in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 859px) {
  .promise__in { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .form__code { border-right: 0; border-bottom: var(--bd); padding: 12px 16px; font-size: 1.9rem; }
}
@media (max-width: 639px) {
  .nav__book { display: none; }
  .brand__name { font-size: 1.45rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__cta .btn--ghost, .hero__cta .btn--wechat { flex: 1 1 40%; min-height: 48px; padding: 0 10px; font-size: .92rem; }
  html[lang="zh-Hans"] .hero__cta .btn--wechat { flex: 1 1 100%; }
  html[lang="zh-Hans"] .hero__cta .btn--primary { flex: 1 1 40%; min-height: 48px; padding: 0 10px; font-size: .92rem; }
  .game__hud { gap: 7px; padding: 8px 9px; font-size: .72rem; }
  .lvl { height: 26px; padding: 0 8px; }
  .clock { padding: 5px 7px; gap: 5px; }
  .clock__k { display: none; }
  .clock b { font-size: .86rem; min-width: 0; }
  .ctl { height: 44px; min-width: 44px; padding: 0 8px; border-radius: 9px; }
  .ctl--replay { display: none; }
  .xp { padding: 7px 9px; gap: 4px; }
  .cap { min-height: 160px; padding: 11px 14px; }
  .game__note { font-size: .64rem; left: 7px; top: 7px; padding: 3px 6px; }
  .note-l { display: none; } .note-s { display: inline; }
  .cap__l { font-size: .94rem; }
  .map { padding: 10px 4px; }
  .map::before { top: 29px; }
  .node__dot { width: 34px; height: 34px; font-size: .8rem; }
  .node__name { font-size: .72rem; }
  .summary { inset: 5% 5%; }
  .summary__cta .btn { min-height: 38px; padding: 0 12px; font-size: .85rem; }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .contact__list > div { grid-template-columns: 1fr; gap: 2px; }
  .db-card--strip { grid-template-columns: auto minmax(0, 1fr); }
  .db-card--strip .db-card__link { grid-column: 2; }
  .db-card--strip img { width: 48px; height: 48px; }
  .seal--cpa { width: 56px; height: 56px; font-size: 1.05rem; }
  .ask { font-size: .9rem; }
  .book__list li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .book__l { grid-column: 1 / -1; }
}
@media (max-width: 389px) {
  .hud-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
.static *, .static *::before, .static *::after { animation: none !important; transition: none !important; }
