/* Hima Mac — one set of names, two themes.
   The look: graphite by night and paper by day, and one signal colour, the
   green status light of the "h." mark (a Mac that is on, and yours). Latin
   letters and figures are set in Geist (fonts/, SIL OFL), Chinese in the
   system's own face beside it. Hairline rules, small mono labels, figures
   that line up: the precision of a machine room, nothing glossy.
   Dark is the default; light is the same page on paper. Colours used at
   several strengths are kept as "r, g, b", for rgba(var(--x), a). --ink is
   what is laid over a surface to tint it: white in the dark, near-black on
   paper. Never write a literal colour in a rule below: use a token, so both
   themes follow. */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-1.9.2.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20A0-20CF, U+2122, U+2190-2199, U+2212, U+2215, U+2248, U+2260, U+2264-2265;
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-1.9.2.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20A0-20CF, U+2122, U+2190-2199, U+2212, U+2215, U+2248, U+2260, U+2264-2265;
}

:root {
  --bg: #09090b;
  --bg-rgb: 9, 9, 11;
  --bg-2: #0c0c0e;
  --surface: #101012;
  --surface-rgb: 16, 16, 18;
  --surface-2: #141417;
  --surface-3: #1b1b1f;
  --field: #0b0b0d;
  --well: #0b0b0d;
  --pop: #17171a;
  --glass: rgba(16, 16, 18, .72);
  --ink: 255, 255, 255;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --line-3: rgba(255, 255, 255, .2);
  --sheen: rgba(255, 255, 255, .05);
  --text: #ededee;
  --text-2: #b9b9bf;
  --text-hi: #ffffff;
  --inv: #0a0a0b;
  --muted: #919199;
  --faint: #5f5f68;
  --code: #d9d9dd;
  /* the signal: the status light of the mark */
  --signal: #3ddba3;
  --signal-rgb: 61, 219, 163;
  --signal-hi: #5ee6b6;
  --on-signal: #03140d;
  --mint: var(--signal);
  --mint-rgb: var(--signal-rgb);
  --mint-inv: #0b8a5e;
  --blue: #84b1ff;
  --blue-rgb: 132, 177, 255;
  --violet: #b6a3ff;
  --amber: #f4b860;
  --amber-rgb: 244, 184, 96;
  --red: #ff8079;
  --red-rgb: 255, 128, 121;
  --mint-dim: rgba(var(--signal-rgb), .12);
  --amber-dim: rgba(var(--amber-rgb), .12);
  --red-dim: rgba(var(--red-rgb), .12);
  /* brushed aluminium, for the words that are the product's own */
  --grad: var(--signal);
  --grad-text: linear-gradient(180deg, #f6f6f7 18%, #9a9aa3 92%);
  --on-grad: var(--on-signal);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2303140d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 8.4l2.9 2.900 5.900-6.200'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23919199' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.2l4 4 4-4'/%3E%3C/svg%3E");
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .5);
  --pop-shadow: 0 20px 50px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06);
  --drop: rgba(0, 0, 0, .55);
  /* the metal of the drawn machines */
  --metal-1: #e9ebee;
  --metal-2: #a7acb5;
  --metal-3: #6b717c;
  --metal-port: #2a2d33;
  --gutter: 28px;
  --r-s: 8px;
  --r: 12px;
  --r-l: 16px;
  --mono: "Geist Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f2;
  --bg-rgb: 245, 245, 242;
  --bg-2: #efefeb;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-2: #ffffff;
  --surface-3: #ecece8;
  --field: #ffffff;
  --well: #f4f4f1;
  --pop: #ffffff;
  --glass: rgba(255, 255, 255, .76);
  --ink: 20, 20, 17;
  --line: rgba(20, 20, 17, .085);
  --line-2: rgba(20, 20, 17, .14);
  --line-3: rgba(20, 20, 17, .22);
  --sheen: transparent;
  --text: #141411;
  --text-2: #3d3d39;
  --text-hi: #2b2b27;
  --inv: #ffffff;
  --muted: #64645e;
  --faint: #93938c;
  --code: #24241f;
  --signal: #0b8a5e;
  --signal-rgb: 11, 138, 94;
  --signal-hi: #0a7b54;
  --on-signal: #ffffff;
  --mint-inv: #5ee6b6;
  --blue: #1d5fd6;
  --blue-rgb: 29, 95, 214;
  --violet: #6b4de6;
  --amber: #9a5800;
  --amber-rgb: 178, 106, 0;
  --red: #c4302a;
  --red-rgb: 196, 48, 42;
  --mint-dim: rgba(var(--signal-rgb), .09);
  --amber-dim: rgba(var(--amber-rgb), .1);
  --red-dim: rgba(var(--red-rgb), .08);
  --grad-text: linear-gradient(180deg, #2c2c29 20%, #85857f 95%);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 8.4l2.9 2.900 5.900-6.200'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364645e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.2l4 4 4-4'/%3E%3C/svg%3E");
  --card-shadow: 0 1px 0 rgba(20, 20, 17, .03), 0 1px 3px rgba(20, 20, 17, .04);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(20, 20, 17, .28), 0 0 0 1px #141411;
  --pop-shadow: 0 18px 44px -14px rgba(20, 20, 17, .3), 0 0 0 1px rgba(20, 20, 17, .08);
  --drop: rgba(20, 20, 17, .2);
  --metal-1: #f8f8f9;
  --metal-2: #c9ccd2;
  --metal-3: #9298a2;
  --metal-port: #43464d;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 1rem/1.65 var(--sans); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -.028em; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) h4 { letter-spacing: -.01em; }
code, .mono { font-family: var(--mono); font-size: .9em; font-variant-ligatures: none; }
::selection { background: rgba(var(--signal-rgb), .3); }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.wrap.narrow { max-width: 780px; }
/* the staff pages are mostly tables, and get more room for them */
.is-admin .wrap { max-width: 1360px; }
.is-admin .wrap.narrow { max-width: 780px; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(var(--bg-rgb), .8); -webkit-backdrop-filter: saturate(150%) blur(16px); backdrop-filter: saturate(150%) blur(16px); border-bottom: 1px solid var(--line); }
.nav-in { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 2px 6px var(--drop)); }
.nav nav { display: flex; align-items: center; gap: 2px; font-size: .9rem; }
.nav nav a, .nav nav button.navlink { color: var(--muted); padding: 7px 11px; border-radius: 8px; white-space: nowrap; transition: color .15s, background .15s; }
.nav nav a:hover, .nav nav button.navlink:hover { color: var(--text); background: rgba(var(--ink), .05); }
.nav nav a.nav-cta { color: var(--inv); background: var(--text); font-weight: 500; padding: 7px 14px; margin-left: 6px; box-shadow: var(--btn-shadow); }
.nav nav a.nav-cta:hover { background: var(--text-hi); color: var(--inv); }
.nav nav a.nav-me { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); margin-left: 6px; }
.nav nav a.lang { font: 500 .76rem/1.4 var(--mono); letter-spacing: .02em; border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 7px; }
.nav nav a.theme { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; }
.nav-tools { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
/* a phone's bar: one link and the button that opens the rest (see "phones") */
.nav-quick, .nav-toggle { display: none; }
.theme .icon { width: 17px; height: 17px; }
/* the switch shows where it leads: a sun in the dark, a moon in the light */
.theme .i-moon, [data-theme="light"] .theme .i-sun { display: none; }
[data-theme="light"] .theme .i-moon { display: block; }
.bm-graphite, [data-theme="light"] .bm-silver { display: none; }
[data-theme="light"] .bm-graphite { display: inline; }
form.inline { display: inline; margin: 0; }
button.navlink { background: none; border: 0; font: inherit; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; border: 0; cursor: pointer; font: 500 .95rem/1 var(--sans); letter-spacing: -.005em; white-space: nowrap; color: var(--inv); background: var(--text); box-shadow: var(--btn-shadow); transition: background .15s, box-shadow .15s, color .15s, transform .1s; }
.btn:hover { background: var(--text-hi); }
.btn:active { transform: translateY(1px); }
.btn.ghost { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .12); }
.btn.ghost:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-3), 0 1px 2px rgba(0, 0, 0, .12); }
.btn.accent { background: var(--signal); color: var(--on-signal); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(var(--signal-rgb), .5); }
.btn.accent:hover { background: var(--signal-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(var(--signal-rgb), .5), 0 8px 26px -10px rgba(var(--signal-rgb), .7); }
.btn.small { height: 34px; padding: 0 13px; font-size: .86rem; border-radius: 8px; gap: 7px; }
.btn.wide { width: 100%; }
.btn.disabled { background: rgba(var(--ink), .04); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); cursor: default; transform: none; }
.btn .icon { width: 17px; height: 17px; }
.btn.small .icon { width: 15px; height: 15px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
button.link:hover, a.link:hover { text-decoration: underline; text-underline-offset: 3px; }
a.link { color: var(--blue); }
.danger { color: var(--red) !important; }

/* ---------- journey: the opening, where scrolling moves a camera ----------
   journey.js adds .is-live and pins the stage; without it the scenes below
   read as plain stacked sections. .is-flat: the script runs, WebGL does not. */
.journey { position: relative; --jr-accent: var(--signal); }
.jr-canvas, .jr-flat, .jr-shade, .jr-progress, .jr-route, .jr-hint { display: none; }
.jr-copy { padding: 64px 0 8px; max-width: 600px; }
.jr-copy:first-child { padding-top: 84px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: .82rem; color: var(--text-2); background: rgba(var(--ink), .04); border: 1px solid var(--line-2); margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.live { background: var(--signal); box-shadow: 0 0 0 0 rgba(var(--signal-rgb), .6), 0 0 8px rgba(var(--signal-rgb), .8); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(var(--signal-rgb), 0), 0 0 8px rgba(var(--signal-rgb), .8); } 100% { box-shadow: 0 0 0 0 rgba(var(--signal-rgb), 0), 0 0 8px rgba(var(--signal-rgb), .8); } }
.jr-num { display: block; margin-bottom: 22px; font: 500 .72rem/1 var(--mono); letter-spacing: .14em; color: var(--faint); }
.jr-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 500 .74rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.jr-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jr-accent); box-shadow: 0 0 10px var(--jr-accent); }
.jr-copy h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 600; line-height: 1.02; letter-spacing: -.05em; }
:lang(zh) .jr-copy h1 { font-size: clamp(2.3rem, 4.4vw, 3.7rem); letter-spacing: -.02em; line-height: 1.16; }
.jr-copy h1 span { display: block; text-wrap: balance; }
.jr-copy h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
:lang(zh) .jr-copy h2 { letter-spacing: -.015em; line-height: 1.22; }
.jr-body { margin: 22px 0 0; font-size: 1.08rem; line-height: 1.7; color: var(--text-2); max-width: 31em; text-wrap: pretty; }
.jr-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; }
.jr-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.jr-points li { display: inline-flex; align-items: center; gap: 8px; }
.jr-points .icon { width: 16px; height: 16px; color: var(--signal); }
.jr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; padding: 0; list-style: none; }
.jr-tags li { padding: 5px 10px; border-radius: 6px; font: 500 .76rem/1.4 var(--mono); letter-spacing: .02em; color: var(--text-2); background: rgba(var(--ink), .04); border: 1px solid var(--line-2); }
.jr-mock { margin-top: 26px; max-width: 440px; padding: 4px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: .84rem; box-shadow: 0 24px 50px -30px var(--drop); }

