/* The account page in the desktop app's own look (apps/desktop styles.css and shell.css, UI-DESIGN.md): the same
   tokens, type, buttons, fields, segmented control, dialog, toasts and tooltips; the paper frame with the white
   window on it; the Tenbrain mark alive while something long happens. Light and dark follow the system, or the
   theme chosen in the account (data-theme). */
:root {
  --brand-top: #7aa8f0; --brand-bottom: #5487e0; --brand-ink: #0f1d30;
  --paper: #f4f6f9; --white: #ffffff; --surface-2: #f8fafc; --fill: #eef2f6;
  --hover: rgba(15, 29, 48, 0.045); --active: rgba(15, 29, 48, 0.08);
  --line: rgba(15, 29, 48, 0.09); --line-strong: rgba(15, 29, 48, 0.16); --line-focus: rgba(15, 29, 48, 0.32);
  --ink: #17202b; --ink-2: #3f4b5a; --ink-3: #5c6878; --ink-4: #9aa5b3;
  --on-accent: #ffffff; --scrim: rgba(15, 29, 48, 0.4); --raised: #ffffff;
  --tip-bg: #17202b; --tip-ink: #ffffff; --tip-line: transparent;
  --accent: #1b74c4; --accent-hover: #1668b0; --accent-press: #145d9e; --accent-ink: #1668b0;
  --btn: #1668b0; --btn-hover: #145d9e; --btn-press: #114f87; /* filled buttons: the sign-in's blue */
  --accent-tint: #e8f3fc; --accent-tint-2: #d4e8f9; --accent-line: rgba(27, 116, 196, 0.35);
  --focus: #4498db; --focus-ring: 0 0 0 3px rgba(27, 116, 196, 0.22);
  --working-bg: #e6f3ec; --working-fg: #2c7a52; --working-dot: #3aa472;
  --needs-bg: #fbefdc; --needs-fg: #8f5512; --needs-dot: #e0a043;
  --sched-bg: var(--accent-tint); --sched-fg: var(--accent-ink); --sched-dot: var(--brand-bottom);
  --idle-bg: #eef2f6; --idle-fg: #5c6878; --idle-dot: rgba(15, 29, 48, 0.42);
  --failed-bg: #fdeeec; --failed-fg: #a3271b;
  --danger: #b42318; --danger-hover: #93180f; --danger-tint: #fdeeec; --danger-fill: #b42318;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Sometype Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-display: 30px; --lh-display: 37px; --fs-figure: 26px; --lh-figure: 32px; --fs-title: 24px; --lh-title: 30px; --fs-subtitle: 20px; --lh-subtitle: 26px;
  --fs-heading: 16px; --lh-heading: 24px; --fs-body: 15px; --lh-body: 23px;
  --fs-label: 14px; --lh-label: 20px; --fs-small: 13px; --lh-small: 18px; --fs-caption: 12px; --lh-caption: 16px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-frame: 14px; --r-pill: 9999px; --r-panel: var(--r-md);
  --h-sm: 28px; --h-md: 36px; --h-lg: 44px; --h-row: 34px; --indent: calc(48px + var(--s-4)); --row-indent: calc(36px + var(--s-3)); --page-w: 880px;
  --shadow-1: 0 1px 2px rgba(15, 29, 48, 0.06);
  --shadow-pop: 0 4px 12px rgba(15, 29, 48, 0.08), 0 12px 32px rgba(15, 29, 48, 0.08), 0 0 0 1px rgba(15, 29, 48, 0.06);
  --shadow-dialog: 0 16px 48px rgba(15, 29, 48, 0.18), 0 0 0 1px rgba(15, 29, 48, 0.06);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --edge: 8px; --side-w: 248px; --head-h: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark;
  --paper: #0b1118; --white: #121a24; --surface-2: #18212d; --fill: #223042;
  --hover: rgba(255, 255, 255, 0.05); --active: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.14); --line-focus: rgba(255, 255, 255, 0.32);
  --ink: #e8eef5; --ink-2: #b4c0cd; --ink-3: #8a96a6; --ink-4: #5b6778;
  --scrim: rgba(3, 8, 14, 0.62); --raised: #2c3b50; --tip-bg: #2c3b50; --tip-ink: #e8eef5; --tip-line: rgba(255, 255, 255, 0.12);
  --accent: #1b74c4; --accent-hover: #2a82d0; --accent-press: #1668b0; --accent-ink: #7dbdf0;
  --btn: #1b74c4; --btn-hover: #2a82d0; --btn-press: #1668b0;
  --accent-tint: rgba(78, 163, 228, 0.16); --accent-tint-2: rgba(78, 163, 228, 0.26); --accent-line: rgba(90, 170, 230, 0.45);
  --focus: #5aaae6; --focus-ring: 0 0 0 3px rgba(90, 170, 230, 0.35);
  --working-bg: rgba(111, 199, 154, 0.14); --working-fg: #6fc79a; --working-dot: #4fb683;
  --needs-bg: rgba(227, 173, 98, 0.15); --needs-fg: #e3ad62; --needs-dot: #e0a043;
  --idle-bg: #223042; --idle-fg: #b4c0cd; --idle-dot: rgba(232, 238, 245, 0.42);
  --failed-bg: rgba(239, 143, 126, 0.14); --failed-fg: #ef8f7e; --danger: #ef8f7e; --danger-hover: #f6ada0; --danger-tint: rgba(239, 143, 126, 0.12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-dialog: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08); } }
:root[data-theme="dark"] { color-scheme: dark;
  --paper: #0b1118; --white: #121a24; --surface-2: #18212d; --fill: #223042;
  --hover: rgba(255, 255, 255, 0.05); --active: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.14); --line-focus: rgba(255, 255, 255, 0.32);
  --ink: #e8eef5; --ink-2: #b4c0cd; --ink-3: #8a96a6; --ink-4: #5b6778;
  --scrim: rgba(3, 8, 14, 0.62); --raised: #2c3b50; --tip-bg: #2c3b50; --tip-ink: #e8eef5; --tip-line: rgba(255, 255, 255, 0.12);
  --accent: #1b74c4; --accent-hover: #2a82d0; --accent-press: #1668b0; --accent-ink: #7dbdf0;
  --btn: #1b74c4; --btn-hover: #2a82d0; --btn-press: #1668b0;
  --accent-tint: rgba(78, 163, 228, 0.16); --accent-tint-2: rgba(78, 163, 228, 0.26); --accent-line: rgba(90, 170, 230, 0.45);
  --focus: #5aaae6; --focus-ring: 0 0 0 3px rgba(90, 170, 230, 0.35);
  --working-bg: rgba(111, 199, 154, 0.14); --working-fg: #6fc79a; --working-dot: #4fb683;
  --needs-bg: rgba(227, 173, 98, 0.15); --needs-fg: #e3ad62; --needs-dot: #e0a043;
  --idle-bg: #223042; --idle-fg: #b4c0cd; --idle-dot: rgba(232, 238, 245, 0.42);
  --failed-bg: rgba(239, 143, 126, 0.14); --failed-fg: #ef8f7e; --danger: #ef8f7e; --danger-hover: #f6ada0; --danger-tint: rgba(239, 143, 126, 0.12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-dialog: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'lnum', 'cv11'; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input::-ms-reveal, input::-ms-clear { display: none; }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }
html { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
/* A finger needs a bigger target: every control follows these two tokens */
@media (pointer: coarse) { :root { --h-sm: 36px; --h-md: 44px; --h-row: 44px; } }
button, a[href], [role="radio"], label:has(> input[type="checkbox"]) { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--accent-tint-2); }
::placeholder { color: var(--ink-3); opacity: 1; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-pop); }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.muted { color: var(--ink-3); }
.grow { flex: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- frame: paper around one white window, like the desktop app ---------- */
.frame { min-height: 100vh; min-height: 100dvh; padding: var(--edge); display: flex; }
.window { flex: 1; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-frame); }
.center-view { display: flex; overflow: auto; }
.onb-col { width: 100%; max-width: 520px; margin: auto; padding: 56px var(--s-6); display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise 280ms var(--ease-out) both; }
.onb-launch { margin: auto; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-8); }
.launch-line { color: var(--ink-3); font-size: var(--fs-label); line-height: var(--lh-label); }
.onb-mark { display: block; margin-bottom: var(--s-1); }
.onb-loader { display: block; margin-bottom: var(--s-2); }
.onb-dots { display: flex; gap: 6px; align-items: center; margin: var(--s-2) 0 var(--s-5); }
.onb-dots li { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); transition: width 240ms var(--ease-out), background 240ms; }
.onb-dots li.done { background: var(--ink-3); }
.onb-dots li.on { width: 22px; background: var(--accent); }
.onb-mark + .onb-hero, .onb-loader + .onb-hero { margin-top: var(--s-4); }
.onb-hero { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.03em; text-wrap: balance; }
.onb-hero.sm { font-size: 28px; line-height: 34px; }
.onb-sub { max-width: 440px; margin: var(--s-3) 0 var(--s-6); color: var(--ink-3); font-size: var(--fs-body); line-height: var(--lh-body); text-wrap: pretty; }
.onb-note { max-width: 440px; margin: calc(var(--s-2) * -1) 0 var(--s-5); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.onb-form { width: 100%; max-width: 380px; text-align: left; display: flex; flex-direction: column; gap: var(--s-3); }
.onb-terms { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); margin-top: var(--s-5); }
.onb-terms + .onb-terms { margin-top: var(--s-1); }
.onb-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-5); }
/* Entrances move only: the content is visible from the first frame, so a timeline that never ticks (a background tab,
   a throttled page) can never leave a screen blank */
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }

/* the plan chosen on the site, above the sign-up */
.moved-card { display: flex; flex-direction: column; gap: var(--s-3); }
.moved-card[hidden] { display: none; }
@media (max-width: 600px) {
}

.pay-sum { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.pay-sum b { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink); font-weight: 600; }

/* the setup steps */
.steps { width: 100%; max-width: 380px; display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.step { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.step + .step { border-top: 1px solid var(--line); }
.bullet { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--fill); color: var(--ink-3); font-size: var(--fs-caption); font-weight: 700; }
.bullet svg { width: 13px; height: 13px; }
.step.done .bullet { background: var(--working-bg); color: var(--working-fg); }
.step.active .bullet { background: var(--accent-tint); color: var(--accent-ink); }
.step.failed .bullet { background: var(--failed-bg); color: var(--failed-fg); }
.step-text { display: flex; flex-direction: column; min-width: 0; }
.step-text b { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; }
.step.pending .step-text b { color: var(--ink-3); font-weight: 500; }
.step-text small { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.get-app { width: 100%; max-width: 440px; margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.get-app .onb-actions { margin-top: var(--s-1); }
.get-app .sect-title { margin: 0 0 var(--s-1); }
.get-app.only, #v-setup.modal .get-app.only { margin-top: var(--s-5); padding-top: 0; border-top: 0; }
.get-app .onb-actions .field { flex: 1 1 100%; min-width: 0; text-align: center; }
.howto { counter-reset: n; display: flex; flex-direction: column; gap: var(--s-2); text-align: left; width: 100%; font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-2); }
.howto li { counter-increment: n; position: relative; padding-left: 32px; min-height: 20px; }
.howto li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--fill); color: var(--ink-2); font-size: var(--fs-caption); line-height: 20px; font-weight: 600; text-align: center; }
.get-app .help { text-align: center; }
/* After paying, the setup is a window over the account (app.js setupModal) */
#v-setup.modal { position: fixed; inset: 0; z-index: 50; background: var(--scrim); border: 0; border-radius: 0; padding: var(--s-4); align-items: center; justify-content: center; }
#v-setup.modal[hidden] { display: none; }
#v-setup.modal .onb-col { position: relative; margin: auto; max-width: 520px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-dialog); padding: var(--s-8) var(--s-6) var(--s-6); animation: pop 200ms var(--ease-out); }
#v-setup.modal .get-app { margin-top: var(--s-6); padding-top: var(--s-5); }
.setup-x { position: absolute; top: var(--s-3); right: var(--s-3); }

/* ---------- buttons: one set ---------- */
.btn { height: var(--h-md); padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--ink);
  font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); white-space: nowrap; text-decoration: none;
  transition: background 120ms var(--ease-out), border-color 120ms var(--ease-out), color 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.btn:hover { text-decoration: none; }
