/*
 * Completa design tokens.
 * These values are the single place to restyle the platform. They are a placeholder derived from the
 * Completa wordmark direction (warm neutral canvas, ink text, a single confident accent). Replace with the
 * exact tokens from completa.studio once available; nothing else in the UI hard-codes colour.
 */
:root {
  /* Completa brand: dark navy canvas, white geometric sans, periwinkle accent (from completa.studio). Dark is the default. */
  --c-bg: #0e1220;
  --c-surface: #161b2c;
  --c-surface-2: #1e2438;
  --c-ink: #f4f6fb;
  --c-ink-2: #b6bdd0;
  --c-ink-3: #7c849c;
  --c-line: #262d42;
  --c-accent: #6e8bff;
  --c-accent-ink: #0e1220;
  --c-accent-soft: #23305a;
  --c-btn: #a9bdff;
  --c-ok: #3ddc97;
  --c-warn: #f6c453;
  --c-danger: #ff6b6b;
  --c-info: #6e8bff;
  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.35);
  --space: 8px;
  --maxw: 1200px;
  /* Chart series (categorical, fixed order; validated for CVD separation on the dark surface). */
  --c-viz-1: #3987e5; --c-viz-2: #d95926; --c-viz-3: #199e70; --c-viz-4: #c98500;
}
:root:is([data-theme='light'], [data-theme='github-light'], [data-theme='solarized-light'], [data-theme='catppuccin-latte']) {
  --c-viz-1: #2a78d6; --c-viz-2: #eb6834; --c-viz-3: #1baf7a; --c-viz-4: #eda100;
}
:root[data-theme='light'] {
  --c-bg: #f5f6fa; --c-surface: #ffffff; --c-surface-2: #eceef5; --c-ink: #0e1220; --c-ink-2: #4b526a;
  --c-ink-3: #7c849c; --c-line: #dfe3ee; --c-accent: #4f6cff; --c-accent-ink: #ffffff; --c-accent-soft: #e6ebff; --c-btn: #4f6cff;
  --c-ok: #12965f; --c-warn: #b7791f; --c-danger: #d64545; --c-info: #4f6cff;
  --shadow: 0 1px 2px rgba(14, 18, 32, 0.06), 0 8px 24px rgba(14, 18, 32, 0.06);
}
/* Extra colour themes. Palettes from Nord (nordtheme.com) and Dracula (draculatheme.com), both MIT licensed. */
:root[data-theme='nord'] {
  --c-bg: #1f232b; --c-surface: #2a2f3a; --c-surface-2: #343a47; --c-ink: #eceff4; --c-ink-2: #d8dee9;
  --c-ink-3: #97a2b6; --c-line: #353b48; --c-accent: #88c0d0; --c-accent-ink: #2e3440; --c-accent-soft: #3d5361; --c-btn: #88c0d0;
  --c-ok: #a3be8c; --c-warn: #ebcb8b; --c-danger: #bf616a; --c-info: #81a1c1;
}
:root[data-theme='dracula'] {
  --c-bg: #1e1f29; --c-surface: #282a36; --c-surface-2: #323444; --c-ink: #f8f8f2; --c-ink-2: #d2d4e0;
  --c-ink-3: #9097bd; --c-line: #363949; --c-accent: #bd93f9; --c-accent-ink: #282a36; --c-accent-soft: #463d66; --c-btn: #bd93f9;
  --c-ok: #50fa7b; --c-warn: #f1fa8c; --c-danger: #ff5555; --c-info: #8be9fd;
}
/* CommWise: the old CommWise site colors (deep green-black, bright CommWise green). */
:root[data-theme='commwise'] {
  --c-bg: #0c1410; --c-surface: #15201a; --c-surface-2: #1d2a23; --c-ink: #f3f7f4; --c-ink-2: #c3d0c8;
  --c-ink-3: #869a8f; --c-line: #263730; --c-accent: #22e05c; --c-accent-ink: #062110; --c-accent-soft: #173d25; --c-btn: #22e05c;
  --c-ok: #22e05c; --c-warn: #e8c547; --c-danger: #ff6b6b; --c-info: #4fc3f7;
}
/* Palettes adapted from Solarized, One Dark, Tokyo Night, Catppuccin, Gruvbox, Rosé Pine, GitHub Primer and Ayu, all MIT licensed. */
:root[data-theme='solarized-dark'] {
  --c-bg: #001f27; --c-surface: #002b36; --c-surface-2: #073642; --c-ink: #fdf6e3; --c-ink-2: #a9b7b7;
  --c-ink-3: #7b8e93; --c-line: #0a3a47; --c-accent: #268bd2; --c-accent-ink: #fdf6e3; --c-accent-soft: #0d4a63; --c-btn: #268bd2;
  --c-ok: #859900; --c-warn: #b58900; --c-danger: #dc322f; --c-info: #2aa198;
}
:root[data-theme='solarized-light'] {
  --c-bg: #fdf6e3; --c-surface: #fffbf0; --c-surface-2: #eee8d5; --c-ink: #073642; --c-ink-2: #586e75;
  --c-ink-3: #7b8a8b; --c-line: #e2dcc8; --c-accent: #268bd2; --c-accent-ink: #ffffff; --c-accent-soft: #dcebf5; --c-btn: #268bd2;
  --c-ok: #5f7300; --c-warn: #946f00; --c-danger: #c42b28; --c-info: #1d8a83;
  --shadow: 0 1px 2px rgba(14, 18, 32, 0.06), 0 8px 24px rgba(14, 18, 32, 0.06);
}
:root[data-theme='one-dark'] {
  --c-bg: #1e2127; --c-surface: #282c34; --c-surface-2: #31363f; --c-ink: #e6e9ef; --c-ink-2: #c2c8d3;
  --c-ink-3: #8b919c; --c-line: #353b45; --c-accent: #61afef; --c-accent-ink: #282c34; --c-accent-soft: #2b3f55; --c-btn: #61afef;
  --c-ok: #98c379; --c-warn: #e5c07b; --c-danger: #e06c75; --c-info: #56b6c2;
}
:root[data-theme='tokyo-night'] {
  --c-bg: #13141c; --c-surface: #1a1b26; --c-surface-2: #24283b; --c-ink: #c0caf5; --c-ink-2: #b4bce0;
  --c-ink-3: #7880a8; --c-line: #292e42; --c-accent: #7aa2f7; --c-accent-ink: #1a1b26; --c-accent-soft: #2a3557; --c-btn: #7aa2f7;
  --c-ok: #9ece6a; --c-warn: #e0af68; --c-danger: #f7768e; --c-info: #7dcfff;
}
:root[data-theme='catppuccin-mocha'] {
  --c-bg: #11111b; --c-surface: #1e1e2e; --c-surface-2: #2a2a3c; --c-ink: #cdd6f4; --c-ink-2: #c3cbe8;
  --c-ink-3: #8a8fa8; --c-line: #313244; --c-accent: #cba6f7; --c-accent-ink: #1e1e2e; --c-accent-soft: #3d3456; --c-btn: #cba6f7;
  --c-ok: #a6e3a1; --c-warn: #f9e2af; --c-danger: #f38ba8; --c-info: #89b4fa;
}
:root[data-theme='catppuccin-latte'] {
  --c-bg: #eff1f5; --c-surface: #ffffff; --c-surface-2: #e6e9ef; --c-ink: #4c4f69; --c-ink-2: #5c5f77;
  --c-ink-3: #7c7f93; --c-line: #dce0e8; --c-accent: #8839ef; --c-accent-ink: #ffffff; --c-accent-soft: #ece2fc; --c-btn: #8839ef;
  --c-ok: #2f8a1f; --c-warn: #b06a0a; --c-danger: #d20f39; --c-info: #1e66f5;
  --shadow: 0 1px 2px rgba(14, 18, 32, 0.06), 0 8px 24px rgba(14, 18, 32, 0.06);
}
:root[data-theme='gruvbox-dark'] {
  --c-bg: #1d2021; --c-surface: #282828; --c-surface-2: #32302f; --c-ink: #fbf1c7; --c-ink-2: #e0d2b0;
  --c-ink-3: #a89984; --c-line: #3c3836; --c-accent: #fe8019; --c-accent-ink: #282828; --c-accent-soft: #4a3423; --c-btn: #fe8019;
  --c-ok: #b8bb26; --c-warn: #fabd2f; --c-danger: #fb4934; --c-info: #83a598;
}
:root[data-theme='rose-pine'] {
  --c-bg: #12101a; --c-surface: #191724; --c-surface-2: #232035; --c-ink: #e0def4; --c-ink-2: #cfcce6;
  --c-ink-3: #908caa; --c-line: #29263b; --c-accent: #c4a7e7; --c-accent-ink: #191724; --c-accent-soft: #3a3150; --c-btn: #c4a7e7;
  --c-ok: #9ccfd8; --c-warn: #f6c177; --c-danger: #eb6f92; --c-info: #31748f;
}
:root[data-theme='github-light'] {
  --c-bg: #f6f8fa; --c-surface: #ffffff; --c-surface-2: #eff2f5; --c-ink: #1f2328; --c-ink-2: #454c55;
  --c-ink-3: #6e7781; --c-line: #d0d7de; --c-accent: #0969da; --c-accent-ink: #ffffff; --c-accent-soft: #ddf4ff; --c-btn: #0969da;
  --c-ok: #1a7f37; --c-warn: #9a6700; --c-danger: #cf222e; --c-info: #0969da;
  --shadow: 0 1px 2px rgba(14, 18, 32, 0.06), 0 8px 24px rgba(14, 18, 32, 0.06);
}
:root[data-theme='ayu-mirage'] {
  --c-bg: #171b24; --c-surface: #1f2430; --c-surface-2: #272d3b; --c-ink: #e6e1cf; --c-ink-2: #d9d6c9;
  --c-ink-3: #8a8f99; --c-line: #2d3343; --c-accent: #ffcc66; --c-accent-ink: #1f2430; --c-accent-soft: #4a4130; --c-btn: #ffcc66;
  --c-ok: #87d96c; --c-warn: #ffd173; --c-danger: #f28779; --c-info: #5ccfe6;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Scrollbars: every scroll area takes the theme's colors, not the browser's light default. Areas are thin, the
   page itself keeps the normal width. Rules that hide a bar (scrollbar-width: none) still win over the * rule. */
:root { scrollbar-color: color-mix(in srgb, var(--c-ink) 28%, transparent) transparent; }
* { scrollbar-width: thin; }
html { scrollbar-width: auto; }
/* Browsers without scrollbar-color (Safari before 18.2). */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--c-ink) 28%, transparent); border-radius: 999px; }
}
/* File inputs: the browser's "Choose file" button drawn as one of ours (console pages get the square console button). */
input[type='file'] { max-width: 100%; font: inherit; font-size: 13px; color: var(--c-ink-2); }
input[type='file']::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); color: var(--c-ink); font: inherit; font-weight: 500; cursor: pointer; }
input[type='file']::file-selector-button:hover { border-color: var(--c-ink-3); }
.cx input[type='file']::file-selector-button { height: 30px; padding: 0 12px; border-color: var(--cx-line-2); border-radius: var(--cx-r); background: transparent; font: 600 12.5px/1 var(--font-body); }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 15px/1.55 var(--font-body); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: 40px; } h2 { font-size: 28px; } h3 { font-size: 20px; }
/* A heading can carry a team or organization name of up to 80 characters with no spaces: it breaks rather than run out of its box. */
h1, h2, h3 { overflow-wrap: break-word; }
p { margin: 0 0 12px; }
code, pre { font-family: var(--font-mono); font-size: 13px; }
pre { background: var(--c-surface-2); padding: 12px; border-radius: var(--radius); overflow: auto; }

.c-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.c-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--c-bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
/* The header divider lines up with the open sidebar's right edge: the brand fills the
   sidebar's width less the header padding and gap. */
:root { --c-side-w: 184px; }
.c-top-in { padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 12px; }
.c-brand { flex-shrink: 0; width: calc(var(--c-side-w) - 1px - 24px - 12px); box-sizing: border-box; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }
.c-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); display: inline-block; }
.c-spacer { flex: 1; }
.c-select.c-language { width: auto; flex-shrink: 0; height: 34px; padding: 0 10px; font-size: 13px; border-radius: 999px; }
/* Header, left to right: brand ... preferences (language, theme, help) | the account pill (you, team, settings). */
/* Organization marks: a logo, or initials on a hue of its own (--ws-h, layout.tsx hueOf). Your own workspace is round. */
.c-tm-mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; object-fit: cover; background: hsl(var(--ws-h, 228) 52% 48%); color: #fff; font: 800 8.5px var(--font-display); letter-spacing: .02em; }
.c-tm-mark.is-own { border-radius: 50%; background: linear-gradient(135deg, #f06ba8, #9b5ce6); }
.c-tm-mark.is-other, .c-tm-mark.is-wait { background: var(--c-surface-2); color: var(--c-ink-3); }
.c-top-prefs { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.c-top-prefs .c-goo-btn { height: 40px; }
/* Signed out, on a site with sign-up: Sign in and Sign up side by side. */
.c-top-auth { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 8px; }
.c-top-auth .c-btn { min-height: 40px; white-space: nowrap; }
/* A phone's header has no room for both: it keeps Sign in, and the hero's Sign up button is on the first screen. */
@media (max-width: 520px) { .c-top-auth .c-btn.primary { display: none; } }
.c-account { display: flex; align-items: center; flex-shrink: 0; height: 40px; margin-left: 8px; padding: 3px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-size: 13px; }
.c-account-me { display: flex; align-items: center; height: 100%; padding: 0 3px; border-radius: 999px; color: var(--c-ink); font-weight: 500; }
.c-account-me:hover, .c-account-me[aria-expanded='true'] { background: var(--c-surface-2); }
/* The account pill (layout.tsx): your avatar | TEAM and where you are ▾ | the settings gear. */
.c-account-div { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--c-line); }
.c-team-wrap { position: relative; display: flex; align-items: center; height: 100%; min-width: 0; }
.c-team-btn { display: flex; align-items: center; gap: 8px; height: 100%; min-width: 0; max-width: 300px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink); font: 600 14px var(--font-body); white-space: nowrap; cursor: pointer; }
.c-team-btn:hover, .c-team-btn[aria-expanded='true'] { background: color-mix(in srgb, var(--c-ink) 10%, var(--c-surface-2)); }
.c-team-k { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-3); }
.c-team-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-team-chev { flex: none; color: var(--c-ink-3); }
.c-account-gear { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-left: 2px; border-radius: 50%; color: var(--c-ink-2); }
.c-account-gear .c-side-ic { width: 17px; height: 17px; }
.c-account-gear:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-account-gear[aria-current='page'] { background: var(--c-accent-soft); color: var(--c-accent); }
.c-account-me:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-account img, .c-account-initial { flex: none; width: 28px; height: 28px; border-radius: 50%; }
.c-account img { border: 1px solid var(--c-line); }
.c-account-initial { display: grid; place-items: center; background: var(--c-accent-soft); color: var(--c-accent); font: 700 13px var(--font-display); }
.c-confirm { width: min(400px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.c-confirm .c-input { width: 100%; margin: 8px 0 4px; }
.c-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.c-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.c-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--c-line); border-left-width: 4px; border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.c-toast.is-error { border-left-color: var(--c-danger); }
.c-toast.is-ok { border-left-color: var(--c-ok); }
.c-toast:has(.c-toast-report) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.c-toast-report { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--c-accent); }
.c-error-report { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-error-report .c-help { flex: 1 1 240px; margin: 0; }
.c-toast-x { margin-left: auto; border: 0; background: none; color: var(--c-ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
/* Workspace setup card (public/team-setup.js): each team being set up, part by part, with what is running now. */
.c-setup { position: fixed; right: 16px; bottom: 16px; z-index: 1000; width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 14px 16px; border: 1px solid var(--c-line); border-left: 4px solid var(--c-accent); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); display: grid; gap: 10px; font-size: 14px; }
.c-setup.is-ok { border-left-color: var(--c-ok); }
.c-setup.is-error { border-left-color: var(--c-danger); }
.c-setup-head { display: flex; align-items: center; gap: 10px; }
.c-setup-title { flex: 1; min-width: 0; font-weight: 600; }
.c-setup-clock { color: var(--c-ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.c-setup-toggle { min-height: 40px; padding: 0 8px; border: 0; background: none; color: var(--c-ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.c-setup-toggle:hover { color: var(--c-ink); }
.c-setup-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); }
.c-setup.is-working .c-setup-dot { animation: c-next-pulse 1.4s ease-in-out infinite; }
.c-setup.is-ok .c-setup-dot { background: var(--c-ok); }
.c-setup.is-error .c-setup-dot { background: var(--c-danger); }
.c-setup.is-collapsed .c-setup-body { display: none; }
.c-setup-body { display: grid; gap: 10px; }
.c-setup-teams { display: grid; gap: 10px; }
.c-setup-team { display: grid; gap: 4px; }
.c-setup-team-name { color: var(--c-ink-2); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-setup-part { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius); background: var(--c-surface-2); }
.c-setup-part-name { flex: 1; min-width: 0; }
.c-setup-state { color: var(--c-ink-3); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.c-setup-mark { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-line); box-sizing: border-box; }
.c-setup-part.is-done .c-setup-mark { border-color: var(--c-ok); background: var(--c-ok); }
.c-setup-part.is-done .c-setup-state { color: var(--c-ok); }
.c-setup-part.is-working .c-setup-mark { border-color: var(--c-accent); border-top-color: transparent; animation: c-apps-spin .9s linear infinite; }
.c-setup-part.is-working .c-setup-state { color: var(--c-accent); }
.c-setup-part.is-retrying .c-setup-mark, .c-setup-part.is-sign_in .c-setup-mark { border-color: var(--c-warn); }
.c-setup-part.is-retrying .c-setup-state, .c-setup-part.is-sign_in .c-setup-state { color: var(--c-warn); }
.c-setup-part.is-stopped .c-setup-mark { border-color: var(--c-danger); }
.c-setup-part.is-stopped .c-setup-state { color: var(--c-danger); }
.c-setup-note { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 1.45; }
.c-setup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.c-setup-actions:empty { display: none; }
.c-setup-actions .c-btn { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .c-setup-dot, .c-setup-part.is-working .c-setup-mark { animation: none; } }
@media (max-width: 640px) { .c-setup { left: 16px; right: 16px; width: auto; max-height: 60dvh; } }
.c-setup-sum { display: none; }
/* Docked (/start's top bar): a pill with the same details in a panel dropping down from it. */
.c-setup.is-docked { position: relative; inset: auto; z-index: 20; width: auto; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; display: block; }
.c-setup.is-docked .c-setup-head { min-height: 40px; padding: 0 4px 0 14px; gap: 8px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-size: 13px; cursor: pointer; white-space: nowrap; }
.c-setup.is-docked .c-setup-head:hover { border-color: var(--c-accent); }
.c-setup.is-docked.is-ok .c-setup-head { border-color: color-mix(in srgb, var(--c-ok) 50%, var(--c-line)); }
.c-setup.is-docked.is-error .c-setup-head { border-color: var(--c-danger); }
.c-setup.is-docked .c-setup-title { flex: none; font-weight: 600; }
.c-setup.is-docked .c-setup-sum { display: inline; color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.c-setup.is-docked .c-setup-toggle { min-width: 32px; padding: 0 8px; font-size: 12px; color: var(--c-ink-3); }
.c-setup.is-docked .c-setup-body { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 120px); overflow-y: auto; padding: 14px 16px; border: 1px solid var(--c-line); border-left: 4px solid var(--c-accent); border-radius: var(--radius-lg); background: var(--c-surface); box-shadow: var(--shadow); }
.c-setup.is-docked.is-ok .c-setup-body { border-left-color: var(--c-ok); }
.c-setup.is-docked.is-error .c-setup-body { border-left-color: var(--c-danger); }
@media (max-width: 640px) {
  .c-setup.is-docked { left: auto; right: auto; }
  .c-setup.is-docked .c-setup-title, .c-setup.is-docked .c-setup-clock { display: none; }
  .c-setup.is-docked.is-ok .c-setup-title, .c-setup.is-docked.is-error .c-setup-title { display: inline; }
  .c-setup.is-docked .c-setup-body { position: fixed; left: 16px; right: 16px; width: auto; top: calc(env(safe-area-inset-top, 0px) + 76px); }
}
[aria-busy="true"] { cursor: progress; opacity: .7; }
.c-confirm::backdrop { background: rgba(8, 10, 18, .6); }
.c-confirm h2 { margin: 0 0 6px; font-size: 20px; }
.c-confirm p { margin: 0; color: var(--c-ink-2); font-size: 14px; }
.c-confirm-lines { margin: 8px 0 0; padding-left: 18px; color: var(--c-ink-2); font-size: 14px; line-height: 1.5; }
.c-confirm .c-confirm-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface-2); color: var(--c-ink); overflow-wrap: anywhere; }
.c-confirm-arrow { color: var(--c-ink-2); }
.c-confirm-actions .c-btn { min-height: 40px; }
.c-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.c-next { width: min(460px, calc(100vw - 32px)); }
.c-next-head { display: flex; align-items: center; gap: 12px; }
.c-next-head h2 { margin: 0; }
.c-next-badge { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: color-mix(in srgb, var(--c-ok) 16%, transparent); color: var(--c-ok); }
.c-confirm .c-next-subject { margin-top: 2px; color: var(--c-ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-confirm .c-next-text { margin-top: 14px; line-height: 1.5; }
.c-next-link { display: flex; align-items: center; gap: 12px; min-height: 40px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface-2); color: var(--c-ink); text-decoration: none; }
.c-next-link:hover, .c-next-link:focus-visible { border-color: var(--c-accent); color: var(--c-ink); }
.c-next-link-words { display: flex; flex-direction: column; min-width: 0; }
.c-next-link-words small { color: var(--c-ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-next-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c-warn) 14%, transparent); color: var(--c-warn); font-size: 12px; font-weight: 600; white-space: nowrap; }
.c-next-dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; animation: c-next-pulse 1.4s ease-in-out infinite; }
@keyframes c-next-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .c-next-dot { animation: none; } }
.c-next-arrow { color: var(--c-ink-3); font-size: 16px; }
.c-next-pill + .c-next-arrow { margin-left: 0; }
.c-next-link-words + .c-next-arrow { margin-left: auto; }
.c-confirm .c-next-hint { margin-top: 12px; color: var(--c-ink-3); font-size: 13px; }
.c-confirm .c-next-error { margin-top: 12px; color: var(--c-danger); font-size: 13px; }
.c-next-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
/* A card's heading with its own button beside it (Settings → Division: Teams + Add team, Templates + Configure templates). */
.c-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.c-section-head h2 { margin: 0; }
.c-next-actions .c-btn { min-height: 40px; }
.c-next-actions .c-next-quiet { margin-right: auto; padding-left: 4px; padding-right: 4px; border-color: transparent; background: none; color: var(--c-ink-2); }
.c-next-actions .c-next-quiet:hover { border-color: transparent; color: var(--c-danger); }
@media (max-width: 480px) {
  .c-next-actions .c-btn { flex: 1 1 auto; justify-content: center; }
  .c-next-actions .c-btn.primary { order: -1; flex-basis: 100%; }
  .c-next-actions .c-next-quiet { order: 1; flex-basis: 100%; margin-right: 0; }
}
.c-logo { flex: none; color: var(--c-ink); }
button.c-top-ic { border: 0; background: none; padding: 0; cursor: pointer; }
.c-top-ic .c-side-ic { width: 18px; height: 18px; }
.c-top-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; color: var(--c-ink-2); }
.c-top-ic:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-body { flex: 1; display: flex; gap: 28px; width: 100%; padding: 0 24px 0 0; }
.c-sidebar { flex: none; width: var(--c-side-w); padding: 16px 8px 12px; z-index: 25; background: var(--c-bg); transition: width .15s ease, margin .15s ease; position: sticky; top: 61px; align-self: flex-start; height: calc(100dvh - 61px); overflow-y: auto; overscroll-behavior: none; border-right: 1px solid var(--c-line); display: flex; flex-direction: column; }
.c-side-nav { display: flex; flex-direction: column; gap: 2px; }
.c-side-link { display: flex; align-items: center; gap: 9px; min-height: 34px; box-sizing: border-box; padding: 6px 11.5px; font-size: 14px; border-radius: 999px; color: var(--c-ink-2); font-weight: 500; white-space: nowrap; }
.c-side-link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-side-link[aria-current='page'] { background: var(--c-accent); color: var(--c-accent-ink); font-weight: 600; }
.c-side-ic { width: 17px; height: 17px; flex: none; }
.c-side-rule { height: 0; margin: 6px 10px; border: 0; border-top: 1px solid var(--c-line); }
.c-side-label { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
/* Group labels (Apps, Algorithms) head each family in the menu. On the closed icon rail each becomes a hairline in the
   same height, so no icon moves when the rail opens on hover. */
.c-side-grp { position: relative; display: flex; align-items: flex-end; height: 30px; margin: 0; padding: 0 11.5px 5px; box-sizing: border-box; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1; text-transform: uppercase; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; }
.c-side-foot { margin-top: auto; padding-top: 12px; }
.c-side-help { margin-bottom: 2px; font-size: 13px; color: var(--c-ink-3); }
.c-side-toggle { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 11.5px; border: 0; border-radius: var(--radius); background: transparent; color: var(--c-ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.c-side-toggle:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-side-when-closed { display: none; }
.c-side-closed .c-sidebar { width: 56px; }
/* Not pinned: hovering (or tabbing into) the rail opens it over the page without moving the page. */
.c-side-closed.c-side-peek .c-sidebar { width: var(--c-side-w); margin-right: -128px; box-shadow: var(--shadow); border-radius: 0 12px 12px 0; }
.c-side-toggle[aria-pressed='true'] { color: var(--c-accent); }
@media (prefers-reduced-motion: reduce) { .c-sidebar { transition: none; } }
/* Closed and peeking rails keep every icon where it is: same left padding, and section labels keep their height. */
.c-side-closed:not(.c-side-peek) .c-side-txt { display: none; }
.c-side-closed:not(.c-side-peek) .c-side-label { visibility: hidden; white-space: nowrap; overflow: hidden; }
.c-side-closed:not(.c-side-peek) .c-side-grp::before { content: ''; position: absolute; left: 10px; right: 10px; top: 50%; border-top: 1px solid var(--c-line); }
.c-side-closed .c-side-when-open { display: none; }
.c-side-closed .c-side-when-closed { display: block; }
.c-main { --c-main-pt: 32px; flex: 1; min-width: 0; width: 100%; padding: var(--c-main-pt) 0 64px; }
/* Signed in, the page and the footer are one column beside the sidebar (layout.tsx). */
.c-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* ---- The content pane: signed in, on a screen wide enough for the sidebar ----
   The header and the sidebar never scroll. The page's column is its own scrolling pane under the header, so only the
   content moves, with the system's elastic scroll at either end; the page as a whole neither scrolls nor bounces.
   Sticky parts inside the pane stick to the pane's top, not under the header, so --c-pin is 0 in it; --c-top-h stays
   the header's height, for parts sized to what is left of the window.
   On a phone the page scrolls as a whole, as before. Printing is left alone (screen only). */
@media screen and (min-width: 721px) {
  html:has(.c-col) { overscroll-behavior: none; }
  /* Nothing drawn after the shell (a menu or a window waiting to be opened) may make the page itself scroll. */
  html:has(.c-col) body { overflow: hidden; }
  .c-shell:has(> .c-body > .c-col) { height: 100dvh; min-height: 0; overflow: hidden; }
  .c-shell:has(> .c-body > .c-col) > .c-body { min-height: 0; padding-right: 0; }
  /* position: what is placed absolutely inside the pane (a hidden label, a native select) belongs to it and scrolls
     with it, instead of escaping the pane and making the page itself scrollable. */
  .c-col { --c-pin: 0px; position: relative; min-height: 0; overflow-y: auto; padding-right: 24px; }
  .c-col:focus { outline: none; }
  .c-col > .c-main { flex: 1 0 auto; }
  .c-col > .c-foot { flex: none; }
  /* A window opened over the page holds the pane still, as it held the page. */
  body:is(.c-au-modal-open, .c-lib-modal-open) :is(.c-col, .pl-scroll) { overflow: hidden; }
}
.c-foot { border-top: 1px solid var(--c-line); color: var(--c-ink-3); font-size: 12px; padding: 20px 16px; text-align: center; }
/* Terms, Privacy and Legal beside the copyright (domains/legal). */
.c-foot-legal { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-left: 14px; }
.c-foot-legal a { color: var(--c-ink-3); text-decoration: none; }
.c-foot-legal a:hover { color: var(--c-ink); text-decoration: underline; }
/* Under a sign-up button: carrying on accepts the terms (legal/terms-notice.tsx). Small and quiet on purpose. */
.c-terms-note, .c-lp-band p.c-terms-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--c-ink-3); max-width: 540px; }
.c-terms-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.c-terms-note a:hover { color: var(--c-ink); }
.c-terms-banner { margin-bottom: 16px; }
.c-terms-banner p { margin: 0; }

.c-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.c-page-head p { color: var(--c-ink-2); margin: 0; overflow-wrap: anywhere; }
.c-page-head > div { min-width: 0; }
.c-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.c-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
/* Admin → Users → a person: Account and Allowed customers share the row; Memberships runs full width under them. */
.c-user-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.c-user-ms .c-table td { vertical-align: middle; }
.c-user-ms .c-table form { flex-wrap: nowrap; align-items: center; }
.c-app-card { display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: transform .12s ease, border-color .12s ease; }
.c-app-card:hover { transform: translateY(-2px); border-color: var(--c-accent); }
.c-app-card.no-access { opacity: .55; }
a.c-app-card { color: inherit; text-decoration: none; }
.c-tag-colored { border-left: 3px solid var(--c-tag-accent, var(--c-accent)); }
.c-app-card .title { font-weight: 600; font-size: 16px; }
.c-app-card details { font-size: 13px; }
.c-app-card summary { cursor: pointer; margin-top: 6px; }
.c-roles-back { position: fixed; inset: 0; background: rgba(8, 10, 18, 0.55); z-index: 40; }
.c-roles-box { position: fixed; z-index: 41; top: 8vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); max-height: 84vh; overflow: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 16px; }
.c-app-card .meta { color: var(--c-ink-3); font-size: 12px; margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.c-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 12px; }
.c-tag.accent { background: var(--c-accent-soft); color: var(--c-accent); }
.c-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); font: inherit; font-weight: 500; cursor: pointer; }
.c-btn:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
.c-btn.primary { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-accent-ink); }
.c-btn.primary:hover { filter: brightness(0.95); color: var(--c-accent-ink); }
.c-btn.danger { color: var(--c-danger); }
/* A button that cannot do anything yet looks it (aria-disabled, with the reason on hover). */
.c-btn:disabled, .c-btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; filter: none; border-color: var(--c-line); }
.c-btn[aria-busy='true'] { cursor: progress; }
.c-btn.sm { padding: 5px 10px; font-size: 13px; }
.c-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.c-input, .c-select, .c-textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); color: var(--c-ink); width: 100%; }
.c-input:focus, .c-select:focus, .c-textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; border-color: var(--c-accent); }
/* Phones: 16px text in fields, or iOS zooms the page when one is tapped (Members search, every form). */
@media (max-width: 720px) { .c-input, .c-select, .c-textarea { font-size: 16px; } }
.c-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.c-field label { font-size: 13px; color: var(--c-ink-2); font-weight: 500; }
.c-help { font-size: 12px; color: var(--c-ink-3); }
.c-storage-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.c-customers > .c-help { margin: 8px 0 0; }
/* Admin → Teams, new team: the Division picker may shrink below its long option text ("… new team gets C_0_4"),
   which then wraps in the open list instead of pushing the page sideways. */
.c-new-team-division { flex: 1 1 280px; min-width: 0; }
.c-new-team-name { flex: 1 1 200px; min-width: 0; }
.c-new-team .c-goo-item { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .c-customers .c-btn, .c-customers .c-check, .c-customers .c-select { min-height: 40px; }
  .c-customers .c-check { align-items: center; }
  .c-new-team > .c-field { flex-basis: 100%; }
}
.c-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.c-table th, .c-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
/* A visually hidden header label (u-sr-only, e.g. "Actions") is positioned: without a positioned th it escapes the table's
   sideways-scrolling box and makes the whole page wider than a phone (Members, Admin → Users). */
:is(.cx-table, .c-table) th { position: relative; }
.c-table th { color: var(--c-ink-2); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
/* People lists that open a person's page: the name reads as a link; rows with data-row-href open it from anywhere (app.js). */
.c-person-link { color: var(--c-accent); font-weight: 600; }
.c-person-link:hover, .c-person-link:focus-visible { text-decoration: underline; }
.c-table tr[data-row-href] { cursor: pointer; }
/* Admin → Domains (verified-domains-admin.tsx): who else asked for a domain, and Confirm / Reject buttons that wrap. */
.c-domain-rivals { margin: 0; padding: 0; list-style: none; }
.c-domain-rivals li + li { margin-top: 4px; }
.c-domain-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) { .c-domain-actions .c-btn { min-height: 40px; } }
.c-table tr[data-row-href]:hover > td { background: color-mix(in srgb, var(--c-accent) 6%, transparent); }
.c-table .c-row-go { width: 1%; color: var(--c-ink-3); font-size: 18px; line-height: 1; vertical-align: middle; text-align: right; }
.c-table tr[data-row-href]:hover .c-row-go { color: var(--c-accent); }
.c-empty { text-align: center; color: var(--c-ink-3); padding: 48px 16px; }
/* Team apps with no apps anywhere: Build your first app, centered under the line. */
.c-empty .c-apps-first { justify-content: center; }
/* The page a browser gets when a page cannot go on (ui/error-page.tsx). */
.c-error-page { max-width: 560px; margin: 48px auto; }
.c-error-page h1 { margin: 0 0 8px; font-size: 22px; }
.c-error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@media (max-width: 520px) { .c-error-page { margin: 16px auto; } .c-error-actions .c-btn { flex: 1 1 100%; justify-content: center; } }
.c-banner { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-surface); display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.c-banner.info { border-color: color-mix(in srgb, var(--c-info) 40%, var(--c-line)); }
.c-banner.warn { border-color: color-mix(in srgb, var(--c-warn) 50%, var(--c-line)); }
.c-banner.danger { border-color: color-mix(in srgb, var(--c-danger) 50%, var(--c-line)); }
.c-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-ink-2); }
.c-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink-3); }
.c-status.ok::before { background: var(--c-ok); } .c-status.warn::before { background: var(--c-warn); } .c-status.danger::before { background: var(--c-danger); }
/* The line is an inset shadow, not a border the tabs overlap with margin-bottom: -1px: that 1px overflow made the
   row show a tiny vertical scrollbar. A row too wide for the screen scrolls sideways with a thin bar, so mouse users
   can still reach the last tabs. */
.c-tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--c-line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.c-tabs a { padding: 10px 14px; color: var(--c-ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.c-tabs a[aria-current='page'] { color: var(--c-ink); border-color: var(--c-accent); }
/* Settings level bar, Organization › Division › Team (identity/level-bar.tsx). Wraps on a phone. */
.c-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.c-levels a { display: flex; flex-direction: column; min-height: 40px; justify-content: center; padding: 6px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink-2); max-width: 100%; }
.c-levels a small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-3); }
.c-levels a span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-levels a[aria-current='page'] { border-color: var(--c-accent); color: var(--c-ink); }
.c-levels-sep { color: var(--c-ink-3); }
/* Admin → Organizations */
.c-org-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; cursor: pointer; min-height: 40px; }
.c-org-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.c-org-divisions { list-style: none; margin: 0; padding: 0; }
.c-inline-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.c-inline-add .c-input { width: 180px; max-width: 100%; }
.c-org-divisions li { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
/* A division's buttons (Open, Add team, Take out) on Admin → Organizations and Settings → Organization. On a phone
   Open and Take out share a line and the name box with its Add team button gets a line of its own. */
.c-division-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 720px) {
  .c-org-divisions li > .c-division-actions { flex-basis: 100%; min-width: 0; }
  .c-division-actions .c-btn { min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
  .c-division-actions .c-inline-add { flex-basis: 100%; min-width: 0; order: 3; flex-wrap: nowrap; }
  /* width 0 + grow: an input's own width (about 20 characters) would otherwise push the button off the screen. */
  .c-division-actions .c-inline-add .c-input { flex: 1 1 0; width: 0; min-width: 0; }
  /* Settings → Organization: each division's name above its buttons, so the name box gets the full width. */
  .c-division-table tbody td { display: block; }
  .c-division-table tbody td:first-child { border-bottom: 0; padding-bottom: 4px; }
}
/* Division level → Open to: a tickbox per platform role and Save, wrapping onto lines of their own when narrow. */
.c-open-to { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.c-open-to fieldset { display: flex; flex-wrap: wrap; gap: 6px 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.c-open-to fieldset:disabled .c-check { cursor: not-allowed; opacity: .6; }
.c-open-to-count { flex-basis: 100%; }
/* Phones: the level bar is one row that swipes sideways, and the small buttons on these pages are 40px tap targets. */
@media (max-width: 720px) {
  .c-levels { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .c-levels::-webkit-scrollbar { display: none; }
  .c-levels a { flex: 0 0 auto; max-width: 70vw; }
  .c-levels-page .c-btn { min-height: 40px; display: inline-flex; align-items: center; }
  .c-level-table th, .c-level-table td { padding-left: 6px; padding-right: 6px; }
  .c-level-table td:first-child { overflow-wrap: anywhere; }
  .c-open-to .c-check { min-height: 32px; align-items: center; }
  /* Each team is a card: name, member count and Members on one line, its Open to tickboxes across the full width below. */
  .c-open-table thead { display: none; }
  .c-open-table tr { display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
  .c-open-table td { border: 0; padding: 0; }
  .c-open-table td.c-open-cell { grid-column: 1 / -1; order: 4; }
  .c-open-table .c-members-word { display: inline; color: var(--c-ink-2); }
}
.c-members-word { display: none; }
/* Activity logs (Team Settings → Activity, the Division and Organization levels) */
.c-activity-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.c-activity-head h2 { margin: 0 0 4px; }
.c-activity-table td { vertical-align: top; }
.c-activity-table td:not(.c-nowrap) { overflow-wrap: anywhere; }
.c-nowrap { white-space: nowrap; }
@media (max-width: 720px) {
  .c-activity-head .c-btn { min-height: 40px; display: inline-flex; align-items: center; }
  /* Phones: each change is a short block (when, what, then labelled lines) instead of a squeezed six-column row. */
  .c-activity-table thead { display: none; }
  .c-activity-table, .c-activity-table tbody, .c-activity-table tr, .c-activity-table td { display: block; width: auto; }
  .c-activity-table tr { padding: 10px 0; border-bottom: 1px solid var(--c-line); }
  .c-activity-table td { border: 0; padding: 2px 0; }
  .c-activity-table td:empty { display: none; }
  .c-activity-table .c-activity-when { color: var(--c-ink-2); font-size: 12px; }
  .c-activity-table .c-activity-what { font-weight: 600; }
  .c-activity-table td[data-label]::before { content: attr(data-label) ': '; color: var(--c-ink-2); }
}
/* Add user: New person / Existing person / Several people, people found as you type, and bulk add progress */
.c-add-modes { flex-wrap: wrap; margin-bottom: 14px; }
.c-people { position: relative; }
.c-people-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.c-people-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.c-people-list li[aria-selected='true'], .c-people-list li:hover { background: var(--c-surface-2); }
.c-people-list li[aria-disabled='true'] { cursor: default; opacity: .7; }
.c-people-list li small { color: var(--c-ink-3); overflow-wrap: anywhere; }
.c-people-list li .c-people-teams { flex-basis: 100%; }
.c-people-list .c-people-head { display: block; padding: 4px 10px; font-size: 12px; color: var(--c-ink-3); cursor: default; }
.c-people-list .c-people-head:hover { background: none; }
.c-person-picked[hidden] { display: none; }
.c-person-picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--c-accent); border-radius: var(--radius); background: var(--c-accent-soft); overflow-wrap: anywhere; }
.c-bulk-text { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.c-bulk-actions { flex-wrap: wrap; }
.c-bulk-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.c-bulk-bar { height: 8px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.c-bulk-bar span { display: block; height: 100%; background: var(--c-accent); transition: width .4s; }
/* Real-time usage (domains/live/usage-pages.tsx): the used-of-limit bar above with its 80% tick and labels, three
   labelled rule lines, a labelled daily chart (days still to come as empty slots), a one-row staff form. Sections
   sit in one grid so each has clear space above. Existing tokens only; stacked at phone width. */
.c-rt-page { display: grid; gap: 24px; min-width: 0; }
.c-rt-section { display: grid; gap: 10px; min-width: 0; }
.c-rt-section > h3 { margin: 0; }
.c-rt-oneline { margin: 0; color: var(--c-ink-2); }
.c-rt-oneline b { color: var(--c-ink); }
.c-rt-usage { display: grid; gap: 8px; }
.c-rt-used { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; margin: 0; }
.c-rt-used b { font-size: 18px; font-variant-numeric: tabular-nums; }
.c-rt-end, .c-rt-nolimit { margin: 0; color: var(--c-ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.c-rt-bar { position: relative; height: 10px; }
.c-rt-bar.is-near span { background: var(--c-warn); }
.c-rt-bar.is-reached span { background: var(--c-danger); }
.c-rt-mark { position: absolute; top: 0; bottom: 0; left: 80%; width: 2px; background: var(--c-warn); }
.c-rt-legend { position: relative; height: 18px; margin: 0; font-size: 12px; color: var(--c-ink-3); }
.c-rt-legend span { position: absolute; top: 0; padding-right: 6px; white-space: nowrap; border-right: 2px solid var(--c-warn); }
.c-rt-rules { display: grid; gap: 6px; margin: 0; color: var(--c-ink-2); }
.c-rt-rules p { margin: 0; }
.c-rt-rules b { color: var(--c-ink); }
.c-rt-chart-wrap { position: relative; padding: 20px 6px 0 2px; min-width: 0; overflow-x: auto; }
.c-rt-max { position: absolute; top: 0; left: 0; right: 0; height: 20px; margin: 0; border-bottom: 1px dashed var(--c-line); font-size: 12px; color: var(--c-ink-3); }
.c-rt-chart { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; min-width: 0; }
.c-rt-chart li { flex: 1 0 10px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.c-rt-slot { height: 120px; display: flex; align-items: flex-end; }
.c-rt-col { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--c-accent); }
.c-rt-chart li.is-future .c-rt-slot { border-radius: 3px 3px 0 0; background: var(--c-surface-2); opacity: .5; }
.c-rt-day { text-align: center; font-size: 11px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.c-rt-limit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.c-rt-limit-form .cx-field .cx-input { width: 180px; height: 34px; font-size: 16px; }
.c-rt-divisions td:last-child { text-align: right; }
@media (max-width: 600px) {
  .c-rt-chart { gap: 2px; }
  .c-rt-chart li { flex-basis: 6px; }
  .c-rt-chart li.is-minor .c-rt-day { visibility: hidden; }
  .c-rt-slot { height: 100px; }
  .c-rt-limit-form { flex-direction: column; align-items: stretch; }
  .c-rt-limit-form .cx-field .cx-input { width: 100%; }
  .c-rt-limit-form .cx-btn { min-height: 40px; }
}
.c-bulk-preview-table td { vertical-align: top; overflow-wrap: anywhere; }
.u-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .c-add-modes { display: flex; border-radius: var(--radius); }
  .c-add-modes label { flex: 1 1 auto; text-align: center; border-radius: 8px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
  .c-bulk-actions .c-btn, .c-person-picked .c-btn { min-height: 40px; display: inline-flex; align-items: center; }
  /* 16px, as every field on a phone, or iOS zooms in when the list is tapped. */
  .c-bulk-text { font-size: 16px; }
  .c-activity-head .c-seg a { display: inline-flex; align-items: center; min-height: 40px; }
  .c-bulk-preview-table thead { display: none; }
  .c-bulk-preview-table, .c-bulk-preview-table tbody, .c-bulk-preview-table tr, .c-bulk-preview-table td { display: block; width: auto; }
  .c-bulk-preview-table tr { padding: 8px 0; border-bottom: 1px solid var(--c-line); }
  .c-bulk-preview-table td { border: 0; padding: 2px 0; }
}
/* Team Settings → Lists (lists-routes.tsx). */
.c-list-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.c-list-new .c-input { flex: 1 1 240px; max-width: 420px; }
.c-list-manage { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.c-list-manage .c-list-new { flex: 1 1 320px; margin: 0; }
.c-list-admins { list-style: none; margin: 0; padding: 0; }
.c-list-admins li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--c-line); overflow-wrap: anywhere; }
.c-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.c-chips:empty { display: none; }
.c-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-ink); font-size: 13px; max-width: 100%; overflow-wrap: anywhere; }
.c-chip-x { border: 0; background: none; color: var(--c-ink-2); cursor: pointer; font-size: 16px; line-height: 1; min-width: 28px; min-height: 28px; border-radius: 999px; }
.c-chip-x:hover, .c-chip-x:focus-visible { background: var(--c-surface-2); color: var(--c-ink); }
.c-list-people td { vertical-align: top; overflow-wrap: anywhere; }
.c-list-people td:first-child, .c-list-people th:first-child { width: 32px; }
.c-profile-lists { margin: 0 0 8px; padding-left: 18px; }
.c-profile-lists li { padding: 3px 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .c-list-new .c-input { max-width: none; }
  .c-list-new .c-btn, .c-list-manage .c-btn, .c-list-admins .c-btn { min-height: 40px; }
  .c-chip-x { min-width: 40px; min-height: 40px; }
  /* The tick boxes get the whole first column to tap. */
  .c-list-people input[data-list-pick], .c-list-people input[data-list-all] { width: 24px; height: 24px; margin: 8px 0; }
  .c-list-people thead, .c-lists-table thead { display: none; }
  .c-list-people, .c-list-people tbody, .c-lists-table, .c-lists-table tbody, .c-lists-table tr { display: block; width: auto; }
  .c-list-people tr { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
  .c-list-people td { display: block; border: 0; padding: 0; grid-column: 2; }
  .c-list-people td:first-child { grid-column: 1; grid-row: 1 / span 3; width: auto; }
  .c-lists-table tr { padding: 10px 0; border-bottom: 1px solid var(--c-line); }
  .c-lists-table td { display: block; border: 0; padding: 2px 0; }
  .c-list-people td[data-label]::before, .c-lists-table td[data-label]::before { content: attr(data-label) ': '; color: var(--c-ink-3); font-size: 12px; }
}
.c-split { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.c-side a { display: block; padding: 8px 10px; border-radius: var(--radius); color: var(--c-ink-2); }
.c-side a[aria-current='page'], .c-side a:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-hero { padding: 48px 0 32px; }
.c-hero h1 { font-size: clamp(36px, 6vw, 64px); }
.c-hero .u { color: var(--c-accent); text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.c-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink-2); margin-bottom: 14px; }
.c-eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--c-accent); border-radius: 2px; transform: rotate(12deg); }
.c-hero p { font-size: 18px; color: var(--c-ink-2); max-width: 640px; }
.c-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 24px; }
.c-kpi { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; }
.c-kpi .n { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; }
.c-kpi .l { color: var(--c-ink-3); font-size: 12px; margin-top: 4px; }
.c-pager { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
/* Phones: Previous / Next (Team Settings → Members, Admin → Users) are 40px tap targets. */
@media (max-width: 720px) { .c-pager .c-btn { min-height: 40px; display: inline-flex; align-items: center; } }
.c-muted { color: var(--c-ink-3); }
.c-mono { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 720px) { .c-split { grid-template-columns: 1fr; } h1 { font-size: 30px; } .c-main { --c-main-pt: 20px; } }

/* Logged-in home: centered greeting and search, a two-column board (apps | needs you + activity), a thin stats strip. */
.c-home { width: min(1080px, 100%); margin: 0 auto; display: grid; gap: 26px; }
.c-home-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-ink-3); margin: 0; }
.c-home-note { color: var(--c-warn); font-size: 13px; }
.c-home-warn { color: var(--c-warn) !important; }
.c-home-announce { margin: 0 auto 14px; max-width: 1080px; }
.c-home-announce .c-home-copy { flex: 1; min-width: 0; }
.c-home-announce .c-home-copy span { display: block; font-size: 12px; }
.c-main:has(.c-home) { background: radial-gradient(50% 360px at 50% 0, color-mix(in srgb, var(--c-accent) 12%, transparent), transparent 70%); }

.c-home-hello { text-align: center; display: grid; gap: 6px; padding-top: 2vh; }
.c-home-hello h1 { font-size: 36px; margin: 0; text-wrap: balance; }
.c-home-hello > p { margin: 0 0 14px; }
/* The date line ends with the team's name (up to 80 characters, maybe with no spaces): it wraps instead of widening Home. */
.c-home-hello > * { min-width: 0; }
.c-home-hello > p { overflow-wrap: anywhere; }
.c-home-spark { color: var(--c-accent); }
.c-home-search { position: relative; }
.c-home-search-ring { border-radius: 14px; padding: 1.5px; background: linear-gradient(110deg, var(--c-line), var(--c-accent), var(--c-ok), var(--c-accent), var(--c-line)); background-size: 300% 100%; animation: c-home-flow 8s linear infinite; }
@keyframes c-home-flow { to { background-position: 300% 0; } }
.c-home-search-in { display: flex; align-items: center; gap: 12px; background: var(--c-surface); border-radius: 12.5px; padding: 13px 16px; cursor: text; }
.c-home-search-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--c-ink); font: inherit; font-size: 16px; }
.c-home-search-in input::placeholder { color: var(--c-ink-3); }
.c-home-search-in kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--c-line); border-radius: 5px; padding: 2px 6px; color: var(--c-ink-3); }
.c-home-search-list { position: absolute; left: 0; right: 0; top: 56px; margin: 0; padding: 8px; list-style: none; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; }
.c-home-search-list .c-home-lbl { padding: 8px 10px 4px; }
.c-home-search-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--c-ink); }
/* "Ask …" and "Build a new app called …" repeat what was typed: one line, cut with an ellipsis. */
.c-home-search-list a > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-home-search-list [aria-selected='true'] a, .c-home-search-list a:hover { background: var(--c-surface-2); color: var(--c-ink); }

.c-home-search { text-align: left; }
.c-home-ask { margin-top: 12px; padding: 14px 16px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; display: grid; gap: 8px; }
.c-home-ask .c-home-lbl { margin: 0; }
.c-home-ask[hidden], .c-home-search-list[hidden] { display: none; }
.c-home-ask-text { margin: 0; white-space: pre-wrap; max-width: 75ch; }
.c-home-ask-src { display: flex; flex-wrap: wrap; gap: 8px; }
.c-home-search-ring { box-shadow: 0 18px 60px -24px color-mix(in srgb, var(--c-accent) 60%, transparent); }

.c-home-board { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.c-home-side { display: grid; grid-template-rows: auto 1fr; gap: 22px; min-width: 0; }
.c-home-side > .c-home-card:last-child { align-content: start; }
.c-home-board > .c-home-card { align-content: start; }
.c-home-card { background: color-mix(in srgb, var(--c-surface) 80%, transparent); border: 1px solid var(--c-line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.c-home-card-warn { border-color: color-mix(in srgb, var(--c-warn) 35%, var(--c-line)); }
.c-home-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.c-home-head h2 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.c-home-sub { color: var(--c-ink-2); }
.c-home-split { border-top: 1px solid var(--c-line); padding-top: 12px; }
.c-home-more { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--c-ink-3); cursor: pointer; }
.c-home-more:hover { color: var(--c-accent); }
.c-home-count { font-family: var(--font-mono); font-size: 12px; color: var(--c-warn); }

.c-home-mark { position: relative; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--c-accent-soft); color: var(--c-accent); font-family: var(--font-display); font-weight: 800; font-size: 10.5px; }
.c-home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.c-home-tile { display: grid; justify-items: center; gap: 7px; padding: 14px 6px 12px; border-radius: 13px; text-align: center; min-width: 0; color: var(--c-ink); background: none; border: 0; font: inherit; cursor: pointer; }
.c-home-tile:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-home-tile .c-home-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 13px; }
.c-home-tile b { font-weight: 500; font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-home-tile small { color: var(--c-ink-3); font-size: 11.5px; margin-top: -5px; }
.c-home-tile-add { border: 1px dashed var(--c-line); color: var(--c-ink-3); place-content: center; }
.c-home-pin { position: absolute; top: -6px; right: -6px; font-size: 10px; color: var(--c-warn); }
.c-home-chg { position: absolute; bottom: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-warn); border: 2px solid var(--c-bg); }
.c-home-recent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.c-home-recent li { min-width: 0; }
.c-home-recent a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 9px; min-width: 0; color: var(--c-ink); }
.c-home-recent a:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-home-recent b { flex: 1; min-width: 0; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-home-recent small { color: var(--c-ink-3); font-size: 11.5px; white-space: nowrap; }

.c-home-needs, .c-home-acts { list-style: none; margin: 0; padding: 0; }
.c-home-need, .c-home-act { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--c-line); }
.c-home-need:last-child, .c-home-act:last-child { border-bottom: 0; }
.c-home-need-txt, .c-home-act a { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--c-ink-2); }
.c-home-need-txt b, .c-home-act b { color: var(--c-ink); font-weight: 500; }
.c-home-act time { font-size: 11.5px; color: var(--c-ink-3); white-space: nowrap; }
.c-home-face { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c-surface-2); border: 1px solid var(--c-line); font-family: var(--font-display); font-weight: 800; font-size: 10.5px; color: var(--c-accent); }
.c-home-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--c-ink-3); display: inline-block; }
.c-home-dot.warn { background: var(--c-warn); } .c-home-dot.info { background: var(--c-info); } .c-home-dot.danger { background: var(--c-danger); } .c-home-dot.ok { background: var(--c-ok); }

.c-home-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--c-line); padding-top: 14px; }
/* No Connectors stat until there is an app (home/onboarding.ts connectorsDue). */
.c-home-strip.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-home-m { display: grid; gap: 2px; text-align: left; padding: 0 18px; border: 0; border-left: 1px solid var(--c-line); background: none; color: var(--c-ink); font: inherit; cursor: pointer; min-width: 0; }
.c-home-m:first-child { border-left: 0; padding-left: 4px; }
.c-home-n { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: color .15s; }
.c-home-m:hover .c-home-n { color: var(--c-accent); }
.c-home-n small { font-size: 12px; font-weight: 600; color: var(--c-ink-3); }
.c-home-bad { margin-left: 8px; display: inline-flex; align-items: center; gap: 5px; }
.c-home-list { list-style: none; margin: 0; padding: 0; display: grid; }
.c-home-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; }
/* Rows the pin list filters out (Pinned, or a search) are hidden: display:flex above would otherwise keep them showing. */
.c-home-row[hidden], .c-home-pick [hidden] { display: none; }
.c-home-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--c-ink); }
.c-home-row-txt b, .c-home-row-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-home-row-txt b { font-weight: 500; font-size: 14px; }
.c-home-row-txt span { font-size: 12.5px; }
.c-home-pick-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.c-home-pick-bar .c-input { flex: 1 1 100%; min-width: 0; }
.c-home-pick-bar .c-home-rq-seg button { white-space: nowrap; }
.c-home-pick-list { max-height: min(56dvh, 520px); overflow-y: auto; }
.c-home-pick-list .c-home-row:hover { background: var(--c-surface-2); }
.c-home-pick-pin { flex: none; min-width: 92px; }
.c-home-pick-pin[aria-pressed='true'] { color: var(--c-accent); border-color: var(--c-accent); }
@media (max-width: 620px) { .c-home-pick-bar .c-home-rq-seg { flex: 1 1 100%; } }

.c-tag.warn { background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); }
.c-tag.info { background: color-mix(in srgb, var(--c-info) 15%, transparent); color: var(--c-info); }
.c-tag.danger { background: color-mix(in srgb, var(--c-danger) 15%, transparent); color: var(--c-danger); }
.c-tag.ok { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }

@media (max-width: 900px) {
  .c-home-board { grid-template-columns: 1fr; }
  .c-home-recent { grid-template-columns: minmax(0, 1fr); }
  .c-home-strip, .c-home-strip.is-three { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .c-home-m:nth-child(3) { border-left: 0; padding-left: 4px; }
  .c-home-hello h1 { font-size: 28px; }
}
@media (max-width: 520px) { .c-home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .c-home-search-ring { animation: none; }
}

/* Onboarding: the Getting started card on Home. The Get started page (/start) has its own first-run.css. */
.c-ob-sub { margin: 2px 0 0; font-size: 12.5px; }
.c-ob-links { display: inline-flex; gap: 14px; }
/* Shown where the Getting started card was, once hidden. */
.c-ob-restore { margin: 0; text-align: right; }
.c-ob-restore .c-home-more { min-height: 40px; }
.c-ob-bar { height: 6px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.c-ob-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c-accent), var(--c-ok)); transition: width .4s; }
.c-ob-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.c-ob-step { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; }
.c-ob-step.is-next { background: var(--c-surface-2); }
.c-ob-step.is-done .c-ob-txt b { color: var(--c-ink-3); text-decoration: line-through; }
.c-ob-step.is-done .c-ob-txt span { display: none; }
.c-ob-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.c-ob-txt b { font-weight: 600; font-size: 13.5px; }
.c-ob-txt span { font-size: 12.5px; }
.c-ob-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--c-line); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.c-ob-check.is-done { background: var(--c-ok); border-color: var(--c-ok); color: var(--c-bg); }

@media (max-width: 520px) {
  .c-ob-step { flex-wrap: wrap; }
  .c-ob-step .c-btn { margin-left: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .c-ob-bar i { transition: none; }
}

/* The short tour of Completa on Home (public/tour.js): a spotlight on one thing and a small card beside it. */
.c-tour { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.c-tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 2px var(--c-accent), 0 0 0 9999px rgba(5, 7, 12, .62); transition: top .35s cubic-bezier(.2,.8,.2,1), left .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1); }
.c-tour-card { position: fixed; width: min(300px, calc(100vw - 24px)); padding: 16px 16px 12px; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow); pointer-events: auto; transition: top .35s cubic-bezier(.2,.8,.2,1), left .35s cubic-bezier(.2,.8,.2,1); }
.c-tour-card.is-in { animation: c-tour-in .3s cubic-bezier(.2,.8,.2,1); }
@keyframes c-tour-in { from { opacity: 0; transform: translateY(6px); } }
.c-tour-count { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); }
.c-tour-card h2 { font-size: 17px; margin: 0 0 4px; }
.c-tour-text { margin: 0 0 12px; font-size: 14px; color: var(--c-ink-2); line-height: 1.5; }
.c-tour-nav { display: flex; align-items: center; gap: 6px; }
.c-tour-gap { flex: 1; }
.c-tour-skip, .c-tour-back { min-height: 36px; padding: 0 8px; border: 0; background: none; color: var(--c-ink-3); font: inherit; font-size: 13px; cursor: pointer; border-radius: 8px; }
.c-tour-skip:hover, .c-tour-back:hover { color: var(--c-ink); }
.c-tour-next { min-height: 36px; }
@media (prefers-reduced-motion: reduce) {
  .c-tour-spot, .c-tour-card { transition: none; }
  .c-tour-card.is-in { animation: none; }
}

/* ---- The guided tour of Settings (public/settings-tour.js) ----
   A spotlight on one thing and a card beside it. The tour moves from page to page, so the page stays dimmed between
   two of them: ui/layout.tsx sets .st-wait before first paint while a tour is under way, and the script takes over
   from it. If the script never comes, the dimming lifts by itself. On a phone the card is a sheet along the bottom. */
html.st-wait::after { content: ''; position: fixed; inset: 0; z-index: 89; background: rgba(5, 7, 12, .62); animation: st-wait 4s linear forwards; }
@keyframes st-wait { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.st { position: fixed; inset: 0; z-index: 90; }
.st-spot { position: fixed; top: 50%; left: 50%; width: 0; height: 0; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 2px var(--c-accent), 0 0 0 7px color-mix(in srgb, var(--c-accent) 24%, transparent), 0 0 0 9999px rgba(5, 7, 12, .62); }
.st.is-new .st-spot { animation: st-spot-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes st-spot-in { from { opacity: 0; transform: scale(1.06); } }
.st-card { position: fixed; width: min(340px, calc(100vw - 24px)); border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow), 0 18px 48px -12px rgba(0, 0, 0, .5); transition: top .38s cubic-bezier(.2,.8,.2,1), left .38s cubic-bezier(.2,.8,.2,1); }
.st-card.is-in .st-in { animation: st-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } }
.st-card.is-nudge { animation: st-nudge .32s ease; }
@keyframes st-nudge { 30% { transform: scale(1.025); } }
.st-bar { height: 3px; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--c-line); }
.st-bar i { display: block; width: 0; height: 100%; border-radius: 0 3px 3px 0; background: var(--c-accent); transition: width .38s cubic-bezier(.2,.8,.2,1); }
.st-in { padding: 14px 18px 12px; }
.st-count { margin: 0 0 6px; color: var(--c-accent); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.st-card h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 17.5px; line-height: 1.3; }
.st-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--c-accent); color: var(--c-accent-ink); }
.st-ic[hidden] { display: none; }
.st-ic svg { width: 15px; height: 15px; }
.st-text { margin: 0 0 14px; color: var(--c-ink-2); font-size: 14px; line-height: 1.55; }
.st-nav { display: flex; align-items: center; gap: 6px; }
.st-gap { flex: 1; }
.st-quiet { min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.st-quiet:hover, .st-quiet:focus-visible { color: var(--c-ink); }
.st-quiet[hidden] { display: none; }
.st-more { color: var(--c-accent); font-weight: 600; }
.st-nav .c-btn { min-height: 36px; padding-inline: 14px; }
/* The pointer: a corner of the card turned toward what it is about. */
.st-caret { position: absolute; width: 12px; height: 12px; margin: -6px; background: var(--c-surface); border: 0 solid var(--c-line); transform: rotate(45deg); }
.st-card[data-side='right'] .st-caret { left: 0; border-width: 0 0 1px 1px; }
.st-card[data-side='left'] .st-caret { left: 100%; border-width: 1px 1px 0 0; }
.st-card[data-side='bottom'] .st-caret { top: 0; border-width: 1px 0 0 1px; }
.st-card[data-side='top'] .st-caret { top: 100%; border-width: 0 1px 1px 0; }
.st-card[data-side=''] .st-caret, .st-card.is-sheet .st-caret { display: none; }
.st-card.is-sheet { top: auto; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; }
.st-card.is-sheet .st-quiet, .st-card.is-sheet .st-nav .c-btn { min-height: 44px; }
.st-card.is-sheet .st-quiet { font-size: 14px; }
/* The offer, once, on a first visit to Settings: a small card in the corner that waits to be answered. */
.st-offer { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: flex-start; gap: 12px; width: min(340px, calc(100vw - 24px)); padding: 14px 14px 10px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow), 0 18px 48px -12px rgba(0, 0, 0, .5); animation: st-offer-in .45s .5s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes st-offer-in { from { opacity: 0; transform: translateY(14px); } }
.st-offer-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c-accent-soft); color: var(--c-accent); }
.st-offer-x { flex: 1; min-width: 0; }
.st-offer b { display: block; font: 700 15px var(--font-display); }
.st-offer p { margin: 2px 0 10px; color: var(--c-ink-2); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 720px) {
  .st-offer { right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .st-offer .st-quiet, .st-offer .c-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-spot, .st-card, .st-bar i { transition: none !important; }
  .st.is-new .st-spot, .st-card.is-in .st-in, .st-card.is-nudge, .st-offer { animation: none; }
}
:root[data-motion='reduce'] .st-spot, :root[data-motion='reduce'] .st-card, :root[data-motion='reduce'] .st-bar i { transition: none !important; }
:root[data-motion='reduce'] .st.is-new .st-spot, :root[data-motion='reduce'] .st-card.is-in .st-in, :root[data-motion='reduce'] .st-card.is-nudge, :root[data-motion='reduce'] .st-offer { animation: none; }

/* My Apps — card grid, list, and compact rows. Colors stay on the tokens above. */
.c-apps-toolbar { margin-bottom: 16px; }
.c-apps-find { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.c-apps-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); color: var(--c-ink-3); }
.c-apps-search input { flex: 1; border: 0; background: transparent; color: var(--c-ink); font: inherit; min-width: 0; padding: 8px 0; }
.c-apps-search input:focus { outline: none; }
.c-apps-search:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.c-apps-tool { position: relative; }
.c-apps-tool-btn, .c-apps-view { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); color: var(--c-ink); font: inherit; font-weight: 600; cursor: pointer; }
.c-apps-tool-btn[aria-expanded='true'], .c-apps-tool-btn:hover, .c-apps-view:hover, .c-apps-view[aria-pressed='true'] { border-color: var(--c-accent); color: var(--c-accent); }
.c-apps-tool-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c-accent); color: var(--c-accent-ink); font-size: 11px; line-height: 18px; }
.c-apps-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(320px, 80vw); padding: 12px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); box-shadow: var(--shadow); }
.c-apps-panel fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.c-apps-panel legend, .c-apps-legend { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-apps-choice, .c-apps-view { display: flex; gap: 10px; align-items: flex-start; width: 100%; margin: 0 0 6px; padding: 8px; border-radius: 10px; text-align: left; }
.c-apps-view { border: 0; background: transparent; min-height: 0; color: var(--c-ink); }
.c-apps-choice strong, .c-apps-view strong { display: block; font-size: 14px; }
.c-apps-choice small, .c-apps-view small { display: block; color: var(--c-ink-3); font-size: 12px; }
.c-apps-choice:hover, .c-apps-view:hover { background: var(--c-surface-2); }
.c-apps-code { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 11px; }
.c-apps-fields { display: flex; flex-direction: column; gap: 8px; }
.c-apps-fields label, .c-apps-check { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--c-ink-2); }
.c-apps-check, .c-apps-fields label.c-apps-check { flex-direction: row; align-items: center; }
.c-apps-fields select { font: inherit; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-bg); color: var(--c-ink); }
.c-apps-done { margin-top: 12px; width: 100%; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--c-accent); color: var(--c-accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.c-apps-summary { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.c-apps-tabs { display: flex; gap: 4px; }
.c-apps-tabs a { padding: 6px 12px; border-radius: 999px; color: var(--c-ink-2); font-weight: 600; }
.c-apps-tabs a[aria-current='page'] { background: var(--c-surface-2); color: var(--c-ink); }
.c-apps-clear { border: 0; background: transparent; color: var(--c-ink-3); font: inherit; cursor: pointer; }
.c-apps-clear:not(:disabled):hover { color: var(--c-accent); }
.c-apps-clear:disabled { opacity: .45; cursor: default; }
.c-apps-results { margin-left: auto; color: var(--c-ink-3); font-size: 13px; }
.c-apps-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.c-apps-layout.is-full { grid-template-columns: 1fr; }
.c-apps-side { display: flex; flex-direction: column; gap: 2px; }
.c-apps-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-apps-space-add { border: 1px solid var(--c-line); background: transparent; color: var(--c-ink-2); border-radius: 8px; font: 600 12px/1 var(--font-body); letter-spacing: 0; text-transform: none; cursor: pointer; }
.c-apps-space-add { padding: 5px 8px; }
.c-apps-space-add:hover { border-color: var(--c-accent); color: var(--c-accent); }
.c-apps-space-add:disabled { opacity: .4; cursor: default; }
.c-apps-space-row { display: flex; align-items: center; gap: 4px; }
.c-apps-space-row > a { flex: 1; min-width: 0; }
.c-apps-side-label { margin: 14px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-apps-tree { list-style: none; margin: 0; padding: 0; }
.c-apps-space-link, .c-apps-tree a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--c-ink-2); font-weight: 600; }
.c-apps-space-link[aria-current='page'], .c-apps-tree a[aria-current='page'], .c-apps-space-link:hover, .c-apps-tree a:hover { background: color-mix(in srgb, var(--c-accent) 14%, transparent); color: var(--c-accent); }
.c-apps-count { color: var(--c-ink-3); font-size: 12px; font-weight: 500; }
.c-apps-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--c-ink-3); font-size: 13px; }
.c-apps-crumbs a { color: var(--c-ink-2); }
.c-apps-head { display: none; }
.c-apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.c-apps-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main actions" "access access" "meta meta" "extra extra"; gap: 10px 12px; padding: 18px; border: 1px solid var(--c-line); border-top: 4px solid color-mix(in srgb, var(--c-accent) 75%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--c-ink) 4%, var(--c-surface)); }
.c-apps-card:hover, .c-apps-card:focus-within { border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); border-top-color: var(--c-cov-edge, var(--c-accent)); }
.c-apps-card.is-no-access { border-color: color-mix(in srgb, var(--c-danger) 55%, var(--c-line)); border-top-color: var(--c-danger); }
.c-apps-card:not(:has(.c-apps-access)) { grid-template-areas: "main actions" "meta meta" "extra extra"; }
.c-apps-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.c-apps-titleline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.c-apps-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.c-apps-title a { color: var(--c-ink); }
.c-apps-title a:hover { color: var(--c-accent); }
.c-apps-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.c-apps-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.c-apps-pill.is-live { color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 16%, transparent); }
.c-apps-pill.is-deploying { display: inline-flex !important; align-items: center; gap: 6px; color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 16%, transparent); }
.c-apps-spin { width: 9px; height: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: c-apps-spin .8s linear infinite; }
@keyframes c-apps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .c-apps-spin { animation-duration: 2.4s; } }
.c-apps-pill[hidden] { display: none !important; }
.c-apps-pill.is-draft { color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 16%, transparent); }
.c-apps-pill.is-unpublished { color: var(--c-ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); }
.c-apps-pill.is-retired { color: var(--c-ink-3); background: color-mix(in srgb, var(--c-ink-3) 16%, transparent); }
.c-apps-pill.is-trash { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 16%, transparent); }
.c-apps-customer { padding: 2px 8px; border-radius: 6px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 12px; font-weight: 600; }
.c-apps-desc { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-apps-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.c-apps-tag { height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--c-tag-accent, var(--c-line)); color: var(--c-tag-accent, var(--c-ink-2)); background: color-mix(in srgb, var(--c-tag-accent, var(--c-ink-3)) 16%, transparent); font-size: 12px; line-height: 20px; }
.c-apps-access { grid-area: access; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 10px; background: color-mix(in srgb, var(--c-ink) 3%, transparent); color: var(--c-ink); font: 600 12.5px/1 var(--font-body); text-align: left; cursor: pointer; }
.c-apps-access:hover, .c-apps-access[aria-expanded='true'] { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.c-apps-access.is-open .c-apps-access-label { color: var(--c-accent); }
.c-apps-access-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font-weight: 500; }
.c-apps-access-text::before { content: '·'; margin-right: 6px; color: var(--c-ink-3); }
.c-apps-access-count { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); }
.c-apps-access:not(:has(.c-apps-access-count)) .c-apps-access-chev { margin-left: auto; }
.c-apps-access-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--c-warn); color: var(--c-accent-ink); font-size: 11px; line-height: 20px; font-weight: 800; }
.c-apps-access.is-request { border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 12%, transparent); }
.c-apps-access.is-requested { border-style: dashed; border-color: color-mix(in srgb, var(--c-warn) 50%, var(--c-line)); }
.c-apps-access-chev { opacity: .45; }
.c-apps-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--c-ink-3); font-size: 12px; }
.c-apps-by { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--c-ink-2); }
.c-apps-avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-accent-ink); font-size: 10px; font-weight: 700; }
img.c-apps-avatar { object-fit: cover; flex: none; }
.c-apps-avatar.is-completa { flex: none; background: var(--c-surface-2); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-line); }
.c-apps-avatar-mark { width: 72%; height: 72%; }
.c-apps-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-apps-space a { color: var(--c-ink-2); }
.c-apps-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.c-apps-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--c-ink-2); font: 700 18px/1 var(--font-body); cursor: pointer; position: relative; }
.c-apps-icon:hover, .c-apps-icon[aria-expanded='true'] { border-color: var(--c-line); background: var(--c-surface-2); color: var(--c-ink); }
.c-apps-star.is-on { color: var(--c-warn); }
.c-apps-btn { display: none; align-items: center; height: 34px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); border-radius: 10px; color: var(--c-accent); font-size: 13px; font-weight: 600; }
.c-apps-btn.is-primary { display: inline-flex; background: var(--c-accent); color: var(--c-accent-ink); border-color: var(--c-accent); }
.c-apps-menu-wrap { position: relative; }
.c-apps-menu { position: fixed; z-index: 40; min-width: 200px; padding: 6px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); box-shadow: var(--shadow); }
.c-apps-menu a, .c-apps-menu button { display: flex; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink); font: 500 13px/1.3 var(--font-body); text-align: left; cursor: pointer; }
.c-apps-menu a:hover, .c-apps-menu button:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-apps-menu hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--c-line); }
.c-apps-menu .is-danger { color: var(--c-danger); }
.c-apps-copied { display: none; position: absolute; top: -28px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: var(--c-accent); color: var(--c-accent-ink); font-size: 11px; font-weight: 700; }
.c-apps-copy.is-copied .c-apps-copied { display: inline; }
.c-apps-extra { grid-area: extra; }
.c-apps-extra:not(:has(dl:not([hidden]))) { display: none; }
.c-apps-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.c-apps-details div { min-width: 0; }
.c-apps-details dt { color: var(--c-ink-3); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.c-apps-details dd { margin: 0; }
.c-apps-dialog, .c-apps-back { position: fixed; }
.c-apps-back { inset: 0; background: color-mix(in srgb, var(--c-bg) 40%, transparent); z-index: 40; }
.c-apps-dialog { z-index: 41; top: 12vh; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); padding: 18px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); box-shadow: var(--shadow); }
.c-apps-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.c-apps-dialog h2 { margin: 0; font-size: 22px; }
.c-apps-dialog .c-apps-fields { margin-top: 12px; }
.c-apps-role-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.c-apps-role-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
#c-apps-dialog[hidden] { display: none; }
.c-apps-board.is-view-list .c-apps-head, .c-apps-board.is-view-compact .c-apps-head { display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px 110px 150px; gap: 0 12px; padding: 0 16px 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.c-apps-board.is-view-list .c-apps-grid, .c-apps-board.is-view-compact .c-apps-grid { grid-template-columns: 1fr; gap: 8px; }
.c-apps-board.is-view-list .c-apps-card { grid-template-columns: minmax(0, 1fr) 120px 150px 110px auto; grid-template-areas: "title pill by when actions" "desc desc desc desc actions" "tags tags space . actions" "access access access access access" "extra extra extra extra extra"; align-items: center; }
.c-apps-board.is-view-list .c-apps-main, .c-apps-board.is-view-list .c-apps-titleline, .c-apps-board.is-view-list .c-apps-meta { display: contents; }
.c-apps-board.is-view-list .c-apps-title { grid-area: title; }
.c-apps-board.is-view-list .c-apps-pill { grid-area: pill; }
.c-apps-board.is-view-list .c-apps-by { grid-area: by; }
.c-apps-board.is-view-list .c-apps-when { grid-area: when; }
.c-apps-board.is-view-list .c-apps-desc { grid-area: desc; -webkit-line-clamp: 1; }
.c-apps-board.is-view-list .c-apps-tags { grid-area: tags; }
.c-apps-board.is-view-list .c-apps-space { grid-area: space; }
.c-apps-board.is-view-list .c-apps-extra { grid-column: 1 / -1; }
.c-apps-board.is-view-list .c-apps-release { display: inline-flex; }
.c-apps-board.is-view-compact .c-apps-grid { gap: 0; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; }
.c-apps-board.is-view-compact .c-apps-card { grid-template-columns: minmax(0, 1fr) 120px 150px 110px auto; grid-template-areas: "title pill by when actions"; align-items: center; border: 0; border-top: 1px solid var(--c-line); border-radius: 0; background: transparent; padding: 10px 16px; }
.c-apps-board.is-view-compact .c-apps-card:first-child { border-top: 0; }
.c-apps-board.is-view-compact .c-apps-main, .c-apps-board.is-view-compact .c-apps-titleline, .c-apps-board.is-view-compact .c-apps-meta { display: contents; }
.c-apps-board.is-view-compact .c-apps-title { grid-area: title; }
.c-apps-board.is-view-compact .c-apps-pill { grid-area: pill; }
.c-apps-board.is-view-compact .c-apps-by { grid-area: by; }
.c-apps-board.is-view-compact .c-apps-when { grid-area: when; }
.c-apps-board.is-view-compact .c-apps-desc, .c-apps-board.is-view-compact .c-apps-tags, .c-apps-board.is-view-compact .c-apps-access, .c-apps-board.is-view-compact .c-apps-space, .c-apps-board.is-view-compact .c-apps-extra { display: none; }
.c-apps-board.is-view-compact .c-apps-extra:has(.c-apps-details:not([hidden])) { display: block; grid-column: 1 / -1; }
/* Spaces on My Apps. Space colors are tokens; a custom #rrggbb arrives only as --c-space-accent (validated server-side). */
:root { --c-space-purple: #b48cff; --c-space-teal: #2ec5c5; --c-space-pink: #ff7eb6; }
:root[data-theme='light'], :root[data-theme='solarized-light'], :root[data-theme='catppuccin-latte'], :root[data-theme='github-light'] { --c-space-purple: #7b4fe0; --c-space-teal: #128a8a; --c-space-pink: #d63c86; }
.c-space-c-green { --c-space-accent: var(--c-ok); }
.c-space-c-blue { --c-space-accent: var(--c-accent); }
.c-space-c-amber { --c-space-accent: var(--c-warn); }
.c-space-c-red { --c-space-accent: var(--c-danger); }
.c-space-c-purple { --c-space-accent: var(--c-space-purple); }
.c-space-c-teal { --c-space-accent: var(--c-space-teal); }
.c-space-c-pink { --c-space-accent: var(--c-space-pink); }
.c-space-c-gray { --c-space-accent: var(--c-ink-3); }
.c-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.c-apps-side { position: sticky; top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); max-height: calc(100dvh - 96px); overflow-y: auto; padding-right: 4px; }
.c-apps-tree .c-apps-tree { margin-left: 12px; }
.c-space-section { margin-top: 14px; }
.c-space-section .c-apps-side-head { margin: 0 8px 2px; }
.c-space-folder { display: inline-block; vertical-align: -2px; flex: none; width: 16px; height: 14px; background: var(--c-space-accent, var(--c-ink-3)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 2.5A2.5 2.5 0 0 1 4.5 0h4.6a2 2 0 0 1 1.5.7L12.4 3h7.1A2.5 2.5 0 0 1 22 5.5v12a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 17.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 2.5A2.5 2.5 0 0 1 4.5 0h4.6a2 2 0 0 1 1.5.7L12.4 3h7.1A2.5 2.5 0 0 1 22 5.5v12a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 17.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.c-apps-space-add { border: 0 !important; background: transparent; font-size: 15px; color: var(--c-ink-3); }
.c-space-section .c-apps-side-head { margin-bottom: 0; }
.c-space-hint, .c-space-none { margin: 2px 0 6px; color: var(--c-ink-3); font-size: 12px; }
.c-space-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.c-space-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; color: var(--c-ink-2); font-weight: 600; }
.c-space-link:hover, .c-space-link[aria-current='page'] { background: color-mix(in srgb, var(--c-accent) 14%, transparent); color: var(--c-accent); }
.c-space-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-space-mark { flex: none; min-width: 1.1em; text-align: center; }
.c-space-mark:empty::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-space-accent, var(--c-ink-3)); }
.c-space-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-space-kind { color: var(--c-ink-3); font-size: 11px; font-weight: 500; }
.c-space-more { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink-2); font: 700 14px/1 var(--font-body); cursor: pointer; opacity: .5; }
.c-space-more:hover, .c-space-more[aria-expanded='true'] { background: var(--c-surface-2); color: var(--c-ink); }
.c-space-row:hover .c-space-more, .c-space-row:focus-within .c-space-more, .c-space-more[aria-expanded='true'] { opacity: 1; }
.c-space-row[draggable='true'] { cursor: grab; }
.c-space-row.is-drop-in { outline: 2px dashed var(--c-accent); outline-offset: -2px; }
.c-space-row.is-drop-before { box-shadow: inset 0 2px 0 var(--c-accent); }
.c-space-row.is-drop-after { box-shadow: inset 0 -2px 0 var(--c-accent); }
.c-space-section.is-drop-root { outline: 2px dashed var(--c-accent); outline-offset: 2px; border-radius: 8px; }
.c-space-name-input { width: 100%; font: inherit; font-weight: 600; padding: 2px 6px; border: 1px solid var(--c-accent); border-radius: 6px; background: var(--c-bg); color: var(--c-ink); }
.c-space-archived { margin-top: 14px; font-size: 13px; }
.c-space-archived summary { cursor: pointer; color: var(--c-ink-3); font-weight: 600; margin-bottom: 4px; }
.c-apps-switch { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: var(--c-ink-2); font-size: 13px; }
.c-apps-switch-track { position: relative; flex: none; width: 28px; height: 16px; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.c-apps-switch-track::after { content: ''; position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-ink-3); transition: left .15s; }
.c-apps-switch[aria-checked='true'] .c-apps-switch-track { background: var(--c-accent); border-color: var(--c-accent); }
.c-apps-switch[aria-checked='true'] .c-apps-switch-track::after { left: 13px; background: var(--c-accent-ink); }
.c-space-head { margin-bottom: 16px; }
.c-space-head .c-apps-crumbs { margin: 0 0 8px; }
.c-space-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.c-space-title .c-space-folder { width: 20px; height: 17px; }
.c-space-title h2 { margin: 0; font-size: 22px; }
.c-space-title .c-apps-switch { margin-left: auto; }
.c-space-badge { padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 11px; font-weight: 700; }
.c-space-badge.is-team { color: var(--c-accent); }
.c-space-tiles { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.c-space-tile a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface); }
.c-space-tile a .c-apps-count { grid-column: 2; }
.c-space-tile a:hover { border-color: var(--c-accent); }
.c-space-tile.is-drop-in a { outline: 2px dashed var(--c-accent); }
.c-apps-space-chip { white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 11px; font-weight: 600; }
.c-apps-select { width: 16px; height: 16px; margin: 0; accent-color: var(--c-accent); }
.c-apps-card.is-selected { outline: 2px solid var(--c-accent); outline-offset: -1px; }
.c-apps-card.is-dragging { opacity: .5; }
.c-apps-bulk { position: sticky; top: calc(var(--c-pin, var(--c-top-h, 60px)) + 12px); z-index: 5; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--c-accent); border-radius: 12px; background: var(--c-surface); }
.c-apps-bulk[hidden] { display: none; }
.c-space-picker { list-style: none; margin: 8px 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.c-space-picker button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.c-space-picker button:hover, .c-space-picker button:focus-visible { background: var(--c-surface-2); }
.c-space-picker button:disabled { opacity: .4; cursor: default; }
.c-space-new { margin: 6px 0 4px; }
.c-space-new-open { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px dashed var(--c-line); border-radius: 8px; background: none; color: var(--c-ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.c-space-new-open::before { content: '+'; font-weight: 700; }
.c-space-new-open:hover, .c-space-new-open:focus-visible { border-color: var(--c-accent); color: var(--c-ink); }
.c-space-new-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.c-space-new-form .c-input { flex: 1 1 160px; min-width: 0; }
.c-space-new-open[hidden], .c-space-new-form[hidden] { display: none; }
.c-space-picker-label { margin: 12px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-space-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.c-space-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c-line); background: var(--c-space-accent, transparent); cursor: pointer; }
.c-space-swatch[aria-pressed='true'] { border-color: var(--c-ink); }
/* Compact cards: more per row, details and copy on hover, a round select control on the corner. */
.c-apps-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.c-apps-card { position: relative; gap: 6px 8px; padding: 12px 14px; border-top-width: 3px; border-top-color: var(--c-cov-edge, var(--c-accent)); border-radius: 12px; }
.c-apps-main { gap: 4px; }
.c-apps-titleline { gap: 4px 6px; }
.c-apps-title { font-size: 15px; }
.c-apps-pill { height: 20px; font-size: 10.5px; }
.c-apps-desc { -webkit-line-clamp: 1; font-size: 12.5px; }
.c-apps-tag { height: 20px; line-height: 18px; font-size: 11px; }
.c-apps-meta { font-size: 11.5px; gap: 4px 10px; }
.c-apps-avatar { width: 20px; height: 20px; font-size: 9px; background: var(--c-accent-soft); color: var(--c-accent); }
.c-apps-actions { gap: 0; align-self: start; }
.c-apps-icon { width: 28px; height: 28px; font-size: 15px; border-radius: 7px; }
.c-apps-card .c-apps-detail-btn, .c-apps-card .c-apps-copy { opacity: 0; transition: opacity .12s; }
.c-apps-card:hover .c-apps-detail-btn, .c-apps-card:hover .c-apps-copy, .c-apps-card :focus-visible, .c-apps-detail-btn[aria-expanded='true'] { opacity: 1; }
.c-apps-select { appearance: none; -webkit-appearance: none; position: absolute; z-index: 2; top: -9px; left: -9px; width: 20px; height: 20px; margin: 0; border: 2px solid var(--c-ink-3); border-radius: 50%; background: var(--c-surface); cursor: pointer; opacity: 0; transition: opacity .12s, border-color .12s; }
.c-apps-card:hover .c-apps-select, .c-apps-select:focus-visible, .c-apps-select:checked, .c-apps-board.has-selection .c-apps-select { opacity: 1; }
.c-apps-select:hover { border-color: var(--c-accent); }
.c-apps-select:checked { border-color: var(--c-accent); background: var(--c-accent); box-shadow: inset 0 0 0 3px var(--c-surface); }
.c-apps-select:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-apps-board.is-view-compact .c-apps-select { top: 50%; left: 2px; transform: translateY(-50%); }
@media (hover: none) { .c-apps-select, .c-apps-card .c-apps-detail-btn, .c-apps-card .c-apps-copy { opacity: 1; } }
/* Drafts: a live app with draft copies is a pile (two cards peeking out underneath); its toggle opens the drafts
   tray (.c-dtray, below) under the card's row. */
.c-apps-drafts-toggle { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 28px; padding: 2px 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--c-accent); cursor: pointer; }
.c-apps-drafts-toggle:hover, .c-apps-drafts-toggle:focus-visible { text-decoration: underline; }
.c-apps-drafts-arrow { display: inline-block; font-size: 9px; transition: transform .15s ease; }
.c-apps-drafts-toggle[aria-expanded='true'] .c-apps-drafts-arrow { transform: rotate(90deg); }
.c-apps-card[hidden] { display: none !important; }

/* Drafts tray (src/domains/apps/app-panel-view.tsx). A compact strip that spans the grid's full width; the grid
   packs densely so the rest of the card's row stays above it. Shape follows the count: a family tree (1–5),
   columns (6–15) or lanes by person (16+). The selected draft is one slim bar along the bottom.
   Amber = draft, green = live, dashed accent = a draft built on another draft. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { grid-auto-flow: row dense; }
.c-dtray { --c-dtray-notch: 48px; --c-dline: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); grid-column: 1 / -1; position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--c-accent) 35%, var(--c-line)); border-radius: 14px; background: color-mix(in srgb, var(--c-accent) 5%, var(--c-surface)); }
.c-dtray[hidden] { display: none; }
.c-dtray::before { content: ''; position: absolute; top: -7px; left: calc(var(--c-dtray-notch) - 6px); width: 12px; height: 12px; background: inherit; border-left: inherit; border-top: inherit; transform: rotate(45deg); }
.c-apps-board.is-view-list .c-dtray::before, .c-apps-board.is-view-compact .c-dtray::before { display: none; }
.c-apps-board.is-view-compact .c-dtray { border-radius: 0; border-width: 1px 0; }
.c-apps-card.is-pile-open { border-color: var(--c-accent) !important; }
.c-dtray.is-tree .c-dtray-head { position: absolute; top: 8px; right: 10px; z-index: 1; }
.c-dtray-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.c-dtray-title { margin: 0; font-size: 13px; font-weight: 700; }
.c-dtray-note { margin: 0; font-size: 12px; color: var(--c-ink-3); }
.c-dtray-gap { flex: 1; }
.c-dtray-search { width: 200px; max-width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: 12.5px; }
.c-dtray-search:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-dtray-close { width: 30px; height: 30px; margin: -4px -6px -4px 0; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink-3); font-size: 18px; line-height: 1; cursor: pointer; }
.c-dtray-close:hover, .c-dtray-close:focus-visible { background: var(--c-surface-2); color: var(--c-ink); }
.c-dtray-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.c-dchip { height: 28px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); color: var(--c-ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.c-dchip[aria-pressed='true'] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-surface); }
.c-dchip.is-stale:not([aria-pressed='true']) { color: var(--c-warn); }
.c-dtray-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c-dtray-map { min-width: 0; }
.c-dlabel { margin: 0 0 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-dpill { display: inline-flex; align-items: center; width: fit-content; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.c-dpill.is-live { color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 16%, transparent); }
.c-dpill.is-draft { color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 16%, transparent); }
.c-dpill.is-nested { color: var(--c-accent); background: var(--c-accent-soft); }

/* A draft (or the live app) as a node. Every draft is a button; the selected one is outlined. */
.c-dnode { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 200px; flex: none; box-sizing: border-box; padding: 7px 10px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
.c-dnode[hidden] { display: none; }
button.c-dnode:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
button.c-dnode:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-dnode[aria-pressed='true'] { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.c-dnode.is-live { cursor: default; justify-content: center; border-color: color-mix(in srgb, var(--c-ok) 40%, var(--c-line)); }
.c-dtree .c-dnode.is-live { min-height: 52px; }
.c-dnode.is-nested { border-style: dashed; }
.c-dnode.is-nested[aria-pressed='true'] { border-style: solid; }
.c-dnode.is-stale { opacity: .65; }
.c-dnode.is-stale[aria-pressed='true'] { opacity: 1; }
.c-dnode-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.c-dnode-meta { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; font-size: 11.5px; color: var(--c-ink-3); }
.c-dnode-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-dnode-av { width: 18px; height: 18px; font-size: 8px; }
.c-dnode-kids { margin-left: auto; }
.c-dnode.is-compact { width: 100%; gap: 2px; }
.c-dnode.is-compact .c-dnode-meta { width: 100%; }

/* Tree (1–5 drafts): nested lists drawn as a family tree, left to right, with elbow connectors. */
.c-dtree { overflow-x: auto; padding: 2px; }
.c-dtree-branch { display: flex; align-items: center; }
.c-dtree-kids { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0 0 0 24px; list-style: none; }
.c-dtree-kids::before { content: ''; position: absolute; left: 0; top: 50%; width: 12px; border-top: 2px solid var(--c-dline); }
.c-dtree-kids > li { position: relative; }
.c-dtree-kids > li::before { content: ''; position: absolute; left: -12px; top: -4px; bottom: -4px; border-left: 2px solid var(--c-dline); }
.c-dtree-kids > li:first-child::before { top: 50%; }
.c-dtree-kids > li:last-child::before { bottom: 50%; }
.c-dtree-kids > li:only-child::before { display: none; }
.c-dtree-kids > li::after { content: ''; position: absolute; left: -12px; top: 50%; width: 12px; border-top: 2px solid var(--c-dline); }

/* Columns (6–15): live → drafts from live → drafts built on the selected one. */
.c-dcols { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.c-dcol.is-live .c-dnode { width: 100%; }
.c-dlist { display: flex; flex-direction: column; gap: 5px; max-height: 300px; overflow-y: auto; padding: 2px; }
.c-dkids[hidden], .c-dkids-row[hidden] { display: none; }
.c-dkids-row { padding-left: calc(var(--depth, 0) * 14px); }

/* Lanes (16+): one row per person, newest first; stale drafts folded away underneath. */
.c-dlanes { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.c-dlane { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface); }
.c-dlane[hidden], .c-dstale[hidden] { display: none; }
.c-dlane-who { display: flex; align-items: center; gap: 8px; width: 130px; flex: none; min-width: 0; font-size: 12.5px; }
.c-dlane-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.c-dlane-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-dlane-row { display: flex; gap: 6px; min-width: 0; flex: 1; overflow-x: auto; padding: 2px; scroll-snap-type: x proximity; }
.c-dlane-row .c-dnode.is-compact { width: 170px; flex: none; scroll-snap-align: start; }
.c-dlane-row.is-wrap { flex-wrap: wrap; overflow: visible; padding: 8px 0 2px; }
.c-dstale { padding: 6px 10px; border: 1px dashed color-mix(in srgb, var(--c-warn) 55%, var(--c-line)); border-radius: 10px; background: color-mix(in srgb, var(--c-warn) 5%, var(--c-surface)); }
.c-dstale summary { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 12.5px; color: var(--c-ink-2); cursor: pointer; }

/* The selected draft: one slim bar, details on the left and actions on the right. */
.c-dtray-detail { padding-top: 10px; border-top: 1px solid var(--c-line); }
.c-ddetail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.c-ddetail[hidden] { display: none; }
.c-ddetail-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 1 1 280px; min-width: 0; }
.c-ddetail-name { font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.c-ddetail-facts { font-size: 12px; color: var(--c-ink-3); }
.c-ddetail-desc { flex-basis: 100%; font-size: 12px; color: var(--c-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-ddetail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.c-ddetail-actions .c-btn { padding: 4px 10px; font-size: 12.5px; }
.c-ddetail-promote { color: var(--c-ok); border-color: color-mix(in srgb, var(--c-ok) 45%, var(--c-line)); }

@media (max-width: 980px) {
  .c-dcols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-dcol.is-live { display: none; }
}
@media (max-width: 720px) {
  .c-dtray { padding: 10px; }
  .c-dtray-search { width: 100%; height: 40px; font-size: 16px; order: 5; }
  .c-dcols { grid-template-columns: 1fr; }
  .c-dlist, .c-dlanes { max-height: none; }
  .c-dlane { flex-direction: column; align-items: stretch; }
  .c-dlane-who { width: auto; }
  .c-ddetail-actions .c-btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
  /* The tree reads top to bottom on a phone: each level indented under its parent. */
  .c-dtree { overflow: visible; }
  .c-dtree-branch { flex-direction: column; align-items: stretch; }
  .c-dtree .c-dnode { width: 100%; }
  .c-dtree-kids { padding: 8px 0 0 22px; }
  .c-dtree-kids::before { display: none; }
  .c-dtree-kids > li::before, .c-dtree-kids > li:first-child::before, .c-dtree-kids > li:only-child::before { display: block; left: -12px; top: -8px; bottom: -8px; height: auto; }
  .c-dtree-kids > li:last-child::before { bottom: auto; height: 32px; }
  .c-dtree-kids > li::after { left: -12px; top: 24px; width: 12px; }
}
.c-apps-board:not(.is-view-compact) .c-apps-grid { isolation: isolate; }
/* The pile: one or two real card edges peek out under a live app with drafts. They sit behind the card (the grid
   is its own stacking context) and slide down out of sight while the drafts tray is open. */
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts { margin-bottom: 14px; }
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts::before,
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts:not([data-drafts='1'])::after { content: ''; position: absolute; z-index: -1; left: 11px; right: 11px; top: 10px; bottom: -7px; border: 1px solid color-mix(in srgb, var(--c-warn) 60%, var(--c-line)); border-radius: 12px; background: color-mix(in srgb, var(--c-warn) 7%, var(--c-surface)); box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .35); pointer-events: none; transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts:not([data-drafts='1'])::after { left: 22px; right: 22px; top: 20px; bottom: -13px; border-color: color-mix(in srgb, var(--c-warn) 30%, var(--c-line)); background: color-mix(in srgb, var(--c-warn) 4%, var(--c-surface)); }
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts:hover::before { transform: translateY(2px); }
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts:not([data-drafts='1']):hover::after { transform: translateY(4px); }
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts.is-pile-open::before,
.c-apps-board:not(.is-view-compact) .c-apps-card.has-drafts.is-pile-open:not([data-drafts='1'])::after { transform: translateY(14px); opacity: 0; }
/* A transform would make the card its own stacking context and paint the pile over it, so piles lift by shadow. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card.has-drafts:hover { transform: none; }
.c-apps-board.is-view-list .c-apps-card.has-drafts::before, .c-apps-board.is-view-list .c-apps-card.has-drafts::after { left: 14px; right: 14px; }
@media (prefers-reduced-motion: reduce) { .c-apps-card.has-drafts::before, .c-apps-card.has-drafts::after { transition: none; } }
@media (min-width: 769px) {
  .c-apps-board.is-view-list .c-apps-drafts-toggle, .c-apps-board.is-view-compact .c-apps-drafts-toggle { grid-column: 1 / 2; }
}
.c-space-sep { border: 0; border-top: 1px solid var(--c-line); margin: 12px 8px 4px; }
@media (max-width: 980px) {
  .c-apps-layout { grid-template-columns: 1fr; }
  .c-apps-side { position: static; max-height: none; }
  .c-apps-board.is-view-list .c-apps-head, .c-apps-board.is-view-compact .c-apps-head { display: none; }
  .c-apps-board.is-view-list .c-apps-card, .c-apps-board.is-view-compact .c-apps-card { display: flex; flex-direction: column; align-items: stretch; }
  .c-apps-board.is-view-list .c-apps-main, .c-apps-board.is-view-list .c-apps-titleline, .c-apps-board.is-view-list .c-apps-meta, .c-apps-board.is-view-compact .c-apps-main, .c-apps-board.is-view-compact .c-apps-titleline, .c-apps-board.is-view-compact .c-apps-meta { display: flex; }
  .c-apps-board.is-view-compact .c-apps-desc, .c-apps-board.is-view-compact .c-apps-access { display: block; }
}

/* Narrow screens: the rail becomes a scrolling strip under the header so every page stays reachable. */
@media (max-width: 720px) {
  .c-top-in { height: auto; min-height: 60px; flex-wrap: wrap; padding: 12px 16px; }
  .c-brand { width: auto; }
  .c-team-k { display: none; }
  .c-team-btn { max-width: 170px; }
  .is-language .c-goo-label { display: none; }
  .c-account-me { padding-right: 3px; }
  /* Its parts (you, the View switch, sign out) are 40px tap targets on a phone; the header buttons match. */
  .c-account { height: 44px; padding: 1px; }
  .c-top-prefs .c-goo-btn { height: 44px; }
  .c-body { flex-direction: column; gap: 0; padding: 0; }
  .c-main { padding-left: 16px; padding-right: 16px; }
  .c-sidebar, .c-side-closed .c-sidebar, .c-side-closed.c-side-peek .c-sidebar { position: static; width: auto; height: auto; align-self: stretch; margin: 0; padding: 8px 12px; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden; border-radius: 0; box-shadow: none; border-right: 0; border-bottom: 1px solid var(--c-line); }
  .c-side-nav { flex-direction: row; gap: 4px; flex: none; }
  .c-side-closed:not(.c-side-peek) .c-side-link { justify-content: flex-start; padding: 6px 12px; }
  .c-side-closed:not(.c-side-peek) .c-side-txt { display: inline; }
  .c-side-label, .c-side-foot { display: none; }
  .c-side-rule { align-self: center; width: 0; height: 20px; margin: 0 4px; border-top: 0; border-left: 1px solid var(--c-line); }
  /* In the phone's row of links a group label is a short upright hairline, like the rule. */
  .c-side-grp { align-self: center; width: 0; height: 20px; margin: 0 4px; padding: 0; border-left: 1px solid var(--c-line); }
  .c-side-grp::before, .c-side-closed:not(.c-side-peek) .c-side-grp::before { content: none; }
  .c-sidebar .c-side-grp .c-side-txt { display: none; }
}

/* App Store: fixed-column card grid and the preview popup (public/appstore.js). */
.c-store-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .c-store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .c-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .c-store-grid { grid-template-columns: 1fr; } }
.c-store-card { display: flex; flex-direction: column; min-width: 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; transition: border-color .12s ease; }
.c-store-card:hover { border-color: var(--c-accent); }
.c-store-card > * { padding-inline: 12px; }
.c-store-head { display: flex; align-items: flex-start; gap: 6px; padding-block: 10px 8px; background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); border-radius: 12px 12px 0 0; }
.c-store-name { flex: 1; min-width: 0; margin: 0; padding-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.c-store-acts { display: flex; margin-right: -4px; }
.c-icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink-3); font-size: 16px; line-height: 1; cursor: pointer; list-style: none; }
.c-icon-btn::-webkit-details-marker { display: none; }
.c-icon-btn:hover { background: var(--c-surface); color: var(--c-ink); }
.c-icon-btn.on { color: var(--c-warn); }
.c-store-menu { position: relative; }
.c-store-pop { position: absolute; right: 0; top: 34px; z-index: 5; min-width: 160px; display: flex; flex-direction: column; padding: 4px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.c-store-pop a, .c-store-pop button { padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.c-store-pop a:hover, .c-store-pop button:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-store-meta { display: flex; flex-direction: column; gap: 6px; padding-block: 10px; }
.c-store-kv { display: grid; grid-template-columns: 46px 1fr; gap: 8px; align-items: center; min-width: 0; font-size: 12.5px; }
.c-store-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--c-ink-3); }
.c-store-space { color: var(--c-accent); font-weight: 500; }
.c-store-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.c-store-tags .c-tag { font-size: 11px; padding: 1px 7px; }
.c-store-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-block: 8px; border-top: 1px solid var(--c-line); }
.c-store-by { flex: 1; min-width: 0; font-size: 12px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.c-preview { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--c-bg) 70%, transparent); backdrop-filter: blur(3px); }
.c-preview-box { width: min(1180px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.c-preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.c-preview-head h2 { margin: 0; font-size: 22px; }
.c-preview-crumb { font-size: 12px; color: var(--c-ink-3); }
.c-preview-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.c-preview-main { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.c-preview-shot { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; color-scheme: light; }
.c-preview-shot iframe { position: absolute; top: 0; left: 0; width: 1600px; height: 900px; border: 0; transform-origin: 0 0; background: #fff; color-scheme: light; }
.c-preview-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: 13px; }
.c-preview-facts dt { color: var(--c-ink-3); }
.c-preview-facts dd { margin: 0; color: var(--c-ink-2); }
.c-preview-desc { margin: 4px 0 0; color: var(--c-ink-2); line-height: 1.6; max-width: 70ch; white-space: pre-line; }
.c-preview-side { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-left: 1px solid var(--c-line); background: var(--c-bg); }
.c-preview-side h3 { margin: 0; font-size: 15px; }
.c-preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-preview-stats div { padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface); }
.c-preview-stats b { display: block; font: 800 18px var(--font-display); font-variant-numeric: tabular-nums; }
.c-preview-stats span { font-size: 11.5px; color: var(--c-ink-3); }
.c-preview-spark { display: block; width: 100%; height: 50px; }
.c-preview-li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--c-line); font-size: 12.5px; }
.c-preview-li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-preview-li small { color: var(--c-ink-3); }
.c-preview-live { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c-ok); }
@media (max-width: 820px) { .c-preview-body { grid-template-columns: 1fr; } .c-preview-side { border-left: 0; border-top: 1px solid var(--c-line); } }

/* My Apps grid view: the same structure as App Store cards. A header band (name, status, actions), Space and Tags
   rows, then the creator and Preview. List and compact views keep their own layout and hide the grid-only parts. */
.c-apps-facts, .c-apps-preview { display: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1500px) { .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { grid-template-columns: minmax(0, 1fr); } }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card { display: flex; flex-direction: column; padding: 0; gap: 0; border-top-width: 1px; border-top-color: var(--c-line); background: var(--c-surface); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:hover { border-color: var(--c-accent); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card > * { padding-inline: 12px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-actions { order: -1; position: absolute; top: 8px; right: 8px; padding: 0; background: transparent; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-main { display: contents; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-titleline { order: -2; display: flex; flex-wrap: wrap; align-items: center; min-height: 46px; padding-block: 10px 8px; padding-right: 120px; background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); border-radius: 11px 11px 0 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-title { overflow-wrap: anywhere; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-desc,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-tags,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-space-chip,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-detail-btn { display: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-facts { display: flex; flex-direction: column; gap: 6px; padding-block: 10px; }
.c-apps-facts > div { display: grid; grid-template-columns: 46px 1fr; gap: 8px; align-items: center; min-width: 0; font-size: 12.5px; }
.c-apps-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--c-ink-3); }
.c-apps-fact-space { color: var(--c-accent); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-apps-fact-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.c-apps-none { color: var(--c-ink-3); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-drafts-toggle { margin: 0 12px 8px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-access { margin: 0 12px 10px; width: auto; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-meta { margin-top: auto; padding-block: 8px; border-top: 1px solid var(--c-line); flex-wrap: nowrap; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-by { min-width: 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview { display: inline-flex; margin-left: auto; flex: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-extra { padding-bottom: 8px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-extra:not(:has(dl:not([hidden]))) { display: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-titleline,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-facts { padding-left: 12px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-facts { padding-right: 12px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.c-apps-fact-space.is-empty { color: var(--c-ink-3); font-weight: 400; }

/* Header menus (language, organization, theme). public/app.js builds them from select[data-goo]: a pill button and a plain
   panel that fades in under it. The theme menu lists Light, Dark and CommWise, with More themes for the rest. */
.c-goo { position: relative; display: inline-flex; }
.c-goo-native { position: absolute !important; width: 1px !important; min-width: 0 !important; max-width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.c-select.c-goo-native { position: absolute; width: 1px; max-width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.c-goo-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 220px; padding: 0 12px 0 10px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); color: var(--c-ink); font: 500 13px var(--font-body); cursor: pointer; }
.c-goo-btn:hover, .c-goo.is-open .c-goo-btn { border-color: var(--c-accent); }
.c-goo-btn:focus-visible, .c-goo-item:focus-visible, .c-goo-more:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-goo-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-goo-chev { font-size: 10px; color: var(--c-ink-3); transition: transform .15s; }
.c-goo.is-open .c-goo-chev { transform: rotate(180deg); }
.c-goo-swatch { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 25%, transparent); }
/* overscroll-behavior: scrolling past the end of a long list (the team switcher) no longer scrolls the page, which
   also slid the header away under the open menu. */
.c-goo-menu { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: 210px; max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: flex; flex-direction: column; gap: 1px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--shadow); animation: c-goo-in .14s ease-out; }
.c-goo-menu[hidden] { display: none; }
@keyframes c-goo-in { from { opacity: 0; transform: translateY(-4px); } }
.c-goo-group { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--c-line); }
.c-goo-head { padding: 6px 10px 4px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); }
.c-goo-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink); font: 500 13px var(--font-body); text-align: left; white-space: nowrap; cursor: pointer; }
.c-goo-item:hover, .c-goo-item:focus { background: var(--c-surface-2); }
.c-goo-item[aria-selected='true'] { color: var(--c-accent); font-weight: 600; }
.c-goo-item[aria-selected='true']::after { content: '✓'; margin-left: auto; }
.c-goo-more { margin-top: 4px; padding: 7px 10px; border: 0; border-top: 1px solid var(--c-line); border-radius: 0; background: none; color: var(--c-ink-3); font: 500 12.5px var(--font-body); text-align: left; cursor: pointer; }
.c-goo-more:hover { color: var(--c-accent); }
.c-goo-extra[hidden] { display: none; }
/* Language names stay in their native language; flags are decorative local images. */
.c-language-flag { display: block; flex: none; width: 30px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--c-line); }
.c-goo.is-language { flex-shrink: 0; }
.is-language .c-goo-btn { height: 40px; gap: 10px; padding: 0 14px; border-color: var(--c-line); font-size: 14px; font-weight: 600; }
.is-language .c-goo-menu { min-width: 232px; padding: 8px; gap: 4px; border-radius: 16px; }
.is-language .c-goo-item { min-height: 48px; padding: 10px 12px; gap: 12px; border-radius: 10px; font-size: 14px; }
.is-language .c-goo-item[aria-selected='true'] { background: var(--c-surface-2); color: var(--c-ink); }
.is-language .c-goo-item[aria-selected='true']::after { color: var(--c-accent); }
.is-language .c-goo-item:hover, .is-language .c-goo-item:focus-visible { background: var(--c-surface-2); }
@media (max-width: 720px) { .is-language .c-goo-menu { min-width: 216px; max-width: calc(100vw - 32px); } }
@media (prefers-reduced-motion: reduce) { .c-goo-menu { animation: none; } .c-goo-chev { transition: none; } }

/* My Apps spaces panel: a tinted side panel with a search box, so it reads as its own area beside the apps. */
.c-apps-side { --sw-bg: color-mix(in srgb, var(--c-accent) 9%, var(--c-surface)); --sw-line: color-mix(in srgb, var(--c-accent) 28%, var(--c-line)); padding: 10px 8px; border: 1px solid var(--sw-line); border-radius: 14px; background: var(--sw-bg); }
.c-space-find { width: 100%; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--sw-line); border-radius: 10px; background: var(--c-bg); color: var(--c-ink); font: inherit; }
.c-space-find:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-apps-side .c-space-section { margin-top: 8px; }
.c-apps-side .c-space-row:hover, .c-apps-side .c-apps-space-link:hover { background: color-mix(in srgb, var(--c-accent) 12%, transparent); }
@media (min-width: 981px) { .c-apps-layout:not(.is-full) { grid-template-columns: 250px minmax(0, 1fr); } }
/* Spaces sidebar handle: a round arrow on the sidebar's right edge, always visible. Click it and the sidebar slides
   away, leaving a slim "Spaces" tab (with the space you are in) that brings it back. Remembered per device. */
.c-apps-layout { position: relative; }
.c-apps-side-handle { position: absolute; z-index: 3; top: 160px; left: calc(250px - 14px); display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 28px; height: 28px; padding: 0; border: 1px solid color-mix(in srgb, var(--c-accent) 40%, var(--c-line)); border-radius: 999px; background: var(--c-surface); color: var(--c-accent); font: inherit; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35); transition: left .3s cubic-bezier(.2, .8, .2, 1), background .15s ease, transform .15s ease; }
@media (hover: hover) { .c-apps-side-handle:hover { background: var(--c-accent); color: var(--c-accent-ink); transform: scale(1.08); } }
.c-apps-side-handle:focus-visible { background: var(--c-accent); color: var(--c-accent-ink); }
.c-apps-side-handle:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-apps-side-chev { flex: none; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.c-apps-side-handle-label { display: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.c-apps-side-handle-current { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--c-ink-2); }
.c-apps-layout:not(.is-full) .c-apps-side { transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.c-apps-layout.is-side-closed .c-apps-side { opacity: 0; transform: translateX(-24px); visibility: hidden; pointer-events: none; transition: opacity .15s ease, transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s .3s; }
.c-apps-trash-link { margin-top: auto; border-top: 1px solid var(--sw-line, var(--c-line)); border-radius: 0 0 8px 8px; padding-top: 10px; }
.c-apps-trash-name { display: inline-flex; align-items: center; gap: 8px; }
@media (min-width: 981px) {
  .c-apps-layout:not(.is-full) { transition: grid-template-columns .3s cubic-bezier(.2, .8, .2, 1); }
  .c-apps-layout:not(.is-full).is-side-closed { grid-template-columns: 40px minmax(0, 1fr); }
  .c-apps-layout.is-side-closed .c-apps-side { overflow: hidden; min-width: 0; }
  /* Closed: the handle becomes a tall tab filling the rail, label written top to bottom. */
  .c-apps-layout.is-side-closed .c-apps-side-handle { top: 0; left: 0; flex-direction: column; justify-content: flex-start; gap: 10px; width: 40px; height: auto; min-height: 220px; padding: 12px 0; border-radius: 14px; background: color-mix(in srgb, var(--c-accent) 9%, var(--c-surface)); color: var(--c-accent); box-shadow: none; }
  .c-apps-layout.is-side-closed .c-apps-side-handle:hover, .c-apps-layout.is-side-closed .c-apps-side-handle:focus-visible { background: color-mix(in srgb, var(--c-accent) 18%, var(--c-surface)); color: var(--c-accent); transform: none; }
  .c-apps-layout.is-side-closed .c-apps-side-chev { transform: rotate(180deg); }
  .c-apps-layout.is-side-closed .c-apps-side-handle-label { display: block; writing-mode: vertical-rl; max-height: 320px; overflow: hidden; text-overflow: ellipsis; }
}
/* Narrow screens: the sidebar stacks above the apps, so the handle is a plain full-width row. */
@media (max-width: 980px) {
  .c-apps-side-handle { position: static; width: 100%; height: 40px; justify-content: flex-start; padding: 0 14px; border-radius: 12px; box-shadow: none; color: var(--c-ink-2); }
  .c-apps-side-handle:hover, .c-apps-side-handle:focus-visible { transform: none; }
  .c-apps-side-chev { transform: rotate(90deg); }
  .c-apps-layout.is-side-closed .c-apps-side-chev { transform: rotate(-90deg); }
  .c-apps-side-handle-label { display: inline; }
  .c-apps-layout.is-side-closed .c-apps-side { display: none; }
}
@media (prefers-reduced-motion: reduce) { .c-apps-layout:not(.is-full), .c-apps-layout .c-apps-side, .c-apps-side-handle, .c-apps-side-chev { transition: none; } }

/* Spaces panel runs the full height of the window beside the apps and scrolls on its own. */
@media (min-width: 981px) {
  .c-apps-layout:not(.is-full) { align-items: stretch; }
  .c-apps-layout:not(.is-full) .c-apps-side { position: sticky; top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); align-self: start; height: calc(100dvh - 92px); max-height: none; }
}
/* Selection lives in the card's ⋯ menu now; the checkbox stays in the page for the bulk bar but is not shown. */
.c-apps-select { display: none !important; }
.c-apps-card.is-selected { outline: 2px solid var(--c-accent); outline-offset: -1px; }

/* Calmer grid cards: no header band, lighter labels, Live implied, quiet Preview. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card { background: var(--c-surface); border-color: var(--c-line); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); transform: translateY(-2px); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--c-accent) 60%, transparent); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-titleline { background: transparent; border-bottom: 0; padding-block: 14px 2px; min-height: 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-actions { top: 9px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-pill.is-live { display: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-facts { padding-block: 8px 12px; gap: 7px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-k { font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--c-ink-3); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-fact-space { font-weight: 500; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-tag { background: transparent; border: 1px solid color-mix(in srgb, var(--c-tag-accent, var(--c-ink-3)) 45%, transparent); color: var(--c-ink-2); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-meta { border-top-color: color-mix(in srgb, var(--c-line) 70%, transparent); padding-block: 10px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview { border: 0; background: transparent; color: var(--c-ink-2); padding: 0 6px; height: 26px; font-weight: 500; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview::after { content: ' →'; transition: margin .15s; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview:hover { color: var(--c-accent); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview:hover::after { margin-left: 3px; }
@media (prefers-reduced-motion: reduce) { .c-apps-board .c-apps-card { transition: none; } .c-apps-board .c-apps-card:hover { transform: none; } }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-titleline { padding-right: 96px; }
/* A Go live or Restore button widens the corner actions; keep the title and its pill clear of them. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:has(.c-apps-actions .c-apps-btn) .c-apps-titleline { padding-right: 176px; }

/* Grid card hover: the frame takes the accent; the status edge on top stays (status covers, below). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card { background: var(--c-surface); transition: border-color .2s ease; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:hover,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:focus-within { transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); }
@media (prefers-reduced-motion: reduce) { .c-apps-board .c-apps-card { transition: none; } }

/* Home: "Your workspace" widget (Apps, Usage, Connections in one card). Single-series charts in the accent;
   status colors only on connection ticks, always with a symbol and a word. */
.c-ws { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
/* No Connectors card until there is an app (home/onboarding.ts connectorsDue): Apps takes the whole row. */
.c-ws.is-solo { grid-template-columns: minmax(0, 1fr); }
.c-ws-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.c-ws-title h2 { margin: 0; font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.c-ws-title span { font-size: 12px; color: var(--c-ink-3); }
.c-ws-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; }
.c-ws-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 20px; transition: background .15s; }
.c-ws-sec + .c-ws-sec { border-left: 1px solid var(--c-line); }
.c-ws-sec:hover { background: color-mix(in srgb, var(--c-accent) 4%, transparent); }
.c-ws-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.c-ws-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--c-ink-3); cursor: pointer; }
.c-ws-link:hover { color: var(--c-accent); }
.c-ws-pair { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.c-ws-big { display: flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; }
.c-ws-big b { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.02em; }
.c-ws-big span { font-size: 12.5px; color: var(--c-ink-2); }
.c-ws-big.is-live b { color: var(--c-accent); }
.c-ws-big.is-muted b { color: var(--c-ink-3); }
.c-ws-delta { font-size: 12px; font-weight: 600; color: var(--c-ok); }
.c-ws-delta.is-down, .c-ws-delta.is-flat { color: var(--c-ink-3); }
.c-ws-split { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.c-ws-live-bg { background: var(--c-accent); }
.c-ws-draft-bg { background: color-mix(in srgb, var(--c-accent) 30%, var(--c-surface-2)); }
.c-ws-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--c-ink-3); }
.c-ws-chart { display: block; width: 100%; height: auto; overflow: visible; }
.c-ws-grid { stroke: color-mix(in srgb, var(--c-line) 70%, transparent); stroke-width: 1; }
.c-ws-live { fill: var(--c-accent); }
.c-ws-draft { fill: color-mix(in srgb, var(--c-accent) 30%, var(--c-surface-2)); }
.c-ws-empty { fill: var(--c-surface-2); }
.c-ws-axis { fill: var(--c-ink-3); font: 500 10px var(--font-body); }
.c-ws-area { fill: color-mix(in srgb, var(--c-accent) 16%, transparent); }
.c-ws-line { fill: none; stroke: var(--c-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-ws-dot { fill: var(--c-accent); stroke: var(--c-surface); stroke-width: 2; }
.c-ws-peak { fill: var(--c-ink-2); font: 600 10px var(--font-body); }
.c-ws-hit:hover { fill: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.c-ws-legend { display: flex; gap: 14px; font-size: 12px; color: var(--c-ink-2); }
.c-ws-legend span { display: inline-flex; align-items: center; gap: 6px; }
.c-ws-legend i { width: 8px; height: 8px; border-radius: 2px; }
.c-ws-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--c-surface-2); }
.c-ws-seg button { border: 0; background: none; padding: 3px 9px; border-radius: 6px; font: 500 11.5px var(--font-body); color: var(--c-ink-3); cursor: pointer; }
.c-ws-seg button[aria-pressed='true'] { background: var(--c-surface); color: var(--c-ink); }
.c-ws-seg button:focus-visible, .c-ws-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-ws-pane { display: flex; flex-direction: column; gap: 10px; }
.c-ws-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.c-ws-top li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 12.5px; }
.c-ws-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); }
.c-ws-tb { height: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
.c-ws-tb i { display: block; height: 100%; border-radius: 3px; background: var(--c-accent); }
.c-ws-top b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-ws-conns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.c-ws-conns li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c-ink-2); min-width: 0; }
.c-ws-cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-ws-conns em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--c-ink-3); white-space: nowrap; }
.c-ws-st { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.c-ws-st.is-ok { color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 18%, transparent); }
.c-ws-st.is-warn { color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 18%, transparent); }
.c-ws-st.is-bad { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 18%, transparent); }
.c-ws-empty-note { margin: 0; font-size: 12.5px; }
.c-conn-legend { margin: 0 0 12px; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.c-conn-msg { font-size: 12px; max-width: 42ch; }
@media (max-width: 900px) {
  .c-ws, .c-ws-card { grid-template-columns: 1fr; }
  .c-ws-sec + .c-ws-sec { border-left: 0; border-top: 1px solid var(--c-line); }
}
.c-ws-pane[hidden] { display: none; }
.c-ws-card.is-conns { grid-template-columns: minmax(0, 1fr); }
.c-ws-hd .c-ws-seg { margin-left: auto; }

/* Home fits one screen: tighter hero, gaps and cards; the workspace widget is compact. */
.c-home { gap: 16px; }
.c-home-hello { padding-top: 0; gap: 2px; }
.c-home-hello h1 { font-size: 30px; }
.c-home-hello > p { margin: 0 0 8px; }
.c-home-search-in { padding: 10px 14px; }
.c-home-board, .c-home-side { gap: 16px; }
.c-home-card { padding: 14px 16px; gap: 10px; }
.c-ws-sec { padding: 12px 16px; gap: 7px; }
.c-ws-hd { min-height: 20px; }
.c-ws-big b { font-size: 22px; }
.c-ws-pair { gap: 4px 18px; }
.c-ws-split { height: 6px; }
.c-ws-pane { gap: 7px; }
.c-ws-top { gap: 3px; }
.c-ws-conns { gap: 5px; }
.c-ws-legend { gap: 10px; font-size: 11.5px; }
.c-main:has(.c-home) { --c-main-pt: 18px; padding-bottom: 24px; }
.c-home-recent a { padding: 4px 6px; }
.c-home-tile { padding-block: 8px; }
.c-ws-usage { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.c-ws-usage-chart, .c-ws-usage-top { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c-ws-top li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "b b"; gap: 2px 8px; }
.c-ws-top .c-ws-tn { grid-area: n; } .c-ws-top b { grid-area: v; } .c-ws-top .c-ws-tb { grid-area: b; height: 4px; }
@media (max-width: 560px) { .c-ws-usage { grid-template-columns: 1fr; } }

/* Profile: two columns of cards (details and chat settings; organizations and logins), one column on narrow screens. */
.c-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.c-profile .c-card { min-width: 0; padding: 22px 24px; }
.c-profile .c-card h2 { font-size: 18px; margin: 0 0 14px; }
.c-profile-wide, .c-profile-hero { grid-column: 1 / -1; }
.c-profile-form { display: grid; gap: 14px; }
.c-profile-form .c-field { margin: 0; min-width: 0; }
.c-profile-form .c-help { font-size: 12px; }
.c-profile-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.c-profile-row.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-profile-initials { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); font-family: var(--font-display); font-weight: 800; }
.c-profile-lede { margin: -6px 0 14px; max-width: 62ch; }
.c-profile-check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.c-profile-check input[type='checkbox'] { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--c-accent); }
.c-profile-check strong { display: block; font-weight: 600; }
.c-profile-check small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--c-ink-3); }
.c-profile-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.c-profile-scroll .c-table { min-width: 420px; }
/* Hero: identity on the left, picture choice on the right. */
.c-profile-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: center; }
.c-profile-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.c-profile-avatar { width: 84px; height: 84px; flex: none; border-radius: 50%; box-shadow: 0 0 0 3px var(--c-surface), 0 0 0 5px var(--c-accent-soft); }
.c-profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.c-profile-avatar .c-profile-initials { font-size: 28px; }
.c-profile-id-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.c-profile .c-profile-id-txt h2 { margin: 0; font-size: 24px; }
.c-profile-id-txt .c-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.c-profile-id-txt .c-tag { margin-top: 4px; }
.c-profile-photo { display: grid; gap: 10px; padding-left: 28px; border-left: 1px solid var(--c-line); }
.c-profile-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
@media (max-width: 1000px) {
  .c-profile { grid-template-columns: 1fr; }
  .c-profile-hero { grid-template-columns: 1fr; gap: 20px; }
  .c-profile-photo { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--c-line); }
}
@media (max-width: 560px) { .c-profile-row, .c-profile-row.is-three { grid-template-columns: 1fr; } }

/* Wordmark: the C is drawn in SVG at cap height and sits tight against the rest of the name. */
/* The slice follows the theme's accent; the Completa Dark and Light themes keep Completa blue. brand.js paints the favicon from the same tokens. */
:root { --c-logo-tile: var(--c-accent); }
:root:not([data-theme]), :root[data-theme='dark'], :root[data-theme='light'] { --c-logo-tile: #3454f5; }
.c-brand { gap: 0; font-size: 26px; letter-spacing: -0.035em; line-height: 1; color: var(--c-ink); }
.c-brand:hover { color: var(--c-ink); }
.c-brand .c-logo { width: 1em; height: 1em; margin-right: -0.06em; transform: translateY(-0.07em); overflow: visible; }
/* The full wordmark (logo.tsx CompletaWordmark): sized by height; 168 units tall including the p's descender. */
.c-brand .c-wordmark { display: block; flex: none; height: 30px; width: auto; color: var(--c-ink); }
@media (max-width: 640px) { .c-brand .c-wordmark { height: 26px; } }

.c-ws-read { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-ws-scrub { position: relative; height: 44px; cursor: ew-resize; touch-action: none; outline-offset: 3px; }
.c-ws-scrub .c-ws-chart { width: 100%; height: 100%; }
.c-ws-scrub .c-ws-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 2px var(--c-surface); pointer-events: none; }
.c-ws-cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--c-accent); opacity: .6; pointer-events: none; }
.c-ws-apps { display: flex; align-items: center; gap: 16px; }
.c-ws-donut { width: 92px; height: 92px; flex: none; }
.c-ws-ring { fill: none; stroke: color-mix(in srgb, var(--c-accent) 22%, var(--c-surface-2)); stroke-width: 5; }
.c-ws-ring-live { fill: none; stroke: var(--c-accent); stroke-width: 5; stroke-linecap: round; }
.c-ws-donut-n { fill: var(--c-ink); font: 800 10px var(--font-display); text-anchor: middle; }
.c-ws-donut-l { fill: var(--c-ink-3); font: 500 4px var(--font-body); text-anchor: middle; }
.c-ws-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--c-ink-2); }
.c-ws-key li { display: flex; align-items: center; gap: 7px; }
.c-ws-key i { width: 8px; height: 8px; border-radius: 2px; }
.c-ws-key b { color: var(--c-ink); font-variant-numeric: tabular-nums; }
.c-ws-sec .c-ws-big b { font-size: 20px; }

/* Home: expanded views. A card grows to fill the page and shows its larger view, then shrinks back
   (public/home-expand.js; the views are src/domains/home/panels.tsx). Cards that open say so on hover. */
.c-home [data-expand] { cursor: pointer; }
.c-home-card[data-expand], .c-ws-card[data-expand] { transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1); }
.c-home-card[data-expand]:hover, .c-ws-card[data-expand]:hover { border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); box-shadow: 0 14px 40px -22px color-mix(in srgb, var(--c-accent) 70%, transparent); transform: translateY(-2px); }
.c-home-card[data-expand]:hover .c-home-more:last-child, .c-ws-card[data-expand]:hover .c-home-more { color: var(--c-accent); }
.c-home-more { white-space: nowrap; min-height: 24px; }
.c-home-more:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
.c-home-head-act { display: flex; align-items: center; gap: 14px; flex: none; }
.c-home-head h2 { min-width: 0; }
/* Favorites: every pin as a small bordered tile (more than two rows scroll), each with when it was last used and a
   Dev tag when it is not live. "+ Pin an app" sits in the card's header and opens a short list to pin from. */
.c-home-count.is-plain { color: var(--c-ink-3); }
.c-home-dev { flex: none; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 14%, transparent); }
.c-home-favs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 132px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding: 6px 2px 2px 0; margin-top: -6px; cursor: default; }
.c-home-fav { min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 12px; background: color-mix(in srgb, var(--c-bg) 35%, transparent); color: var(--c-ink); transition: border-color .15s, background .15s; }
.c-home-fav:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 7%, transparent); color: var(--c-ink); }
.c-home-fav .c-home-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; }
.c-home-fav-txt { flex: 1; min-width: 0; display: grid; }
.c-home-fav-txt b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-home-fav-txt small { font-size: 11.5px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-home-favs-none { margin: 0; padding: 12px; border: 1px dashed var(--c-line); border-radius: 12px; font-size: 13px; }
.c-home-recent .c-home-dev { margin-right: -2px; }
.c-home-pick-at { position: relative; cursor: default; }
.c-home-pin-add { min-height: 28px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 999px; background: none; color: var(--c-ink-2); font: 600 12.5px var(--font-body); white-space: nowrap; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.c-home-pin-add:hover, .c-home-pin-add:focus-visible, .c-home-pin-add[aria-expanded='true'] { border-color: var(--c-accent); color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 12%, transparent); outline: none; }
/* While the list is open its card sits above the cards below it, and holds still (a card lifting on hover made its
   own layer, which let the graph underneath show through the list). */
.c-home-card:has(.c-home-pop:not([hidden])) { position: relative; z-index: 25; transform: none; }
.c-home-card[data-expand]:has(.c-home-pick-at:hover) .c-home-more { color: var(--c-ink-3); }
.c-home-pop { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: min(440px, calc(100vw - 48px)); padding: 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: var(--shadow), 0 24px 60px -24px rgba(0, 0, 0, .6); cursor: default; text-align: left; animation: c-rise .18s cubic-bezier(.16, 1, .3, 1); }
.c-home-pop[hidden] { display: none; }
.c-home-pop > p { margin: 0; font-size: 13px; }
.c-home-pop .c-home-pick-list { max-height: min(46dvh, 320px); overscroll-behavior: contain; scrollbar-width: thin; }
.c-home-pop .c-home-pick-bar { margin-bottom: 8px; }
@media (max-width: 900px) { .c-home-favs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 196px; } }
@media (max-width: 560px) { .c-home-favs { grid-template-columns: 1fr; } .c-home-pin-add { min-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .c-home-pop { animation: none; } }
.c-home [data-hx-title] { display: inline-block; }
.is-hx-loading { animation: c-hx-wait 1s ease-in-out infinite; }
@keyframes c-hx-wait { 50% { border-color: var(--c-accent); } }

.c-hx { display: none; width: min(1180px, 100%); margin: 0 auto; }
html.c-hx-on .c-hx { display: block; }
/* The sidebar slides out over the page on hover (it only takes room once kept open). Home's cards are narrow enough
   to clear it; a view is wider, so the page makes room for it and moves with it. Kept open, the room is the same,
   so nothing jumps. Not on phones, where the sidebar is a drawer. */
@media (min-width: 721px) {
  html.c-hx-on .c-main { transition: padding-left .2s cubic-bezier(.2, .8, .2, 1); }
  html.c-hx-on.c-side-closed.c-side-peek .c-main { padding-left: 128px; }
}
@media (prefers-reduced-motion: reduce) { html.c-hx-on .c-main { transition: none; } }
:root[data-motion='reduce'].c-hx-on .c-main { transition: none; }
html.c-hx-on .c-home, html.c-hx-on .c-home-announce { display: none; }
.c-hx-view { display: flex; flex-direction: column; gap: 20px; min-height: calc(100dvh - 170px); padding: 22px 26px 30px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; box-shadow: var(--shadow); }
.c-hx-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--c-line); }
.c-hx-back { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-ink-2); font: 600 13px var(--font-body); cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; }
.c-hx-back span { display: inline-block; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.c-hx-back:hover { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); }
.c-hx-back:hover span { transform: translateX(-3px); }
.c-hx-back:focus-visible, .c-hx-chip:focus-visible, .c-hx-star:focus-visible, .c-hx-rank:focus-visible, .c-hx-kpi.is-btn:focus-visible, .c-hx-inline:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-hx-title { min-width: 0; }
.c-hx-title h1 { display: inline-block; margin: 2px 0 0; font-size: 26px; letter-spacing: -0.02em; outline: none; max-width: 100%; }
.c-hx-hero { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; }
.c-hx-hero > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.c-hx-body { display: grid; gap: 20px; align-content: start; min-width: 0; }
.c-hx-seg button { padding: 6px 12px; font-size: 12.5px; min-height: 30px; }
.c-hx-toggle { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.c-hx-toggle::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--c-btn); box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--c-btn) 70%, transparent); transition: transform .28s cubic-bezier(.3, 0, 0, 1); }
.c-hx-toggle:has(button:last-child[aria-pressed='true'])::before { transform: translateX(100%); }
.c-hx-toggle button { position: relative; min-height: 30px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--c-ink-2); font: 600 12.5px var(--font-body); white-space: nowrap; cursor: pointer; transition: color .2s; }
.c-hx-toggle button[aria-pressed='true'] { color: var(--c-accent-ink); }
.c-hx-toggle button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-hx-scope { margin: -4px 0 0; font-size: 13px; color: var(--c-ink-2); }
.c-hx-scope b { color: var(--c-ink); font-weight: 600; }
.c-rq-pick > span { display: grid; min-width: 0; }
.c-rq-pick > span small { font-size: 12px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-find input { height: 36px; width: 220px; max-width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-ink); font: inherit; font-size: 14px; }
.c-hx-find input:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-hx-n { margin-left: 4px; font: 600 12px var(--font-mono); color: var(--c-ink-3); }
.c-hx-inline { border: 0; background: none; padding: 0; font: inherit; color: var(--c-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.c-hx-note { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--c-ink-2); background: color-mix(in srgb, var(--c-accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 28%, var(--c-line)); }
.c-hx-note b { color: var(--c-ink); }
.c-hx-none { margin: 0; padding: 14px; border: 1px dashed var(--c-line); border-radius: 12px; font-size: 13px; }
.c-hx-foot { margin: 0; font-size: 12.5px; }
.c-hx-clear { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--c-line); border-radius: 16px; }
.c-hx-clear p { margin: 2px 0 0; font-size: 13px; }
.c-hx-clear-ic.is-plain { color: var(--c-accent); background: var(--c-accent-soft); font-size: 18px; }
.c-home-noapps-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px !important; }
.c-home-noapps-act .c-btn { text-decoration: none; }
.c-home-noapps.is-compact { padding: 14px; border-radius: 12px; cursor: default; }
.c-hx-clear-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 16%, transparent); }
.c-hx-clear-ic.is-big { width: 64px; height: 64px; font-size: 26px; animation: c-hx-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes c-hx-pop { from { transform: scale(.5); opacity: 0; } }

/* Sections, counts and lists the views share. */
.c-hx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c-hx-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--c-line); background: none; color: var(--c-ink-2); font: 600 13px var(--font-body); cursor: pointer; transition: background .15s, color .15s; }
.c-hx-chip:hover { color: var(--c-ink); }
.c-hx-chip[aria-pressed='true'] { background: var(--c-accent-soft); border-color: transparent; color: var(--c-ink); }
.c-hx-sec { display: grid; gap: 12px; min-width: 0; scroll-margin-top: 84px; outline: none; border-radius: 12px; }
.c-hx-sec[hidden], .c-hx-app[hidden], .c-hx-tip[hidden], .c-rq-step[hidden], .c-rq-pick[hidden], .c-rq-review > [hidden] { display: none; }
.c-hx-sec.is-flash { animation: c-hx-flash 1.1s ease; }
@keyframes c-hx-flash { 20% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--c-accent) 14%, transparent); background: color-mix(in srgb, var(--c-accent) 14%, transparent); } }
.c-hx-sec-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.c-hx-sec-head p { margin: 2px 0 0; font-size: 12.5px; }
.c-hx-sec-head.is-sub { border-top: 1px solid var(--c-line); padding-top: 14px; }
.c-hx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.c-hx-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-hx-kpi { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 14px 16px; text-align: left; font: inherit; color: var(--c-ink); border: 1px solid var(--c-line); border-radius: 14px; background: color-mix(in srgb, var(--c-bg) 40%, var(--c-surface)); }
.c-hx-kpi b { font: 800 28px/1.05 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.c-hx-kpi b small { font: 600 13px var(--font-body); color: var(--c-ink-3); letter-spacing: 0; }
.c-hx-kpi-sub { min-height: 18px; font-size: 12.5px; color: var(--c-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-kpi.is-btn { cursor: pointer; transition: border-color .15s, transform .2s; }
.c-hx-kpi.is-btn:hover { border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); transform: translateY(-1px); }
.c-hx-meter { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
.c-hx-meter i { display: block; height: 100%; border-radius: 3px; background: var(--c-accent); }
.c-hx-panel { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 18px; border: 1px solid var(--c-line); border-radius: 16px; background: color-mix(in srgb, var(--c-bg) 40%, var(--c-surface)); }
.c-hx-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.c-hx-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; }
.c-hx-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.c-hx-row:last-child { border-bottom: 0; }
.c-hx-row-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.c-hx-row-txt b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-row-txt small { font-size: 12.5px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-row-act { display: flex; align-items: center; gap: 8px; flex: none; }
.c-hx-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.c-hx-ic.is-bad { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 16%, transparent); }
.c-hx-ic.is-info { color: var(--c-info); background: color-mix(in srgb, var(--c-info) 16%, transparent); }
.c-hx-ic.is-ok { color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 16%, transparent); }

/* Apps: one card per app, with its star. */
.c-home-mark.is-big { width: 40px; height: 40px; border-radius: 12px; font-size: 12.5px; }
.c-hx-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.c-hx-app { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 10px 10px 12px; border: 1px solid var(--c-line); border-radius: 14px; transition: border-color .15s, background .15s, transform .2s cubic-bezier(.2, .8, .2, 1); }
.c-hx-app:hover { border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 5%, transparent); transform: translateY(-1px); }
.c-hx-app-main { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 12px; color: var(--c-ink); }
.c-hx-app-main:hover { color: var(--c-ink); }
.c-hx-app-txt { display: grid; min-width: 0; }
.c-hx-app-txt b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-app-txt small { font-size: 12px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-app-meta { display: flex; align-items: center; gap: 4px; flex: none; }
.c-hx-star { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--c-ink-3); font-size: 17px; line-height: 1; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.c-hx-star:hover { background: var(--c-surface-2); color: var(--c-warn); transform: scale(1.1); }
.c-hx-star.is-on { color: var(--c-warn); }

/* Usage: one series in the accent. The period before is a dashed line in ink, named in the legend. */
.c-hx-trend { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
.c-hx-trend-y { position: relative; width: 36px; height: 200px; font: 500 11px var(--font-body); color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.c-hx-trend-y span { position: absolute; right: 0; transform: translateY(-50%); }
.c-hx-trend-y span:nth-child(1) { top: 5%; } .c-hx-trend-y span:nth-child(2) { top: 52.5%; } .c-hx-trend-y span:nth-child(3) { top: 100%; }
.c-hx-plot { position: relative; height: 200px; cursor: crosshair; touch-action: pan-y; border-radius: 4px; outline-offset: 6px; }
.c-hx-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.c-hx-plot .c-ws-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 2px var(--c-surface); pointer-events: none; }
.c-hx-prev { fill: none; stroke: var(--c-ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .75; }
.c-hx-tip { position: absolute; top: -4px; z-index: 2; transform: translate(-50%, -100%); display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow); font-size: 12px; color: var(--c-ink-2); white-space: nowrap; pointer-events: none; }
.c-hx-tip b { font-size: 14px; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.c-hx-trend-x, .c-hx-trend figcaption { grid-column: 2; }
.c-hx-trend-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--c-ink-3); }
.c-ws-legend .c-hx-key-line { width: 16px; height: 0; border-radius: 0; border-top: 2px solid var(--c-accent); }
.c-ws-legend .c-hx-key-line.is-prev { border-top: 2px dashed var(--c-ink-3); }
.c-hx-ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.c-hx-rank { width: 100%; min-height: 48px; display: grid; grid-template-columns: auto minmax(0, 1fr) 84px auto; grid-template-areas: 'm n s v'; column-gap: 12px; row-gap: 6px; align-items: center; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.c-hx-rank:hover { background: var(--c-surface-2); }
.c-hx-rank.is-static { cursor: default; }
.c-hx-rank.is-static:hover { background: none; }
.c-hx-rank > .c-home-mark, .c-hx-rank > .c-home-face { grid-area: m; }
.c-hx-rank-name { grid-area: n; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hx-spark { grid-area: s; display: block; width: 84px; height: 24px; overflow: visible; }
.c-hx-rank-when { grid-area: s; font-size: 11.5px; color: var(--c-ink-3); text-align: right; white-space: nowrap; }
.c-hx-rank-n { grid-area: v; min-width: 92px; display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; font-variant-numeric: tabular-nums; }
.c-hx-rank-n b { font-weight: 700; font-size: 14px; }
.c-hx-rank-bar { grid-area: b; display: none; height: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
.c-hx-rank-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c-accent); }
.c-hx-ranks.is-bars .c-hx-rank { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: 'm n s v' 'm b b b'; }
.c-hx-ranks.is-bars .c-hx-rank-bar { display: block; }
.c-hx-ranks.is-bars .c-hx-spark { display: none; }
.c-hx-ranks.is-bars .c-hx-rank-n { min-width: 0; }
.c-hx-dow { list-style: none; margin: 0; padding: 0; height: 150px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.c-hx-dow li { height: 100%; min-width: 0; display: grid; grid-template-rows: 16px minmax(0, 1fr) auto; justify-items: center; gap: 4px; }
.c-hx-dow b { font: 600 11px var(--font-body); color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.c-hx-dow i { align-self: end; width: min(100%, 28px); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--c-accent); }
.c-hx-dow span { font-size: 11.5px; color: var(--c-ink-3); }
.c-hx-split { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.c-hx-split i { flex-basis: 0; min-width: 4px; }
.c-hx-split .is-a, .c-hx-split-key .is-a { background: var(--c-accent); }
.c-hx-split .is-b, .c-hx-split-key .is-b { background: color-mix(in srgb, var(--c-accent) 45%, var(--c-surface-2)); }
.c-hx-split .is-c, .c-hx-split-key .is-c { background: color-mix(in srgb, var(--c-ink-3) 45%, var(--c-surface-2)); }
.c-hx-split-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--c-ink-2); }
.c-hx-split-key li { display: flex; align-items: center; gap: 8px; }
.c-hx-split-key i { width: 8px; height: 8px; flex: none; border-radius: 2px; }
.c-hx-split-key b { color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* Connectors: the table scrolls inside the view when it is long, so the summary and Test all stay in sight. */
.c-hx-scroll { max-height: max(300px, calc(100dvh - 470px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid var(--c-line); border-radius: 14px; }
.c-hx-scroll .c-table { margin: 0; }
.c-hx-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--c-surface); }

/* Raise a request: a step bar, one question at a time, then a summary to check. */
.c-rq { width: min(760px, 100%); margin: 0 auto; }
.c-rq-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.c-rq-steps li { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 3px solid var(--c-line); font-size: 13px; font-weight: 600; color: var(--c-ink-3); transition: border-color .3s, color .3s; }
.c-rq-num { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--font-mono); background: var(--c-surface-2); transition: background .3s, color .3s; }
.c-rq-steps li.is-done { border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); color: var(--c-ink-2); }
.c-rq-steps li.is-done .c-rq-num { background: var(--c-accent-soft); color: var(--c-ink); }
.c-rq-steps li[aria-current] { border-color: var(--c-accent); color: var(--c-ink); }
.c-rq-steps li[aria-current] .c-rq-num { background: var(--c-btn); color: var(--c-accent-ink); }
.c-rq-stage { min-height: 300px; }
.c-rq-step { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 14px; align-content: start; }
.c-rq-step legend { padding: 0; margin-bottom: 6px; font: 800 22px var(--font-display); letter-spacing: -0.02em; }
.c-rq-step > p { margin: 0; }
.c-rq-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; padding: 3px; margin: -3px; }
.c-rq-kinds { display: grid; gap: 10px; }
.c-rq-pick { position: relative; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 10px 40px 10px 14px; border: 1px solid var(--c-line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .2s; }
.c-rq-pick:hover { border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 5%, transparent); }
.c-rq-pick input { position: absolute; opacity: 0; pointer-events: none; }
.c-rq-pick b { min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-rq-pick.is-kind > span { display: grid; gap: 2px; min-width: 0; }
.c-rq-pick.is-kind small { font-size: 12.5px; color: var(--c-ink-3); }
.c-rq-pick:has(input:checked) { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 9%, transparent); box-shadow: inset 0 0 0 1px var(--c-accent); }
.c-rq-pick:has(input:checked)::after { content: '✓'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--c-accent); font-weight: 700; }
.c-rq-pick:has(input:focus-visible), .c-rq-urgency input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-rq-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.c-rq-field[hidden] { display: none; }
.c-rq-field em { margin-left: 6px; font-style: normal; font-weight: 400; color: var(--c-ink-3); }
.c-rq-field .c-input { font-weight: 400; resize: vertical; }
.c-rq-urgency { display: flex; flex-wrap: wrap; gap: 8px; }
.c-rq-urgency label { position: relative; }
.c-rq-urgency input { position: absolute; opacity: 0; pointer-events: none; }
.c-rq-urgency span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--c-line); border-radius: 999px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.c-rq-urgency input:checked + span { background: var(--c-accent-soft); border-color: var(--c-accent); }
.c-rq-review { margin: 0; border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; }
.c-rq-review > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.c-rq-review > div:last-child { border-bottom: 0; }
.c-rq-review dt { padding-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ink-3); }
.c-rq-review dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-rq-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-rq-nav .c-btn { min-height: 40px; }
.c-rq-nav [data-rq-next] { margin-left: auto; }
.c-rq-error { margin: 0; font-size: 13px; text-align: right; color: var(--c-danger); }
.c-rq-error[hidden], .c-rq.is-done .c-rq-nav, .c-rq.is-done .c-rq-steps { display: none; }
.c-rq-done { justify-items: center; text-align: center; gap: 10px; padding: 40px 0 20px; }
.c-rq-done h2 { margin: 6px 0 0; font-size: 24px; outline: none; }
.c-rq-done-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

@media (max-width: 900px) {
  .c-hx-cols { grid-template-columns: 1fr; }
  .c-hx-kpis, .c-hx-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-hx-view { padding: 16px 16px 24px; border-radius: 16px; }
  .c-hx-top { grid-template-columns: auto minmax(0, 1fr); }
  .c-hx-tools { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .c-hx-title h1 { font-size: 22px; }
  .c-hx-find, .c-hx-find input { width: 100%; }
  .c-hx-find input, .c-hx-tools .c-btn, .c-hx-row .c-btn { min-height: 40px; }
  .c-hx-find input { font-size: 16px; }
  .c-hx-seg button, .c-hx-toggle button { min-height: 40px; padding-inline: 14px; }
  .c-hx-chip { height: 40px; }
  .c-hx-apps { grid-template-columns: 1fr; }
  .c-hx-row { flex-wrap: wrap; }
  .c-hx-row-txt { flex-basis: calc(100% - 46px); }
  .c-hx-row-act { margin-left: 42px; }
  .c-hx-row-txt b, .c-hx-row-txt small { white-space: normal; }
  .c-rq-apps { max-height: none; }
  .c-hx-scroll { max-height: 70dvh; }
  .c-hx-rank { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'm n v'; }
  .c-hx-ranks:not(.is-bars) .c-hx-spark, .c-hx-ranks.is-bars .c-hx-rank-when { display: none; }
  .c-hx-ranks.is-bars .c-hx-rank { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'm n v' 'm b b'; }
  .c-hx-rank-n { min-width: 0; }
  .c-hx-plot, .c-hx-trend-y { height: 160px; }
  .c-rq-steps li span:last-child { display: none; }
  .c-rq-review > div { grid-template-columns: minmax(0, 1fr) auto; }
  .c-rq-review dt { grid-column: 1 / -1; padding: 0; }
  .c-rq-nav [data-rq-count] { display: none; }
  .c-home-head-act { gap: 10px; }
}

/* The movement. home-expand.js sets data-hx on <html> for the length of one view transition: open / close grow the
   card into the view and back while the rest of Home falls away behind it; forward / back slide between views and
   carry the chosen app's mark across; swap cross-fades. Browsers without view transitions change at once. */
html[data-hx]::view-transition-old(root) { display: none; }
html[data-hx='open'] .c-home, html[data-hx='close'] .c-home { view-transition-name: hx-home; }
html[data-hx='open'] .is-hx-origin, html[data-hx='close'] .is-hx-origin,
html[data-hx='open'] .c-hx-view, html[data-hx='close'] .c-hx-view { view-transition-name: hx-shell; }
html[data-hx='open'] .is-hx-origin [data-hx-title], html[data-hx='close'] .is-hx-origin [data-hx-title],
html[data-hx='open'] .c-hx-title h1, html[data-hx='close'] .c-hx-title h1, html[data-hx='forward'] .c-hx-title h1, html[data-hx='back'] .c-hx-title h1 { view-transition-name: hx-title; }
html[data-hx='forward'] .c-hx-body, html[data-hx='back'] .c-hx-body, html[data-hx='swap'] .c-hx-body { view-transition-name: hx-body; }
html[data-hx='forward'] .c-hx-tools, html[data-hx='back'] .c-hx-tools { view-transition-name: hx-tools; }
html[data-hx='forward'] .c-hx-back, html[data-hx='back'] .c-hx-back { view-transition-name: hx-back; }
html[data-hx='forward'] .is-hx-hero > .c-home-mark, html[data-hx='back'] .is-hx-hero > .c-home-mark,
html[data-hx='forward'] .c-hx-hero > .c-home-mark, html[data-hx='back'] .c-hx-hero > .c-home-mark { view-transition-name: hx-mark; }
html[data-hx^='step'] .c-rq-stage { view-transition-name: hx-step; }

::view-transition-group(hx-shell) { z-index: 2; animation-duration: .52s; animation-timing-function: cubic-bezier(.3, 0, 0, 1); border-radius: 20px; overflow: clip; background: var(--c-surface); box-shadow: 0 40px 110px -40px rgba(0, 0, 0, .7); }
::view-transition-old(hx-shell), ::view-transition-new(hx-shell) { width: 100%; height: 100%; object-fit: cover; object-position: left top; mix-blend-mode: normal; }
::view-transition-old(hx-shell) { animation: c-hx-fade-out .2s ease both; }
::view-transition-new(hx-shell) { animation: c-hx-fade-in .34s .06s ease both; }
::view-transition-group(hx-title) { z-index: 3; animation-duration: .52s; animation-timing-function: cubic-bezier(.3, 0, 0, 1); }
/* The heading travels, and changes its words on the way without the two overlapping. */
::view-transition-old(hx-title), ::view-transition-new(hx-title) { height: 100%; width: auto; mix-blend-mode: normal; }
::view-transition-old(hx-title) { animation: c-hx-fade-out .14s ease both; }
::view-transition-new(hx-title) { animation: c-hx-fade-in .26s .14s ease both; }
::view-transition-group(hx-mark) { z-index: 4; animation-duration: .46s; animation-timing-function: cubic-bezier(.3, 0, 0, 1); }
::view-transition-group(hx-body), ::view-transition-group(hx-step) { animation-duration: .4s; }
::view-transition-old(hx-body), ::view-transition-new(hx-body), ::view-transition-old(hx-step), ::view-transition-new(hx-step) { mix-blend-mode: normal; height: auto; }
html[data-hx='open']::view-transition-old(hx-home) { animation: c-hx-recede .42s cubic-bezier(.3, 0, .2, 1) both; }
html[data-hx='close']::view-transition-new(hx-home) { animation: c-hx-return .5s .04s cubic-bezier(.2, .8, .2, 1) both; }
html[data-hx='forward']::view-transition-old(hx-body), html[data-hx='step-forward']::view-transition-old(hx-step) { animation: c-hx-out-left .2s ease-in both; }
html[data-hx='forward']::view-transition-new(hx-body), html[data-hx='step-forward']::view-transition-new(hx-step) { animation: c-hx-in-right .42s .1s cubic-bezier(.2, .8, .2, 1) both; }
html[data-hx='back']::view-transition-old(hx-body), html[data-hx='step-back']::view-transition-old(hx-step) { animation: c-hx-out-right .2s ease-in both; }
html[data-hx='back']::view-transition-new(hx-body), html[data-hx='step-back']::view-transition-new(hx-step) { animation: c-hx-in-left .42s .1s cubic-bezier(.2, .8, .2, 1) both; }
html[data-hx='swap']::view-transition-group(hx-body) { animation-duration: .26s; }
@keyframes c-hx-fade-out { to { opacity: 0; } }
@keyframes c-hx-fade-in { from { opacity: 0; } }
/* Opacity and scale only: both run on the compositor. A blur here halved the frame rate on machines without a fast GPU. */
@keyframes c-hx-recede { to { opacity: 0; transform: scale(.955); } }
@keyframes c-hx-return { from { opacity: 0; transform: scale(.955); } }
@keyframes c-hx-out-left { to { opacity: 0; transform: translateX(-36px); } }
@keyframes c-hx-in-right { from { opacity: 0; transform: translateX(48px); } }
@keyframes c-hx-out-right { to { opacity: 0; transform: translateX(36px); } }
@keyframes c-hx-in-left { from { opacity: 0; transform: translateX(-48px); } }
/* What the view holds rises into place as it arrives, one piece after another. */
.c-hx-view.is-rising .c-hx-body > * { animation: c-rise .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: .14s; }
.c-hx-view.is-rising .c-hx-body > :nth-child(2) { animation-delay: .19s; }
.c-hx-view.is-rising .c-hx-body > :nth-child(3) { animation-delay: .24s; }
.c-hx-view.is-rising .c-hx-body > :nth-child(4) { animation-delay: .29s; }
.c-hx-view.is-rising .c-hx-body > :nth-child(n + 5) { animation-delay: .34s; }
@supports not (view-transition-name: none) { .c-hx-view.is-rising { animation: c-hx-return .3s ease both; } }
@media (prefers-reduced-motion: reduce) {
  .c-hx-view.is-rising, .c-hx-view.is-rising .c-hx-body > *, .is-hx-loading, .c-hx-clear-ic.is-big, .c-hx-sec.is-flash { animation: none; }
  .c-home-card[data-expand], .c-ws-card[data-expand], .c-hx-app, .c-hx-kpi.is-btn, .c-hx-toggle::before { transition: none; }
  .c-home-card[data-expand]:hover, .c-ws-card[data-expand]:hover, .c-hx-app:hover, .c-hx-kpi.is-btn:hover { transform: none; }
}
:root[data-motion='reduce'] .c-hx-view.is-rising, :root[data-motion='reduce'] .c-hx-view.is-rising .c-hx-body > *, :root[data-motion='reduce'] .is-hx-loading { animation: none; }

/* Community: heading, Overview / Forum / Training tabs, the Overview board of expanding cards with the Top
   Contributors rail, forum chips and topics, and training modules. public/community.js drives the behavior. */
.cm { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cm-head h1 { font-size: 32px; margin: 0 0 4px; }
.cm-head p { margin: 0; color: var(--c-ink-2); }
/* The line is an inset shadow, as on .c-tabs: tabs overlapping a border by 1px made the row scroll vertically. */
.cm-tabs { display: flex; align-items: center; gap: 4px; box-shadow: inset 0 -1px 0 var(--c-line); overflow-x: auto; overflow-y: hidden; }
.cm-tabs a { padding: 10px 14px; color: var(--c-ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.cm-tabs a:hover { color: var(--c-ink); }
.cm-tabs a[aria-current='page'] { color: var(--c-ink); border-color: var(--c-accent); }
.cm-tabs .cm-tab-aside { font-size: 13px; color: var(--c-ink-3); padding: 10px; }
.cm h2 { font-size: 20px; margin: 0; }
.cm h3 { font-size: 17px; margin: 0; }
.cm h4 { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); margin: 0 0 8px; }
.cm-meta { color: var(--c-ink-3); font-size: 12.5px; }
.cm-quiet { color: var(--c-ink-3); font-size: 13.5px; margin: 4px 0 0; }
.cm-text { white-space: pre-wrap; word-break: break-word; }
.cm-text img { max-width: 100%; border-radius: var(--radius); display: block; margin: 8px 0; }
.cm-text a { color: var(--c-accent); }
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cm-badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--c-accent-soft); color: var(--c-accent); white-space: nowrap; }
.cm-badge.ok { background: color-mix(in srgb, var(--c-ok) 16%, transparent); color: var(--c-ok); }
.cm-badge.muted { background: var(--c-surface-2); color: var(--c-ink-3); }
.cm-back { align-self: flex-start; font-size: 13px; color: var(--c-ink-2); }
.cm-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--c-ink-3); cursor: pointer; }
.cm-link:hover { color: var(--c-accent); }
.cm-link.danger:hover { color: var(--c-danger); }
.cm-close { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.cm-close:hover { color: var(--c-ink); border-color: var(--c-ink-3); }
.cm-icon-btn { border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); width: 28px; height: 28px; border-radius: 999px; cursor: pointer; font-size: 16px; line-height: 1; }
.cm-icon-btn:hover { color: var(--c-ink); }
.cm-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.cm-seg button, .cm-seg a { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font: 500 13px var(--font-body); color: var(--c-ink-3); cursor: pointer; white-space: nowrap; }
.cm-seg button:hover, .cm-seg a:hover { color: var(--c-ink); }
.cm-seg [aria-pressed='true'] { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.cm-seg button:disabled { opacity: .45; cursor: default; }
.cm-placeholder { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 22px; border: 1px dashed var(--c-ink-3); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--c-surface) 60%, transparent); }
.cm-placeholder .cm-badge { background: color-mix(in srgb, var(--c-warn) 18%, transparent); color: var(--c-warn); text-transform: uppercase; letter-spacing: .06em; }
.cm-placeholder p { margin: 0; color: var(--c-ink-2); max-width: 70ch; }
.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 40px 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.cm-empty p { margin: 0; color: var(--c-ink-3); max-width: 52ch; }
.cm-banner { margin: 0; }
.cm-banner-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-banner-copy span { font-size: 12.5px; }
.cm-dialog { width: min(620px, calc(100vw - 24px)); padding: 20px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.cm-dialog::backdrop { background: rgba(8, 10, 18, .6); }
.cm-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cm .c-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cm-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.cm-add-row .c-input, .cm-add-row .c-select { width: auto; flex: 1 1 180px; }
.cm-add-row .c-select { flex: 0 1 160px; }

/* Overview board: a six-column stage (Pulse, Activity, then Announcements beside Events) and a rail on the right. */
.cm-board { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: stretch; min-height: calc(100dvh - 250px); }
.cm-stage { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto minmax(180px, 1fr); gap: 16px; min-width: 0; }
.cm-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px 20px; cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .2s; }
.cm-card:hover { border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); }
.cm-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.cm-pulse, .cm-activity { grid-column: 1 / -1; }
.cm-ann { grid-column: 1 / 4; }
.cm-events { grid-column: 4 / 7; }
.cm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; }
.cm-card-title p { margin: 2px 0 0; color: var(--c-ink-3); font-size: 12.5px; }
.cm-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cm-card-actions .cm-when-open { display: none; gap: 8px; }
.cm-card .cm-close { display: none; }
.cm-card:not(.is-expanded) .cm-card-head::after { content: attr(data-hint); position: absolute; right: 0; top: 2px; font-size: 11.5px; color: var(--c-ink-3); opacity: 0; transition: opacity .15s; pointer-events: none; }
.cm-card:not(.is-expanded):hover .cm-card-head::after { opacity: 1; }
.cm-card:not(.is-expanded) .cm-card-head:has(.cm-card-actions > :not(.cm-close):not(.cm-when-open))::after { content: none; }
.cm-card.has-new::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-accent); }
.cm-expanded { display: none; }
.cm-card.is-expanded { grid-column: 1 / -1; grid-row: 1 / -1; cursor: default; min-height: calc(100dvh - 250px); }
.cm-card.is-expanded:hover { border-color: var(--c-line); }
.cm-card.is-expanded .cm-compact { display: none; }
.cm-card.is-expanded .cm-expanded { display: flex; flex-direction: column; gap: 14px; min-height: 0; animation: cm-in .2s ease; }
.cm-card.is-expanded .cm-close, .cm-card.is-expanded .cm-when-open { display: inline-flex; }
.cm-board.is-expanded .cm-stage > .cm-card:not(.is-expanded) { display: none; }
.cm-board.is-expanded .cm-rail { display: none; }
@keyframes cm-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cm-card.is-expanded .cm-expanded { animation: none; } }

/* Community Pulse: growth chart beside four KPI tiles; Team Pulse when open. */
.cm-pulse-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.cm-chart { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-chart-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.cm-chart-readout { color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.cm-trend { padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-3); font-weight: 600; font-size: 11.5px; }
.cm-trend.up { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }
.cm-plot { position: relative; height: 170px; margin-bottom: 22px; }
.cm-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.cm-grid-line { stroke: color-mix(in srgb, var(--c-line) 80%, transparent); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.cm-axis { stroke: var(--c-line); vector-effect: non-scaling-stroke; }
.cm-area { fill: color-mix(in srgb, var(--c-accent) 16%, transparent); }
.cm-line { fill: none; stroke: var(--c-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* One hover column per month, centred on its point; the dot and the label keep their shape at any width. */
.cm-pt { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); }
.cm-dot { position: absolute; left: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--c-surface); border: 2px solid var(--c-accent); box-sizing: border-box; transition: width .12s, height .12s, background .12s; }
.cm-month { position: absolute; top: calc(100% + 6px); left: 0; right: 0; text-align: center; font: 500 11px var(--font-body); color: var(--c-ink-3); white-space: nowrap; }
.cm-pt:hover .cm-dot, .cm-pt.is-on .cm-dot { width: 12px; height: 12px; background: var(--c-accent); }
.cm-pt:hover .cm-month, .cm-pt.is-on .cm-month { color: var(--c-ink); }
@media (prefers-reduced-motion: reduce) { .cm-dot { transition: none; } }
.cm-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-kpi { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 14px 14px 12px; border-radius: var(--radius); background: var(--c-surface-2); border: 1px solid var(--c-line); overflow: hidden; }
.cm-kpi::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c-accent); }
.cm-kpi strong { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cm-kpi span { font-size: 12px; color: var(--c-ink-3); }
.cm-team-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cm-team-bar h3 { margin-right: auto; }
.cm-team-pick { width: auto; min-width: 180px; padding: 6px 10px; }
.cm-team-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cm-team-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--c-line); border-radius: var(--radius); }
.cm-team-col h4 { margin: 4px 0 0; }
.cm-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: cm-rank; }
.cm-rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 8px; font-size: 13.5px; counter-increment: cm-rank; }
.cm-rank li::before { content: counter(cm-rank); color: var(--c-ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.cm-rank li.cm-muted-row { display: block; color: var(--c-ink-3); font-size: 13px; }
.cm-rank li.cm-muted-row::before { content: none; }
.cm-rank .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-rank .v { color: var(--c-ink-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-rank a.n:hover { color: var(--c-accent); }

/* Your Activity feed. */
.cm-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-feed-item a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--radius); }
.cm-feed-item a:hover { background: var(--c-surface-2); color: inherit; }
.cm-feed-item.is-unread .cm-feed-text { color: var(--c-ink); font-weight: 500; }
.cm-feed-text { color: var(--c-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cm-feed-text em { font-style: normal; color: var(--c-ink); }
.cm-feed-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--c-ink-3); white-space: nowrap; }
.cm-space { padding: 1px 7px; border-radius: 6px; background: var(--c-surface-2); font-size: 11px; font-weight: 600; }
.cm-kind { min-width: 64px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--c-accent-soft); color: var(--c-accent); }
.cm-kind.k-upvote { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }
.cm-kind.k-topic { background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); }
.cm-more { margin: 4px 0 0 10px; font-size: 12.5px; color: var(--c-ink-3); }
.cm-group-label { margin: 6px 0 2px 10px; }

/* Announcements. */
.cm-ann-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-ann-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius); }
.cm-ann-row:hover { background: var(--c-surface-2); color: inherit; }
.cm-ann-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cm-ann-date { font-size: 12px; color: var(--c-ink-3); white-space: nowrap; }
.cm-cat { justify-self: start; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--c-surface-2); color: var(--c-ink-2); }
.cm-cat.c-release { background: var(--c-accent-soft); color: var(--c-accent); }
.cm-cat.c-maintenance { background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); }
.cm-ann-open { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.cm-ann-open h3 { font-size: 24px; }
.cm-ann-open .cm-cat { align-self: flex-start; }
.cm-ann-open p.cm-meta { margin: 0; }
.cm-ann-img { max-width: 100%; border-radius: var(--radius); }

/* Upcoming Events: preview rows, then agenda + month calendar when open. */
.cm-event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cm-event-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 4px; }
.cm-date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 10px; background: var(--c-accent-soft); color: var(--c-accent); line-height: 1.05; }
.cm-date-chip span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cm-date-chip strong { font-family: var(--font-display); font-size: 18px; }
.cm-event-main { display: flex; flex-direction: column; min-width: 0; }
.cm-event-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cm-event-main span { font-size: 12.5px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-scope { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--c-surface-2); color: var(--c-ink-2); }
.cm-scope.s-team { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }
.cm-events-bar { display: flex; align-items: center; gap: 10px; }
.cm-events-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 20px; align-items: start; }
.cm-agenda { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cm-agenda-day { margin: 6px 0 2px; }
.cm-agenda-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.cm-agenda-row .cm-event-main span { white-space: normal; }
.cm-agenda-row p { margin: 4px 0 0; font-size: 13px; color: var(--c-ink-2); white-space: pre-wrap; }
.cm-pill { margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--c-accent); color: var(--c-accent-ink); vertical-align: 2px; }
.cm-agenda-actions { display: flex; gap: 10px; }
.cm-past summary { cursor: pointer; font-size: 13px; color: var(--c-ink-3); padding: 4px 0; }
.cm-past[open] summary { margin-bottom: 8px; }
.cm-past .cm-agenda-row { opacity: .7; margin-bottom: 6px; }
.cm-calendar { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cm-cal-head { display: flex; align-items: center; justify-content: space-between; }
.cm-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cm-cal-dow { font-size: 11px; font-weight: 700; color: var(--c-ink-3); padding: 4px 0; }
.cm-cal-day { position: relative; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font: 500 13px var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; }
.cm-cal-day:hover { background: var(--c-surface-2); color: var(--c-ink); }
.cm-cal-day.is-out { color: var(--c-ink-3); opacity: .45; }
.cm-cal-day.is-today { color: var(--c-accent); font-weight: 800; }
.cm-cal-day.is-selected { background: var(--c-accent); color: var(--c-accent-ink); }
.cm-cal-day.has-event::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-accent); }
.cm-cal-day.is-selected.has-event::after { background: var(--c-accent-ink); }
.cm-event-form { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; background: var(--c-surface-2); display: flex; flex-direction: column; gap: 10px; }
.cm-event-form[hidden] { display: none; }
.cm-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.cm-form-grid .cm-span-2 { grid-column: span 2; }
.cm-form-grid .c-field { margin-bottom: 10px; }

/* Top Contributors rail: collapses to a vertical tab. */
.cm-rail { position: relative; display: flex; width: 300px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: width .18s ease; }
.cm-rail-tab { flex: none; width: 34px; border: 0; border-right: 1px solid var(--c-line); background: none; color: var(--c-ink-3); cursor: pointer; border-radius: var(--radius-lg) 0 0 var(--radius-lg); font: 600 12px var(--font-body); letter-spacing: .04em; }
.cm-rail-tab span { writing-mode: vertical-rl; transform: rotate(180deg); }
.cm-rail-tab:hover { color: var(--c-ink); background: var(--c-surface-2); }
.cm-rail-body { flex: 1; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.cm-rail.is-closed { width: 36px; }
.cm-rail.is-closed .cm-rail-body { display: none; }
.cm-rail.is-closed .cm-rail-tab { border-right: 0; border-radius: var(--radius-lg); }
.cm-switch { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.cm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cm-switch-ui { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); transition: background .15s; }
.cm-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-ink-3); transition: transform .15s, background .15s; }
.cm-switch input:checked + .cm-switch-ui { background: var(--c-accent); border-color: var(--c-accent); }
.cm-switch input:checked + .cm-switch-ui::after { transform: translateX(16px); background: var(--c-accent-ink); }
.cm-switch input:focus-visible + .cm-switch-ui { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.cm-switch-hint { margin: -6px 0 0; font-size: 12px; color: var(--c-ink-3); }
.cm-leaders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-leaders li { display: grid; grid-template-columns: 18px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; }
.cm-leaders li:hover { background: var(--c-surface-2); }
.cm-rank-n { color: var(--c-ink-3); font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.cm-leaders li:first-child .cm-rank-n { color: var(--c-accent); font-weight: 800; }
.cm-leader-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; }
.cm-leader-score { font-size: 12px; font-weight: 700; color: var(--c-accent); font-variant-numeric: tabular-nums; }
.cm-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; object-fit: cover; background: var(--c-accent-soft); color: var(--c-accent); font: 800 13px var(--font-display); }

/* Forum. */
.cm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-size: 13.5px; }
.cm-chip:hover { border-color: var(--c-accent); color: var(--c-ink); }
.cm-chip[aria-current='page'] { border-color: var(--c-accent); background: var(--c-accent-soft); }
.cm-chip-name { font-weight: 600; }
.cm-chip-count { color: var(--c-ink-3); font-size: 12px; }
.cm-search .c-input { max-width: 560px; }
.cm-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cm-group-head h2 { font-size: 24px; }
.cm-group-head p { margin: 2px 0 0; }
.cm-forum-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-forum-search { width: auto; flex: 0 1 320px; padding: 7px 12px; }
.cm-status-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-ink-3); }
.cm-status-pick .c-select { width: auto; padding: 6px 10px; }
.cm-topics { display: flex; flex-direction: column; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); overflow: hidden; }
.cm-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; }
.cm-topic + .cm-topic { border-top: 1px solid var(--c-line); }
.cm-topic:hover { background: var(--c-surface-2); color: inherit; }
.cm-topic-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cm-topic-badges { display: flex; gap: 6px; }
.cm-topic-badges:empty { display: none; }
.cm-topic-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-topic:hover .cm-topic-title { color: var(--c-accent); }
.cm-topic-stats { display: flex; gap: 14px; color: var(--c-ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cm-stat { display: inline-flex; align-items: center; gap: 5px; }
.cm-stat svg { width: 14px; height: 14px; fill: currentColor; opacity: .8; }
.cm-pager { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13.5px; color: var(--c-ink-2); }
.cm-pager a { color: var(--c-accent); }
.cm-pager .is-off { color: var(--c-ink-3); opacity: .5; }
.cm-image-pick { cursor: pointer; }
.cm-topic-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.cm-topic-h { font-size: 26px !important; margin: 2px 0 8px !important; }
.cm-votes { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 32px; }
.cm-votes button { border: 0; background: none; color: var(--c-ink-3); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.cm-votes button:hover { color: var(--c-accent); background: var(--c-surface-2); }
.cm-votes button.is-on { color: var(--c-accent); }
.cm-votes strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.cm-byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.cm-byline .cm-avatar { width: 26px; height: 26px; font-size: 12px; }
.cm-reply-main { min-width: 0; }
.cm-reply-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.cm-thread { display: flex; flex-direction: column; gap: 12px; }
.cm-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-replies:not(.is-root) { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--c-line); }
.cm-reply { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.cm-replies.is-root > .cm-reply { padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.cm-reply.is-accepted > .cm-reply-main > .cm-text { border-left: 3px solid var(--c-ok); padding-left: 10px; }
.cm-reply-form { display: flex; flex-direction: column; gap: 8px; }
.cm-reply-form.is-inline { margin-top: 10px; }
.cm-reply-form[hidden] { display: none; }
.cm-mention-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface-2); }
.cm-mention-list[hidden] { display: none; }

/* Training. */
.cm-scope-switch { align-self: flex-start; }
.cm-course { display: flex; flex-direction: column; gap: 12px; }
.cm-course-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cm-course-head p { margin: 2px 0 0; }
.cm-progress { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.cm-meter { height: 6px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; }
.cm-meter > span { display: block; height: 100%; background: var(--c-accent); }
.cm-modules { display: flex; flex-direction: column; gap: 10px; }
.cm-module { border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.cm-module > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; list-style: none; }
.cm-module > summary::-webkit-details-marker, .cm-lesson-row > summary::-webkit-details-marker { display: none; }
.cm-module > summary:hover { background: var(--c-surface-2); border-radius: var(--radius-lg); }
.cm-module[open] > summary { border-bottom: 1px solid var(--c-line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.cm-module-n { padding: 3px 10px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cm-module-title { display: flex; flex-direction: column; min-width: 0; }
.cm-module-title strong { font-size: 15.5px; }
.cm-count { padding: 1px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-3); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.cm-count.is-full { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }
.cm-module > .cm-add-row, .cm-module > .cm-quiet { padding: 0 18px 14px; }
.cm-lessons { display: flex; flex-direction: column; padding: 6px 10px; }
.cm-lesson-row { border-radius: var(--radius); }
.cm-lesson-row + .cm-lesson-row { border-top: 1px solid var(--c-line); }
.cm-lesson-row > summary { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 8px; cursor: pointer; list-style: none; font-size: 14px; }
.cm-lesson-row > summary:hover .cm-lesson-name { color: var(--c-accent); }
.cm-lesson-row[open] { background: color-mix(in srgb, var(--c-surface-2) 50%, transparent); }
.cm-lesson-row[open] > .cm-lesson, .cm-lesson-row[open] > .cm-link { margin: 0 8px 12px 38px; display: block; }
.cm-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--c-ink-3); }
.cm-lesson-row.is-done .cm-check { border-color: var(--c-ok); background: var(--c-ok); box-shadow: inset 0 0 0 3px var(--c-surface); }
.cm-done-label { font-size: 12px; color: var(--c-ink-3); }
.cm-lesson-row.is-done .cm-done-label { color: var(--c-ok); font-weight: 600; }
.cm-lesson { display: flex; flex-direction: column; gap: 14px; }
.cm-lesson-summary { margin: 0; color: var(--c-ink-2); }
.cm-player video, .cm-player audio { width: 100%; max-height: 480px; border-radius: var(--radius); background: #000; display: block; }
.cm-player audio { background: none; }
.cm-lesson-part { display: flex; flex-direction: column; gap: 6px; }
.cm-moments, .cm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cm-moments li, .cm-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.cm-moments li div, .cm-steps label { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.cm-time { border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-accent); border-radius: 999px; padding: 2px 9px; font: 600 12px var(--font-mono); cursor: pointer; }
.cm-steps input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--c-accent); flex: none; }
.cm-steps input:checked + label .cm-text { color: var(--c-ink-3); text-decoration: line-through; }
.cm-step-img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.cm-prompt { margin: 0; white-space: pre-wrap; }
.cm-lesson-part .c-btn { align-self: flex-start; }
.cm-lesson-foot { padding-top: 4px; }
.cm-lesson.is-done [data-done] { color: var(--c-ok); font-weight: 600; }
.cm-lesson-head p { margin: 4px 0 0; }
.cm-private-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--c-accent-soft), var(--c-surface) 70%); }
.cm-private-intro p { margin: 4px 0 0; max-width: 64ch; }
.cm-staff-box summary { cursor: pointer; font-weight: 600; }
.cm-staff-box[open] summary { margin-bottom: 14px; }
.cm-storage-ask { margin-top: 14px; }
.cm-storage-ask p { margin: 0; }

/* Skills and media libraries, staff announcements. */
.cm-media-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cm-media { margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cm-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); display: block; }
.cm-media figcaption { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cm-media .c-mono { word-break: break-all; font-size: 11px; }
.cm-upload h3 { margin-bottom: 4px; }
.cm-admin { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }

@media (max-width: 1100px) {
  .cm-board { grid-template-columns: 1fr; min-height: 0; }
  .cm-rail { width: auto; }
  .cm-rail-tab { display: none; }
  .cm-rail.is-closed .cm-rail-body { display: flex; }
  .cm-events-detail, .cm-team-cols, .cm-admin { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cm-stage { grid-template-columns: 1fr; grid-template-rows: none; }
  .cm-ann, .cm-events { grid-column: 1 / -1; }
  .cm-card.is-expanded { grid-row: auto; min-height: 0; }
  .cm-pulse-layout { grid-template-columns: 1fr; }
  .cm-topic { grid-template-columns: 1fr; }
  .cm-form-grid { grid-template-columns: 1fr 1fr; }
  .cm-feed-item a { grid-template-columns: auto minmax(0, 1fr); }
  .cm-feed-meta { grid-column: 2; }
}

/* Logged-out landing: centred column, split hero with an app preview, steps, features, closing call to action. */
/* ---------- Signed-out landing page (src/ui/landing.tsx, public/landing.js) ---------- */
.c-body:has(.c-lp) { padding: 0; }
.c-main:has(.c-lp) { padding: 0; }
.c-lp {
  --lp-glow: color-mix(in srgb, var(--c-accent) 34%, transparent);
  --lp-card: color-mix(in srgb, var(--c-surface) 78%, transparent);
  --lp-edge: color-mix(in srgb, var(--c-ink) 10%, transparent);
  position: relative; overflow: hidden; isolation: isolate;
}
:root:is([data-theme='light'], [data-theme='github-light'], [data-theme='solarized-light'], [data-theme='catppuccin-latte']) .c-lp {
  --lp-glow: color-mix(in srgb, var(--c-accent) 22%, transparent);
  --lp-card: color-mix(in srgb, var(--c-surface) 86%, transparent);
  --lp-edge: color-mix(in srgb, var(--c-ink) 9%, transparent);
}
.c-lp-in { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.c-lp h2 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 14px; }
.c-lp h3 { font-family: var(--font-display); letter-spacing: -.01em; }
.c-lp .lead { color: var(--c-ink-2); font-size: 17px; line-height: 1.6; max-width: 620px; margin: 0; }
.c-lp-name { color: var(--c-accent); font-weight: 700; }
.c-lp-accent { background: linear-gradient(100deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 55%, #3ddcff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-lp-head { margin-bottom: 40px; }

/* Aurora: three slow, blurred light blobs behind the hero, over a fading grid. */
.c-lp-aurora { position: absolute; inset: 0 0 auto 0; height: 980px; z-index: -1; pointer-events: none; overflow: hidden;
  background-image: linear-gradient(var(--lp-edge) 1px, transparent 1px), linear-gradient(90deg, var(--lp-edge) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 60% at 60% 30%, #000 20%, transparent 75%); }
.c-lp-aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: c-lp-drift 22s ease-in-out infinite alternate; }
.c-lp-aurora i:nth-child(1) { width: 560px; height: 560px; left: 52%; top: -120px; background: var(--c-accent); }
.c-lp-aurora i:nth-child(2) { width: 420px; height: 420px; left: 74%; top: 260px; background: #2fd3ff; opacity: .28; animation-duration: 28s; animation-delay: -6s; }
.c-lp-aurora i:nth-child(3) { width: 380px; height: 380px; left: 4%; top: 120px; background: #8a5cff; opacity: .22; animation-duration: 32s; animation-delay: -12s; }
@keyframes c-lp-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-60px, 40px, 0) scale(1.12); } 100% { transform: translate3d(40px, -30px, 0) scale(.94); } }

/* Hero */
.c-lp-hero { display: grid; grid-template-columns: 1fr 1.08fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 56px; min-height: calc(100dvh - 140px); }
.c-lp-hero h1 { font-family: var(--font-display); font-size: clamp(44px, 6vw, 80px); line-height: .98; letter-spacing: -.035em; margin: 6px 0 22px; }
.c-lp-hero h1 .u { position: relative; display: inline-block; color: var(--c-accent); }
.c-lp-hero h1 .u svg { position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .22em; overflow: visible; }
.c-lp-hero h1 .u path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; animation: c-lp-draw 1s .5s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes c-lp-draw { to { stroke-dashoffset: 0; } }
.c-lp-lede { font-size: 19px; line-height: 1.6; color: var(--c-ink-2); max-width: 540px; margin: 0 0 32px; }
.c-lp-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
/* What signing up leads to, under the hero's Sign up button (sites where people sign up on their own). */
.c-lp-next { margin: 14px 0 0; font-size: 14.5px; color: var(--c-ink-2); max-width: 540px; }
.c-lp-cta .c-btn { padding: 13px 24px; font-size: 15.5px; font-weight: 600; min-height: 48px; }
.c-lp-go { box-shadow: 0 10px 30px -8px var(--lp-glow), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .2s, box-shadow .2s; }
.c-lp-go svg, .c-lp-link svg { width: 18px; height: 18px; transition: transform .2s; }
.c-lp-go:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -8px var(--lp-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.c-lp-go:hover svg { transform: translateX(3px); }
.c-lp-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--c-ink); font-weight: 600; text-decoration: none; border-bottom: 0; }
.c-lp-link:hover { color: var(--c-accent); }
.c-lp-link:hover svg { transform: translateY(3px); }
.c-lp-trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; color: var(--c-ink-3); }
.c-lp-trust li { display: inline-flex; align-items: center; gap: 6px; }
.c-lp-trust svg { width: 16px; height: 16px; color: var(--c-ok); }

/* Hero stage: the logo, a real app in a browser window, floating chips and the robot presenting it. */
.c-lp-stage { --rx: 0deg; --ry: 0deg; position: relative; aspect-ratio: 1 / .86; perspective: 1400px; }
.c-lp-stage > * { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.c-lp-stage-mark { position: absolute; width: 74%; right: -8%; top: -10%; opacity: .22; color: var(--c-ink); filter: drop-shadow(0 0 40px var(--lp-glow)); }
.c-lp-window { position: absolute; left: 0; top: 11%; width: 84%; border-radius: 16px; overflow: hidden; background: var(--c-surface); border: 1px solid var(--lp-edge);
  box-shadow: 0 40px 90px -20px rgba(4, 8, 24, .55), 0 0 0 1px var(--lp-edge), 0 0 80px -10px var(--lp-glow);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-origin: 50% 50%;
  animation: c-lp-rise 1s .1s cubic-bezier(.2, .7, .2, 1) both; }
.c-lp-window img { display: block; width: 100%; height: auto; }
.c-lp-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--c-surface-2); border-bottom: 1px solid var(--lp-edge); }
.c-lp-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6159; }
.c-lp-bar i:nth-child(2) { background: #ffbd2e; }
.c-lp-bar i:nth-child(3) { background: #28c941; }
.c-lp-url { margin: 0 auto; padding: 3px 14px; border-radius: 999px; background: var(--c-bg); color: var(--c-ink-3); font: 500 11.5px var(--font-mono); }
.c-lp-hero-bot { position: absolute; right: -7%; bottom: -8%; width: 52%; height: auto; z-index: 3; filter: drop-shadow(0 24px 30px rgba(4, 8, 24, .45));
  transform: translate3d(calc(var(--ry) * -1.2), calc(var(--rx) * 1.2), 0); animation: c-lp-pop .9s .35s cubic-bezier(.2, 1.3, .4, 1) both; }
.c-lp-hero-bot { animation: c-lp-pop .9s .35s cubic-bezier(.2, 1.3, .4, 1) both, c-lp-bob 6s 1.3s ease-in-out infinite; }
.c-lp-chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--c-ink);
  background: color-mix(in srgb, var(--c-surface) 82%, transparent); border: 1px solid var(--lp-edge); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -10px rgba(4, 8, 24, .45); white-space: nowrap; animation: c-lp-float 7s ease-in-out infinite; }
.c-lp-chip svg { width: 16px; height: 16px; color: var(--c-accent); }
.c-lp-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-ok) 60%, transparent); animation: c-lp-ping 2s infinite; }
.c-lp-chip-1 { left: 62%; top: 6%; animation-delay: -1s; }
.c-lp-chip-2 { left: -5%; top: 62%; animation-delay: -3s; }
.c-lp-chip-3 { left: 14%; bottom: 3%; animation-delay: -5s; }
.c-lp-chip-3 svg { color: var(--c-ok); }
@keyframes c-lp-rise { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes c-lp-pop { from { opacity: 0; scale: .8; translate: 40px 20px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes c-lp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes c-lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes c-lp-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-ok) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* completa.studio's logo animation (public/logo-animation.js): a canvas card fades over the scene while it plays. */
.c-lp-anim { position: relative; min-width: 0; }
.c-lp-anim > .c-lp-stage { transition: opacity .65s, scale .65s; }
.c-lp-anim.is-playing > .c-lp-stage { opacity: 0; scale: .97; }
.c-lp-anim-stage { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; pointer-events: none;
  background: #f4f6fa; border: 1px solid var(--lp-edge); box-shadow: 0 40px 90px -20px rgba(4, 8, 24, .55), 0 0 80px -10px var(--lp-glow); opacity: 0; scale: .97; transition: opacity .65s, scale .65s; }
.c-lp-anim.is-playing .c-lp-anim-stage { opacity: 1; scale: 1; }
.c-lp-anim-stage canvas { display: block; width: 100%; height: 100%; }
.c-lp-replay { position: absolute; right: 0; bottom: -64px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--c-line);
  background: color-mix(in srgb, var(--c-surface) 80%, transparent); color: var(--c-ink-2); font: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(8px); }
.c-lp-replay:hover { color: var(--c-ink); }
.c-lp-replay svg { width: 16px; height: 16px; }
.c-lp-replay[hidden] { display: none; }
@media (max-width: 900px) { .c-lp-replay { position: static; margin: 20px 0 0 auto; display: flex; } .c-lp-replay[hidden] { display: none; } }

/* The logo drawn large: the C traces itself, then the slice drops in. */
.c-lp-bigmark { display: block; height: auto; overflow: visible; }
.c-lp-bigmark .c { stroke-dasharray: 100; stroke-dashoffset: 100; animation: c-lp-draw 1.6s .2s cubic-bezier(.65, 0, .35, 1) forwards; }
.c-lp-bigmark .s { opacity: 0; transform-box: fill-box; transform-origin: center; animation: c-lp-slice .7s 1.4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes c-lp-slice { from { opacity: 0; transform: translate(6px, -6px) scale(.7); } to { opacity: 1; transform: none; } }

/* AI marquee */
.c-lp-ai { padding: 28px 0 8px; text-align: center; }
.c-lp-ai-h { margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink-3); }
.c-lp-marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.c-lp-track { display: flex; flex: none; gap: 14px; padding-right: 14px; animation: c-lp-marquee 40s linear infinite; }
.c-lp-marquee:hover .c-lp-track { animation-play-state: paused; }
@keyframes c-lp-marquee { to { transform: translateX(-100%); } }
.c-lp-ai-chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--lp-card); border: 1px solid var(--lp-edge); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.c-lp-ai-ic { width: 22px; height: 22px; flex: none; }
.c-lp-ai-ic.mono { display: inline-block; background: var(--c-ink); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* Sections */
.c-lp-sec { padding-top: 112px; padding-bottom: 32px; }
.c-lp-glow { position: relative; isolation: isolate; }
.c-lp-glow::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--lp-glow), transparent 60%); }
.c-lp-glow:hover::before { opacity: 1; }

/* Steps */
.c-lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: none; }
.c-lp-step { border-radius: 22px; padding: 0 26px 28px; background: var(--lp-card); border: 1px solid var(--lp-edge); overflow: hidden; transition: transform .3s, border-color .3s; }
.c-lp-step:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); }
.c-lp-step-art { height: 230px; margin: 0 -26px 18px; display: grid; place-items: end center; padding-top: 20px;
  background: radial-gradient(60% 70% at 50% 85%, var(--lp-glow), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--c-accent) 7%, transparent), transparent); }
.c-lp-step-bot { width: auto; height: 210px; max-width: 90%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(4, 8, 24, .35)); transition: transform .5s cubic-bezier(.2, 1.3, .4, 1); }
.c-lp-step:hover .c-lp-step-bot { transform: translateY(-6px) rotate(-2deg) scale(1.03); }
.c-lp-step .n { font: 600 13px var(--font-mono); color: var(--c-accent); letter-spacing: .08em; }
.c-lp-step h3 { margin: 6px 0 8px; font-size: 22px; }
.c-lp-step p { margin: 0; color: var(--c-ink-2); font-size: 15px; line-height: 1.55; }

/* Your data, connected */
.c-lp-data { margin-top: 112px; padding: 96px 0; position: relative;
  background: radial-gradient(60% 80% at 80% 50%, color-mix(in srgb, var(--c-accent) 14%, transparent), transparent 70%), color-mix(in srgb, var(--c-accent) 6%, var(--c-bg));
  border-top: 1px solid var(--lp-edge); border-bottom: 1px solid var(--lp-edge); }
.c-lp-data-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.c-lp-data .c-lp-head { margin: 0; }
.c-lp-flow { position: relative; display: grid; grid-template-columns: 150px 1fr 190px; align-items: center; min-height: 300px; padding: 28px; border-radius: 22px; background: var(--lp-card); border: 1px solid var(--lp-edge); box-shadow: 0 30px 80px -30px rgba(4, 8, 24, .5); }
.c-lp-src { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(4, 1fr); height: 240px; align-items: center; }
.c-lp-src li { padding: 10px 14px; border-radius: 10px; background: var(--c-surface-2); border: 1px solid var(--lp-edge); font-weight: 600; font-size: 14px; }
.c-lp-wires { width: 100%; height: 240px; overflow: visible; }
.c-lp-wires path { fill: none; stroke: color-mix(in srgb, var(--c-accent) 70%, transparent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 5 7; animation: c-lp-flow 1.2s linear infinite; }
@keyframes c-lp-flow { to { stroke-dashoffset: -24; } }
.c-lp-hub { position: absolute; left: calc(28px + 150px + (100% - 56px - 340px) * .6); top: 50%; translate: -50% -50%; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--c-surface); border: 1px solid color-mix(in srgb, var(--c-accent) 50%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c-accent) 10%, transparent), 0 0 40px var(--lp-glow); color: var(--c-ink); }
.c-lp-hub-mark { width: 38px; height: 38px; }
.c-lp-appcard { padding: 16px; border-radius: 14px; background: var(--c-surface); border: 1px solid color-mix(in srgb, var(--c-accent) 35%, transparent); display: grid; gap: 8px; }
.c-lp-appcard-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-accent); font-size: 14px; }
.c-lp-appcard-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); }
.c-lp-appcard p { margin: 0 0 4px; font-size: 13px; color: var(--c-ink-2); }
.c-lp-appcard i { display: block; height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--c-accent) 55%, transparent); }
.c-lp-appcard i:nth-of-type(2) { background: color-mix(in srgb, var(--c-accent) 30%, transparent); }
.c-lp-appcard i:nth-of-type(3) { background: color-mix(in srgb, var(--c-accent) 18%, transparent); }
.c-lp-appcard small { margin-top: 4px; color: var(--c-ink-3); font-size: 12px; }

/* 80/20 */
.c-lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.c-lp-split-art { position: relative; }
.c-lp-split-art::before { content: ''; position: absolute; inset: 10% 5% 0; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--lp-glow), transparent); }
.c-lp-split-bot { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 30px rgba(4, 8, 24, .35)); }
.c-lp-cube { position: absolute; top: 72%; translate: -50% -50%; font: 800 clamp(30px, 4.4vw, 56px) / 1 var(--font-display); letter-spacing: -.04em; pointer-events: none; }
.c-lp-cube-80 { left: 17.5%; color: rgba(30, 36, 56, .62); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.c-lp-cube-20 { left: 82%; color: rgba(255, 255, 255, .9); text-shadow: 0 2px 8px rgba(10, 30, 120, .5); }
.c-lp-pair { display: grid; gap: 14px; margin-top: 28px; }
.c-lp-num { display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 18px; background: var(--lp-card); border: 1px solid var(--lp-edge); }
.c-lp-num > b { font: 800 56px / 1 var(--font-display); letter-spacing: -.05em; color: var(--c-ink-3); }
.c-lp-num-hi { border-color: color-mix(in srgb, var(--c-accent) 50%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 16%, var(--c-surface)), var(--lp-card)); }
.c-lp-num-hi > b { color: var(--c-accent); }
.c-lp-num h3 { margin: 0 0 4px; font-size: 17px; }
.c-lp-num p { margin: 0; color: var(--c-ink-2); font-size: 14.5px; line-height: 1.5; }

/* Control cards */
.c-lp-feat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.c-lp-card { padding: 26px 22px; border-radius: 20px; background: var(--lp-card); border: 1px solid var(--lp-edge); transition: transform .3s, border-color .3s; }
.c-lp-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); }
.c-lp-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; color: var(--c-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 26%, transparent), color-mix(in srgb, var(--c-accent) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent); }
.c-lp-card .ic svg { width: 22px; height: 22px; }
.c-lp-card h3 { margin: 0 0 6px; font-size: 17px; }
.c-lp-card p { margin: 0; color: var(--c-ink-2); font-size: 14.5px; line-height: 1.5; }

/* Closing band */
.c-lp-band { position: relative; margin: 140px 0 96px; padding: 56px 56px 56px 38%; min-height: 300px; border-radius: 28px; overflow: visible; isolation: isolate;
  background: radial-gradient(80% 120% at 0% 100%, color-mix(in srgb, var(--c-accent) 40%, transparent), transparent 60%), linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 22%, var(--c-surface)), var(--c-surface) 70%);
  border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent); box-shadow: 0 40px 100px -40px var(--lp-glow); display: flex; align-items: center; }
.c-lp-band-mark { position: absolute; right: -40px; top: 50%; translate: 0 -50%; width: 380px; opacity: .1; color: var(--c-ink); z-index: -1; }
.c-lp-band-bot { position: absolute; left: 3%; bottom: 0; height: 128%; width: auto; filter: drop-shadow(0 24px 30px rgba(4, 8, 24, .4)); transform-origin: 50% 100%; }
.c-lp-band.is-in .c-lp-band-bot, .c-lp:not(.c-lp-js) .c-lp-band-bot { animation: c-lp-wave 1.2s .3s ease-in-out; }
@keyframes c-lp-wave { 0%, 100% { rotate: 0deg; } 30% { rotate: -3deg; } 60% { rotate: 2deg; } }
.c-lp-band h2 { margin-bottom: 10px; }
.c-lp-band p { color: var(--c-ink-2); font-size: 17px; margin: 0 0 26px; }

/* Scroll reveal: only once landing.js has run (it skips this when motion is reduced). */
.c-lp-js [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), translate .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.c-lp-js [data-reveal].is-in { opacity: 1; translate: 0 0; }
.c-lp-js .c-lp-band:not(.is-in) .c-lp-bigmark .c, .c-lp-js .c-lp-band:not(.is-in) .c-lp-bigmark .s { animation-play-state: paused; }

/* Signed-out theme switch: show the sun in dark themes, the moon in light ones. */
.c-theme-toggle .c-theme-moon { display: none; }
:root:is([data-theme='light'], [data-theme='github-light'], [data-theme='solarized-light'], [data-theme='catppuccin-latte']) .c-theme-toggle .c-theme-sun { display: none; }
:root:is([data-theme='light'], [data-theme='github-light'], [data-theme='solarized-light'], [data-theme='catppuccin-latte']) .c-theme-toggle .c-theme-moon { display: block; }
.c-theme-toggle { width: 36px; height: 36px; border: 1px solid var(--c-line) !important; background: var(--c-surface) !important; transition: color .2s, transform .3s; }
.c-theme-toggle:hover { color: var(--c-ink); transform: rotate(-15deg); }
@media (max-width: 720px) { .c-theme-toggle { width: 44px; height: 44px; } }
/* Signed out on a phone: logo, language, theme and Sign in share one row. */
@media (max-width: 440px) {
  .c-top-in:has(.c-theme-toggle) { gap: 8px; padding-left: 12px; padding-right: 12px; flex-wrap: nowrap; }
  .c-top-in:has(.c-theme-toggle) .c-brand { font-size: 22px; }
  .c-top-in:has(.c-theme-toggle) .c-top-prefs { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .c-lp *, .c-lp *::before, .c-lp *::after { animation: none !important; transition: none !important; }
  .c-lp-hero h1 .u path, .c-lp-bigmark .c { stroke-dashoffset: 0; }
  .c-lp-bigmark .s { opacity: 1; }
}
:root[data-motion='reduce'] .c-lp-hero h1 .u path, :root[data-motion='reduce'] .c-lp-bigmark .c { stroke-dashoffset: 0; }
:root[data-motion='reduce'] .c-lp-bigmark .s { opacity: 1; }

@media (max-width: 1080px) {
  .c-lp-feat { grid-template-columns: repeat(2, 1fr); }
  .c-lp-data-in { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .c-lp-in { padding: 0 16px; }
  .c-lp-hero { grid-template-columns: 1fr; padding-top: 36px; gap: 28px; min-height: 0; }
  .c-lp-lede { font-size: 17px; }
  .c-lp-stage { margin: 0 4px 0 0; }
  .c-lp-chip-2 { left: 0; }
  .c-lp-steps { grid-template-columns: 1fr; }
  .c-lp-split { grid-template-columns: 1fr; gap: 24px; }
  .c-lp-split-art { max-width: 460px; margin: 0 auto; }
  .c-lp-sec { padding-top: 80px; }
  .c-lp-data { margin-top: 80px; padding: 64px 0; }
  .c-lp-band { margin: 120px 0 56px; padding: 150px 24px 32px; text-align: center; display: block; }
  .c-lp-band .c-lp-cta { justify-content: center; }
  .c-lp-band-bot { left: 50%; translate: -50% 0; bottom: auto; top: -100px; height: 230px; }
  .c-lp-band-mark { width: 260px; right: -60px; top: 70%; }
}
@media (max-width: 560px) {
  .c-lp-hero h1 { font-size: clamp(40px, 12vw, 52px); }
  .c-lp-cta .c-btn { flex: 1 1 auto; justify-content: center; }
  .c-lp-stage { aspect-ratio: 1 / 1; }
  .c-lp-window { width: 92%; top: 14%; }
  .c-lp-hero-bot { width: 50%; right: -4%; bottom: -2%; }
  .c-lp-chip { font-size: 12px; padding: 7px 11px; }
  .c-lp-chip-1 { left: auto; right: 2%; top: 2%; }
  .c-lp-chip-2 { display: none; }
  .c-lp-chip-3 { left: 2%; bottom: 6%; }
  .c-lp-feat { grid-template-columns: 1fr; }
  .c-lp-flow { grid-template-columns: 1fr; gap: 16px; padding: 20px; min-height: 0; }
  .c-lp-src { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 10px; height: auto; }
  .c-lp-src li { text-align: center; }
  .c-lp-wires { display: none; }
  .c-lp-hub { position: static; translate: none; margin: 4px auto; }
  .c-lp-num { grid-template-columns: 70px 1fr; padding: 16px; gap: 12px; }
  .c-lp-num > b { font-size: 42px; }
  .c-lp-step-art { height: 200px; }
  .c-lp-step-bot { height: 180px; }
}

/* Profile picture picker: one tile per source, with a small preview. */
.c-photo-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c-photo-opt { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface-2); cursor: pointer; min-width: 0; }
.c-photo-opt:has(input[name='source']:checked) { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.c-photo-opt > input[name='source'] { position: absolute; opacity: 0; pointer-events: none; }
.c-photo-prev { flex: none; width: 40px; height: 40px; }
.c-photo-prev img, .c-photo-ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.c-photo-prev .c-profile-initials { font-size: 14px; }
.c-photo-ph { background: var(--c-surface); color: var(--c-ink-3); font-size: 18px; }
.c-photo-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.c-photo-txt small { color: var(--c-ink-3); font-size: 12px; }
.c-photo-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.c-photo-swatch { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.c-photo-swatch:has(input:checked) { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.c-photo-swatch input { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .c-photo-opts { grid-template-columns: 1fr; } }
/* Initials on the color the user picked (the swatches are mid-tones, so dark text reads on all of them). */
.c-avatar-fill { background: var(--av) !important; color: #0e1220 !important; }

/* My Apps polish: collapsible spaces, quiet sidebar scroll, Published/Trash as one pill, roomier card footer. */
.c-space-toggle { flex: none; width: 20px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink-3); cursor: pointer; }
.c-space-toggle:hover { color: var(--c-ink); background: var(--c-surface-2); }
.c-space-toggle svg { transition: transform .15s; transform: rotate(90deg); }
.c-space[aria-expanded='false'] > .c-space-row .c-space-toggle svg { transform: rotate(0deg); }
.c-space[aria-expanded='false'] > ul { display: none; }
.c-space-toggle.is-leaf { cursor: default; }
.c-space-toggle.is-leaf:hover { background: transparent; }
.c-apps-side { scrollbar-width: none; }
.c-apps-side::-webkit-scrollbar { display: none; }
.c-apps-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface-2); }
.c-apps-tabs a { padding: 5px 16px; border-radius: 999px; color: var(--c-ink-2); font-weight: 600; transition: background .15s, color .15s; }
.c-apps-release { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface-2); }
.c-apps-release a { padding: 5px 14px; border-radius: 999px; color: var(--c-ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.c-apps-release a:hover { color: var(--c-ink); }
.c-apps-release a[aria-current='true'] { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.c-apps-tabs a:hover { color: var(--c-ink); }
.c-apps-tabs a[aria-current='page'] { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--c-line); }
.c-apps-card .c-apps-copy { opacity: 1; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'by preview' 'when preview'; align-items: center; column-gap: 10px; row-gap: 1px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-by { grid-area: by; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-author { color: var(--c-ink-2); font-weight: 500; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-when { grid-area: when; padding-left: 27px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-preview { grid-area: preview; margin-left: 0; }

/* Profile > Preferences: one small preview tile per color theme. The tile paints the theme's own bg and accent. */
.c-theme-group { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; margin-top: 10px; }
.c-theme-mode { padding-top: 8px; font-size: 12px; font-weight: 600; color: var(--c-ink-3); }
.c-theme-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.c-theme-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; }
.c-theme-tile:hover { border-color: var(--c-ink-3); }
.c-theme-tile:has(input:checked) { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.c-theme-tile:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-theme-tile input { position: absolute; opacity: 0; pointer-events: none; }
.c-theme-prev { display: grid; grid-template-columns: 18px 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 52px; padding: 6px; border-radius: 7px; background: var(--tb); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .25); }
.c-theme-prev i { border-radius: 3px; background: color-mix(in srgb, var(--ta) 22%, var(--tb)); }
.c-theme-prev i:first-child { grid-row: 1 / 3; background: color-mix(in srgb, var(--ta) 12%, var(--tb)); }
.c-theme-prev i:last-child { width: 55%; background: var(--ta); }
.c-theme-name { font-size: 12.5px; font-weight: 600; color: var(--c-ink-2); padding: 0 2px; }
@media (max-width: 560px) { .c-theme-group { grid-template-columns: 1fr; gap: 6px; } }

/* Site-wide dropdown (app.js turns every .c-select into this). Filled trigger, chevron that turns, a menu that drops
   in under the field with the current choice ticked. The native select stays underneath for forms and validation. */
.c-goo.is-field { display: inline-flex; width: auto; min-width: 180px; max-width: 100%; }
.c-field .c-goo.is-field, .c-profile-form .c-goo.is-field, .c-apps-fields .c-goo.is-field, td .c-goo.is-field { display: flex; width: 100%; min-width: 0; }
.is-field .c-goo-btn { width: 100%; max-width: none; height: 40px; padding: 0 12px 0 14px; justify-content: space-between; gap: 10px; border: 1px solid transparent; border-radius: var(--radius); background: var(--c-surface-2); color: var(--c-ink); font: 500 14px var(--font-body); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.is-field .c-goo-btn:hover { border-color: var(--c-line); background: color-mix(in srgb, var(--c-surface-2) 80%, var(--c-ink) 6%); }
.is-field.is-open .c-goo-btn { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 22%, transparent); }
.is-field .c-goo-btn:disabled { opacity: .55; cursor: not-allowed; }
.is-field .c-goo-label { flex: 1; text-align: left; }
.is-field .c-goo-chev { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--c-ink-2); transform: rotate(-90deg); transition: transform .2s ease, color .15s; }
.is-field.is-open .c-goo-chev { transform: rotate(0deg); color: var(--c-accent); }
.is-field .c-goo-menu { z-index: 60; min-width: 0; right: auto; padding: 6px; border-radius: 12px; animation: c-goo-drop .18s ease-out; transform-origin: top center; }
.is-field.is-up .c-goo-menu { transform-origin: bottom center; animation-name: c-goo-rise; }
@keyframes c-goo-drop { from { opacity: 0; transform: translateY(-8px) scaleY(.96); } }
@keyframes c-goo-rise { from { opacity: 0; transform: translateY(8px) scaleY(.96); } }
.is-field .c-goo-item { padding: 8px 10px; font-size: 14px; border-radius: 8px; transition: background .12s; }
.is-field .c-goo-item[aria-selected='true'] { background: color-mix(in srgb, var(--c-accent) 12%, transparent); }
.is-field .c-goo-group:first-child, .c-goo-search + .c-goo-group { margin-top: 0; border-top: 0; }
.c-goo-search { position: sticky; top: -6px; z-index: 1; width: 100%; margin: -6px 0 4px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--c-line); border-radius: 12px 12px 0 0; background: var(--c-surface); color: var(--c-ink); font: 500 13px var(--font-body); outline: none; }
/* Phones: 16px text in the search box, or iOS zooms the page when it is tapped. */
@media (max-width: 720px) { .c-goo-search { font-size: 16px; } }
.c-goo-item[hidden], .c-goo-group[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .is-field .c-goo-menu { animation: none; } .is-field .c-goo-chev { transition: none; } }

/* Toggle switches for the profile's on/off settings. */
.c-profile-check { grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.c-profile-check:last-of-type { border-bottom: 0; }
.c-profile-check > span { order: -1; }
.c-profile-check input[type='checkbox'] { appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--c-surface-2); box-shadow: inset 0 0 0 1px var(--c-line); cursor: pointer; transition: background .2s; }
.c-profile-check input[type='checkbox']::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-ink-3); transition: transform .2s ease, background .2s; }
.c-profile-check input[type='checkbox']:checked { background: var(--c-accent); box-shadow: none; }
.c-profile-check input[type='checkbox']:checked::after { transform: translateX(16px); background: var(--c-accent-ink); }
.c-profile-check input[type='checkbox']:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }


/* App detail page */
.c-ad-crumb { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-size: 13px; color: var(--c-ink-3); }
.c-ad-crumb a { color: var(--c-ink-2); }
.c-ad-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start; margin-bottom: 20px; padding: 24px; }
.c-ad-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: var(--c-accent-soft); color: var(--c-accent); font: 800 22px/1 var(--font-display, inherit); }
.c-ad-icon img { width: 100%; height: 100%; object-fit: cover; }
.c-ad-titleline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.c-ad-titleline h1 { margin: 0; font-size: 28px; line-height: 1.15; }
.c-ad-team { margin: 4px 0 0; color: var(--c-ink-3); font-size: 13px; }
.c-ad-desc { margin: 10px 0 0; max-width: 62ch; color: var(--c-ink-2); }
.c-ad-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.c-ad-fav.is-on { color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 40%, var(--c-line)); }
.c-ad-more summary { list-style: none; cursor: pointer; }
.c-ad-more summary::-webkit-details-marker { display: none; }
.c-ad-more .c-store-pop { top: 44px; min-width: 210px; }
.c-store-pop .is-danger { color: var(--c-danger); }
.c-ad-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.c-ad-main, .c-ad-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.c-ad-section h2 { margin: 0 0 6px; font-size: 18px; }
.c-ad-section h3 { margin: 18px 0 6px; font-size: 14px; }
.c-ad-section > .c-help { margin: 0 0 14px; }
.c-ad-form { max-width: 560px; }
.c-ad-form textarea { resize: vertical; min-height: 72px; }
.c-ad-access { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius); background: var(--c-surface-2); }
.c-ad-access .c-help { margin: 4px 0 0; }
.c-ad-roles { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.c-ad-role { padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); }
.c-ad-role-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.c-ad-role-head h3 { margin: 0; }
.c-ad-role-head .c-btn { margin-left: auto; }
.c-ad-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.c-ad-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 999px; background: var(--c-surface-2); font-size: 13px; }
.c-ad-x { border: 0; background: none; padding: 0 4px; color: var(--c-ink-3); font-size: 15px; line-height: 1; cursor: pointer; border-radius: 999px; }
.c-ad-x:hover, .c-ad-x:focus-visible { color: var(--c-danger); }
.c-ad-x:disabled { cursor: not-allowed; opacity: 0.4; color: var(--c-ink-3); }
.c-ad-src { padding: 0 6px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 11px; }
.c-ad-follows { list-style: none; margin: 4px 0 10px; padding: 0; }
.c-ad-follows li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 4px 0; font-size: 14px; overflow-wrap: anywhere; }
.c-ad-follows li > span { flex: 1 1 200px; }
.c-ad-inline + .c-ad-inline { margin-top: 8px; }
.c-ad-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.c-ad-inline .c-input, .c-ad-inline .c-select { width: auto; flex: 0 1 260px; min-width: 0; }
.c-btn.ghost { border-color: transparent; background: transparent; color: var(--c-ink-3); }
.c-btn.ghost:hover { color: var(--c-danger); }
.c-ad-adv { margin-top: 16px; }
.c-ad-adv > summary { cursor: pointer; color: var(--c-ink-2); font-weight: 600; font-size: 14px; }
.c-ad-adv.is-top { margin: 0; }
.c-ad-adv.is-top > summary { display: flex; align-items: baseline; gap: 12px; list-style: none; color: var(--c-ink); }
.c-ad-adv.is-top > summary::-webkit-details-marker { display: none; }
.c-ad-adv.is-top > summary h2 { margin: 0; }
.c-ad-adv.is-top > summary::after { content: '▾'; margin-left: auto; color: var(--c-ink-3); }
.c-ad-adv.is-top[open] > summary::after { content: '▴'; }
.c-ad-adv-head { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.c-ad-plain { list-style: none; margin: 8px 0; padding: 0; }
.c-ad-plain li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.c-ad-plain li:last-child { border-bottom: 0; }
/* Requests (access-requests.ts): one block per person asking; the role picker and buttons wrap on a phone. */
.c-ad-requests { margin: 12px 0; }
.c-ad-requests h3 { margin: 0 0 4px; }
.c-ad-plain li.c-ad-request { display: grid; gap: 6px; justify-content: stretch; }
.c-ad-request .c-ad-person { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.c-ad-note { margin: 0; padding: 6px 10px; border-left: 3px solid var(--c-line); white-space: pre-wrap; overflow-wrap: anywhere; }
.c-help.is-warn { color: var(--c-danger, #b42318); font-weight: 600; }
.c-pa-embed { margin-top: 16px; align-self: stretch; width: 100%; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.c-pa-embed .c-ad-section, .c-pa-embed .c-ad-roles, .c-pa-embed .c-ad-role, .c-pa-embed .c-ad-access > div, .c-pa-embed .c-ad-request { min-width: 0; max-width: 100%; }
.c-pa-embed .c-ad-inline .c-input, .c-pa-embed .c-ad-inline .c-select { flex: 1 1 140px; max-width: 100%; }
/* The app panel is a .c-panel, whose form rule stacks a dialog's form in a column; the editor's forms are rows. */
.c-panel .c-pa-embed form { flex-direction: row; flex-wrap: wrap; align-items: center; max-height: none; min-height: 0; }
/* Inside the panel the editor is not a card of its own: the tab is the frame, so no box in a box and no repeated title. */
.c-pa-embed { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-pa-embed .c-ad-section { border: 0; background: none; box-shadow: none; padding: 0; margin: 0; }
.c-pa-embed .c-ad-section > h2 { display: none; }
.c-pa-embed .c-ad-requests { padding: 12px 0 4px; border-bottom: 1px solid var(--c-line); margin: 14px 0; }
.c-pa-embed .c-ad-roles { padding: 0; margin: 0 0 12px; display: grid; gap: 12px; list-style: none; }
.c-pa-embed .c-ad-role { padding: 14px 16px; }
.c-pa-embed .c-ad-access .c-btn { flex: none; }
.c-apps-request { white-space: nowrap; }

/* ---- Who can open an app (access-console.tsx): Tom's Console look (console.css) inside the app panel and its window ---- */
.c-pa-embed { border-top: 0; padding-top: 0; margin-top: 4px; }
.cx-access { display: grid; gap: 16px; min-width: 0; max-width: 100%; color: var(--c-ink); }
.c-panel .cx-access form { flex-direction: row; flex-wrap: wrap; align-items: center; max-height: none; min-height: 0; }
.cx-access .cx-card-title { font-size: 17px; }
.cx-access .cx-card-body { padding: 14px 16px 16px; }
.cx-acc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cx-acc-choice { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--cx-line-2); border-radius: 8px; }
.cx-acc-choice.is-on { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 7%, transparent); }
.cx-acc-choice h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.cx-acc-choice p { margin: 0; color: var(--c-ink-2); font-size: 12.5px; line-height: 1.5; }
.cx-acc-choice form, .cx-acc-choice > .cx-btn { margin-top: auto; align-self: flex-start; }
.cx-acc-choice form { display: flex; gap: 8px; }
.cx-acc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cx-acc-roles, .cx-acc-reqs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.cx-acc-role, .cx-acc-req { display: grid; gap: 10px; min-width: 0; padding: 14px 16px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--c-surface); }
.cx-acc-role-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-acc-role-head h3 { margin: 0; font-size: 15px; }
.cx-acc-people { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-acc-person { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 6px 3px 3px; border: 1px solid var(--cx-line-2); border-radius: var(--cx-r); }
.cx-acc-person .cx-av { width: 22px; height: 22px; font-size: 9.5px; }
.cx-acc-person .cx-pri { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.cx-acc-person .cx-tag { margin: 0; height: 18px; }
.cx-acc-x { width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--cx-r); background: transparent; color: var(--c-ink-3); font-size: 16px; line-height: 1; cursor: pointer; }
.cx-acc-x:hover:not(:disabled) { background: var(--cx-row-hover); color: var(--c-danger); }
.cx-acc-x:disabled { opacity: .35; cursor: not-allowed; }
/* "Open as" on a person (apps/act-as.ts): greyed with aria-disabled so its reason still shows on hover and tap. */
.cx-acc-act { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--cx-line-2); border-radius: var(--cx-r); background: transparent; color: var(--c-ink-2); font: inherit; font-size: 11.5px; white-space: nowrap; cursor: pointer; }
.cx-acc-act:hover:not([aria-disabled="true"]) { background: var(--cx-row-hover); color: var(--c-ink); }
.cx-acc-act[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.cx-acc-act[aria-busy="true"] { opacity: .6; cursor: progress; }
@media (max-width: 720px) { .cx-acc-act { min-height: 40px; padding: 0 10px; } }
.cx-acc-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.cx-acc-add .cx-select, .cx-acc-add .cx-input { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.cx-acc-newrole { padding: 14px 16px; border: 1px dashed var(--cx-line-2); border-radius: 8px; }
.cx-acc-more { border-top: 1px solid var(--cx-line); padding-top: 8px; }
.cx-acc-more > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--c-ink-2); font-size: 12.5px; font-weight: 600; list-style: none; }
.cx-acc-more > summary::-webkit-details-marker { display: none; }
.cx-acc-more > summary svg { transition: transform .15s; }
.cx-acc-more[open] > summary svg { transform: rotate(90deg); }
.cx-acc-more-body { display: grid; gap: 10px; padding: 10px 0 2px; min-width: 0; }
.cx-acc-line { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; font-size: 13px; color: var(--c-ink-2); }
.cx-acc-line-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cx-acc-adv { border: 1px solid var(--cx-line); border-radius: 8px; padding: 12px 16px; background: var(--c-surface); }
.cx-acc-when { margin-left: auto; text-align: right; }
.cx-acc-note { margin: 0; padding: 6px 10px; border-left: 3px solid var(--cx-line-2); color: var(--c-ink-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-acc-req .cx-who { flex-wrap: wrap; }
.cx-access .cx-empty { border: 1px dashed var(--cx-line-2); border-radius: 8px; }
@media (max-width: 640px) {
  .cx-acc-choices { grid-template-columns: minmax(0, 1fr); }
  .cx-acc-when { margin-left: 0; text-align: left; flex-basis: 100%; }
  .cx-acc-add .cx-select, .cx-acc-add .cx-input { flex-basis: 100%; }
  .cx-acc-add .cx-btn { flex: 1 1 auto; height: 38px; }
  .cx-acc-choice form .cx-select { flex-basis: 100%; }
}
.c-ad-notes { white-space: pre-wrap; color: var(--c-ink-2); }
.c-ad-blocks { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.c-ad-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 14px; font-size: 14px; }
.c-ad-facts dt { color: var(--c-ink-3); }
.c-ad-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.c-ad-facts dd .c-btn { margin-top: 6px; }
.c-ad-copy { width: 100%; justify-content: center; }
.c-ad-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.c-ad-tags .c-tag { display: inline-flex; align-items: center; gap: 2px; }
.c-ad-tagform { display: flex; gap: 8px; }
.c-ad-tagform .c-input { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .c-ad-grid { grid-template-columns: 1fr; }
  .c-ad-hero { grid-template-columns: auto 1fr; }
  .c-ad-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .c-ad-hero { padding: 18px; gap: 14px; }
  .c-ad-icon { width: 48px; height: 48px; border-radius: 12px; font-size: 17px; }
  .c-ad-titleline h1 { font-size: 22px; }
  .c-ad-access { flex-direction: column; align-items: flex-start; }
}
.c-ad-role form, .c-ad-section form { margin-bottom: 0; }
/* My Apps multi-select */
/* Checkboxes show on card hover/focus and stay visible for every card once one is ticked (rules above set opacity). */
.c-apps-select { display: block !important; }
.c-apps-card.is-selected { outline: 2px solid var(--c-accent); outline-offset: -1px; background: color-mix(in srgb, var(--c-accent) 6%, var(--c-surface)); }
.c-apps-card:focus-within .c-apps-select { opacity: 1; }
.c-apps-bulk { flex-wrap: wrap; gap: 8px; box-shadow: 0 6px 18px color-mix(in srgb, var(--c-ink) 12%, transparent); }
.c-apps-bulk-count { font-weight: 600; margin-right: 4px; }
.c-apps-bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.c-apps-bulk button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .c-apps-bulk-actions { margin-left: 0; width: 100%; } }
/* Utilities replacing inline styles */
/* Single-purpose helpers; !important mirrors the precedence the old inline styles had. */
.u-mt-6 { margin-top:6px !important; }
.u-mt-12 { margin-top:12px !important; }
.u-mt-16 { margin-top:16px !important; }
.u-mt-20 { margin-top:20px !important; }
.u-mt-28 { margin-top:28px !important; }
.u-mt-0 { margin-top:0 !important; }
.u-mb-8 { margin-bottom:8px !important; }
.u-mb-10 { margin-bottom:10px !important; }
.u-mb-12 { margin-bottom:12px !important; }
.u-mb-20 { margin-bottom:20px !important; }
.u-ml-6 { margin-left:6px !important; }
.u-ml-8 { margin-left:8px !important; }
.u-maxw-160 { max-width:160px !important; }
.u-maxw-140 { max-width: 140px !important; }
.u-maxw-180 { max-width: 180px !important; }
.u-maxw-200 { max-width: 200px !important; }
.u-maxw-560 { max-width: 560px !important; }
.u-self-center { align-self: center !important; }
.u-maxw-240 { max-width:240px !important; }
.u-maxw-260 { max-width:260px !important; }
.u-maxw-320 { max-width:320px !important; }
.u-w-90 { width:90px !important; }
.u-w-120 { width:120px !important; }
.u-w-140 { width:140px !important; }
.u-w-150 { width:150px !important; }
.u-w-160 { width:160px !important; }
.u-w-180 { width:180px !important; }
.u-m-0 { margin:0 !important; }
.u-p-0 { padding:0 !important; }
.u-m-0-0-8 { margin:0 0 8px !important; }
.u-m-0-0-12 { margin:0 0 12px !important; }
.u-my-8 { margin:8px 0 !important; }
.u-p-8-12 { padding:8px 12px !important; }
.u-p-12 { padding:12px !important; }
.u-p-10-12 { padding:10px 12px !important; }
.u-w-auto { width:auto !important; }
.u-flex { display:flex !important; }
.u-block { display:block !important; }
.u-gap-2 { gap:2px !important; }
.u-gap-4 { gap:4px !important; }
.u-gap-6 { gap:6px !important; }
.u-gap-8 { gap:8px !important; }
.u-items-center { align-items:center !important; }
.u-items-end { align-items:flex-end !important; }
.u-justify-between { justify-content:space-between !important; }
.u-justify-end { justify-content:flex-end !important; }
.u-flex-1 { flex:1 !important; }
.u-minw-160 { min-width:160px !important; }
.u-minw-180 { min-width:180px !important; }
.u-minw-220 { min-width:220px !important; }
.u-span-all { grid-column:1 / -1 !important; }
.u-nowrap { white-space:nowrap !important; }
.u-pre-wrap { white-space:pre-wrap !important; }
.u-pre-line { white-space:pre-line !important; }
.u-text-sm { font-size:12px !important; }
.u-text-xs { font-size:11px !important; }
.u-text-22 { font-size:22px !important; }
.u-bold { font-weight:600 !important; }
.u-uppercase { text-transform:uppercase !important; }
.u-overflow-auto { overflow:auto !important; }
.u-maxh-320 { max-height:320px !important; }
.u-maxh-360 { max-height:360px !important; }
.u-h-120 { height:120px !important; }
.u-boxed { border:1px solid var(--c-line) !important; }
.u-radius-8 { border-radius:8px !important; }
.u-radius-12 { border-radius:12px !important; }
.u-border-top { border-top:1px solid var(--c-line) !important; }
.u-py-8 { padding:8px 0 !important; }
.u-ink-3 { color:var(--c-ink-3) !important; }
.u-my-6 { margin-top:6px !important; margin-bottom:6px !important; }
.u-my-12 { margin-top:12px !important; margin-bottom:12px !important; }
.u-mt-14 { margin-top:14px !important; }
.u-mr-12 { margin-right:12px !important; }
.u-pl-18 { padding-left:18px !important; }
.u-relative { position:relative !important; }
.u-popover { position:absolute !important; z-index:2; margin:0 !important; padding:8px !important; }
.c-card.is-focus { border-color: var(--c-accent); }
.c-bar { flex: 1; background: var(--c-accent); }

/* Side window (data-panel) */
.c-panel { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-bg); color: var(--c-ink); box-shadow: var(--shadow); overflow: hidden; }
.c-panel[open] { display: flex; flex-direction: column; }
.c-panel::backdrop { background: rgba(8, 10, 18, .6); }
.c-panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--c-line); background: var(--c-surface); }
.c-panel-head h2 { margin: 0; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-panel-x { border: 0; background: none; color: var(--c-ink-2); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 999px; }
.c-panel-x:hover, .c-panel-x:focus-visible { background: var(--c-surface-2); color: var(--c-ink); }
.c-panel-in { overflow-y: auto; padding: 16px; }
.c-panel-in[aria-busy="true"] { opacity: .6; }
.c-panel-body .c-ad-section { box-shadow: none; }
.c-panel-body .c-ad-section > h2 { display: none; }
.c-panel-foot { margin: 12px 4px 0; font-size: 13px; }
@media (max-width: 520px) { .c-panel { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; } }

/* Algorithm forms (public/forge-forms.js) */
.c-req, .c-opt { margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.c-req { color: var(--c-warn); }
.c-opt { color: var(--c-ink-3); font-weight: 500; }
.c-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--c-ink-2); font-weight: 500; }
.c-field-err { margin: 4px 0 0; color: var(--c-danger); font-size: 13px; }
.is-invalid, .c-input.is-invalid, .c-select.is-invalid, .c-textarea.is-invalid { border-color: var(--c-danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-danger) 18%, transparent); }
.c-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.c-form-grid .c-span, .c-span { grid-column: 1 / -1; }
.c-field-check { justify-content: flex-end; }
.c-check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--c-ink-2); cursor: pointer; }
.c-check input { margin-top: 3px; }
.c-narrow { max-width: 120px; }
.c-inline-pair { display: flex; gap: 8px; }
.c-inline-pair .c-input { flex: 1; min-width: 0; }
.c-inline-pair .c-select { width: auto; }
.c-more { margin: 10px 0; }
.c-more > summary { cursor: pointer; color: var(--c-ink-2); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
/* Key/value editor */
.c-kv-rows { display: flex; flex-direction: column; gap: 6px; }
.c-kv-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 6px; align-items: center; }
.c-kv-x { border: 0; background: none; color: var(--c-ink-3); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.c-kv-x:hover, .c-kv-x:focus-visible { color: var(--c-danger); background: var(--c-surface-2); }
.c-kv-bar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.c-kv-mode { margin-left: auto; border: 0; background: none; color: var(--c-accent); font: inherit; font-size: 13px; cursor: pointer; }
.c-kv-json { display: none; width: 100%; }
.c-kv.is-json .c-kv-json { display: block; }
.c-kv.is-json .c-kv-rows, .c-kv.is-json [data-kv-add] { display: none; }
.c-kv.is-json .c-kv-bar { margin: 0 0 8px; }
/* Choice cards and segmented control */
.c-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
.c-choice { position: relative; display: block; cursor: pointer; }
.c-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.c-choice span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); transition: border-color .12s, background .12s; }
.c-choice strong { font-size: 14px; }
.c-choice small { color: var(--c-ink-3); font-size: 12.5px; }
.c-choice input:checked + span { border-color: var(--c-accent); background: var(--c-accent-soft); }
.c-choice input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--c-surface-2); }
.c-seg label { position: relative; padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--c-ink-2); cursor: pointer; white-space: nowrap; }
.c-seg a { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--c-ink-2); white-space: nowrap; }
.c-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.c-seg label:has(input:checked), .c-seg a[aria-current='page'] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.c-seg label:has(input:focus-visible), .c-seg a:focus-visible { outline: 2px solid var(--c-accent); }
.c-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.c-switch input { appearance: none; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-line); position: relative; cursor: pointer; transition: background .15s; }
.c-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-ink-3); transition: transform .15s, background .15s; }
.c-switch input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.c-switch input:checked::after { transform: translateX(16px); background: var(--c-accent-ink); }
.c-switch input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-days { display: flex; flex-wrap: wrap; gap: 6px; }
.c-days label { position: relative; }
.c-days input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.c-days span { display: inline-grid; place-items: center; min-width: 46px; padding: 7px 10px; border: 1px solid var(--c-line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.c-days input:checked + span { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent); }
.c-days input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* Schedule editor */
.c-sched { margin-bottom: 20px; padding: 0; overflow: hidden; }
.c-sched-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--c-line); }
.c-sched-head h2 { margin: 0; font-size: 19px; }
.c-sched-sec { margin: 0; padding: 18px 22px; border: 0; border-bottom: 1px solid var(--c-line); min-width: 0; }
.c-sched-sec > legend { float: left; width: 100%; margin-bottom: 12px; padding: 0; font: 700 15px/1.3 inherit; }
.c-sched-sec > legend + * { clear: both; }
.c-sched-preview { margin: 4px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--c-surface-2); color: var(--c-ink-2); font-size: 14px; }
.c-sched-preview:empty { display: none; }
.c-steps { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.c-step { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.c-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--c-line); }
.c-step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); font-size: 12px; font-weight: 700; }
.c-step-tools { display: flex; gap: 2px; margin-left: auto; }
.c-icon-btn:disabled { opacity: .35; cursor: default; }
.c-icon-btn.is-danger:hover { color: var(--c-danger); }
.c-step-body { padding: 14px 14px 4px; }
.c-sched-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--c-surface); border-top: 1px solid var(--c-line); }
.c-sched-bar .c-field-err { margin: 0 auto 0 0; }
/* Run window and import */
.c-panel form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 48px); }
/* The small forms inside the Access editor (add role, add a person, use a list, give access) are rows, not a window's form column. */
.c-panel .c-ad-section form, .c-panel .c-ad-inline { flex-direction: row; flex-wrap: wrap; max-height: none; }
.c-panel .c-ad-inline .c-input, .c-panel .c-ad-inline .c-select { height: auto; }
.c-panel-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--c-line); background: var(--c-surface); }
.c-import { margin-bottom: 20px; }
.c-import h2 { margin: 0 0 4px; font-size: 18px; }
.c-import-result { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--c-surface-2); }
.c-import-result p { margin: 0; }
.c-import-errs { margin: 8px 0 0; padding-left: 18px; color: var(--c-danger); font-size: 13px; }
@media (max-width: 520px) {
  .c-sched-head, .c-sched-sec, .c-sched-bar { padding-left: 16px; padding-right: 16px; }
  .c-kv-row { grid-template-columns: 1fr auto; }
  .c-kv-row .c-kv-v { grid-column: 1; }
  .c-kv-row .c-kv-x { grid-row: 1 / span 2; grid-column: 2; }
  .c-step-head .c-seg { order: 3; width: 100%; }
}
.c-banner[hidden], .c-field[hidden], .c-field-err[hidden], [data-freq][hidden], [data-for][hidden] { display: none !important; }

/* Settings → People */
.c-ppl { display: grid; gap: 16px; }
.c-ppl-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.c-ppl-search { flex: 1 1 220px; max-width: 340px; width: auto; }
.c-ppl-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.c-ppl-chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-ink-2); cursor: pointer; }
.c-ppl-chip:hover { color: var(--c-ink); border-color: var(--c-ink-3); }
.c-ppl-chip.is-on { background: var(--c-accent-soft); border-color: var(--c-accent); color: var(--c-accent); }
.c-ppl-n { opacity: .75; font-variant-numeric: tabular-nums; margin-left: 2px; }
.c-ppl-add h2 { margin-bottom: 12px; }
.c-ppl-add-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr); gap: 12px; align-items: start; }
.c-ppl-add-go { grid-column: 1 / -1; display: flex; gap: 8px; }
.c-ppl-list { padding: 4px 8px; }
.c-ppl-table td { vertical-align: middle; }
.c-ppl-row { cursor: pointer; }
.c-ppl-row:hover td, .c-ppl-row.is-sel td { background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.c-ppl-row:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-ppl-row[hidden] { display: none; }
.c-ppl-who { display: flex; gap: 10px; align-items: center; }
.c-ppl-name { font-weight: 500; }
.c-ppl-none { padding: 24px; text-align: center; color: var(--c-ink-3); margin: 0; }
.c-ppl-none[hidden] { display: none; }
.c-ppl-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--font-display); background: color-mix(in srgb, var(--t, var(--c-accent)) 22%, var(--c-surface)); color: var(--t, var(--c-accent)); }
.c-ppl-av-lg { width: 48px; height: 48px; font-size: 15px; }
.c-ppl-av-0 { --t: var(--c-accent); } .c-ppl-av-1 { --t: var(--c-warn); } .c-ppl-av-2 { --t: var(--c-ok); }
.c-ppl-av-3 { --t: var(--c-danger); } .c-ppl-av-4 { --t: var(--c-info); } .c-ppl-av-5 { --t: var(--c-ink-2); }
.c-ppl-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 60; }
.c-ppl-scrim[hidden], .c-ppl-drawer[hidden] { display: none; }
.c-ppl-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 61; background: var(--c-surface); border-left: 1px solid var(--c-line); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.c-ppl-open { overflow: hidden; }
.c-ppl-d-head { display: flex; gap: 12px; align-items: center; }
.c-ppl-d-id { flex: 1; min-width: 0; }
.c-ppl-d-id h2 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.c-ppl-x { font-size: 24px; line-height: 1; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--c-ink-2); cursor: pointer; }
.c-ppl-x:hover { background: var(--c-surface-2); color: var(--c-ink); }
@media (max-width: 720px) { .c-ppl-x { width: 40px; height: 40px; } }
.c-ppl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.c-ppl-facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-ppl-facts dd { margin: 2px 0 0; }
.c-ppl-block { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.c-ppl-block h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); margin: 0; }
.c-ppl-pending { border-top: 0; padding: 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--c-warn) 12%, transparent); }
.c-ppl-picks { display: grid; gap: 8px; }
.c-ppl-pick { text-align: left; font: inherit; color: var(--c-ink); background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; cursor: pointer; }
.c-ppl-pick span { color: var(--c-ink-3); font-size: 13px; }
.c-ppl-pick.is-on { border-color: var(--c-accent); background: var(--c-accent-soft); }
.c-ppl-pick:disabled { opacity: .5; cursor: not-allowed; }
.c-ppl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* Side panel → Password (member-password.js): the box takes the row's room and the buttons wrap under it on a phone. */
.c-ppl-pw { display: grid; gap: 8px; }
.c-ppl-pw-input { flex: 1 1 180px; min-width: 0; width: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.c-ppl-danger { margin-top: auto; }
@media (max-width: 720px) { .c-ppl-add-form { grid-template-columns: 1fr; } .c-ppl-search { max-width: none; } }
.c-ppl [hidden] { display: none !important; }
.c-ppl-block > .c-btn { justify-self: start; }
/* A person's History, lists, other teams and recent apps (member-profile-ui.tsx); on phones the panel is full width already. */
.c-mp { display: grid; gap: 18px; }
.c-ppl-facts .c-ppl-facts-wide { grid-column: 1 / -1; }
.c-mp-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.c-mp-history li { display: grid; gap: 2px; overflow-wrap: anywhere; }
.c-mp-details { color: var(--c-ink-2); }
.c-mp-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.c-mp-list li.c-muted { list-style: none; margin-left: -18px; }
@media (max-width: 720px) { .c-mp .c-btn { min-height: 40px; } }

/* Settings → Context: AI context editor */
.c-ctx { display: grid; gap: 12px; margin-bottom: 20px; }
.c-ctx h2 { margin: 0; }
.c-ctx-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.c-ctx-head .c-help { margin: 4px 0 0; }
.c-ctx-side { display: flex; gap: 10px; align-items: center; }
.c-ctx-preview { margin: 0; color: var(--c-ink-2); overflow-wrap: anywhere; }
.c-ctx-body { display: grid; gap: 12px; }
.c-ctx-body[hidden], .c-ctx-draft[hidden] { display: none; }
.c-ctx-body .c-banner { margin-bottom: 0; }
.c-ctx-text { min-height: 200px; resize: vertical; font-family: var(--font-body); line-height: 1.5; }
.c-ctx-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.c-ctx-foot .c-help { margin: 0; font-variant-numeric: tabular-nums; }
.c-ctx-near { color: var(--c-warn); }
.c-ctx-msg { font-size: 13px; color: var(--c-ink-2); }
.c-ctx-msg.is-ok { color: var(--c-ok); } .c-ctx-msg.is-bad { color: var(--c-danger); }
.c-ctx-actions { margin-left: auto; display: flex; gap: 8px; }
.c-ctx-draft { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--c-line); border-radius: var(--radius); }
.c-ctx-draft-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.c-ctx-draft > .c-btn { justify-self: start; }

/* Settings → Connectors */
.c-conn-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.c-conn-head h2 { margin: 0; }
.c-conn-head .c-help { margin: 4px 0 0; max-width: 60ch; }
.c-conn-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.c-conn-add { display: flex; gap: 8px; align-items: center; margin: 0; }
.c-conn-add .c-select { width: auto; min-width: 220px; }
.c-conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.c-conn-card { display: grid; gap: 10px; align-content: start; padding: 16px; }
.c-conn-top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.c-conn-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.c-conn-fields { font-size: 13px; }
.c-conn-fields summary { cursor: pointer; color: var(--c-ink-2); }
.c-conn-fields[open] summary { margin-bottom: 6px; }
.c-conn-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ── Settings shell (.c-set) ─────────────────────────────────────────────
   Large title, segmented tabs, grouped inset lists, switches. Calm surfaces, one accent, generous space. */
/* One column no wider than the page: an auto column grew to the tab row's and level bar's full width (423px on a 375px
   phone) instead of letting them scroll in place. */
.c-set { --set-r: 8px; --set-gap: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; width: 100%; max-width: 1040px; margin-inline: auto; }
.c-set-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* The team picker beside the title shrinks to the page, ending a long team name in "…", instead of widening it. */
.c-set-head > form { min-width: 0; max-width: 100%; }
.c-set-title { display: grid; gap: 6px; min-width: 0; }
.c-set-title h1 { margin: 0; font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.c-set-title p { margin: 0; color: var(--c-ink-2); font-size: 16px; }

/* Underlined tabs; the current one gets a gradient rule. */
.c-set-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.c-set-tabs::-webkit-scrollbar { display: none; }
.c-set-tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; font-size: 15px; font-weight: 500; color: var(--c-ink-3); white-space: nowrap; text-decoration: none; transition: color .15s ease; }
.c-set-tabs a:hover { color: var(--c-ink); }
.c-set-tabs a[aria-current='page'] { color: var(--c-ink); }
.c-set-tabs a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 50%, #b18cff)); }
.c-set-tabs a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-set-count { min-width: 18px; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--c-warn) 18%, transparent); color: var(--c-warn); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.c-set .c-btn { border-radius: 6px; }
.c-set .c-btn.primary { border: 0; background: linear-gradient(135deg, var(--c-btn), color-mix(in srgb, var(--c-btn) 55%, #b18cff)); }
.c-set .c-input, .c-set .c-select { border-radius: 6px; }

.c-set-body { display: grid; gap: var(--set-gap); min-width: 0; }
.c-set-group { display: grid; gap: 8px; min-width: 0; scroll-margin-top: 24px; }
.c-set-label { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 4px; }
.c-set-label h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--c-ink-3); }
.c-set-label-lg { margin-bottom: 4px; }
.c-set-label-lg h2 { font-size: 20px; letter-spacing: -0.01em; text-transform: none; color: var(--c-ink); }
.c-set-label-lg .c-set-row-sub { margin-top: 4px; max-width: 60ch; }
.c-set-foot { margin: 0; padding: 0 4px; font-size: 13px; color: var(--c-ink-3); max-width: 70ch; }

/* The inset list: one rounded surface, rows divided by hairlines that start after the leading avatar. */
.c-set-list { background: var(--c-surface); border-radius: var(--set-r); box-shadow: 0 0 0 1px var(--c-line); overflow: hidden; min-width: 0; }
.c-set-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; min-height: 56px; position: relative; }
.c-set-row + .c-set-row::before { content: ''; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--c-line); }
.c-set-row:has(.c-set-lead) + .c-set-row::before { left: 64px; }
.c-set-lead { flex: none; display: grid; place-items: center; }
.c-set-main { flex: 1 1 auto; min-width: 0; }
.c-set-row-title { font-size: 15px; font-weight: 500; color: var(--c-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.c-set-row-sub { font-size: 13px; color: var(--c-ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.c-set-trail { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.c-set-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.c-set-inline { display: flex; gap: 6px; margin: 0; }
.c-set-inline .c-input { width: 180px; padding: 6px 10px; }
.c-set-empty { padding: 36px 16px; text-align: center; color: var(--c-ink-3); }
.c-set-notice { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--c-ok) 14%, transparent); color: var(--c-ink); }
.c-set-notice.danger { background: color-mix(in srgb, var(--c-danger) 14%, transparent); }
/* Team rooms (Settings): cards straight on the page. The design is the Team rooms mock-up; its system, in full:
     gap between cards, panels and columns ......... 16px   (--tr-gap), the same across and down
     panel and card padding ........................ 16px   (--tr-pad)
     spacing scale ................................. 4 8 12 16 24 40, plus the 3px inset of chips and the toggle
     panel header height ........................... 52px   (--tr-head), divider included
     panel row height .............................. 56px   (--tr-row), divider included
     control height ................................ 32px   (--tr-ctl): every button, input and toggle
     chip height 28px, pill height 22px, tile 44px (56px in the room's header), small glyph 20px
     radius: panel and card 14px, tile 10px, control and chip 8px, anything nested in a chip or toggle 4px */
.c-tr { --tr-gap: 16px; --tr-pad: 16px; --tr-head: 52px; --tr-row: 56px; --tr-ctl: 32px; --tr-r-panel: 14px; --tr-r-tile: 10px; --tr-r-ctl: 8px; --tr-r-in: 4px; max-width: 1120px; color: var(--c-ink); font: 400 15px/1.55 var(--font-body); }
.c-tr, .c-tr *, .c-tr *::before, .c-tr *::after { box-sizing: border-box; }
.c-tr svg { flex: none; display: block; }
.c-tr a { text-decoration: none; }

/* One accent per kind ("What it is for"). The tile, the card's top edge and the kind label use it. */
.c-tr [data-kind], .c-tr[data-kind] { --k: var(--c-accent); }
.c-tr [data-kind='feed'] { --k: var(--c-viz-1); }
.c-tr [data-kind='record'] { --k: color-mix(in srgb, var(--c-accent) 50%, #b18cff); }
.c-tr [data-kind='presence'] { --k: var(--c-ok); }
.c-tr [data-kind='claim'] { --k: var(--c-viz-2); }
.c-tr [data-kind='timer'] { --k: var(--c-viz-4); }
.c-tr [data-kind='counter'] { --k: color-mix(in srgb, var(--c-danger) 55%, var(--c-accent)); }

/* Page head */
.c-tr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.c-tr-h { display: flex; align-items: center; gap: 8px; margin: 0; font: 800 24px/32px var(--font-display); letter-spacing: -0.02em; color: var(--c-ink); }
.c-tr-sub { margin: 4px 0 0; color: var(--c-ink-2); font-size: 14px; line-height: 20px; }
.c-tr-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font: 600 13px/1 var(--font-body); letter-spacing: 0; }
.c-tr .c-tr-note { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--c-line); border-radius: var(--tr-r-panel); font-size: 14px; line-height: 20px; background: var(--c-surface); color: var(--c-ink); }
.c-tr .c-tr-note.ok { border-color: color-mix(in srgb, var(--c-ok) 40%, var(--c-line)); background: color-mix(in srgb, var(--c-ok) 8%, var(--c-surface)); }
.c-tr .c-tr-note.danger { border-color: color-mix(in srgb, var(--c-danger) 40%, var(--c-line)); background: color-mix(in srgb, var(--c-danger) 8%, var(--c-surface)); }
.c-tr-note a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Controls: one height */
.c-tr .c-tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--tr-ctl); min-height: 0; margin: 0; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--tr-r-ctl); background: var(--c-surface-2); color: var(--c-ink); font: 600 13px/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: border-color .12s, background .12s, filter .12s; }
.c-tr .c-tr-btn:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
.c-tr .c-tr-btn:focus-visible, .c-tr .c-tr-seg button:focus-visible, .c-tr .c-tr-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-tr .c-tr-btn.is-primary { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-accent-ink); }
.c-tr .c-tr-btn.is-primary:hover { filter: brightness(1.06); }
.c-tr .c-tr-btn.is-quiet { background: transparent; }
.c-tr .c-tr-btn.is-danger { background: transparent; color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 40%, var(--c-line)); }
.c-tr .c-tr-btn.is-danger:hover { background: color-mix(in srgb, var(--c-danger) 10%, transparent); border-color: var(--c-danger); }
.c-tr .c-tr-btn.is-remove:hover { color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 45%, var(--c-line)); }
.c-tr .c-tr-btn[disabled] { color: var(--c-ink-3); border-color: var(--c-line); background: transparent; cursor: not-allowed; }
.c-tr .c-tr-btn svg { width: 16px; height: 16px; }
.c-tr .c-tr-input { flex: 1; width: 100%; min-width: 0; height: var(--tr-ctl); min-height: 0; margin: 0; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--tr-r-ctl); background: var(--c-bg); color: var(--c-ink); font: 500 13px/1 var(--font-body); }
.c-tr .c-tr-input::placeholder { color: var(--c-ink-3); }
.c-tr .c-tr-input:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; border-color: transparent; }
.c-tr .c-tr-seg { display: inline-flex; height: var(--tr-ctl); margin: 0; padding: 3px; border: 1px solid var(--c-line); border-radius: var(--tr-r-ctl); background: var(--c-bg); }
.c-tr .c-tr-seg button { height: 24px; min-height: 0; margin: 0; padding: 0 8px; border: 0; border-radius: var(--tr-r-in); background: transparent; color: var(--c-ink-2); font: 600 12px/1 var(--font-body); white-space: nowrap; cursor: pointer; }
.c-tr .c-tr-seg button:hover { color: var(--c-ink); }
.c-tr .c-tr-seg button[aria-pressed='true'] { background: var(--c-surface-2); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); cursor: default; }
.c-tr .c-tr-link { padding: 0; border: 0; background: none; color: var(--c-ink-2); font: 500 13px/20px var(--font-body); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-ink-2) 45%, transparent); text-underline-offset: 3px; }
.c-tr .c-tr-link:hover { color: var(--c-ink); }

/* Small parts */
.c-tr-av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--tr-r-in); background: var(--c-accent-soft); color: var(--c-btn); font: 700 11px/1 var(--font-body); text-transform: uppercase; flex: none; }
:root[data-theme='light'] .c-tr-av { color: var(--c-accent); }
.c-tr-av.is-md { width: 32px; height: 32px; border-radius: var(--tr-r-ctl); font-size: 13px; }
.c-tr-av.is-lg { width: 44px; height: 44px; border-radius: var(--tr-r-tile); font-size: 16px; }
.c-tr-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--tr-r-in); background: color-mix(in srgb, var(--k) 18%, transparent); color: var(--k); flex: none; }
.c-tr-icon svg { width: 12px; height: 12px; }
.c-tr-icon.is-lg { width: 44px; height: 44px; border-radius: var(--tr-r-tile); }
.c-tr-icon.is-lg svg { width: 22px; height: 22px; }
.c-tr-icon.is-xl { width: 56px; height: 56px; border-radius: var(--tr-r-tile); }
.c-tr-icon.is-xl svg { width: 28px; height: 28px; }
.c-tr-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px 0 3px; border: 1px solid var(--c-line); border-radius: var(--tr-r-ctl); background: var(--c-surface-2); color: var(--c-ink); font: 600 13px/1 var(--font-body); white-space: nowrap; }
.c-tr-chip.is-waiting { border-style: dashed; border-color: color-mix(in srgb, var(--c-warn) 55%, var(--c-line)); background: transparent; }
.c-tr-chip.is-waiting .c-tr-av { background: color-mix(in srgb, var(--c-warn) 18%, transparent); color: var(--c-warn); }
.c-tr-chip.is-waiting em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--c-warn); }
.c-tr-chip { max-width: 100%; min-width: 0; }
.c-tr-chip > .c-tr-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-tr-chip.is-room { border-color: color-mix(in srgb, var(--k) 40%, var(--c-line)); background: color-mix(in srgb, var(--k) 9%, var(--c-surface)); }
.c-tr-pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font: 700 11px/1 var(--font-body); letter-spacing: .03em; white-space: nowrap; }
.c-tr-pill.is-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.c-tr-pill.is-live, .c-tr-pill.is-ok { color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 14%, transparent); }
.c-tr-pill.is-wait { color: var(--c-warn); background: color-mix(in srgb, var(--c-warn) 14%, transparent); }
.c-tr-pill.is-kind { color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); }

.c-tr-none { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 28px; }
.c-tr-here { display: inline-flex; align-items: center; gap: 8px; padding-left: 3px; color: var(--c-ok); font-weight: 600; }
.c-tr-here::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok) 22%, transparent); }

/* One room */
.c-tr-back { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 16px; color: var(--c-ink-2); font-size: 13px; line-height: 20px; font-weight: 600; }
.c-tr-back:hover { color: var(--c-ink); }
.c-tr-back svg { width: 16px; height: 16px; }
.c-tr-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.c-tr-hero-id { min-width: 0; flex: 1; }
.c-tr-hero h2 { margin: 0; font: 800 28px/30px var(--font-display); letter-spacing: -0.02em; color: var(--c-ink); overflow-wrap: anywhere; }
.c-tr-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* Two columns on shared rows: each row's panels start and end together, and their header dividers line up */
.c-tr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: var(--tr-gap); }
.c-tr-panel { display: flex; flex-direction: column; min-width: 0; margin: 0; border: 1px solid var(--c-line); border-radius: var(--tr-r-panel); background: var(--c-surface); overflow: hidden; }
.c-tr-panel-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--tr-head); padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-panel-h h3 { margin: 0; font: 700 15px/20px var(--font-display); letter-spacing: -0.01em; color: var(--c-ink); text-transform: none; }
.c-tr-panel-h span { color: var(--c-ink-2); font-size: 13px; line-height: 20px; }

/* Apps on the room: every row the same height, controls on one line */
.c-tr-app, .c-tr-add, .c-tr-fact { flex: none; display: flex; align-items: center; gap: 12px; height: var(--tr-row); margin: 0; padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-panel > :last-child { border-bottom: 0; }
.c-tr-app.is-waiting { background: linear-gradient(90deg, color-mix(in srgb, var(--c-warn) 9%, transparent), transparent 60%); box-shadow: inset 3px 0 0 var(--c-warn); }
.c-tr-app-id { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; }
.c-tr-app-id strong { font: 600 14px/20px var(--font-body); color: var(--c-ink); overflow-wrap: anywhere; }
.c-tr-app-acts { flex: none; display: flex; align-items: center; gap: 8px; }
.c-tr-app-acts form { display: flex; margin: 0; }
.c-tr-app-acts .c-tr-link { margin-right: 4px; }

/* About: the same rows as the Apps panel beside it */
.c-tr-fact { justify-content: space-between; }
.c-tr-fact dt { color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-fact dd { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.c-tr-facts { margin: 0; display: flex; flex-direction: column; }
.c-tr-facts > :last-child { border-bottom: 0; }

/* Who can do what: one column per role */
.c-tr-roles { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-tr-role { padding: var(--tr-pad); }
.c-tr-role + .c-tr-role { border-left: 1px solid var(--c-line); }
.c-tr-role h4 { display: flex; align-items: center; gap: 8px; height: 16px; margin: 0 0 12px; color: var(--c-ink-2); font: 700 12px/16px var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.c-tr-role h4 svg { width: 16px; height: 16px; color: var(--c-ink-3); }
.c-tr-role ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-tr-role li { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; line-height: 20px; color: var(--c-ink); }
.c-tr-role li::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--c-ok) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233ddc97' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 8.2l2.300 2.300 4.500-4.800'/%3E%3C/svg%3E") center/16px no-repeat; }
:root[data-theme='light'] .c-tr-role li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2312965f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 8.2l2.300 2.300 4.500-4.800'/%3E%3C/svg%3E"); }
.c-tr-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 var(--tr-pad); border-top: 1px solid var(--c-line); color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-foot.is-form { height: var(--tr-row); }
.c-tr-rule:has(+ .c-tr-foot) { border-bottom: 0; }

/* Danger zone: the warning at the top, the button pinned to the bottom of the shared row */
.c-tr-danger { border-color: color-mix(in srgb, var(--c-danger) 35%, var(--c-line)); }
.c-tr-danger .c-tr-panel-h { border-bottom-color: color-mix(in srgb, var(--c-danger) 25%, var(--c-line)); }
.c-tr-danger .c-tr-panel-h h3 { color: var(--c-danger); }
.c-tr-danger-b { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: var(--tr-pad); }
.c-tr-danger-b p { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-danger-b form { display: flex; flex-direction: column; gap: 8px; margin: auto 0 0; }
.c-tr .c-tr-danger-b > .c-tr-btn { margin-top: auto; width: 100%; }
.c-tr .c-tr-danger-b form .c-tr-btn { width: 100%; }
.c-tr .c-tr-danger-b form .c-tr-input { flex: none; }

/* The rules editor opens as a panel in the same system */
.c-tr-sheet { display: none; margin-bottom: 16px; }
.c-tr-sheet.is-open, .c-tr-sheet:target { display: flex; }
.c-tr-cols + .c-tr-sheet { margin-top: 16px; }
.c-tr-sheet form { display: flex; flex-direction: column; margin: 0; }
.c-tr-sheet-b { display: grid; gap: 16px; padding: var(--tr-pad); }
.c-tr .c-tr-input { appearance: none; }
.c-tr select.c-tr-input { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237c849c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.500l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; cursor: pointer; }
.c-tr-foot-btns { display: flex; align-items: center; gap: 8px; }
.c-tr-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--tr-row); padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-rule label { color: var(--c-ink); font: 500 14px/20px var(--font-body); }
.c-tr .c-tr-rule .c-tr-input { flex: none; width: 256px; }

/* Settings → Completa real time: one card per Live bridge. The apps that can change it on the left, the bridge as a round node in
   the middle, the apps that can only view it on the right; public/team-rooms.js draws a curve from each app to the
   node (without it the card reads the same, minus the curves). The bridge's name is the card's link: its ::after
   covers the card, the columns let clicks through, and only a waiting app's chip (a link to Approvals) sits above. */
.c-br-map { display: grid; gap: var(--tr-gap); }
.c-br-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 192px minmax(0, 1fr); align-items: center; column-gap: 64px; min-height: 152px; padding: 24px; border: 1px solid var(--c-line); border-radius: var(--tr-r-panel); background: var(--c-surface); transition: border-color .12s, box-shadow .12s; }
.c-br-row:hover { border-color: color-mix(in srgb, var(--k) 45%, var(--c-line)); box-shadow: var(--shadow); }
.c-br-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.c-br-wires path { stroke: color-mix(in srgb, var(--k) 70%, var(--c-line)); }
.c-br-wires path.is-see { stroke: color-mix(in srgb, var(--k) 35%, var(--c-line)); }
.c-br-wires path.is-wait { stroke: color-mix(in srgb, var(--c-warn) 70%, var(--c-line)); stroke-dasharray: 4 4; }
.c-br-side { position: relative; z-index: 1; display: grid; gap: 8px; min-width: 0; pointer-events: none; }
.c-br-side.is-change { justify-items: end; text-align: right; }
.c-br-side.is-see { justify-items: start; }
.c-br-label { margin: 0; color: var(--c-ink-2); font: 700 11px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.c-br-apps { display: grid; justify-items: inherit; gap: 8px; max-width: 100%; margin: 0; padding: 0; list-style: none; }
.c-br-apps > li { display: flex; max-width: 100%; min-width: 0; margin: 0; }
.c-br-row .c-tr-chip { height: 32px; background: var(--c-surface-2); }
.c-br-row .c-tr-chip.is-waiting { background: var(--c-surface); }
.c-br-row a.c-tr-chip { position: relative; pointer-events: auto; color: var(--c-ink); }
.c-br-row a.c-tr-chip::before { content: ''; position: absolute; inset: -4px 0; }
.c-br-row a.c-tr-chip:hover { border-color: var(--c-warn); }
.c-br-row a.c-tr-chip:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-br-hub { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; }
.c-br-node { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px; border: 2px solid var(--k); border-radius: 50%; background: color-mix(in srgb, var(--k) 14%, var(--c-surface)); color: var(--k); box-shadow: 0 0 0 6px var(--c-surface); pointer-events: none; }
.c-br-node svg { width: 28px; height: 28px; }
.c-tr a.c-br-name { max-width: 100%; color: var(--c-ink); font: 700 16px/24px var(--font-display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.c-br-name::after { content: ''; position: absolute; inset: 0; border-radius: var(--tr-r-panel); }
.c-br-name:focus-visible { outline: none; }
.c-br-name:focus-visible::after { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-br-row:hover .c-br-name { text-decoration: underline; text-underline-offset: 3px; }
.c-br-meta { color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-br-empty { margin: 0; padding: 24px; border: 1px dashed var(--c-line); border-radius: var(--tr-r-panel); background: var(--c-surface); color: var(--c-ink-2); font-size: 15px; line-height: 24px; }

/* Approvals → Completa real time: one row per Live bridge ask. The app, an arrow, the bridge's node and the apps already on it;
   the sentence; then what the app may do, Decline and Approve. Inside a .c-card on the Approvals page. */
.c-tr.c-br-asks { max-width: none; }
.c-br-asks .c-tr-note { margin: 0 0 12px; }
.c-br-asklist { display: grid; margin: 0; padding: 0; list-style: none; }
.c-br-ask { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: var(--tr-row); margin: 0; padding: 12px 0; border-top: 1px solid var(--c-line); }
.c-br-ask:first-child { border-top: 0; }
.c-br-pair { display: inline-flex; align-items: center; gap: 6px; color: var(--c-ink-3); }
.c-br-pair > svg { width: 16px; height: 16px; }
.c-br-pair .c-tr-av.is-on { background: var(--c-surface-2); color: var(--c-ink-2); }
.c-br-dot { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--k); border-radius: 50%; background: color-mix(in srgb, var(--k) 14%, var(--c-surface)); color: var(--k); }
.c-br-dot svg { width: 16px; height: 16px; }
.c-br-ask-t { min-width: 0; margin: 0; color: var(--c-ink); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.c-br-ask-team { display: block; color: var(--c-ink-2); font-size: 12px; line-height: 16px; }
.c-br-ask-acts { display: flex; align-items: center; gap: 8px; margin: 0; }
.c-tr .c-br-ask-acts .c-tr-input { flex: none; width: 152px; }

/* Admin → Activity now → Site-wide switch (live/hub-pages.tsx), and the staff switch on Organization → Real-time
   (live/usage-pages.tsx): a panel per decision; rows are the system's 56px rows, the foot carries the actions. */
.c-tr-ps { display: grid; gap: var(--tr-gap); }
.c-tabs + .c-tr-ps, .c-stick + .c-tr-ps { margin-top: var(--tr-gap); }
.c-tr-ps .c-tr-danger .c-tr-foot { border-top: 1px solid color-mix(in srgb, var(--c-danger) 25%, var(--c-line)); }
.c-tr-ps > .c-tr-note { margin: 0; }
.c-tr-ps-now { flex: none; display: flex; align-items: center; min-height: var(--tr-row); margin: 0; padding: 12px var(--tr-pad); color: var(--c-ink); font-size: 14px; line-height: 20px; font-weight: 600; }
.c-tr-ps-row { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--tr-row); margin: 0; padding: 0 var(--tr-pad); }
.c-tr-ps-now + .c-tr-ps-row { border-top: 1px solid var(--c-line); }
.c-tr-ps-label { color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-ps .c-tr-foot { margin: 0; }
.c-tr-ps p.c-tr-foot { height: auto; min-height: 48px; padding-top: 12px; padding-bottom: 12px; }
.c-tr-ps .c-tr-foot.is-form { justify-content: flex-end; gap: 8px; }
.c-tr-ps .c-tr-foot form { display: flex; margin: 0; }
.c-tr-ps .c-tr-seg button[disabled] { opacity: 1; }
.c-tr-ps-now.is-sub { min-height: 0; padding-top: 0; padding-bottom: 16px; margin-top: -4px; color: var(--c-ink-2); font-size: 13px; font-weight: 400; }
.c-tr-ps-sub { margin-right: auto; }
.c-tr.c-tr-ps-org { margin: 0 0 16px; }

/* Narrower */
@media (max-width: 1000px) {
  .c-tr-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .c-br-row { grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr); column-gap: 40px; padding: 20px 16px; }
}
@media (max-width: 760px) {
  /* A phone: the apps that can change, the bridge, then the apps that can only view, one under the other */
  .c-br-row { grid-template-columns: minmax(0, 1fr); row-gap: 32px; padding: 20px 16px; }
  .c-br-side:empty { display: none; }
  .c-br-side.is-change, .c-br-side.is-see { justify-items: center; text-align: center; }
  .c-br-apps { display: flex; flex-wrap: wrap; justify-content: center; }
  .c-br-row a.c-tr-chip::before { inset: -6px -2px; }
  .c-br-ask { grid-template-columns: auto minmax(0, 1fr); }
  .c-br-ask-acts { grid-column: 1 / -1; flex-wrap: wrap; }
  .c-tr .c-br-ask-acts .c-tr-input { flex: 1 1 100%; width: 100%; height: 40px; font-size: 16px; }
  .c-tr .c-br-ask-acts .c-tr-btn { flex: 1; height: 40px; }
  .c-tr-head > .c-tr-btn { width: 100%; }
  .c-tr-head > div { position: relative; min-width: 0; }
  .c-tr-hero > .c-tr-btn { width: 100%; }
  .c-tr-app { height: auto; flex-direction: column; align-items: stretch; padding: 12px var(--tr-pad); }
  .c-tr-app-acts { justify-content: space-between; }
  .c-tr-roles { grid-template-columns: minmax(0, 1fr); }
  .c-tr-role + .c-tr-role { border-left: 0; border-top: 1px solid var(--c-line); }
  .c-tr-rule { height: auto; flex-direction: column; align-items: stretch; padding: 12px var(--tr-pad); }
  .c-tr .c-tr-rule .c-tr-input { width: 100%; }
  .c-tr-foot.is-form { height: auto; flex-direction: column; align-items: stretch; padding: 12px var(--tr-pad); }
  .c-tr-foot-btns { justify-content: flex-end; }
}

/* =====================================================================================================
   NEW for these screens: the room Data page and an app's Real-time tab.
   Everything above this line is the merged Team rooms block, unchanged. Everything below is new, uses the
   same system (16px gaps and padding; radii 14 / 10 / 8 / 4; every control 32px; panel header 52px; rows
   56px) and only existing tokens. Lift this section into theme.css right after the Team rooms block.

   Added sizes, all inside the system's scale:
     list rows inside an inner card, and tally bars ...... 40px
     inner card header .................................. 48px (8 + a 32px control + 8)
     the band that names an environment in a list ....... 32px
     kind tile in a list row ............................ 32px (.c-tr-icon.is-md, as .c-tr-av.is-md)
   ===================================================================================================== */

/* The app panel's Real-time box fills the pane (the pane lays its children out from the start edge) */
.c-panel-pane > .c-pl { align-self: stretch; min-width: 0; }

/* One column of panels, the system's 16px between them */
.c-tr-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tr-gap); }

/* Inside the app panel (a 440px drawer on --c-surface): fill it, and sit panels on the page color */
.c-tr.is-pane { width: 100%; max-width: none; }
.c-tr.is-pane .c-tr-panel { background: var(--c-bg); }
.c-tr.is-pane .c-tr-note { background: var(--c-bg); }

/* A 32px kind tile for list rows */
.c-tr-icon.is-md { width: 32px; height: 32px; border-radius: var(--tr-r-ctl); }
.c-tr-icon.is-md svg { width: 18px; height: 18px; }
.c-tr-icon.is-off { background: var(--c-surface-2); color: var(--c-ink-3); }
.c-tr-av.is-none { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); color: transparent; }

/* Per-entry actions are quiet: no border until the pointer is on them, then they read as what they are */
.c-tr .c-tr-btn.is-ghost { border-color: transparent; background: color-mix(in srgb, var(--c-surface-2) 70%, transparent); color: var(--c-ink-2); }
.c-tr .c-tr-btn.is-ghost:hover { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
.c-tr .c-tr-btn.is-ghost.is-remove:hover { color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 45%, var(--c-line)); background: color-mix(in srgb, var(--c-danger) 8%, transparent); }

/* The facts strip under the header: six equal cells in one panel */
.c-tr-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.c-tr-stat { display: grid; gap: 4px; align-content: center; min-width: 0; margin: 0; padding: 12px var(--tr-pad); border-left: 1px solid var(--c-line); }
.c-tr-stat:first-child { border-left: 0; }
.c-tr-stat dt { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font: 700 12px/16px var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.c-tr-stat dd { display: flex; align-items: center; height: 24px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font: 700 16px/24px var(--font-display); letter-spacing: -0.01em; }
.c-tr-stat dd .c-tr-here { font: inherit; line-height: 24px; }

/* Panel header: a count, pills and the Readable / As data switch on the right */
.c-tr-panel-tools { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-tr-panel-tools > span:not(.c-tr-pill) { margin-right: 4px; }
.c-tr .c-tr-seg a { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--tr-r-in); color: var(--c-ink-2); font: 600 12px/1 var(--font-body); white-space: nowrap; }
.c-tr .c-tr-seg a:hover { color: var(--c-ink); }
.c-tr .c-tr-seg a[aria-current='true'] { background: var(--c-surface-2); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.c-tr .c-tr-seg a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Chat: messages as messages. One-line messages are exactly one 56px row; longer ones grow. */
.c-tr-msgs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.c-tr-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; min-height: var(--tr-row); margin: 0; padding: 8px var(--tr-pad); box-shadow: inset 0 -1px 0 var(--c-line); }
.c-tr-msg:last-child { box-shadow: none; }
.c-tr-msg > .c-tr-av, .c-tr-msg > form { margin: 4px 0 0; }
.c-tr-msg > form { display: flex; }
.c-tr-msg-b { min-width: 0; }
.c-tr-msg-who { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-msg-who time, .c-tr-when { color: var(--c-ink-2); font: 400 12px/20px var(--font-body); white-space: nowrap; }
.c-tr-msg-text { max-width: 80ch; margin: 0; color: var(--c-ink); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }

/* Shared document: values as rows, each list as an inner card */
.c-tr-kvs { display: flex; flex-direction: column; margin: 0; }
.c-tr-kv { display: grid; grid-template-columns: 208px minmax(0, 1fr) auto; column-gap: 16px; align-items: center; height: var(--tr-row); margin: 0; padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-kvs > :last-child { border-bottom: 0; }
.c-tr-kv dt, .c-tr-box-h h4 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font: 500 13px/20px var(--font-mono, ui-monospace, monospace); letter-spacing: 0; text-transform: none; }
.c-tr-kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font-size: 14px; line-height: 20px; font-weight: 600; }
.c-tr-kvs + .c-tr-lists { border-top: 1px solid var(--c-line); }
.c-tr-lists, .c-tr-cells { display: grid; grid-auto-rows: 1fr; gap: var(--tr-gap); margin: 0; padding: var(--tr-pad); list-style: none; }
.c-tr-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c-tr-box { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--c-line); border-radius: var(--tr-r-tile); background: var(--c-bg); overflow: hidden; }
.c-tr-box-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--c-line); }
.c-tr-box-h h4 { color: var(--c-ink); font-weight: 600; }
.c-tr-box-h > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-tr-box-h form { display: flex; margin: 0; }
.c-tr-items { margin: 0; padding: 0; list-style: none; }
.c-tr-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; height: 40px; margin: 0; padding: 0 12px; border-bottom: 1px solid var(--c-line); font-size: 13px; line-height: 16px; color: var(--c-ink); }
.c-tr-items > :last-child { border-bottom: 0; }
.c-tr-item > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Who is here, and Seats and claims: people and seats as cells, 56px each */
.c-tr-cells.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c-tr-cells.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-tr-cell { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: var(--tr-row); margin: 0; padding: 8px 12px; border: 1px solid var(--c-line); border-radius: var(--tr-r-tile); background: var(--c-bg); }
.c-tr-cell.is-free { border-style: dashed; background: transparent; }
.c-tr-cell-t { flex: 1; min-width: 0; display: grid; }
.c-tr-cell-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-cell-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font-size: 12px; line-height: 16px; }
.c-tr-cell form { flex: none; display: flex; margin: 0; }

/* Countdown: each timer reads as a clock */
.c-tr-timer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--tr-r-tile); background: var(--c-bg); }
.c-tr-clock { color: var(--c-ink); font: 800 24px/32px var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.c-tr-timer.is-done .c-tr-clock { color: var(--c-ink-3); }
.c-tr-timer > .c-tr-pill { justify-self: end; }
.c-tr-timer-n { grid-column: 1 / -1; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-timer-by { color: var(--c-ink-2); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-tr-timer form { display: flex; margin: 0; justify-self: end; }

/* Votes and tallies: bars with counts */
.c-tr-bars { display: flex; flex-direction: column; margin: 0; padding: 8px 0; list-style: none; }
.c-tr-bars + .c-tr-bars { border-top: 1px solid var(--c-line); }
.c-tr-bar { display: grid; grid-template-columns: 240px minmax(0, 1fr) 48px; column-gap: 16px; align-items: center; height: 40px; margin: 0; padding: 0 var(--tr-pad); }
.c-tr-bar-n { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--c-ink); font-size: 14px; line-height: 20px; }
.c-tr-bar-n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-tr-bar-n i { flex: none; width: 16px; color: var(--c-ink-2); font: 600 12px/20px var(--font-body); font-style: normal; font-variant-numeric: tabular-nums; }
.c-tr-bar-track { height: 8px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.c-tr-bar-fill { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: color-mix(in srgb, var(--k) 55%, var(--c-surface-2)); }
.c-tr-bar.is-top .c-tr-bar-fill { background: var(--k); }
.c-tr-bar-fill.is-zero { min-width: 0; }
.c-tr-bar b { text-align: right; color: var(--c-ink); font: 700 14px/20px var(--font-body); font-variant-numeric: tabular-nums; }

/* Nothing here: one line with the kind's tile, never an empty table */
.c-tr-blank { display: flex; align-items: center; gap: 12px; margin: 0; padding: 24px var(--tr-pad); }
.c-tr-blank-t { min-width: 0; display: grid; gap: 4px; }
.c-tr-blank h4 { margin: 0; color: var(--c-ink); font: 700 15px/20px var(--font-display); letter-spacing: -0.01em; text-transform: none; }
.c-tr-blank p { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-blank.is-tall { flex-direction: column; align-items: flex-start; gap: 16px; }

/* As data */
.c-tr-code { margin: var(--tr-pad); padding: 12px 16px; max-height: 448px; overflow: auto; border: 1px solid var(--c-line); border-radius: var(--tr-r-tile); background: var(--c-bg); color: var(--c-ink-2); font: 400 12px/20px var(--font-mono, ui-monospace, monospace); white-space: pre; tab-size: 2; }

/* The bulk action sits in the panel's footer, the same place for every kind */
.c-tr-foot.is-form form { flex: none; display: flex; margin: 0; }

/* Danger zone on this page: one row per action, the words on the left and the control on the right */
.c-tr-risk { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 12px var(--tr-pad); border-bottom: 1px solid color-mix(in srgb, var(--c-danger) 25%, var(--c-line)); }
.c-tr-risk-t { min-width: 0; display: grid; }
.c-tr-risk-t strong { color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-risk-t span { color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-risk form, .c-tr-risk-acts { flex: none; display: flex; align-items: center; gap: 8px; margin: 0; }
.c-tr .c-tr-risk .c-tr-input { flex: none; width: 256px; }
.c-tr-danger .c-tr-foot { border-top: 0; }

/* An app's Real-time tab: rooms as 56px rows, an environment named by a band */
.c-tr-band { flex: none; display: flex; align-items: center; height: 32px; margin: 0; padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-surface-2) 55%, transparent); color: var(--c-ink-2); font: 700 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.c-tr-room { flex: none; display: flex; align-items: center; gap: 12px; min-width: 0; height: var(--tr-row); margin: 0; padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-room-id { flex: 1; min-width: 0; display: grid; }
.c-tr-room-id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-room-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font-size: 12px; line-height: 16px; }
.c-tr-room-id span b { color: var(--k); font-weight: 600; }
.c-tr-room-acts { flex: none; display: flex; align-items: center; gap: 8px; color: var(--c-ink-2); font-size: 12px; line-height: 16px; white-space: nowrap; }
.c-tr-room-acts form { display: flex; margin: 0; }
.c-tr-room-meta { display: grid; justify-items: end; }
.c-tr-room:has(+ .c-tr-foot) { border-bottom: 0; }
.c-tr .c-tr-panel-h a.c-tr-link { display: inline-flex; align-items: center; gap: 4px; }
.c-tr .c-tr-panel-h a.c-tr-link svg { width: 16px; height: 16px; }

/* An app's Real time tab: who is here now (names on 48px rows), one quiet line when there is nothing, Data links in the foot */
.c-tr-people { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.c-tr-person { display: flex; align-items: center; gap: 12px; min-width: 0; height: 48px; margin: 0; padding: 0 var(--tr-pad); border-bottom: 1px solid var(--c-line); }
.c-tr-people > :last-child { border-bottom: 0; }
.c-tr-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); font: 600 14px/20px var(--font-body); }
.c-tr-quiet { margin: 0; padding: 16px var(--tr-pad); color: var(--c-ink-2); font-size: 13px; line-height: 20px; }
.c-tr-foot.is-data { justify-content: flex-start; height: auto; min-height: 48px; flex-wrap: wrap; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; }
.c-tr-foot.is-data > span:first-child { font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.c-tr-datalinks { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.c-tr .c-tr-datalinks .c-tr-link { display: inline-flex; align-items: center; min-height: 40px; }

/* Narrower (the page; the app panel is always narrow and already one column) */
@media (max-width: 1000px) {
  .c-tr-cells.is-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-tr-cells.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-tr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-tr-stat:nth-child(3n + 1) { border-left: 0; }
  .c-tr-stat:nth-child(n + 4) { border-top: 1px solid var(--c-line); }
  .c-tr-bar { grid-template-columns: 176px minmax(0, 1fr) 48px; }
}
@media (max-width: 760px) {
  .c-tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-tr-stat:nth-child(3n + 1) { border-left: 1px solid var(--c-line); }
  .c-tr-stat:nth-child(2n + 1) { border-left: 0; }
  .c-tr-stat:nth-child(n + 3) { border-top: 1px solid var(--c-line); }
  .c-tr-cells.is-4, .c-tr-cells.is-3, .c-tr-lists { grid-template-columns: minmax(0, 1fr); }
  .c-tr-kv { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 20px 20px; row-gap: 0; align-content: center; }
  .c-tr-kv dt { grid-column: 1 / -1; }
  .c-tr-bar { grid-template-columns: minmax(0, 1fr) 48px; grid-template-rows: 20px 8px; row-gap: 4px; align-content: center; height: var(--tr-row); }
  .c-tr-bar-track { grid-row: 2; grid-column: 1 / -1; }
  .c-tr-risk { flex-direction: column; align-items: stretch; gap: 12px; }
  .c-tr-risk form, .c-tr-risk-acts { flex-direction: column; align-items: stretch; }
  .c-tr .c-tr-risk .c-tr-input, .c-tr .c-tr-risk .c-tr-btn { width: 100%; }
  .c-tr-panel-h.is-tools { height: auto; min-height: var(--tr-head); flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .c-tr-panel-h.is-tools .c-tr-panel-tools { flex: 1 1 100%; flex-wrap: wrap; row-gap: 8px; }
  .c-tr-panel-h.is-tools .c-tr-seg { margin-left: auto; }
  .c-tr-lists { grid-auto-rows: auto; }
  .c-tr-foot.is-form form .c-tr-btn { width: 100%; }
}

/* The app panel is as wide as half the window (440px to 860px). Wide enough, a room's facts sit on one line, in two
   fixed columns, with the action at the right; narrower, they stack as drawn at 440px. */
.c-tr.is-pane { container-type: inline-size; }
@container (min-width: 520px) {
  .c-tr-room-meta { display: flex; align-items: center; gap: 16px; justify-items: initial; }
  .c-tr-room-meta > span { display: block; text-align: left; }
  .c-tr-room-meta > span:first-child { width: 120px; }
  .c-tr-room-meta > span:last-child { width: 80px; }
}
.c-set-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 15px; color: var(--c-accent); text-decoration: none; }
.c-set-back span { font-size: 22px; line-height: 1; margin-top: -2px; }
.c-set-back:hover { text-decoration: underline; }

/* Cards and tables that live inside a group take the inset-list look. */
.c-set .c-card { border: 0; box-shadow: 0 0 0 1px var(--c-line); border-radius: var(--set-r); }
.c-set .c-table th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--c-ink-3); font-weight: 500; }
.c-set .c-table td, .c-set .c-table th { border-bottom-color: color-mix(in srgb, var(--c-line) 70%, transparent); }
.c-set .c-table tbody tr:last-child td { border-bottom: 0; }
.c-set .c-ppl-list { padding: 0; overflow: hidden; }
.c-set .c-ppl-chip { border: 0; background: var(--c-surface-2); }
.c-set .c-ppl-chip.is-on { background: var(--c-ink); color: var(--c-bg); }
.c-set .c-ppl-search { border-radius: 999px; background: var(--c-surface-2); border-color: transparent; padding-left: 16px; }
.c-set .c-conn-card { gap: 12px; }
.c-set .c-btn { transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.c-set .c-btn:active { transform: scale(.97); }

/* Activity log rows. */
.c-log-row { min-height: 52px; }
.c-log-row + .c-log-row::before { left: 40px; }
.c-log-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c-ink-3); opacity: .5; }
.c-log-dot.ok { background: var(--c-ok); opacity: 1; } .c-log-dot.accent { background: var(--c-accent); opacity: 1; } .c-log-dot.danger { background: var(--c-danger); opacity: 1; }
.c-log-app { font-size: 12px; color: var(--c-ink-2); background: var(--c-surface-2); padding: 1px 7px; border-radius: 6px; }
.c-log-time { flex: none; font-size: 13px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .c-set-row { flex-wrap: wrap; row-gap: 10px; }
  .c-set-main { flex: 1 1 0; }
  .c-set-trail { width: 100%; max-width: 100%; justify-content: flex-start; }
  .c-set-row:has(.c-set-lead) .c-set-trail { padding-left: 48px; }
  .c-set-inline { width: 100%; } .c-set-inline .c-input { flex: 1; width: auto; }
  .c-log-row { flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .c-set *, .c-set *::after { transition: none !important; } }

/* ── Settings → Members ───────────────────────────────────────────────── */
.c-set .c-ppl-av { border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--t, var(--c-accent)), color-mix(in srgb, var(--t, var(--c-accent)) 45%, #b18cff)); }
.c-set .c-ppl-av-lg { border-radius: 12px; }
.c-mem-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.c-mem-search { flex: 1 1 220px; max-width: 340px; width: auto; }
.c-mem-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.c-mem-chip { display: inline-block; text-decoration: none; font: inherit; font-size: 13px; font-weight: 500; padding: 6px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink-3); cursor: pointer; }
.c-mem-chip:hover { color: var(--c-ink); }
.c-mem-chip[aria-pressed='true'], .c-mem-chip[aria-current='true'] { background: var(--c-accent-soft); color: var(--c-accent); }
.c-mem-sp { flex: 1; }
.c-mem-sort { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--c-ink-2); cursor: pointer; }
@media (max-width: 720px) { .c-mem-sort { font-size: 16px; } }
.c-mem-list { background: var(--c-surface); border-radius: 8px; box-shadow: 0 0 0 1px var(--c-line); overflow: hidden; min-width: 0; }
.c-mem-lh { display: grid; grid-template-columns: var(--mem-cols); gap: 16px; padding: 12px 18px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); border-bottom: 1px solid var(--c-line); }
.c-mem-list { --mem-cols: minmax(0, 1fr) 130px 80px 96px; }
.c-mem-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--c-line); cursor: pointer; transition: background .15s ease; }
[data-ppl-rows] > .c-mem-row { display: grid; grid-template-columns: 36px var(--mem-cols); }
.c-mem-lh { padding-left: 70px; }
.c-mem-c4 { text-align: right; }
.c-mem-lh + .c-mem-row, [data-ppl-rows] > .c-mem-row:first-child { border-top: 0; }
.c-mem-row.is-wait + [data-ppl-rows] > .c-mem-row:first-child { border-top: 1px solid var(--c-line); }
.c-mem-row[hidden] { display: none; }
.c-mem-row:hover, .c-mem-row.is-sel { background: color-mix(in srgb, var(--c-accent) 6%, transparent); }
.c-mem-row:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-mem-row.is-wait { cursor: default; background: linear-gradient(90deg, color-mix(in srgb, var(--c-warn) 10%, transparent), transparent 60%); }
.c-mem-row.is-off { opacity: .5; }
.c-mem-who { flex: 1; min-width: 0; }
.c-mem-who b { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-mem-who span { display: block; font-size: 13px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-mem-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.c-mem-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; background: var(--c-surface-2); color: var(--c-ink-2); white-space: nowrap; }
.c-mem-tag.accent { background: var(--c-accent-soft); color: var(--c-accent); }
.c-mem-tag.warn { background: color-mix(in srgb, var(--c-warn) 16%, transparent); color: var(--c-warn); }
.c-mem-str { display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; flex: none; }
.c-mem-str i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 50%, #b18cff)); }
.c-mem-seen { text-align: right; font-size: 12px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.c-mem-none { padding: 36px 16px; text-align: center; color: var(--c-ink-3); margin: 0; }
.c-mem-none[hidden] { display: none; }
.c-mem-soon { display: inline-flex; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; background: color-mix(in srgb, var(--c-warn) 16%, transparent); color: var(--c-warn); }
.c-ppl-block.is-soon > :not(h3) { opacity: .5; pointer-events: none; }
/* Members → App access (identity/app-access-ui.tsx, public/app-access.js): the app picker in Add people and the side panel. */
.c-apx-pick { display: grid; gap: 8px; margin-bottom: 14px; }
.c-apx-list { display: grid; max-height: 240px; overflow-y: auto; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.c-apx-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--c-line); cursor: pointer; min-width: 0; }
.c-apx-item:last-child { border-bottom: 0; }
.c-apx-item[hidden] { display: none; }
.c-apx-item[data-locked] { cursor: default; color: var(--c-ink-3); }
.c-apx-item input { flex: none; margin: 0; }
.c-apx-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.c-apx-list > p { padding: 8px 12px; }
.c-apx-mine { margin: 0; padding-left: 18px; color: var(--c-ink-2); font-size: 13.5px; }
.c-apx-edit { display: grid; gap: 8px; }
.c-choice input:disabled + span { opacity: .55; cursor: not-allowed; }
.c-ppl-block h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.c-mem-roles { display: flex; gap: 6px; flex-wrap: wrap; }
.c-mem-seg { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--c-surface-2); justify-self: start; }
.c-mem-seg span { padding: 5px 12px; border-radius: 4px; font-size: 13px; color: var(--c-ink-3); }
.c-mem-seg span.is-on { background: var(--c-surface); color: var(--c-ink); }
.c-mem-seg.is-soon { opacity: .5; }
.c-set .c-ppl-drawer { border-radius: 0; }
.c-set .c-ppl-pick { border-radius: 6px; }

/* Add people dialog */
.c-mem-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 20, .5); }
.c-mem-modal[hidden] { display: none; }
.c-mem-dialog { width: min(540px, 100%); max-height: calc(100dvh - 32px); overflow: auto; margin: 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 18px; }
.c-mem-dialog header, .c-mem-dialog footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.c-mem-dialog footer { align-items: center; }
/* The × stays at the top right on a phone; a long title wraps beside it instead. */
.c-mem-dialog header { flex-wrap: nowrap; }
.c-mem-dialog header > div { min-width: 0; }
.c-mem-dialog h2 { margin: 0; font-size: 21px; }
/* Configure templates (hierarchy-pages.tsx TemplatesDialog) and the Division level's Templates card. */
.c-tpl-chosen { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.c-tpl-chosen .c-chip { padding: 4px 12px; }
.c-tpl-list { display: grid; gap: 10px; }
/* Configure templates: wide and short, cards two across. Only the cards scroll; the heading and buttons stay put. */
.c-tpl-dialog { width: min(920px, 100%); overflow: hidden; display: flex; flex-direction: column; }
.c-tpl-dialog > header { flex: none; }
.c-tpl-dialog > form { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.c-tpl-dialog .c-tpl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; overflow-y: auto; min-height: 0; }
.c-tpl-dialog footer { flex: none; }
@media (max-width: 720px) { .c-tpl-dialog .c-tpl-list { grid-template-columns: 1fr; } }
.c-tpl-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 8px; cursor: pointer; }
.c-tpl-card:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.c-tpl-card input { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.c-tpl-card > span { display: grid; gap: 4px; min-width: 0; }
.c-tpl-desc { color: var(--c-ink-2); font-size: 13px; line-height: 1.45; }
.c-tpl-apps { color: var(--c-warn); font-size: 13px; }
/* Add user (pages.tsx AddMemberCard): wider, for the Several people check table. */
.c-add-dialog { width: min(680px, 100%); }
@media (max-width: 640px) {
  .c-mem-list { --mem-cols: minmax(0, 1fr) 84px; }
  .c-mem-c2, .c-mem-c3 { display: none; }
  .c-mem-sp { display: none; }
  .c-mem-row.is-wait { flex-wrap: wrap; }
  .c-mem-row.is-wait .c-mem-end { width: 100%; justify-content: flex-start; padding-left: 48px; }
}

/* ── Forge: Algorithms list rows and the run view (public/forge-visual.js) ───────────────────────────────── */
.c-alg-menu { position: relative; }
.c-alg-menu > summary { list-style: none; min-width: 34px; text-align: center; letter-spacing: 1px; }
.c-alg-menu > summary::-webkit-details-marker { display: none; }
.c-alg-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; display: grid; padding: 6px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.c-alg-pop > a, .c-alg-pop > button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--c-ink); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.c-alg-pop > a:hover, .c-alg-pop > button:hover, .c-alg-pop > a:focus-visible, .c-alg-pop > button:focus-visible { background: var(--c-surface-2); }
.c-alg-pop > .is-danger { color: var(--c-danger); }
.c-alg-pop-note { padding: 6px 10px; margin: 4px 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  font: 11px var(--font-mono); color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-av { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.c-av-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.c-av-say { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: right; }
.c-av-say > span:last-child { display: grid; min-width: 0; }
.c-av-say b { font-weight: 600; }
.c-av-say small { color: var(--c-ink-3); font-size: 12.5px; }
.c-av-badge { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-ink-3); font-weight: 800; }
.c-av-badge::before { content: '–'; }
.c-av-badge.is-complete { background: color-mix(in srgb, var(--c-ok) 16%, transparent); color: var(--c-ok); } .c-av-badge.is-complete::before { content: '✓'; }
.c-av-badge.is-failed { background: color-mix(in srgb, var(--c-danger) 16%, transparent); color: var(--c-danger); } .c-av-badge.is-failed::before { content: '✕'; }
.c-av-badge.is-running::before, .c-av-badge.is-submitted::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-accent); border-right-color: transparent; animation: c-av-spin .8s linear infinite; }
@keyframes c-av-spin { to { transform: rotate(360deg); } }
.c-av-acts { display: flex; gap: 8px; }
.c-av-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 28px; align-items: start; }
.c-av-box { align-content: start; }
.c-av-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.c-av-flow { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 2px 0; }
.c-av-layer { position: relative; z-index: 1; display: flex; justify-content: center; gap: 10px; width: 100%; }
.c-av-layer > .c-sn { width: 100%; max-width: calc(50% - 5px); min-width: 0; flex: 1 1 0; }
.c-av-layer:only-child > .c-sn, .c-av-layer > .c-sn:only-child { max-width: 100%; }
.c-av-wires { position: absolute; inset: 0; z-index: 0; overflow: visible; pointer-events: none; }
.c-av-wires path { fill: none; stroke: var(--c-ink-3); stroke-width: 1.6; opacity: .55; }
.c-av-wires path.tip { fill: var(--c-ink-3); stroke: none; }
.c-av-wires path.is-done { stroke: var(--c-ok); opacity: .8; } .c-av-wires path.tip.is-done { fill: var(--c-ok); }
.c-av-wires path.is-live { stroke: var(--c-accent); opacity: 1; stroke-dasharray: 5 5; animation: c-av-dash .7s linear infinite; }
.c-av-wires path.tip.is-live { fill: var(--c-accent); animation: none; }
@keyframes c-av-dash { to { stroke-dashoffset: -12; } }
.c-sn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer; font: inherit;
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); }
.c-sn:hover { border-color: var(--c-ink-3); }
.c-sn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-sn.is-picked { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.c-sn-txt { display: grid; min-width: 0; }
.c-sn-txt b { font-weight: 600; font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-sn-txt small { font-size: 13px; line-height: 1.4; color: var(--c-ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-sn-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  border: 2px solid var(--c-line); color: transparent; }
/* Before any run, a step's icon says what it does: brings data in, works on it, checks it, sends it out. */
.c-sn.is-idle .c-sn-ic { width: 36px; height: 36px; border: 0; border-radius: 10px; font-size: 15px; background: var(--c-surface-2); color: var(--c-ink-2); }
.c-sn.is-idle .c-sn-ic::before { content: '•'; }
.c-sn.is-idle.k-input .c-sn-ic { background: var(--c-accent-soft); color: var(--c-accent); } .c-sn.is-idle.k-input .c-sn-ic::before { content: '↓'; }
.c-sn.is-idle.k-process .c-sn-ic::before { content: '≡'; }
.c-sn.is-idle.k-decision .c-sn-ic { background: color-mix(in srgb, var(--c-warn) 18%, var(--c-surface)); color: var(--c-warn); } .c-sn.is-idle.k-decision .c-sn-ic::before { content: '?'; }
.c-sn.is-idle.k-output .c-sn-ic { background: color-mix(in srgb, var(--c-ok) 18%, var(--c-surface)); color: var(--c-ok); } .c-sn.is-idle.k-output .c-sn-ic::before { content: '↑'; }
.c-sn.is-done { border-color: color-mix(in srgb, var(--c-ok) 55%, var(--c-line)); background: color-mix(in srgb, var(--c-ok) 9%, var(--c-surface)); }
.c-sn.is-done .c-sn-ic { background: var(--c-ok); border-color: var(--c-ok); color: var(--c-bg); } .c-sn.is-done .c-sn-ic::before { content: '✓'; }
.c-sn.is-failed { border-color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 12%, var(--c-surface)); }
.c-sn.is-failed .c-sn-ic { background: var(--c-danger); border-color: var(--c-danger); color: var(--c-bg); } .c-sn.is-failed .c-sn-ic::before { content: '✕'; }
.c-sn.is-failed small { color: var(--c-danger); }
.c-sn.is-running { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.c-sn.is-running .c-sn-ic { border-color: var(--c-accent); border-right-color: transparent; animation: c-av-spin .8s linear infinite; }
.c-sn.is-running small { color: var(--c-accent); }
.c-sn.is-wait, .c-sn.is-skipped { opacity: .55; }
.c-sn.is-wait .c-sn-ic { border-style: dashed; }
.c-av-detail { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-line); }
.c-av-detail[hidden], .c-av-lines[hidden] { display: none; }
.c-av-logbox .c-av-lines { min-height: 64px; }
.c-av-detail p { margin: 0; color: var(--c-ink-2); font-size: 13.5px; }
.c-av-dh { display: flex; align-items: center; justify-content: space-between; }
.c-av-x { border: 0; background: none; color: var(--c-ink-3); font-size: 18px; cursor: pointer; line-height: 1; }
.c-av-facts { display: grid; grid-auto-flow: column; grid-template-rows: auto auto; justify-content: start; column-gap: 28px; row-gap: 2px; margin: 0; }
.c-av-facts dt, .c-av-facts dd { margin: 0; }
.c-av-facts dt { display: block; font: 500 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-av-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.c-av-msg.is-bad { color: var(--c-danger); }
.c-av-hint[hidden] { display: none; }
.c-av-hint { text-align: center; }
.c-av-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; align-content: start; }
.c-av-box, .c-av-logbox { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); min-width: 0; }
.c-av-box h3, .c-av-logbox h3 { margin: 0; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-av-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding-bottom: 2px; border-bottom: 1px solid var(--c-line); }
.c-av-bar { flex: 1 1 0; max-width: 22px; min-height: 6px; padding: 0; border: 0; border-radius: 3px 3px 0 0; cursor: pointer; background: var(--c-ok); opacity: .75; }
.c-av-bar.is-failed { background: var(--c-danger); } .c-av-bar.is-running, .c-av-bar.is-submitted { background: var(--c-accent); }
.c-av-bar:hover { opacity: 1; }
.c-av-bar[aria-current='true'] { opacity: 1; box-shadow: 0 0 0 2px var(--c-surface), 0 0 0 3px var(--c-ink); }
.c-av-bar:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-av-sched { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-av-sched li { display: grid; }
.c-av-sched li span { font-weight: 600; font-size: 13.5px; }
.c-av-sched li small { color: var(--c-ink-3); font-size: 12px; }
.c-av-sched li.is-off span { color: var(--c-ink-3); }
.c-av-lines { max-height: 180px; overflow-y: auto; padding: 10px 12px; border-radius: var(--radius); background: var(--c-surface-2); font-size: 12px; line-height: 1.6; }
.c-av-lines div { color: var(--c-ink-2); white-space: pre-wrap; word-break: break-word; }
.c-av-lines b { color: var(--c-ink-3); font-weight: 400; margin-right: 8px; }
.c-av-lines i { font-style: normal; color: var(--c-accent); margin-right: 6px; }
.c-av-lines .warn, .c-av-lines .warning { color: var(--c-warn); } .c-av-lines .error { color: var(--c-danger); }
.c-av-loading { padding: 16px; color: var(--c-ink-3); }
.c-av-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.c-av-steps p { margin: 2px 0 6px; color: var(--c-ink-2); }
@media (max-width: 900px) { .c-av-body { grid-template-columns: minmax(0, 1fr); } }
/* Stack the details under the diagram whenever the view itself is too narrow for both, whatever the window size. */
.c-av { container-type: inline-size; }
@container (max-width: 820px) { .c-av-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .c-av-layer { gap: 10px; } .c-av-layer > .c-sn { max-width: 50%; padding: 8px; } }
@media (prefers-reduced-motion: reduce) { .c-av-badge::before, .c-sn-ic, .c-av-wires path.is-live { animation: none !important; } }
/* ── Workflow screen (/forge/workflows/:name): inputs, output, runs and schedules on the left; the step diagram and
   log on the right. One column under 900px of room, inputs first. */
.c-wf-body { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.c-wf-main, .c-wf-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; align-content: start; }
.c-wf-card { display: grid; gap: 12px; min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-wf-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 32px; }
.c-wf-card-h h2 { margin: 0; font: 600 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.c-wf-card-h small { color: var(--c-ink-3); font-size: 12.5px; }
.c-wf-card-h .c-av-say { text-align: right; }
.c-wf-run { display: grid; gap: 12px; }
.c-wf-run .c-form-grid { grid-template-columns: minmax(0, 1fr); }
.c-wf-run .c-toolbar { justify-content: flex-start; }
.c-wf-fail { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--c-danger) 10%, transparent); color: var(--c-danger); font-size: 14px; overflow-wrap: anywhere; }
.c-wf-out { display: grid; gap: 0; margin: 0; }
.c-wf-out-row { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--c-line); }
.c-wf-out-row:first-child { border-top: 0; padding-top: 0; }
.c-wf-out-row.is-table, .c-wf-out-row.is-json { grid-template-columns: minmax(0, 1fr); }
.c-wf-out dt { color: var(--c-ink-3); font-size: 13px; }
.c-wf-out dd { margin: 0; min-width: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.c-wf-out-row.is-table dd { display: grid; gap: 6px; font-weight: 400; }
.c-wf-table { font-size: 13px; }
.c-wf-table th, .c-wf-table td { white-space: nowrap; }
.c-wf-out pre, .c-wf-raw pre { margin: 0; max-height: 240px; overflow: auto; padding: 10px 12px; border-radius: var(--radius); background: var(--c-surface-2); font-size: 12px; font-weight: 400; white-space: pre-wrap; word-break: break-word; }
.c-wf-card .c-wf-raw { margin: 0; }
.c-wf-card .c-wf-raw > summary { padding: 2px 0; font-size: 13px; color: var(--c-ink-3); cursor: pointer; }
.c-wf-raw[open] > summary { margin-bottom: 8px; }
.c-wf-runs, .c-wf-sched { list-style: none; margin: 0; padding: 0; display: grid; }
.c-wf-runs li + li, .c-wf-sched li + li { border-top: 1px solid var(--c-line); }
.c-wf-runrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; border-radius: var(--radius); background: none; color: var(--c-ink); text-align: left; font: inherit; cursor: pointer; }
.c-wf-runrow:hover { background: var(--c-surface-2); }
.c-wf-runrow[aria-current='true'] { background: color-mix(in srgb, var(--c-accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--c-accent); }
.c-wf-runrow[aria-busy='true'] { opacity: .6; }
.c-wf-runrow:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-wf-runrow .c-av-badge { width: 24px; height: 24px; font-size: 12px; }
.c-wf-runrow .c-av-badge.is-running::before, .c-wf-runrow .c-av-badge.is-submitted::before { width: 11px; height: 11px; }
.c-wf-runtxt { display: grid; flex: 1 1 auto; min-width: 0; }
.c-wf-runtxt b { font-weight: 600; font-size: 14px; }
.c-wf-runtxt small, .c-wf-runtime { color: var(--c-ink-3); font-size: 12.5px; }
.c-wf-runtxt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-wf-runtime { flex: none; font-variant-numeric: tabular-nums; }
.c-wf-sched li { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; }
.c-wf-schedtxt { display: grid; flex: 1 1 auto; min-width: 0; }
.c-wf-schedtxt b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.c-wf-schedtxt small { color: var(--c-ink-3); font-size: 12.5px; }
.c-wf-sched li.is-off .c-wf-schedtxt b { color: var(--c-ink-3); }
.c-wf-how .c-av-flow { margin: 0; }
.c-wf-side .c-av-logbox .c-av-lines { max-height: 320px; }
.c-wf .c-btn.sm { min-height: 36px; }
@container (max-width: 820px) { .c-wf-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .c-wf-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .c-wf-card { padding: 12px; }
  .c-wf-out-row { grid-template-columns: minmax(0, 1fr); }
  .c-wf-card-h .c-av-say { text-align: left; }
  .c-wf .c-btn.sm { min-height: 40px; }
  .c-wf-run .c-input, .c-wf-run .c-select, .c-wf-run textarea { font-size: 16px; }
}
/* ── Forge (.c-fx): Home, Your algorithms (Algorithms | Schedules), Library ──────────────────────────────
   Calm grouped lists in the iOS-settings style: one surface, hairline rows, colour only for status. */
.c-fx-tabs { margin-bottom: 16px; }
.c-fx-tabs a { font-size: 16px; padding: 10px 16px; }
.c-fx-seg { margin: 0 0 20px; padding: 4px; }
.c-fx-seg a { padding: 7px 18px; font-size: 14px; }
.c-fx-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.c-fx-sub .c-fx-seg { margin: 0; }
.c-fx-sub-end { justify-content: flex-end; }
.c-fx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
form.c-fx-bar { margin-bottom: 16px; }
.c-fx-say { margin: 4px 0 20px; }
.c-fx-say h2 { margin: 0 0 4px; font-size: 28px; }
.c-fx-say p { margin: 0; color: var(--c-ink-2); }
.c-fx-label { margin: 0 0 8px 4px; font: 600 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.c-fx-list { display: grid; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); overflow: visible; margin-bottom: 20px; }
.c-fx-row { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px; border-bottom: 1px solid var(--c-line); color: var(--c-ink); }
.c-fx-row:last-child { border-bottom: 0; }
a.c-fx-row:hover, .c-fx-main:hover b { color: var(--c-accent); }
.c-fx-row.is-off .c-fx-txt b, .c-fx-row.is-off .c-fx-time { color: var(--c-ink-3); }
.c-fx-main { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.c-fx-txt { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.c-fx-txt b { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-fx-txt small { color: var(--c-ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.c-fx-soft { color: var(--c-ink-3); font-weight: 400; }
.c-fx-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.c-fx-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.c-fx-chev { color: var(--c-ink-3); font-size: 22px; line-height: 1; padding: 4px 2px; text-decoration: none; }
.c-fx-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font: 700 14px var(--font-display);
  background: color-mix(in srgb, var(--fx) 16%, var(--c-surface)); color: var(--fx); }
.c-fx-tile.is-big { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }
.c-fx-tile.t0 { --fx: var(--c-accent); } .c-fx-tile.t1 { --fx: var(--c-ok); } .c-fx-tile.t2 { --fx: var(--c-warn); }
.c-fx-tile.t3 { --fx: var(--c-info); } .c-fx-tile.t4 { --fx: var(--c-danger); } .c-fx-tile.t5 { --fx: var(--c-ink-2); }
.c-fx-state { display: inline-flex; align-items: center; gap: 7px; flex: none; font-size: 13.5px; color: var(--c-ink-2); white-space: nowrap; text-decoration: none; }
.c-fx-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink-3); }
.c-fx-state.is-complete::before { background: var(--c-ok); }
.c-fx-state.is-failed { color: var(--c-danger); font-weight: 500; } .c-fx-state.is-failed::before { background: var(--c-danger); }
.c-fx-state.is-running { color: var(--c-accent); } .c-fx-state.is-running::before { background: var(--c-accent); }
.c-fx-state.is-off::before { background: var(--c-line); }
.c-fx-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c-ink-3); }
.c-fx-dot.is-failed { background: var(--c-danger); }
.c-fx-alert { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 12px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); text-decoration: none; }
.c-fx-alert:hover { border-color: var(--c-danger); color: var(--c-ink); }
.c-fx-alert .c-fx-txt b { font-size: 16px; }
.c-fx-alert .c-fx-txt small { -webkit-line-clamp: 2; }
.c-fx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0 24px; }
.c-fx-stat { display: grid; gap: 6px; align-content: start; padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); min-width: 0; }
.c-fx-stat > span { font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.c-fx-stat b { font: 800 38px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.c-fx-stat b em { font-style: normal; color: var(--c-ink-3); }
.c-fx-stat small { color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-fx-at { flex: none; width: 56px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-fx-when { flex: none; color: var(--c-ink-3); font-size: 13px; }
.c-fx-hello { padding: 36px 32px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-fx-hello h2 { margin: 0 0 6px; font-size: 28px; }
.c-fx-hello p { margin: 0 0 18px; color: var(--c-ink-2); max-width: 560px; }
.c-fx-alarm { min-height: 84px; }
.c-wf-row { flex-wrap: wrap; align-items: flex-start; }
.c-wf-row .c-fx-main, .c-wf-row details { flex: 1 1 100%; }
.c-wf { margin-top: 28px; }
.c-wf h2 { margin: 0 0 4px; }
.c-wf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; color: var(--c-ink-2); font-size: 14px; }
.c-wf-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.c-wf-form { display: grid; gap: 12px; margin-top: 8px; max-width: 520px; }
.c-wf summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; }
.c-wf pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-fx-time { font: 300 40px/1.05 var(--font-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--c-ink); }
.c-fx-time.is-words { font-size: 26px; padding: 4px 0 2px; }
.c-fx-sheet { max-width: 720px; margin: 0 auto 24px; }
.c-fx-foot { margin: -8px 4px 0; }
.c-fx-more { margin-top: 4px; }
.c-fx-more > summary { cursor: pointer; padding: 10px 4px; color: var(--c-ink-2); font-weight: 500; }
.c-av-logbox.c-fx-more > summary { padding: 0; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-fx-back { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 8px; text-decoration: none; }
.c-fx-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 28px; }
.c-fx-hero h1 { margin: 0 0 2px; }
.c-fx-hero p { margin: 0; color: var(--c-ink-2); font-size: 16px; }
.c-fx-hero small { color: var(--c-ink-3); font-size: 12px; }
.c-fx-group { display: grid; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-fx-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 14px; border-bottom: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; }
.c-fx-kv:last-child { border-bottom: 0; }
.c-fx-kv.is-stack { display: grid; justify-content: stretch; gap: 6px; padding: 12px 14px; }
.c-fx-kv.is-stack .c-av-say { text-align: left; }
.c-fx-get { background: var(--c-accent-soft); border-color: transparent; color: var(--c-accent); font-weight: 600; padding: 5px 16px; }
.c-fx-kv > span:first-child { flex: none; }
.c-fx-kv .c-fx-soft { text-align: right; min-width: 0; overflow-wrap: anywhere; }
a.c-fx-kv:hover > span:first-child { color: var(--c-accent); }
/* iOS-style on/off switch (role="switch", aria-checked). */
.c-switch { position: relative; flex: none; width: 52px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: var(--c-line); cursor: pointer; transition: background .15s; }
.c-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.c-switch[aria-checked='true'] { background: var(--c-btn); }
.c-switch[aria-checked='true']::after { left: 23px; }
.c-switch:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (max-width: 720px) {
  .c-wf .c-btn { min-height: 40px; }
  .c-fx-tiles { grid-template-columns: minmax(0, 1fr); }
  .c-fx-row { flex-wrap: wrap; }
  .c-fx-row .c-fx-main { flex-basis: 100%; }
  .c-fx-row .c-fx-acts { margin-left: auto; }
  .c-fx-time { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .c-switch, .c-switch::after { transition: none; } }
/* Members: team-role chips in the person panel and the "What can I do here?" note. */
.c-ppl-chip-x { margin-left: 6px; padding: 0 4px; border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; }
.c-ppl-chip-x:hover { color: var(--c-danger); }
[data-d='roles'] .c-mem-roles { margin-bottom: 10px; }
.c-ppl-help { margin-top: 16px; color: var(--c-ink-2); }
.c-ppl-help summary { cursor: pointer; font-weight: 600; color: var(--c-ink); }
.c-ppl-help ul { margin: 6px 0 0; padding-left: 20px; }

/* ── Settings, App usage (.c-au) ──────────────────────────────────────────
   CommWise's App Management: the monthly cost beside four tiles, period and status switches, number filters,
   then one row per app. Under 760px the table becomes cards, each figure labelled by its column. */
.c-au, .c-au-modal { --au-logic: var(--c-accent); --au-data: #b18cff; --au-conn: var(--c-warn); --au-users: var(--c-ok); --au-data-ink: color-mix(in srgb, var(--au-data) 72%, var(--c-ink)); }
.c-au { display: grid; gap: 16px; min-width: 0; }
.c-au.is-busy { opacity: .6; pointer-events: none; transition: opacity .15s ease; }
.c-au-loading, .c-au-state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--c-ink-3); text-align: center; flex-wrap: wrap; }
.c-au-state { flex-direction: column; background: var(--c-surface); border-radius: 8px; box-shadow: 0 0 0 1px var(--c-line); }
.c-au-state strong { color: var(--c-ink); font-weight: 500; max-width: 52ch; }
.c-au-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-line); border-top-color: var(--c-accent); animation: c-au-spin .8s linear infinite; flex: none; }
@keyframes c-au-spin { to { transform: rotate(360deg); } }

.c-au-kpis-wrap { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 12px; }
.c-au-hero { display: grid; align-content: start; gap: 4px; padding: 18px 20px; border-radius: 8px; color: var(--c-ink);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c-accent) 26%, transparent), transparent 60%), var(--c-surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-accent) 35%, var(--c-line)); }
.c-au-hero > span { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--c-ink-3); }
.c-au-hero strong { font-family: var(--font-display); font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.c-au-hero strong small { margin-left: 6px; font-size: 15px; font-weight: 500; color: var(--c-ink-3); letter-spacing: 0; }
.c-au-hero > small { color: var(--c-ink-2); font-size: 13px; }
.c-au-notes { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; color: var(--c-ink-3); }
.c-au-notes li::before { content: '•'; margin-right: 6px; color: var(--c-warn); }
.c-au-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.c-au-kpi { display: grid; align-content: start; gap: 4px; padding: 16px; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); min-width: 0; }
.c-au-kpi span { font-size: 12.5px; color: var(--c-ink-3); }
.c-au-kpi strong { font-family: var(--font-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.c-au-kpi small { font-size: 12px; color: var(--c-ink-3); }
.c-au-kpi.is-warn strong { color: var(--c-warn); }
.c-au-kpi.is-ok strong { color: var(--c-ok); }

.c-au-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c-au-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--c-surface-2); box-shadow: inset 0 0 0 1px var(--c-line); }
.c-au-seg button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 6px; background: none; color: var(--c-ink-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.c-au-seg button:hover { color: var(--c-ink); }
.c-au-seg button[aria-pressed='true'] { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 1px var(--c-line); }
.c-au-seg button:focus-visible, .c-au-chip:focus-visible, .c-au-name:focus-visible, .c-au-more:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-au-search { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); color: var(--c-ink-3); }
.c-au-search:focus-within { box-shadow: 0 0 0 2px var(--c-accent); }
.c-au-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--c-ink); font: inherit; font-size: 16px; outline: none; }
.c-au-sort-mobile { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--c-ink-3); }
.c-au-sort-mobile select { min-height: 40px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: 16px; }

.c-au-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-au-range { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); font-size: 13px; color: var(--c-ink-2); }
.c-au-range.is-on { box-shadow: 0 0 0 1px var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); color: var(--c-ink); }
.c-au-range input { min-height: 28px; border: 0; border-radius: 6px; background: var(--c-surface-2); color: var(--c-ink); font: inherit; font-size: 13px; padding: 2px 6px; }
.c-au-range input { width: 64px; font-variant-numeric: tabular-nums; }
.c-au-range em { font-style: normal; color: var(--c-ink-3); }
.c-au-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.c-au-chip:hover { color: var(--c-ink); border-color: var(--c-ink-3); }
.c-au-chip.is-active { border-color: var(--c-warn); color: var(--c-ink); background: color-mix(in srgb, var(--c-warn) 14%, var(--c-surface)); }
.c-au-chip span { padding: 0 6px; border-radius: 4px; background: var(--c-surface-2); font-variant-numeric: tabular-nums; }
.c-au-chip.is-clear { border-style: dashed; }
.c-au-chip[hidden] { display: none; }
.c-au-chip.is-active { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface)); }
.c-au-ranges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .c-au-ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c-au-ranges .c-au-range { display: grid; min-width: 0; gap: 6px; padding: 10px 12px; min-height: 0; border-radius: 10px; }
.c-au-range-label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--c-ink-3); }
.c-au-range-row { display: flex; min-width: 0; align-items: center; gap: 6px; }
.c-au-ranges .c-au-range input { flex: 1 1 0; width: 0; min-width: 0; min-height: 32px; border: 1px solid var(--c-line); background: var(--c-surface); }
.c-au-ranges .c-au-range input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 0; }
.c-au-op { display: inline-flex; flex: 0 0 auto; padding: 2px; border-radius: 8px; background: var(--c-surface-2); }
.c-au-op button { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink-3); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.c-au-op button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.c-au-kpi.is-action { font: inherit; color: inherit; text-align: left; border: 0; cursor: pointer; }
.c-au-kpi.is-action:hover { box-shadow: 0 0 0 1px var(--c-ink-3); }
.c-au-kpi.is-action:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-au-op button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-au-match { margin-left: auto; font-size: 13px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }

.c-au-table-wrap { border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); overflow-x: auto; }
.c-au-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.c-au-table th { padding: 0; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--c-ink-3); border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.c-au-table th button { display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.c-au-table th.num button { justify-content: flex-end; }
.c-au-table th[aria-sort='ascending'], .c-au-table th[aria-sort='descending'] { color: var(--c-ink); }
.c-au-arrow { font-size: 9px; color: var(--c-accent); min-width: 9px; }
.c-au-table td { padding: 12px 14px; border-top: 1px solid var(--c-line); vertical-align: middle; }
.c-au-table tbody tr:first-child td { border-top: 0; }
.c-au-table tbody tr:hover td { background: color-mix(in srgb, var(--c-accent) 5%, transparent); }
.c-au-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-au-table tr.is-idle .c-au-name { color: var(--c-ink-2); }
.c-au-actions-col { width: 52px; }
.c-au-app { min-width: 220px; }
.c-au-name { padding: 0; border: 0; background: none; color: var(--c-ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.c-au-name:hover { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.c-au-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; vertical-align: middle; }
.c-au-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 18px; background: var(--c-surface-2); color: var(--c-ink-2); white-space: nowrap; }
.c-au-pill.is-live { background: color-mix(in srgb, var(--c-ok) 16%, transparent); color: var(--c-ok); }
.c-au-pill.is-idle { background: color-mix(in srgb, var(--c-warn) 16%, transparent); color: var(--c-warn); }
.c-au-pill.is-pending { background: color-mix(in srgb, var(--au-data) 16%, transparent); color: var(--au-data-ink); }
.c-au-pill.is-premium { background: color-mix(in srgb, var(--c-warn) 16%, transparent); color: var(--c-warn); }
.c-au-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--c-ink-3); }
.c-au-bar { display: block; height: 4px; margin-top: 6px; margin-left: auto; width: 88px; border-radius: 2px; background: var(--c-surface-2); overflow: hidden; }
.c-au-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c-accent), var(--au-data)); }
.c-au-price strong { font-weight: 600; }
.c-au-price small { display: block; font-size: 11.5px; color: var(--c-ok); }
.c-au-muted { color: var(--c-ink-3); font-size: 13px; }
.c-au-empty { padding: 40px 16px !important; text-align: center; color: var(--c-ink-3); }
.c-au-foot { margin: 0; padding: 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--c-ink-3); max-width: 90ch; }

.c-au-menu-wrap { position: relative; display: flex; justify-content: flex-end; }
.c-au-more { width: 36px; height: 36px; border-radius: 8px; border: 0; background: none; color: var(--c-ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.c-au-more:hover, .c-au-more[aria-expanded='true'] { background: var(--c-surface-2); color: var(--c-ink); }
.c-au-menu { position: fixed; z-index: 60; display: grid; min-width: 210px; padding: 6px; border-radius: 10px; background: var(--c-surface); box-shadow: var(--shadow), 0 0 0 1px var(--c-line); }
.c-au-menu[hidden] { display: none; }
.c-au-menu [role='menuitem'] { display: block; min-height: 40px; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--c-ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.c-au-menu [role='menuitem']:hover, .c-au-menu [role='menuitem']:focus-visible { background: var(--c-surface-2); outline: none; }

/* How the credits add up: a dialog over the page, a full-height sheet on phones. */
body.c-au-modal-open { overflow: hidden; }
.c-au-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.c-au-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 16, .62); backdrop-filter: blur(3px); animation: c-au-fade .15s ease; }
.c-au-dialog { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(640px, 100%); max-height: min(86vh, 860px); border-radius: 14px; background: var(--c-bg); box-shadow: var(--shadow), 0 0 0 1px var(--c-line); animation: c-au-rise .18s ease; }
@keyframes c-au-fade { from { opacity: 0; } }
@keyframes c-au-rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.c-au-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.c-au-dialog-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.c-au-dialog-head p { margin: 6px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.c-au-close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 22px; line-height: 1; cursor: pointer; }
.c-au-close:hover { color: var(--c-ink); }
.c-au-dialog-body { overflow-y: auto; padding: 4px 22px 18px; display: grid; gap: 14px; align-content: start; }
.c-au-dialog-body h3 { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--c-ink-3); }
.c-au-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--c-line); }
.c-au-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.c-au-figures div { display: grid; gap: 2px; padding: 12px; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); min-width: 0; }
.c-au-figures span { font-size: 12px; color: var(--c-ink-3); }
.c-au-figures strong { font-family: var(--font-display); font-size: 19px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.c-au-split > span { display: block; height: 100%; }
.c-au-split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--c-surface-2); }
.c-au-split span + span { box-shadow: -2px 0 0 var(--c-bg); }
.c-au-split .is-engine, .c-au-legend .is-engine { background: var(--au-logic); }
.c-au-split .is-data, .c-au-legend .is-data { background: var(--au-data); }
.c-au-split .is-connectors, .c-au-legend .is-connectors { background: var(--au-conn); }
.c-au-split .is-users, .c-au-legend .is-users { background: var(--au-users); }
.c-au-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--c-ink-2); }
.c-au-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.c-au-legend strong { color: var(--c-ink); font-variant-numeric: tabular-nums; }
.c-au-split-table { width: 100%; border-collapse: collapse; font-size: 14px; border-radius: 8px; overflow: hidden; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.c-au-split-table th { padding: 10px 12px; font-size: 12px; font-weight: 600; text-align: left; color: var(--c-ink-3); border-bottom: 1px solid var(--c-line); }
.c-au-split-table td { padding: 10px 12px; border-top: 1px solid var(--c-line); vertical-align: top; }
.c-au-split-table tbody tr:first-child td { border-top: 0; }
.c-au-split-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-au-split-table tr.is-sum td { font-weight: 700; background: var(--c-surface-2); }
.c-au-split-table details { margin-top: 4px; font-size: 12.5px; color: var(--c-ink-3); }
.c-au-split-table summary { cursor: pointer; }
.c-au-split-table details ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 2px; }
.c-au-split-table code, .c-au-split-list code { font-family: var(--font-mono); font-size: 11.5px; color: var(--c-ink-3); }
.c-au-split-list { margin: 0; padding: 0; list-style: none; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.c-au-split-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; font-size: 14px; flex-wrap: wrap; }
.c-au-split-list li + li { border-top: 1px solid var(--c-line); }
.c-au-split-list time { font-size: 12.5px; color: var(--c-ink-3); }
.c-au-note { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: color-mix(in srgb, var(--au-data) 12%, transparent); color: var(--c-ink-2); }

@media (max-width: 960px) {
  .c-au-kpis-wrap { grid-template-columns: minmax(0, 1fr); }
  .c-au-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) { .c-au-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .c-au-sort-mobile { display: inline-flex; }
  .c-au-search { flex-basis: 100%; }
  .c-au-match { margin-left: 0; width: 100%; }
  .c-au-table-wrap { background: none; box-shadow: none; overflow: visible; }
  .c-au-table, .c-au-table tbody { display: block; }
  .c-au-table thead { display: none; }
  .c-au-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 10px; padding: 14px; border-radius: 8px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); position: relative; }
  .c-au-table td { display: block; padding: 0; border: 0; }
  .c-au-table tbody tr:hover td { background: none; }
  .c-au-table td.c-au-app { grid-column: 1 / -1; min-width: 0; padding-right: 44px; }
  .c-au-table td.num { text-align: left; white-space: normal; }
  .c-au-table td.num::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--c-ink-3); }
  .c-au-table td.c-au-actions { position: absolute; top: 8px; right: 8px; }
  .c-au-table td.c-au-empty { grid-column: 1 / -1; }
  .c-au-bar { margin-left: 0; }
  .c-au-pills { margin: 6px 0 0; display: flex; }
  .c-au-modal { padding: 0; place-items: end stretch; }
  .c-au-dialog { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .c-au-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-au-dialog-head, .c-au-dialog-body, .c-au-dialog-foot { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) { .c-au-ranges { grid-template-columns: minmax(0, 1fr); } .c-au-kpi strong { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .c-au-spinner, .c-au-dialog, .c-au-backdrop { animation: none; } }

/* ── Admin, App Credits (.c-ap) ─────────────────────────────────────────── */
.c-ap { display: grid; gap: 16px; }
.c-ap-card { padding: 20px; border-radius: 10px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); min-width: 0; }
.c-ap-card > header { margin-bottom: 14px; }
.c-ap-card h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.c-ap-card > header p { margin: 4px 0 0; color: var(--c-ink-3); font-size: 14px; max-width: 70ch; }
.c-ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.c-ap-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.c-ap-field-label { font-weight: 600; font-size: 14px; }
.c-ap-input { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 8px; background: var(--c-bg); box-shadow: 0 0 0 1px var(--c-line); }
.c-ap-input:focus-within { box-shadow: 0 0 0 2px var(--c-accent); }
.c-ap-input input { flex: 1; width: 100%; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; color: var(--c-ink); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; outline: none; }
.c-ap-input input:disabled { color: var(--c-ink-2); }
.c-ap-input em, .c-ap-input small { font-style: normal; color: var(--c-ink-3); font-size: 13px; }
.c-ap-help { font-size: 12.5px; color: var(--c-ink-3); }
.c-ap-example { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--c-surface-2); font-size: 14px; color: var(--c-ink-2); }
.c-ap-example strong { color: var(--c-ink); }
.c-ap-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-ap-msg { font-size: 14px; color: var(--c-ink-3); }
.c-ap-msg.is-ok { color: var(--c-ok); }
.c-ap-msg.is-bad { color: var(--c-danger); }
.c-ap-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.c-ap-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--c-ink-3); border-bottom: 1px solid var(--c-line); }
.c-ap-table td { padding: 10px 12px; border-top: 1px solid var(--c-line); }
.c-ap-pill { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--c-surface-2); color: var(--c-ink-2); }
.c-ap-pill.is-premium { background: color-mix(in srgb, var(--c-warn) 16%, transparent); color: var(--c-warn); }
.c-ap-pill.is-free { background: color-mix(in srgb, var(--c-ok) 16%, transparent); color: var(--c-ok); }
.c-ap-pill.is-bad { background: color-mix(in srgb, var(--c-danger) 16%, transparent); color: var(--c-danger); }
@media (max-width: 520px) { .c-ap-card { padding: 16px; } }

/* Completa Apps list: removable filter chips beside the status tabs, and the registry card's extras. */
.c-apps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.c-apps-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 6px 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c-accent) 14%, var(--c-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-accent) 40%, var(--c-line)); color: var(--c-ink); font-size: 13px; text-decoration: none; }
.c-apps-chip span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--c-ink-2); font-size: 15px; line-height: 1; }
.c-apps-chip:hover span { background: var(--c-surface-2); color: var(--c-ink); }
.c-apps-chip:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-cp-template { --c-tag-accent: var(--c-accent); }
.c-cp-category { --c-tag-accent: #b18cff; }
.c-cp-undeployed { font-size: 12px; color: var(--c-warn); }
.c-cp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-cp-facts div { display: grid; gap: 2px; min-width: 0; }
.c-cp-facts dt { font-size: 12px; color: var(--c-ink-3); }
.c-cp-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
/* Registry cards have no spaces, so the grid shows the summary and template / category / tags in their place. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-cp-card .c-apps-desc { display: -webkit-box; padding: 12px 12px 0; min-height: calc(2 * 1.45em + 12px); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-cp-card .c-apps-tags { display: flex; padding: 8px 12px 4px; }

/* App Library: cards open the preview modal; tags show as a count, listed on hover; Who it's for in the sidebar. */
.c-lib-card { cursor: pointer; }
.c-lib-card .c-apps-tag, .c-lib-cat-link { text-decoration: none; }
.c-lib-cat-link:hover .c-apps-fact-text { text-decoration: underline; text-underline-offset: 3px; }
/* The price or status pill and the staff Legacy label: side by side at the top of the grid cover, where the My Apps
   status pill sits, above the cover's open link so the price breakdown shows on hover (a click still opens the
   preview through the card); in list and compact views each takes its own column. */
.c-lib-badges { display: contents; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-lib-card[class*='c-cov-'] .c-lib-badges { position: absolute; z-index: 2; top: 13px; left: 14px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 130px); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-lib-card[class*='c-cov-'] .c-apps-titleline .c-lib-badges .c-apps-customer { max-width: none; min-width: 0; flex: 0 1 auto; }
.c-lib-who { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.c-lib-who .c-apps-side-head { margin: 0 8px 6px; }
.c-lib-who-search { margin: 0 0 6px; padding: 6px 10px; font-size: 13px; }
.c-lib-who .c-space-link[aria-current='page'] { font-weight: 700; }
.c-lib-who-more { margin: 4px 0 0 8px; }
.c-lib-who li[hidden], .c-lib-pick label[hidden] { display: none; }
.c-lib-pick { border: 0; margin: 4px 0 0; padding: 0; }
.c-lib-pick .c-input { padding: 6px 10px; font-size: 13px; margin-bottom: 6px; }
.c-lib-pick-list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.c-apps-fields .c-lib-pick-list label { flex-direction: row; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 8px; color: var(--c-ink); cursor: pointer; }
.c-lib-pick-list label:hover { background: var(--c-surface-2); }
.c-lib-pick-list small { margin-left: auto; color: var(--c-ink-3); }
.c-lib-filter { width: min(360px, 86vw); }
.c-lib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.c-lib-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); color: var(--c-ink-2); font-size: 12.5px; font-weight: 600; }
.c-lib-chip:hover { border-color: var(--c-accent); color: var(--c-accent); }
.c-lib-flash { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: var(--c-ink); color: var(--c-bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.c-lib-flash[hidden] { display: none; }
.c-lib-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.c-lib-edit-wide { grid-column: 1 / -1; }
.c-lib-edit-label { font-size: 13px; color: var(--c-ink-2); font-weight: 500; display: block; margin-bottom: 6px; }
.c-lib-edit .c-apps-tags button.c-apps-tag { cursor: pointer; }
.c-lib-edit-app { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 12px 16px; }
.c-lib-edit-app legend { padding: 0 6px; color: var(--c-ink-2); font-weight: 600; }
.c-lib-edit .c-toolbar { margin-top: 16px; }

/* App Library preview modal: the live app beside its summary and actions, then the listing in two columns. */
body.c-lib-modal-open { overflow: hidden; }
.c-lib-modal[hidden] { display: none !important; }
.c-lib-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; }
.c-lib-modal-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--c-bg) 78%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s ease; }
.c-lib-modal-dialog { position: relative; width: min(1400px, 100%); max-height: 100%; border: 1px solid var(--c-line); border-radius: 18px; background: var(--c-surface); color: var(--c-ink); box-shadow: 0 32px 80px rgba(0, 0, 0, .45); overflow: auto; overscroll-behavior: contain; outline: none; transform: translateY(12px) scale(.985); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.c-lib-modal.is-open .c-lib-modal-backdrop { opacity: 1; }
.c-lib-modal.is-open .c-lib-modal-dialog { transform: none; opacity: 1; }
.c-lib-close { position: sticky; top: 14px; float: right; z-index: 3; display: inline-grid; place-items: center; width: 38px; height: 38px; margin: 14px 14px -52px 0; padding: 0; border: 1px solid var(--c-line); border-radius: 10px; background: color-mix(in srgb, var(--c-surface) 92%, transparent); color: var(--c-ink-2); cursor: pointer; }
.c-lib-close:hover, .c-lib-close:focus-visible { border-color: var(--c-accent); color: var(--c-ink); }
.c-lib-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); border-bottom: 1px solid var(--c-line); }
.c-lib-preview { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 22px; background: radial-gradient(700px 320px at 50% 0%, color-mix(in srgb, var(--c-accent) 10%, transparent), transparent 70%), var(--c-bg); border-right: 1px solid var(--c-line); }
.c-lib-preview-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.c-lib-devices { display: inline-flex; padding: 4px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); }
.c-lib-device { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--c-ink-2); font: 600 13px/1 var(--font-body); cursor: pointer; }
.c-lib-device.is-active { background: var(--c-ink); color: var(--c-bg); }
.c-lib-zoom { color: var(--c-ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.c-lib-zoom:empty { display: none; }
.c-lib-preview-open { color: var(--c-ink-2); font-size: 12.5px; font-weight: 600; }
.c-lib-preview-open:hover { color: var(--c-accent); }
.c-lib-preview-open[hidden] { display: none; }
.c-lib-preview-pin { position: sticky; top: 0; display: flex; flex-direction: column; }
.c-lib-stage { position: relative; display: flex; align-items: flex-start; justify-content: center; height: clamp(380px, 62vh, 680px); }
.c-lib-device-frame { position: relative; display: flex; width: 100%; height: 100%; border: 1px solid var(--c-line); border-radius: 12px; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); overflow: hidden; }
.c-lib-stage.is-mobile { align-items: center; }
.c-lib-stage.is-mobile .c-lib-device-frame { width: 390px; max-width: 100%; padding: 12px; border-radius: 40px; background: #0e0f10; box-shadow: 0 0 0 2px var(--c-line), 0 24px 60px rgba(0, 0, 0, .45); }
.c-lib-stage.is-mobile .c-lib-iframe { border-radius: 28px; }
.c-lib-iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.c-lib-stage.is-desktop .c-lib-iframe { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.c-lib-stage-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--c-ink-2); font-size: 14px; background: var(--c-surface-2); border-radius: 12px; }
.c-lib-stage-note[hidden] { display: none; }
.c-lib-side-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 30px 30px 28px; }
.c-lib-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding-right: 48px; color: var(--c-ink-3); font-size: 13px; }
.c-lib-kicker { color: var(--c-accent); font-weight: 700; }
.c-lib-crumb-cat:empty { display: none; }
.c-lib-crumb-cat::before { content: '›'; margin-right: 8px; color: var(--c-ink-3); }
.c-lib-side-panel h2 { margin: 0; font: 800 clamp(24px, 2.6vw, 34px)/1.15 var(--font-display, var(--font-body)); letter-spacing: -.01em; overflow-wrap: anywhere; }
.c-lib-summary { margin: 0; color: var(--c-ink-2); font-size: 15.5px; line-height: 1.6; }
.c-lib-summary:empty { display: none; }
.c-lib-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; color: var(--c-ink-3); font-size: 13.5px; }
.c-lib-free, .c-lib-new, .c-lib-state { padding: 3px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; }
.c-lib-free { border-color: color-mix(in srgb, var(--c-ok) 50%, transparent); background: color-mix(in srgb, var(--c-ok) 12%, transparent); color: var(--c-ok); }
.c-lib-new { border-color: color-mix(in srgb, var(--c-info) 50%, transparent); background: color-mix(in srgb, var(--c-info) 12%, transparent); color: var(--c-info); }
.c-lib-state { border-color: color-mix(in srgb, var(--c-warn) 50%, transparent); background: color-mix(in srgb, var(--c-warn) 12%, transparent); color: var(--c-warn); }
.c-lib-new[hidden], .c-lib-state[hidden], .c-lib-usage[hidden] { display: none; }
.c-lib-usage { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--c-ink-3); font-size: 13px; }
.c-lib-usage-item::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--c-ok); vertical-align: middle; }
.c-lib-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; margin-top: 6px; }
.c-lib-actions:empty { display: none; }
.c-lib-actions > *:last-child:nth-child(odd) { grid-column: 1 / -1; }
.c-lib-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 14px; text-align: center; border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-ink); font: 600 14px/1 var(--font-body); cursor: pointer; transition: border-color .15s, background .15s; }
.c-lib-btn:hover, .c-lib-btn:focus-visible { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 12%, transparent); color: var(--c-ink); }
.c-lib-btn.c-lib-assistant-claude { border-color: var(--c-btn); background: var(--c-btn); color: var(--c-accent-ink); font-weight: 700; }
.c-lib-btn.c-lib-assistant-claude:hover { filter: brightness(1.05); color: var(--c-accent-ink); }
.c-lib-btn.c-lib-copy { border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 10%, transparent); color: var(--c-accent); }
.c-lib-action-note { margin: 0; color: var(--c-ok); font-size: 12.5px; }
.c-lib-action-note[hidden] { display: none; }
.c-lib-chips-block[hidden] { display: none; }
.c-lib-chips-block h3, .c-lib-section h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.c-lib-chips-block { margin-top: 8px; }
.c-lib-chips-block .c-lib-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c-lib-chips-block .c-lib-chip { padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--c-ink); background: var(--c-surface-2); }
.c-lib-who-chips .c-lib-chip { border-color: color-mix(in srgb, var(--c-accent) 35%, var(--c-line)); background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.c-lib-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.c-lib-modal-tags:empty { display: none; }
.c-lib-tag { padding: 3px 10px; border: 1px solid var(--c-tag-accent, var(--c-line)); border-radius: 999px; color: var(--c-tag-accent, var(--c-ink-2)); background: color-mix(in srgb, var(--c-tag-accent, var(--c-ink-3)) 14%, transparent); font-size: 12px; font-weight: 600; }
.c-lib-loading { display: flex; align-items: center; gap: 10px; color: var(--c-ink-3); font-size: 14px; }
.c-lib-loading[hidden] { display: none; }
.c-lib-spinner { width: 16px; height: 16px; border: 2px solid var(--c-line); border-top-color: var(--c-accent); border-radius: 50%; animation: c-lib-spin .8s linear infinite; }
@keyframes c-lib-spin { to { transform: rotate(360deg); } }
.c-lib-error { padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--c-danger) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--c-danger) 10%, transparent); color: var(--c-danger); font-size: 14px; }
.c-lib-error[hidden] { display: none; }
.c-lib-more { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 48px; padding: 36px 40px 44px; }
.c-lib-more.is-main-empty { grid-template-columns: minmax(0, 1fr); }
.c-lib-more.is-main-empty .c-lib-main { display: none; }
.c-lib-main, .c-lib-aside { min-width: 0; }
.c-lib-section + .c-lib-section { margin-top: 28px; }
.c-lib-about h3 { font-size: 20px; }
.c-lib-section p { margin: 0 0 12px; color: var(--c-ink-2); font-size: 15px; line-height: 1.7; }
.c-lib-muted, .c-lib-section p.c-lib-muted { color: var(--c-ink-3); font-size: 13.5px; }
.c-lib-list { margin: 0; padding: 0 0 0 20px; color: var(--c-ink-2); }
.c-lib-list li { margin: 0 0 9px; padding-left: 4px; font-size: 15px; line-height: 1.6; }
.c-lib-list li::marker { color: var(--c-accent); }
.c-lib-list li strong { color: var(--c-ink); }
.c-lib-cards { display: grid; gap: 10px; }
.c-lib-card-item { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface-2); }
.c-lib-card-item strong { font-size: 14.5px; }
.c-lib-card-item span { color: var(--c-ink-2); font-size: 13.5px; line-height: 1.55; }
.c-lib-authoring-hint { margin-top: 18px; padding: 10px 12px; border: 1px dashed var(--c-line); border-radius: 10px; }
.c-lib-details dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; margin: 0; }
.c-lib-details dl > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-lib-details dt { color: var(--c-ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.c-lib-details dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.c-lib-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.c-lib-related-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface-2); color: var(--c-ink); transition: border-color .15s; }
.c-lib-related-card:hover, .c-lib-related-card:focus-visible { border-color: var(--c-accent); color: var(--c-ink); }
.c-lib-related-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.c-lib-related-desc { color: var(--c-ink-3); font-size: 12.5px; line-height: 1.4; }
@media (max-width: 1080px) {
  .c-lib-modal { padding: 0; }
  .c-lib-modal-dialog { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .c-lib-top, .c-lib-more { grid-template-columns: minmax(0, 1fr); }
  .c-lib-preview { border-right: 0; border-bottom: 1px solid var(--c-line); }
  .c-lib-stage { height: 60vh; }
  .c-lib-more { gap: 28px; padding: 28px 20px 36px; }
}
@media (max-width: 600px) {
  .c-lib-side-panel { padding: 22px 16px; }
  .c-lib-preview { padding: 14px 10px 16px; }
  .c-lib-device span { display: none; }
  .c-lib-preview-bar { justify-content: flex-start; padding-right: 48px; }
  .c-lib-zoom { display: none; }
  .c-lib-stage.is-mobile .c-lib-device-frame { width: 100%; padding: 6px; border-radius: 24px; }
  .c-lib-edit-grid, .c-lib-edit-app { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .c-lib-modal-backdrop, .c-lib-modal-dialog { transition: none; }
  .c-lib-spinner { animation: none; }
}
/* App Library price: a till receipt. Paper with torn edges (mask), dotted leaders, a double rule over the total, a
   barcode, and a short print-out reveal. A FREE stamp shows when nothing is chargeable. */
.c-apps-pill.c-lib-price-pill { color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 14%, transparent); }
.c-apps-pill.c-lib-price-pill::before { display: none; }
.c-lib-receipt-slot { margin-top: 4px; filter: drop-shadow(0 12px 22px color-mix(in srgb, #000 35%, transparent)); }
.c-lib-receipt-slot[hidden] { display: none; }
.c-lib-receipt { --c-lib-paper: color-mix(in srgb, var(--c-ink) 5%, var(--c-surface)); --c-lib-tooth: 14px; position: relative; padding: 18px 18px 20px; background: var(--c-lib-paper); color: var(--c-ink); font: 500 12px/1.45 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--c-lib-tooth) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--c-lib-tooth) 51% repeat-x; mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--c-lib-tooth) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--c-lib-tooth) 51% repeat-x; animation: c-lib-print .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes c-lib-print { from { clip-path: inset(0 0 100% 0); transform: translateY(-10px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.c-lib-r-head { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.c-lib-r-head strong { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.c-lib-r-head > span { color: var(--c-ink-3); font-size: 10.5px; letter-spacing: .06em; }
.c-lib-r-sect { margin-top: 10px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--c-ink) 30%, transparent); }
.c-lib-r-cols { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--c-ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; }
.c-lib-r-row { display: flex; align-items: baseline; gap: 6px; padding: 1px 0; }
.c-lib-r-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-lib-r-row small { color: var(--c-ink-3); font-size: 10.5px; margin-left: 6px; }
.c-lib-r-row > i { flex: 1; min-width: 12px; border-bottom: 1px dotted color-mix(in srgb, var(--c-ink) 35%, transparent); transform: translateY(-4px); }
.c-lib-r-row > b { font-weight: 700; white-space: nowrap; }
.c-lib-r-row.is-sub > span, .c-lib-r-row.is-sub > b { color: var(--c-ink-2); }
.c-lib-r-row.is-free > b { color: var(--c-ok); }
.c-lib-r-users { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--c-ink) 30%, transparent); }
.c-lib-r-users label { margin-right: auto; }
.c-lib-r-users small { color: var(--c-ink-3); font-size: 11px; }
.c-lib-r-step { display: inline-flex; align-items: stretch; border: 1px solid color-mix(in srgb, var(--c-ink) 30%, transparent); border-radius: 8px; overflow: hidden; }
.c-lib-r-step button { width: 26px; border: 0; background: transparent; color: var(--c-ink); font: inherit; font-weight: 700; cursor: pointer; }
.c-lib-r-step button:hover { background: color-mix(in srgb, var(--c-accent) 16%, transparent); color: var(--c-accent); }
.c-lib-r-step input { width: 40px; padding: 3px 2px; border: 0; border-inline: 1px solid color-mix(in srgb, var(--c-ink) 20%, transparent); background: transparent; color: var(--c-ink); font: inherit; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.c-lib-r-step input::-webkit-inner-spin-button, .c-lib-r-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.c-lib-r-step input:focus { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-lib-r-picks { display: flex; gap: 6px; }
.c-lib-r-picks button { padding: 3px 9px; border: 1px dashed color-mix(in srgb, var(--c-ink) 35%, transparent); border-radius: 999px; background: transparent; color: var(--c-ink-2); font: inherit; font-size: 11.5px; cursor: pointer; }
.c-lib-r-picks button:hover { border-style: solid; border-color: var(--c-accent); color: var(--c-accent); }
.c-lib-r-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 3px double color-mix(in srgb, var(--c-ink) 45%, transparent); text-transform: uppercase; letter-spacing: .08em; }
.c-lib-r-total span { font-size: 11px; letter-spacing: .14em; }
.c-lib-r-total b { font-size: 20px; letter-spacing: 0; }
.c-lib-receipt.is-free .c-lib-r-total b { color: var(--c-ok); }
.c-lib-r-note { margin: 0; color: var(--c-warn); }
.c-lib-r-foot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--c-ink) 30%, transparent); color: var(--c-ink-3); font-size: 10.5px; text-align: center; }
.c-lib-r-bars { width: 60%; height: 22px; opacity: .75; background: repeating-linear-gradient(90deg, var(--c-ink) 0 2px, transparent 2px 4px, var(--c-ink) 4px 5px, transparent 5px 8px, var(--c-ink) 8px 11px, transparent 11px 12px, var(--c-ink) 12px 13px, transparent 13px 16px); }
.c-lib-receipt.is-free .c-lib-r-foot::before { content: 'Free'; position: absolute; top: 8px; left: 50%; padding: 0 10px; background: var(--c-lib-paper); border: 3px solid var(--c-ok); border-radius: 6px; color: var(--c-ok); font-weight: 800; font-size: 14px; line-height: 20px; letter-spacing: .2em; text-transform: uppercase; transform: translateX(-50%) rotate(-8deg); opacity: .85; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .c-lib-receipt { animation: none; } }
/* Algorithm Library: the App Library's cards and preview window, with the algorithm's tile in the card header, the
   connections it needs under the description, and its step diagram where an app shows its live preview. */
.c-fx-card .c-apps-titleline { display: flex; align-items: center; gap: 10px; }
.c-fx-card .c-fx-tile { width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; }
.c-fx-card .c-apps-actions { display: flex; align-items: center; gap: 4px; }
.c-fx-needs { display: flex; flex-wrap: wrap; gap: 4px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-fx-card .c-fx-needs { margin: auto 0 0; padding: 8px 12px 10px; border-top: 1px solid var(--c-line); }
.c-fx-pv .c-fx-pv-flow { gap: 14px; }
.c-fx-pv .c-fx-pv-flow .c-fx-label { margin: 0; }
.c-fx-pv .c-av-flow { width: min(560px, 100%); margin: 0 auto; }
.c-fx-pv .c-fx-group { margin-top: 4px; }
.c-fx-pv-wait { margin: 0; padding: 48px 30px; }
.c-fx-pv-page .c-fx-pv { margin-top: 12px; border: 1px solid var(--c-line); border-radius: 16px; overflow: hidden; background: var(--c-surface); }
/* Algorithm Library spec cards: the algorithm's id in mono, a three-bar difficulty meter, name and one line, a strip
   with a node per step (coloured by what the step does) on a faint dot grid, and the connections it reads. */
.c-alx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.c-alx { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); cursor: pointer; transition: border-color .15s, transform .15s; }
.c-alx:hover, .c-alx:focus-within { border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-line)); }
.c-alx.is-remote { cursor: default; }
.c-alx-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-alx-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-3); font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .01em; }
.c-alx:hover .c-alx-id { color: var(--c-accent); }
.c-alx-flag { flex: none; padding: 1px 6px; border: 1px solid var(--c-line); border-radius: 4px; color: var(--c-ink-2); font: 600 10px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.c-alx-flag.is-draft { border-color: color-mix(in srgb, var(--c-warn) 55%, transparent); color: var(--c-warn); }
.c-alx-lvl { flex: none; margin-left: auto; color: var(--c-ink-3); font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.c-alx-lvl::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 1px; background: currentColor; vertical-align: 1px; }
.c-alx-lvl.is-beginner { color: var(--c-ok); } .c-alx-lvl.is-intermediate { color: var(--c-warn); } .c-alx-lvl.is-advanced { color: var(--c-danger); }
.c-alx-name { margin: 0; font: 700 16px/1.3 var(--font-display); letter-spacing: -.005em; overflow-wrap: anywhere; }
.c-alx-name a { color: var(--c-ink); text-decoration: none; }
.c-alx-name a::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.c-alx-desc { margin: 0; color: var(--c-ink-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-alx-strip { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 9px 10px; border-radius: 8px; background: radial-gradient(circle, var(--c-line) 1px, transparent 1.2px) 0 0 / 10px 10px, var(--c-bg); }
.c-alx-nodes { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.c-alx-nodes::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 1px; background: var(--c-ink-3); opacity: .5; }
.c-alx-nodes:empty::before { display: none; }
.c-alx-nodes i { position: relative; flex: none; width: 9px; height: 9px; border-radius: 2px; border: 1.5px solid var(--c-ink-3); background: var(--c-surface); }
.c-alx-nodes i.k-input { border-color: var(--c-info); background: color-mix(in srgb, var(--c-info) 25%, var(--c-surface)); }
.c-alx-nodes i.k-decision { border-color: var(--c-warn); transform: rotate(45deg) scale(.9); }
.c-alx-nodes i.k-output { border-color: var(--c-ok); background: var(--c-ok); }
.c-alx-count { flex: none; margin-left: auto; color: var(--c-ink-3); font: 500 11px/1 var(--font-mono); }
.c-alx-foot { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.c-alx-io { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-2); font: 500 11.5px/1.2 var(--font-mono); }
.c-alx-k { margin-right: 6px; padding: 1px 5px; border-radius: 3px; background: var(--c-surface-2); color: var(--c-ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.c-alx-acts { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.c-alx-add { flex: none; white-space: nowrap; height: 28px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--c-accent) 50%, var(--c-line)); border-radius: 7px; background: transparent; color: var(--c-accent); font: 600 12.5px/1 var(--font-mono); cursor: pointer; }
.c-alx-add:hover, .c-alx-add:focus-visible { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.c-alx-acts .c-alg-menu summary { height: 28px; }
@media (prefers-reduced-motion: reduce) { .c-alx { transition: none; } }
/* Without a run, a step card has nothing more to show, so it does not look clickable. */
.c-sn.is-static { cursor: default; }
.c-sn.is-static:hover { border-color: var(--c-line); }
/* Algorithm diagram as a schematic: steps are modules on a dot-grid board, each with its number, what kind of step it
   is and a coloured rail, wired port to port. Run states (done, failed, running) keep their colours on top. */
.c-av-flow { gap: 26px; padding: 22px 18px; border: 1px solid var(--c-line); border-radius: 14px; background: radial-gradient(circle, color-mix(in srgb, var(--c-ink-3) 35%, transparent) 1px, transparent 1.3px) 0 0 / 16px 16px, var(--c-bg); }
.c-sn { position: relative; display: grid; gap: 4px; align-items: start; padding: 10px 14px 11px 16px; border-radius: 10px; border-left: 3px solid var(--c-sn-k, var(--c-ink-3)); background: var(--c-surface); box-shadow: 0 1px 0 rgba(0, 0, 0, .04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.c-sn.k-input { --c-sn-k: var(--c-info); } .c-sn.k-process { --c-sn-k: var(--c-ink-3); } .c-sn.k-decision { --c-sn-k: var(--c-warn); } .c-sn.k-output { --c-sn-k: var(--c-ok); }
.c-sn:not(.is-static):hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.c-sn.is-static:hover { border-color: var(--c-line); border-left-color: var(--c-sn-k, var(--c-ink-3)); }
.c-sn[data-ports~='in']::before, .c-sn[data-ports~='out']::after { content: ''; position: absolute; left: 50%; width: 7px; height: 7px; margin-left: -4.5px; border: 1.5px solid var(--c-ink-3); border-radius: 50%; background: var(--c-bg); }
.c-sn[data-ports~='in']::before { top: -5px; } .c-sn[data-ports~='out']::after { bottom: -5px; }
.c-sn-top { display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-3); }
.c-sn-no { color: var(--c-sn-k, var(--c-ink-3)); font: inherit; letter-spacing: .04em; }
.c-sn-kind { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-sn-txt { gap: 2px; }
.c-sn-txt b { font: 700 14.5px/1.3 var(--font-display); letter-spacing: -.005em; }
.c-sn-txt small { font-size: 12.5px; line-height: 1.45; }
.c-sn .c-sn-ic { width: 16px; height: 16px; margin-left: auto; font-size: 9px; border-width: 1.5px; }
.c-sn.is-idle .c-sn-ic { display: none; }
.c-sn.is-done { border-left-color: var(--c-ok); } .c-sn.is-failed { border-left-color: var(--c-danger); } .c-sn.is-running { border-left-color: var(--c-accent); }
.c-av-wires path { stroke-width: 1.5; opacity: .7; }
.c-av-wires path.tip { display: none; } /* the ports show where a wire lands */
@media (max-width: 520px) { .c-av-flow { padding: 16px 10px; } .c-sn { padding: 8px 10px 9px 12px; } }
@media (prefers-reduced-motion: reduce) { .c-sn { transition: none; } }
/* Connections at the ends of the diagram (where the data comes from, where it goes), and the left-to-right layout
   forge-visual.js switches to on wide screens (.is-across). Narrow screens keep the top-to-bottom stack. */
.c-io { position: relative; display: grid; gap: 3px; min-width: 96px; padding: 7px 12px; border: 1px dashed var(--c-io, var(--c-ink-3)); border-radius: 999px; background: color-mix(in srgb, var(--c-io, var(--c-ink-3)) 10%, var(--c-surface)); text-align: center; }
.c-io.is-in { --c-io: var(--c-info); } .c-io.is-out { --c-io: var(--c-ok); }
.c-io b { font: 700 12.5px/1.2 var(--font-mono); letter-spacing: .04em; color: var(--c-ink); }
.c-io-k { font: 600 9.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c-io, var(--c-ink-3)); }
.c-io[data-ports~='in']::before, .c-io[data-ports~='out']::after { content: ''; position: absolute; left: 50%; width: 7px; height: 7px; margin-left: -4.5px; border: 1.5px solid var(--c-io); border-radius: 50%; background: var(--c-bg); }
.c-io[data-ports~='in']::before { top: -5px; } .c-io[data-ports~='out']::after { bottom: -5px; }
.c-av-layer.is-ends { flex-wrap: wrap; gap: 10px; }
.c-av-layer.is-ends > .c-io { flex: 0 1 auto; }
.c-av-layer > .c-io.is-out { align-self: center; }
.c-av-flow:not(.is-across) .c-av-layer > .c-io.is-out { flex: none; }
/* Stages share the width (between 150px and 230px each) so the whole diagram fits its column; when even that is too
   wide, forge-visual.js drops back to the top-to-bottom stack rather than cut steps off at the edge. */
.c-av-flow.is-across { flex-direction: row; align-items: stretch; justify-content: center; gap: 32px; overflow: hidden; }
.c-av-flow.is-across > .c-av-layer { flex: 1 1 0; flex-direction: column; justify-content: center; min-width: 150px; max-width: 230px; gap: 16px; }
.c-av-flow.is-across > .c-av-layer.is-ends { flex: 0 0 auto; min-width: 96px; max-width: 150px; flex-wrap: nowrap; }
.c-av-flow.is-across > .c-av-layer > .c-sn { flex: none; width: 100%; max-width: none; }
.c-av-flow.is-across .c-sn-txt small { -webkit-line-clamp: 3; }
.c-av-flow.is-across .c-sn[data-ports~='in']::before { top: 50%; left: -5px; margin: -4.5px 0 0; }
.c-av-flow.is-across .c-sn[data-ports~='out']::after, .c-av-flow.is-across .c-io[data-ports~='out']::after { top: 50%; bottom: auto; left: auto; right: -5px; margin: -4.5px 0 0; }
.c-av-flow.is-across .c-av-wires { width: auto; height: auto; }
/* The Library preview: what it is and Add in a header band, the diagram full width underneath. */
.c-fx-pv.c-lib-top { display: flex; flex-direction: column; }
.c-fx-pv > .c-lib-side-panel { order: -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: start; gap: 6px 32px; padding: 26px 30px 22px; border-bottom: 1px solid var(--c-line); }
.c-fx-pv > .c-lib-side-panel > * { grid-column: 1; }
.c-fx-pv > .c-lib-side-panel > .c-lib-actions, .c-fx-pv > .c-lib-side-panel > .c-lib-chips-block, .c-fx-pv > .c-lib-side-panel > .c-fx-group { grid-column: 2; }
.c-fx-pv > .c-lib-side-panel > .c-lib-actions { grid-row: 1 / span 2; margin-top: 30px; }
.c-fx-pv > .c-lib-side-panel h2 { font-size: clamp(22px, 2.2vw, 30px); }
.c-fx-pv > .c-lib-preview { border-right: 0; }
.c-fx-pv .c-av-flow { width: 100%; }
.c-fx-pv .c-av-flow.is-across { gap: 30px; }
.c-fx-pv .c-av-flow.is-across > .c-av-layer { min-width: 140px; max-width: 190px; }
@media (max-width: 900px) { .c-fx-pv > .c-lib-side-panel { grid-template-columns: minmax(0, 1fr); } .c-fx-pv > .c-lib-side-panel > * { grid-column: 1 !important; grid-row: auto !important; margin-top: 0 !important; } }
/* Top-to-bottom (narrow): parallel steps wrap two to a row, and a destination takes its own line under its step. */
.c-av-flow:not(.is-across) .c-av-layer { flex-wrap: wrap; }
.c-av-flow:not(.is-across) .c-av-layer > .c-io.is-out { flex: 0 0 190px; max-width: none; margin-inline: max(0px, calc(50% - 95px)); } /* fills the line, so it wraps */
@media (max-width: 520px) { .c-av-flow:not(.is-across) .c-av-layer > .c-sn { flex: 1 1 calc(50% - 5px); max-width: none; } .c-av-flow:not(.is-across) .c-av-layer > .c-sn:only-of-type { flex-basis: 100%; } }

/* Account menu under the avatar: who you are, then each profile tab. */
.c-account-wrap { position: relative; display: flex; align-items: center; height: 100%; }
.c-account-me[aria-expanded='true'] { background: var(--c-surface-2); }
.c-account-pop { min-width: 240px; }
.c-account-pop[hidden] { display: none; }
.c-account-pop-id { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line); border-radius: 8px 8px 0 0; color: var(--c-ink); }
.c-account-pop-id:hover { color: var(--c-ink); background: var(--c-surface-2); }
.c-account-pop-id strong { font-size: 14px; }
.c-account-pop-id small { font-size: 12px; color: var(--c-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The team menu (layout.tsx TeamMenu): a card for where you are, then "Switch to", then Join with link and Create. */
.c-tm-hr { width: 100%; height: 1px; margin: 4px 0; border: 0; background: var(--c-line); }
.c-team-pop { position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; width: 340px; max-width: calc(100vw - 32px); max-height: min(78vh, 620px); display: flex; flex-direction: column; overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: var(--shadow); animation: c-goo-in .14s ease-out; }
.c-team-pop[hidden] { display: none; }
.c-tm-head { padding: 2px 16px 4px; font-size: 11px; font-weight: 600; color: var(--c-ink-3); }
.c-tm-find { flex: none; margin: 10px 10px 8px; height: 34px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 9px; background: var(--c-bg); color: var(--c-ink); font: 500 16px var(--font-body); }
@media (min-width: 641px) { .c-tm-find { font-size: 13px; } }
.c-tm-find:focus { outline: none; border-color: var(--c-accent); }
.c-tm-list { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 6px; }
.c-tm-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font: 500 13.5px var(--font-body); text-align: left; white-space: nowrap; cursor: pointer; text-decoration: none; }
.c-tm-row:hover, .c-tm-row:focus-visible { background: var(--c-surface-2); color: var(--c-ink); outline: none; }
.c-tm-row:focus-visible { box-shadow: inset 0 0 0 1.5px var(--c-accent); }
.c-tm-row[hidden] { display: none; }
.c-tm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-tm-name small { margin-left: 7px; font-size: 11.5px; color: var(--c-ink-3); }
.c-tm-tag { flex: none; font-size: 11px; color: var(--c-warn); }
.c-tm-row.is-wait { color: var(--c-ink-3); }
.c-tm-none { margin: 0; padding: 10px; color: var(--c-ink-3); font-size: 12.5px; }
.c-tm-none[hidden] { display: none; }
.c-tm-invite { display: grid; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--c-line); }
.c-tm-invite[hidden] { display: none; }
.c-tm-invite label { font-size: 12.5px; font-weight: 600; color: var(--c-ink); }
.c-tm-invite-row { display: flex; gap: 6px; }
.c-tm-invite-row .c-input { flex: 1; min-width: 0; height: 32px; font: 12px var(--font-mono); }
.c-tm-err { margin: 0; font-size: 12px; color: var(--c-warn); }
.c-tm-err[hidden] { display: none; }
.c-team-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; border-top: 1px solid var(--c-line); }
.c-team-foot.is-one { grid-template-columns: 1fr; }
.c-team-fb { display: flex; align-items: center; justify-content: center; gap: 7px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font: 500 12.5px var(--font-body); text-decoration: none; cursor: pointer; }
.c-team-fb:hover, .c-team-fb:focus-visible { background: var(--c-surface-2); color: var(--c-ink); }
/* The tree: organization › division › team, each folding open (app.js); the team you are on highlighted with a tick. */
.c-tm-personal { flex: none; display: flex; flex-direction: column; margin: 0 0 6px; padding: 0 6px 6px; border-bottom: 1px solid var(--c-line); }
.c-tm-personal .c-tm-row { padding-left: 34px; }
.c-tm-personal .c-tm-name b, .c-tm-row.is-lv0 .c-tm-name b { font-weight: 700; color: var(--c-ink); }
.c-tm-node > .c-tm-kids { display: none; flex-direction: column; gap: 1px; }
.c-tm-node[data-open] > .c-tm-kids { display: flex; }
.c-tm-node[hidden] { display: none; }
.c-tm-tw { flex: none; display: grid; place-items: center; width: 16px; color: var(--c-ink-3); transition: transform .12s; }
.c-tm-node[data-open] > .c-tm-row > .c-tm-tw { transform: rotate(90deg); }
.c-tm-row.is-lv0 .c-tm-mark { width: 24px; height: 24px; border-radius: 50%; }
.c-tm-row.is-lv1 { padding-left: 20px; }
.c-tm-row.is-lv2 { min-height: 32px; padding-left: 54px; }
.c-tm-node > .c-tm-kids > .c-tm-row.is-lv2 { padding-left: 34px; }
.c-tm-node .c-tm-node > .c-tm-kids > .c-tm-row.is-lv2 { padding-left: 54px; }
.c-tm-mark.is-sub { background: color-mix(in srgb, var(--c-ink) 8%, var(--c-surface-2)); color: var(--c-ink-2); }
.c-tm-mark.is-xs { width: 16px; height: 16px; border-radius: 4px; }
.c-tm-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c-ink-3); }
.c-tm-row.is-cur { background: var(--c-accent-soft); color: var(--c-accent); }
.c-tm-row.is-cur .c-tm-dot { background: var(--c-accent); }
.c-tm-tick { flex: none; color: var(--c-accent); }
/* The pill: its group (you, the team, the gear) as one rounded bar; the team name in the display face. */
.c-account .c-team-btn { background: var(--c-bg); padding: 0 12px 0 14px; }
.c-team-btn .c-tm-mark { width: 24px; height: 24px; border-radius: 50%; font-size: 9px; }
.c-team-btn .c-team-k { margin-right: 4px; }
.c-team-name { font: 700 15px var(--font-display); }
@media (max-width: 720px) {
  /* app.js puts it under the pill, wherever the header wrapped it. */
  .c-team-pop { position: fixed; right: 16px; left: 16px; width: auto; max-width: none; }
  .c-tm-row { min-height: 44px; }
}

/* Profile: every tab is a stack of sections. What a section is sits on the left, its controls in a card on the
   right; rows inside a card share padding and hairlines, and a form ends in a footer with its Save button. */
.c-pset-page { max-width: 1080px; }
.c-pset { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 20px 48px; padding: 28px 0; border-top: 1px solid var(--c-line); }
.c-pset-page > .c-pset:first-child, .c-pset-page > .c-pset-stack:first-child > .c-pset:first-child { border-top: 0; padding-top: 8px; }
.c-pset-stack { display: contents; }
.c-pset-head h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.c-pset-head p { margin: 0; color: var(--c-ink-3); font-size: 13.5px; line-height: 1.5; max-width: 34ch; }
.c-pset-count { padding: 1px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 12px; font-weight: 600; }
.c-pset-card { min-width: 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); }
.c-pset-card form { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
.c-pset-row { margin: 0; padding: 18px 22px; }
.c-pset-row + .c-pset-row { border-top: 1px solid var(--c-line); }
.c-pset-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-surface-2) 55%, var(--c-surface)); }
.c-pset-note { margin-right: auto; color: var(--c-ink-3); font-size: 12.5px; }
.c-pset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.c-pset-grid.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-pset-grid .c-field { margin: 0; }
.c-pset-empty { color: var(--c-ink-3); font-size: 13.5px; }
/* A line: a label or a sentence on the left, one control on the right. */
.c-pset-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.c-pset-line > label { font-weight: 600; }
.c-pset-line > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.c-pset-line small { color: var(--c-ink-3); font-size: 12.5px; }
.c-pset-line .c-select { width: auto; }
.c-pset-line > :last-child { margin-left: auto; }
/* Switch rows (the switch itself is .c-profile-check). */
.c-pset-card .c-profile-check { padding: 16px 22px; border-bottom: 0; }
.c-pset-card .c-profile-check + .c-profile-check { border-top: 1px solid var(--c-line); }
/* Radio cards: assistant detail level. */
.c-pset-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c-pset-choice { position: relative; display: flex; padding: 14px; border: 1px solid var(--c-line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.c-pset-choice:hover { border-color: var(--c-ink-3); }
.c-pset-choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); box-shadow: 0 0 0 1px var(--c-accent); }
.c-pset-choice:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-pset-choice input { position: absolute; opacity: 0; pointer-events: none; }
.c-pset-choice span { display: flex; flex-direction: column; gap: 4px; }
.c-pset-choice strong { font-size: 14px; }
.c-pset-choice small { color: var(--c-ink-3); font-size: 12.5px; line-height: 1.45; }
/* Picture: who you are, then the three sources side by side. */
.c-pset-card .c-profile-id { gap: 16px; }
.c-pset-card .c-profile-avatar { width: 64px; height: 64px; }
.c-pset-card .c-profile-avatar .c-profile-initials { font-size: 22px; }
.c-pset-card .c-profile-id-txt strong { font: 700 18px/1.2 var(--font-display); }
.c-pset-card .c-photo-opts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.45fr); gap: 10px; }
.c-pset-card .c-photo-swatches { flex-wrap: nowrap; gap: 4px; }
.c-pset-card .c-photo-opt { min-height: 72px; padding: 12px 14px; border-radius: 12px; background: transparent; }
.c-pset-card .c-photo-opt:has(input[name='source']:checked) { background: var(--c-accent-soft); }
/* Theme tiles fill the card. */
.c-pset-themes .c-theme-group { grid-template-columns: 1fr; gap: 8px; margin: 0; }
.c-pset-themes .c-theme-group + .c-theme-group { margin-top: 18px; }
.c-pset-themes .c-theme-mode { padding: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.c-pset-themes .c-theme-tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.c-pset-themes .c-theme-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tables: column heads, one row height, the action column right-aligned. */
.c-pset-scroll { overflow-x: auto; }
.c-pset-table { width: 100%; min-width: 520px; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.c-pset-table.is-placed { min-width: 760px; }
.c-pset-table col.is-role { width: 22%; } .c-pset-table col.is-status { width: 20%; } .c-pset-table col.is-act { width: 156px; }
.c-pset-table th { padding: 10px 22px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); background: color-mix(in srgb, var(--c-surface-2) 55%, var(--c-surface)); border-bottom: 1px solid var(--c-line); }
.c-pset-table td { height: 56px; padding: 0 22px; vertical-align: middle; border-top: 1px solid var(--c-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-pset-table tbody tr:first-child td { border-top: 0; }
.c-pset-table td:last-child, .c-pset-table th:last-child { text-align: right; overflow: visible; }
.c-pset-table tbody tr:not(.c-pset-group):hover td { background: color-mix(in srgb, var(--c-surface-2) 40%, transparent); }
.c-pset-table .c-tag { vertical-align: 1px; }
.c-pset-table .c-status { text-transform: capitalize; }
.c-pset-table .c-pset-group td { text-align: left; }
.c-pset-group td { height: 38px; padding-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); background: transparent; }
.c-pset-group td strong { font-weight: 700; color: var(--c-ink-2); }
.c-pset-group + tr td { border-top: 0; }
@media (max-width: 960px) {
  .c-pset { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .c-pset-head p { max-width: none; }
}
@media (max-width: 640px) {
  .c-pset-grid, .c-pset-grid.is-three, .c-pset-choices, .c-pset-card .c-photo-opts { grid-template-columns: 1fr; }
  .c-pset-row, .c-pset-card .c-profile-check { padding: 16px; }
  .c-pset-foot { padding: 12px 16px; }
}

/* Sticky page heading (app.js wraps the page's heading and the tabs under it in .c-stick > .c-stick-in). It stays
   under the header; once the page scrolls (.is-stuck) the title shrinks, the subtitle folds away and a hairline
   closes the band. .c-stick keeps its height (set by app.js) so nothing below moves; only the band shrinks. */
.c-stick-probe { height: 1px; margin-bottom: -1px; }
.c-stick { position: sticky; top: var(--c-pin, var(--c-top-h, 60px)); z-index: 20; margin-top: calc(-1 * var(--c-main-pt, 32px)); pointer-events: none; }
.c-stick-in { padding-top: var(--c-main-pt, 32px); background: var(--c-bg); pointer-events: auto; transition: padding .2s ease, box-shadow .2s ease; }
.c-stick-in > :first-child { transition: margin .2s ease; }
.c-stick-in > :first-child h1 { transition: font-size .2s ease, margin .2s ease; }
.c-stick-in > :first-child p { max-height: 4em; overflow: hidden; transition: max-height .2s ease, opacity .15s ease; }
.c-stick.is-stuck .c-stick-in { padding-top: 12px; box-shadow: 0 1px 0 var(--c-line), 0 8px 18px -14px rgba(0, 0, 0, .45); }
.c-stick.is-stuck .c-stick-in > :first-child { align-items: center; margin-bottom: 12px; }
.c-stick.is-stuck .c-stick-in > :first-child h1 { margin: 0; font-size: 24px; }
.c-stick.is-stuck .c-stick-in > :first-child p { max-height: 0; opacity: 0; }
.c-stick.is-stuck .c-stick-in > nav { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .c-stick-in, .c-stick-in * { transition: none !important; } }
.c-stick.is-measuring .c-stick-in, .c-stick.is-measuring .c-stick-in * { transition: none !important; }
/* The find-and-filter bar sticks with the heading; panels that stick further down start under the band. */
.c-stick ~ .c-apps-bulk, .c-stick ~ * .c-apps-bulk { top: calc(var(--c-pin, var(--c-top-h, 60px)) + var(--c-stick-h, 0px) + 8px); }
.c-stick.is-stuck .c-stick-in > .c-apps-toolbar { margin-bottom: 12px; }
/* The band's measured height leaves out the toolbar's bottom margin, so the gap to the apps sits on the layout. */
.c-stick ~ .c-apps-layout { margin-top: 16px; }
.c-stick ~ .c-apps-layout .c-apps-side { top: calc(var(--c-pin, var(--c-top-h, 60px)) + var(--c-stick-h, 0px) + 16px); max-height: calc(100dvh - var(--c-top-h, 60px) - var(--c-stick-h, 0px) - 32px); }
@media (min-width: 981px) { .c-stick ~ .c-apps-layout:not(.is-full) .c-apps-side { height: calc(100dvh - var(--c-top-h, 60px) - var(--c-stick-h, 0px) - 32px); max-height: none; } }
/* ---- Help center: search first, then status, topics, requests and contact (the help-centre pattern) */
/* Help home (/help): one search, popular questions, Start here, topic tiles. */
.c-help-answer { max-width: 720px; margin-top: 12px; }
.c-help-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.c-help-popular .c-tag { text-decoration: none; }
.c-help-h { margin: 40px 0 14px; font-size: 18px; }
.c-hc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.c-hc-steps a { display: grid; gap: 4px; align-content: start; height: 100%; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); text-decoration: none; }
.c-hc-steps a:hover { border-color: var(--c-accent); }
.c-hc-steps .n { font-size: 12px; font-weight: 600; color: var(--c-accent); }
.c-hc-steps .c-muted { font-size: 13.5px; line-height: 1.45; }
.c-hc-tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .c-hc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .c-hc-tiles { grid-template-columns: minmax(0, 1fr); } }
.c-hc-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); color: var(--c-ink); text-decoration: none; }
.c-hc-tile:hover { border-color: var(--c-accent); background: var(--c-surface); }
.c-hc-tile > span:last-child { display: grid; gap: 2px; min-width: 0; }
.c-hc-tile .c-muted { font-size: 13px; }
.c-help-stuck { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 44px 0 0; padding-top: 20px; border-top: 1px solid var(--c-line); font-size: 14px; }
.c-help-stuck a { color: var(--c-ink-2); font-weight: 500; }
.c-help-stuck a:hover { color: var(--c-accent); }
/* ---- Help center home: tabs (Get help / My requests / System status), one search, guides beside "Raise a request" */
.c-help-tabs a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.c-help-count { min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink); font-size: 12px; line-height: 20px; text-align: center; }
.c-help-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink-3); }
.c-help-dot.ok { background: var(--c-ok); }
.c-help-dot.warn { background: var(--c-warn); }
.c-help-dot.danger { background: var(--c-danger); }
.c-help-hero { display: grid; justify-items: center; gap: 12px; padding: 56px 0 48px; text-align: center; }
.c-help-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); }
.c-help-hero > p { margin: 0 0 12px; max-width: 560px; font-size: 17px; }
.c-help-search { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 720px; box-sizing: border-box; padding: 6px 6px 6px 18px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-accent) 7%, transparent); color: var(--c-ink-3); }
.c-help-search svg { flex: none; }
.c-help-search .c-input { flex: 1; min-width: 0; border: 0; padding: 12px 2px; background: transparent; font-size: 16px; }
.c-help-search .c-input:focus { outline: 0; }
.c-help-search:focus-within { border-color: var(--c-accent); }
.c-help-search .c-btn { min-height: 44px; padding: 0 22px; border-radius: 12px; }
.c-help-hero .c-home-ask { width: 100%; max-width: 720px; box-sizing: border-box; text-align: left; }
.c-help-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.c-help-guides { flex: 999 1 520px; min-width: 0; }
.c-help-guides h2, .c-help-side h2 { margin: 0 0 12px; font-size: 20px; }
.c-help-topic-list { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.c-help-topic { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid transparent; border-radius: var(--radius-lg); color: var(--c-ink); text-decoration: none; }
a.c-help-topic:hover { background: var(--c-surface); border-color: var(--c-line); color: var(--c-ink); }
.c-help-topic > span:last-child { display: grid; gap: 2px; min-width: 0; }
.c-help-topic .c-muted { font-size: 14px; }
.c-help-topic-meta { font-size: 12px; color: var(--c-ink-3); }
.c-help-topic-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 14px; font-weight: 600; }
.c-help-side { flex: 1 1 300px; min-width: 0; display: grid; gap: 16px; }
.c-help-raise { display: grid; gap: 10px; }
.c-help-raise h2 { margin: 0; }
.c-help-raise p { margin: 0 0 6px; }
.c-help-raise .c-btn { justify-content: center; min-height: 44px; }
.c-help-course { justify-self: center; font-size: 14px; }
.c-help-latest { display: grid; gap: 6px; color: var(--c-ink); text-decoration: none; }
.c-help-latest:hover { border-color: var(--c-accent); color: var(--c-ink); }
.c-help-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.c-help-latest-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.c-help-latest-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-help-latest .c-muted { font-size: 14px; }
.c-help-more { font-size: 14px; font-weight: 600; color: var(--c-accent); }
.c-help-raise-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; scroll-margin-top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); }
.c-help-raise-form h2 { margin: 0 0 4px; font-size: 20px; }
.c-help-raise-form p { margin: 0; }
.c-help-raise-form > div { flex: 1 1 320px; min-width: 0; }
.c-help-raise-row { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 420px; }
.c-help-raise-row .c-select { flex: 1 1 220px; min-width: 0; }
.c-support-form { scroll-margin-top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); }
.c-support-form h2 { margin: 0 0 14px; font-size: 20px; }
.c-support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.c-support-form .c-toolbar { margin-bottom: 0; }
.c-support-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; max-width: 60ch; }
.c-support-access-pick { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.c-support-access-pick legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.c-support-access-pick .c-check { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; padding-top: 4px; }
.c-support-access-pick .c-check input[type=radio] { flex: none; margin-top: 3px; }
.c-support-access-pick .c-support-days { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.c-support-access-pick .c-support-days .c-select { width: auto; min-width: 120px; }
.c-support-access { min-width: 180px; }
@media (max-width: 720px) { .c-support-grid { grid-template-columns: 1fr; } .c-support-form .c-toolbar .c-btn { flex: 1 1 100%; justify-content: center; min-height: 40px; } }
.c-help-health { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 14px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); font-weight: 600; }
.c-help-health.danger { border-color: color-mix(in srgb, var(--c-danger) 50%, var(--c-line)); }
.c-help-summary { padding: 12px 16px; cursor: pointer; color: var(--c-ink-2); }
@media (max-width: 720px) { .c-help-hero { padding: 32px 0 28px; } .c-help-side { order: -1; } .c-help-search { padding-left: 12px; } .c-help-search .c-btn { padding: 0 14px; } }

/* Forge home: more problems than the cards shown. */
.c-fx-more { margin: 4px 0 18px; color: var(--c-ink-3); font-size: 13.5px; }

/* My Apps and App Library cards, cover edition (grid view). Card color means status, nothing else: the cover is a
   plain surface and a 3px top edge carries the status (my-apps-preview.ts coverTone, .c-cov-<tone> on the card).
   Live: plain, green edge. Dev (never live) and a library draft: amber hatched. A draft copy: violet hatched.
   Retired, and an archived library app: dimmed grey. Archived (Team apps): the danger red. Plain: a published library
   app, neutral. A deploy in flight (.is-deploying) runs an accent shimmer over the cover. Tokens only, so every theme
   recolors them. The panel header (.c-dtray-cover) uses the same cover. */
[class*='c-cov-'] { --c-cov-edge: var(--c-line); --c-cov-ink: var(--c-ink); --c-cov-bg: var(--c-surface-2); --c-cov-hatch: none; }
.c-cov-live { --c-cov-edge: var(--c-ok); }
.c-cov-dev { --c-cov-edge: var(--c-warn); --c-cov-tint: var(--c-warn); }
.c-cov-draft { --c-cov-edge: var(--c-space-purple); --c-cov-tint: var(--c-space-purple); }
.c-cov-dev, .c-cov-draft { --c-cov-hatch: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c-cov-tint) 16%, transparent) 0 8px, color-mix(in srgb, var(--c-cov-tint) 6%, transparent) 8px 16px); }
.c-cov-retired { --c-cov-edge: color-mix(in srgb, var(--c-ink-3) 70%, var(--c-line)); --c-cov-ink: var(--c-ink-3); }
.c-cov-trash { --c-cov-edge: color-mix(in srgb, var(--c-danger) 70%, var(--c-line)); --c-cov-ink: var(--c-ink-2); --c-cov-bg: color-mix(in srgb, var(--c-danger) 6%, var(--c-surface-2)); }
[class*='c-cov-'].is-deploying { --c-cov-edge: var(--c-accent); --c-cov-hatch: none; --c-cov-bg: color-mix(in srgb, var(--c-accent) 8%, var(--c-surface-2)); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline, .c-dtray-cover {
  background: var(--c-cov-hatch), var(--c-cov-bg);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-cov-ink);
}
/* The status edge, in every grid state; a card the viewer cannot open keeps its red frame. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'],
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-']:hover,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-']:focus-within { border-top: 3px solid var(--c-cov-edge); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'].is-no-access { border-color: color-mix(in srgb, var(--c-danger) 55%, var(--c-line)); border-top-color: var(--c-danger); }
/* Retired (and an archived library app) sinks: its text and footer fade; the corner actions stay at full strength. */
.c-apps-card.c-cov-retired .c-apps-desc, .c-apps-card.c-cov-retired .c-apps-facts, .c-apps-card.c-cov-retired .c-apps-meta, .c-apps-card.c-cov-retired .c-apps-tags { opacity: .62; }
.c-apps-card.c-cov-retired .c-apps-title a, .c-apps-card.c-cov-retired .c-apps-title span { color: var(--c-ink-3); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] { overflow: visible; border-radius: 16px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline { position: relative; min-height: 104px; align-content: flex-end; align-items: center; gap: 8px 6px; padding: 12px 14px 14px; border-radius: 13px 13px 0 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title { order: 2; flex-basis: 100%; font: 800 19px/1.2 var(--font-display); color: var(--c-cov-ink); text-wrap: balance; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a, .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title span { color: inherit; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline .c-apps-customer { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; font-size: 11px; }
/* A draft copy's Draft pill takes the violet of its cover. */
.c-cov-draft .c-apps-pill.is-draft { color: var(--c-space-purple); background: color-mix(in srgb, var(--c-space-purple) 16%, transparent); }
/* Card actions sit on the cover. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions { top: 10px; right: 10px; gap: 4px; }
/* Description, then a shelf with the space (a chip with a dot in the space's color) and the tags. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-desc { display: -webkit-box; padding: 12px 14px 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts { gap: 7px; margin: 10px 14px 0; padding: 10px 0 12px; border-top: 1px solid var(--c-line); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts > div { display: flex; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts .c-apps-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.c-apps-fact-space { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 1px 8px; border-radius: 4px; background: var(--c-surface-2); color: var(--c-ink-2); font-weight: 500; }
.c-apps-fact-space.is-empty { padding: 0; background: none; color: var(--c-ink-3); }
.c-apps-fact-space.is-empty .c-apps-dot { display: none; }
.c-apps-fact-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The space's (or library category's) color, as a small dot on its chip; grey when it has none. */
.c-apps-dot { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-space-accent, var(--c-ink-3)); }
.c-apps-space-chip { display: inline-flex; align-items: center; gap: 5px; }
/* "N drafts" is an amber pill that opens the drafts drawer. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle { margin: 0 14px 12px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle:hover, .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle[aria-expanded='true'] { text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-warn); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta { padding: 10px 14px; }
.c-apps-card.is-pile-open { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Drafts drawer. Docks on the right below the header; from 1200px the My Apps layout narrows beside it, below
   that it slides over the page with a scrim, and on a phone it covers the screen. */
.c-dtrays .c-dtray { position: fixed; top: 60px; right: 0; bottom: 0; z-index: 28; width: min(440px, 100vw); display: flex; flex-direction: column; gap: 0; padding: 0 0 env(safe-area-inset-bottom, 0px); border: 0; border-left: 1px solid var(--c-line); border-radius: 0; background: var(--c-surface); box-shadow: -18px 0 44px -16px rgba(0, 0, 0, .35); overflow-y: auto; overscroll-behavior: contain; transform: translateX(104%); transition: transform .3s cubic-bezier(.3, .7, .2, 1); }
.c-dtrays .c-dtray.is-open { transform: none; }
.c-dtrays .c-dtray[hidden] { display: none; }
.c-dtrays .c-dtray::before { display: none; }
.c-dtray-cover { position: sticky; top: 0; z-index: 2; flex: none; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 12px; min-height: 116px; padding: 14px 60px 16px 18px; }
.c-dtray-name { margin: 0; font: 800 22px/1.2 var(--font-display); color: var(--c-cov-ink, var(--c-ink)); overflow-wrap: anywhere; text-wrap: balance; }
.c-dtray-cover { box-shadow: inset 0 3px 0 var(--c-cov-edge, transparent); }
.c-dtray-cover .c-dtray-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; margin: 0; border-radius: 10px; background: transparent; color: var(--c-ink-3); font-size: 20px; }
.c-dtray-cover .c-dtray-close:hover, .c-dtray-cover .c-dtray-close:focus-visible { background: color-mix(in srgb, var(--c-ink) 8%, transparent); color: var(--c-ink); }
.c-dtray-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--c-line); }
.c-dtrays .c-dtray-head, .c-dtrays .c-dtray.is-tree .c-dtray-head { position: static; padding: 14px 18px 0; }
.c-dtrays .c-dtray-search { flex: 1 1 160px; height: 36px; }
.c-dtrays .c-dtray-filters { padding: 10px 18px 0; }
.c-dtrays .c-dtray-body { gap: 16px; padding: 14px 18px 22px; }
.c-dtrays .c-dlist, .c-dtrays .c-dlanes { max-height: none; }
.c-dtrays .c-dcols { grid-template-columns: 1fr; gap: 12px; }
.c-dtrays .c-dcol.is-live { display: none; }
.c-dtrays .c-dlane { flex-direction: column; align-items: stretch; }
.c-dtrays .c-dlane-who { width: auto; }
/* The tree reads top to bottom in the drawer: each level indented under its parent. */
.c-dtrays .c-dtree { overflow: visible; }
.c-dtrays .c-dtree-branch { flex-direction: column; align-items: stretch; }
.c-dtrays .c-dtree .c-dnode { width: 100%; }
.c-dtrays .c-dtree-kids { padding: 8px 0 0 22px; }
.c-dtrays .c-dtree-kids::before { display: none; }
.c-dtrays .c-dtree-kids > li::before, .c-dtrays .c-dtree-kids > li:first-child::before, .c-dtrays .c-dtree-kids > li:only-child::before { display: block; left: -12px; top: -8px; bottom: -8px; height: auto; }
.c-dtrays .c-dtree-kids > li:last-child::before { bottom: auto; height: 32px; }
.c-dtrays .c-dtree-kids > li::after { left: -12px; top: 24px; width: 12px; }
/* The selected draft: name, who and when, what it changes, its actions, and the block to paste into Claude. */
.c-dtrays .c-dtray-detail { padding: 14px; border: 1px solid var(--c-line); border-radius: 14px; background: color-mix(in srgb, var(--c-warn) 4%, var(--c-surface)); }
.c-dtrays .c-ddetail { flex-direction: column; align-items: stretch; gap: 12px; }
.c-dtrays .c-ddetail-info { flex: none; flex-direction: column; gap: 4px; }
.c-dtrays .c-ddetail-name { font: 800 16px/1.25 var(--font-display); }
.c-dtrays .c-ddetail-desc { white-space: normal; font-size: 13px; line-height: 1.5; }
.c-dtrays .c-ddetail-actions .c-btn { padding: 7px 12px; }
.c-ddetail-mcp { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.c-ddetail-mcp .c-dlabel { margin: 0; }
.c-ddetail-mcp pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--c-surface-2); color: var(--c-ink-2); font: 12px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.c-ddetail-copy { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.c-dtray-scrim { position: fixed; inset: 60px 0 0; z-index: 27; background: rgba(8, 10, 20, .4); }
.c-dtray-scrim[hidden] { display: none; }
@media (min-width: 1200px) {
  .c-apps-layout.is-drawer-open { margin-right: 452px; }
  .c-dtray-scrim { display: none !important; }
}
@media (max-width: 720px) {
  .c-dtrays .c-dtray { top: 0; z-index: 40; width: 100vw; border-left: 0; }
  .c-dtray-scrim { inset: 0; z-index: 39; }
  .c-dtray-cover { padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  .c-dtrays .c-dtray-search { height: 40px; font-size: 16px; }
  .c-ddetail-copy { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .c-dtrays .c-dtray, .c-apps-layout { transition: none; } }

/* Compact cover cards: a shorter cover, a two-line description (the whole text is its tooltip and in the panel's Details), the space and tags on one row, and one footer row
   (creator · edited, then the drafts pill). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline { min-height: 76px; padding: 10px 12px 11px 14px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title { font-size: 17px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions { top: 8px; right: 8px; gap: 3px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions .c-apps-icon { width: 30px; height: 30px; font-size: 15px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-desc { -webkit-line-clamp: 2; padding: 9px 14px 0; font-size: 12.5px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 14px 0; padding: 0 0 10px; border-top: 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts > div { min-width: 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-facts .c-apps-none { display: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-fact-space { font-size: 12px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: auto; padding: 8px 10px 8px 14px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-by { flex: 0 1 auto; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-when { flex: 0 1 auto; min-width: 0; padding-left: 0; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-when::before { content: '·'; margin-right: 6px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle { flex: none; margin: 0 0 0 auto; min-height: 26px; padding: 0 10px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle + .c-apps-preview { margin-left: 0; }
@media (hover: none) { .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle { min-height: 36px; } }
/* A phone-wide card wraps its footer (creator, drafts, Preview, Manage) instead of widening the page. */
@media (max-width: 560px) { .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta { flex-wrap: wrap; row-gap: 8px; } }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-preview { margin-left: auto; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle + .c-apps-preview { margin-left: 0; }

/* The sticky find-and-filter band reaches into the page gutters, so cards scrolling under it never show their edge
   or shadow beside it. */
@media (min-width: 721px) {
  .c-stick-in { margin-left: -28px; margin-right: -24px; padding-left: 28px; padding-right: 24px; }
}
/* The Spaces panel is as wide as its longest space name needs (180–300px), not a fixed 250px. public/my-apps.js
   keeps --c-apps-side-w in step so the edge handle stays on the panel's edge. */
@media (min-width: 981px) {
  .c-apps-layout:not(.is-full):not(.is-side-closed) { grid-template-columns: fit-content(300px) minmax(0, 1fr); }
  .c-apps-layout:not(.is-full) .c-apps-side { min-width: 180px; }
  .c-apps-layout:not(.is-side-closed) .c-apps-side-handle { left: calc(var(--c-apps-side-w, 250px) - 14px); }
  .c-space-find { width: 0; min-width: 100%; }
}
.c-apps-tab-count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-3); font-size: 11px; font-weight: 700; }

/* Deploying: an accent shimmer runs across the cover while the app goes live or updates. It holds still for people
   who ask for reduced motion (the tinted cover and accent edge still say it). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline, .c-dtray-cover { isolation: isolate; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card.is-deploying .c-apps-titleline::before, .c-dtray-cover.is-deploying::before,
.c-apps-board.is-view-list .c-apps-card.is-deploying .c-apps-title::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--c-accent) 20%, transparent) 50%, transparent 100%) 50% 0 / 200% 100% no-repeat;
}
@keyframes c-cov-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card.is-deploying .c-apps-titleline::before, .c-dtray-cover.is-deploying::before,
  .c-apps-board.is-view-list .c-apps-card.is-deploying .c-apps-title::before { animation: c-cov-shimmer 1.6s linear infinite; }
}

/* The cover opens the app: the title link stretches over the whole cover. Star, copy and ⋯ stay above it. On hover
   a small hint says what a click does (Open in new tab for Completa apps); it hides when a pill already sits there. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a::after { content: attr(data-hint); position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: flex-start; padding: 12px 14px; border-radius: inherit; color: transparent; font: 600 11px/22px var(--font-body); letter-spacing: .02em; text-shadow: none; transition: color .2s ease; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline:hover .c-apps-title a::after { color: var(--c-ink-3); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline:has(.c-apps-pill:not(.is-live):not([hidden]), .c-apps-customer) .c-apps-title a::after { content: ''; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline:has(.c-apps-title a) { cursor: pointer; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a:hover { text-decoration: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a:focus-visible { outline: none; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-title a:focus-visible::after { outline: 2px solid var(--c-accent); outline-offset: -4px; color: var(--c-ink-3); }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions { z-index: 3; }

/* List view, cover edition (My Apps, 769px and up). Each row starts with the app's cover as a band holding its
   name (click it to open), then the description over the space and tags, then Status, Creator, Edited, drafts
   and actions, each in a fixed column that lines up with the header. The band comes alive like the grid cover. */
@media (min-width: 769px) {
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head { grid-template-columns: 220px minmax(0, 1fr) 92px 150px 104px 100px 150px; column-gap: 14px; padding: 0 1px 8px; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(1) { grid-column: 1 / 3; padding-left: 14px; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(2) { grid-column: 3; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(3) { grid-column: 4; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(4) { grid-column: 5; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(5) { grid-column: 6 / 8; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] { grid-template-columns: 220px minmax(0, 1fr) 92px 150px 104px 100px 150px; grid-template-areas: "band desc pill by when drafts actions" "band facts cust by when preview actions" "access access access access access access access" "extra extra extra extra extra extra extra"; column-gap: 14px; row-gap: 4px; align-items: center; padding: 0; border-top-width: 1px; border-top-color: var(--c-line); border-radius: 14px; background: var(--c-surface); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-']:hover { border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-line)); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title { grid-area: band; align-self: stretch; position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 72px; margin: 0; padding: 10px 14px 12px 17px; border-radius: 13px 0 0 13px; border-right: 1px solid var(--c-line); font: 800 15px/1.25 var(--font-display); color: var(--c-cov-ink); overflow-wrap: anywhere;
    background: var(--c-cov-hatch), var(--c-cov-bg); box-shadow: inset 3px 0 0 var(--c-cov-edge); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a, .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title span { color: inherit; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a:hover { color: inherit; text-decoration: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a:focus-visible { outline: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a::after { content: attr(data-hint); position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-start; padding: 8px 14px; border-radius: inherit; color: transparent; font: 600 10.5px/18px var(--font-body); text-shadow: none; transition: color .2s ease; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title:hover a::after, .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a:focus-visible::after { color: var(--c-ink-3); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a:focus-visible::after { outline: 2px solid var(--c-accent); outline-offset: -4px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-desc { grid-area: desc; align-self: end; padding-top: 10px; -webkit-line-clamp: 1; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-facts { grid-area: facts; align-self: start; display: flex; flex-wrap: nowrap; overflow: hidden; align-items: center; gap: 4px 10px; min-width: 0; padding-bottom: 10px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-facts > div { display: flex; min-width: 0; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-facts .c-apps-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-facts .c-apps-none { display: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-fact-space { font-size: 12px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-tags, .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-space-chip, .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-detail-btn { display: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-pill { grid-area: pill; align-self: end; justify-self: start; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-pill.is-deploying { align-self: end; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-customer { grid-area: cust; align-self: start; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-by { grid-area: by; align-self: center; min-width: 0; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-when { grid-area: when; align-self: center; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-ink-3); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-when::before { content: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle { grid-area: drafts; grid-column: auto; align-self: end; justify-self: start; white-space: nowrap; min-height: 26px; margin: 0; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle:hover, .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle[aria-expanded='true'] { text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-warn); }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-preview { grid-area: preview; align-self: start; justify-self: start; display: inline-flex; height: 26px; padding: 0 8px; font-size: 12px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-actions { grid-area: actions; align-self: center; justify-content: flex-end; padding-right: 10px; gap: 2px; flex-wrap: nowrap; white-space: nowrap; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-fact-tags { flex-wrap: nowrap; overflow: hidden; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-release { display: inline-flex; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-access { grid-area: access; margin: 0 12px 10px; width: auto; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-extra { grid-area: extra; padding: 0 14px 10px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-select { top: -9px; left: -9px; }
}
/* Narrower screens drop the Edited column (it stays in the hover title) so the description keeps its room. */
@media (min-width: 769px) and (max-width: 1279px) {
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head { grid-template-columns: 200px minmax(0, 1fr) 88px 140px 96px 150px; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(4) { display: none; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(5) { grid-column: 5 / 7; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] { grid-template-columns: 200px minmax(0, 1fr) 88px 140px 96px 150px; grid-template-areas: "band desc pill by drafts actions" "band facts cust by preview actions" "access access access access access access" "extra extra extra extra extra extra"; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-when { display: none; }
}
/* Tight widths (about 1100px and down with the Spaces panel open): the status rides on the cover band, as in grid
   view, and Edited stays hidden, so every column still lines up. */
@media (min-width: 769px) and (max-width: 1099px) {
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head { grid-template-columns: 170px minmax(0, 1fr) 124px 96px 150px; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(2), :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(4) { display: none; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(3) { grid-column: 3; }
  :is(#c-apps-board, #c-lib-board).is-view-list .c-apps-head > :nth-child(5) { grid-column: 4 / 6; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] { grid-template-columns: 170px minmax(0, 1fr) 124px 96px 150px; grid-template-areas: "band desc by drafts actions" "band facts by preview actions" "access access access access access" "extra extra extra extra extra"; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-pill { grid-area: band; align-self: start; justify-self: start; z-index: 2; margin: 8px 0 0 15px; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-pill.is-live { display: none; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-title a::after { content: ''; }
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-customer { display: none; }
}

/* Compact view, cover edition (769px and up): a thin status strip runs down the left edge of each row, in the
   card's status color (hatched for Dev and a draft copy; the accent, flowing, while a deploy runs). It widens on
   hover and while the app's drafts drawer is open. The drafts pill gets its own column next to the name, so a row
   never grows taller. */
@media (min-width: 769px) {
  :is(#c-apps-board, #c-lib-board).is-view-compact .c-apps-head { grid-template-columns: minmax(0, 1fr) 96px 120px 150px 110px 150px; padding-left: 26px; }
  :is(#c-apps-board, #c-lib-board).is-view-compact .c-apps-head > :nth-child(1) { grid-column: 1 / 3; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] { grid-template-columns: minmax(0, 1fr) 96px 120px 150px 110px 150px; grid-template-areas: "title drafts pill by when actions"; position: relative; padding-left: 26px; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle { grid-area: drafts; grid-column: auto; justify-self: start; white-space: nowrap; min-height: 24px; margin: 0; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--c-warn) 15%, transparent); color: var(--c-warn); font-size: 11.5px; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle:hover, .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-drafts-toggle[aria-expanded='true'] { text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-warn); }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-actions { justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-']::before { content: ''; position: absolute; z-index: 1; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; pointer-events: none;
    background: var(--c-cov-edge); transition: width .25s cubic-bezier(.3, .7, .2, 1); }
  .c-apps-board.is-view-compact .c-apps-card:is(.c-cov-dev, .c-cov-draft)::before { background: repeating-linear-gradient(135deg, var(--c-cov-edge) 0 3px, color-mix(in srgb, var(--c-cov-edge) 35%, transparent) 3px 6px); }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'].is-deploying::before { background: linear-gradient(180deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 25%, transparent), var(--c-accent)) 0 0 / 100% 300%; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'].is-no-access::before { background: var(--c-danger); }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-']:hover::before, .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'].is-pile-open::before, .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'].is-deploying::before { width: 8px; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-']:hover { background: color-mix(in srgb, var(--c-accent) 4%, transparent); }
  /* List view: a card the viewer cannot open keeps its red frame all round. */
  .c-apps-board.is-view-list .c-apps-card[class*='c-cov-'].is-no-access { border-top-color: color-mix(in srgb, var(--c-danger) 55%, var(--c-line)); }
}
@keyframes c-sliver-flow { from { background-position: 0 0; } to { background-position: 0 100%; } }
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'].is-deploying::before { animation: c-sliver-flow 1.6s linear infinite alternate; }
}
@media (min-width: 769px) {
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-space-chip, .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-customer { display: none; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 769px) and (max-width: 1279px) {
  :is(#c-apps-board, #c-lib-board).is-view-compact .c-apps-head { grid-template-columns: minmax(0, 1fr) 90px 96px 132px 150px; }
  :is(#c-apps-board, #c-lib-board).is-view-compact .c-apps-head > :nth-child(4) { display: none; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] { grid-template-columns: minmax(0, 1fr) 90px 96px 132px 150px; grid-template-areas: "title drafts pill by actions"; }
  .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-when { display: none; }
}
@media (min-width: 769px) { .c-apps-board.is-view-compact .c-apps-card[class*='c-cov-'] .c-apps-pill { justify-self: start; } }
/* An open ⋯ menu sits above every other card: its button group lifts over the next cards' buttons, and its card
   drops the hover lift (a transform would trap the menu in that card's layer). */
.c-apps-card:has(.c-apps-menu:not([hidden])) { transform: none !important; }
.c-apps-board .c-apps-card .c-apps-actions:has(.c-apps-menu:not([hidden])) { z-index: 30 !important; }

/* App panel (src/domains/apps/app-panel-view.tsx): the drafts drawer at half the page width, with tabs. Versions
   shows the version tree on the left (Live, its drafts under it) and the selected node on the right; below 620px
   of panel width the two stack. Kept quiet on purpose: one title, one line of facts, the actions. */
.c-dtrays .c-dtray.c-panel { width: min(clamp(440px, 50vw, 860px), 100vw); container-type: inline-size; }
@media (min-width: 1200px) { .c-apps-layout.is-drawer-open { margin-right: calc(clamp(440px, 50vw, 860px) + 12px); } }
.c-apps-card[data-panel-of] { cursor: pointer; }
.c-panel-cover { min-height: 0; gap: 6px; padding: 16px 64px 18px 22px; }
.c-panel-desc { margin: 0; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; color: color-mix(in srgb, var(--c-cov-ink) 82%, transparent); }
/* flex: none: the panel is a column that scrolls, and a scrolling row may otherwise be squeezed to nothing by a long pane. */
.c-panel-tabs { flex: none; display: flex; gap: 22px; padding: 0 22px; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.c-panel-tabs button { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--c-ink-3); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.c-panel-tabs button:hover { color: var(--c-ink); }
.c-panel-tabs button[aria-selected='true'] { color: var(--c-ink); box-shadow: inset 0 -2px 0 var(--c-accent); }
.c-panel-tabs button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; border-radius: 6px; }
.c-panel-pane { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 22px 28px; }
.c-panel-pane[hidden] { display: none; }
.c-panel-pane[data-panel-pane='versions'] { align-items: stretch; }
.c-panel-versions { display: grid; grid-template-columns: minmax(250px, 46%) minmax(0, 1fr); min-height: 300px; border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; }
.c-pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border-right: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-surface-2) 55%, var(--c-surface)); }
.c-pt-find { width: 100%; margin-bottom: 8px; }
.c-pt-node { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; box-sizing: border-box; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--c-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.c-pt-node:hover { background: var(--c-surface); }
.c-pt-node[aria-pressed='true'] { background: var(--c-surface); border-color: var(--c-line); }
.c-pt-node:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-pt-node[hidden] { display: none; }
.c-pt-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c-warn); }
.c-pt-node.is-live .c-pt-dot { width: 11px; height: 11px; background: var(--c-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok) 22%, transparent); }
.c-pt-node.is-live .c-pt-label { font-weight: 700; }
.c-pt-node.is-none { cursor: default; color: var(--c-ink-3); }
.c-pt-node.is-none:hover { background: none; }
.c-pt-node.is-none .c-pt-dot { width: 11px; height: 11px; box-sizing: border-box; border: 1.5px dashed var(--c-ink-3); background: none; }
.c-pt-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.c-pt-sub { flex: none; margin-left: auto; font-size: 11.5px; color: var(--c-ink-3); }
.c-pt-kids { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0 15px; padding: 0 0 0 14px; list-style: none; }
.c-pt-kids > li { position: relative; }
.c-pt-kids > li::before { content: ''; position: absolute; left: -14px; top: -2px; bottom: -2px; border-left: 1.5px solid var(--c-line); }
.c-pt-kids > li:last-child::before { bottom: auto; height: 22px; }
.c-pt-kids > li::after { content: ''; position: absolute; left: -14px; top: 20px; width: 10px; border-top: 1.5px solid var(--c-line); }
.c-panel-detail { min-width: 0; padding: 18px 20px; }
.c-pd { display: flex; flex-direction: column; gap: 12px; }
.c-pd[hidden] { display: none; }
.c-pd-head { display: flex; flex-direction: column; gap: 2px; }
.c-pd-title { font: 800 18px/1.25 var(--font-display); }
.c-pd-sub, .c-pd-name { margin: 0; font-size: 12.5px; color: var(--c-ink-3); overflow-wrap: anywhere; }
.c-pd-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--c-ink-2); }
.c-pd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-pd-quiet { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--c-ink-3); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.c-pd-quiet:hover, .c-pd-quiet:focus-visible { color: var(--c-danger); }
.c-pd-mcp { padding-top: 10px; border-top: 1px solid var(--c-line); font-size: 12.5px; color: var(--c-ink-3); }
.c-pd-mcp summary { display: flex; align-items: center; min-height: 32px; cursor: pointer; }
.c-pd-mcp pre { margin: 6px 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--c-surface-2); color: var(--c-ink-2); font: 12px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.c-pd-copy { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.c-pf-list { width: 100%; margin: 0; border: 1px solid var(--c-line); border-radius: 12px; }
.c-pf { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 11px 14px; border-top: 1px solid var(--c-line); font-size: 13.5px; }
.c-pf:first-child { border-top: 0; }
.c-pf dt { color: var(--c-ink-3); }
.c-pf dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.c-pf-who { display: inline-flex; align-items: center; gap: 8px; }
.c-pt-av { width: 20px; height: 20px; font-size: 9px; }
@container (max-width: 620px) {
  .c-panel-versions { grid-template-columns: 1fr; }
  .c-pt { border-right: 0; border-bottom: 1px solid var(--c-line); }
}
@media (max-width: 720px) {
  .c-panel-tabs { padding: 0 16px; }
  .c-panel-pane { padding: 16px 16px 24px; }
  .c-pf { grid-template-columns: 90px minmax(0, 1fr); }
}
/* On a cover card the title sits under the glass buttons, so it needs no room on the right even when a Go live
   button is there (without this the title was squeezed to one letter a line). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-']:has(.c-apps-actions .c-apps-btn) .c-apps-titleline { padding-right: 12px; }
.c-pd-mcp summary::before { content: '▸'; display: inline-block; width: 14px; font-size: 10px; transition: transform .15s ease; }
.c-pd-mcp[open] summary::before { transform: rotate(90deg); }
.c-pd-mcp summary::-webkit-details-marker { display: none; }
/* Environments (Martin's model): Development → Testing → Live, drafts under Live. Orange Unpublished = admins
   only; green Published = everyone with access to the app. */
.c-pt-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
/* Text is the badge colour mixed 45% toward the theme's ink (darker on light themes, lighter on dark ones), so the
   small label clears 4.5:1 on its tint in every theme; the plain warn/ok colours were about 3:1 on the light ones. */
.c-pt-badge.is-off { background: color-mix(in srgb, var(--c-warn) 18%, transparent); color: color-mix(in srgb, var(--c-warn) 55%, var(--c-ink)); }
.c-pt-badge.is-on { background: color-mix(in srgb, var(--c-ok) 18%, transparent); color: color-mix(in srgb, var(--c-ok) 55%, var(--c-ink)); }
.c-pt-node.is-env .c-pt-dot { width: 11px; height: 11px; background: var(--c-accent); }
.c-pt-flow { display: block; width: 0; height: 14px; margin: 0 0 0 15px; border-left: 1.5px solid var(--c-line); position: relative; }
.c-pt-flow::after { content: ''; position: absolute; left: -4.5px; bottom: -2px; border: 4px solid transparent; border-top: 5px solid var(--c-line); border-bottom: 0; }
.c-pt-legend { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 14px 10px 4px; font-size: 11.5px; color: var(--c-ink-3); }
.c-pt-legend > span { display: flex; align-items: center; gap: 8px; }
.c-pt-legend .c-pt-badge { margin-left: 0; width: 82px; justify-content: center; }
/* Manage: every card's way into its app panel (environments, details, access, usage). It sits at the end of the
   footer; the drafts pill and Preview, when there, sit just before it. */
.c-apps-manage { flex: none; display: inline-flex; align-items: center; min-height: 30px; margin-left: auto; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 9px; background: var(--c-surface-2); color: var(--c-ink); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.c-apps-manage:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
.c-apps-manage:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta:has(.c-apps-manage) .c-apps-drafts-toggle { margin-left: auto; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta:has(.c-apps-manage) .c-apps-drafts-toggle ~ .c-apps-manage,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-meta:has(.c-apps-manage) .c-apps-preview ~ .c-apps-manage { margin-left: 0; }
@media (hover: none) { .c-apps-manage { min-height: 40px; } }
/* Cover grid sized by the room it has, not the window: cards stay at least 280px wide, so with the app panel open
   the grid drops to two columns instead of squeezing three or four. */
/* At most four across: a column is never narrower than a quarter of the row, so wide screens get four larger cards
   rather than five or six small ones. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(280px, calc((100% - 48px) / 4))), 1fr)); }
/* Pager under the grid: the range on the left, numbered pages on the right; centred and stacked on a phone. */
.c-apps-pager { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-apps-pager-range { color: var(--c-ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.c-apps-pager-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.c-apps-pg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 9px; background: var(--c-surface); color: var(--c-ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
a.c-apps-pg:hover { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); background: var(--c-surface-2); }
a.c-apps-pg:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-apps-pg.is-on { border-color: var(--c-btn); background: var(--c-btn); color: var(--c-accent-ink); }
.c-apps-pg.is-gap { border-color: transparent; background: none; min-width: 20px; padding: 0; color: var(--c-ink-3); }
.c-apps-pg[aria-disabled='true'] { opacity: .4; cursor: default; }
@media (max-width: 560px) {
  .c-apps-pager { justify-content: center; }
  .c-apps-pg { min-width: 40px; height: 40px; }
  .c-apps-pg.is-step > span { display: none; }
}
/* The cover keeps its top row for the glass buttons: the status pill sits on that row at the left, and the title
   starts below it, so a long title never runs under the buttons. */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline { padding-top: 48px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline > .c-apps-pill { position: absolute; top: 13px; left: 14px; }
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions .c-apps-btn { white-space: nowrap; }
.c-pf-id { font-family: var(--font-mono); font-size: 12.5px; }
/* History under Live: the app's live versions, newest first; the live one is marked, older ones can be restored. */
.c-pd-history { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.c-pd-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-pv-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.c-pv-list[hidden] { display: none; }
.c-pv { display: flex; align-items: center; gap: 10px; min-height: 38px; border-top: 1px solid var(--c-line); font-size: 13px; }
.c-pv:first-child { border-top: 0; }
.c-pv-n { flex: none; width: 34px; font: 600 12.5px var(--font-mono); }
.c-pv.is-current .c-pv-n { color: var(--c-ok); }
.c-pv-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink-3); }
.c-pv .c-pt-badge, .c-pv-restore { margin-left: auto; }
/* App panel, History tab (public/app-panel-history.js): a day-grouped timeline of edits and deploys. */
.c-ph { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.c-ph-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.c-ph-chip { min-height: 32px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 999px; background: none; color: var(--c-ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.c-ph-chip:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
.c-ph-chip[aria-pressed='true'] { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-ink); }
.c-ph-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.c-ph-list > li[hidden], .c-ph-files[hidden], .c-ph-status[hidden], .c-ph-more[hidden] { display: none; }
.c-ph-day { padding: 14px 0 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-ph-day:first-child { padding-top: 0; }
.c-ph-entry { position: relative; display: flex; gap: 12px; padding: 8px 0 8px 2px; }
.c-ph-entry::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--c-line); }
.c-ph-dot { position: relative; flex: none; width: 12px; height: 12px; margin-top: 4px; border: 2px solid var(--c-ink-3); border-radius: 50%; background: var(--c-surface); }
.c-ph-entry.is-deploy .c-ph-dot { border: 0; background: var(--c-ink-3); }
.c-ph-dot.is-dev { background: var(--c-info) !important; }
.c-ph-dot.is-uat { background: var(--c-warn) !important; }
.c-ph-dot.is-live { background: var(--c-ok) !important; }
.c-ph-dot.is-failed { background: var(--c-danger) !important; }
.c-ph-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.c-ph-summary { align-self: flex-start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--c-ink); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.c-ph-summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.c-ph-summary::after { content: ' ▸'; color: var(--c-ink-3); font-size: 11px; }
.c-ph-summary[aria-expanded='true']::after { content: ' ▾'; }
.c-ph-deploy { font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.c-ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--c-ink-3); }
.c-ph-env { padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
.c-ph-env.is-dev, .c-ph-env.is-draft { background: color-mix(in srgb, var(--c-info) 18%, transparent); color: color-mix(in srgb, var(--c-info) 55%, var(--c-ink)); }
.c-ph-env.is-uat { background: color-mix(in srgb, var(--c-warn) 18%, transparent); color: color-mix(in srgb, var(--c-warn) 55%, var(--c-ink)); }
.c-ph-env.is-live { background: color-mix(in srgb, var(--c-ok) 18%, transparent); color: color-mix(in srgb, var(--c-ok) 55%, var(--c-ink)); }
.c-ph-env.is-none { padding: 0; font-weight: 500; font-style: italic; }
.c-ph-files { margin-top: 6px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface-2); font-size: 12.5px; color: var(--c-ink-3); }
.c-ph-filelist { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.c-ph-file { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.c-ph-fs { flex: none; width: 58px; font-size: 11px; font-weight: 700; color: var(--c-ink-3); }
.c-ph-fs.is-added { color: var(--c-ok); }
.c-ph-fs.is-removed { color: var(--c-danger); }
.c-ph-path { flex: 1; min-width: 0; font: 12px var(--font-mono); color: var(--c-ink-2); overflow-wrap: anywhere; }
.c-ph-lines { flex: none; display: inline-flex; gap: 6px; font: 600 11.5px var(--font-mono); }
.c-ph-add { color: var(--c-ok); }
.c-ph-del { color: var(--c-danger); }
.c-ph-none { margin: 4px 0 0; }
.c-ph-none:first-child { margin: 0; }
.c-ph-more { align-self: flex-start; }
/* Speed: the cover's glass buttons and pills used a live backdrop blur, about 40 on a page of cards, which made
   scrolling and hovering redraw slowly. They are plain translucent fills now, and a card's hover only changes its
   border (no lift, no growing shadow). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-actions .c-apps-icon,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline .c-apps-pill,
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline .c-apps-customer,
.c-dtray-cover .c-apps-pill { backdrop-filter: none; background: rgba(8, 10, 20, .42); }
/* Speed: a card's hover only changes its border (no lift, no growing shadow). */
.c-apps-board:not(.is-view-list):not(.is-view-compact) .c-apps-card:hover { transform: none; box-shadow: none; }

/* Go-live progress in the app panel: four stages, then the GitHub run's own steps as they finish. */
.c-pg { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface-2); }
.c-pg-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.c-pg-stages li { position: relative; padding-top: 12px; font-size: 11.5px; font-weight: 600; color: var(--c-ink-3); }
.c-pg-stages li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--c-line); }
.c-pg-stages li.is-done { color: var(--c-ink-2); }
.c-pg-stages li.is-done::before { background: var(--c-ok); }
.c-pg-stages li.is-current { color: var(--c-ink); }
.c-pg-stages li.is-current::before { background: linear-gradient(90deg, var(--c-accent) 0 40%, var(--c-line) 40%); background-size: 250% 100%; animation: c-pg-run 1.4s linear infinite; }
.c-pg-stages li.is-failed { color: var(--c-danger); }
.c-pg-stages li.is-failed::before { background: var(--c-danger); }
@keyframes c-pg-run { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .c-pg-stages li.is-current::before { animation: none; background: var(--c-accent); } }
.c-pg-steps { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--c-ink-3); }
.c-pg-steps[hidden] { display: none; }
.c-pg-steps li { display: flex; align-items: center; gap: 8px; }
.c-pg-steps li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--c-ink-3); box-sizing: border-box; }
.c-pg-steps li.is-done { color: var(--c-ink-2); }
.c-pg-steps li.is-done::before { border: 0; background: var(--c-ok); }
.c-pg-steps li.is-running { color: var(--c-ink); font-weight: 600; }
.c-pg-steps li.is-running::before { border-color: var(--c-accent); background: var(--c-accent); animation: c-pg-pulse 1s ease-in-out infinite alternate; }
.c-pg-steps li.is-failed { color: var(--c-danger); }
.c-pg-steps li.is-failed::before { border: 0; background: var(--c-danger); }
.c-pg-steps li.is-skipped { opacity: .5; }
@keyframes c-pg-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .c-pg-steps li.is-running::before { animation: none; } }
.c-pg [data-progress-log] { align-self: flex-start; }

/* Select mode (toolbar Select): a tick box on each card you may file; a click anywhere on a card ticks it. Outside
   select mode the box is not shown at all. */
.c-apps-board:not(.is-selecting) .c-apps-select { display: none !important; }
.c-apps-board.is-selecting .c-apps-select { display: block !important; position: absolute; z-index: 3; top: 12px; left: 12px; width: 24px; height: 24px; margin: 0; opacity: 1; border: 2px solid var(--c-ink-3); border-radius: 8px; background: var(--c-surface); transform: none; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.c-apps-board.is-selecting .c-apps-select:checked { border-color: var(--c-accent); background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; transform: scale(1.06); }
.c-apps-board.is-selecting .c-apps-card { cursor: pointer; user-select: none; }
.c-apps-board.is-selecting .c-apps-card:not(.is-selected) { opacity: .8; }
.c-apps-board.is-selecting .c-apps-card.is-selected { opacity: 1; outline: 2px solid var(--c-accent); outline-offset: 2px; background: var(--c-surface); }
.c-apps-board.is-selecting:not(.is-view-list):not(.is-view-compact) .c-apps-card[class*='c-cov-'] .c-apps-titleline > .c-apps-pill { left: 46px; }
/* While selecting, a click ticks the card, so the cover's "Open" hint would lie, and the tick box takes its corner. */
.c-apps-board.is-selecting .c-apps-card[class*='c-cov-'] .c-apps-title a::after { content: '' !important; }
/* List rows: the tick box sits inside the cover's top corner (not clipped at the row's edge). Compact rows: the title moves over to make room for it. */
.c-apps-board.is-selecting.is-view-list .c-apps-card[class*='c-cov-'] .c-apps-select { top: 8px; left: 10px; width: 20px; height: 20px; border-radius: 6px; }
.c-apps-board.is-selecting.is-view-compact .c-apps-card .c-apps-select { top: 50%; left: 12px; width: 20px; height: 20px; border-radius: 6px; transform: translateY(-50%); }
.c-apps-board.is-selecting.is-view-compact .c-apps-card .c-apps-select:checked { transform: translateY(-50%); }
.c-apps-board.is-selecting.is-view-compact .c-apps-card .c-apps-title { padding-left: 30px; }
.c-apps-select-mode[aria-pressed='true'] { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-accent-ink); }

/* Tighter My Apps: less room above and below the title, and between the side menu, the Spaces tab and the cards. */
.c-main:has(#c-apps) { --c-main-pt: 14px; }
#c-apps .c-page-head { margin-bottom: 10px; }
@media (min-width: 981px) {
  .c-body:has(#c-apps) { gap: 16px; }
  .c-apps-layout:not(.is-full).is-side-closed { grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; }
  /* Closed, the Spaces tab is only as tall as its label. */
  .c-apps-layout.is-side-closed .c-apps-side-handle { width: 34px; min-height: 0; height: auto; padding: 12px 0 14px; gap: 8px; }
}

/* The Live tab's count: every app in the tab (Dev and Draft too), so a plain accent count, not a live-green dot. */
.c-apps-tab-count { display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c-accent) 16%, transparent); color: color-mix(in srgb, var(--c-accent) 55%, var(--c-ink)); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 18px; }

/* Motion. Opening Spaces or an app panel moves the cards to their new places (public/my-apps.js morph(), with the
   View Transitions API where the browser has it); the Spaces list and the panel's sections then rise in, one after
   another. The panel slides a little slower, so you see it arrive. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(*) { animation-duration: .3s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
html.is-morphing .c-apps-layout, html.is-morphing .c-apps-layout .c-apps-side { transition: none; }
@keyframes c-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes c-slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.c-apps-layout.is-side-opening .c-apps-side > * { animation: c-slide-in .45s cubic-bezier(.16, 1, .3, 1) both; }
.c-apps-layout.is-side-opening .c-apps-side > :nth-child(2) { animation-delay: .04s; }
.c-apps-layout.is-side-opening .c-apps-side > :nth-child(3) { animation-delay: .08s; }
.c-apps-layout.is-side-opening .c-apps-side > :nth-child(4) { animation-delay: .12s; }
.c-apps-layout.is-side-opening .c-apps-side > :nth-child(5) { animation-delay: .16s; }
.c-apps-layout.is-side-opening .c-apps-side > :nth-child(n + 6) { animation-delay: .2s; }
.c-dtrays .c-dtray.c-panel { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
/* The layout's margin is not transitioned: animating it re-laid out the whole grid every frame. Where the browser has
   View Transitions the cards morph instead (my-apps.js morph()); elsewhere the grid moves over at once. */
.c-dtray.c-panel.is-open .c-panel-cover > * { animation: c-rise .5s .1s cubic-bezier(.16, 1, .3, 1) both; }
.c-dtray.c-panel.is-open .c-panel-tabs { animation: c-rise .5s .16s cubic-bezier(.16, 1, .3, 1) both; }
.c-dtray.c-panel.is-open .c-pt > * { animation: c-slide-in .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: .22s; }
.c-dtray.c-panel.is-open .c-pt > :nth-child(2) { animation-delay: .26s; }
.c-dtray.c-panel.is-open .c-pt > :nth-child(3) { animation-delay: .3s; }
.c-dtray.c-panel.is-open .c-pt > :nth-child(4) { animation-delay: .34s; }
.c-dtray.c-panel.is-open .c-pt > :nth-child(5) { animation-delay: .38s; }
.c-dtray.c-panel.is-open .c-pt > :nth-child(n + 6) { animation-delay: .42s; }
.c-dtray.c-panel.is-open .c-panel-detail { animation: c-rise .55s .3s cubic-bezier(.16, 1, .3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .c-apps-layout.is-side-opening .c-apps-side > *, .c-dtray.c-panel.is-open .c-panel-cover > *, .c-dtray.c-panel.is-open .c-panel-tabs,
  .c-dtray.c-panel.is-open .c-pt > *, .c-dtray.c-panel.is-open .c-panel-detail { animation: none; }
  ::view-transition-group(*) { animation: none; }
  .c-dtrays .c-dtray.c-panel { transition: none; }
}
/* Cards morph as one piece: no crossfade between their old and new size (which doubled the text mid-move); the new
   card slides and its box grows or shrinks to fit, cropped at its rounded edge. */
::view-transition-old(*.c-card-vt) { display: none; }
::view-transition-new(*.c-card-vt) { animation: none; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
::view-transition-image-pair(*.c-card-vt) { overflow: hidden; border-radius: 16px; }
/* List and compact views are fixed columns: Manage sits with the row's star, copy and ⋯ (the copy in the actions),
   not in the footer, where it had no column and landed in whatever cell was free. */
.c-apps-manage.is-in-actions { display: none; }
@media (min-width: 769px) {
  .c-apps-board.is-view-list .c-apps-meta .c-apps-manage, .c-apps-board.is-view-compact .c-apps-meta .c-apps-manage { display: none; }
  .c-apps-board.is-view-list .c-apps-manage.is-in-actions, .c-apps-board.is-view-compact .c-apps-manage.is-in-actions { display: inline-flex; margin: 0 6px 0 0; }
}
/* While cards slide (morph), the drafts pile behind a card would be drawn inside its moving picture: hide it. */
html.is-morphing .c-apps-card.has-drafts::before, html.is-morphing .c-apps-card.has-drafts::after { display: none; }
.c-apps-pill.is-deploying { white-space: nowrap; }
/* A crowded footer (drafts pill, Manage) shortens the name and date, never the creator's round picture. */
.c-apps-avatar, .c-pt-av { flex: none; aspect-ratio: 1; }
.c-apps-by { min-width: 0; }
.c-pd-update { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-info, var(--c-accent)) 14%, transparent); color: var(--c-ink); font-size: 13px; width: 100%; box-sizing: border-box; }

/* App panel, Usage tab (public/app-panel-usage.js draws it from GET /api/v1/usage/apps/:id/overview): what the app
   costs this month and why, how often it is opened and by whom, and how its credits changed. */
.c-panel-pane[data-panel-pane='usage'] { align-items: stretch; gap: 18px; }
.c-pu { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.c-pu-skel { display: flex; flex-direction: column; gap: 14px; }
.c-pu-skel > span { display: block; border-radius: 16px; background: linear-gradient(100deg, var(--c-surface) 30%, var(--c-surface-2) 50%, var(--c-surface) 70%) 0 0 / 300% 100%; animation: c-pu-shimmer 1.4s linear infinite; }
.c-pu-skel-hero { height: 196px; }
.c-pu-skel-row { height: 92px; }
.c-pu-skel-chart { height: 170px; }
@keyframes c-pu-shimmer { to { background-position: -150% 0; } }
.c-pu-card { position: relative; min-width: 0; padding: 18px 20px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); }
.c-pu-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.c-pu-h { margin: 0; font: 800 15px/1.3 var(--font-display); letter-spacing: -.005em; }
.c-pu-hint { margin: 2px 0 0; font-size: 12.5px; color: var(--c-ink-3); }
.c-pu-num { font-variant-numeric: tabular-nums; }

/* Hero: the monthly price, the credit meter and what each part costs. */
.c-pu-hero { overflow: hidden; padding: 20px 22px 18px; background:
  radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c-accent) 16%, transparent) 0%, transparent 55%),
  linear-gradient(180deg, color-mix(in srgb, var(--c-surface-2) 60%, var(--c-surface)), var(--c-surface)); }
.c-pu-hero.is-draft { background:
  radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c-warn) 14%, transparent) 0%, transparent 55%),
  linear-gradient(180deg, color-mix(in srgb, var(--c-surface-2) 60%, var(--c-surface)), var(--c-surface)); }
.c-pu-hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.c-pu-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.c-pu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok) 22%, transparent); }
.is-draft .c-pu-dot { background: var(--c-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-warn) 22%, transparent); }
.c-pu-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; margin: 6px 0 0; font: 800 44px/1.05 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.c-pu-price small { font-size: .5em; letter-spacing: -.01em; color: var(--c-ink-2); }
.c-pu-price .c-pu-per { margin-left: 8px; font: 600 14px/1 var(--font-body); letter-spacing: 0; color: var(--c-ink-3); }
.c-pu-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--c-ink-2); }
.c-pu-sub strong { color: var(--c-ink); font-weight: 700; }
.c-pu-rank { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.c-pu-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--c-line); border-radius: 999px; background: color-mix(in srgb, var(--c-bg) 40%, transparent); font-size: 12px; font-weight: 600; color: var(--c-ink-2); white-space: nowrap; }
.c-pu-chip b { color: var(--c-ink); }
.c-pu-chip.is-good { border-color: color-mix(in srgb, var(--c-ok) 40%, var(--c-line)); color: color-mix(in srgb, var(--c-ok) 55%, var(--c-ink)); }
.c-pu-chip.is-warn { border-color: color-mix(in srgb, var(--c-warn) 40%, var(--c-line)); color: color-mix(in srgb, var(--c-warn) 55%, var(--c-ink)); }
.c-pu-meter { position: relative; margin: 22px 0 6px; padding-top: 18px; }
.c-pu-bar { display: flex; height: 14px; border-radius: 999px; background: color-mix(in srgb, var(--c-ink) 7%, transparent); overflow: hidden; }
.c-pu-seg { flex: none; height: 100%; width: 0; background: var(--seg); transition: width .9s cubic-bezier(.16, 1, .3, 1); }
.c-pu-seg + .c-pu-seg { box-shadow: inset 2px 0 0 var(--c-surface); }
.c-pu-seg:first-child { border-radius: 999px 0 0 999px; }
.c-pu-seg:last-child { border-radius: 0 999px 999px 0; }
.c-pu-seg:only-child { border-radius: 999px; }
.c-pu-over { position: absolute; top: 18px; bottom: 0; right: 0; height: 14px; border-radius: 0 999px 999px 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c-bg) 40%, transparent) 0 1.5px, transparent 1.5px 6px); }
.c-pu-free { position: absolute; top: 0; height: 40px; width: 0; border-left: 2px dashed var(--c-ink-2); transition: left .9s cubic-bezier(.16, 1, .3, 1); }
.c-pu-free span { position: absolute; top: -2px; left: 6px; font-size: 11px; font-weight: 700; color: var(--c-ink-2); white-space: nowrap; }
.c-pu-free.is-end span { left: auto; right: 6px; }
.c-pu-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--c-ink-3); }
.c-pu-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.c-pu-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 12px; background: color-mix(in srgb, var(--c-bg) 30%, transparent); }
.c-pu-legend li.is-zero { opacity: .55; }
.c-pu-sw { grid-row: span 2; align-self: stretch; width: 4px; border-radius: 4px; background: var(--seg); }
.c-pu-legend b { font-size: 13px; }
.c-pu-legend em { grid-column: 2; font-style: normal; font-size: 11.5px; color: var(--c-ink-3); }
.c-pu-legend .c-pu-v { grid-row: 1 / span 2; grid-column: 3; text-align: right; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.c-pu-legend .c-pu-v small { display: block; font-size: 10.5px; font-weight: 600; color: var(--c-ink-3); }
.c-pu-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-accent) 10%, transparent); font-size: 12.5px; line-height: 1.5; color: var(--c-ink-2); }
.c-pu-note.is-warn { background: color-mix(in srgb, var(--c-warn) 12%, transparent); }
.c-pu-note svg { flex: none; margin-top: 2px; color: var(--c-accent); }
.c-pu-note.is-warn svg { color: var(--c-warn); }

/* Activity: period switch, three figures and opens by day. */
.c-pu-period { display: inline-flex; padding: 3px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-bg); }
.c-pu-period button { min-width: 52px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--c-ink-3); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.c-pu-period button:hover { color: var(--c-ink); }
.c-pu-period button[aria-checked='true'] { background: var(--c-surface-2); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.c-pu-period button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-pu-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c-pu-kpi { min-width: 0; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 12px; background: color-mix(in srgb, var(--c-bg) 30%, transparent); }
.c-pu-kpi dt { font-size: 12px; font-weight: 600; color: var(--c-ink-3); }
.c-pu-kpi dd { margin: 4px 0 0; }
.c-pu-kpi .c-pu-big { display: block; font: 800 26px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-pu-kpi .c-pu-small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-pu-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.c-pu-delta.is-up { color: color-mix(in srgb, var(--c-ok) 70%, var(--c-ink)); }
.c-pu-delta.is-down { color: color-mix(in srgb, var(--c-danger) 70%, var(--c-ink)); }
.c-pu-chart { position: relative; margin-top: 16px; }
.c-pu-chart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.c-pu-chart .c-pu-grid { stroke: var(--c-line); stroke-width: 1; shape-rendering: crispEdges; }
.c-pu-chart .c-pu-base { stroke: var(--c-ink-3); stroke-width: 1; shape-rendering: crispEdges; opacity: .6; }
.c-pu-chart .c-pu-ylab { fill: var(--c-ink-3); font-size: 10.5px; }
.c-pu-chart rect.c-pu-col { fill: var(--c-viz-1); transform-box: fill-box; transform-origin: bottom; animation: c-pu-grow .6s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--d, 0ms); }
.c-pu-chart rect.c-pu-col.is-zero { fill: var(--c-line); }
.c-pu-chart rect.c-pu-hit { fill: transparent; cursor: crosshair; }
.c-pu-chart.is-hover rect.c-pu-col:not(.is-on) { opacity: .45; }
@keyframes c-pu-grow { from { transform: scaleY(0); } }
.c-pu-ymax { position: absolute; top: -14px; right: 0; font-size: 10.5px; color: var(--c-ink-3); }
.c-pu-gap { margin: 0 0 12px; }
.c-pu-gnote { margin: 0 0 6px 14px; }
.c-pu-xlab { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--c-ink-3); }
.c-pu-tip { position: absolute; z-index: 2; top: 0; min-width: 120px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface-2); box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; color: var(--c-ink-2); pointer-events: none; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap; }
.c-pu-tip b { display: block; color: var(--c-ink); font-size: 12.5px; }
.c-pu-tip[hidden] { display: none; }
.c-pu-empty { position: absolute; inset: 0 0 24px; display: grid; place-items: center; font-size: 13px; color: var(--c-ink-3); }

/* People: busiest first, a bar each for their share of opens. */
.c-pu-people { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.c-pu-person { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 6px; border-radius: 10px; }
.c-pu-person:hover { background: color-mix(in srgb, var(--c-surface-2) 60%, transparent); }
.c-pu-av { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c-accent) 30%, var(--c-surface-2)); font-size: 11px; font-weight: 800; color: var(--c-ink); }
.c-pu-av img { width: 100%; height: 100%; object-fit: cover; }
.c-pu-pname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.c-pu-pval { grid-row: span 2; text-align: right; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.c-pu-pval small { display: block; font-size: 11px; font-weight: 500; color: var(--c-ink-3); }
.c-pu-ptrack { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--c-ink) 7%, transparent); overflow: hidden; }
.c-pu-ptrack span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--c-viz-1); transition: width .8s cubic-bezier(.16, 1, .3, 1); }
.c-pu-more { align-self: flex-start; min-height: 36px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 9px; background: none; color: var(--c-ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.c-pu-more:hover { color: var(--c-ink); border-color: var(--c-ink-3); }

/* What it is charged for: connectors and blocks. */
.c-pu-conns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.c-pu-conn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--c-line); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.c-pu-conn small { padding: 2px 7px; border-radius: 999px; background: var(--c-surface-2); font-size: 11px; font-weight: 700; color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.c-pu-conn.is-premium { border-color: color-mix(in srgb, var(--c-viz-3) 50%, var(--c-line)); }
.c-pu-conn.is-premium::before { content: 'Premium'; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c-viz-3) 22%, transparent); font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: color-mix(in srgb, var(--c-viz-3) 55%, var(--c-ink)); }
.c-pu-blocks { border-top: 1px solid var(--c-line); }
.c-pu-blocks details { border-bottom: 1px solid var(--c-line); }
.c-pu-blocks summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.c-pu-blocks summary::-webkit-details-marker { display: none; }
.c-pu-blocks summary::after { content: ''; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid var(--c-ink-3); border-bottom: 2px solid var(--c-ink-3); transform: rotate(-45deg); transition: transform .15s; }
.c-pu-blocks details[open] summary::after { transform: rotate(45deg); }
.c-pu-blocks summary .c-pu-sw { grid-row: auto; align-self: auto; height: 16px; }
.c-pu-blocks summary .c-pu-count { margin-left: auto; font-weight: 700; color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.c-pu-blocks ul { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px 14px; padding: 0; list-style: none; }
.c-pu-blocks li { padding: 4px 0; font-size: 12.5px; color: var(--c-ink-2); overflow-wrap: anywhere; }

/* Credit history: newest first, a step marker and the change in credits. */
.c-pu-hist { position: relative; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.c-pu-hist li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; }
.c-pu-hist li::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 1.5px solid var(--c-line); }
.c-pu-hist li:first-child::before { top: 14px; }
.c-pu-hist li:last-child::before { bottom: calc(100% - 14px); }
.c-pu-hist i { position: relative; z-index: 1; width: 10px; height: 10px; margin: 4px 0 0 2px; border: 2px solid var(--c-surface); border-radius: 50%; background: var(--c-ink-3); }
.c-pu-hist li.is-live i { background: var(--c-ok); }
.c-pu-hist li.is-draft i { background: var(--c-warn); }
.c-pu-hist p { margin: 0; font-size: 13px; line-height: 1.45; }
.c-pu-hist time { grid-column: 2; font-size: 11.5px; color: var(--c-ink-3); }
.c-pu-hist .c-pu-hv { grid-row: 1 / span 2; grid-column: 3; text-align: right; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.c-pu-hist .c-pu-hv small { display: block; font-size: 11px; font-weight: 700; }
.c-pu-hist .c-pu-hv small.is-up { color: color-mix(in srgb, var(--c-warn) 60%, var(--c-ink)); }
.c-pu-hist .c-pu-hv small.is-down { color: color-mix(in srgb, var(--c-ok) 60%, var(--c-ink)); }

.c-pu-fail { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px; border: 1px dashed var(--c-line); border-radius: 16px; font-size: 13.5px; color: var(--c-ink-2); }
.c-pu-report { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; font-weight: 600; color: var(--c-ink-2); text-decoration: none; }
.c-pu-report:hover { color: var(--c-ink); }
.c-pu-report span { transition: transform .15s; }
.c-pu-report:hover span { transform: translateX(3px); }
.c-pu-in { animation: c-pu-in .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--d, 0ms); }
@keyframes c-pu-in { from { opacity: 0; transform: translateY(6px); } }
@container (max-width: 560px) {
  .c-pu-price { font-size: 36px; }
  .c-pu-rank { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
  .c-pu-kpi .c-pu-small { white-space: normal; }
  .c-pu-legend { grid-template-columns: 1fr; }
  .c-pu-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-pu-kpi:last-child { grid-column: span 2; }
  .c-pu-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .c-pu-skel > span, .c-pu-in, .c-pu-chart rect.c-pu-col { animation: none; }
  .c-pu-seg, .c-pu-free, .c-pu-ptrack span { transition: none; }
}
@media (forced-colors: active) {
  .c-pu-seg, .c-pu-chart rect.c-pu-col, .c-pu-ptrack span { forced-color-adjust: none; }
}

/*
 * Fixed colors, the same on every theme. Get started (first-run.css) frames screenshots of Claude and ChatGPT, which
 * are themselves dark, in a dark window; the Claude mark keeps Anthropic's color.
 */
:root {
  --c-shot-frame: #1a1a1a;
  --c-shot-bar: #242424;
  --c-shot-line: #333;
  --c-shot-dot: #555;
  --c-shot-ink: #aaa;
  --c-shot-paper: #ffffff;
  --c-shot-field: #3b3b3b;
  --c-shot-field-ink: #f5f5f5;
  --c-brand-claude: #d97757;
}

/*
 * Reduce motion (Profile > Appearance, <html data-motion="reduce">): every page switches off its animations,
 * transitions, view transitions and blur at once, whatever the device asks for. The @media (prefers-reduced-motion)
 * rules above still follow the device for everyone else. Durations go near zero instead of none so scripts waiting
 * on animationend or transitionend still hear it.
 */
:root[data-motion='reduce'] *,
:root[data-motion='reduce'] *::before,
:root[data-motion='reduce'] *::after,
:root[data-motion='reduce'] ::backdrop {
  animation-duration: 0.01ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
:root[data-motion='reduce'] { scroll-behavior: auto !important; }
:root[data-motion='reduce']::view-transition-group(*),
:root[data-motion='reduce']::view-transition-old(*),
:root[data-motion='reduce']::view-transition-new(*) { animation: none !important; }

/* Help center (help/center): home hero and topics, topic pages, articles, the "?" beside page titles. */
.c-hc-ask[hidden], .c-hc-vote [hidden] { display: none; }
.c-hc-nav-label { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-hc-nav-label:first-child { margin-top: 0; }
.c-hc-q { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 10px; vertical-align: middle; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.c-hc-q:hover { border-color: var(--c-accent); color: var(--c-accent); }
.c-hc-search { display: flex; flex-wrap: wrap; gap: 8px; }
.c-hc-search .c-input { flex: 1 1 280px; min-width: 0; }
.c-hc-search.big .c-input { min-height: 52px; font-size: 17px; padding: 0 18px; border-radius: 14px; }
.c-hc-search.big .c-btn { min-height: 52px; padding: 0 20px; border-radius: 12px; }
.c-hc-ask { display: grid; gap: 10px; }
.c-hc-ask-text { margin: 0; white-space: pre-wrap; max-width: 75ch; }
.c-hc-ask-src { display: flex; flex-wrap: wrap; gap: 8px; }
.c-hc-topic-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--c-accent-soft); color: var(--c-accent); }
.c-hc-topic-title { display: flex; align-items: center; gap: 14px; margin: 8px 0 20px; }
.c-hc-topic-title h1 { margin: 0; }
.c-hc-topic-title p { margin: 4px 0 0; }
.c-hc-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--c-ink-3); margin-bottom: 8px; }
.c-hc-list { display: grid; gap: 12px; }
.c-hc-list-item { display: flex; align-items: center; gap: 16px; color: var(--c-ink); text-decoration: none; }
.c-hc-list-text { display: grid; gap: 4px; min-width: 0; }
.c-hc-thumb { flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--c-surface-2); border: 1px dashed var(--c-line); color: var(--c-ink-3); font-size: 11px; font-weight: 600; }
.c-hc-list-item:hover .c-hc-thumb { color: var(--c-accent); }
.c-hc-video { margin: 8px 0 28px; }
.c-hc-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(circle at 50% 40%, var(--c-surface-2), var(--c-surface)); border: 1px dashed var(--c-line); color: var(--c-ink-2); }
.c-hc-video-play { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c-accent-soft); color: var(--c-accent); }
.c-hc-video-soon { font-weight: 600; }
.c-hc-video figcaption { margin-top: 8px; font-size: 13px; }
@media (max-width: 560px) { .c-hc-thumb { display: none; } }
.c-hc-list-item:hover { border-color: var(--c-accent); }
.c-hc-article { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 48px; align-items: start; }
.c-hc-nav { display: grid; gap: 14px; position: sticky; top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); font-size: 14px; }
.c-hc-nav-back { padding: 0 10px; font-size: 13px; color: var(--c-ink-3); text-decoration: none; }
.c-hc-nav-back:hover { color: var(--c-ink); }
.c-hc-switch { position: relative; }
.c-hc-switch summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); font-weight: 600; cursor: pointer; list-style: none; }
.c-hc-switch summary::-webkit-details-marker { display: none; }
.c-hc-switch summary svg { color: var(--c-ink-3); transition: transform .15s; }
.c-hc-switch[open] summary svg { transform: rotate(180deg); }
.c-hc-switch-menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); display: grid; padding: 4px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--shadow); }
.c-hc-switch-menu a { padding: 7px 10px; border-radius: 6px; color: var(--c-ink-2); text-decoration: none; }
.c-hc-switch-menu a:hover, .c-hc-switch-menu a[aria-current] { background: var(--c-surface-2); color: var(--c-ink); }
.c-hc-nav-group { display: grid; gap: 1px; }
.c-hc-nav-group .c-hc-nav-label { margin: 0 10px 4px; }
.c-hc-nav-group a { padding: 6px 10px; border-radius: 6px; color: var(--c-ink-2); line-height: 1.35; text-decoration: none; }
.c-hc-nav-group a:hover { background: var(--c-surface); color: var(--c-ink); }
.c-hc-nav-group a[aria-current='page'] { background: var(--c-accent-soft); color: var(--c-ink); font-weight: 500; }
.c-hc-main { max-width: 70ch; min-width: 0; }
.c-hc-main h1 { margin: 0 0 8px; text-wrap: balance; }
.c-hc-lede { font-size: 17px; color: var(--c-ink-2); margin: 0 0 10px; }
.c-hc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--c-ink-3); }
.c-hc-aud { color: var(--c-accent); font-weight: 600; }
.c-hc-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.c-hc-acts .c-btn { display: inline-flex; align-items: center; gap: 8px; }
.c-hc-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 20px; }
.c-hc-jumps a { padding: 4px 12px; border: 1px solid var(--c-line); border-radius: 999px; font-size: 13px; color: var(--c-ink-2); text-decoration: none; }
.c-hc-jumps a:hover { border-color: var(--c-accent); color: var(--c-ink); }
.c-hc-body { line-height: 1.65; }
.c-hc-body h3 { margin: 40px 0 12px; font-size: 21px; scroll-margin-top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); }
.c-hc-body ol, .c-hc-body ul { padding-left: 22px; display: grid; gap: 6px; }
.c-hc-body .c-banner { margin: 16px 0; display: block; }
.c-hc-body .c-table { display: block; overflow-x: auto; }
.c-hc-fold { margin-top: 32px; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.c-hc-fold summary { display: flex; justify-content: space-between; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.c-hc-fold summary::-webkit-details-marker { display: none; }
.c-hc-fold summary::after { content: '+'; color: var(--c-ink-3); font-weight: 400; }
.c-hc-fold[open] summary::after { content: '\2013'; }
.c-hc-fold .c-hc-body { padding-bottom: 8px; }
.c-hc-vote { margin-top: 32px; display: grid; gap: 12px; }
.c-hc-vote-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-hc-vote h2 { margin: 0 6px 0 0; font-size: 14px; font-weight: 500; font-family: inherit; color: var(--c-ink-2); }
.c-hc-vote-more { display: grid; gap: 8px; }
.c-hc-vote-done { margin: 0; color: var(--c-ok); }
.c-hc-next { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 14px 18px; border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink); text-decoration: none; }
.c-hc-next:hover { border-color: var(--c-accent); }
.c-hc-next small { display: block; font-size: 12px; color: var(--c-ink-3); }
.c-hc-next > span:last-child { color: var(--c-accent); font-size: 18px; }
.c-hc-related { margin-top: 28px; }
.c-hc-related h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); font-family: inherit; }
.c-hc-related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.c-hc-first { display: grid; margin-top: 24px; padding: 16px 18px; color: var(--c-ink); text-decoration: none; }
.c-hc-first:hover { border-color: var(--c-accent); }
.c-hc-first > span { display: grid; gap: 6px; justify-items: start; }
.c-hc-first strong { font-size: 18px; }
.c-hc-first-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ok); }
.c-hc-group { margin-top: 32px; }
.c-hc-group h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); font-family: inherit; }
.c-hc-first + .c-hc-group:has(> .c-hc-rows:first-child) { margin-top: 24px; }
.c-hc-rows { border-top: 1px solid var(--c-line); }
.c-hc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; }
.c-hc-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.c-hc-row .c-muted { font-size: 13.5px; }
.c-hc-row:hover strong { color: var(--c-accent); }
.c-hc-stuck-line { margin: 32px 0 0; font-size: 14px; }
.c-hc-stuck-line a { color: var(--c-accent); font-weight: 500; }
/* Ask answers (public/ask.js): steps, citations, sources and a walkthrough video. Used on Home and in Help. */
.c-ask-answer { white-space: normal; display: grid; gap: 8px; line-height: 1.55; }
.c-ask-answer p { margin: 0; }
.c-ask-answer ol, .c-ask-answer ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.c-ask-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 3px; padding: 0 5px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 11px; font-weight: 700; text-decoration: none; vertical-align: 1px; }
.c-ask-cite:hover { background: var(--c-accent); color: var(--c-accent-ink); }
.c-home-ask-src:has(.c-ask-source), .c-hc-ask-src:has(.c-ask-source) { display: grid; gap: 6px; }
.c-ask-source { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink); text-decoration: none; font-size: 14px; min-height: 40px; }
.c-ask-source:hover { border-color: var(--c-accent); }
.c-ask-source .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 12px; font-weight: 700; }
.c-ask-source .t { display: grid; min-width: 0; flex: 1; }
.c-ask-source .t b, .c-ask-source .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-ask-source .t span { font-size: 12px; }
.c-ask-source .k { flex: none; font-size: 11px; color: var(--c-ink-3); text-transform: uppercase; letter-spacing: .06em; }
.c-ask-video { margin: 4px 0; display: grid; gap: 6px; }
.c-ask-video video { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--c-line); background: #000; }
.c-ask-video figcaption { font-size: 13px; color: var(--c-ink-2); }

/* Help center: video markers, the video row on /help, the article player, steps and callouts. */
.c-hc-video { margin: 16px 0 0; display: none; gap: 6px; scroll-margin-top: calc(var(--c-pin, var(--c-top-h, 60px)) + 16px); }
.c-hc-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--c-line); background: #000; }
.c-hc-video:target, .c-hc-video.open { display: grid; }
.c-hc-hit-section { font-size: 13px; color: var(--c-accent); }
.c-hc-body ol { list-style: none; counter-reset: hc-step; padding-left: 0; gap: 10px; }
.c-hc-body ol > li { counter-increment: hc-step; position: relative; padding-left: 40px; min-height: 28px; }
.c-hc-body ol > li::before { content: counter(hc-step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); font-size: 13px; font-weight: 600; }
.c-hc-body p { margin: 0 0 12px; }
.c-hc-body .c-banner { border-left-width: 4px; background: color-mix(in srgb, var(--c-info) 8%, var(--c-surface)); }
.c-hc-body .c-banner.tip { border-color: color-mix(in srgb, var(--c-ok) 55%, var(--c-line)); background: color-mix(in srgb, var(--c-ok) 8%, var(--c-surface)); }
.c-hc-body .c-banner.warn { background: color-mix(in srgb, var(--c-warn) 9%, var(--c-surface)); }
.c-hc-body code { padding: 1px 5px; border-radius: 5px; background: var(--c-surface-2); font-size: .92em; }
@media (max-width: 720px) {
  .c-hc-body ol > li { padding-left: 36px; }
  .c-help-popular .c-tag { white-space: normal; text-align: left; }
}
@media (max-width: 980px) {
  .c-hc-article { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .c-hc-nav { position: static; order: 2; }
}
@media (max-width: 720px) {
  .c-hc-search .c-btn { flex: 1 1 auto; min-height: 44px; }
  .c-hc-search.big .c-input { font-size: 16px; }
}

/* ── Settings → Connections (list view + side drawer) ──────────────────── */
.c-conn [data-conn-js][hidden], .c-conn-row[hidden], .c-conn [data-conn-group][hidden] { display: none !important; }
.c-conn-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.c-conn-search { width: 220px; }
.c-conn-count { color: var(--c-ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.c-conn-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Team | Only me: one segmented control for the list (links) and one for a new connection (radios). */
.c-conn-views, .c-conn-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--c-surface-2); }
.c-conn-views a, .c-conn-seg span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 7px; color: var(--c-ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.c-conn-views a:hover { color: var(--c-ink); }
.c-conn-views a[aria-current='page'], .c-conn-seg input:checked + span { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.c-conn-views a:focus-visible, .c-conn-seg input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-conn-lock { flex: none; vertical-align: -2px; }
.c-conn-who { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.c-conn-who legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.c-conn-seg { display: flex; }
.c-conn-seg label { position: relative; flex: 1 1 0; }
.c-conn-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.c-conn-seg span { width: 100%; box-sizing: border-box; }
.c-conn-who .c-help, .c-conn-who-only { margin: 8px 0 0; }
.c-conn-who-only { margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.c-conn-who:has(input[value='private']:checked) .c-conn-who-team, .c-conn-who:not(:has(input[value='private']:checked)) .c-conn-who-me { display: none; }
.c-conn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.c-conn-dot.ok { background: var(--c-ok); } .c-conn-dot.warn { background: var(--c-warn); }
.c-conn-needs { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-warn) 40%, var(--c-line)); }
.c-conn-tile { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #0e1220; background: #c3cdf0; }
.c-conn-tile img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; box-sizing: border-box; }
.c-conn-tile.t0 { background: #ffcc66; } .c-conn-tile.t1 { background: #7fb2ff; } .c-conn-tile.t2 { background: #5fe0a6; }
.c-conn-tile.t3 { background: #b9a6ff; } .c-conn-tile.t4 { background: #ffb38a; } .c-conn-tile.t5 { background: #8ad8e8; }
.c-conn-row .c-set-main { display: grid; gap: 3px; }
.c-conn-row .c-set-row-sub { margin-top: 0; }
.c-conn-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-conn-fieldline { font-family: var(--font-mono); font-size: 12px; color: var(--c-ink-2); overflow-wrap: anywhere; }
.c-conn-row .c-tag { font-size: 11px; padding: 1px 8px; }
.c-tag.c-conn-custom { background: color-mix(in srgb, #b18cff 22%, transparent); color: color-mix(in srgb, #b18cff 70%, var(--c-ink)); font-weight: 600; }
.c-conn-cta { background: var(--c-warn); border-color: transparent; color: #1a1406; font-weight: 600; }
.c-conn-row .c-status { white-space: nowrap; }
.c-conn-more { position: relative; }
.c-conn-more > summary { list-style: none; }
.c-conn-more > summary::-webkit-details-marker { display: none; }
.c-conn-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; padding: 6px; border-radius: 10px; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line), var(--shadow); }
.c-conn-pick { color: inherit; text-decoration: none; }
.c-conn-pick:hover, .c-conn-pick:focus-visible { background: var(--c-surface-2); outline: none; }
.c-conn-pick .c-set-trail { color: var(--c-ink-3); font-size: 20px; }
.c-conn-catalog { margin-top: 12px; }
.c-conn-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.c-conn-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 14px; line-height: 1.5; }
.c-conn-locked { overflow: hidden; }
.c-conn-drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.c-conn-drawer-back { position: absolute; inset: 0; background: rgba(6, 8, 16, .6); }
.c-conn-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); display: flex; flex-direction: column; background: var(--c-surface); box-shadow: -1px 0 0 var(--c-line), var(--shadow); animation: c-conn-in .2s ease-out; }
.c-conn-drawer-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 24px 16px; border-bottom: 1px solid var(--c-line); }
.c-conn-drawer-head h2 { margin: 0; font-size: 20px; }
.c-conn-drawer-body { flex: 1; overflow: auto; padding: 20px 24px 28px; }
@keyframes c-conn-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .c-conn-drawer { animation: none; } }
@media (max-width: 600px) {
  .c-conn-tools { width: 100%; } .c-conn-search { flex: 1; width: auto; }
  .c-conn-row .c-set-trail .c-btn, .c-conn-views a, .c-conn-seg span { min-height: 40px; }
  .c-conn-views { flex: 1 1 100%; } .c-conn-views a { flex: 1 1 0; }
  .c-conn-bar .c-conn-search { flex: 1 1 100%; width: auto; }
}

/* Walkthrough player (public/walkthrough.js, help/walkthroughs): a side panel beside the page, one looping clip per step. */
.c-wt { position: fixed; z-index: 1000; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--c-surface); border-left: 1px solid var(--c-line); box-shadow: var(--shadow); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; outline: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.c-wt.open { transform: none; visibility: visible; transition: transform .25s ease; }
.c-wt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.c-wt-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); }
.c-wt-head h2 { margin: 2px 0 0; font-size: 17px; }
.c-wt-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface); color: var(--c-ink-2); cursor: pointer; }
.c-wt-icon:hover { color: var(--c-ink); border-color: var(--c-accent); }
.c-wt-stage { padding: 0 18px; display: grid; gap: 12px; }
.c-wt-clip { position: relative; margin: 0; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--c-line); }
.c-wt-clip video { display: block; width: 100%; height: 100%; object-fit: contain; }
.c-wt-clip video[hidden], .c-wt-missing[hidden] { display: none; }
.c-wt-missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #b6bdd0; font-size: 13px; }
.c-wt-full { position: absolute; right: 8px; bottom: 8px; background: color-mix(in srgb, #0e1220 70%, transparent); border-color: transparent; color: #fff; }
.c-wt-now { display: grid; gap: 4px; }
.c-wt-count { font-size: 12px; font-weight: 600; color: var(--c-ink-3); }
.c-wt-now p { margin: 0; font-size: 15px; line-height: 1.5; }
.c-wt-steps { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 14px 0 0; padding: 8px 10px; border-top: 1px solid var(--c-line); display: grid; align-content: start; gap: 2px; }
.c-wt-steps button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font: inherit; font-size: 13.5px; line-height: 1.4; text-align: left; cursor: pointer; }
.c-wt-steps button:hover { background: var(--c-surface-2); color: var(--c-ink); }
.c-wt-steps button[aria-current='step'] { background: var(--c-accent-soft); color: var(--c-ink); }
.c-wt-steps .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-line); font-size: 12px; font-weight: 600; }
.c-wt-steps button[aria-current='step'] .n { border-color: var(--c-accent); color: var(--c-accent); }
.c-wt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--c-line); }
.c-wt-foot .c-btn { min-height: 40px; }
.c-hc-video[data-wt-fallback][hidden], .c-hc-acts [hidden] { display: none; }
.c-wt-guide { font-size: 13px; color: var(--c-ink-2); }
.c-wt-guide:hover { color: var(--c-accent); }
.c-wt-stage:fullscreen, .c-wt-stage.is-full { position: fixed; inset: 0; z-index: 1001; padding: 32px; background: var(--c-bg); grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); align-items: center; gap: 28px; }
.c-wt-stage:fullscreen .c-wt-clip, .c-wt-stage.is-full .c-wt-clip { max-height: calc(100vh - 64px); }
.c-wt-stage:fullscreen .c-wt-now p, .c-wt-stage.is-full .c-wt-now p { font-size: 20px; }
@media (max-width: 760px) { .c-wt-stage:fullscreen, .c-wt-stage.is-full { grid-template-columns: minmax(0, 1fr); align-content: center; padding: 16px; } }
.c-wt-stale { margin: 2px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: var(--c-ink-2); background: color-mix(in srgb, var(--c-warn) 12%, transparent); }
.c-wt-stale[hidden] { display: none; }
/* Review list for staff (/admin/walkthroughs): live still beside the new recording, per changed step. */
.c-wtr-still { margin: 0; display: grid; gap: 4px; }
.c-wtr-still img, .c-wtr-still video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--c-line); background: #000; }
.c-wtr-still figcaption { font-size: 13px; color: var(--c-ink-3); }
/* Wide screens: move the page over so the panel sits beside it, not on top. */
@media (min-width: 1180px) { html.c-wt-on body { padding-right: 420px; } }
@media (prefers-reduced-motion: reduce) { .c-wt, .c-wt.open { transition: none; } }

/* ---- Help walkthroughs admin: cards (/admin/walkthroughs) and a walkthrough's steps (/admin/walkthroughs/<name>) */
.c-wtc-run { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); font-size: 14px; }
.c-wtc-grid { display: grid; gap: 8px; }
.c-wtc { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 14px 10px 10px; }
.c-wtc.is-broken { border-color: color-mix(in srgb, var(--c-danger) 45%, var(--c-line)); }
.c-wtc.is-changed, .c-wtc.is-new { border-color: color-mix(in srgb, var(--c-warn) 45%, var(--c-line)); }
.c-wtc-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--c-surface-2); }
.c-wtc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.c-wtc-body { display: grid; gap: 4px; min-width: 0; }
.c-wtc-body h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 15px; line-height: 1.3; }
.c-wtc-body h2 a { color: var(--c-ink); text-decoration: none; }
.c-wtc-body h2 a:hover { color: var(--c-accent); }
.c-wtc-body h2 .c-tag { font-weight: 500; }
.c-wtc-body p { margin: 0; font-size: 13px; }
.c-wtc-acts { display: flex; gap: 8px; }
@media (max-width: 640px) { .c-wtc { grid-template-columns: 96px minmax(0, 1fr); } .c-wtc-acts { grid-column: 1 / -1; } }
.c-wtd-back { display: inline-block; margin: 0 0 8px; font-size: 14px; color: var(--c-ink-2); text-decoration: none; }
.c-wtd-back:hover { color: var(--c-accent); }
.c-wtd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 20px; font-size: 14px; }
.c-wts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-wts { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 16px; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-wts.is-changed, .c-wts.is-new { border-color: color-mix(in srgb, var(--c-warn) 45%, var(--c-line)); }
.c-wts.is-broken { border-color: color-mix(in srgb, var(--c-danger) 45%, var(--c-line)); }
.c-wts-text { display: flex; gap: 12px; align-items: flex-start; }
.c-wts-text .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface-2); font-size: 13px; font-weight: 600; }
.c-wts-text p { margin: 0 0 6px; font-size: 14px; }
.c-wts-text code { font-size: 12px; }
.c-wts-media { display: grid; gap: 12px; max-width: 420px; }
.c-wts-media.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
.c-wts-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; }
.c-wts-cap strong { color: var(--c-ink); font-size: 14px; }
.c-wts .c-tag { margin-top: 2px; }
.c-wts-diff { grid-column: 1 / -1; }
.c-wts-diff summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-accent); }
.c-wts-diff img { display: block; width: 100%; max-width: 640px; height: auto; margin-top: 10px; border-radius: var(--radius); border: 1px solid var(--c-line); }
.c-wts-diff p { margin: 6px 0 0; font-size: 13px; }
.c-wtd-how { display: grid; gap: 6px; margin: 0 0 20px; padding: 14px 18px; font-size: 14px; }
.c-wtd-how p { margin: 0; color: var(--c-ink-2); }
.c-wtd-note { color: var(--c-warn) !important; }
.c-wts-empty { display: grid; place-items: center; min-height: 72px; margin: 0; border-radius: var(--radius); background: var(--c-surface-2); color: var(--c-ink-3); font-size: 13px; }
@media (max-width: 820px) { .c-wts { grid-template-columns: minmax(0, 1fr); } .c-wts-media.is-pair { grid-template-columns: minmax(0, 1fr); } }

/* ---- Requests: status pills (Home widget, app panel), the app panel's Requests tab (public/app-panel-requests.js) */
.c-rq-pill, .c-pr-pill { flex: none; align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--c-accent-soft); color: var(--c-ink); }
.c-rq-pill.is-new, .c-pr-pill.is-new { background: var(--c-accent-soft); color: var(--c-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-accent) 45%, transparent); }
.c-rq-pill.is-progress, .c-pr-pill.is-progress { background: color-mix(in srgb, var(--c-warn) 16%, var(--c-surface)); color: var(--c-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-warn) 50%, transparent); }
.c-rq-pill.is-test, .c-pr-pill.is-test { background: color-mix(in srgb, var(--c-ok) 16%, var(--c-surface)); color: var(--c-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ok) 50%, transparent); }
.c-rq-pill.is-closed, .c-pr-pill.is-closed { background: var(--c-surface-2); color: var(--c-ink-2); }
.c-pr-count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--c-accent); color: var(--c-accent-ink); font-size: 11px; font-weight: 700; }
.c-panel-pane[data-panel-pane='requests'] { align-items: stretch; }
.c-pr { display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.c-pr[aria-busy='true']:empty, .c-pr[aria-busy='true'] > .c-sr:only-child { min-height: 120px; }
.c-pr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c-pr-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 999px; background: transparent; color: var(--c-ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.c-pr-chip[aria-pressed='true'] { background: var(--c-accent-soft); border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); color: var(--c-ink); }
.c-pr-chip-n { color: var(--c-ink-3); font-weight: 500; }
.c-pr-list { display: flex; flex-direction: column; gap: 10px; }
.c-pr-card { border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); overflow: hidden; }
.c-pr-card.is-open { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
.c-pr-head { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.c-pr-head:hover { background: var(--c-surface-2); }
.c-pr-head:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.c-pr-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-ink); font-size: 11.5px; font-weight: 700; }
.c-pr-av.is-builder { background: var(--c-accent); color: var(--c-accent-ink); }
.c-pr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.c-pr-title { font-size: 14.5px; font-weight: 600; color: var(--c-ink); line-height: 1.35; }
.c-pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--c-ink-3); }
.c-pr-tag { padding: 1px 7px; border-radius: 6px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 11.5px; font-weight: 600; }
.c-pr-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid var(--c-line); }
.c-pr-thread { display: flex; flex-direction: column; gap: 12px; }
.c-pr-msg { display: flex; gap: 10px; align-items: flex-start; }
.c-pr-msg-body { flex: 1; min-width: 0; }
.c-pr-who { margin-bottom: 4px; font-size: 12px; color: var(--c-ink-3); }
.c-pr-bubble { padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: var(--c-surface-2); color: var(--c-ink); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-pr-bubble.is-builder { background: var(--c-accent-soft); }
.c-pr-shot { align-self: flex-start; margin-left: 40px; }
.c-pr-shot img { display: block; max-width: 220px; max-height: 160px; border-radius: 10px; border: 1px solid var(--c-line); object-fit: cover; }
.c-pr-testing { margin-left: 40px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-ok) 12%, var(--c-surface)); font-size: 13.5px; line-height: 1.5; }
.c-pr-reply { display: flex; flex-direction: column; gap: 10px; }
.c-pr-steps { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.c-pr-steps[hidden] { display: none; }
.c-pr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-pr-actions .c-btn.sm { min-height: 36px; }
.c-pr-status-msg { font-size: 12.5px; color: var(--c-ink-3); }
.c-pr-watching { margin: 0; font-size: 12.5px; color: var(--c-ink-3); }
.c-pr-empty { margin: 0; padding: 32px 16px; border: 1px dashed var(--c-line); border-radius: 14px; text-align: center; color: var(--c-ink-3); font-size: 14px; }
.c-pr-new { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); }
.c-pr-new-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.c-pr-new-head h3 { flex: 1 1 auto; margin: 0; font-size: 16px; }
/* Help tab: Ask for help (the request form, then Completa support), the requests, then the guide and data sources. */
.c-pr-ask { gap: 12px; }
.c-pr-list-h { margin: 10px 0 0; font-size: 16px; }
.c-pr-support { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px dashed var(--c-line); border-radius: 14px; }
.c-pr-support-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); }
.c-pr-support-ic svg { width: 18px; height: 18px; }
.c-pr-support-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; color: var(--c-ink-2); }
.c-pr-support-txt strong { color: var(--c-ink); font-size: 14px; }
.c-pr-support .c-btn { flex: none; }
@media (max-width: 560px) {
  .c-pr-support { flex-wrap: wrap; }
  .c-pr-support-ic { display: none; }
  .c-pr-support .c-btn { flex: 1 1 100%; justify-content: center; }
}
.c-pr-new-head .c-select { width: auto; flex: 1 1 180px; max-width: 260px; }
.c-pr-new .c-textarea { font-size: 16px; }
.c-pr-tag.is-support { background: var(--c-accent-soft); color: var(--c-ink); }
/* ---- App panel: Help tab (help/pages.tsx /help/app/:id/panel) */
.c-panel-pane[data-panel-pane='help'] { align-items: stretch; }
.c-phelp { display: flex; flex-direction: column; gap: 22px; }
.c-phelp-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c-phelp-sec h3 { margin: 0; font-size: 16px; }
.c-phelp-sec > .c-muted { margin: 0; }
.c-phelp-doc { padding: 14px 16px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); overflow-wrap: anywhere; }
.c-phelp-doc > div > :first-child { margin-top: 0; }
.c-phelp-doc > div > :last-child { margin-bottom: 0; }
.c-phelp .c-kpis { margin: 0; }
.c-phelp .c-table-scroll { overflow-x: auto; }
.c-phelp .c-table-scroll table { min-width: 560px; }
.c-phelp .c-table-scroll th { white-space: nowrap; }
.c-phelp-doc h1, .c-phelp-doc h2, .c-phelp-doc h3 { margin: 14px 0 6px; }

/* ---- Home: Requests widget (raised by me / on my apps) */
.c-home-rq { border-color: color-mix(in srgb, var(--c-accent) 30%, var(--c-line)); }
.c-home-rq-seg { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-bg); }
.c-home-rq-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.c-home-rq-seg button[aria-pressed='true'] { background: var(--c-accent-soft); color: var(--c-ink); }
.c-home-rq-seg button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.c-home-rq-n { padding: 0 7px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); font-size: 11px; }
.c-home-rq-list { list-style: none; margin: 0 -8px; padding: 0; }
.c-home-rq-list[hidden] { display: none; }
.c-home-rq-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.c-home-rq-row:hover { background: var(--c-surface-2); color: inherit; }
.c-home-rq-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.c-home-rq-txt b { font-size: 13px; font-weight: 600; color: var(--c-ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-home-rq-txt small { font-size: 12px; color: var(--c-ink-3); }
.c-home-rq-empty { margin: 0; padding: 12px 0; font-size: 13px; color: var(--c-ink-3); }
.c-home-rq-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.c-home-rq-foot small { font-size: 12px; color: var(--c-ink-3); }

/* ---- Help › an app › Requests: the raise form and who it tells */
.c-rq-raise { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.c-rq-raise > .c-card { margin: 0; }
.c-rq-told { display: flex; flex-direction: column; gap: 10px; }
.c-rq-told h3 { margin: 0; font-size: 15px; }
.c-rq-told p { margin: 0; font-size: 13px; }
.c-rq-told ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.c-rq-told li { display: flex; gap: 10px; align-items: center; }
.c-rq-told li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.c-rq-told b { font-size: 14px; font-weight: 600; }
.c-rq-told small { font-size: 12px; color: var(--c-ink-3); }
.c-rq-told-foot { padding-top: 10px; border-top: 1px solid var(--c-line); }
@media (max-width: 760px) { .c-rq-raise { grid-template-columns: minmax(0, 1fr); } }
/* Auth0's tenant error page (/auth/error, ui/auth-error.tsx). */
.c-auth-error { text-align: center; }
.c-auth-error-art { display: block; width: 140px; height: auto; margin: 0 auto 12px; }
.c-auth-error .c-error-actions { justify-content: center; }
.c-auth-error-support { margin: 20px 0 0; }
.c-auth-error-details { margin-top: 16px; text-align: left; font-size: 13px; color: var(--c-ink-3); border-top: 1px solid var(--c-line); padding-top: 12px; }
.c-auth-error-details summary { cursor: pointer; }
.c-auth-error-details p { margin: 8px 0 0; overflow-wrap: anywhere; }

/* ---- Help home (/help): guides listed down the side, search in a card, answers with the walkthrough player ---- */
.c-help-page { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding: 24px 0 48px; }
.c-help-aside { flex: 1 1 260px; max-width: 290px; display: grid; gap: 4px; }
.c-help-aside h2 { margin: 0 0 8px; font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.c-help-group summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; list-style: none; }
.c-help-group summary::-webkit-details-marker { display: none; }
.c-help-group summary:hover, .c-help-group[open] summary { background: var(--c-surface); }
.c-help-group summary svg { flex: none; width: 18px; height: 18px; color: var(--c-accent); }
.c-help-group-n { margin-left: auto; color: var(--c-ink-3); font-size: 13px; font-weight: 500; }
.c-help-group ul { list-style: none; margin: 4px 0 10px 20px; padding: 0 0 0 10px; border-left: 1px solid var(--c-line); display: grid; }
.c-help-group li a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--c-ink-2); text-decoration: none; }
.c-help-group li a:hover { color: var(--c-ink); background: var(--c-surface); }
.c-help-has-video { flex: none; color: var(--c-accent); font-size: 10px; }
.c-help-all { padding: 10px 12px; font-size: 14px; font-weight: 600; }
.c-help-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 28px; }
.c-help-main .c-help-hero { justify-items: start; gap: 12px; padding: 40px 44px 34px; text-align: left; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; }
.c-help-main .c-help-hero > p { margin: 0 0 6px; max-width: 620px; }
.c-help-main .c-help-search { max-width: none; background: var(--c-bg); }
.c-help-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.c-help-popular .c-tag { text-decoration: none; }
.c-help-main .c-help-answer { max-width: none; margin: 0; padding: 20px 22px; gap: 16px; }
.c-help-answer .c-home-ask-text { max-width: 80ch; }
.c-help-back { justify-self: start; padding: 0; border: 0; background: none; color: var(--c-ink-2); font: 600 14px var(--font-body); cursor: pointer; }
.c-help-back:hover { color: var(--c-accent); }
.c-help-page.is-answering .c-help-aside, .c-help-page.is-answering .c-help-extras { display: none; }
.c-help-page.is-answering .c-help-hero { padding: 16px 20px; border-radius: 16px; }
.c-help-page.is-answering .c-help-hero > h1, .c-help-page.is-answering .c-help-hero > p, .c-help-page.is-answering .c-help-popular { display: none; }
.c-help-extras { display: grid; gap: 28px; }
.c-help-extras h2 { margin: 0 0 12px; font-size: 20px; }
.c-help-start { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.c-help-start a { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-ink); text-decoration: none; }
.c-help-start a:hover { border-color: var(--c-accent); color: var(--c-ink); }
.c-help-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--c-surface-2); }
.c-help-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.c-help-start .n { font-size: 12px; font-weight: 600; color: var(--c-accent); }
.c-help-pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.c-help-pair .c-help-raise h2 { margin: 0; }
@media (max-width: 720px) { .c-help-aside { max-width: none; order: 2; } .c-help-main .c-help-hero { padding: 28px 20px; } }

/* Walkthrough player in an answer (public/ask.js walk()): the clip takes most of the width, the steps sit beside it. */
.c-ask-walk { display: flex; flex-wrap: wrap; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-bg); }
.c-ask-walk-stage { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.c-ask-walk-clip { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #000; }
.c-ask-walk-clip video { display: block; width: 100%; height: 100%; object-fit: contain; }
.c-ask-walk-count { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(14, 18, 32, .82); color: #f4f6fb; font-size: 13px; font-weight: 600; }
.c-ask-walk-full { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(14, 18, 32, .82); color: #f4f6fb; font-size: 18px; cursor: pointer; }
.c-ask-walk-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--c-line); }
.c-ask-walk-now { flex: 1; min-width: 0; margin: 0; font-size: 15px; }
.c-ask-walk-side { flex: 1 1 280px; max-width: 400px; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-left: 1px solid var(--c-line); background: var(--c-surface); }
.c-ask-walk-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); }
.c-ask-walk-side h3 { margin: 0; font-size: 20px; }
.c-ask-walk-side h3 a { color: var(--c-ink); text-decoration: none; }
.c-ask-walk-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.c-ask-walk-side li button { display: flex; gap: 10px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--c-ink-2); font: 14px/1.45 var(--font-body); text-align: left; cursor: pointer; }
.c-ask-walk-side li button:hover { background: var(--c-surface-2); }
.c-ask-walk-side li button.is-now { border-color: var(--c-accent); background: var(--c-surface-2); color: var(--c-ink); }
.c-ask-walk-side li button.is-done { color: var(--c-ink-3); }
.c-ask-walk-side .n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-surface-2); font-size: 13px; font-weight: 600; }
.c-ask-walk-side .is-now .n { background: var(--c-accent); color: var(--c-accent-ink); }
.c-ask-walk-side > .c-btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 900px) { .c-ask-walk-side { max-width: none; border-left: 0; border-top: 1px solid var(--c-line); } }
@media (max-width: 640px) { .c-ask-walk-bar { flex-wrap: wrap; justify-content: space-between; } .c-ask-walk-now { flex: 1 1 100%; order: -1; } }

/* ---- Help home v2: "Help" heading, a compact search, three cards, then Start here (all on one screen) ---- */
.c-help-title { margin: 20px 0 4px; font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--c-ink); }
.c-help-page { padding-top: 20px; gap: 32px; }
.c-help-main { gap: 24px; }
.c-help-main .c-help-hero { gap: 12px; padding: 22px 26px; border-radius: 18px; }
.c-help-q { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.c-help-page.is-answering .c-help-q { display: none; }
.c-help-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.c-help-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; }
.c-help-card h2 { margin: 0; font-size: 17px; }
.c-help-card p { margin: 0; font-size: 14px; }
.c-help-card > .c-btn { align-self: flex-start; margin-top: auto; }
.c-help-card.c-help-latest strong { font-size: 15px; }
.c-help-card.c-help-latest .c-muted { font-size: 13px; }
.c-help-extras #help-start { font-size: 17px; }
.c-help-start { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.c-help-start a { display: flex; align-items: center; gap: 14px; padding: 12px; }
.c-help-start .n { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--c-accent-soft); color: var(--c-btn); font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.c-help-start a > span:last-child { display: grid; gap: 2px; }
.c-help-start a .c-muted { font-size: 13px; }

/* ---- A guide (/help/articles/<slug>), made simple: the walkthrough, Good to know, the full text behind a toggle ---- */
.c-guide { max-width: 1200px; margin: 0 auto; display: grid; gap: 20px; padding: 8px 0 48px; }
.c-guide-back { justify-self: start; color: var(--c-ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.c-guide-back:hover { color: var(--c-accent); }
.c-guide-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.c-guide-head h1 { margin: 0 0 6px; font-size: clamp(28px, 3vw, 36px); text-wrap: balance; }
.c-guide-lede { margin: 0; max-width: 640px; font-size: 17px; color: var(--c-ink-2); }
.c-guide-walk .c-ask-walk { border-radius: 18px; }
.c-guide-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.c-guide-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 12px; }
.c-guide-main > h2 { margin: 0; font-size: 18px; }
.c-guide-tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--c-ink-2); line-height: 1.55; }
.c-guide-tips strong { color: var(--c-ink); }
.c-guide-full { border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); }
.c-guide-full > summary { display: flex; justify-content: space-between; padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.c-guide-full > summary::-webkit-details-marker { display: none; }
.c-guide-full > summary::after { content: '›'; color: var(--c-ink-3); transition: transform .15s; }
.c-guide-full[open] > summary::after { transform: rotate(90deg); }
.c-guide-text { max-width: 75ch; padding: 0 20px 16px; }
.c-guide-side { flex: 1 1 280px; display: grid; gap: 12px; padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-guide-side .c-hc-vote { margin: 0; }
.c-guide-side > p { margin: 0; font-size: 14px; }
.c-guide-related h2 { margin: 0 0 12px; font-size: 18px; }
.c-guide-related > div { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.c-guide-related a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); color: var(--c-ink); text-decoration: none; }
.c-guide-related a:hover { border-color: var(--c-accent); color: var(--c-ink); }
.c-guide-related .c-muted { font-size: 13px; }
.c-guide-walk .c-ask-walk-side > .c-btn { display: none; }

/*
 * Organization settings → AI admins (home/ai-admins-tab.tsx): who adds Completa to each AI the company uses, and the
 * requests its people sent. The public page a request email links to (/ai-request/:token, home/ai-requests-ui.tsx).
 */
.c-aia { display: grid; gap: 16px; }
.c-aia-list { display: grid; gap: 10px; }
.c-aia-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); }
.c-aia-who { display: grid; gap: 2px; min-width: 0; }
.c-aia-who b { overflow-wrap: anywhere; }
.c-aia-who span { color: var(--c-ink-3); font-size: 13px; }
.c-aia-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--c-surface-2); color: var(--c-ink-3); }
.c-aia-pill.is-ok { background: color-mix(in srgb, var(--c-ok) 15%, var(--c-surface)); color: var(--c-ok); }
.c-aia-pill.is-wait { background: color-mix(in srgb, var(--c-warn) 15%, var(--c-surface)); color: var(--c-warn); }
.c-aia-edit { justify-self: end; }
.c-aia-edit summary { list-style: none; min-height: 40px; }
.c-aia-edit summary::-webkit-details-marker { display: none; }
.c-aia-edit[open] { grid-column: 1 / -1; justify-self: stretch; }
.c-aia-edit form { display: grid; gap: 10px; margin-top: 10px; max-width: 480px; }
.c-aia-edit .c-input { font-size: 16px; }
.c-aia-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.c-aia-h { margin: 8px 0 0; font-size: 16px; }
.c-aia-table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.c-aia-table th, .c-aia-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-line); }
.c-aia-table th { font-size: 12px; color: var(--c-ink-3); font-weight: 600; }
.c-air { max-width: 640px; margin: 32px auto; }
.c-air-card { display: grid; gap: 16px; }
.c-air-card h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); text-wrap: balance; }
.c-air-kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent); }
.c-air-choice { display: grid; gap: 8px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--c-line); }
.c-air-choice .c-field { width: 100%; }
.c-air-choice .c-input { font-size: 16px; }
.c-air-choice .c-btn { min-height: 44px; padding: 0 20px; }
@media (max-width: 640px) {
  .c-aia-row { grid-template-columns: minmax(0, 1fr); }
  .c-aia-pill, .c-aia-edit { justify-self: start; }
}
/* Admin → user → Add a team: a search box with a dropdown of teams, name over code. */
.c-tp { margin-top: 12px; display: grid; gap: 8px; }
.c-tp[hidden] { display: none; }
.c-tp-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.c-tp-field { position: relative; flex: 1 1 280px; min-width: 0; }
.c-tp-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border, #d0d5dd); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.c-tp-list[hidden] { display: none; }
.c-tp-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 6px; cursor: pointer; min-height: 40px; justify-content: center; }
.c-tp-list li[hidden] { display: none; }
.c-tp-list li.on, .c-tp-list li:hover { background: var(--surface-2, rgba(127, 127, 127, .14)); }
.c-tp-name { font-size: 14px; line-height: 1.2; }
.c-tp-code { font-size: 11px; line-height: 1.2; opacity: .65; }
.c-tp-none { cursor: default; opacity: .7; font-size: 13px; }
@media (max-width: 640px) { .c-tp-row > .c-btn { width: 100%; } }

/*
 * Get started's rebuilt assistant screens (home/connect-screens.tsx, .rp-* in first-run.css): each product's own
 * colors, the same on every theme, as the screenshots they replace were. Completa's sign-in page uses the email colors.
 */
:root {
  --c-rp-claude-bg: #262624; --c-rp-claude-panel: #1f1e1d; --c-rp-claude-raise: #30302e; --c-rp-claude-line: #3e3e38;
  --c-rp-claude-ink: #faf9f5; --c-rp-claude-ink-2: #a6a39b; --c-rp-claude-btn: #faf9f5; --c-rp-claude-btn-ink: #141413;
  --c-rp-gpt-bg: #212121; --c-rp-gpt-panel: #171717; --c-rp-gpt-raise: #2f2f2f; --c-rp-gpt-line: #3a3a3a;
  --c-rp-gpt-ink: #ececec; --c-rp-gpt-ink-2: #a3a3a3; --c-rp-gpt-btn: #ffffff; --c-rp-gpt-btn-ink: #0d0d0d;
  --c-rp-gpt-warn: #ff8a7a; --c-rp-gpt-warn-bg: #2b1714; --c-rp-gpt-ok: #4ade80;
  --c-rp-grok-bg: #1a1a1a; --c-rp-grok-panel: #141414; --c-rp-grok-raise: #262626; --c-rp-grok-line: #333333;
  --c-rp-grok-ink: #f2f2f2; --c-rp-grok-ink-2: #9a9a9a; --c-rp-grok-btn: #f2f2f2; --c-rp-grok-btn-ink: #111111;
  --c-rp-cp-bg: #eef2fb; --c-rp-cp-card: #ffffff; --c-rp-cp-ink: #10141e; --c-rp-cp-ink-2: #526077; --c-rp-cp-box: #e9eef9;
  --c-rp-cp-line: #d4ddec; --c-rp-cp-btn: #80a7ff; --c-rp-cp-link: #294cc4;
}

/*
 * Get started's rebuilt Claude, ChatGPT and Grok screens (home/connect-screens.tsx, .rx-* in first-run.css): colors
 * sampled from screenshots of each, the same on every theme, as the products' own dark themes are.
 */
:root {
  --c-rx-cl-page: #0c0c0c; --c-rx-cl-win: #1f1f1f; --c-rx-cl-nav: #1a1a1a; --c-rx-cl-line: #2a2a2a; --c-rx-cl-line-2: #303030;
  --c-rx-cl-ink: #e5e5e2; --c-rx-cl-ink-2: #a3a3a0; --c-rx-cl-ink-3: #898989; --c-rx-cl-raise: #2a2a2a; --c-rx-cl-on: #404040;
  --c-rx-cl-nav-on: #3b3b3b; --c-rx-cl-navsearch: #252525; --c-rx-cl-white: #efefef; --c-rx-cl-white-ink: #1f1f1f;
  --c-rx-cl-dlg: #303030; --c-rx-cl-input: #3b3b3b; --c-rx-cl-grey2: #4f4f4f; --c-rx-cl-focus: #257de0; --c-rx-cl-link: #6299d5;
  --c-rx-cl-radio: #3a86e8; --c-rx-cl-tile: #f6f8fb; --c-rx-cl-toggles: #262626;
  --c-rx-gpt-rail: #000000; --c-rx-gpt-bg: #0e0e0e; --c-rx-gpt-on: #272727; --c-rx-gpt-line: #212121; --c-rx-gpt-ink: #ececec;
  --c-rx-gpt-ink-2: #9b9b9b; --c-rx-gpt-dlg: #202020; --c-rx-gpt-input: #303030; --c-rx-gpt-white: #ececec; --c-rx-gpt-white-ink: #0d0d0d;
  --c-rx-gpt-warn-bg: #19120f; --c-rx-gpt-warn: #f2836b; --c-rx-gpt-warn-line: #3d1f17; --c-rx-gpt-check: #141414; --c-rx-gpt-ok: #3dbf6e;
  --c-rx-gk-page: #121212; --c-rx-gk-win: #191919; --c-rx-gk-line: #2b2b2b; --c-rx-gk-input-line: #393939; --c-rx-gk-raise: #222222;
  --c-rx-gk-on: #2f3030; --c-rx-gk-btn: #2b2b2b; --c-rx-gk-ink: #ececec; --c-rx-gk-ink-2: #9a9a9a; --c-rx-gk-white: #ececec; --c-rx-gk-white-ink: #111111;
  --c-rx-dim: rgba(0, 0, 0, .5);
}

/* Durable Objects lab (dev only, src/domains/lab/) */
#c-do-lab { display: flex; flex-direction: column; gap: 16px; }
#c-do-lab h2 { margin: 0 0 6px; font-size: 16px; }
.c-do-lab-room .c-toolbar { margin-bottom: 0; }
.c-do-lab-room .c-input { width: auto; flex: 1 1 160px; max-width: 280px; }
.c-do-lab-room-label { font-weight: 500; }
.c-do-lab-big { font-size: 40px; font-weight: 600; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.c-do-lab-seconds { width: 110px; }
.c-do-lab-people { margin: 8px 0 0; padding-left: 18px; }
.c-do-lab-log { list-style: none; margin: 12px 0; padding: 0; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.c-do-lab-log div { overflow-wrap: anywhere; }
.c-do-lab-chat .c-toolbar { margin-bottom: 0; flex-wrap: nowrap; }
.c-do-lab-chat .c-input { flex: 1; min-width: 0; }
#c-do-lab .c-btn { min-height: 40px; }
@media (max-width: 480px) { .c-do-lab-room .c-input { max-width: none; } }

/* Admin menu (ui/admin-tabs.tsx): the groups as small pills, then the current group's pages as tabs, above every /admin page.
   Kept to two short rows: it sticks with the page heading (app.js .c-stick), so a tall menu would cover the page. */
.c-adminnav { padding-bottom: 20px; }
/* app.js puts the menu in the sticky heading band; padding, not margin, so the band's measured height keeps the gap. */
.c-stick.is-stuck .c-stick-in > .c-adminnav { padding-bottom: 0; }
.c-adminnav-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.c-adminnav-groups a { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--c-ink-2); background: var(--c-surface); white-space: nowrap; }
.c-adminnav-groups a:hover { color: var(--c-ink); background: var(--c-surface-2); }
.c-adminnav-groups a[aria-current='true'] { color: var(--c-ink); background: var(--c-surface-2); font-weight: 600; box-shadow: inset 0 0 0 1px var(--c-accent); }
.c-adminnav .c-adminnav-pages { margin-bottom: 0; }
/* Resting on a group (or tabbing into it) drops its pages down. It hangs straight off the pill, with no gap to cross. */
.c-adminnav-group { position: relative; display: inline-flex; }
.c-adminnav-groups .c-adminnav-menu { position: absolute; top: 100%; left: 0; z-index: 40; display: none; flex-direction: column; gap: 2px; min-width: 190px; padding: 6px; margin-top: 4px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--shadow); }
.c-adminnav-groups .c-adminnav-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 6px; }
.c-adminnav-group:hover > .c-adminnav-menu, .c-adminnav-group:focus-within > .c-adminnav-menu { display: flex; }
.c-adminnav-groups .c-adminnav-menu a { padding: 7px 10px; border-radius: 6px; background: none; box-shadow: none; color: var(--c-ink-2); font-size: 13px; font-weight: 500; }
.c-adminnav-groups .c-adminnav-menu a:hover, .c-adminnav-groups .c-adminnav-menu a:focus-visible { color: var(--c-ink); background: var(--c-surface-2); }
.c-adminnav-groups .c-adminnav-menu a[aria-current='page'] { color: var(--c-ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--c-accent); }
/* No hover on a touch screen: a tap opens the group's first page, as before, and its pages are the row below. */
@media (hover: none) { .c-adminnav-group:hover > .c-adminnav-menu { display: none; } }

/* Admin pages (every page with the admin menu, ui/admin-tabs.tsx): denser than the customer-facing pages, since staff
   scan lists and edit many fields at once. Smaller headings, tighter cards, fields and tables, and cards that keep
   their own height instead of stretching to the tallest one in the row. */
.c-main:has(.c-adminnav) { --c-main-pt: 20px; font-size: 14px; }
.c-main:has(.c-adminnav) h1 { font-size: 26px; margin-bottom: 4px; }
.c-main:has(.c-adminnav) h2 { font-size: 16px; margin-bottom: 10px; letter-spacing: -0.01em; }
.c-main:has(.c-adminnav) h3 { font-size: 14px; margin-bottom: 8px; }
.c-main:has(.c-adminnav) .c-page-head { margin-bottom: 14px; align-items: center; }
.c-main:has(.c-adminnav) .c-page-head p { font-size: 13px; }
.c-main:has(.c-adminnav) .c-card { padding: 14px 16px; border-radius: var(--radius); }
.c-main:has(.c-adminnav) > .c-card + .c-card, .c-main:has(.c-adminnav) > .c-grid + .c-card, .c-main:has(.c-adminnav) > .c-card + .c-grid { margin-top: 12px; }
.c-main:has(.c-adminnav) .c-grid { gap: 12px; align-items: start; }
.c-main:has(.c-adminnav) .c-field { gap: 4px; margin-bottom: 10px; max-width: 760px; }
.c-main:has(.c-adminnav) .c-field label { font-size: 12px; }
.c-main:has(.c-adminnav) .c-input, .c-main:has(.c-adminnav) .c-select, .c-main:has(.c-adminnav) .c-textarea { padding: 6px 10px; font-size: 13.5px; }
.c-main:has(.c-adminnav) .c-goo-btn { height: 32px; }
.c-main:has(.c-adminnav) .c-btn { padding: 6px 12px; font-size: 13px; }
.c-main:has(.c-adminnav) .c-hint, .c-main:has(.c-adminnav) .c-help { font-size: 12px; }
.c-main:has(.c-adminnav) .c-toolbar { margin-bottom: 12px; gap: 8px; }
.c-main:has(.c-adminnav) .c-table { font-size: 13px; }
.c-main:has(.c-adminnav) .c-table th, .c-main:has(.c-adminnav) .c-table td { padding: 7px 10px; }
.c-main:has(.c-adminnav) .c-table th { font-size: 11px; }
.c-main:has(.c-adminnav) details > summary { padding-block: 2px; }
/* Label / value lists (the account facts on a user): one row each, label left. */
.c-main:has(.c-adminnav) .c-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 13px; }
.c-main:has(.c-adminnav) .c-card dl dt { color: var(--c-ink-3); }
.c-main:has(.c-adminnav) .c-card dl dd { margin: 0; color: var(--c-ink-2); }
/* The admin menu itself, a little smaller on these pages. */
.c-main:has(.c-adminnav) .c-adminnav { padding-bottom: 14px; }
.c-main:has(.c-adminnav) .c-adminnav-groups { margin-bottom: 4px; }
.c-main:has(.c-adminnav) .c-adminnav-group > a { padding: 3px 10px; font-size: 12px; }
.c-main:has(.c-adminnav) .c-adminnav-pages a { padding: 7px 12px; font-size: 13.5px; }

/* App icon upload (apps/detail-page.tsx, identity/pages.tsx; public/app-icon.js) */
.c-appicon { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.c-appicon-preview { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; flex: none; background: var(--c-accent-soft); color: var(--c-accent); font: 800 22px/1 var(--font-display, inherit); }
.c-appicon-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-appicon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