.journey.is-live { margin-top: -61px; }
.is-live .jr-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.is-live .jr-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease; }
.is-live.is-drawn .jr-canvas { opacity: 1; }
.is-live .jr-shade { display: block; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), .64) 28%, rgba(var(--bg-rgb), 0) 58%),
    linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), 0) 20%); }
.is-live .jr-copies { position: absolute; inset: 0; pointer-events: none; }
.is-live .jr-copy { position: absolute; left: max(28px, env(safe-area-inset-left)); top: calc(50% + 30px); width: min(46vw, 540px); padding: 0; opacity: 0; transform: translateY(calc(-50% + var(--jr-y, 0px))); will-change: opacity, transform; }
.is-live .jr-progress { display: block; position: absolute; left: 0; right: 0; top: 61px; height: 1px; background: var(--line); }
.jr-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--signal); box-shadow: 0 0 8px rgba(var(--signal-rgb), .7); }
.is-live .jr-route { display: flex; flex-direction: column; gap: 20px; position: absolute; right: 22px; top: calc(50% + 30px); transform: translateY(-50%); padding: 16px 8px; }
.jr-route::before { content: ""; position: absolute; left: 50%; top: 22px; bottom: 22px; width: 1px; background: var(--line-2); }
.jr-route button { position: relative; width: 16px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.jr-route button::after { content: ""; position: absolute; inset: -6px; }
.jr-route i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); transition: transform .3s, background .3s, box-shadow .3s; }
.jr-route button:hover i { background: var(--text); transform: scale(1.3); }
.jr-route button.on i { background: var(--signal); transform: scale(1.5); box-shadow: 0 0 0 4px rgba(var(--signal-rgb), .14), 0 0 10px rgba(var(--signal-rgb), .7); }
.jr-route span { position: absolute; right: 26px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; padding: 3px 9px; border-radius: 6px; font: 500 .72rem/1.5 var(--mono); letter-spacing: .04em; color: var(--text); background: var(--glass); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.jr-route button:hover span, .jr-route button.on span, .jr-route button:focus-visible span { opacity: 1; transform: translate(0, -50%); }
.jr-route button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 50%; }
.is-live .jr-hint { display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font: 500 .68rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.jr-hint i { position: relative; width: 1px; height: 34px; background: linear-gradient(180deg, var(--line-2), transparent); overflow: hidden; }
.jr-hint i::after { content: ""; position: absolute; left: 0; top: -12px; width: 1px; height: 12px; background: var(--signal); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { top: -12px; opacity: 0; } 30% { opacity: 1; } 100% { top: 34px; opacity: 0; } }
/* no WebGL: a still Mac in the same light */
.is-flat .jr-canvas { display: none; }
.is-flat .jr-stage { background: radial-gradient(560px 400px at 72% 52%, rgba(var(--ink), .06), transparent 70%), radial-gradient(460px 340px at 80% 70%, rgba(var(--signal-rgb), .07), transparent 70%); }
.is-flat .jr-flat { display: block; position: absolute; left: 72%; top: 54%; width: min(40vw, 460px); transform: translate(-50%, -50%); filter: drop-shadow(0 40px 60px var(--drop)); }

/* ---------- sections ---------- */
.section { padding: 104px 0; position: relative; }
.section.tight { padding: 56px 0; }
.section-head { max-width: 660px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 .74rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .12), 0 0 10px rgba(var(--signal-rgb), .55); }
.section h2 { font-size: clamp(2rem, 3.6vw, 2.85rem); letter-spacing: -.045em; line-height: 1.06; text-wrap: balance; }
:lang(zh) .section h2 { letter-spacing: -.018em; line-height: 1.2; }
.section-head p { margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; text-wrap: pretty; }
.section-head p.kicker { margin: 0 0 18px; color: var(--muted); font-size: .74rem; }
.section-head .sub { color: var(--muted); }

/* A framed section: a hairline across the page at its top, and the column
   of the content ruled down both sides, with a cross where they meet. */
section.framed { padding: 0; border-top: 1px solid var(--line); }
.framed > .wrap { position: relative; padding-top: 104px; padding-bottom: 104px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.framed > .wrap::before, .framed > .wrap::after { content: ""; position: absolute; top: -6px; width: 11px; height: 11px; pointer-events: none;
  background: linear-gradient(var(--line-3), var(--line-3)) center / 1px 100% no-repeat, linear-gradient(var(--line-3), var(--line-3)) center / 100% 1px no-repeat; }
.framed > .wrap::before { left: -6px; }
.framed > .wrap::after { right: -6px; }
.framed.flush > .wrap { padding-top: 0; padding-bottom: 0; }

.mock-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mock-row:last-child { border-bottom: 0; }
.mock-row span { color: var(--faint); font: 500 .72rem/1.3 var(--mono); letter-spacing: .04em; }
.mock-row code { color: var(--code); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-row code.ok { color: var(--signal); }

/* facts: four figures under the opening */
.facts-strip .wrap { padding-top: 0; padding-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.stat-grid > div { padding: 40px 28px 36px; border-left: 1px solid var(--line); }
.stat-grid > div:first-child { border-left: 0; padding-left: 0; }
.stat-grid dt { font: 500 .72rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.stat-grid dd { margin: 14px 0 0; display: flex; align-items: baseline; gap: 6px; font-size: 2.7rem; font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-grid dd small { font-size: .95rem; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
.stat-grid p { margin: 12px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

/* the machines, as a spec sheet; their drawings' gradients are defined
   once, in an SVG of no size (one that is not displayed would lose them) */
.art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.lineup { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.machine { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--card-shadow); overflow: hidden; transition: border-color .2s; }
.machine:hover { border-color: var(--line-2); }
.m-art { position: relative; height: 176px; display: grid; place-items: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(70% 90% at 50% 100%, rgba(var(--ink), .06), transparent 70%), var(--bg-2); }
.m-art::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; background-position: center bottom;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 70%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 50% 70%, #000, transparent 75%); }
.m-art svg { position: relative; width: min(64%, 230px); height: auto; filter: drop-shadow(0 18px 22px var(--drop)); }
.m-art .stock { position: absolute; top: 14px; left: 14px; }
.m-art .m-tag { position: absolute; top: 14px; right: 14px; font: 500 .7rem/1 var(--mono); letter-spacing: .06em; color: var(--faint); }
.m-body { display: flex; flex-direction: column; gap: 18px; flex: 1; padding: 22px 24px 24px; }
.m-head h3 { font-size: 1.22rem; letter-spacing: -.03em; }
.m-head p { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.m-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.m-spec > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.m-spec > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.m-spec dt { font: 500 .68rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.m-spec dd { margin: 5px 0 0; font-size: .92rem; color: var(--text); }
.m-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.m-price strong { font-size: 1.85rem; font-weight: 600; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.m-price span { color: var(--muted); font-size: .86rem; }
.stock { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 8px; border-radius: 999px; font: 500 .7rem/1.3 var(--mono); letter-spacing: .04em; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); }
.stock.on { color: var(--signal); border-color: rgba(var(--signal-rgb), .3); }
.stock.on .dot { background: var(--signal); box-shadow: 0 0 8px rgba(var(--signal-rgb), .9); }
.mm-top { stop-color: var(--metal-1); }
.mm-mid { stop-color: var(--metal-2); }
.mm-low { stop-color: var(--metal-3); }
.mm-port { fill: var(--metal-port); }
.mm-led { fill: var(--signal); }
.mm-glow { fill: var(--signal); opacity: .35; }
.mm-screen { fill: var(--inv); }
.mm-screen-glow { stop-color: rgba(var(--signal-rgb), .28); }
.mm-screen-edge { stroke: var(--metal-3); }

/* plans */
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; padding: 3px; border-radius: 11px; background: rgba(var(--ink), .045); border: 1px solid var(--line); margin-top: 28px; }
.seg button { border: 0; background: none; color: var(--muted); font: 500 .88rem/1 var(--sans); padding: 9px 16px; border-radius: 8px; cursor: pointer; transition: color .15s, background .15s, box-shadow .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .2); }
[data-theme="light"] .seg button[aria-pressed="true"] { background: var(--surface); }
.seg button small { display: block; margin-top: 5px; font: 500 .68rem/1.2 var(--mono); color: var(--signal); }
.seg button[aria-pressed="true"] small { color: var(--signal); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; border-radius: var(--r-l); padding: 28px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--card-shadow); transition: border-color .2s; }
.plan:hover { border-color: var(--line-2); }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.plan h3 { font-size: 1.3rem; letter-spacing: -.03em; }
.plan .where { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.plan .where .icon { width: 15px; height: 15px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 500; line-height: 1.45; white-space: nowrap; background: rgba(var(--ink), .05); color: var(--muted); border: 1px solid var(--line); }
.pill .dot { width: 6px; height: 6px; }
.pill.ok { background: var(--mint-dim); color: var(--signal); border-color: rgba(var(--signal-rgb), .22); }
.pill.ok .dot { background: var(--signal); }
.pill.warn { background: var(--amber-dim); color: var(--amber); border-color: rgba(var(--amber-rgb), .24); }
.pill.warn .dot { background: var(--amber); }
.pill.info { background: rgba(var(--blue-rgb), .1); color: var(--blue); border-color: rgba(var(--blue-rgb), .22); }
.pill.info .dot { background: var(--blue); }
.pill.bad { background: var(--red-dim); color: var(--red); border-color: rgba(var(--red-rgb), .24); }
.pill.bad .dot { background: var(--red); }
.pill.big { font-size: .82rem; padding: 5px 12px; }
.price { margin: 28px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.price strong { font-size: 2.8rem; font-weight: 600; letter-spacing: -.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: .92rem; }
.price-alt { color: var(--faint); font-size: .95rem; margin: 28px 0 4px; min-height: 2.8rem; display: flex; align-items: center; }
.price { margin-bottom: 26px; }
.price-box .price { margin-bottom: 10px; flex-wrap: wrap; }
.price-how { margin: 0 0 24px; min-height: 3.2em; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.price-how .each { display: block; margin-top: 6px; color: var(--faint); font-size: .82rem; }
.price-how:has(.each) { min-height: 6.8em; }
.plan.with-ai { border-color: rgba(var(--signal-rgb), .2); background: linear-gradient(180deg, rgba(var(--signal-rgb), .055), transparent 36%), var(--surface); }
.plan.with-ai::after { content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--signal-rgb), .7), transparent); }
/* The stock badge sits above the name: beside it, a longer badge ("only 1
   left") broke the longer names in two and the cards' prices out of line. */
.plans .plan-top { flex-direction: column-reverse; align-items: flex-start; gap: 16px; }
.plans .plan .where { align-items: flex-start; min-height: 3.1em; line-height: 1.5; }
.plans .plan .where .icon { margin-top: 3px; }
.specs li > span { white-space: nowrap; padding-left: 12px; }
.plan-for { margin: -6px 0 26px; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.plan-for b { color: var(--text); font-weight: 500; }
.plans-foot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; margin-top: 16px; }
.team, .terms { margin: 0; border-radius: var(--r-l); border: 1px solid var(--line); padding: 26px 28px; background: rgba(var(--ink), .015); }
.team h3 { font-size: 1.1rem; margin-bottom: 10px; }
.team p { margin: 0 0 10px; font-size: .93rem; color: var(--text-2); }
.team p.muted { color: var(--muted); }
.team p:last-child { margin: 0; font-size: .88rem; }
.terms { list-style: none; display: grid; gap: 12px; align-content: start; color: var(--muted); font-size: .86rem; line-height: 1.65; }
.terms li { position: relative; padding-left: 16px; }
.terms li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 1px; background: var(--faint); }
.specs { list-style: none; margin: 0 0 28px; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.specs li { display: flex; align-items: center; gap: 11px; font-size: .92rem; }
.specs .icon { width: 17px; height: 17px; color: var(--faint); }
.specs span { color: var(--muted); margin-left: auto; font-size: .84rem; }
.plan .btn { margin-top: auto; }

/* how it works: the steps beside a terminal */
.how-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; position: relative; }
.steps li { counter-increment: s; position: relative; padding: 0 0 30px 58px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font: 500 .76rem var(--mono); color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--card-shadow); }
.steps li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--line-2), var(--line) 70%, transparent); }
.steps li:last-child::after { display: none; }
.steps li:first-child::before { color: var(--on-signal); background: var(--signal); border-color: transparent; box-shadow: 0 0 0 4px rgba(var(--signal-rgb), .12); }
.steps h3 { font-size: 1.05rem; margin-bottom: 7px; letter-spacing: -.02em; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; max-width: 32em; }
.band { background: var(--bg-2); }
.term { border-radius: var(--r-l); border: 1px solid var(--line-2); background: #0b0b0d; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05); overflow: hidden; color-scheme: dark; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.term-bar span { margin-left: 10px; font: 500 .72rem/1 var(--mono); color: #77777f; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term pre { margin: 0; padding: 18px 20px 22px; font: 400 .84rem/1.75 var(--mono); color: #d7d7dc; white-space: pre-wrap; overflow-wrap: anywhere; font-variant-ligatures: none; }
.term .p { color: #3ddba3; }
.term .c { color: #6f6f78; }
.term .o { color: #9b9ba3; }
.term .k { color: #e9e9ec; }
.term .ok { color: #3ddba3; }
.term .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #3ddba3; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, .07); font: 500 .72rem/1.4 var(--mono); color: #77777f; }
.term-foot .dot { background: #3ddba3; box-shadow: 0 0 8px rgba(61, 219, 163, .8); }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 2px; font-weight: 500; font-size: 1rem; transition: color .15s; }
summary:hover { color: var(--text-hi); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 14px; height: 14px; flex: none; opacity: .7;
  background: linear-gradient(var(--muted), var(--muted)) center / 100% 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 100% no-repeat; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: -4px 40px 22px 2px; line-height: 1.75; }

/* closing call: a shelf of Macs, one of them lit */
.closing { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line-2); padding: 56px 40px 72px; text-align: center; background: radial-gradient(520px 260px at 50% 0%, rgba(var(--signal-rgb), .1), transparent 70%), var(--surface); box-shadow: var(--card-shadow); }
.closing::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: center top;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 80%); mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 80%); }
.closing > * { position: relative; }
.rack { display: block; width: min(560px, 100%); height: auto; margin: 0 auto 36px; }
.rack .u { fill: var(--surface-3); stroke: var(--line-2); stroke-width: 1; }
.rack .u-led { fill: var(--faint); opacity: .7; }
.rack .u.mine { fill: var(--surface-2); stroke: rgba(var(--signal-rgb), .55); }
.rack .mine-led { fill: var(--signal); }
.rack .mine-glow { fill: var(--signal); opacity: .25; }
.rack .shelf { stroke: var(--line-2); stroke-width: 1; }
.closing h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.closing p { color: var(--muted); max-width: 30em; margin: 18px auto 32px; font-size: 1.05rem; }

.how-note { display: flex; gap: 10px; align-items: flex-start; margin: 52px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.how-note .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--faint); }
.terms li.docs { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line); }
.terms li.docs::before { display: none; }
.terms li.docs { padding-left: 0; }

/* the documents, as a list of ways out of a section */
.doc-links { display: grid; margin-top: 32px; max-width: 340px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--card-shadow); }
.doc-links > span { padding: 12px 16px 10px; font: 500 .7rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.doc-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .93rem; transition: color .15s, background .15s; }
.doc-links a:hover { color: var(--text); background: rgba(var(--ink), .035); }
.doc-links .icon { width: 15px; height: 15px; color: var(--faint); transition: transform .15s; }
.doc-links a:hover .icon { transform: translateX(3px); color: var(--text); }
.faq-all { margin: 28px 0 0; }

footer { border-top: 1px solid var(--line); padding: 64px 0 0; color: var(--muted); font-size: .9rem; margin-top: 0; overflow: hidden; }
footer.slim { padding: 26px 0 calc(30px + env(safe-area-inset-bottom)); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.foot-brand .brand { color: var(--text); }
.foot-brand p { margin: 18px 0 0; max-width: 26em; line-height: 1.7; }
.foot-brand .foot-contact { display: grid; gap: 4px; color: var(--text-2); }
.foot-contact span, .foot-grid h4, .help-nav h4 { font: 500 .7rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.foot-grid nav { display: grid; gap: 11px; align-content: start; justify-items: start; }
.foot-grid h4 { margin-bottom: 6px; }
.foot-grid nav a { color: var(--text-2); transition: color .15s; }
.foot-grid nav a:hover { color: var(--text); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--faint); font-size: .84rem; }
.foot-in nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-in nav a:hover { color: var(--text); }
.foot-status { display: inline-flex; align-items: center; gap: 8px; font: 500 .74rem/1 var(--mono); letter-spacing: .04em; color: var(--muted); }
.foot-status .dot { background: var(--signal); box-shadow: 0 0 8px rgba(var(--signal-rgb), .9); }
/* the name, large, sinking into the page's foot */
.foot-mark { margin: 36px 0 0; font-size: clamp(4.5rem, 17vw, 15.5rem); font-weight: 700; line-height: .78; letter-spacing: -.065em; white-space: nowrap; text-align: center; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--ink), .1) 0%, rgba(var(--ink), .02) 75%, rgba(var(--ink), 0) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: env(safe-area-inset-bottom); }