.btn .ic { flex: none; }
.btn.primary { background: var(--btn); color: #fff; }
.btn.primary:hover { background: var(--btn-hover); }
.btn.primary:active { background: var(--btn-press); }
.btn.quiet { background: var(--white); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.btn.quiet:hover { background: var(--surface-2); border-color: var(--line-focus); }
.btn.quiet:active { background: var(--fill); box-shadow: none; }
.btn.text { color: var(--ink-2); padding: 0 10px; }
.btn.text:hover { background: var(--hover); color: var(--ink); }
.btn.text:active { background: var(--active); }
.btn.danger { background: var(--danger-fill); color: #fff; }
.btn.danger:hover { background: #93180f; }
.btn:disabled { opacity: 0.45; pointer-events: none; box-shadow: none; }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.btn.sm { height: var(--h-sm); padding: 0 10px; gap: 6px; font-size: var(--fs-small); line-height: var(--lh-small); }
.btn.lg { height: var(--h-lg); padding: 0 18px; font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600; }
.btn.block { width: 100%; }
.btn .dots { display: none; }
.btn[aria-busy="true"] .dots { display: inline-flex; }
.iconbtn { width: var(--h-sm); height: var(--h-sm); flex: none; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--ink-3); padding: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: background 120ms var(--ease-out), color 120ms var(--ease-out); }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.iconbtn:active { background: var(--active); }
.iconbtn.md { width: var(--h-md); height: var(--h-md); }
.link { border: 0; background: none; padding: 2px; color: var(--accent-ink); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dots { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 1em; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: dots 1s var(--ease-out) infinite; }
.dots i:nth-child(2) { animation-delay: 160ms; }
.dots i:nth-child(3) { animation-delay: 320ms; }
@keyframes dots { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-1px); } }

/* ---------- fields: one shape ---------- */
.form-row { display: flex; flex-direction: column; }
.label { display: block; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; color: var(--ink-2); margin: 0 0 6px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: 6px; }
.label-row .label { margin: 0; }
.field { width: 100%; height: var(--h-md); padding: 0 var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--white); color: var(--ink);
  font-size: var(--fs-label); line-height: var(--lh-label); transition: border-color 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.field.lg { height: 40px; font-size: var(--fs-body); }
.field:hover:not(:disabled):not(:focus) { border-color: var(--line-focus); }
.field:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.field[aria-invalid="true"] { border-color: var(--danger); }
.field[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.help { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); margin: 6px 0 0; }
.help:empty { display: none; }
.help.bad { color: var(--danger); }
.field-error, .form-err { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--danger); margin: 0; }
.form-err { padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--danger-tint); }
.form-err svg { width: 16px; height: 16px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.field-wrap { position: relative; display: flex; align-items: center; }
.field-wrap > .field { padding-right: 44px; }
.field-wrap > .field-end { position: absolute; right: 6px; }
.reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.reveal .slash { opacity: 0; }
.reveal[aria-pressed="true"] .slash { opacity: 1; }
.auth-card { display: flex; flex-direction: column; gap: var(--s-3); }
.auth-card form { display: flex; flex-direction: column; gap: var(--s-3); }
.auth-card .go { margin-top: var(--s-1); }

/* the 6-box code entry (code.js) */
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); gap: var(--s-2); justify-content: center; }
.code-box { width: 100%; height: 56px; padding: 0; text-align: center; font-family: var(--font-mono); font-size: 24px; line-height: 32px; font-weight: 500; font-variant-numeric: tabular-nums;
  border-radius: var(--r-sm); border: 1px solid var(--field-line, var(--line-strong)); background: var(--white); color: var(--ink); caret-color: var(--accent);
  transition: border-color 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.code-box:hover:not(:disabled):not(:focus) { border-color: var(--line-focus); }
.code-box:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.code-box:disabled { background: var(--fill); color: var(--ink-3); }
.code-boxes.bad .code-box { border-color: var(--danger); }
.code-boxes.bad .code-box:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
@media (max-width: 380px) { .code-boxes { gap: 6px; } .code-box { height: 50px; font-size: 22px; } }
.code-more { display: flex; justify-content: center; align-items: center; gap: var(--s-2); color: var(--ink-4); font-size: var(--fs-small); }
.link:disabled, .code-more .link:disabled { color: var(--ink-3); cursor: default; text-decoration: none; font-variant-numeric: tabular-nums; }
.code-note { margin: 0; text-align: center; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.code-note:empty { display: none; }
.code-change { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.code-change-actions { display: flex; gap: var(--s-2); align-items: center; }

/* segmented control */
.seg { display: inline-flex; gap: 2px; border-radius: var(--r-sm); padding: 2px; background: var(--fill); }
.seg.block { display: flex; width: 100%; }
.seg button { flex: 1; height: 32px; padding: 0 var(--s-3); white-space: nowrap; border: 0; background: transparent; border-radius: var(--r-xs); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 500; color: var(--ink-2); transition: background 120ms var(--ease-out), color 120ms var(--ease-out); }
.seg button:hover:not(.on) { color: var(--ink); background: var(--hover); }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- the mark alive (LogoLoader; keyframes from apps/desktop/src/shared/logoMotion.ts) ---------- */
.logo-motion { --lm-ease: cubic-bezier(0.45, 0, 0.55, 1); --lm-glow: rgba(122, 168, 240, 0.34); --lm-shade: rgba(23, 52, 89, 0.2); --lm-spark: #5487e0;
  position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.logo-motion > * { grid-area: 1 / 1; }
.logo-motion .lm-glow { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, var(--lm-glow), transparent); }
.logo-motion .lm-shadow { align-self: end; width: calc(var(--lm-size) * 0.66); height: calc(var(--lm-size) * 0.12); margin-bottom: calc(var(--lm-size) * 0.04); border-radius: 50%; background: radial-gradient(closest-side, var(--lm-shade), transparent); }
.logo-motion .lm-float { display: block; line-height: 0; filter: drop-shadow(0 calc(var(--lm-size) * 0.05) calc(var(--lm-size) * 0.09) rgba(40, 110, 180, 0.22)); }
.logo-motion .lm-sparks { pointer-events: none; overflow: visible; }
.logo-motion .lm-spark { fill: var(--lm-spark); opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; }
.logo-motion .lm-cloud { transform-box: fill-box; transform-origin: 50% 80%; }
.logo-motion .lm-blink { transform-box: fill-box; transform-origin: center; }
.logo-motion :is(.lm-glow, .lm-shadow, .lm-float, .lm-cloud, .lm-look, .lm-blink, .lm-sweep, .lm-spark) { animation-duration: 7.2s; animation-timing-function: var(--lm-ease); animation-iteration-count: infinite; animation-delay: var(--lm-delay, 0ms); }
.logo-motion .lm-glow { animation-name: lm-glow; }
.logo-motion .lm-shadow { animation-name: lm-shadow; }
.logo-motion .lm-float { animation-name: lm-float; }
.logo-motion .lm-cloud { animation-name: lm-cloud; }
.logo-motion .lm-look { animation-name: lm-look; }
.logo-motion .lm-blink { animation-name: lm-blink; }
.logo-motion .lm-sweep { animation-name: lm-sweep; }
.logo-motion .lm-spark-0 { animation-name: lm-spark-0; }
.logo-motion .lm-spark-1 { animation-name: lm-spark-1; }
.logo-motion .lm-spark-2 { animation-name: lm-spark-2; }
/* still once there is nothing to wait for (the office is ready) */
.still .logo-motion :is(.lm-glow, .lm-shadow, .lm-float, .lm-cloud, .lm-look, .lm-blink, .lm-sweep, .lm-spark) { animation-play-state: paused; animation-delay: 0ms; }
.still .logo-motion .lm-glow { opacity: 0.5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-motion { --lm-glow: rgba(99, 177, 234, 0.26); --lm-shade: rgba(0, 0, 0, 0.5); --lm-spark: #8cc6f2; } }
:root[data-theme="dark"] .logo-motion { --lm-glow: rgba(99, 177, 234, 0.26); --lm-shade: rgba(0, 0, 0, 0.5); --lm-spark: #8cc6f2; }
@media (prefers-reduced-motion: reduce) { .logo-motion .lm-glow { opacity: 0.5; } }
@keyframes lm-float { 0% { transform: translateY(calc(var(--lm-size) * 0)) } 25% { transform: translateY(calc(var(--lm-size) * -0.045)) } 50% { transform: translateY(calc(var(--lm-size) * 0)) } 75% { transform: translateY(calc(var(--lm-size) * -0.045)) } 100% { transform: translateY(calc(var(--lm-size) * 0)) } }
@keyframes lm-cloud { 0% { transform: scale(1) } 25% { transform: scale(1.025) } 50% { transform: scale(1) } 75% { transform: scale(1.025) } 100% { transform: scale(1) } }
@keyframes lm-shadow { 0% { transform: scaleX(1); opacity: 1 } 25% { transform: scaleX(0.8); opacity: 0.55 } 50% { transform: scaleX(1); opacity: 1 } 75% { transform: scaleX(0.8); opacity: 0.55 } 100% { transform: scaleX(1); opacity: 1 } }
@keyframes lm-glow { 0% { transform: scale(0.94); opacity: 0.5 } 25% { transform: scale(1.04); opacity: 1 } 50% { transform: scale(0.94); opacity: 0.5 } 75% { transform: scale(1.04); opacity: 1 } 100% { transform: scale(0.94); opacity: 0.5 } }
@keyframes lm-look { 0% { transform: translate(0px, 0px) } 17% { transform: translate(0px, 0px) } 25% { transform: translate(5.5px, -4.5px) } 41% { transform: translate(5.5px, -4.5px) } 49% { transform: translate(-4.5px, 1px) } 62% { transform: translate(-4.5px, 1px) } 70% { transform: translate(0px, 0px) } 100% { transform: translate(0px, 0px) } }
@keyframes lm-blink { 0% { transform: scaleY(1) } 12% { transform: scaleY(1) } 13.5% { transform: scaleY(0.1) } 15% { transform: scaleY(1) } 80% { transform: scaleY(1) } 81.5% { transform: scaleY(0.1) } 83% { transform: scaleY(1) } 100% { transform: scaleY(1) } }
@keyframes lm-sweep { 0% { transform: translateX(-70px) } 3% { transform: translateX(-70px) } 30% { transform: translateX(150px) } 100% { transform: translateX(150px) } }
@keyframes lm-spark-0 { 0% { transform: scale(0); opacity: 0 } 24% { transform: scale(0); opacity: 0 } 30% { transform: scale(1); opacity: 1 } 39% { transform: scale(0); opacity: 0 } 100% { transform: scale(0); opacity: 0 } }
@keyframes lm-spark-1 { 0% { transform: scale(0); opacity: 0 } 29% { transform: scale(0); opacity: 0 } 35% { transform: scale(1); opacity: 1 } 44% { transform: scale(0); opacity: 0 } 100% { transform: scale(0); opacity: 0 } }
@keyframes lm-spark-2 { 0% { transform: scale(0); opacity: 0 } 34% { transform: scale(0); opacity: 0 } 40% { transform: scale(1); opacity: 1 } 49% { transform: scale(0); opacity: 0 } 100% { transform: scale(0); opacity: 0 } }

/* ---------- the account: sections on the paper, the chosen one on the window ---------- */
.shell { flex: 1; min-width: 0; display: flex; gap: 0; }
.side { width: var(--side-w); flex: none; display: flex; flex-direction: column; padding: var(--s-1) var(--s-2) var(--s-1) 0; position: sticky; top: var(--edge); height: calc(100vh - 2 * var(--edge)); height: calc(100dvh - 2 * var(--edge)); }
.side-top { height: var(--head-h); display: flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-2); flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: var(--fs-heading); letter-spacing: -0.01em; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; display: inline-flex; filter: drop-shadow(0 1px 2px rgba(40, 110, 180, 0.25)); }
.brand-mark svg { width: 100%; height: 100%; }
.side-close { display: none; margin-left: auto; }
.nav { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-2) 0; display: flex; flex-direction: column; gap: var(--s-4); scrollbar-width: none; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); padding: 0 var(--s-3) var(--s-1); }
.nav-item { display: flex; align-items: center; gap: 10px; height: var(--h-row); padding: 0 var(--s-3); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 500; transition: background 120ms var(--ease-out), color 120ms var(--ease-out); }
.nav-item:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav-item .ic { color: var(--ink-3); flex: none; }
.nav-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item.on { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.nav-item.on .ic { color: var(--accent-ink); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: none; }
.nav-dot.warn { display: block; background: var(--needs-dot); }
.side-foot { flex: none; border-top: 1px solid var(--line); padding-top: var(--s-2); display: flex; flex-direction: column; gap: var(--s-1); }
.who { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-1) var(--s-1) var(--s-2); min-width: 0; }
.who-avatar { width: 30px; height: 30px; flex: none; border-radius: var(--r-sm); background: var(--accent-tint); color: var(--accent-ink); font-size: var(--fs-caption); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who-text b { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-scrim { display: none; }
.app-card { display: flex; flex-direction: column; min-height: calc(100vh - 2 * var(--edge)); min-height: calc(100dvh - 2 * var(--edge)); }
.head { height: var(--head-h); flex: none; display: flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-4) 0 var(--s-6); border-bottom: 1px solid var(--line); position: sticky; top: var(--edge); background: var(--white); border-radius: var(--r-frame) var(--r-frame) 0 0; z-index: 5; }
.head-title { font-family: var(--font-display); font-size: var(--fs-heading); line-height: var(--lh-heading); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.view { flex: 1; }
.page { max-width: var(--page-w); margin: 0 auto; padding: var(--s-8) var(--s-8) var(--s-12); }
.page-head { margin-bottom: var(--s-6); }
.page-lead { color: var(--ink-3); font-size: var(--fs-label); line-height: var(--lh-label); max-width: 62ch; margin-bottom: var(--s-6); }
.page-lead + .sect-title, .page-lead + .sect-head { margin-top: 0; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: -0.02em; }
.page-sub { margin-top: var(--s-2); color: var(--ink-3); font-size: var(--fs-label); line-height: var(--lh-label); max-width: 62ch; }
.sect-title { font-size: var(--fs-heading); line-height: var(--lh-heading); font-weight: 600; color: var(--ink); margin: var(--s-8) 0 var(--s-3); }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin: var(--s-8) 0 var(--s-3); }
.sect-head .sect-title { margin: 0; }
.count { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.page > .help { margin-top: var(--s-4); }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--s-2); border-radius: var(--r-pill); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; white-space: nowrap; flex: none; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.working { background: var(--working-bg); color: var(--working-fg); }
.chip.working i { background: var(--working-dot); animation: breathe 2.4s ease-in-out infinite; }
.chip.needs { background: var(--needs-bg); color: var(--needs-fg); }
.chip.sched { background: var(--sched-bg); color: var(--sched-fg); }
.chip.idle { background: var(--idle-bg); color: var(--idle-fg); }
.chip.idle i { background: var(--idle-dot); }
.chip.failed { background: var(--failed-bg); color: var(--failed-fg); }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--working-dot) 30%, transparent); } }

