/* Visual system. Loaded after every page stylesheet and before stability-v1.css.
   One set of tokens for type, radius, elevation and motion; the overrides below
   map the many legacy values onto them. !important is used only where legacy
   rules carry ID selectors, so the system layer reliably wins. */
:root{
 /* Type: the system UI face everywhere; Kai is reserved for Xiaoyi's voice. */
 --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",sans-serif;
 --font-say:"Emate Kai","LXGW WenKai","Kaiti SC","STKaiti","KaiTi",serif;
 --fs-caption:12px;--fs-small:13px;--fs-body:14px;--fs-reading:16px;--fs-section:20px;--fs-title:28px;
 /* Radius tiers: tags, controls, cards, overlays, pills. */
 --r-tag:6px;--r-control:10px;--r-card:14px;--r-overlay:20px;--r-pill:999px;
 /* Elevation: flat surfaces use a 1px line; raised cards; floating overlays. */
 --shadow-raised:0 1px 2px rgb(23 41 68/.05),0 4px 14px rgb(23 41 68/.04);
 --shadow-overlay:0 2px 8px rgb(16 29 52/.08),0 16px 48px rgb(16 29 52/.18);
 /* Motion (used by the motion layer): hover/press, small state, panels/pages. */
 --dur-1:120ms;--dur-2:200ms;--dur-3:320ms;
 --ease-standard:cubic-bezier(.2,0,0,1);--ease-enter:cubic-bezier(.05,.7,.1,1);--ease-exit:cubic-bezier(.3,0,.8,.15);
}
html[data-theme=dark]{--shadow-raised:0 1px 2px rgb(0 0 0/.3),0 4px 14px rgb(0 0 0/.2);--shadow-overlay:0 2px 8px rgb(0 0 0/.35),0 16px 48px rgb(0 0 0/.45)}

/* Mixed Chinese/Latin text: automatic spacing between scripts (Chromium 140+;
   ignored elsewhere), and digits that keep their width while they change. */
body{text-autospace:normal}
:is(.badge,time,#timer,[id$=Timer],[id$=-count],[id$=Count],[class*=timer],[class*=countdown],.usage-grid){font-variant-numeric:tabular-nums}

/* Headings use the UI face. The home page is Xiaoyi's own page and keeps Kai. */
.brand44:not(.home) :is(h1,h2,h3),.brand44 .account-manage h3,.pg :is(.pg-gist b,.pg-article summary,.pg-rules summary,.pg-plan-big){font-family:var(--font-ui);font-weight:600;letter-spacing:-.01em}
/* Xiaoyi speaking: the translate page's empty-state line and page speech bubbles.
   Legacy page rules set weights with attribute/ID selectors, hence !important. */
.brand44 .live-empty h2,.pg :is(.pg-bubble,.pg-tip p){font-family:var(--font-say)!important;font-weight:500!important;letter-spacing:0!important}

/* Workspace pages (body.app-page) take their type, radius and elevation from
   workspace-tokens.css and workspace-ui.css; this layer no longer reaches into them. */
.brand44 :is(dialog,.insight-panel){border-radius:var(--r-overlay)!important;box-shadow:var(--shadow-overlay)!important}