/* ---------- app pages ---------- */
.page { padding: 52px 0 56px; position: relative; }
.page > .wrap { position: relative; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.crumb .icon { width: 17px; height: 17px; }
.crumb:hover { color: var(--text); }
.page h1 { font-size: clamp(1.7rem, 2.8vw, 2.15rem); letter-spacing: -.04em; }
:lang(zh) .page h1 { letter-spacing: -.015em; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.page-head p.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 44px 0 14px; font: 500 .72rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.card { position: relative; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--card-shadow); padding: 26px; margin-bottom: 16px; }
.card h2 { font-size: 1.15rem; letter-spacing: -.025em; }
.card.form > h2 { margin-bottom: 6px; }
.card.form > h2 + div, .card.form > h2 + label, .card.form > h2 + fieldset { margin-top: 20px; }
.card.form > h2 + p { margin-top: 10px; }
.card.after-table { margin-top: 24px; }
.card.empty { text-align: center; padding: 56px 28px; border-style: dashed; background: rgba(var(--ink), .015); box-shadow: none; }
.card.empty p { color: var(--muted); margin-bottom: 22px; }

.alert { display: flex; gap: 11px; align-items: flex-start; border-radius: var(--r); padding: 12px 15px; margin: 0 0 18px; font-size: .92rem; line-height: 1.6; background: rgba(var(--ink), .04); border: 1px solid var(--line); color: var(--text-2); }
.alert .icon { width: 17px; height: 17px; margin-top: 3px; }
.alert.error { background: var(--red-dim); border-color: rgba(var(--red-rgb), .24); color: var(--red); }
.alert.warn { background: var(--amber-dim); border-color: rgba(var(--amber-rgb), .24); color: var(--amber); }

/* key / value, and credentials */
.kv { margin: 0; display: grid; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv > div:first-child { padding-top: 0; }
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv + .alert { margin: 20px 0 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; min-width: 0; }
.field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field code { flex: 1; min-width: 0; padding: 9px 13px; border-radius: var(--r-s); background: var(--well); border: 1px solid var(--line); color: var(--code); font-size: .86rem; line-height: 1.5; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.field code::-webkit-scrollbar { display: none; }
.field code.secret { letter-spacing: .12em; color: var(--muted); }
.field code.secret[data-shown] { letter-spacing: 0; color: var(--signal); }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font: 500 .8rem var(--sans); cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.tool:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-3); }
.tool .icon { width: 15px; height: 15px; }
.hint { display: block; margin-top: 8px; color: var(--faint); font-size: .82rem; line-height: 1.55; }
.card-sub { display: flex; align-items: center; gap: 12px; margin: 26px 0 18px; padding-top: 24px; border-top: 1px solid var(--line); }
.card-sub h3 { font-size: 1rem; }
.card-sub .ic, .card-head .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); flex: none; }
.card-sub .ic .icon, .card-head .ic .icon { width: 17px; height: 17px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card-head h3 { font-size: 1rem; }
.card-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 22px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; color: var(--muted); font-size: .91rem; }
.notes li { display: flex; gap: 11px; align-items: flex-start; }
.notes .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--faint); }

/* machine cards */
.rentals { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rental { position: relative; display: block; border-radius: var(--r-l); border: 1px solid var(--line); padding: 22px 24px; background: var(--surface); box-shadow: var(--card-shadow); transition: border-color .2s; }
.rental:hover { border-color: var(--line-3); }
.rental-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rental h3 { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; letter-spacing: -.025em; }
.rental dl { margin: 0; display: grid; gap: 9px; font-size: .88rem; }
.rental dl div { display: flex; justify-content: space-between; gap: 12px; }
.rental dt { color: var(--faint); }
.rental dd { margin: 0; color: var(--text-2); text-align: right; }
.rental .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-weight: 500; font-size: .88rem; color: var(--text); }
.rental .go .icon { width: 16px; height: 16px; transition: transform .15s; }
.rental:hover .go .icon { transform: translateX(3px); }