/* your office: one panel, its facts in one strip, the files meter */
.hero-panel { border: 1px solid var(--line-strong); border-radius: var(--r-panel); padding: var(--s-6); background: var(--white); }
.hero-top { display: flex; gap: var(--s-4); align-items: flex-start; }
.office-tile { width: 48px; height: 48px; flex: none; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; background: var(--fill); color: var(--ink-3); }
.office-tile.working { background: var(--working-bg); color: var(--working-fg); }
.office-tile.sched { background: var(--accent-tint); color: var(--accent-ink); }
.office-tile.failed { background: var(--failed-bg); color: var(--failed-fg); }
.hero-text { flex: 1; min-width: 0; }
.hero-l1 { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.hero-l1 h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
.hero-text p { margin-top: var(--s-1); color: var(--ink-2); font-size: var(--fs-label); line-height: var(--lh-label); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-5) 0 0 var(--indent); }
.hero-actions:empty { display: none; }
.hero-panel .field-error { margin: var(--s-3) 0 0 var(--indent); }
.inline-note { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); }
.inline-note > span { flex: 1; min-width: 0; }
.inline-note .ic { flex: none; }
.inline-note.bad { color: var(--failed-fg); }
.hero-panel .inline-note { margin-left: var(--indent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--s-6); border-top: 1px solid var(--line); }
.facts > div { padding: var(--s-4) var(--s-4) 0 0; min-width: 0; }
.facts > div + div { padding-left: var(--s-4); border-left: 1px solid var(--line); }
.facts dt, .stat dt { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.facts dd { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.facts dd.s, .stat dd.s { font-size: var(--fs-caption); line-height: var(--lh-caption); font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.meter-row { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.meter-l { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); margin-bottom: var(--s-2); }
.meter-l span { display: inline-flex; align-items: center; gap: 6px; }
.meter-l b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meter span.full { background: var(--needs-dot); }

/* numbers in one strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: var(--r-panel); overflow: hidden; }
.stat { padding: var(--s-4); min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat.wide { grid-column: 1 / -1; }
.stat.wide dt { font-weight: 600; color: var(--ink); font-size: var(--fs-label); line-height: var(--lh-label); }
.stat.wide dd.s { font-size: var(--fs-small); line-height: var(--lh-small); }
.stat dd.n { font-size: var(--fs-figure); line-height: var(--lh-figure); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: var(--s-1); }

/* lists of rows, as the desktop's Connections */
.rows { border: 1px solid var(--line-strong); border-radius: var(--r-panel); overflow: hidden; background: var(--white); }
.row-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); min-height: 64px; }
.row-item + .row-item { border-top: 1px solid var(--line); }
.row-icon { width: 36px; height: 36px; flex: none; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--fill); color: var(--ink-3); }
.row-icon.on { background: var(--working-bg); color: var(--working-fg); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 500; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; overflow-wrap: anywhere; }
.row-main > span { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); overflow-wrap: anywhere; }
.row-item.done .row-main b { color: var(--ink-2); }
.row-item > .btn, .row-item > .chip { flex: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent-ink); font-size: var(--fs-caption); line-height: 20px; font-weight: 600; }