/* order progress */
.stepper { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.stepper li { position: relative; padding-top: 28px; text-align: center; font-size: .86rem; color: var(--faint); }
.stepper li::before { content: ""; position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); z-index: 1; }
.stepper li::after { content: ""; position: absolute; left: -50%; right: 50%; top: 6px; height: 2px; background: var(--line-2); }
.stepper li:first-child::after { display: none; }
.stepper li.done { color: var(--muted); }
.stepper li.done::before { background: var(--signal); border-color: var(--signal); }
.stepper li.done::after, .stepper li.now::after { background: var(--signal); }
.stepper li.now { color: var(--text); font-weight: 500; }
.stepper li.now::before { background: var(--field); border-color: var(--signal); box-shadow: 0 0 0 5px var(--mint-dim); }
.notice { display: flex; gap: 20px; align-items: flex-start; }
.notice .big-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(var(--amber-rgb), .2); }
.notice.ok .big-ic { background: var(--mint-dim); color: var(--signal); border-color: rgba(var(--signal-rgb), .22); }
.notice.busy .big-ic { background: rgba(var(--blue-rgb), .1); color: var(--blue); border-color: rgba(var(--blue-rgb), .2); }
.notice .big-ic .icon { width: 22px; height: 22px; }
.notice h2 { margin-bottom: 8px; }
.notice p { color: var(--muted); }
.notice .body { flex: 1; min-width: 0; }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
/* The sign-in, register and password pages put their heading at the same
   height whatever the form's length, so going from one to another does not
   jump: aligned to the top, not centred. Behind them, a faint grid. */
.form-shell { min-height: calc(100vh - 220px); display: grid; place-items: start center; padding: 64px 20px 80px; position: relative; overflow: hidden; }
.form-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(var(--ink), .13) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(55% 50% at 50% 22%, #000, transparent 75%); mask-image: radial-gradient(55% 50% at 50% 22%, #000, transparent 75%); }
.auth { position: relative; width: 100%; max-width: 400px; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head .brand-mark { width: 44px; height: 44px; margin-bottom: 20px; }
.auth-head h1 { font-size: 1.6rem; letter-spacing: -.035em; }
.auth-head p { color: var(--muted); margin: 10px 0 0; font-size: .95rem; }
.aside { text-align: center; color: var(--muted); margin-top: 20px; font-size: .9rem; }
.btn.google, .btn.google:hover { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .12); }
.btn.google:hover { background: var(--surface-3); }
.btn.google .g { width: 18px; height: 18px; flex: none; }
.or { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--faint); font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form label, .form fieldset { display: block; margin: 0 0 18px; font-weight: 500; font-size: .87rem; color: var(--text-2); }
.form fieldset { border: 0; padding: 0; min-width: 0; }
.form legend { padding: 0; margin-bottom: 12px; }
.form small { display: block; margin-top: 7px; font-weight: 400; color: var(--faint); font-size: .82rem; line-height: 1.5; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea {
  display: block; width: 100%; margin-top: 8px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--text); font: 400 .95rem/1.35 var(--sans); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); transition: border-color .15s, box-shadow .15s; }
textarea { line-height: 1.6; resize: vertical; }
textarea[name=ssh_key] { font: .84rem/1.6 var(--mono); }
input::placeholder, textarea::placeholder { color: var(--faint); }
/* A dropdown is drawn like the other fields, with its own arrow: the
   browser's is a light grey button that belongs to no dark page. */
select {
  display: block; width: 100%; margin-top: 8px; padding: 11px 40px 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field) var(--chevron) no-repeat right 13px center / 15px;
  color: var(--text); font: 400 .95rem/1.35 var(--sans); text-overflow: ellipsis; cursor: pointer;
  -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
select option { background: var(--pop); color: var(--text); }
/* With a mouse, app.js draws the open list as well (the system's takes no
   styling): the <select> stays in the form, unseen, under a button that
   looks like it, and the list hangs below. */
.select { position: relative; display: block; margin-top: 8px; }
.select > select { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.select-btn { display: block; width: 100%; padding: 11px 40px 11px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field) var(--chevron) no-repeat right 13px center / 15px; color: var(--text); font: 400 .95rem/1.35 var(--sans); text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.select-btn:hover { border-color: var(--line-3); }
.select-btn:focus-visible, .select.open .select-btn { outline: 0; border-color: rgba(var(--signal-rgb), .8); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .18); }
.select-list { position: absolute; z-index: 40; left: 0; top: calc(100% + 6px); min-width: 100%; max-width: min(420px, 92vw); max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  padding: 5px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--pop); box-shadow: var(--pop-shadow);
  font: 400 .92rem/1.3 var(--sans); color: var(--text); text-align: left; animation: pop .12s ease-out; }
.select.up .select-list { top: auto; bottom: calc(100% + 6px); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.select-opt { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 11px; border-radius: 8px; white-space: nowrap; cursor: pointer; }
.select-opt.active { background: rgba(var(--ink), .06); }
.select-opt[aria-selected="true"] { font-weight: 500; }
.select-opt[aria-selected="true"]::after { content: ""; flex: none; width: 6px; height: 11px; margin: -3px 4px 0 0; border: solid var(--signal); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.select-opt[aria-disabled="true"] { color: var(--faint); cursor: default; }
input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: rgba(var(--signal-rgb), .8); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .18); }
input:disabled, textarea:disabled, select:disabled, button:disabled { opacity: .5; cursor: not-allowed; }
/* numbers are typed: the browser's little steppers are not drawn */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* a field the browser filled in keeps the page's colours */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 9999s ease-out 0s;
  box-shadow: 0 0 0 1000px var(--field) inset, 0 0 0 3px rgba(var(--signal-rgb), 0); }
input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--field) inset, 0 0 0 3px rgba(var(--signal-rgb), .18); }
/* ticks and choices */
input[type=checkbox], input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; width: 17px; height: 17px; margin: 0; padding: 0; display: inline-grid; place-content: center;
  border: 1.5px solid var(--line-3); background: var(--field); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
input[type=checkbox] { border-radius: 5px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: rgba(var(--ink), .45); }
input[type=checkbox]:checked { border-color: var(--signal); background: var(--signal) var(--tick) center / 12px no-repeat; }
input[type=radio]:checked { border-color: var(--signal); box-shadow: inset 0 0 0 4px var(--field); background: var(--signal); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .25); }
input[type=radio]:checked:focus-visible { box-shadow: inset 0 0 0 4px var(--field), 0 0 0 3px rgba(var(--signal-rgb), .25); }
/* whoever moves through the page with the keyboard sees where they are */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
a:focus-visible, summary:focus-visible { border-radius: 6px; }
.btn:focus-visible, .nav nav a:focus-visible, .seg button:focus-visible { border-radius: 10px; }
.tool:focus-visible { border-radius: var(--r-s); }
.summary { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.summary .thumb { width: 72px; height: 72px; flex: none; border-radius: 14px; background: var(--well); border: 1px solid var(--line); display: grid; place-items: center; }
.summary .thumb svg { width: 52px; }
.summary h2 { font-size: 1.25rem; margin-bottom: 5px; }
.summary p { margin: 0; color: var(--muted); font-size: .9rem; }
.summary .pill { margin-left: auto; }
.units { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.unit { margin: 0 !important; cursor: pointer; position: relative; }
.unit input { position: absolute; opacity: 0; }
.unit span { display: block; border-radius: 12px; padding: 14px 15px; border: 1px solid var(--line-2); background: var(--field); transition: border-color .15s, background .15s, box-shadow .15s; }
.unit b { display: block; font-size: .95rem; font-weight: 500; color: var(--text); }
.unit i { display: block; margin-top: 4px; font-style: normal; font-weight: 400; color: var(--muted); font-size: .85rem; }
.unit input:checked + span { border-color: rgba(var(--signal-rgb), .7); background: rgba(var(--signal-rgb), .06); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .12); }
.unit input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.unit span { height: 100%; }
.unit small { display: block; margin-top: 6px; font-weight: 400; color: var(--signal); font-size: .78rem; line-height: 1.45; }
.units.wide { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.units.wide .unit small { color: var(--faint); }
a.unit.pick { display: block; }
a.unit.pick:hover span { border-color: var(--line-3); }
a.unit.pick.on span { border-color: rgba(var(--signal-rgb), .7); background: rgba(var(--signal-rgb), .06); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .12); }
a.unit.pick.out span { opacity: .55; }
.form fieldset > small { margin-top: 12px; }
.qty { display: flex !important; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px !important; }
.qty input { width: 110px; margin: 0; text-align: center; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 0; margin: 6px 0 4px; border-top: 1px solid var(--line); }
.total span { color: var(--muted); }
.total strong { font-size: 2rem; letter-spacing: -.045em; font-weight: 600; font-variant-numeric: tabular-nums; }

/* tables
   A cell keeps to one line, so a column is as wide as what it holds and a
   narrow one never breaks an order number or a name into a stack of
   syllables. A table wider than the page scrolls sideways inside its frame.
   Cells of free text (.wrap-cell, .note-cell) are the ones that wrap. */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--card-shadow);
  /* a table wider than its frame scrolls; a shade at an edge says more is hidden there (the covers move with the table, the shades stay) */
  background:
    linear-gradient(90deg, var(--surface) 35%, rgba(var(--surface-rgb), 0)) left center / 44px 100% no-repeat local,
    linear-gradient(270deg, var(--surface) 35%, rgba(var(--surface-rgb), 0)) right center / 44px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--drop), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--drop), transparent) right center / 14px 100% no-repeat scroll,
    var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .875rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th { color: var(--faint); font: 500 .68rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; background: rgba(var(--ink), .018); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(var(--ink), .018); }
td code { color: var(--code); font-size: .82rem; }
/* a cell's second line (when, by whom, a note) may wrap; the first, an ID or a name, does not */
td small { display: block; color: var(--faint); font-size: .78rem; margin-top: 3px; white-space: normal; }
td small code { font-size: 1em; color: inherit; white-space: nowrap; }
td a code, td small a code { color: var(--blue); }
td.num, th.num { text-align: right; }
td.actions { text-align: right; }
td.wrap-cell, td.note-cell { white-space: normal; min-width: 11em; max-width: 26em; overflow-wrap: anywhere; color: var(--muted); font-size: .86rem; line-height: 1.5; }
td.note-cell { white-space: pre-wrap; }
td.wrap-cell small { font-size: 1em; margin: 0; color: inherit; }
td.wrap-cell .inline-form { margin: 8px 0 0; }
/* What was ordered may run long: it wraps, but never below a readable width. */
td.item { white-space: normal; min-width: 13em; }
td.who { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
td .pill + .pill { margin-left: 4px; }
.team p .btn { margin-top: 6px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 0 10px; }
td.actions:has(.row-actions) { white-space: normal; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.row-actions .inline-form { margin: 0; }
.row-actions .inline-form input[type=text] { width: 136px; }
/* a cell of words that may take two lines when the table is short of room */
td.soft { white-space: normal; word-break: keep-all; min-width: 8em; }
.inline-form input[type=text] { margin: 0; width: 160px; padding: 7px 11px; font-size: .86rem; border-radius: 8px; }

/* ---------- help and documents ---------- */
.help-head { max-width: 760px; margin-bottom: 52px; }
.help-head h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); letter-spacing: -.045em; }
:lang(zh) .help-head h1 { letter-spacing: -.015em; }
.help-head .lead { margin: 18px 0 0; color: var(--muted); font-size: 1.06rem; line-height: 1.75; }
.help-head .meta { margin: 18px 0 0; color: var(--faint); font: 500 .76rem/1.4 var(--mono); letter-spacing: .03em; }
.help-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
.help-nav { position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow-y: auto; }
.help-nav h4 { margin: 0 0 12px 12px; }
.help-nav nav { display: grid; gap: 1px; }
.help-nav nav a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: .91rem; line-height: 1.45; transition: color .15s, background .15s; }
.help-nav nav a:hover { color: var(--text); background: rgba(var(--ink), .045); }
.help-nav nav i { flex: none; font: 500 .74rem var(--mono); font-style: normal; color: var(--faint); }
.help-nav .toc a { justify-content: flex-start; }
.help-nav .toc i { width: 1.6em; }
.help-nav .doc-links { margin-top: 28px; }
.faq-head { position: sticky; top: 92px; }
.faq-group { scroll-margin-top: 90px; margin-bottom: 56px; }
.faq-group h2 { font-size: 1.25rem; margin-bottom: 14px; }
.help-more { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 8px; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--card-shadow); }
.help-more h3 { font-size: 1.05rem; margin-bottom: 6px; }
.help-more p { margin: 0; color: var(--muted); font-size: .93rem; max-width: 34em; }
.doc-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: 40px; border: 1px solid var(--line); border-radius: 11px; background: rgba(var(--ink), .045); }
.doc-tabs a { padding: 8px 16px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 500; line-height: 1.2; transition: color .15s, background .15s; }
.doc-tabs a:hover { color: var(--text); }
.doc-tabs a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
[data-theme="light"] .doc-tabs a.on { background: var(--surface); }
.legal-body { max-width: 760px; }
.points { margin-bottom: 52px; padding: 26px 30px; border-radius: var(--r-l); border: 1px solid rgba(var(--signal-rgb), .22); background: rgba(var(--signal-rgb), .045); }
.points h2 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 16px; }
.points h2 .icon { color: var(--signal); }
.points ul, .legal-body section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.points li, .legal-body section li { position: relative; padding-left: 20px; color: var(--text-2); line-height: 1.75; }
.points li::before, .legal-body section li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 1px; background: var(--faint); }
.points li::before { background: var(--signal); }
.legal-body section { scroll-margin-top: 90px; padding-bottom: 36px; }
.legal-body section + section { padding-top: 36px; border-top: 1px solid var(--line); }
.legal-body section h2 { display: flex; align-items: baseline; gap: 14px; font-size: 1.25rem; margin-bottom: 18px; }
.legal-body section h2 span { font: 500 .78rem var(--mono); color: var(--faint); letter-spacing: 0; }
.legal-body section p { margin: 0 0 14px; color: var(--text-2); line-height: 1.8; }
.legal-body section ul { margin-bottom: 14px; }
.legal-body section > :last-child { margin-bottom: 0; }

/* agreeing to the terms */
.consent { display: grid; gap: 14px; margin: 0 0 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(var(--ink), .025); }
.consent-t { margin: 0; font-weight: 500; font-size: .88rem; color: var(--text); }
.form .consent .agree { display: flex !important; align-items: flex-start; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text); font-size: .9rem; font-weight: 400; line-height: 1.6; }
.consent .agree input { margin-top: 3px; flex: none; }
.consent-note { margin: 0 0 18px; color: var(--muted); font-size: .86rem; }
.aside.agree-note { margin-top: 12px; font-size: .82rem; color: var(--faint); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .framed > .wrap { border-left: 0; border-right: 0; }
  .framed > .wrap::before, .framed > .wrap::after { display: none; }
}
@media (max-width: 980px) {
  .faq { grid-template-columns: 1fr; gap: 28px; }
  .faq-head { position: static; }
  .plans-foot { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .framed > .wrap { padding-top: 80px; padding-bottom: 80px; }
  .framed.flush > .wrap { padding-top: 0; padding-bottom: 0; }
  .how-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
  .foot-brand { grid-column: 1 / -1; }
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .help-nav { position: static; max-height: none; overflow: visible; }
  .help-nav h4 { display: none; }
  .help-nav nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .help-nav nav::-webkit-scrollbar { display: none; }
  .help-nav nav a { flex: none; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
  .help-nav .toc i { width: auto; }
  .help-nav .doc-links { display: none; }
  .help-head { margin-bottom: 36px; }
}
@media (max-width: 860px) {
  /* --jr-words: how much of the stage the words take, from journey.js */
  .is-live .jr-shade { background: linear-gradient(0deg, var(--bg) 6%, rgba(var(--bg-rgb), .84) calc(var(--jr-words, 42%) * .8), rgba(var(--bg-rgb), 0) calc(var(--jr-words, 42%) * 1.42)); }
  .is-live .jr-copy { left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); top: auto; bottom: calc(100vh - 100svh + 34px); width: auto; max-width: 560px; transform: translateY(var(--jr-y, 0px)); }
  .jr-copy h1, :lang(zh) .jr-copy h1 { font-size: clamp(2rem, 8.4vw, 2.7rem); }
  .jr-copy h2 { font-size: clamp(1.6rem, 6.6vw, 2.2rem); }
  .is-live .jr-num { display: none; }
  .is-live .eyebrow { margin-bottom: 16px; }
  .jr-cta .btn { height: 46px; min-height: 0; padding: 0 20px; }
  /* a low screen (journey.js): the words keep to what must be said */
  .is-short .jr-copy h1, :lang(zh) .is-short .jr-copy h1 { font-size: clamp(1.8rem, 7.4vw, 2.3rem); }
  .is-short .jr-copy h2 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
  .is-short .jr-body { margin-top: 10px; font-size: .95rem; line-height: 1.55; }
  .is-short .jr-eyebrow { margin-bottom: 10px; }
  .is-short .eyebrow { margin-bottom: 12px; padding: 4px 11px 4px 9px; font-size: .78rem; }
  .is-short .jr-cta { margin-top: 18px; }
  .is-short .jr-cta .btn.ghost { display: none; }
  /* one row of tags: those that do not fit on it are left out whole */
  .is-short .jr-tags { margin-top: 14px; max-height: 30px; overflow: hidden; }
  .is-short .jr-tags li { padding: 4px 9px; font-size: .74rem; line-height: 18px; }
  .jr-body { margin-top: 14px; font-size: 1rem; line-height: 1.6; }
  .jr-cta { margin-top: 22px; }
  .jr-tags { margin-top: 18px; }
  .is-live .jr-mock, .is-live .jr-points, .is-live .jr-hint { display: none; }
  .is-live .jr-route { right: 4px; gap: 16px; top: 34%; }
  .jr-route span { display: none; }
  .is-flat .jr-flat { left: 50%; top: 30%; width: min(70vw, 360px); }
}
/* a phone held on its side: the words go back beside the Mac, as on a desk */
@media (max-width: 860px) and (orientation: landscape) {
  .is-live .jr-shade { background: linear-gradient(90deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), .64) 34%, rgba(var(--bg-rgb), 0) 64%), linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), 0) 20%); }
  .is-live .jr-copy { right: auto; top: calc(50% + 30px); bottom: auto; width: min(52vw, 520px); transform: translateY(calc(-50% + var(--jr-y, 0px))); }
  .is-live .jr-route { top: calc(50% + 30px); right: max(4px, env(safe-area-inset-right)); }
  .is-short .jr-copy h1, :lang(zh) .is-short .jr-copy h1 { font-size: 1.75rem; }
  .is-short .jr-copy h2 { font-size: 1.5rem; }
  .is-short .jr-body { font-size: .9rem; }
  .is-short .eyebrow { display: none; }
  .is-flat .jr-flat { left: 74%; top: 54%; width: min(36vw, 360px); }
}
@media (max-width: 620px) {
  .nav nav { gap: 2px; font-size: .88rem; }
  .nav nav a, .nav nav button.navlink { padding: 7px 9px; }
  .nav nav a.nav-cta { padding: 7px 12px; margin-left: 2px; }
  .nav nav a.lang { margin-left: 2px; padding: 4px 8px; }
  .nav nav a.theme { width: 30px; height: 30px; margin-left: 0; }
  .nav-in { gap: 10px; }
  .brand { gap: 9px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { padding-top: 48px; }
  .points { padding: 22px; }
  .help-more { padding: 22px; }
  .doc-tabs a { padding: 8px 12px; font-size: .86rem; }
  .doc-links { max-width: none; }
  .kv > div { grid-template-columns: 1fr; gap: 8px; }
  .closing { padding: 40px 20px 52px; border-radius: 16px; }
  .card, .plan { padding: 22px; }
  .notice { flex-direction: column; gap: 14px; }
  .page-head { flex-direction: column; }
  .summary .thumb { display: none; }
  .inline-form input[type=text] { width: 130px; }
  .stat-grid > div { padding: 28px 16px 26px; }
  .stat-grid > div:nth-child(odd) { padding-left: 0; }
  .stat-grid dd { font-size: 2.1rem; }
  .m-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot.live, .spin, .jr-hint i::after, .select-list, .term .cur { animation: none; }
  .is-live .jr-canvas { transition: none; }
  .btn:active { transform: none; }
}

/* admin settings */
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.settings .card h2 { margin-bottom: 6px; }
.settings .card > p.muted { margin-bottom: 22px; font-size: .91rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
/* a table of fields to fill in, set closer than one that is read */
table.grid input[type=text], table.grid input[type=number] { margin: 0; padding: 8px 10px; font-size: .88rem; border-radius: 8px; min-width: 70px; }
table.grid td { padding: 9px 8px; }
table.grid th { padding: 11px 8px; }
table.grid td:first-child, table.grid th:first-child { padding-left: 16px; }
table.grid td:last-child, table.grid th:last-child { padding-right: 16px; }
.inline-fields { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-fields label { margin: 0; }
.inline-fields input[type=number] { width: 140px; }
.inline-fields select, .inline-fields .select { width: 140px; }
.inline-fields .select select { width: 100%; }
.inline-fields .btn { height: 45px; }
.plan-edit { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 14px; background: rgba(var(--ink), .015); }
.plan-edit h3 { font-size: 1rem; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan-edit .prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 14px; }
.check { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 400 !important; margin: 0 !important; color: var(--text-2); cursor: pointer; }
.check input { width: 17px; height: 17px; }
.alert.ok { background: var(--mint-dim); border-color: rgba(var(--signal-rgb), .24); color: var(--signal); }
.save-bar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* admin: accounts, second factor */
.admin-nav { display: none; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-opt { display: flex !important; gap: 12px; align-items: flex-start; margin: 0 !important; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 400 !important; transition: border-color .15s, background .15s; }
.role-opt input { margin-top: 2px; }
.role-opt strong { font-weight: 500; color: var(--text); }
.role-opt small { margin-top: 4px !important; }
.role-opt:hover { border-color: var(--line-2); }
.role-opt:has(input:checked) { border-color: rgba(var(--signal-rgb), .5); background: rgba(var(--signal-rgb), .05); }
.temp-pass p { margin: 0 0 8px; }
code.secret { font-size: 1.02rem; letter-spacing: .06em; user-select: all; color: var(--text); }
.mfa-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.mfa-setup img { background: #fff; padding: 8px; border-radius: 12px; image-rendering: pixelated; }
.wrap-row { flex-wrap: wrap; }
.btn.danger { color: var(--red); }
form.center { text-align: center; margin-top: 18px; }
@media (max-width: 720px) { .roles { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 16px 0 0; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; }
.card-zone { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
/* what cannot be undone sits apart, in a frame of its own */
.danger-zone { margin-top: 22px; padding: 18px 20px 20px; border: 1px solid rgba(var(--red-rgb), .26); border-radius: var(--r); background: rgba(var(--red-rgb), .035); display: grid; gap: 14px; }
.danger-zone > p { margin: 0; font-size: .9rem; }
.danger-zone > small { color: var(--faint); font-size: .82rem; }
.inline-fields > label { font-size: .87rem; font-weight: 500; color: var(--text-2); }
.card-zone > form { justify-self: start; }
.danger-zone .inline-fields input[type=text] { width: 240px; }
.inline-fields .grow { flex: 1; min-width: 220px; }
.inline-fields .grow input, .inline-fields .grow select, .inline-fields .grow .select { width: 100%; }
.note { border-top: 1px solid var(--line); padding: 12px 0 2px; }
.note p { margin: 6px 0 0; white-space: pre-wrap; }
small.clip { display: -webkit-box; max-width: 240px; overflow: hidden; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; }
.form textarea { width: 100%; }
.redeem-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 22px 0 8px; }
.redeem-inline label { flex: 1; min-width: 240px; margin: 0 !important; }
.codes-out { width: 100%; font-family: var(--mono); font-size: .92rem; letter-spacing: .05em; border-radius: 10px; border: 1px solid var(--line-2); background: var(--well); color: var(--text); padding: 12px 14px; margin-top: 12px; }
.direct-off { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 18px; }
.direct-off p { margin: 0; flex: 1; min-width: 240px; }
.direct-close { display: flex; gap: 12px; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; margin: 6px 0 0; }
.reinstall { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0 0; }

/* The space for the scroll bar is kept on every page, so a page short
   enough to need none is not wider than the next (where scroll bars take
   room). */
html { scrollbar-gutter: stable; }

/* Mailed codes: the field with its "send" button beside it, the sign-in
   tabs (password | code), and the hidden default button that Enter uses. */
.code-row { display: flex; gap: 8px; margin-top: 8px; }
.code-row input { margin-top: 0; flex: 1; min-width: 0; letter-spacing: .18em; font-family: var(--mono); }
.code-row input::placeholder { letter-spacing: .18em; }
.code-row .btn { height: auto; min-height: 45px; flex: none; padding: 0 16px; font-size: .88rem; border-radius: 10px; }
.code-row .btn:disabled { opacity: .6; font-variant-numeric: tabular-nums; }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.form { position: relative; }
.auth-tabs { display: flex; padding: 3px; margin: 0 0 14px; border-radius: 11px; background: rgba(var(--ink), .045); border: 1px solid var(--line); }
.auth-tabs a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 8px; color: var(--muted); font: 500 .9rem/1 var(--sans); text-decoration: none; transition: color .15s, background .15s; }
.auth-tabs a:hover { color: var(--text); }
.auth-tabs a[aria-current="page"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .15); }
[data-theme="light"] .auth-tabs a[aria-current="page"] { background: var(--surface); }
.form .center-note { text-align: center; margin-top: 14px; }
.narrow-form .code-row, .narrow-form > label { max-width: 520px; }
.save-bar .link { margin-right: auto; align-self: center; font-size: .88rem; }

/* Support: the ways to reach us, the contact form's trap field, a
   ticket's conversation and the admin's status filter. */
.support-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 8px; }
.support-way { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; transition: border-color .15s; }
.support-way:hover { border-color: var(--line-3); }
.support-way h2 { font-size: 1.02rem; margin: 0; }
.support-way p { margin: 0; flex: 1; font-size: .9rem; }
.support-way .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: .88rem; color: var(--text); }
.support-way .go .icon { width: 16px; height: 16px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.thread { list-style: none; margin: 8px 0 20px; padding: 0; display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; background: var(--surface); margin-right: 48px; }
.msg.staff { background: rgba(var(--signal-rgb), .045); border-color: rgba(var(--signal-rgb), .2); margin: 0 0 0 48px; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.msg-head strong { color: var(--text); font-weight: 500; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.filter-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 0 0 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(var(--ink), .035); }
.filter-tabs a { padding: 6px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .86rem; transition: color .15s, background .15s; }
.filter-tabs a:hover { color: var(--text); }
.filter-tabs a b { margin-left: 5px; font: 500 .74rem var(--mono); color: var(--faint); }
.filter-tabs a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
[data-theme="light"] .filter-tabs a.on { background: var(--surface); }
.filter-tabs a.on b { color: var(--text-2); }
@media (max-width: 720px) { .msg, .msg.staff { margin: 0; } }

/* Ticket attachments: the picker, the files chosen, and the files in a
   conversation (pictures as thumbnails, the rest as chips). */
.file-field { margin: 0 0 20px; }
.form .file-pick { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: 9px; border: 1px dashed var(--line-3); color: var(--text); font-weight: 500; font-size: .88rem; cursor: pointer; }
.file-pick:hover { border-color: rgba(var(--ink), .4); }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-pick:focus-within { box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .18); border-color: var(--signal); }
.form.dropping { box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .35); }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); font-size: .88rem; }
.file-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; flex: none; }
.file-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list small { margin: 0; color: var(--faint); }
.file-field .alert { margin: 12px 0 0; }
.msg-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.msg-shot { display: block; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--field); }
.msg-shot img { display: block; max-width: 220px; max-height: 160px; object-fit: contain; }
.msg-file { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--field); color: var(--text); text-decoration: none; font-size: .88rem; max-width: 100%; }
.msg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file small { color: var(--faint); flex: none; }
.tool.did { color: var(--signal); border-color: rgba(var(--signal-rgb), .4); }