/* the week, one bar a day */
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); align-items: end; padding: var(--s-5) var(--s-4) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-panel); }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: var(--r-sm); padding: 2px 0; }
.bar-v { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--ink-3); font-variant-numeric: tabular-nums; min-height: 16px; }
.bar-track { width: 100%; max-width: 44px; height: 132px; display: flex; align-items: flex-end; border-radius: var(--r-xs); background: var(--surface-2); overflow: hidden; }
.bar-track span { display: block; width: 100%; min-height: 2px; background: color-mix(in srgb, var(--accent) 45%, var(--white)); border-radius: var(--r-xs) var(--r-xs) 0 0; }
.bar.now .bar-track span { background: var(--accent); }
.bar:hover .bar-track span { background: var(--accent-hover); }
.bar-l { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--ink-3); }
.bar.now .bar-l { color: var(--ink); font-weight: 600; }
.bars figcaption { grid-column: 1 / -1; margin-top: var(--s-2); }

/* plan and billing */
.table-wrap { border: 1px solid var(--line-strong); border-radius: var(--r-panel); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-label); line-height: var(--lh-label); }
.table th { text-align: left; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; color: var(--ink-3); padding: var(--s-2) var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 160px; width: 100%; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.muted { color: var(--ink-3); }

/* downloads */
.phone-dl { display: flex; gap: var(--s-5); align-items: center; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); }
.qr-box { width: 148px; height: 148px; flex: none; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.qr-box img { display: block; }
.phone-dl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.phone-dl-text b { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; }
.phone-dl-text > span:not(.help) { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.phone-dl-text .row-actions { margin: var(--s-2) 0 var(--s-1); }
.notes { padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); }
.notes h4 { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; color: var(--ink-3); margin: var(--s-4) 0 var(--s-1); }
.notes h4:first-child { margin-top: 0; }
.notes ul { display: flex; flex-direction: column; gap: var(--s-1); }
.notes li { position: relative; padding-left: 16px; font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-2); max-width: 68ch; }
.notes li::before { content: ''; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }

/* account and security */
.danger-zone { padding: var(--s-4) var(--s-5); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: var(--r-md); display: flex; flex-direction: column; gap: var(--s-3); }
.danger-zone p { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-2); max-width: 64ch; }
.danger-zone .form-row { max-width: 340px; }
.danger-zone .row-actions { margin: 0; }

/* empty, loading, error */
.empty { text-align: center; padding: var(--s-12) var(--s-6); border: 1px solid var(--line-strong); border-radius: var(--r-panel); color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.empty.small { padding: var(--s-5) var(--s-4); border-style: solid; border-color: var(--line); flex-direction: row; justify-content: space-between; text-align: left; flex-wrap: wrap; }
.empty-icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--fill); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); margin-bottom: var(--s-1); }
.empty h3 { font-size: var(--fs-heading); line-height: var(--lh-heading); font-weight: 600; color: var(--ink); }
.empty p { max-width: 400px; font-size: var(--fs-label); line-height: var(--lh-label); }
.empty .btn { margin-top: var(--s-2); }
.empty.small .btn { margin: 0; }
.skeleton { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); }
.skeleton span { display: block; height: 12px; border-radius: 6px; background: var(--fill); animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.qr-wait { display: inline-flex; }

/* ---------- dialog, toasts, tooltip ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; z-index: 50; padding: var(--s-4); }
.dialog { position: relative; width: 480px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-dialog); padding: var(--s-6); animation: pop 200ms var(--ease-out); }
@keyframes pop { from { transform: translateY(6px) scale(0.985); } to { transform: none; } }
.dialog h2 { font-family: var(--font-display); font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: 700; letter-spacing: -0.01em; padding-right: var(--s-8); }
.dialog .sub { margin-top: var(--s-2); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-3); }
.dialog-body { margin-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.dialog-body:empty { display: none; }
.dialog > .field-error { margin-top: var(--s-3); }
.dialog .foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-2); margin-top: var(--s-6); flex-wrap: wrap; }
.dialog-x { position: absolute; top: var(--s-3); right: var(--s-3); }
.qr { display: flex; gap: var(--s-5); align-items: center; }
.qr img { flex: none; border-radius: var(--r-md); background: #fff; padding: 6px; border: 1px solid var(--line); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; background: var(--ink); color: var(--white); border-radius: var(--r-md); padding: 10px var(--s-4); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 500; box-shadow: var(--shadow-pop); animation: pop 200ms var(--ease-out); transition: opacity 200ms, transform 200ms; }
.toast.error { background: #b42318; color: #fff; }
.toast.leaving { opacity: 0; transform: translateY(4px); }
.tooltip { position: fixed; z-index: 1000; pointer-events: none; max-width: 280px; width: max-content; padding: 6px var(--s-2); border-radius: var(--r-sm); background: var(--tip-bg); color: var(--tip-ink); border: 1px solid var(--tip-line);
  font-size: var(--fs-caption); line-height: var(--lh-caption); font-weight: 500; box-shadow: var(--shadow-pop); opacity: 0; }
.tooltip.in { opacity: 1; transition: opacity 120ms var(--ease-out); }

/* ---------- smaller windows ---------- */
@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: var(--s-4); }
}
@media (max-width: 860px) {
  :root { --edge: 6px; }
  .shell { display: block; }
  .side { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; height: auto; width: min(300px, 86vw); background: var(--paper); padding: var(--s-2) var(--s-3); box-shadow: var(--shadow-dialog);
    transform: translateX(-105%); transition: transform 220ms var(--ease-out); visibility: hidden; }
  .side.open { transform: none; visibility: visible; }
  .side-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: var(--scrim); }
  .side-close { display: inline-flex; }
  .menu-btn { display: inline-flex; margin-left: calc(var(--s-2) * -1); }
  .head { padding: 0 var(--s-3) 0 var(--s-4); }
  .page { padding: var(--s-6) var(--s-5) var(--s-12); }
}
@media (max-width: 600px) {
  .frame { padding: 0; }
  .window { border-radius: 0; border: 0; }
  .app-card { min-height: 100vh; min-height: 100dvh; }
  .head { top: 0; border-radius: 0; }
  .onb-col { padding: 40px var(--s-4) var(--s-8); }
  .onb-hero, .onb-hero.sm { font-size: var(--fs-title); line-height: var(--lh-title); }
  .page { padding: var(--s-5) var(--s-4) var(--s-12); }
  .page-title { font-size: 22px; line-height: 28px; }
  .hero-panel { padding: var(--s-4); }
  .hero-actions, .hero-panel .field-error, .hero-panel .inline-note { margin-left: 0; }
  .hero-actions .btn { flex: 1 1 auto; }
  .office-tile { width: 40px; height: 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat dd.n { font-size: 22px; line-height: 28px; }
  .row-item { flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3); }
  .row-item > .btn, .row-item > .chip { margin-left: var(--row-indent); }
  .row-item > .row-main { flex: 1 1 calc(100% - var(--row-indent)); }
  .phone-dl { flex-direction: column; align-items: flex-start; }
  .qr { flex-direction: column; align-items: flex-start; }
  .bars { gap: var(--s-1); padding: var(--s-4) var(--s-2) var(--s-3); }
  .bar-track { height: 104px; }
  .hide-xs { display: none; }
  .dialog { padding: var(--s-5); }
  .dialog .foot .btn { flex: 1 1 auto; }
  .inline-note { flex-wrap: wrap; }
  .table .period { display: none; }
}