/* The AI page: this week's limit as a bar, and the settings to copy. */
.ai-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ai-meter { --bar: var(--signal); display: block; width: 100%; height: 8px; margin: 18px 0 6px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); overflow: hidden; appearance: none; -webkit-appearance: none; color: var(--bar); }
.ai-meter::-webkit-progress-bar { background: var(--well); border-radius: 999px; }
.ai-meter::-webkit-progress-value { background: var(--bar); border-radius: 999px; }
.ai-meter::-moz-progress-bar { background: var(--bar); border-radius: 999px; }
.ai-status:has(.pill.warn) .ai-meter { --bar: var(--amber); }
.ai-status:has(.pill.bad) .ai-meter { --bar: var(--red); }
.ai-newkey { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.ai-newkey label { flex: 1; min-width: 200px; }
.ai-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-left: 1.2em; margin: 0 0 12px; }
.ai-steps li p { margin: 0 0 8px; }
pre.snippet { margin: 0 0 8px; padding: 12px 14px; border-radius: var(--r-s); background: var(--well); border: 1px solid var(--line); color: var(--code); font-family: var(--mono); font-size: .84rem; overflow-x: auto; }
.ai-fine { margin-top: 18px; font-size: .86rem; }

/* The AI home: getting started, the limits, the charts, upgrades. */
.ai-start { margin-bottom: 18px; }
.ai-start-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.ai-start-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.ai-start-steps li { counter-increment: step; position: relative; padding-left: 38px; }
.ai-start-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 500 .8rem var(--mono); border: 1px solid var(--line-2); color: var(--muted); background: var(--surface-2); }
.ai-start-steps li.done::before { content: "✓"; background: var(--mint-dim); color: var(--signal); border-color: transparent; }
.ai-start-steps li.done b { color: var(--muted); text-decoration: line-through; }
.ai-start-steps p { margin: 4px 0 10px; font-size: .88rem; }
.ai-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }
.ai-limit { margin-top: 18px; }
.ai-limit-head { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.ai-limit .ai-meter { margin: 8px 0 4px; }
.ai-limit.warn .ai-meter { --bar: var(--amber); }
.ai-limit.bad .ai-meter { --bar: var(--red); }
.ai-models { margin-top: 18px; font-size: .86rem; }
.ai-chart-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-chart-head + .ai-year-wrap, .ai-legend + .ai-chart-head, .ai-empty + .ai-chart-head { margin-top: 22px; }
.ai-chart-head h2 { font-size: 1rem; margin: 0; }
.ai-chart, .ai-year { display: block; width: 100%; height: auto; }
.ai-chart .grid { stroke: var(--line); stroke-width: 1; }
.ai-chart .axis, .ai-year .axis { fill: var(--faint); font-size: 11px; font-family: var(--mono); }
.m-opus { fill: var(--violet); background: var(--violet); }
.m-sonnet { fill: var(--blue); background: var(--blue); }
.m-haiku { fill: var(--signal); background: var(--signal); }
.m-fable { fill: var(--amber); background: var(--amber); }
.m-other { fill: var(--faint); background: var(--faint); }
.ai-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; font-size: .83rem; color: var(--muted); }
.ai-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ai-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ai-empty { padding: 30px 0; text-align: center; }
.ai-year-wrap { overflow: visible; }
.ai-year { min-width: 0; }
.ai-year .lv0 { fill: rgba(var(--ink), .07); stroke: none; }
.ai-year .lv1 { fill: rgba(var(--signal-rgb), .3); }
.ai-year .lv2 { fill: rgba(var(--signal-rgb), .5); }
.ai-year .lv3 { fill: rgba(var(--signal-rgb), .75); }
.ai-year .lv4 { fill: var(--signal); }
.ai-upgrade { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.ai-upgrade > div:first-of-type { display: grid; gap: 4px; }
.ai-upgrade-pay { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .88rem; }
.ai-upgrade-pay .check { margin: 0; font-size: .84rem; }
.ai-car-head { margin: 26px 0 14px; }
.ai-car-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.ai-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.ai-filters label { flex: 1; min-width: 150px; margin: 0; }
.ai-team-head { margin: 26px 0 4px; font-size: 1.02rem; }
.plan.team { border-color: rgba(var(--signal-rgb), .28); }
.ai-team-actions { display: block; margin: 8px 0 14px; }
form.inline.ai-share { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
form.inline.ai-share input { width: 72px; flex: none; margin: 0; padding: 6px 8px; }
form.inline.ai-share + small { display: block; margin-top: 4px; }
/* The AI page, second pass: the allowance across the page, its limits in a
   grid; the two charts side by side; compact plan cards; the order page. */
.ai-status { margin-bottom: 18px; }
.ai-status-head p { margin: 4px 0 0; }
.ai-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 28px; }
@media (max-width: 760px) { .ai-limits { grid-template-columns: minmax(0, 1fr); } }
.ai-limit-head b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 8px; }
.ai-charts > .card { min-width: 0; }
@media (max-width: 1000px) { .ai-charts { grid-template-columns: minmax(0, 1fr); } }
.ai-plans-lead { margin: -4px 0 6px; max-width: 760px; }
.ai-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ai-plan { padding: 24px; }
.ai-plan .price { margin: 22px 0 18px; }
.ai-plan .price strong { font-size: 2.25rem; }
.ai-plan .specs { margin-bottom: 18px; }
.ai-plan .plan-for { margin: 0 0 18px; }
.ai-plan .btn { margin-top: auto; }
.ai-plan .where .pill { padding: 1px 8px; font-size: .72rem; }
.ai-order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .ai-order { grid-template-columns: minmax(0, 1fr); } }
.ai-order .specs { margin: 14px 0 18px; }
/* /admin/ai: the cars and the plans, each a block of labelled fields that
   wrap to the width there is (one line on a wide screen, two or three on a
   laptop, two abreast on a phone), so nothing scrolls sideways. */