/* ---------- while the account is read: its own frame with quiet placeholders (no words, no spinner) ---------- */
.sk { display: block; height: 12px; border-radius: 6px; background: var(--fill); animation: shimmer 1.6s ease-in-out infinite; }
.boot .nav-group { gap: var(--s-3); padding: var(--s-2) var(--s-3); }
.boot .sk.row { height: 14px; width: 78%; }
.sk.w30 { width: 30%; } .sk.w40 { width: 40%; height: 10px; } .sk.w50 { width: 50%; } .sk.w60 { width: 60%; } .sk.w80 { width: 80%; }
.sk.tall { height: 18px; }
.sk.gap { margin: var(--s-8) 0 var(--s-3); height: 14px; }
.boot .head .sk.w30 { width: 140px; height: 14px; }
.sk.menu-sk { display: none; width: 24px; height: 24px; border-radius: var(--r-sm); }
.sk-panel { border: 1px solid var(--line); border-radius: var(--r-panel); padding: var(--s-6); }
.sk-top { display: flex; gap: var(--s-4); align-items: flex-start; }
.sk.tile { width: 48px; height: 48px; border-radius: var(--r-md); flex: none; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); padding-top: 4px; }
.sk-facts, .sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-6); }
.sk-facts .sk { height: 36px; border-radius: var(--r-sm); }
.sk-stats { margin-top: 0; }
.sk-stats .sk { height: 92px; border-radius: var(--r-md); }
.boot-err { margin-top: var(--s-5); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.brand-tile { width: 67px; height: 67px; display: inline-flex; filter: drop-shadow(0 6px 14px rgba(40, 110, 180, 0.25)); }
.brand-tile svg { width: 100%; height: 100%; }
.hero-hint { margin: var(--s-2) 0 0 var(--indent); }
@media (max-width: 860px) {
  .boot .side { display: none; }
  .sk.menu-sk { display: block; }
}
@media (max-width: 600px) {
  .sk-facts, .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-panel { padding: var(--s-4); }
  .hero-hint { margin-left: 0; }
}
.sk.inline { display: inline-block; width: 140px; vertical-align: middle; }

/* Organizations (orgs.js): invitations to accept and the organizations this account is in */
.org-block { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); text-align: left; }
.org-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.org-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.org-text span { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.org-acts { display: flex; gap: var(--s-2); flex: none; }
/* In the account the organizations read as a list of the page's width, not a narrow card */
.page .org-block { max-width: none; margin-bottom: var(--s-6); }
.page .org-row { background: var(--white); border-color: var(--line-strong); border-radius: var(--r-panel); }
@media (max-width: 480px) { .org-row { flex-direction: column; align-items: stretch; } .org-acts { justify-content: flex-end; } }
#v-setup.modal .onb-col:focus { outline: none; }
/* Organizations: bringing your own office into one, and the seats screen (orgs.js) */
.field.sm { height: 30px; width: auto; min-width: 72px; padding: 0 var(--s-2); }
.org-pick { margin-bottom: var(--s-5); max-width: 340px; }
.table td .muted { color: var(--ink-3); font-size: var(--fs-small); }

/* ---- Continue with Google (signin.js) */
.auth-card .google { gap: var(--s-2); }
.auth-card .google .g-mark { width: 18px; height: 18px; flex: none; }
.auth-card .or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-4) 0; color: var(--ink-3); font-size: 13px; }
.auth-card .or::before, .auth-card .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Sign-in and sign-up: a split, about Tenbrain on one side, the form on the other. Flat colour, firm lines, no decoration */
.auth-view { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); overflow: auto; }
.auth-view[hidden] { display: none; }
.auth-about { order: -1; display: flex; flex-direction: column; padding: 32px 48px; background: color-mix(in srgb, var(--brand-top) 15%, var(--white)); border-right: 1px solid var(--line-strong); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--ink); }
.auth-brand img { display: block; }
.auth-about-body { margin: auto 0; padding: 32px 0; max-width: 480px; }
.auth-about h2 { margin: 0 0 16px; font-family: var(--font-display); font-size: 30px; line-height: 37px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.auth-about p { margin: 0; color: var(--ink-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.auth-example { margin: 24px 0; background: var(--white); border: 1px solid var(--line-strong); border-radius: 6px; }
.auth-about .auth-example-title { padding: 10px 14px; border-bottom: 1px solid var(--line-strong); color: var(--ink-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.auth-example-wait { flex: none; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; white-space: nowrap; }
.auth-example-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.auth-example-row + .auth-example-row { border-top: 1px solid var(--line); }
.auth-example-row img { flex: none; border-radius: 6px; }
.auth-example-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.auth-example-row b { color: var(--ink); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; }
.auth-example-row span { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.auth-main { display: flex; background: var(--white); }
.auth-form-col { width: 100%; max-width: 420px; margin: auto; padding: 40px 24px; }
.auth-brand-small, .auth-pitch-small { display: none; }
.auth-title { margin: 0; font-family: var(--font-display); font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.auth-sub { margin: 6px 0 24px; color: var(--ink-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.auth-panel .onb-form { max-width: none; }
.auth-view .onb-terms { margin-top: 20px; }
.auth-view .onb-terms + .onb-terms { margin-top: 4px; }
.auth-nocard { margin: 12px 0 0; color: var(--ink-2); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; text-align: center; }
.auth-nocard[hidden] { display: none; }
/* Controls on the sign-in, organization, plan and paused screens: square-shouldered, a solid blue, states you can read */
:is(.auth-view, #v-plan, #v-paused) { --r-sm: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.auth-view, #v-plan, #v-paused) { --ok-ink: #6fd3a0; } }
:root[data-theme="dark"] :is(.auth-view, #v-plan, #v-paused) { --ok-ink: #6fd3a0; }
:is(.auth-view, #v-plan, #v-paused) .label { color: var(--ink); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; }
:is(.auth-view, #v-plan, #v-paused) .field.lg { height: var(--h-lg); padding: 0 var(--s-3); border: 1px solid var(--ink-4); font-size: 16px; line-height: 24px; box-shadow: none; }
:is(.auth-view, #v-plan, #v-paused) .field::placeholder { color: var(--ink-3); opacity: 0.75; }
:is(.auth-view, #v-plan, #v-paused) .field:hover:not(:disabled):not(:focus) { border-color: var(--ink-3); }
:is(.auth-view, #v-plan, #v-paused) .field:focus, :is(.auth-view, #v-plan, #v-paused) .field:focus-visible { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
:is(.auth-view, #v-plan, #v-paused) .field[aria-invalid="true"], :is(.auth-view, #v-plan, #v-paused) .field[aria-invalid="true"]:hover:not(:disabled):not(:focus) { border-color: var(--danger); }
:is(.auth-view, #v-plan, #v-paused) .field[aria-invalid="true"]:focus, :is(.auth-view, #v-plan, #v-paused) .field[aria-invalid="true"]:focus-visible { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.auth-view .field-wrap > .field { padding-right: 44px; }
.auth-view .help.bad { font-weight: 500; }
.auth-view .field-end.reveal { right: 5px; width: 34px; height: 34px; border-radius: 5px; }
.field-ok { position: absolute; right: 13px; width: 18px; height: 18px; color: var(--ok-ink, #17693f); pointer-events: none; }
.field-ok[hidden] { display: none; }
.field-ok svg, .pw-tick svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-rule { display: flex; align-items: center; gap: 5px; margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.pw-rule[hidden] { display: none; }
.pw-tick { display: none; width: 15px; height: 15px; flex: none; }
.pw-rule.met { color: var(--ok-ink, #17693f); font-weight: 500; }
.pw-rule.met .pw-tick { display: block; }
.pw-rule.bad { color: var(--danger); font-weight: 500; }
.pw-count { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 400; }
.pw-rule.bad .pw-count { color: var(--danger); }
.pw-caps { margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; }
.pw-caps[hidden] { display: none; }
/* The sign-in or create-account switch: two tabs on a line */
.auth-view .seg { padding: 0; gap: 20px; border-radius: 0; background: none; border-bottom: 1px solid var(--line-strong); margin-bottom: 8px; }
.auth-view .seg.block { display: flex; }
.auth-view .seg button { flex: none; height: 40px; padding: 0 2px; margin-bottom: -1px; border-radius: 0; border-bottom: 2px solid transparent; background: none; box-shadow: none; color: var(--ink-2); font-size: 15px; line-height: 20px; font-weight: 500; }
.auth-view .seg button:hover:not(.on) { background: none; color: var(--ink); border-bottom-color: var(--ink-4); }
.auth-view .seg button.on { background: none; box-shadow: none; color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
:is(.auth-view, #v-plan, #v-paused) .btn.lg { height: var(--h-lg); font-size: 15px; line-height: 20px; box-shadow: none; }
.auth-view .auth-card .go { margin-top: 4px; }
:is(.auth-view, #v-plan, #v-paused) .btn.primary { box-shadow: none; }
:is(.auth-view, #v-plan, #v-paused) :is(.btn, .seg button, .link, a, .iconbtn):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:is(.auth-view, #v-plan, #v-paused) .btn:disabled:not([aria-busy="true"]) { opacity: 0.5; cursor: not-allowed; }
.auth-view .btn[aria-busy="true"] { opacity: 1; background: var(--btn-press); }
/* Google's button, by its own branding rules: its mark and colours, on white, or near black in the dark */
.auth-view .btn.google { gap: 10px; background: #ffffff; color: #1f1f1f; border: 1px solid #747775; font-weight: 500; }
.auth-view .btn.google:hover:not(:disabled) { background: #f4f5f5; }
.auth-view .btn.google:active:not(:disabled) { background: #e8e9e9; }
.auth-view .btn.google[aria-busy="true"] { background: #f4f5f5; color: #1f1f1f; }
.auth-view .btn.google[aria-busy="true"] .g-mark { display: none; }
.auth-view .btn.google .g-mark { width: 18px; height: 18px; flex: none; }
.auth-view .auth-card .or { margin: 12px 0 0; }
.auth-view .code-box { border: 1px solid var(--ink-4); border-radius: 6px; }
.auth-view .code-box:focus, .auth-view .code-box:focus-visible { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-view .btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; } :root:not([data-theme="light"]) .auth-view .btn.google:hover:not(:disabled) { background: #1f2021; } :root:not([data-theme="light"]) .auth-view .btn.google:active:not(:disabled) { background: #2a2b2c; } :root:not([data-theme="light"]) .auth-view .btn.google[aria-busy="true"] { background: #1f2021; color: #e3e3e3; } }
:root[data-theme="dark"] .auth-view .btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
:root[data-theme="dark"] .auth-view .btn.google:hover:not(:disabled) { background: #1f2021; }
:root[data-theme="dark"] .auth-view .btn.google:active:not(:disabled) { background: #2a2b2c; }
:root[data-theme="dark"] .auth-view .btn.google[aria-busy="true"] { background: #1f2021; color: #e3e3e3; }
/* The next screens in the same flow: flat, the same corners */
:is(#v-plan, #v-paused) .brand-tile { filter: none; }
:is(#v-plan, #v-paused) .brand-tile { width: 48px; height: 48px; }
:is(#v-plan, #v-paused) .brand-tile svg > rect { fill: #5487e0; }
:is(#v-plan, #v-paused) .org-row { border-color: var(--line-strong); border-radius: 6px; background: var(--white); }
@media (max-width: 860px) {
  .auth-view { display: block; }
  .auth-about { padding: 28px 24px 32px; border-right: 0; border-top: 1px solid var(--line-strong); }
  .auth-about > .auth-brand { display: none; }
  .auth-about-body { margin: 0; padding: 0; max-width: 520px; }
  .auth-about h2 { display: none; }
  .auth-form-col { max-width: 460px; padding: 24px 20px 28px; }
  .auth-brand-small { display: flex; font-size: 17px; margin-bottom: 10px; }
  .auth-pitch-small { display: block; margin: 0 0 20px; color: var(--ink-2); font-size: var(--fs-label); line-height: var(--lh-label); }
  .auth-title { font-size: 24px; line-height: 30px; }
  .auth-sub { margin-bottom: 18px; }
}
@media (max-width: 380px) {
  .auth-example-row { flex-wrap: wrap; }
  .auth-example-row > div { flex: 1 1 calc(100% - 40px); }
}

/* the page a browser lands on after the app's Google sign-in: its content in the middle of the window, both ways */
.result-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
.result-page .onb-col { margin: 0; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.result-page .auth-team { margin: 0 0 20px; display: flex; justify-content: center; }

/* ---------- own controls: the dropdown (dropdown.js, the same file as the Control Center's) and the checkbox ---------- */
.dd-native { display: none !important; }
.dd { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; height: var(--h-md); padding: 0 10px 0 var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); font-size: var(--fs-label); line-height: var(--lh-label); text-align: left; cursor: pointer; transition: border-color 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.dd:hover:not(:disabled) { border-color: var(--line-focus); }
.dd:focus-visible, .dd[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.dd:disabled { opacity: 0.6; cursor: not-allowed; }
.dd.sm { width: auto; height: var(--h-sm); padding: 0 var(--s-2); font-size: var(--fs-small); }
.filters .dd { width: auto; }
.dd-text { display: grid; min-width: 0; }
.dd-text > span { grid-area: 1 / 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-size { visibility: hidden; height: 0; }
.dd-chev { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 120ms var(--ease-out); }
.dd[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.dd-list { position: fixed; z-index: 90; margin: 0; padding: var(--s-1); list-style: none; background: var(--raised); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); overflow-y: auto; max-width: min(360px, calc(100vw - 16px)); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink); animation: pop 120ms var(--ease-out); }
.dd-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 32px; padding: var(--s-1) var(--s-2); border-radius: var(--r-xs); cursor: pointer; white-space: nowrap; }
.dd-item.active { background: var(--hover); }
.dd-item.on { color: var(--accent-ink); font-weight: 500; }
.dd-tick { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.dd-item.on .dd-tick { visibility: visible; }
@keyframes pop { from { transform: translateY(4px) scale(0.99); } to { transform: none; } }
.dlg[open] { animation: pop 180ms var(--ease-out); }
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; flex: none; display: inline-grid; place-items: center; vertical-align: middle; border: 1px solid var(--line-focus); border-radius: 4px; background: var(--white); cursor: pointer; transition: background 120ms var(--ease-out), border-color 120ms var(--ease-out); }
input[type="checkbox"]:hover:not(:disabled) { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { content: ''; width: 8px; height: 4px; margin-top: -2px; border: solid #fff; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.check { display: flex; gap: var(--s-2); align-items: flex-start; cursor: pointer; font-size: var(--fs-label); line-height: var(--lh-label); }
.check input { margin-top: 2px; }
.check > span { display: grid; gap: 2px; }
.check b { font-weight: 500; color: var(--ink); }
.check .help { margin: 0; }
@media (pointer: coarse) { .dd-item { min-height: 44px; } }

/* ---------- plans (plans.js): one frame, two columns, the featured one carries a tab and a firm edge ---------- */
.plans-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-8); }
.plans-head h2 { font-family: var(--font-display); font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.plans-head p { margin-top: var(--s-2); color: var(--ink-3); font-size: var(--fs-body); line-height: var(--lh-body); max-width: 56ch; }
.plans-host { width: 100%; margin: var(--s-5) 0; text-align: left; }
#v-plan .onb-col:has(#plans:not([hidden])) { max-width: 760px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--white); }
.plan { position: relative; display: flex; flex-direction: column; padding: var(--s-8) var(--s-6) var(--s-6); min-width: 0; }
.plan + .plan { border-left: 1px solid var(--line-strong); }
.plan.featured { box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: var(--r-panel); }
.plan-tag { position: absolute; top: 0; left: var(--s-6); transform: translateY(-50%); display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s-3); border-radius: var(--r-pill); background: var(--ink); color: var(--white); font-size: var(--fs-caption); line-height: 16px; font-weight: 600; }
.plan-name { font-family: var(--font-display); font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: 700; letter-spacing: -0.01em; }
.plan-lead { margin-top: var(--s-2); min-height: calc(var(--lh-label) * 2); color: var(--ink-2); font-size: var(--fs-label); line-height: var(--lh-label); }
.plan-price { display: flex; align-items: baseline; gap: var(--s-2); margin-top: var(--s-5); font-family: var(--font-display); font-size: 52px; line-height: 56px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font-family: var(--font); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.plan-act { margin-top: var(--s-5); min-height: var(--h-lg); }
.plan-status { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.plan-status.bad { color: var(--danger); }
.plan-checks { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.plan-checks li { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-2); }
.plan-checks svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: var(--working-fg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan-checks li.base { font-weight: 600; color: var(--ink); }
.plan-checks li.base svg { display: none; }
.plans-secure { margin-top: var(--s-4); color: var(--ink-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.plan-compare th[scope="row"] { font-weight: 400; color: var(--ink-2); background: none; font-size: var(--fs-label); line-height: var(--lh-label); padding: var(--s-3) var(--s-4); }
.plan-compare td { font-variant-numeric: tabular-nums; font-weight: 500; }
.plan-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-8); }
.plan-faq dt { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; }
.plan-faq dd { margin-top: var(--s-1); color: var(--ink-3); font-size: var(--fs-label); line-height: var(--lh-label); }
.plan-panel { display: flex; gap: var(--s-6); align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--r-panel); padding: var(--s-6); background: var(--white); }
.plan-l { flex: 1 1 280px; min-width: 0; }
.plan-l h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: -0.02em; }
.plan-price-s { display: flex; align-items: baseline; gap: var(--s-2); margin-top: var(--s-2); font-family: var(--font-display); font-size: var(--fs-figure); line-height: var(--lh-figure); font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-price-s small { font-family: var(--font); font-size: var(--fs-label); font-weight: 400; color: var(--ink-3); }
.plan-when { margin-top: var(--s-3); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--ink-2); }
.plan-r { flex: 0 1 240px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.plan-r .help { margin: 0; }
@media (max-width: 680px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line-strong); }
  .plan-lead { min-height: 0; }
  .plan-act:empty { min-height: 0; margin-top: 0; }
  .plan-faq { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .plans-head { flex-direction: column; margin-bottom: var(--s-6); }
  .plans-head h2 { font-size: var(--fs-title); line-height: var(--lh-title); }
}
@media (max-width: 600px) { .plan { padding: var(--s-6) var(--s-4) var(--s-5); } .plan-tag { left: var(--s-4); } .plan-panel { padding: var(--s-4); } }

/* ---------- an invitation (invite.js): the sign-in's own look ---------- */
.invite-body { display: flex; flex-direction: column; gap: var(--s-3); }
.invite-facts { display: flex; flex-direction: column; margin-bottom: var(--s-2); border-top: 1px solid var(--line-strong); }
.invite-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.invite-facts dt { flex: none; color: var(--ink-3); font-size: var(--fs-label); line-height: var(--lh-label); }
.invite-facts dd { text-align: right; font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.invite-facts small { display: block; margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 400; color: var(--ink-3); }
.invite-more { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); text-align: center; }
.invite-as { color: var(--ink-3); font-size: var(--fs-small); line-height: var(--lh-small); text-align: center; overflow-wrap: anywhere; }
.invite-as b { font-weight: 600; color: var(--ink-2); }
.slip-faces { display: inline-flex; flex: none; }
.slip-faces svg { display: block; }
.slip-faces svg + svg { margin-left: -6px; }
.invite-faces { margin-bottom: var(--s-6); }
.invite-faces svg + svg { margin-left: -8px; }
.invite-view .auth-about { justify-content: center; }
.invite-next { margin: var(--s-4) 0 var(--s-5); }
.invite-next b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
#v-paused .onb-actions { width: 100%; }
@media (max-width: 600px) { .table th, .table td { padding-left: var(--s-3); padding-right: var(--s-2); } }
.plan-compare { table-layout: fixed; }
.plan-compare th, .plan-compare td { white-space: normal; overflow-wrap: anywhere; }
.plan-compare thead th:first-child, .plan-compare th[scope="row"] { width: 44%; }
@media (max-width: 680px) { .plan:has(+ .plan .plan-tag) { padding-bottom: var(--s-8); } .plan-compare th, .plan-compare td { padding-left: var(--s-3); padding-right: var(--s-2); } }