.ed-list { display: grid; gap: 10px; }
.ed-item { min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(var(--ink), .015); }
.ed-item.is-new { border-style: dashed; background: none; }
.ed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 26px; margin: 0 0 12px; }
.ed-title { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; font-weight: 600; color: var(--text); }
.ed-title .icon { width: 16px; height: 16px; color: var(--muted); }
.ed-head code { padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: rgba(var(--ink), .05); color: var(--muted); font-size: .76rem; }
.ed-hint { color: var(--faint); font-size: .82rem; }
.ed-head .ed-del { margin-left: auto !important; font-size: .84rem; }
/* The fields come in groups (basics, names, prices) that move to the next
   line whole; a group too wide for a line of its own wraps inside itself.
   --n is how many fields wide a group is, for the line it would like. */
.ed-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.ed-group { --n: 4; flex: 1 1 calc(var(--n) * 118px + (var(--n) - 1) * 12px); min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; align-items: end; }
.ed-group.n1 { --n: 1; } .ed-group.n2 { --n: 2; } .ed-group.n3 { --n: 3; } .ed-group.n4 { --n: 4; } .ed-group.n5 { --n: 5; } .ed-group.n6 { --n: 6; }
.form .ed-group > label { min-width: 0; margin: 0; font: 500 .66rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.ed-group > label.w2 { grid-column: span 2; }
.ed-fields input[type=text], .ed-fields input[type=number], .ed-fields select, .ed-fields .select-btn { margin-top: 6px; padding: 9px 11px; border-radius: 9px; font-size: .9rem; letter-spacing: normal; text-transform: none; }
.ed-fields .select { margin-top: 6px; }
.ed-fields .select > select, .ed-fields .select .select-btn { margin-top: 0; }
.ed-fields .select-btn { padding-right: 34px; background-position: right 10px center; }
/* a yes-or-no beside the fields: a box of the fields' height */
.form .ed-group > label.ed-check { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--field); font: 400 .86rem/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.ed-check span { min-width: 0; line-height: 1.25; }
.ed-check:hover { border-color: var(--line-3); }
.ed-check:has(input:checked) { border-color: rgba(var(--signal-rgb), .5); background: rgba(var(--signal-rgb), .06); color: var(--text); }
.ed-group > .w3 { grid-column: span 3; }
.ed-group > .w4 { grid-column: span 4; }
.ed-group > .ed-multi { min-width: 0; }
.ed-label { display: block; font: 500 .66rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 380px) { .ed-group > label.w2 { grid-column: 1 / -1; } }
@media (max-width: 720px) { .ed-group > .w3, .ed-group > .w4 { grid-column: 1 / -1; } }

/* Choosing several of a few (model families, sites): each a chip with its
   box; a ticked one takes the signal colour. Plain boxes underneath, so
   the form works without scripts. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; margin-top: 6px; }
.form .chips > label.chip, .chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; margin: 0; padding: 0 12px 0 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--field);
  font: 500 .85rem/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); cursor: pointer; user-select: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.chip input[type=checkbox] { width: 15px; height: 15px; border-radius: 4px; }
.chip code { font-size: .8rem; color: inherit; }
.chip:hover { border-color: var(--line-3); }
.chip:has(input:checked) { color: var(--text); border-color: rgba(var(--signal-rgb), .55); background: rgba(var(--signal-rgb), .08); }
.chips-all { display: none; align-items: center; height: 34px; padding: 0 4px; color: var(--faint); font: 500 .8rem/1 var(--sans); }
.chips:not(:has(input:checked)) .chips-all { display: inline-flex; }
.chips .chip-other { width: 170px; height: 34px; margin: 0; padding: 0 12px; border-radius: 999px; font-size: .85rem; }
.sites-field .chips { margin: 0; }

table.ai-uses td { white-space: normal; vertical-align: top; }
table.ai-uses td .pill { margin: 0 6px 6px 0; }
table.ai-uses td:last-child { white-space: nowrap; }

/* ---------- the console: the staff pages ----------
   A sidebar with the sections a role may open, the signed-in person at its
   foot; the page beside it. Its text is set a size smaller than the shop's
   (1rem is 15px here), for the tables. */
:root:has(body.is-console) { font-size: 15px; }
.console { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 12px 12px 14px; background: var(--bg-2); border-right: 1px solid var(--line); z-index: 40; }
[data-theme="light"] .side { background: var(--bg); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; padding: 0 8px; margin-bottom: 10px; }
.side .brand { font-size: .98rem; gap: 9px; }
.side .brand-mark { width: 24px; height: 24px; }
.side .brand em { font-style: normal; font: 500 .62rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-label { margin: 18px 10px 6px; font: 500 .64rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.side-label:first-child { margin-top: 4px; }
.side-nav a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: .92rem; line-height: 1.3; transition: color .12s, background .12s; }
.side-nav a:hover { color: var(--text); background: rgba(var(--ink), .045); }
.side-nav a.on { color: var(--text); background: rgba(var(--ink), .075); box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="light"] .side-nav a.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(20, 20, 17, .06); }
.side-nav a .icon { width: 17px; height: 17px; color: var(--faint); transition: color .12s; }
.side-nav a:hover .icon, .side-nav a.on .icon { color: var(--text); }
.side-nav a .badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font: 600 .68rem/1 var(--mono); color: var(--on-signal); background: var(--signal); }
.side-nav a .ext { margin-left: auto; width: 13px; height: 13px; opacity: .7; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 8px; border-radius: 10px; transition: background .12s; }
.side-user:hover, .side-user.on { background: rgba(var(--ink), .045); }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font: 600 .82rem/1 var(--sans); text-transform: uppercase; color: var(--on-signal); background: linear-gradient(140deg, var(--signal-hi), var(--signal)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.side-user span { min-width: 0; display: grid; }
.side-user b { font-size: .86rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { font-size: .74rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-tools { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.side-tools > a, .side-tools button { display: inline-grid; place-items: center; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 7px; border: 0; background: none; color: var(--muted); font: 500 .74rem/1 var(--mono); cursor: pointer; transition: color .12s, background .12s; }
.side-tools > a:hover, .side-tools button:hover { color: var(--text); background: rgba(var(--ink), .055); }
.side-tools .icon { width: 16px; height: 16px; }
.side-tools form { margin: 0 0 0 auto; }
.side-tools .out { display: inline-flex; gap: 6px; font-family: var(--sans); font-size: .82rem; }
.console-main { min-width: 0; display: flex; flex-direction: column; }
.console-main > main { flex: 1; }
.console .page { padding: 34px 44px 64px; }
/* the page takes all the width beside the sidebar, however wide the screen */
.console .wrap, .console .wrap.narrow { max-width: none; margin: 0; padding: 0; }
.console .page h1 { font-size: 1.65rem; letter-spacing: -.035em; }
.console .page-head { margin-bottom: 26px; }
.console .page-head p { font-size: .93rem; }
.console .crumb { margin-bottom: 14px; font-size: .86rem; }
.console .sec-title { margin: 36px 0 12px; }
.console .card { padding: 22px 24px; }
.console .card h2 { font-size: 1.08rem; }
.console-foot { padding: 18px 44px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--faint); font-size: .8rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.console-foot a:hover { color: var(--text); }
/* the overview's figures */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 22px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--card-shadow); transition: border-color .15s; }
a.kpi:hover { border-color: var(--line-3); }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.kpi-label .icon { width: 15px; height: 15px; color: var(--faint); }
.kpi strong { margin-top: 6px; font-size: 1.95rem; font-weight: 600; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi strong small { margin-left: 4px; font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--faint); }
.kpi > small { color: var(--faint); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi.attn { border-color: rgba(var(--amber-rgb), .3); }
.kpi.attn strong { color: var(--amber); }
.kpi.good strong { color: var(--signal); }
.kpi .bar { display: flex; gap: 3px; height: 4px; margin-top: 10px; border-radius: 99px; overflow: hidden; background: rgba(var(--ink), .07); }
.kpi .bar i { display: block; height: 100%; background: var(--signal); }
.kpi .bar i.b { background: var(--blue); }
.kpi .bar i.w { background: var(--amber); }
/* a table with its heading, in one frame */
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--card-shadow); margin: 0 0 18px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: .98rem; font-weight: 600; letter-spacing: -.015em; }
.panel-head .count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font: 500 .72rem/1 var(--mono); color: var(--muted); background: rgba(var(--ink), .06); border: 1px solid var(--line); }
.panel-head .count.attn { color: var(--amber); background: var(--amber-dim); border-color: rgba(var(--amber-rgb), .24); }
.panel-head .more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--muted); }
.panel-head .more:hover { color: var(--text); }
.panel-head .more .icon { width: 15px; height: 15px; }
.panel .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.panel-empty { margin: 0; padding: 26px 20px; color: var(--muted); font-size: .9rem; }
.panel-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel-cols > .panel { margin: 0; }
.panel-cols + .panel, .panel-cols + .panel-cols { margin-top: 18px; }
.state-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.console .alert { margin-bottom: 14px; }
.console .table-wrap + .card, .console .table-wrap + .sec-title { margin-top: 28px; }
/* the bar of the staff sign-in pages, before anyone is signed in */
.gate-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; border-bottom: 1px solid var(--line); }
.gate-bar .brand em { font-style: normal; font: 500 .62rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; }
.gate-bar .nav-tools { border: 0; }
.gate-bar .nav-tools a { display: inline-grid; place-items: center; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 8px; color: var(--muted); }
.gate-bar .nav-tools a:hover { color: var(--text); background: rgba(var(--ink), .05); }
.gate-bar .nav-tools a.lang { font: 500 .76rem/1 var(--mono); border: 1px solid var(--line-2); height: 28px; }
@media (max-width: 1180px) {
  .console { grid-template-columns: 212px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .panel-cols { grid-template-columns: minmax(0, 1fr); }
  .console .page { padding: 30px 28px 56px; }
  .console-foot { padding-left: 28px; padding-right: 28px; }
}
/* narrower than a laptop (a tablet, a small window): the sidebar becomes a
   bar across the top whose menu opens below it (app.js, as the shop's does),
   and the tables get the whole width */
@media (max-width: 1100px) {
  .console { display: block; }
  .side { position: sticky; top: 0; height: auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); border-right: 0; border-bottom: 1px solid var(--line); background: rgba(var(--bg-rgb), .86); -webkit-backdrop-filter: saturate(150%) blur(16px); backdrop-filter: saturate(150%) blur(16px); }
  .side-top { height: 58px; margin: 0; padding: 0; }
  .side .nav-toggle { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
  .side .nav-toggle .icon { width: 24px; height: 24px; stroke-width: 1.7; }
  .side .nav-toggle path { transform-box: view-box; transform-origin: 12px 12px; transition: transform .22s ease; }
  .side.open .nav-toggle .bar-1 { transform: translateY(4px) rotate(45deg); }
  .side.open .nav-toggle .bar-2 { transform: translateY(-4px) rotate(-45deg); }
  .side-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 58px); max-height: calc(100dvh - 58px); padding: 6px max(var(--gutter), env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -24px var(--drop); }
  .side.open .side-nav { display: flex; animation: sheet .18s ease-out; }
  .side-nav a { min-height: 46px; font-size: 1rem; }
  .console .page { padding: 26px var(--gutter) 48px; }
  .console-foot { padding-left: var(--gutter); padding-right: var(--gutter); }
}

/* ---------- phones ----------
   Kept last, so it has the final word over everything above. Three things
   change on a narrow screen: the bar's links fold into a sheet, a table's
   rows are drawn as cards, and whatever is pressed is sized for a thumb.
   The sheet and the cards need app.js (it opens the one and names the cells
   of the other), so they are asked for under .js, which theme.js puts on
   <html>; without scripts the bar keeps a short row of links and a wide
   table scrolls sideways in its frame. */
@media (hover: none) {
  .btn:active { transform: none; }
  .btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .12); }
  tbody tr:hover td { background: none; }
}
/* An iPhone zooms the page in on a field whose text is under 16px, and
   leaves it zoomed. */
@media (max-width: 720px), (pointer: coarse) {
  input[type=text], input[type=email], input[type=password], input[type=number], textarea, select, .select-btn { font-size: 16px !important; }
}
@media (pointer: coarse) {
  a, button, summary, label, .btn { -webkit-tap-highlight-color: transparent; }
  .btn.small { height: 40px; }
}
@keyframes sheet { from { opacity: 0; transform: translateY(-6px); } }

/* A tablet, or a narrow window: the bar's links fold into the sheet and a
   table's rows become cards (a wide bar, a wide table no longer fit). */
@media (max-width: 960px) {
  /* the bar */
  .hide-s { display: none; }
  .js .nav-in { gap: 8px; }
  .js .nav-quick { display: inline-flex; align-items: center; height: 34px; margin-left: auto; padding: 0 13px; border-radius: 8px; font-size: .88rem; font-weight: 500; white-space: nowrap; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
  .js .nav-quick.cta { color: var(--inv); background: var(--text); box-shadow: var(--btn-shadow); }
  .js .nav-toggle { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
  .nav-toggle .icon { width: 24px; height: 24px; stroke-width: 1.7; }
  .nav-toggle path { transform-box: view-box; transform-origin: 12px 12px; transition: transform .22s ease; }
  .nav.open .nav-toggle .bar-1, .side.open .nav-toggle .bar-1 { transform: translateY(4px) rotate(45deg); }
  .nav.open .nav-toggle .bar-2, .side.open .nav-toggle .bar-2 { transform: translateY(-4px) rotate(-45deg); }
  .js .nav.open { background: var(--bg); }
  /* the sheet */
  .js .nav nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain;
    padding: 4px max(var(--gutter), env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -24px var(--drop); font-size: 1.02rem; }
  .js .nav.open nav { display: flex; animation: sheet .18s ease-out; }
  .js .nav nav > a, .js .nav nav button.navlink { display: flex; align-items: center; width: 100%; min-height: 54px; margin: 0; padding: 0 2px; border-radius: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font-weight: 500; text-align: left; box-shadow: none; }
  .js .nav nav > a:hover, .js .nav nav button.navlink:hover { background: none; }
  .js .nav nav > a.nav-cta, .js .nav nav > a.nav-me { color: var(--text); background: none; font-weight: 500; box-shadow: none; }
  .js .nav nav form.inline { display: block; }
  .js .nav nav button.navlink { color: var(--muted); }
  .js .nav-tools { display: flex; justify-content: space-between; order: 10; margin: 0; padding: 16px 0 0; border: 0; }
  .js .nav nav a.theme { width: 44px; height: 44px; margin: 0; border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); }
  .js .nav nav a.lang { display: inline-flex; align-items: center; height: 44px; margin: 0; padding: 0 18px; border-color: var(--line-2); border-radius: 12px; color: var(--text); font-size: .86rem; }

  /* tables: a row is a card. Its first cell is the card's heading, and the
     others sit two abreast under their columns' names (data-label, from
     app.js); the cells that hold a sentence or buttons take the whole width. */
  .js .table-wrap { overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .js .table-wrap table, .js .table-wrap tbody { display: block; }
  .js .table-wrap thead { display: none; }
  .js .table-wrap tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 10px; padding: 16px 18px 18px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--card-shadow); }
  .js .table-wrap tr:last-child { margin-bottom: 0; }
  .js .table-wrap td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; background: none; white-space: normal; overflow-wrap: anywhere; text-align: left; font-size: .93rem; line-height: 1.5; }
  .js .table-wrap td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--faint); font: 500 .66rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .js .table-wrap td:first-child, .js .table-wrap td.item, .js .table-wrap td.who, .js .table-wrap td.wrap-cell, .js .table-wrap td.note-cell, .js .table-wrap td.actions, .js .table-wrap td[colspan] { grid-column: 1 / -1; }
  .js .table-wrap td:first-child { padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 1rem; font-weight: 500; }
  .js .table-wrap td:first-child::before { display: none; }
  .js .table-wrap td:first-child:last-child { padding-bottom: 0; border-bottom: 0; }
  .js .table-wrap td.blank { display: none; }
  .js .table-wrap td.wrap-cell, .js .table-wrap td.note-cell { color: var(--text-2); }
  .js .table-wrap td.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
  .js .table-wrap td.actions::before { display: none; }
  .js .table-wrap .inline-form { margin: 0; }
  .js .table-wrap td.actions .inline-form:has(input[type=text]) { display: flex; flex-wrap: wrap; flex: 1 1 100%; min-width: 0; }
  .js .table-wrap td.actions .inline-form input[type=text] { flex: 1 1 130px; width: 0; min-width: 0; padding: 9px 12px; }
  .js .table-wrap td.actions .inline-form .btn { flex: 0 1 auto; }
  .js .table-wrap td.actions .row-actions { flex: 1 1 100%; justify-content: flex-start; }
  .js .table-wrap td.wrap-cell .inline-form { margin-top: 10px; }
  .js .table-wrap td .pill { margin: 2px 4px 2px 0; white-space: normal; border-radius: 12px; }
  .js .table-wrap td .pill + .pill { margin-left: 0; }
  /* inside a panel the cards sit on the panel's own ground */
  .js .panel .table-wrap { padding: 12px; }
  .js .panel .table-wrap tr { background: var(--bg-2); box-shadow: none; }
  [data-theme="light"] .js .panel .table-wrap tr { background: var(--bg); }
  /* a table of fields: every cell is a field under its name */
  .js .table-wrap table.grid tr { gap: 12px; padding: 14px 16px 16px; }
  .js .table-wrap table.grid td:first-child { grid-column: auto; padding: 0; border: 0; font-size: .93rem; font-weight: 400; }
  .js .table-wrap table.grid td:first-child::before { display: block; }
  .js .table-wrap table.grid td:last-child { grid-column: 1 / -1; }
  .js .table-wrap table.grid td:last-child::before { display: none; }
  .js .table-wrap table.grid input[type=text], .js .table-wrap table.grid input[type=number] { width: 100%; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  html { scroll-padding-top: 72px; }

  /* room */
  .page { padding: 32px 0 36px; }
  .page-head { margin-bottom: 22px; }
  .sec-title { margin: 34px 0 12px; }
  .section { padding: 64px 0; }
  .framed > .wrap { padding-top: 64px; padding-bottom: 64px; }
  .framed.flush > .wrap { padding-top: 0; padding-bottom: 0; }
  .section.tight { padding: 40px 0; }
  .section-head { margin-bottom: 32px; }
  .form-shell { padding: 36px var(--gutter); min-height: 0; }
  .crumb { margin-bottom: 14px; min-height: 32px; }
  .head-actions { flex-wrap: wrap; justify-content: flex-start; }
  .card-foot .btn, .save-bar .btn { flex: 1; }
  /* a button whose words are longer than the screen breaks them in two */
  .btn { max-width: 100%; height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; white-space: normal; text-align: center; }
  .btn.small { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
  .pill { max-width: 100%; }
  details p { margin-right: 8px; }
  summary { padding: 18px 2px; }
  .term pre { font-size: .76rem; padding: 14px 14px 18px; }
  pre.snippet { white-space: pre-wrap; overflow-wrap: anywhere; }
  .foot-mark { font-size: 19vw; }

  /* price list: one card under another needs none of the heights that keep
     three cards' lines level, and the periods sit two by two */
  .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .seg button { padding: 10px 8px; }
  .price-how, .price-how:has(.each), .plans .plan .where, .price-alt { min-height: 0; }
  .plans, .lineup { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .price strong { font-size: 2.5rem; }
  .plans-foot { gap: 14px; margin-top: 14px; }
  .team, .terms { padding: 22px; }
  .rentals { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 14px 13px; }
  .kpi strong { font-size: 1.6rem; }

  /* strips that scroll sideways run to the screen's edges and fade there */
  .help-nav nav {
    margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 26px), transparent); }
  .help-nav nav a { min-height: 38px; align-items: center; }

  /* a value with its buttons: the words of a button give way to its sign */
  .field { gap: 8px; }
  .field code { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
  .field code.secret:not([data-shown]) { white-space: nowrap; overflow: hidden; }
  .tool { flex: none; width: 42px; height: 42px; padding: 0; justify-content: center; }
  .tool .icon { width: 17px; height: 17px; }
  .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .direct-close { justify-content: flex-start; }

  /* forms */
  .inline-fields > label { flex: 1 1 120px; min-width: 0; }
  .inline-fields input[type=number], .inline-fields input[type=text], .inline-fields select, .inline-fields .select, .danger-zone .inline-fields input[type=text] { width: 100%; }
  .inline-fields .grow, .inline-fields > .btn { flex: 1 1 100%; min-width: 0; }
  .card-zone > form { justify-self: stretch; }
  .redeem-inline .btn { flex: 1 1 100%; }
  .redeem-inline label { min-width: 0; flex-basis: 100%; }
  .qty input { width: 96px; }
  .mfa-setup { gap: 18px; }
  .facts { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 10px 16px; }
  .facts dd { overflow-wrap: anywhere; }
  small.clip { max-width: 100%; }

  /* settings: short fields go two abreast, and a heading lets its switches drop below it */
  .plan-edit { padding: 16px; }
  .plan-edit h3 { flex-wrap: wrap; }
  .plan-edit .head-actions { gap: 16px; }
  .plan-edit .check { white-space: nowrap; }
  .plan-edit .grid3, .plan-edit .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .plan-edit .grid3 > span:empty { display: none; }
  .plan-edit label { margin-bottom: 16px; }

}
@media (max-width: 620px) {
  /* the bar's own short row, when there is no script to fold it */
  .nav nav a.theme { width: 30px; height: 30px; margin-left: 0; }
  .card.empty { padding: 40px 22px; }
}
@media (max-width: 380px) {
  .brand span { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .card, .plan { padding: 20px 18px; }
  .js .table-wrap tr { padding: 14px 16px 16px; }
  .plan-edit .grid3, .plan-edit .prices { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { gap: 30px 20px; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .js .nav.open nav, .side.open .side-nav { animation: none; }
  .nav-toggle path { transition: none; }
}
