/* SigmaWear Leads
   Quiet gray surfaces, one accent: Sigma blue (#7bafd4, from the mark) and its deeper shade for actions.
   Every color comes from the tokens below, so light and dark are just two sets of tokens. */

/* Schibsted Grotesk (SIL Open Font License, see /fonts/OFL-LICENSE.txt), bundled so the app needs no font service */
@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url('/fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}

/* ============================================================ tokens */

/* .theme-light: a light patch inside a dark page (the App logo preview) */
:root, .theme-light {
	/* surfaces: page, then card, then raised (menus, dialogs) */
	--page: #f4f5f7;
	--card: #ffffff;
	--raised: #ffffff;
	--hover: #eef0f3;
	--input: #ffffff;
	--sunken: #f7f8fa;
	--line: #e0e4e9;
	--line-strong: #c9cfd6;

	--text: #18212b;
	--muted: #59636f;
	--faint: #8a939e;

	/* SigmaWear blue */
	--brand: #7bafd4;
	--primary: #2f6b98;            /* filled buttons, toggles */
	--primary-hover: #24567c;
	--on-primary: #ffffff;
	--accent: #2f6b98;             /* links, active text and icons */
	--accent-soft: #e6f0f8;        /* active nav, selected rows */
	--accent-line: #c9def0;
	--focus: #2f6b98;
	--mark-ink: #0b1a2b;           /* the left half of the logo */
	--notify: #985c2f;             /* every count badge, new-dot and "needs you": the blue's opposite */
	--on-notify: #ffffff;

	--ok: #187a4a;
	--ok-soft: #e3f3ea;
	--ok-line: #bfe2cd;
	--warn: #8a5a00;
	--warn-strong: #e0a21b;
	--warn-soft: #fdf3dc;
	--warn-line: #f1d9a3;
	--bad: #b42318;
	--bad-soft: #fdecea;
	--bad-line: #f5c8c2;
	--info: #2f6b98;
	--info-soft: #e9f1f9;
	--info-line: #cfe0f0;

	/* the state picker's regions (Lead generation): dark enough for --on-primary text, in both themes */
	--region-1: #1f6f8b;
	--region-2: #7a4fa8;
	--region-3: #b04a2f;
	--region-4: #2e7d4f;
	--region-5: #8f5d00;
	--region-6: #3f5fa8;
	--region-7: #a8406f;

	--shadow: 0 12px 32px rgba(16, 24, 34, 0.14), 0 2px 6px rgba(16, 24, 34, 0.06);
	--shadow-sm: 0 1px 2px rgba(16, 24, 34, 0.08);

	--r-xs: 6px;
	--r-sm: 8px;
	--r: 12px;
	--r-lg: 16px;
	--font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--topbar: 64px;
	--sidebar: 264px;

	/* older names, kept so every page picks up the theme */
	--chalk: var(--page);
	--surface: var(--card);
	--ink: var(--text);
	--ink-2: var(--muted);
	--ink-3: var(--faint);
	--line-2: var(--line-strong);
	--accent-strong: var(--primary);
	--accent-hover: var(--primary-hover);
	--accent-100: var(--accent-line);
	--accent-50: var(--accent-soft);
	--good: var(--ok);
	--good-soft: var(--ok-soft);
	--good-ink: var(--ok);
	--warn-ink: var(--warn);
	--r-old: var(--r);

	color-scheme: light;
}

.dark {
	--page: #121417;
	--card: #1b1e22;
	--raised: #24282d;
	--hover: #272b31;
	--input: #15181b;
	--sunken: #171a1d;
	--line: #2f343a;
	--line-strong: #454c54;

	--text: #e7eaee;
	--muted: #a5adb7;
	--faint: #7c8590;

	--primary: #2f6b98;
	--primary-hover: #3b7fb2;
	--accent: #8fc0e3;             /* the brand blue, lifted to read on near-black */
	--accent-soft: #1b2c3b;
	--accent-line: #2c4a63;
	--focus: #8fc0e3;
	--mark-ink: #ffffff;
	--notify: #985c2f;
	--on-notify: #ffffff;

	--ok: #5fd391;
	--ok-soft: #173326;
	--ok-line: #255a3f;
	--warn: #f0bf57;
	--warn-strong: #e0a21b;
	--warn-soft: #362c18;
	--warn-line: #5c4a22;
	--bad: #ff8f86;
	--bad-soft: #3a1f1d;
	--bad-line: #643330;
	--info: #8fc0e3;
	--info-soft: #1b2c3b;
	--info-line: #2c4a63;

	--shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);

	color-scheme: dark;
}

/* ============================================================ base */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: var(--font);
	font-size: 14.5px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

button, input, select, textarea, table { font-family: inherit; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }
h1, h2, h3 { margin: 0; color: var(--text); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; display: block; }
/* lined-up digits only where numbers are compared (this font also widens commas in that mode) */
.nav-badge, .score, .table .rownum { font-variant-numeric: tabular-nums; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* * The screen's visible height: 100dvh where the browser knows it (on iPad Safari 100vh runs on behind the toolbar) */
:root { --vh: 100vh; }
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

/* ============================================================ shell: top bar */

.shell { min-height: var(--vh); }

.topbar {
	position: sticky; top: 0; z-index: 30;
	height: var(--topbar);
	display: flex; align-items: center; gap: 24px;
	padding: 0 20px 0 22px;
	background: var(--card);
	border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: auto; flex: none; display: block; }
.brand-mark.small { width: 26px; }
.mark-ink { fill: var(--mark-ink); }
/* The app's own logo (Settings → Brands): square, the same width as the default mark */
.app-logo-img { aspect-ratio: 1; object-fit: contain; }
/* With a light and a dark logo, only the one for the current theme shows */
.dark .app-logo-light, html:not(.dark) .app-logo-dark { display: none; }
.app-logo-slot + .app-logo-slot { margin-top: 14px; }
.app-logo-label { flex: 0 0 170px; font-size: 13.5px; font-weight: 600; }
.app-logo-previews { display: flex; flex-wrap: wrap; gap: 12px; }
.app-logo-preview { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 14px 16px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); }
.app-logo-preview .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-logo-theme { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
/* Accent color (Settings → Brands): Default or a brand's color, as swatches */
.accent-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.accent-option { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 8px 12px; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; text-align: left; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.accent-option:hover:not(:disabled) { background: var(--hover); }
.accent-option.selected { background: var(--accent-soft); border-color: var(--accent); }
.accent-option:disabled { cursor: not-allowed; }
.accent-swatch { flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--r-xs); }
.accent-text { min-width: 0; display: flex; flex-direction: column; }
.accent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.accent-note { color: var(--muted); font-size: 12.5px; }
.accent-feedback { margin-top: 12px; }
.notify-own { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 16px; }
.notify-hint { display: block; margin: 6px 0 0; }
.brand-name { color: var(--text); font-weight: 750; font-size: 18px; letter-spacing: -0.015em; }
.brand-name span { color: var(--accent); font-weight: 600; margin-left: 5px; }

.app-tabs { display: flex; align-items: stretch; gap: 6px; margin-left: auto; height: 100%; }
.app-tab {
	display: flex; align-items: center; gap: 8px; padding: 0 12px;
	color: var(--muted); text-decoration: none; font-weight: 550; font-size: 14px;
	border-bottom: 2px solid transparent; margin-bottom: -1px;
	transition: color 0.12s, border-color 0.12s;
}
.app-tab:hover { color: var(--text); }
.app-tab:hover .icon { color: var(--accent); }
.app-tab.active { color: var(--text); border-bottom-color: var(--primary); }
.app-tab.active .icon { color: var(--accent); }
.dark .app-tab.active { border-bottom-color: var(--accent); }

.icon-button {
	display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover { background: var(--hover); color: var(--text); }
.menu-toggle { display: none; }
/* * Back on a detail page: on phone-width screens and in the installed phone app, never on the desktop */
.topbar-back { display: none; flex: none; }
.topbar-back.always { display: grid; }

.avatar-button { flex: none; padding: 3px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; }
.avatar-button:hover, .avatar-button.open { border-color: var(--brand); }
.avatar {
	width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
	background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}
.avatar.large { width: 52px; height: 52px; font-size: 20px; }

.account-menu {
	position: absolute; top: calc(var(--topbar) - 6px); right: 16px; z-index: 40; width: 300px;
	background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
	padding: 16px; animation: pop 0.12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.account-menu-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.account-menu-who { display: flex; flex-direction: column; min-width: 0; }
.account-menu-who strong { font-size: 15.5px; }
.account-menu-who span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-who .account-menu-role { color: var(--accent); font-weight: 600; font-size: 12.5px; }
.account-menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--hover); border-radius: 10px; }
.theme-switch button {
	display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 0; border-radius: 7px;
	background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.theme-switch button:hover { color: var(--text); }
.account-menu-links { display: flex; flex-direction: column; padding-top: 8px; }
.menu-row {
	display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 0; border-radius: var(--r-sm);
	background: none; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.menu-row .icon { color: var(--muted); }
.menu-row:hover { background: var(--hover); color: var(--text); }

/* ============================================================ shell: sidebar */

.frame { display: flex; min-height: calc(var(--vh) - var(--topbar)); }

.sidebar {
	position: sticky; top: var(--topbar); align-self: flex-start;
	width: var(--sidebar); flex: none; height: calc(var(--vh) - var(--topbar));
	display: flex; flex-direction: column;
	padding: 18px 14px 16px 0;
	background: var(--card); border-right: 1px solid var(--line);
	overflow-y: auto; z-index: 20;
}

.nav-group, .nav-subgroup {
	margin: 4px 0 8px 24px; color: var(--faint);
	font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em;
}
.nav-subgroup { margin: 12px 0 4px 54px; }

.nav-item {
	position: relative; display: flex; align-items: center; gap: 14px;
	width: 100%; min-height: 42px; padding: 0 16px 0 24px;
	border: 0; border-radius: 0 999px 999px 0; background: none;
	color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
	transition: background 0.12s, color 0.12s;
}
.nav-item .icon { color: var(--faint); }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item:hover .icon { color: var(--muted); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-item.active .icon { color: var(--accent); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dot { width: 20px; flex: none; }
.nav-sub .nav-item { min-height: 36px; font-size: 13.5px; }

.nav-badge {
	min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
	border-radius: 10px; background: var(--notify); color: var(--on-notify); font-size: 11.5px; font-weight: 700;
}

.toggle-group .chevron { display: flex; color: var(--faint); transition: transform 0.15s; transform: rotate(-90deg); }
.toggle-group.open .chevron { transform: none; }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-item.danger, .nav-item.danger .icon { color: var(--bad); }
.nav-item.danger:hover { background: var(--bad-soft); }

.scrim { display: none; }

/* ============================================================ content */

.content { flex: 1; min-width: 0; padding: 28px 32px 96px; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; min-height: 44px; }
.page-step { color: var(--warn); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.page-header h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.page-intro { margin-top: 6px; max-width: none; color: var(--muted); font-size: 14.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.back-link { display: inline-flex; align-items: center; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--accent); }
.back-link::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }

/* sections are cards on the page */
.section { margin-bottom: 16px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.section-head p { margin-top: 3px; color: var(--muted); font-size: 13.5px; }
.section > .table-wrap, .section > .grid-wrap { margin: 0 -1px; }
/* separate blocks side by side on wide screens (one column under 1100px); a lone or .wide block takes the whole row */
.page-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.page-columns > :only-child, .page-columns > .wide, .page-columns:has(> :empty) > * { grid-column: 1 / -1; }
.page-columns > :empty { display: none; }
.page-column { display: flex; flex-direction: column; gap: 16px; }
.page-columns > *, .page-column > * { min-width: 0; margin-bottom: 0; }
.page-columns .section, .integration { container-type: inline-size; }
@container (max-width: 480px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ forms */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; max-width: 1040px; }
.form-grid + .toggles, .toggles + .form-grid, .form-grid + .toggle { margin-top: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.optional { font-weight: 400; color: var(--faint); }
.field-hint { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.field-hint.good { color: var(--ok); }

.input, .select select {
	width: 100%; height: 40px; padding: 0 12px;
	font: inherit; font-size: 14.5px; color: var(--text);
	background: var(--input); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
	transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder { color: var(--faint); }
.input:hover, .select select:hover { border-color: var(--faint); }
.input:focus, .select select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-soft); }
.dark .input:focus, .dark .select select:focus { border-color: var(--accent); }
.input[type='number'] { max-width: 220px; }
textarea.input { height: auto; min-height: 60px; padding: 10px 12px; line-height: 1.45; resize: vertical; font: inherit; }
pre.input { height: auto; margin: 0; padding: 10px 12px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; text-overflow: ellipsis; }
.select::after {
	content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
	border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}

.segmented {
	display: inline-flex; padding: 3px; gap: 2px; width: fit-content; max-width: 100%; overflow-x: auto;
	background: var(--hover); border-radius: 10px;
}
.segmented button {
	font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
	padding: 6px 14px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
/* the selected tab or choice in every tab bar and the theme switch, in the app's own accent */
.segmented button.on, .theme-switch button.on { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }

.toggles { display: flex; flex-direction: column; gap: 14px; }
.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track {
	flex: none; width: 36px; height: 20px; margin-top: 1px; border-radius: 10px;
	background: var(--line-strong); position: relative; transition: background 0.15s;
}
.toggle-thumb {
	position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; font-weight: 500; }
.toggle.disabled { cursor: not-allowed; }
.toggle.disabled .toggle-track { background: var(--hover); }
.toggle.disabled .toggle-text > span:first-child { color: var(--faint); }

.file-source { display: flex; align-items: center; gap: 10px; }
.file-source .select { flex: 1; min-width: 0; }
.or { color: var(--faint); font-size: 13.5px; }

.query-preview { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.query-preview-label { font-size: 12.5px; color: var(--faint); margin-right: 2px; }
.query-preview code {
	font-family: var(--font); font-size: 13px; font-weight: 500;
	padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
}
.query-preview .more { font-size: 12.5px; color: var(--faint); }

.estimate { margin-bottom: 18px; }
.estimate p:first-child { font-size: 15px; }
.estimate strong { font-weight: 700; }
.fine { margin-top: 6px; font-size: 12.5px; color: var(--faint); }

details.more { margin-top: 18px; }
details.more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.more[open] summary { margin-bottom: 14px; }

/* ============================================================ buttons */

.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 38px; padding: 0 16px;
	font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
	color: var(--text); background: var(--card);
	border: 1px solid var(--line-strong); border-radius: var(--r-sm);
	cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.button:hover { background: var(--hover); border-color: var(--line-strong); color: var(--text); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.button.ghost { background: transparent; border-color: transparent; color: var(--text); }
.button.ghost:hover { background: var(--hover); color: var(--accent); }
.button.small { height: 30px; padding: 0 11px; font-size: 13px; }
.button.wide { width: 100%; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button.upload { position: relative; overflow: hidden; border-style: dashed; }
.button.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.button.danger { color: var(--bad); border-color: currentColor; background: transparent; }
.button.danger:hover { background: var(--bad-soft); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.run-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.run-row .button.primary { height: 42px; padding: 0 22px; font-size: 14.5px; }
.run-feedback { font-size: 13.5px; }
.run-feedback.good { color: var(--ok); }
.run-feedback.bad { color: var(--bad); }
.run-feedback.warn { color: var(--warn); }

/* ============================================================ notices, pills, text colors */

.notice {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r);
	font-size: 14px; border: 1px solid;
}
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.notice.good { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.notice.bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.notice.info { background: var(--info-soft); border-color: var(--info-line); color: var(--text); }
.notice a { color: inherit; font-weight: 600; }
.notice-action { flex: none; }
.notice-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
/* View as: the banner stays under the top bar while the page scrolls */
.view-as-bar { position: sticky; top: var(--topbar); z-index: 20; padding-top: 8px; margin-top: -8px; background: var(--page); }
/* A note under a table row stays in sight and wraps when the table scrolls sideways (Users on a phone) */
.table-wrap:has(.inline-row > td > .notice) { container-type: inline-size; }
.inline-row > td > .notice { position: sticky; left: 16px; max-width: calc(100cqw - 32px); }

.pill {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 2px 9px; border-radius: 999px; white-space: nowrap;
	font-size: 12px; font-weight: 600;
}
.pill.good { background: var(--ok-soft); color: var(--ok); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.muted { background: var(--hover); color: var(--muted); }
.pill.live { background: var(--accent-soft); color: var(--accent); }
.pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.good-text { color: var(--ok); font-weight: 600; }
.bad-text, .danger-text { color: var(--bad); }
.warn-text { color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty-line { color: var(--muted); font-size: 14px; }

/* ============================================================ stat tiles */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.kpi {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 104px;
	padding: 14px 16px; text-align: left; cursor: pointer;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font: inherit; color: var(--text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kpi:hover { border-color: var(--line-strong); }
.kpi.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.dark .kpi.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi-label { order: -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 10px; }
.kpi-value { margin-top: auto; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-note { font-size: 12px; color: var(--faint); }
.kpi.good .kpi-value { color: var(--ok); }
.kpi.attention { border-color: var(--warn-line); background: var(--warn-soft); }
.kpi.attention .kpi-value, .kpi.attention .kpi-label { color: var(--warn); }
.kpi.static { cursor: default; }
.kpi.static:hover { border-color: var(--line); }

/* the funnel strip on lists and batches */
.batches { display: flex; flex-direction: column; gap: 14px; }
.batch, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 14px; }
.batch-head h2 { font-size: 16px; font-weight: 650; }
.batch-head p { margin-top: 2px; font-size: 13px; color: var(--faint); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.metric { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 14px 20px 16px; text-decoration: none; color: var(--text); border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand); }
.metric.dim::after { background: transparent; }
a.metric:hover { background: var(--hover); color: var(--text); }
.metric-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.metric-label { font-size: 13px; color: var(--muted); }
.metric.dim .metric-value { color: var(--line-strong); }
.metric.dim .metric-label { color: var(--faint); }
.funnel-card { margin-bottom: 14px; }
.funnel-card .metrics { border-top: 0; }

.running-strip {
	display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px 14px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px;
}
.running-strip a { margin-left: auto; font-weight: 600; }
.running-strip .progress { flex: 1; }
.running-name { font-weight: 600; white-space: nowrap; }

/* empty states offer the next step */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 24px; background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-state h2 { font-size: 16px; font-weight: 650; }
.empty-state p { margin: 0 0 12px; color: var(--muted); }
.empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ============================================================ tables */

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar > * { min-width: 0; max-width: 100%; }
.toolbar .input.search { flex: 1; min-width: 200px; max-width: 360px; border-radius: 999px; padding-left: 16px; background: var(--hover); border-color: transparent; }
.toolbar .input.search:focus { background: var(--input); border-color: var(--primary); }

.table-wrap { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
	text-align: left; padding: 11px 16px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em;
	border-bottom: 1px solid var(--line); background: var(--sunken); white-space: nowrap;
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.4; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table tr.selected td, .table tr.selected:hover td { background: var(--accent-soft); }
.table .strong { font-weight: 600; }
.table .muted { color: var(--muted); }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .filename { font-size: 13px; color: var(--muted); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.table .empty { text-align: center; padding: 40px 16px; color: var(--faint); }
tr.clickable { cursor: pointer; }
.row-error { margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--bad); }
.inline-row td { background: var(--accent-soft); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .select { width: 320px; }
.inline-form .select select { height: 32px; font-size: 13.5px; }
.check-col { width: 1%; padding-right: 0 !important; }
.check-col input { width: 16px; height: 16px; cursor: pointer; }

.grid-wrap { position: relative; max-height: 70vh; overflow: auto; }
.table.grid { font-size: 13px; }
.table.grid th { position: sticky; top: 0; z-index: 1; }
.table.grid td { padding: 8px 14px; }
.table.grid .rownum { color: var(--faint); width: 1%; }
.table.grid .reason { color: var(--muted); min-width: 200px; }
.table.grid tr.removed td:not(:nth-child(-n+3)) { color: var(--faint); }
.table.grid tr.removed td a { color: var(--faint); }

.decision { font: inherit; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.decision.keep { background: var(--ok-soft); color: var(--ok); }
.decision.remove { background: var(--bad-soft); color: var(--bad); }
.decision:hover { border-color: currentColor; }
.decision.changed { box-shadow: 0 0 0 2px var(--warn-strong); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ============================================================ progress */

.progress { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.progress-track { flex: 1; min-width: 80px; height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.6s ease; }
.progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.progress-text strong { color: var(--text); font-weight: 700; }
.progress.indeterminate .progress-fill { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.status-cell { min-width: 200px; width: 240px; }
.status-cell .progress { min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.status-cell .progress-track { flex-basis: 100%; }
.status-cell .progress-text { white-space: normal; }
.plan { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.plan strong { color: var(--text); }

/* ============================================================ integrations: one row per service, opens in place */

/* * Cards in a row share one height; a closed card next to an opened one keeps its own height at the top */
.integrations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 4px; }
.integration { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.integration.open:nth-child(odd) + .integration, .integration:nth-child(odd):has(+ .integration.open) { align-self: start; }
/* * Logo, title, status (a fixed column) and arrow (far right) sit in the same spots on every card */
.integration-head {
	flex: 1 0 auto; display: grid; grid-template-columns: 36px minmax(0, 1fr) 96px 18px; align-items: start; gap: 14px; width: 100%; padding: 14px 18px;
	border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.integration.open .integration-head { flex-grow: 0; }
.integration-head:hover { background: var(--hover); }
.integration-head h2 { font-size: 14.5px; font-weight: 650; }
.integration-head p { color: var(--muted); font-size: 13px; margin-top: 1px; }
.integration-head > div { min-width: 0; }
.integration-head .status-dot, .integration-head .chevron { height: 36px; }
.integration-head .chevron { display: flex; align-items: center; color: var(--faint); transition: transform 0.15s; }
.integration.open .integration-head .chevron { transform: rotate(180deg); }
.integration-body { padding: 4px 18px 20px 70px; border-top: 1px solid var(--line); padding-top: 18px; }
.integration .run-row { margin-top: 16px; }
.integration .run-row .button.primary { height: 38px; padding: 0 18px; font-size: 14px; }
.integration-mark {
	flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
	font-weight: 800; font-size: 14px; color: #fff;
}
.integration-mark.has-logo svg { width: 20px; height: 20px; display: block; }
.integration-mark.has-logo { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.integration-mark.mailjet { background: #f2a516; }
.integration-mark.ahrefs { background: #ff7a1a; }
.integration-mark.google { background: #4170d8; }
.integration-mark.microsoft { background: #00a4ef; font-size: 11px; }
.integration-mark.brave { background: #e5582e; }
.integration-mark.openai { background: #1f2a26; font-size: 12.5px; }
.dark .integration-mark.openai { background: #3a4a44; }
.integration-mark.youtube { background: #d7322b; }
.integration-mark.serper { background: #0f766e; }
.integration-mark.app, .integration-mark.customer-mail { background: #475569; }
.integration-mark.claude, .integration-mark.claude-connector { background: #c46a4a; }
.integration-mark.sanmar { background: #c8102e; font-size: 12.5px; }
.integration-mark.sanmarftp { background: #8a0b20; font-size: 11px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--faint); white-space: nowrap; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status-dot.on { color: var(--ok); font-weight: 600; }
.status-dot.on::before { background: var(--ok); }

/* ============================================================ original tools (Other scrapers) */

.legacy .container { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.legacy .card-head, .legacy h2 { display: none; }
.legacy p { color: var(--muted); font-size: 14.5px; }
.legacy p b { color: var(--text); }
.legacy .input-group, .legacy .search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.legacy input[type='text'], .legacy input[type='presuf'] {
	flex: 1 1 200px; height: 40px; padding: 0 12px; font: inherit; font-size: 14.5px;
	border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--input); color: var(--text);
}
.legacy input[type='text']:focus, .legacy input[type='presuf']:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-soft); }
.legacy .presuf { flex: 0 1 180px; }
.legacy input[type='file'] { font: inherit; font-size: 13.5px; color: var(--muted); }
.legacy .select-wrapper { position: relative; min-width: 220px; }
.legacy .select-wrapper::after {
	content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
	border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.legacy select {
	appearance: none; -webkit-appearance: none; width: 100%; height: 40px; padding: 0 36px 0 12px;
	font: inherit; font-size: 14.5px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--input); color: var(--text);
}
.legacy button {
	height: 40px; padding: 0 20px; font: inherit; font-size: 14px; font-weight: 600; color: var(--on-primary);
	background: var(--primary); border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.legacy button:hover { background: var(--primary-hover); }
.legacy .checkbox-container { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.legacy .message p { display: inline-block; margin-top: 14px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; }
.legacy .message p.success { background: var(--ok-soft); color: var(--ok); }
.legacy .message p.error { background: var(--bad-soft); color: var(--bad); }

.town-lists { margin-bottom: 20px; font-size: 13px; color: var(--faint); }

/* ============================================================ restart page */

.standalone { max-width: 520px; margin: 18vh auto 0; padding: 0 24px; }
.standalone h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.standalone p { margin: 10px 0 24px; color: var(--muted); }

/* ============================================================ file viewer */

.cleanup-panel { margin-bottom: 16px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--r-lg); }
.cleanup-panel h2 { font-size: 16px; font-weight: 650; }
.cleanup-panel > p { margin: 6px 0 16px; color: var(--muted); font-size: 14px; }
.cleanup-panel .run-row { margin-top: 18px; }
.cleanup-panel .run-row .button.primary { height: 38px; padding: 0 18px; font-size: 14px; }
.pending { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13.5px; color: var(--warn); font-weight: 600; }

/* ============================================================ Autopilot */

.search-rows { display: flex; flex-direction: column; gap: 12px; }
.search-row {
	display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.1fr) auto; gap: 12px; align-items: end;
	padding: 14px 16px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r);
}
.search-row .remove-row { align-self: end; margin-bottom: 4px; }
.search-row .field-label { white-space: nowrap; }
.search-row .who-counts { grid-column: 1 / -1; }
.add-row { margin-top: 12px; }

.state-picker { gap: 10px; }
.state-picker-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.state-picker-bar .field-label { margin-right: 4px; }
.state-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.state-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
/* * The regions centered against the map, with anything extra (Minimum population) in the space under them */
.state-side { display: grid; grid-template-rows: 1fr auto 1fr; gap: 16px; flex: 0 1 220px; min-width: 0; }
.state-side::before { content: ''; }
.state-side-extra { align-self: start; }
.state-regions { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.state-region {
	display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-left: 4px solid var(--rc); border-radius: var(--r-sm);
	background: var(--card); color: var(--text); font: 600 13.5px var(--font); text-align: left; cursor: pointer;
}
.state-region:hover { background: var(--hover); }
.state-region.on { background: color-mix(in srgb, var(--rc) 18%, var(--card)); border-color: var(--rc); }
.state-region .state-count { margin-left: auto; font-weight: 400; white-space: nowrap; }
.state-swatch { width: 10px; height: 10px; border-radius: 999px; background: var(--rc); flex: none; }
.state-map { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; flex: 1 1 340px; max-width: 560px; min-width: 0; }
.state-tile {
	aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--rc); border-radius: var(--r-xs);
	background: color-mix(in srgb, var(--rc) 14%, var(--card)); color: var(--text); font: 600 11.5px var(--font); cursor: pointer;
}
.state-tile:hover { background: color-mix(in srgb, var(--rc) 30%, var(--card)); }
.state-tile.on { background: var(--rc); color: var(--on-primary); }
/* * On a phone the map takes the full width (tighter gaps for bigger tiles) and the regions go under it */
@media (max-width: 560px) {
	.state-map { gap: 2px; flex-basis: 100%; }
	.state-tile { font-size: 10.5px; }
	.state-side { display: flex; flex-direction: column; flex-basis: 100%; }
	.state-side::before { content: none; }
}
.state-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.state-chip {
	display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-xs);
	background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.state-chip:hover { background: var(--hover); }
.state-chip.on { background: color-mix(in srgb, var(--rc) 18%, var(--card)); color: var(--text); border-color: var(--rc); }
/* * A lead list's segments: its states and regions (.auto), the ones it belongs to, and the Add segment pick */
.list-segments { align-items: center; gap: 8px; }
.list-segments .state-chip { cursor: default; color: var(--text); max-width: 100%; }
.list-segments .state-chip.auto { color: var(--muted); background: var(--sunken); }
.list-segments .state-chip .link-button { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
.list-segments .select { flex: 0 1 220px; min-width: 0; }
/* * Segments: a category's name with its rename button */

.queue-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.queue-bar strong { color: var(--text); }
.queue-bar-actions { display: flex; gap: 6px; }
.plan-group { margin-bottom: 18px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.plan-meta { color: var(--faint); }
.queue { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.qrow { padding: 14px 16px; border-top: 1px solid var(--line); }
.qrow:first-child { border-top: 0; }
.qrow.cancelled { opacity: 0.6; }
.qrow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qrow-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qrow-actions { display: flex; gap: 6px; }
.qrow-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.qrow-note.bad { color: var(--bad); }
.qrow-note.warn { color: var(--warn); }

.chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.chips.steps-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.chip {
	position: relative; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px 8px; overflow: hidden;
	border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunken); text-decoration: none; color: var(--faint);
}
.chip-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.chip-detail { font-size: 13px; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.done { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
a.chip.done:hover { border-color: var(--ok); }
.chip.running { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip.failed { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.chip.attention { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.chip.skipped { background: transparent; border-style: dashed; }
.chip-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent-line); }
.chip-bar span { display: block; height: 100%; background: var(--brand); transition: width 0.4s ease; }
.chip-bar span.pulse { animation: slide 1.4s ease-in-out infinite; }
.autopilot-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ============================================================ Lead lists */

/* Fixed columns so Status, the counts and Action sit in the same place on every row; List takes the rest
   (on a phone the table scrolls inside its box) */
.lists-table { table-layout: fixed; min-width: 860px; }
.lists-table td, .lists-table th { padding-left: 12px; padding-right: 12px; }
.lists-table th.sortable .sort-button { padding-left: 12px; padding-right: 12px; }
.lists-table th.num .sort-button { justify-content: flex-end; }
.lists-table .check-col { width: 44px; }
.lists-table .status-col { width: 170px; }
.lists-table th.num { width: 88px; }
.lists-table td.num { font-variant-numeric: tabular-nums; }
.lists-table .action-col { width: 170px; }
.lists-table .list-title { overflow-wrap: anywhere; }
.lists-table .list-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-title { font-weight: 600; color: var(--text); text-decoration: none; }
.list-title:hover { color: var(--accent); text-decoration: underline; }
.list-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.list-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.audience-line { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.tabs-row { margin-bottom: 16px; }
.merge-hint { margin: -6px 0 12px; }

.review-bar { position: sticky; top: var(--topbar); z-index: 2; padding: 10px 0; background: var(--page); margin-bottom: 8px; }
.section .review-bar { background: var(--card); top: var(--topbar); }
.review-count { font-size: 13.5px; color: var(--muted); }
.review-count strong { color: var(--text); }
.saved-state { font-size: 12.5px; color: var(--faint); min-width: 60px; }
.review { display: flex; flex-direction: column; gap: 10px; }
.org { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.org.out { opacity: 0.55; }
.org-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.org-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.org-meta { font-size: 12.5px; color: var(--faint); }
.org-meta a { color: var(--accent); }
.org-reason { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.org-leads { list-style: none; margin: 0; padding: 4px 0; }
.org-leads li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 16px; font-size: 13.5px; }
.org-leads li.out .lead-email { text-decoration: line-through; color: var(--faint); }
.org-leads.readonly li { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); }
.keep-toggle { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.keep-toggle input { width: 18px; height: 18px; cursor: pointer; }
.lead-email { white-space: normal; overflow: visible; }
.lead-type { font-size: 12px; color: var(--faint); }
.note-input { height: 32px; font-size: 13px; }
.lead-note { font-size: 12.5px; color: var(--muted); font-style: italic; }
.land { margin-top: 18px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 14px; }
.land-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.land-actions .select { min-width: 240px; }

.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; padding: 10px 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r); font-size: 13.5px; }
.made-from { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.made-from a { color: var(--accent); font-weight: 600; }
.made-from li { overflow-wrap: anywhere; }
.made-from .made-from { margin: 6px 0 0 6px; padding-left: 12px; border-left: 1px solid var(--line); font-size: inherit; }
.made-from-fold { font-size: 12.5px; }
.made-from-fold > summary { width: fit-content; padding: 7px 0; cursor: pointer; color: var(--accent); font-weight: 600; }
.made-from-fold > .made-from { gap: 4px; padding-bottom: 4px; font-size: 13px; }
.from-list { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); vertical-align: 1px; }

/* ============================================================ sign-in */

.auth-page { min-height: var(--vh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 16px; background: var(--page); }
.auth-card { width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 20px; padding: 28px 28px 24px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .brand-mark { width: 38px; }
.auth-brand .brand-name { font-size: 20px; }
.auth-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; text-align: center; }
.auth-intro { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 16px; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.auth-form .input { height: 44px; border-radius: 10px; }
.auth-form .button.primary { height: 44px; border-radius: 10px; font-size: 15px; }
.auth-form .app-check { white-space: normal; min-height: 32px; }
.auth-error { color: var(--bad); background: var(--bad-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--faint); line-height: 1.5; text-align: center; }
.auth-back { display: block; margin: 14px auto 0; font-size: 13px; }
.enroll { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 4px; text-align: center; }
.enroll img { border-radius: 10px; background: #fff; padding: 8px; }
.secret { display: inline-block; margin-top: 4px; font-size: 13px; letter-spacing: 0.06em; word-break: break-all; }

/* ============================================================ accounts, logs */

.invite-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: start; }
.invite-link { display: inline-block; margin-top: 6px; font-size: 12px; word-break: break-all; }
.ai-detail { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.ai-detail summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.ai-detail pre { margin-top: 6px;padding: 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; color: var(--text); }

/* ============================================================ Product match */

.drop { border: 2px dashed var(--line-strong); border-radius: var(--r); padding: 18px; margin-bottom: 18px; background: var(--sunken); text-align: center; }
.drop.over { border-color: var(--primary); background: var(--accent-soft); }
.drop-photos { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 12px; }
.drop-photo { position: relative; }
.drop-photo img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; background: #fff; }
.drop-remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--text); color: var(--card); cursor: pointer; font-size: 16px; line-height: 24px; padding: 0; }

.understood { display: flex; gap: 18px; align-items: flex-start; }
.understood img { width: 104px; height: 104px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); flex: none; background: #fff; }
.understood-label { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; }
.understood-summary { margin: 4px 0 6px; font-size: 16.5px; font-weight: 600; }
.understood .fine { margin: 2px 0; }

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.match-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.12s; }
.match-card:hover { border-color: var(--line-strong); }
.match-card.fb-good { border-color: var(--ok); }
.match-card.fb-bad { opacity: 0.7; }
.match-image { background: #fff; height: 210px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); color: #8a939e; font-size: 13px; padding: 10px; }
.match-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.match-body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.match-top { display: flex; gap: 12px; align-items: flex-start; }
.match-top h3 { margin: 0; font-size: 15px; font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.match-top h3 a { color: var(--text); text-decoration: none; }
.match-top h3 a:hover { color: var(--accent); text-decoration: underline; }
.match-title { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.score { flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; background: var(--hover); color: var(--muted); }
.score.good { background: var(--ok-soft); color: var(--ok); }
.score.live { background: var(--accent-soft); color: var(--accent); }
.match-why, .match-diff { margin: 0; font-size: 13.5px; }
.match-diff { color: var(--muted); }
.match-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 4px 0 0; font-size: 13px; }
.match-facts dt { color: var(--faint); }
.match-facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-feedback { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fb-chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; }
.fb-chip.good { background: var(--ok-soft); color: var(--ok); }
.fb-chip.bad { background: var(--bad-soft); color: var(--bad); }
.fb-form { display: flex; gap: 8px; align-items: center; width: 100%; }
.fb-form .input { flex: 1; height: 32px; }
.match-foot { margin-top: 18px; }
.remove-link { margin-left: auto; color: var(--faint); font-size: 13px; }
.removed-list { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.removed-list .link-button { margin-left: 8px; font-size: 12.5px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { background: var(--sunken); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; }

/* customer PDF: always printed on white paper, so its colors are fixed */
.sheet-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
.sheet-controls { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 24px; }
.sheet-toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 16px 0; }
.sheet { background: #fff; color: #0f1b27; padding: 40px 44px; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 2px 10px rgba(15, 27, 39, 0.06); }
.sheet h1, .sheet h2 { color: #0f1b27; }
.sheet .mark-ink { fill: #0b1a2b; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 3px solid #7bafd4; padding-bottom: 16px; margin-bottom: 20px; }
.sheet-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #0b1a2b; }
.sheet-mark { width: 40px; height: auto; }
.sheet-meta { text-align: right; }
.sheet-meta h1 { margin: 0; font-size: 22px; }
.sheet-meta p { margin: 4px 0 0; color: #4a5867; font-size: 13.5px; }
.sheet-note { font-size: 15px; margin: 0 0 18px; white-space: pre-wrap; }
.sheet-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 700; color: #2f6b98; margin: 18px 0 8px; }
.sheet-current { display: flex; gap: 16px; align-items: center; background: #f4f6f9; border-radius: 8px; padding: 12px 14px; }
.sheet-current img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; background: #fff; }
.sheet-current .sheet-label { margin-top: 0; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sheet-item { display: flex; gap: 12px; border: 1px solid #dde3ea; border-radius: 8px; padding: 12px; break-inside: avoid; page-break-inside: avoid; }
.sheet-img { flex: none; width: 110px; height: 130px; display: flex; align-items: center; justify-content: center; }
.sheet-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sheet-body { min-width: 0; font-size: 13.5px; }
.sheet-body h2 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sheet-score { flex: none; font-size: 12px; font-weight: 700; color: #165c3c; background: #e3f2ea; border-radius: 999px; padding: 2px 8px; }
.sheet-title { color: #4a5867; margin: 2px 0 6px; }
.sheet-body p { margin: 4px 0; }
.sheet-diff { color: #4a5867; }
.sheet-facts { display: flex; flex-direction: column; gap: 1px; color: #4a5867; font-size: 12.5px; }

/* ============================================================ narrower screens */

@media (max-width: 1100px) {
	.page-columns, .integrations { grid-template-columns: minmax(0, 1fr); }
	.app-tab span { display: none; }
	.app-tab { padding: 0 10px; }
}

@media (max-width: 960px) {
	.content { padding: 24px 22px 80px; }
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.search-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.chips.steps-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* * Tablets (Brian, 2026-11-07): up to a portrait iPad Pro the menu folds away behind the menu button, as on a phone */
@media (max-width: 1024px) {
	.menu-toggle { display: grid; }
	.sidebar {
		position: fixed; top: var(--topbar); left: 0; bottom: 0; height: auto;
		transform: translateX(-100%); transition: transform 0.2s ease; z-index: 25;
	}
	.sidebar.open { transform: none; box-shadow: var(--shadow); }
	.scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(10, 14, 20, 0.45); z-index: 24; }
	.page-header { flex-wrap: wrap; }
}

@media (max-width: 760px) {
	:root { --topbar: 56px; }
	.topbar { gap: 8px; padding: 0 10px; }
	.topbar-back { display: grid; }
	.brand-name { font-size: 16px; }
	.app-tabs { gap: 0; }
	.content { padding: 20px 16px 64px; }
	.section { padding: 16px; border-radius: var(--r); }
	.page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
	.page-header h1 { font-size: 23px; }
	.form-grid { grid-template-columns: 1fr; }
	.file-source { flex-wrap: wrap; }
	.file-source .select { flex-basis: 100%; }
	.notice { flex-direction: column; align-items: flex-start; }
	.table .actions { flex-wrap: wrap; }
	.inline-form { flex-wrap: wrap; }
	.inline-form .select { width: 100%; }
	.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.metric:nth-child(3) { border-left: 0; }
	.metric:nth-child(n+3) { border-top: 1px solid var(--line); }
	.batch-head { flex-direction: column; align-items: flex-start; }
	.pending { margin-left: 0; }
	.invite-form { grid-template-columns: minmax(0, 1fr); }
	.kpis.two { grid-template-columns: minmax(0, 1fr); }
	.integration-body { padding-left: 18px; }
	.account-menu { right: 8px; left: 8px; width: auto; }
}

/* * The phone app (Brian, 2026-11-04) and any touch screen (2026-11-07): menu rows, buttons and ticks big enough for a finger */
@media (max-width: 760px), (pointer: coarse) {
	.nav-item, .app-row { min-height: 46px; }
	.app-chevron { width: 40px; height: 40px; }
	.button:not(.small) { min-height: 40px; }
	.button.small { min-height: 34px; }
	.app-check { min-height: 36px; }
}

@media (max-width: 640px) {
	.understood { flex-direction: column; }
	.match-grid { grid-template-columns: 1fr; }
	.sheet { padding: 20px 16px; }
	.sheet-grid { grid-template-columns: 1fr; }
	.sheet-head { flex-direction: column; }
	.sheet-meta { text-align: left; }
}

@media (max-width: 560px) {
	.search-row { grid-template-columns: minmax(0, 1fr); }
	.search-row .field-label { white-space: normal; }
	.chips, .chips.steps-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.org-leads li { grid-template-columns: 28px minmax(0, 1fr); }
	.org-leads li .lead-type { display: none; }
	.org-leads li .note-input, .org-leads li .lead-note { grid-column: 2; }
	.org-leads.readonly li { grid-template-columns: minmax(0, 1fr); }
}

@media print {
	@page { size: letter; margin: 0.5in; }
	html, body { background: #fff !important; }
	.no-print { display: none !important; }
	.sheet-wrap { max-width: none; padding: 0; margin: 0; }
	.sheet { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
	.sheet-grid { grid-template-columns: 1fr 1fr; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* app access on the Users page */
.app-picks { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.app-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.app-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.app-check input { width: 16px; height: 16px; }
.tours-off { margin-top: 8px; font-size: 13.5px; white-space: nowrap; }

/* ============================================================ apps in the left column */

.topbar-space { flex: 1; }
.app-tabs { display: none; }
.sidebar { padding-top: 12px; }
.app-list { display: flex; flex-direction: column; gap: 2px; }
.app-section + .app-section { margin-top: 2px; }
.app-row {
	display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 16px 0 22px;
	border-radius: 0 999px 999px 0; color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 600;
	transition: background 0.12s, color 0.12s;
}
.app-row .icon { color: var(--muted); }
.app-row:hover { background: var(--hover); color: var(--text); }
.app-row-wrap { display: flex; align-items: center; }
.app-row-wrap .app-row { flex: 1; min-width: 0; }
.app-chevron { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -40px; margin-right: 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--faint); cursor: pointer; }
.app-chevron:hover { background: var(--hover); color: var(--text); }
.app-chevron .icon { transform: rotate(-90deg); transition: transform 0.15s; }
.app-section.open .app-chevron .icon { transform: none; }
.app-row-wrap .app-row { padding-right: 44px; }
.app-section.open > .app-row .icon { color: var(--accent); }
.app-section.open { padding-bottom: 6px; }
.app-pages .nav-item { padding-left: 38px; min-height: 38px; font-size: 13.5px; }
.app-pages .nav-item .icon { width: 18px; height: 18px; }
.app-pages .nav-sub .nav-item { padding-left: 70px; min-height: 34px; font-size: 13px; }
.app-pages .nav-subgroup { margin-left: 70px; }
.nav-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-empty { margin: 8px 22px; font-size: 13px; color: var(--faint); }
.sidebar-foot { padding-top: 8px; }
.sidebar-foot .app-pages .nav-item.danger { margin-top: 4px; }
.integration-mark.forgejo { background: #c2410c; font-size: 12.5px; }
.integration-mark.discord { background: #5865f2; }
.discord-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.discord-actions { display: flex; gap: 8px; padding-top: 26px; }
.notify-kinds { margin-top: 12px; }
.notify-kinds > summary { padding: 6px 0; cursor: pointer; }
.notify-kinds .app-check { white-space: normal; }
.notify-kinds > .app-check { display: flex; margin-top: 8px; }
.page-subhead { margin: 8px 0 12px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.push-devices { margin-top: 16px; }
.notify-kinds .app-check input { flex-shrink: 0; }
@media (max-width: 760px) { .discord-row { grid-template-columns: 1fr; } .discord-actions { padding-top: 0; } }

/* ============================================================ Projects */

.board-toolbar { gap: 10px; }
.select.compact select { height: 36px; font-size: 13.5px; min-width: 140px; }
.sub-head { font-size: 14px; font-weight: 650; margin: 22px 0 10px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 16px; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-col { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; min-height: 140px; transition: background 0.12s, border-color 0.12s; }
.board-col.over { background: var(--accent-soft); border-color: var(--accent-line); }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.board-col-head h2 { font-size: 13.5px; font-weight: 650; }
.board-count { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.mine-head .board-count { margin-left: 6px; }
.status-dot-col { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.s-todo.status-dot-col { background: var(--faint); }
.s-doing.status-dot-col { background: var(--brand); }
.s-review.status-dot-col { background: var(--warn-strong); }
.s-done.status-dot-col { background: var(--ok); }
.board-cards { display: flex; flex-direction: column; gap: 8px; }

.task-card {
	display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; text-decoration: none; color: var(--text);
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); cursor: pointer;
	transition: border-color 0.12s, transform 0.12s;
}
.task-card:hover { border-color: var(--line-strong); color: var(--text); }
.task-card:active { transform: scale(0.99); }
.task-card.done .task-card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-num { font-size: 12px; color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.task-card-title { font-size: 14px; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.task-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.task-meta { display: inline-flex; gap: 10px; color: var(--faint); font-size: 12px; }
.task-meta span { display: inline-flex; align-items: center; gap: 3px; }
.task-due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.task-due.bad { color: var(--bad); }
.task-due.warn { color: var(--warn); }
.task-due.muted { color: var(--muted); font-weight: 500; }

.avatars { display: inline-flex; }
.avatar.xs { width: 24px; height: 24px; font-size: 10.5px; border: 2px solid var(--card); margin-left: -6px; }
.avatars .avatar.xs:first-child { margin-left: 0; }
.avatar.xs.external { background: var(--hover); color: var(--muted); border-style: dashed; border-color: var(--line-strong); }

.label-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.label-chip {
	--label: #2f6b98;
	display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
	background: color-mix(in srgb, var(--label) 16%, transparent); color: color-mix(in srgb, var(--label) 80%, var(--text));
	border: 1px solid color-mix(in srgb, var(--label) 30%, transparent); white-space: nowrap;
}
.label-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.label-chip.toggle { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; opacity: 0.55; background: transparent; }
.label-chip.toggle.on { opacity: 1; background: color-mix(in srgb, var(--label) 16%, transparent); }
.label-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.add-card { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.add-card:hover { background: var(--hover); color: var(--text); }
.quick-add { display: flex; flex-direction: column; gap: 8px; }
.quick-add .input { min-height: 56px; }
.quick-add-actions { display: flex; align-items: center; gap: 8px; }

.status-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--hover); color: var(--muted); }
.status-tag.s-doing { background: var(--accent-soft); color: var(--accent); }
.status-tag.s-review { background: var(--warn-soft); color: var(--warn); }
.status-tag.s-done { background: var(--ok-soft); color: var(--ok); }

.mine-group { margin-bottom: 22px; }
.mine-head { font-size: 14px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; }
.mine-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* one task */
.task-header { margin-bottom: 18px; }
.task-title { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; cursor: pointer; }
.task-title .task-num { font-size: 18px; font-weight: 500; }
.title-input { font-size: 20px; font-weight: 650; height: 46px; }
.task-sub { margin-top: 4px; font-size: 13px; color: var(--faint); }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.task-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.task-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.task-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.task-block-head h2 { font-size: 14.5px; font-weight: 650; margin-right: auto; }
.files-block.over { border-color: var(--primary); background: var(--accent-soft); }
.body-edit { display: flex; flex-direction: column; gap: 8px; }
.body-edit textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

.task-side { position: sticky; top: calc(var(--topbar) + 16px); display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.side-field { display: flex; flex-direction: column; gap: 6px; }
.side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.side-checks { display: flex; flex-direction: column; gap: 6px; }
.side-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.due-row { display: flex; align-items: center; gap: 6px; }
.due-row .input { height: 36px; }
.icon-button.small { width: 28px; height: 28px; }

.checklist-bar { height: 5px; margin-bottom: 10px; }
.checklist-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.checklist-items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.checklist-items li:last-child { border-bottom: 0; }
.checklist-items label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.checklist-items input { width: 16px; height: 16px; }
.checklist-items li.done span { color: var(--faint); text-decoration: line-through; }
.inline-add { display: flex; gap: 8px; }
.inline-add .input { height: 34px; font-size: 13.5px; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); min-width: 0; }
.file-thumb { flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.drive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-meta a { font-size: 13.5px; font-weight: 550; overflow-wrap: anywhere; }

.comments { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment .avatar.xs { margin: 2px 0 0; width: 28px; height: 28px; font-size: 11px; }
.comment-body { flex: 1; min-width: 0; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 4px; font-size: 13.5px; }
.comment-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; align-self: center; margin-block: -6px; }
.comment-menu { width: 210px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; position: relative; }
.mention-hint { display: flex; flex-wrap: wrap; gap: 6px; }
.mention-hint button { border: 1px solid var(--line); background: var(--raised); color: var(--accent); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
/* * Replies: the quote strip on top (a click goes to the comment answered, which lights up), and who else to notify */
.reply-quote { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; margin: 0 0 6px; padding: 2px 0 2px 8px; border: 0; border-left: 2px solid var(--line-strong); background: none; color: var(--muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.reply-quote strong { flex: none; color: var(--text); font-weight: 600; }
.reply-quote .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-quote:hover .clamp { color: var(--text); }
.reply-quote.gone { cursor: default; color: var(--faint); font-style: italic; }
.reply-to { display: flex; align-items: center; gap: 6px; min-width: 0; }
.reply-to .reply-quote { flex: 1; margin: 0; }
.reply-also { align-items: center; }
.reply-also button:not(.on) { color: var(--faint); text-decoration: line-through; }
.comment.flash .comment-body { animation: comment-flash 1.6s ease-out; }
@keyframes comment-flash { from, 30% { background: var(--accent-soft); border-color: var(--accent); } }
.history { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.history strong { color: var(--text); font-weight: 600; }

/* Markdown */
.md { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.md > * + * { margin-top: 8px; }
.md .md-h { font-size: 15.5px; font-weight: 650; margin-top: 14px; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li { margin: 2px 0; }
.md li.md-task { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: flex-start; }
.md li.md-task input { margin-top: 4px; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--hover); border-radius: 4px; padding: 1px 5px; }
.md .md-pre { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; overflow-x: auto; }
.md .md-pre code { background: none; padding: 0; }
.md blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md .md-img { max-width: 100%; max-height: 420px; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; margin: 6px 0; }
.md .md-mention { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }

@media (max-width: 960px) {
	.task-layout { grid-template-columns: 1fr; }
	.task-side { position: static; order: -1; }
}
@media (max-width: 760px) {
	.board { grid-auto-columns: 82%; }
}

.table .select select { min-width: 120px; }
/* * Users: wide enough for "Super admin" and the chevron */
.table .role-cell .select select { min-width: 140px; }

/* ============================================================ Sheets (spreadsheets) */
.small-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.small-field .input { height: 34px; font-size: 13.5px; min-width: 160px; font-weight: 400; color: var(--text); }
.sheets-block { padding-bottom: 12px; }
.sheet-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.sheet-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sheet-chip:hover { color: var(--text); border-color: var(--line-strong); }
.sheet-chip.on { color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sheet-manage { margin-left: auto; font-size: 12.5px; }
.sheet-empty { margin: 4px 0 0; }
/* * Docs (components/docs.tsx): the list of docs as chips, the editor, and Version history */
.docs-panel .sheet-chip { max-width: 100%; }
.docs-panel .sheet-chip .clamp { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-panel .sheet-manage { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-editor { display: flex; flex-direction: column; gap: 10px; }
.doc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-status { font-variant-numeric: tabular-nums; }
.doc-history-button { margin-left: auto; }
.doc-tools { margin: 0; }
.doc-tool-num { font-size: 12.5px; font-weight: 650; }
.doc-text { width: 100%; min-height: 360px; resize: vertical; font-family: var(--font); font-size: 14.5px; line-height: 1.6; }
.doc-page { min-height: 200px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.doc-page .md { font-size: 14.5px; }
.doc-page .md h2.md-h { font-size: 17px; }
.doc-page .md h3.md-h { font-size: 16px; }
.modal.doc-history { width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.doc-history .modal-head h2 .muted { font-size: 14px; font-weight: 400; }
.doc-versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.doc-version { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.doc-version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-version-head .avatar.xs { margin: 0; flex: none; }
.doc-version-who { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.doc-version .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.doc-diff {padding: 8px 10px; background: var(--sunken); border-radius: var(--r-xs); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-diff ins { background: var(--ok-soft); color: var(--text); text-decoration: none; }
.doc-diff del { background: var(--bad-soft); color: var(--text); text-decoration: line-through; }
@media (max-width: 560px) {
	.doc-history-button, .docs-panel .sheet-manage { margin-left: 0; }
	.doc-page { padding: 14px; }
}
.bring-in { margin: 0 0 12px; padding: 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 8px; }
.bring-in textarea { width: 100%; resize: vertical; font-family: ui-monospace, monospace; font-size: 12.5px; }
.bring-in .mini-input { max-width: 200px; }
.sheet-editor-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.sheet-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.sheet-tool { position: relative; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.sheet-tool:hover, .sheet-tool:focus-within { background: var(--hover); }
.sheet-tool.b { font-weight: 800; }
.sheet-tool.i { font-style: italic; font-family: Georgia, serif; }
.sheet-tool.s { text-decoration: line-through; }
.sheet-color { display: inline-flex; align-items: center; }
.sheet-color .a { font-weight: 700; border-bottom: 3px solid; line-height: 1.1; padding: 0 1px; }
.sheet-color .fill { display: inline-block; width: 16px; height: 14px; border-radius: 3px; border: 1px solid var(--line-strong); }
.sheet-color .color-pick { gap: 2px; }
.sheet-color .color-pick .color-input { width: 16px; height: 22px; padding: 0; border: 0; background: none; }
.sheet-color .color-pick .input.color-hex { width: 62px; height: 22px; padding: 0 4px; font-size: 11px; }
.sheet-color-off { font-size: 12px; color: var(--muted); min-width: 20px; }
.sheet-grid .jss_worksheet > tbody > tr > td.extra-picked { box-shadow: inset 0 0 0 2px var(--accent); background-image: linear-gradient(color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent) 14%, transparent)); }
.sheet-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.sheet-spacer { flex: 1; }
.sheet-check-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 6px; cursor: pointer; }
.sheet-col-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sheet-col-tool .mini-select { height: 30px; }
.sheet-saving { font-size: 12.5px; color: var(--muted); margin-right: 6px; }
.sheet-saving.s-unsaved, .sheet-saving.s-saving { color: var(--warn); }
.sheet-saving.s-error { color: var(--bad); font-weight: 600; }
.sheet-error, .sheet-note { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.sheet-alert { background: var(--warn-soft); color: var(--text); }
.sheet-grid {
	--border_color: var(--line); --header_background: var(--sunken); --header_color: var(--muted);
	--header_background_highlighted: var(--accent-soft); --header_color_highlighted: var(--text);
	--content_background: var(--card); --content_color: var(--text);
	--selection: color-mix(in srgb, var(--accent) 14%, var(--card)); --border_color_highlighted: var(--accent); --cursor: color-mix(in srgb, var(--accent) 22%, var(--card));
	font-size: 13.5px;
}
.sheet-grid .jss_container, .sheet-grid .jss_spreadsheet { width: 100%; }
.sheet-grid .jss_content { box-shadow: none; padding: 0; }
.sheet-grid .jss_worksheet { font-family: var(--font); font-size: 13.5px; background: var(--card); }
.sheet-grid .jss_worksheet > thead > tr > td { font-weight: 600; font-size: 12px; height: 24px; padding: 2px 4px; }
.sheet-grid .jss_worksheet > tbody > tr > td { padding: 4px 6px; line-height: 1.35; text-align: left; }
.sheet-grid .jss_worksheet > tbody > tr > td:first-child { font-size: 12px; text-align: center; }
.sheet-grid .jss_worksheet > tbody > tr > td.highlight-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet-grid .jss_worksheet > tbody > tr > td.pinned-row { position: sticky; z-index: 3; background: var(--card); }
.sheet-grid .jss_worksheet > tbody > tr > td.pinned-row:first-child { z-index: 5; }
.sheet-grid .jss_worksheet > tbody > tr > td.pinned-last { box-shadow: 0 1px 0 var(--line-strong); }
.sheet-grid .sheet-editor { width: 100%; height: 100%; min-height: 26px; border: 0; padding: 2px 4px; font: inherit; background: var(--input, var(--card)); color: var(--text); outline: 2px solid var(--accent); }
.sheet-check { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.sheet-check:not(:checked) { opacity: .45; }
.sheet-grid tr:hover .sheet-check, .sheet-check:focus-visible { opacity: 1; }
.sheet-link { color: var(--accent); }
.sheet-person { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 12.5px; }
.sheet-person.unknown { background: var(--warn-soft); }
.sheet-status { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12.5px; font-weight: 600; background: var(--hover); color: var(--text); }
.sheet-status[data-n="0"] { background: #e3f0fb; color: #164b77; }
.sheet-status[data-n="1"] { background: #fdf0d2; color: #6e4a00; }
.sheet-status[data-n="2"] { background: #dcf3e3; color: #1b5e33; }
.sheet-status[data-n="3"] { background: #f6dfe9; color: #7a1f47; }
.sheet-status[data-n="4"] { background: #e9e3f8; color: #3e2a7a; }
.sheet-status[data-n="5"] { background: #fde5d8; color: #7a3410; }
.sheet-status[data-n="6"] { background: #dcf1f2; color: #0f5357; }
.sheet-status[data-n="7"] { background: #ececec; color: #333; }
.sheet-status.unknown { background: var(--warn-soft); color: var(--text); font-weight: 400; }
.sheet-tabs { display: flex; align-items: stretch; gap: 2px; padding: 0 8px; border-top: 1px solid var(--line); background: var(--sunken); overflow-x: auto; }
.sheet-tab-add { display: grid; place-items: center; width: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.sheet-tab-add:hover { color: var(--text); background: var(--hover); }
.sheet-tab { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; border-top: 3px solid transparent; }
.sheet-tab:hover { color: var(--text); background: var(--hover); }
.sheet-tab.on { color: var(--accent); font-weight: 650; background: var(--card); border-top-color: var(--accent); }
.sheet-tab.dragging { opacity: .45; }
.sheet-tab.drop-before { box-shadow: inset 2px 0 0 var(--accent); }
.sheet-tab.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
/* * The engine's menus and pickers, in the app's look */
.jss_contextmenu, .jcontextmenu { font-family: var(--font); font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.18)); }
.jss_contextmenu > div:hover, .jcontextmenu > div:hover { background: var(--hover); }
.dark .sheet-status[data-n] { filter: brightness(.82) saturate(1.1); }

/* ============================================================ Claude on a task */
.claude-block .task-block-head h2 { display: inline-flex; align-items: center; gap: 7px; margin-right: 0; }
.claude-block .task-block-head h2 .icon { color: var(--brand); }
.claude-block .task-block-head .muted { margin-right: auto; }
.starter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-button { border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip-button:hover { border-color: var(--brand); color: var(--accent); }
.chip-button:disabled { opacity: 0.6; cursor: default; }
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.chat:not(:empty) { margin: 6px 0 12px; }
.chat-msg { display: flex; gap: 10px; }
.chat-msg .avatar.xs { margin: 2px 0 0; width: 28px; height: 28px; font-size: 11px; flex: none; }
.avatar.claude { background: var(--accent-soft); color: var(--accent); }
.chat-body { flex: 1; min-width: 0; }
.chat-msg.user .chat-body { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 12px; }
.chat-msg.claude .chat-body { padding: 2px 0; }
.chat-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.thinking { margin: 6px 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.suggestion { margin-top: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r); padding: 9px 12px; }
.suggestion.applied { background: var(--ok-soft); border-color: var(--ok-line); }
.suggestion.dismissed { background: transparent; border-style: dashed; border-color: var(--line); }
.suggestion.dismissed .suggestion-summary { color: var(--muted); text-decoration: line-through; }
.suggestion-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.suggestion-summary { font-weight: 600; font-size: 13.5px; margin-right: auto; }
.suggestion-actions { display: flex; gap: 6px; }
.suggestion .status-tag.ok { display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--ok); padding: 0; }
.sug-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.sug-details { margin-top: 6px; font-size: 13px; }
.sug-details summary { cursor: pointer; color: var(--accent); }
.sug-details > div { margin-top: 6px; padding: 8px 10px; background: var(--card); border-radius: var(--r-sm); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { resize: vertical; min-height: 44px; }
.chat-form .button { height: 44px; padding: 0 14px; }
details.original { margin-top: 10px; font-size: 13.5px; }
details.original summary { cursor: pointer; color: var(--accent); }
details.original h3 { font-size: 14px; margin: 10px 0 6px; }
details.original > div { color: var(--muted); }

/* ============================================================ Sidebar: icons only */
.nav-initial { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 700; }
.nav-item.active .nav-initial { background: var(--accent); color: var(--on-primary, #fff); }
.compact-toggle { position: sticky; bottom: -16px; margin: 6px 0 -16px; padding-bottom: 16px; min-height: 52px; color: var(--faint); background: var(--card); border-top: 1px solid var(--line); border-radius: 0; z-index: 2; }
.sidebar.compact { width: 68px; padding-right: 0; padding-left: 0; }
.sidebar.compact .nav-label, .sidebar.compact .app-chevron, .sidebar.compact .nav-count, .sidebar.compact .chevron, .sidebar.compact .nav-empty { display: none; }
.sidebar.compact .app-row, .sidebar.compact .nav-item { justify-content: center; padding: 0; margin: 0 10px; width: auto; border-radius: var(--r); gap: 0; }
.sidebar.compact .app-row-wrap .app-row { padding: 0; }
.sidebar.compact .app-pages .nav-item, .sidebar.compact .app-pages .nav-sub .nav-item { padding-left: 0; min-height: 36px; }
.sidebar.compact .app-pages { margin: 2px 0 6px; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sidebar.compact .nav-subgroup, .sidebar.compact .nav-group { display: none; }
.sidebar.compact .nav-badge { position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
.sidebar.compact .app-row { position: relative; }
@media (max-width: 1024px) { .sidebar.compact { width: var(--sidebar); } .compact-toggle { display: none; } }
@media (min-width: 1025px) {
	/* * The icons-only menu, opened out under the pointer: over the page, which stays where it is */
	.sidebar.peek { margin-right: calc(68px - var(--sidebar)); box-shadow: var(--shadow); }
}

/* ============================================================ Issue page (v16) */
.issue-header { margin-bottom: 12px; }
.issue-title-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.issue-title-row .task-title, .issue-title-row .title-edit { flex: 1; min-width: 240px; }
.issue-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-select select { min-width: 130px; }
.menu-wrap { position: relative; }
.popover-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.menu-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-field .input { height: 34px; font-size: 13.5px; font-weight: 400; color: var(--text); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger-text, .menu-item.danger-text .icon { color: var(--bad); }

.issue-details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; }
.details-summary { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; border-radius: var(--r-lg); }
.details-summary:hover { background: var(--hover); }
.details-summary > .icon { color: var(--faint); transform: rotate(-90deg); transition: transform 0.15s; flex: none; }
.issue-details.open .details-summary > .icon { transform: none; }
.details-bits { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.details-bits .task-due { display: inline-flex; align-items: center; gap: 4px; }
.details-peek { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.details-toggle { font-size: 12.5px; color: var(--accent); font-weight: 600; flex: none; }
.details-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; padding: 12px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.detail { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.people-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; background: var(--sunken); }
.person-chip .avatar.xs { margin: 0; width: 20px; height: 20px; font-size: 9px; border: 0; }
.person-chip.external { border-style: dashed; color: var(--muted); padding-left: 8px; }
.person-chip button, .issue-chip button, .label-chip.removable button { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.person-chip button:hover, .issue-chip button:hover { color: var(--bad); }
.issue-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--warn-line, var(--line)); background: var(--warn-soft); border-radius: var(--r-sm); font-size: 12.5px; max-width: 100%; }
.issue-chip a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-chip.closed { background: var(--ok-soft); border-color: var(--ok-line); }
.issue-chip.closed a { text-decoration: line-through; color: var(--muted); }
.mini-select, .mini-input { height: 30px; font-size: 12.5px; padding: 0 8px; width: auto; min-width: 0; max-width: 220px; }
.label-add-inline { display: inline-flex; }
.label-add-inline .mini-input { width: 120px; }
.description .task-block-head { margin-bottom: 6px; }
.description-text.clamped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.status-tag.s-blocked { background: var(--warn-soft); color: var(--warn); }
.status-tag.s-started { background: var(--ok-soft); color: var(--ok); }

.issue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.issue-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.issue-main > div > .task-block, .issue-main > .task-block { scroll-margin-top: calc(var(--topbar) + 12px); }
#tables, #claude { scroll-margin-top: calc(var(--topbar) + 12px); }
.segmented.small button { padding: 4px 10px; font-size: 12.5px; }
.tasks-tools { display: flex; align-items: center; gap: 8px; }
/* * Kanban mode's Board: a column per step, then Done; stacked at phone width */
#tasks .task-block-head .task-view { margin-left: auto; }
#tasks .task-block-head .task-view + .tasks-tools { margin-left: 0; }
.task-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; margin-bottom: 10px; overflow-x: auto; }
.board-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); }
.board-col h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.board-col h3 .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-count { font-variant-numeric: tabular-nums; color: var(--faint); }
.board-col .empty-line { margin: 0; padding: 4px 2px; font-size: 13px; }
.board-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); }
.board-card .task-next { order: 1; align-self: flex-end; }
.task-next { flex: none; max-width: 100%; }
.task-next span { min-width: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card.open { border-color: var(--accent); }
.board-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board-card.done .task-text { color: var(--faint); text-decoration: line-through; }
.board-people { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.board-people span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.board-detail { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.board-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
@media (max-width: 760px) { .task-board { grid-auto-flow: row; grid-template-columns: 1fr; } }
.tasks-state { margin: 2px 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.task-items li { display: block; padding: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-sm); }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 150px 84px; align-items: center; gap: 10px; padding: 5px 6px; }
.task-open { all: unset; cursor: pointer; display: block; min-width: 0; overflow-wrap: anywhere; }
.task-open:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.task-caret { display: inline-flex; margin-right: 4px; color: var(--faint); transform: rotate(-90deg); transition: transform .15s; vertical-align: -2px; }
li.open .task-caret { transform: none; }
.task-has { display: inline-flex; margin-left: 6px; color: var(--faint); vertical-align: -1px; }
.task-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.task-step { border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: 4px 6px; }
.task-steps.single .task-step:not(.over) { border: 0; padding: 0; }
.task-step.step-now { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.task-step.step-waiting :is(.task-row, .task-step-head) { opacity: 0.65; }
.task-step-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; }
.task-step.step-now .step-num { background: var(--accent); color: #fff; }
.task-step.step-done .step-num { background: var(--ok-soft); color: var(--ok); }
.task-step .task-items { margin: 0; }
.task-detail { margin: 0 6px 10px 33px; padding: 10px 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.task-detail-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.task-detail-row .muted { flex: 1 1 260px; }
.task-detail-files, .task-handin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-handin { flex-direction: column; align-items: stretch; }
.task-detail-files.over { outline: 2px dashed var(--primary); outline-offset: 4px; border-radius: var(--r-xs); background: var(--accent-soft); }
.file-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.handin-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.handin-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.handin-form .input { flex: 1 1 180px; }
.task-items li:last-child { border-bottom: 0; }
.task-items input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); }
.task-items li.done .task-text { color: var(--faint); text-decoration: line-through; }
.task-items li.current > .task-row { background: var(--accent-soft); border-radius: var(--r-sm); }
.task-items li.waiting > .task-row { opacity: 0.6; }
.step-num { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--hover); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.task-items li.current .step-num { background: var(--accent); color: #fff; }
.task-items li.done .step-num { background: var(--ok-soft); color: var(--ok); }
.task-text { font-size: 14px; overflow-wrap: anywhere; }
.task-edit { height: 32px; font-size: 14px; }
.task-who { max-width: 150px; width: 100%; }
.task-by { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row-tools { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; }
.task-items li:hover .task-row-tools, .task-row-tools:focus-within { opacity: 1; }
.task-add .mini-select { height: 34px; }
.task-add { flex-wrap: wrap; }
.task-add > .input:first-child { flex: 1 1 100%; }
.task-add .mini-select { flex: 0 1 180px; min-width: 120px; }

.deliverable-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 12px 14px; margin-bottom: 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); }
.deliverable-form .segmented { align-self: center; }
.small-field.wide { flex-basis: 100%; }
.small-field.wide textarea { min-width: 100%; }
/* * A task's notes are comments: the picture beside the card, comment text */
.task-items li.comment { display: flex; padding: 0; border: 0; border-radius: 0; }
.small-field .comment-body { font-size: 14px; font-weight: 400; color: var(--text); }
.deliverable-form .quick-add-actions { flex-basis: 100%; }
.deliverables { display: flex; flex-direction: column; gap: 8px; }
.deliverable { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--sunken); }
.deliverable.d-submitted { border-color: var(--warn-line, var(--warn)); background: var(--warn-soft); }
.deliverable.d-approved { border-color: var(--ok-line); background: var(--ok-soft); }
.deliverable.d-changes { border-color: var(--bad-line); }
.deliverable-main { display: flex; align-items: flex-start; gap: 12px; }
.deliverable-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--card); color: var(--muted); overflow: hidden; }
.deliverable-icon img { width: 100%; height: 100%; object-fit: cover; }
.deliverable-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.deliverable-text strong { font-size: 14px; overflow-wrap: break-word; }
.deliverable-note { margin-top: 6px; padding: 8px 10px; background: var(--card); border-radius: var(--r-sm); }
.decision-note { margin: 6px 0 0; font-size: 13px; }
.status-tag.d-submitted { background: var(--warn-soft); color: var(--warn); }
.status-tag.d-approved { background: var(--ok-soft); color: var(--ok); }
.status-tag.d-changes { background: var(--bad-soft); color: var(--bad); }
.deliverable-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.bulk-bar { position: sticky; top: var(--topbar); z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 13.5px; min-height: 52px; }
.bulk-bar strong { margin-right: 6px; color: var(--muted); font-weight: 600; }
.bulk-bar.on { border-color: var(--brand); background: var(--accent-soft); }
.bulk-bar.on strong { color: var(--accent); }
.bulk-bar .input { height: 34px; width: auto; }
.issue-table .check-col { width: 40px; padding-right: 0; }
.issue-table .check-col input { width: 16px; height: 16px; accent-color: var(--primary); }

.my-tasks { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.my-tasks li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.my-tasks li:last-child { border-bottom: 0; }
.my-tasks input { width: 17px; height: 17px; accent-color: var(--primary); }
.my-task-text { font-weight: 600; font-size: 14px; }
.mine-sub { font-size: 13px; font-weight: 650; color: var(--muted); margin: 6px 0 8px; }
.section-gap { margin-top: 26px; }
.board-count.attention { background: var(--warn-soft); color: var(--warn); }
.card-next { font-size: 12px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta .faint { opacity: 0.55; }
.task-meta .attention { color: var(--warn); font-weight: 600; }
.people-match { display: flex; flex-direction: column; gap: 8px; }
.people-row { display: flex; align-items: center; gap: 12px; }
.people-row .select { max-width: 220px; }

@media (max-width: 1100px) {
	.issue-layout { grid-template-columns: minmax(0, 1fr); }
	.issue-dash { position: static; order: -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
	.task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
	.task-detail { margin-left: 6px; }
	.task-who { grid-column: 2 / 3; max-width: none; }
	.task-by { display: none; }
	.task-row-tools { opacity: 1; }
	.issue-actions { width: 100%; }
	.issue-actions .status-select { flex: 1; }
	.issue-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================ v17: workstations, fields, live */
.issue-page { display: flex; flex-direction: column; }

.issue-fields { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; padding: 10px 12px; }
.fields-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.field-pick { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.field-name { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding-left: 2px; }
.field-select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--input); color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.field-select.set { color: var(--text); border-color: color-mix(in srgb, var(--label, var(--brand)) 55%, var(--line)); background: color-mix(in srgb, var(--label, var(--brand)) 12%, var(--input)); }
.field-select.bad { color: var(--bad); }
.field-select.warn { color: var(--warn); }
.field-people { margin-left: auto; align-self: flex-end; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 34px; padding: 4px 8px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: none; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.field-people:hover { background: var(--hover); }
.field-people .details-toggle { display: inline-flex; align-items: center; gap: 2px; }
.field-people[aria-expanded=true] .details-toggle .icon { transform: rotate(180deg); }
.issue-fields .details-grid { margin: 12px 0 0; padding: 12px 0 2px; border-top: 1px solid var(--line); border-bottom: 0; }
.label-chip.field { font-weight: 650; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.workspace.rail-compact { grid-template-columns: minmax(0, 1fr) 64px; }
.station-view { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: fadein 0.15s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.ws-comments .comments:empty { display: none; }

.station-rail { position: sticky; top: calc(var(--topbar) + 14px); display: flex; flex-direction: column; gap: 6px; }
.rail-shrink { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--faint); font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; }
.rail-shrink:hover { background: var(--hover); color: var(--text); }
.station { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font: inherit; color: var(--text); cursor: pointer; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s, transform 0.12s; }
.station:hover { border-color: var(--line-strong); transform: translateX(-2px); }
.station.on { border-color: var(--brand); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--primary); }
.station.attention:not(.on) { border-color: var(--warn-line, var(--warn)); }
.station-icon { position: relative; flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--hover); color: var(--muted); transition: background 0.12s, color 0.12s; }
.station.on .station-icon { background: var(--primary); color: #fff; }
.station:hover:not(.on) .station-icon { color: var(--accent); }
.station-dot { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--bad); border: 2px solid var(--card); animation: dotpulse 2s ease-in-out infinite; }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 25%, transparent); } }
.station-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.station-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; }
.station-count { min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 700; }
.station-line { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-comments { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--faint); }
.station-rail.compact .station { justify-content: center; padding: 4px 0; border-color: transparent; background: none; }
.station-rail.compact .station.on { background: none; border-color: transparent; }
.station-rail.compact .station-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); }
.station-rail.compact .station:hover .station-icon { border-color: var(--brand); }
.station-rail.compact .station-text, .station-rail.compact .station-comments { display: none; }
.station-rail.compact .station:hover { transform: none; }
.station-rail.compact .rail-shrink { justify-content: center; padding: 0; }
.station-rail.compact .station.on { box-shadow: none; }

.viewers { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.avatar.xs.live { margin-left: -6px; box-shadow: 0 0 0 2px var(--ok); }
.viewers .avatar.xs.live:first-child { margin-left: 0; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); color: var(--text); box-shadow: var(--shadow); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; animation: pop 0.18s ease-out; }
.toast .icon { color: var(--accent); }
.history-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.history-row details.original { margin-top: 0; }

.filter-bar { flex-wrap: wrap; }
.filter-bar .filter-pick { height: 40px; } /* * the search box's height, beside it */
.filter-pick { display: inline-flex; align-items: center; gap: 0; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--input); overflow: hidden; }
.filter-pick span { padding: 0 8px 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.filter-pick select, .filter-pick input { height: 100%; border: 0; background: transparent; padding: 0 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.filter-pick.on { border-color: var(--brand); background: var(--accent-soft); }
.filter-pick.on span { color: var(--accent); }
.issue-table tr.closed-row .list-title { color: var(--muted); }
.issue-table .check-col { cursor: default; }

.label-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* * Fixed columns so rank, color, name, count, arrows and trash line up row to row; on a narrow card the
   count, arrows and trash go on a second line under the name */
.label-row { display: grid; grid-template-columns: 56px 32px minmax(0, 1fr) 76px 56px 28px; grid-template-areas: "rank color name count move trash"; align-items: center; gap: 6px 10px; }
.label-row.tag { grid-template-columns: 32px minmax(0, 1fr) 76px 28px; grid-template-areas: "color name count trash"; }
.label-row .label-rank { grid-area: rank; width: 100%; }
.label-row .color-pick { grid-area: color; }
.label-row .label-name { grid-area: name; width: 100%; min-width: 0; height: 34px; font-size: 13.5px; }
.label-row .label-count { grid-area: count; text-align: right; font-variant-numeric: tabular-nums; }
.label-row .label-move { grid-area: move; display: flex; }
.label-row .label-trash { grid-area: trash; }
@container (max-width: 420px) {
	.label-row { grid-template-columns: 48px 32px minmax(0, 1fr) 56px 28px; grid-template-areas: "rank color name name name" ". . count move trash"; }
	.label-row.tag { grid-template-columns: 32px minmax(0, 1fr) 28px; grid-template-areas: "color name name" ". count trash"; }
}
.label-cat-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label-add { margin-top: 12px; }
@media (max-width: 760px) {
	.page-header:has(.label-cat-add) { flex-direction: row; align-items: center; flex-wrap: nowrap; }
	.label-cat-add { width: 40px; padding: 0; justify-content: center; flex: none; }
	.label-cat-add span { display: none; }
}
.label-json { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }

@media (max-width: 1100px) {
	.workspace, .workspace.rail-compact { grid-template-columns: minmax(0, 1fr); }
	.station-rail { position: static; order: -1; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
	.station-rail .rail-shrink { display: none; }
	.station { flex: none; width: auto; min-width: 150px; }
	.station-rail.compact .station { min-width: 52px; padding: 6px 7px; }
}
@media (max-width: 760px) {
	.station { min-width: 0; padding: 6px; }
	.station-text, .station-comments { display: none; }
	.field-people { margin-left: 0; }
	.toasts { left: 12px; right: 12px; align-items: stretch; }
}
.station-rail.compact .station.on .station-icon { background: var(--primary); color: #fff; border-color: var(--primary); }
/* * Folded rail: count bottom-right, comments bottom-left, new dot top-right */
.station-badge { position: absolute; bottom: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; border-radius: 9px; background: var(--card); color: var(--text); border: 1px solid var(--line); font-size: 10.5px; font-weight: 700; line-height: 1; }
.station-badge.attention, .station-badge.comments { background: var(--notify); color: var(--on-notify); border-color: var(--notify); }
.station-badge.comments { right: auto; left: -6px; border-radius: 9px 9px 9px 2px; }
.station-rail.compact .station.on .station-badge { border-color: var(--primary); }

/* ============================================================ Dialogs and the read-only copy */
.modal-scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 20, 0.45); }
.modal { width: min(520px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop 0.15s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 17px; }
.modal > .button { align-self: flex-start; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.readonly-pill { margin-right: 10px; padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 650; }
.readonly-banner { display: none; margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--warn-line, var(--warn)); background: var(--warn-soft); color: var(--text); border-radius: var(--r); font-size: 13.5px; }
html.readonly .readonly-banner { display: block; }
html.readonly body > div > .readonly-banner { margin: 16px auto 0; max-width: 420px; text-align: center; }
/* * In the read-only copy, everything that would change something is hidden (the server refuses it anyway) */
html.readonly .content :is(.button.primary, .button.danger, .danger-text, .add-card, .quick-add, .inline-add, .comment-form, .chat-form, .run-row, .bulk-bar, .task-row-tools, .deliverable-actions, .row-tools, .add-row, .sheet-toolbar, .sheet-tab-add, .sheet-manage, .menu-wrap, .starter-row, .suggestion-actions, .comment-actions, .label-add-inline, .tasks-tools, .issue-actions .button, .person-chip button, .issue-chip button, .label-chip button, .files-block .task-block-head .button, #deliverables .task-block-head .button, .task-block-head .button.ghost, .run-button, .actions .button, .integration-actions, .card-actions) { display: none !important; }
html.readonly .issue-page :is(input, select, textarea), html.readonly .content :is(.task-items, .issue-fields, .my-tasks) :is(input, select, textarea) { pointer-events: none; opacity: 0.85; }
html.readonly .content .task-title { cursor: default; }
html.readonly .issue-table .check-col { display: none; }
html.readonly .content :is(.table-name, .col-head, .details-summary) { pointer-events: none; }
.password-pick { display: flex; gap: 6px; align-items: center; } .password-pick .input { font-family: ui-monospace, Menlo, Consolas, monospace; }
.table .actions { flex-wrap: wrap; row-gap: 4px; max-width: 320px; margin-left: auto; }

/* ---------------------------------------------------------------------------------------------
 * Marketing apps (Analytics, Ads, Business, X, Facebook, Instagram, Mailjet, SMTP2GO)
 * ------------------------------------------------------------------------------------------- */

.connect-block { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.connect-block .fine { flex-basis: 100%; font-size: 12px; color: var(--muted); margin: 0; word-break: break-all; }

.svc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.svc-bar.end { justify-content: flex-end; }
.svc-bar .input { max-width: 280px; }
.range-picker { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.range-chosen { font-size: 13px; color: var(--muted); }
.range-custom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 8px 10px; max-width: 640px; }
.range-custom .run-feedback, .range-custom .muted { flex-basis: 100%; text-align: right; }
.svc-tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.svc-tabs .segmented { flex: none; }
.svc-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 20px; }
.chooser { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chooser .select { min-width: min(420px, 100%); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.row-actions .input { max-width: 240px; }
.link-button.danger { color: var(--bad); }
.check-line { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; }
.check-line input { margin-top: 3px; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plain-fieldset:disabled .input, .plain-fieldset:disabled textarea { opacity: .75; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-note { font-size: 12px; color: var(--muted); }
.stat-note.bad { color: var(--bad); }
.stat-note.good { color: var(--ok); }
/* the SEO overview's cards: a few numbers each, with where they come from at the bottom */
.overview-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 0 20px; }
.overview-card { gap: 4px; }
.overview-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.overview-table th { padding: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: left; }
.overview-table td { padding: 4px 0; border-top: 1px solid var(--line); }
.overview-table .clamp { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-table .num { padding-left: 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.overview-source { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--faint); }
.overview-problem { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--accent); opacity: .08; }
.chart-cross { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-tip { position: absolute; top: 6px; transform: translateX(-50%); pointer-events: none; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-radius: var(--r-sm); padding: 4px 9px; font-size: 12px; white-space: nowrap; color: var(--text); }
.chart-tip span { color: var(--muted); margin-left: 6px; }

.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.barlist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-track { height: 8px; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.barlist-bar { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; opacity: .85; }
.barlist-value { color: var(--muted); min-width: 48px; text-align: right; }

.composer textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.5; }
.composer-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.composer-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.composer-count.over { color: var(--bad); font-weight: 600; }

.picture-field { display: flex; align-items: center; gap: 10px; }
.picture-field label.button { cursor: pointer; }
.picture-chip { display: flex; align-items: center; gap: 10px; }
.picture-chip img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }

.profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 20px; }
.profile-card > img { width: 52px; height: 52px; border-radius: 50%; }
.profile-card > div:not(.stats) { display: flex; flex-direction: column; }
.profile-card .stats { flex: 1; margin: 0; min-width: 280px; }

.post-list, .review-list, .comment-list, .draft-list, .eblast-list { list-style: none; margin: 0; padding: 0; }
.post-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.post { display: flex; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post > img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.post > div { min-width: 0; flex: 1; }
.post p, .review p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-metrics { display: inline; }

.review-list { display: grid; gap: 10px; }
.review { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.stars { display: inline-flex; color: var(--line-strong); }
.stars .on { color: #c98a0b; }
.stars .on svg { fill: currentColor; }
.review-reply { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent-line); background: var(--sunken); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.review-reply p { margin: 4px 0; }
.reply-box { margin-top: 10px; }

.comments-thread { margin-top: 10px; padding: 10px 12px; background: var(--sunken); border-radius: var(--r); }
.comment-list { display: grid; gap: 12px; }
.comment-head { display: flex; gap: 8px; align-items: baseline; }
.comment-list p { margin: 2px 0 4px; white-space: pre-wrap; }
.comment-reply { margin: 4px 0 4px 14px; font-size: 13px; color: var(--muted); }
.comment-list .link-button { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.media-grid button { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: var(--r); overflow: hidden; background: var(--sunken); cursor: pointer; }
.media-grid li.on button { border-color: var(--accent); }
.media-grid img, .media-blank { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-stats { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); text-align: left; }
.media-detail { margin-top: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.media-detail > p { margin: 0 0 4px; white-space: pre-wrap; }

.draft-list { display: grid; gap: 8px; margin-top: 10px; }
.draft-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.draft-list li > div:first-child { display: flex; flex-direction: column; }
.draft-list .row-actions { margin: 0; }

.eblast-list { display: grid; gap: 8px; }
.eblast-row { width: 100%; display: grid; grid-template-columns: 1fr minmax(120px, 200px) auto; align-items: center; gap: 16px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.eblast-row:hover { border-color: var(--line-strong); background: var(--hover); }
.eblast-main { display: flex; flex-direction: column; min-width: 0; }
.eblast-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eblast-progress { display: flex; flex-direction: column; gap: 4px; }
.eblast-progress .bar { display: block; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.eblast-progress .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.eblast-progress.big { margin: 4px 0 12px; }
.eblast-progress.big .bar { height: 10px; border-radius: 5px; }
.log-table { margin-top: 12px; max-height: 360px; overflow-y: auto; }
.email-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #f4f6f8; }

@media (max-width: 640px) {
	.eblast-row { grid-template-columns: 1fr auto; }
	.eblast-row .eblast-progress { display: none; }
	.barlist li { grid-template-columns: minmax(80px, 40%) 1fr auto; }
	.svc-bar .input, .row-actions .input { max-width: none; flex: 1; }
}
.table th.num, .table td.num { text-align: right; white-space: nowrap; }

/* * A marketing app (no sub-pages) shows as the current page */
.app-section.open:not(:has(.app-chevron)) .app-row { background: var(--accent-soft); color: var(--accent); }
.app-section.open:not(:has(.app-chevron)) .app-row .icon { color: var(--accent); }
.section .post-list { border: 0; border-radius: 0; background: none; }
.section .post { padding: 14px 0; }
.section .post:first-child { padding-top: 0; }
.section .draft-list li { background: var(--sunken); border-color: transparent; }
.app-section.open:not(:has(.app-chevron)) { padding-bottom: 0; }
.review > .button { display: inline-flex; width: auto; margin-top: 2px; margin-left: -11px; }
.section > .picture-field { margin-bottom: 12px; }
.secret-input { -webkit-text-security: disc; font-family: var(--font); letter-spacing: .04em; }
.secret-input::placeholder { -webkit-text-security: none; letter-spacing: normal; }
.connect-block .connect-result { flex-basis: 100%; }
.connect-block .connect-result .notice { margin: 0; }

.paste-tasks-link { margin-top: 8px; font-size: 13px; }
.paste-tasks { margin-top: 10px; padding: 12px; background: var(--sunken); border-radius: var(--r); }
.paste-tasks textarea { width: 100%; resize: vertical; font: inherit; }
.paste-preview { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.paste-preview li { display: flex; align-items: center; gap: 10px; }
.paste-preview .task-text { flex: 1; min-width: 0; }

/* * Post to all */
.network-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.network-pick { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.network-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.network-pick.off { opacity: .6; cursor: default; }
.network-pick > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.network-pick input { margin-top: 3px; }
.post-results { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.post-results li { padding: 10px 12px; border-radius: var(--r); font-size: 14px; }
.post-results li.good { background: var(--ok-soft); color: var(--ok); }
.post-results li.bad { background: var(--bad-soft); color: var(--bad); }
.sort-head { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sort-head.on { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* * Email builder */
.design-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.design-grid li { position: relative; }
.design-card { display: flex; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; text-decoration: none; }
.design-card:hover { border-color: var(--line-strong); }
.design-thumb { flex: none; width: 72px; height: 72px; border-radius: var(--r); background: var(--sunken); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.design-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-bottom: 16px; }
.design-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-actions { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 12px; }
.design-actions .link-button { font-size: 12px; }
.design-grid .run-feedback { display: block; margin-top: 6px; }
.builder-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.builder-top .back-link { margin: 0; }
.builder-name { flex: 1; min-width: 200px; max-width: 420px; font-weight: 650; font-size: 16px; }
.save-state { font-size: 12px; color: var(--muted); }
.save-state.unsaved { color: var(--warn); }
.save-state.failed { color: var(--bad); font-weight: 600; }
.builder-history { display: flex; gap: 2px; }
.builder-history .icon-button:last-child .icon { transform: scaleX(-1); }
.builder-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.block-item { position: relative; }
.block-item.dragging { opacity: .5; }
.block-item.drop-before::before, .block-item.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 999px; background: var(--accent); }
.block-item.drop-before::before { top: -5px; }
.block-item.drop-after::after { bottom: -5px; }
.block-head[draggable] { cursor: grab; }
.block-grip { display: flex; padding-left: 10px; color: var(--faint); }
.formatting-bar { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 6px; }
.formatting-bar .button { min-width: 30px; justify-content: center; }
.template-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.template-pick { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-align: left; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.template-pick:hover { background: var(--hover); border-color: var(--accent); }
/* * New email: the template picked, how many of each repeating block and a note for each copy */
.modal.new-email { width: min(640px, 100%); max-height: 88vh; overflow: auto; }
.new-email .run-row { margin-top: 4px; }
.repeat-count { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.repeat-count .select { width: 84px; }
.plain-text { margin: 0; padding: 16px 20px; max-height: calc(var(--vh) - var(--topbar) - 140px); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: 13px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.builder-preview .notice { margin: 0 0 10px; }
/* * A preview tab's hint sits close under the tabs it explains, with the usual gap before the checklist */
.builder-preview .field-hint { margin: -8px 0 16px; }
.builder-cols { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: 18px; align-items: start; }
.builder-edit .section { margin-bottom: 12px; }
.block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.block-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.block-item.open { border-color: var(--accent); }
.block-head { display: flex; align-items: center; }
.block-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.block-title strong { flex: none; white-space: nowrap; }
.block-title .pill { flex: none; }
.block-body > .toggle { margin-top: 10px; }
.block-title .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.block-tools { display: flex; gap: 2px; padding-right: 6px; opacity: .55; }
.block-item:hover .block-tools, .block-item.open .block-tools { opacity: 1; }
.block-body { padding: 4px 12px 14px; border-top: 1px solid var(--line); }
.block-body .field { margin-top: 10px; }
.block-body textarea { width: 100%; resize: vertical; font: inherit; }
.json-edit { width: 100%; resize: vertical; tab-size: 2; }
.block-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.columns-edit { display: grid; gap: 14px; }
.columns-edit > div + div { border-top: 1px dashed var(--line); padding-top: 6px; }
.block-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.picture-input { display: flex; flex-direction: column; gap: 4px; }
.picture-input-row { display: flex; align-items: center; gap: 8px; }
.picture-input-row img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); flex: none; }
.picture-input-row .input { flex: 1; min-width: 0; }
.picture-input-row label.button { cursor: pointer; flex: none; }
.color-row { display: flex; gap: 14px; flex-wrap: wrap; }
.color-input { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--input); cursor: pointer; }
/* * The color picker: swatch plus a hex box */
.color-pick { display: inline-flex; align-items: center; gap: 6px; }
.color-pick .color-input { width: 44px; flex: none; }
.color-pick.empty .color-input { opacity: .35; }
.color-pick .input.color-hex { width: 86px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.color-swatch-pick { position: relative; }
.color-swatch { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--sunken); cursor: pointer; }
.color-pop { left: 0; right: auto; width: 200px; gap: 10px; }
.color-pop .color-input, .color-pop .input.color-hex { width: 100%; }
.color-hex[aria-invalid=true] { border-color: var(--bad); color: var(--bad); }
/* * The preview column stays in view beside the blocks and scrolls itself, so a long checklist above
   the preview never pushes its bottom out of reach; the checklist scrolls past a third of the screen */
.builder-preview { position: sticky; top: calc(var(--topbar) + 12px); max-height: calc(var(--vh) - var(--topbar) - 24px); overflow-y: auto; }
.preview-frame { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; justify-content: safe center; overflow-x: auto; }
.preview-frame iframe { width: 100%; max-width: 660px; height: calc(var(--vh) - var(--topbar) - 140px); min-height: 520px; border: 0; border-radius: var(--r); background: #fff; transition: max-width .2s; }
/* * Desktop is wider than the email's phone layout (620px), so it shows what a computer shows; in a
   narrower column it's shrunk to fit (--fit, set by the builder) so none of it is cut off */
.preview-fit { display: contents; }
.preview-frame.desktop .preview-fit { display: block; flex: none; width: calc(640px * var(--fit, 1)); height: max(520px, calc(var(--vh) - var(--topbar) - 140px)); overflow: hidden; border-radius: var(--r); }
.preview-frame.desktop iframe { width: 640px; max-width: none; min-height: 0; height: calc(max(520px, calc(var(--vh) - var(--topbar) - 140px)) / var(--fit, 1)); border-radius: 0; transform: scale(var(--fit, 1)); transform-origin: 0 0; }
.preview-frame.phone iframe { max-width: 380px; }
.send-panel { position: fixed; inset: 0; background: rgba(10, 14, 20, .45); display: flex; justify-content: flex-end; z-index: 60; }
.send-panel-inner { width: min(440px, 100%); height: 100%; overflow-y: auto; background: var(--card); padding: 20px 22px; box-shadow: var(--shadow); }
.send-panel-inner h2 { font-size: 18px; margin: 0; }
.send-panel-inner .field { margin-top: 16px; }
.row-actions.inline { margin-top: 0; flex-wrap: nowrap; }
.row-actions.inline .input { max-width: none; flex: 1; }
@media (max-width: 1000px) {
	.builder-cols { grid-template-columns: 1fr; }
	.builder-preview { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
	.block-tools .icon-button.small { width: 32px; height: 32px; }
	/* * Undo/redo and the Send buttons share one row from the left, wrapping under each other */
	.builder-actions { margin-left: 0; justify-content: flex-start; }
}

/* * SEO */
.freshness { white-space: nowrap; }
.next-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue-list > li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.issue-list > li.open { border-color: var(--line-strong); }
.issue-row { width: 100%; display: grid; grid-template-columns: 90px 1fr auto 20px; gap: 12px; align-items: center; padding: 12px 16px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.issue-row .icon { color: var(--muted); }
.issue-list > li.open .issue-row .icon { transform: rotate(90deg); }
.issue-row .pill { justify-self: start; }
.issue-name { display: flex; flex-direction: column; min-width: 0; }
.issue-pages { white-space: nowrap; font-size: 14px; }
.issue-detail { padding: 0 16px 16px; }
.explain { padding: 14px 16px; background: var(--sunken); border-radius: var(--r); margin-bottom: 14px; }
.explain p { margin: 8px 0; }
.explain ol { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.url-cell { overflow-wrap: anywhere; }
@media (max-width: 640px) {
	.issue-row { grid-template-columns: 1fr auto; }
	.issue-row .pill, .issue-row .icon { display: none; }
}
.builder-edit, .builder-preview { min-width: 0; }
.builder-edit .form-grid { grid-template-columns: 1fr; }
.block-body .form-grid { gap: 0 12px; }
.block-list { grid-template-columns: minmax(0, 1fr); } .block-item { min-width: 0; }
.site-switch { display: flex; justify-content: flex-end; margin-bottom: -8px; }
@media (max-width: 640px) { .site-switch { justify-content: flex-start; margin-bottom: 8px; overflow-x: auto; } }

/* * Dropdown lists: the browser's open list follows the app's theme, not the system's, and every option and
 * group label sets both its colors, so the list never shows one theme's text on the other's background */
select { color-scheme: light; }
.dark select { color-scheme: dark; }
select option, select optgroup { background-color: var(--raised); color: var(--text); }
select optgroup { font-weight: 650; }
select optgroup option { font-weight: 400; }
select option:disabled { color: var(--muted); }

/* * Brand picker (top bar) */
.brand-picker { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.brand-picker:hover { border-color: var(--line-strong); }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand, var(--accent)); flex: none; }
.brand-picker select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-weight: 650; font-size: 14px; color: var(--text); padding: 0 18px 0 0; cursor: pointer; }
.brand-picker select:focus { outline: none; }
.brand-picker:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.brand-picker .icon { position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
@media (max-width: 640px) { .brand-picker { margin-left: 6px; } .brand-name { display: none; } }
.brand-rows { display: grid; gap: 10px; }
/* * One place per item, so no field lands in the narrow color or trash column (Slogan was cut off there) */
.brand-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.6fr) minmax(0, 1fr) minmax(0, 1.4fr) auto 40px; grid-template-areas: "name site code phone slogan logo trash" "colors colors colors colors colors colors ." "consumer consumer consumer consumer consumer consumer ."; gap: 12px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.brand-row:last-child { border-bottom: 0; padding-bottom: 0; }
.brand-row > .brand-colors { grid-area: colors; }
.brand-row > .field:nth-child(2) { grid-area: name; }
.brand-row > .field:nth-child(3) { grid-area: site; }
.brand-row > .field:nth-child(4) { grid-area: code; }
.brand-row > .field:nth-child(5) { grid-area: phone; }
.brand-row > .field:nth-child(6) { grid-area: slogan; }
.brand-row > .brand-logo { grid-area: logo; }
.brand-row > .icon-button { grid-area: trash; }
.brand-row > .brand-consumer { grid-area: consumer; }
.brand-row .input { width: 100%; min-width: 0; }
@media (max-width: 1400px) { .brand-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; grid-template-areas: "name site trash" "code phone ." "slogan slogan ." "logo logo ." "colors colors ." "consumer consumer ."; } }
@media (max-width: 640px) { .brand-row { grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "name trash" "site ." "code ." "phone ." "slogan ." "logo ." "colors ." "consumer ."; } }
.plain-list { margin: 6px 0 0; padding-left: 18px; }
/* * Lifecycle email: an email's words as a brand gets them (its line breaks kept), under the template and in Find 5 */
.lc-row-tools { display: flex; justify-content: flex-end; gap: 4px; }
/* * A flow's header: the icons and the switch centered on the title's line (the back link sits above it), the
 * switch's hint under it */
.page-header:has(.lc-switch) { align-items: flex-start; position: sticky; top: var(--topbar); z-index: 10; margin-top: -12px; padding: 12px 0; border-bottom: 1px solid var(--line); background: var(--page); }
.page-header:has(.lc-switch) .page-actions { align-items: flex-start; margin-top: 22px; }
.page-header:has(.lc-switch) .page-actions > .run-feedback { display: flex; align-items: center; min-height: 40px; }
@media (max-width: 760px) { .page-header:has(.lc-switch) .page-actions { margin-top: 0; } }
.lc-switch { display: grid; gap: 2px; max-width: 280px; }
.lc-switch .toggle { min-height: 40px; align-items: center; }
/* * The hint adds no width to the switch's spot (so Save sits right beside it) and wraps under the switch and Save */
.lc-switch .field-hint { contain: inline-size; margin-right: -72px; }
@media (max-width: 560px) { .lc-switch .field-hint { margin-right: 0; } }
.lc-advanced { margin: 0 0 16px; }
.lc-save { justify-content: flex-end; margin: 0 0 16px; }
.lc-details summary { cursor: pointer; overflow-wrap: anywhere; }
.lc-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--sunken); }
.lc-card > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.lc-card > summary::-webkit-details-marker { display: none; }
.lc-card[open] > summary { border-bottom: 1px solid var(--line); }
.lc-card .lc-group { background: var(--card); }
.lc-card-body { display: grid; gap: 14px; min-width: 0; padding: 14px; }
.lc-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-card-title { display: grid; flex: 1 1 160px; min-width: 0; }
.lc-card-title > span { color: var(--muted); font-size: 12.5px; }
.lc-card-tools { display: flex; gap: 2px; margin-left: auto; }
.lc-card-fold { display: flex; color: var(--muted); transition: transform 0.12s; }
.lc-card[open] .lc-card-fold { transform: rotate(90deg); }
.lc-card-bar, .lc-steps-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lc-card + .lc-card { margin-top: 12px; }
.lc-brand-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-brand-pick .button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .lc-brand-pick .button { min-height: 36px; } }
.lc-view { display: grid; gap: 14px; align-content: start; min-height: 254px; min-width: 0; }
.lc-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: var(--muted); font-size: 12.5px; }
.lc-shown { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 38px; }
.lc-shown-words { height: auto; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
/* * A flow's People: a row unfolds to that person's emails; Preview shows one as sent */
.lc-person { display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lc-person .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-person[aria-expanded="true"] .lc-card-fold { transform: rotate(90deg); }
.lc-person-emails > td { background: var(--sunken); }
.lc-person-emails ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lc-person-emails li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 32px; }
.lc-person-emails li > .muted { overflow-wrap: anywhere; }
.lc-sent .lc-shown { height: auto; padding-block: 9px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.lc-stray { padding: 0 2px; border-radius: var(--r-xs); background: var(--warn-soft); color: var(--warn); }
.lc-fillable { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.lc-fillable > .input { flex: 1 1 240px; min-width: 0; }
.lc-fillable > .select { flex: 0 1 220px; min-width: 0; }
.lc-edit td { padding: 8px 12px; }
.lc-edit .input { min-width: 140px; }
.lc-days { display: flex; align-items: center; gap: 6px; }
.lc-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lc-group { display: grid; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--sunken); }
.lc-ends { margin: 10px 0 16px; }
.lc-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lc-edit .lc-join-row td { padding: 4px 12px; border-bottom: 0; }
.lc-edit tbody tr.lc-join-row:hover td { background: none; }
.lc-join-row .lc-join { display: inline-block; }
.lc-fold { margin: 14px 0 4px; }
.lc-fold > summary { font-size: 13.5px; font-weight: 600; }
.lc-fold[open] > summary { margin-bottom: 12px; }
.lc-join { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
@media (max-width: 960px) { .lc-group .segmented button { min-height: 40px; } }
.lc-words { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; color: var(--muted); }

/* * Claude in Projects */
.claude-reads { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.claude-reads input { margin: 0; }
.claude-reads:has(input:checked) { color: var(--accent); }
.claude-working { color: var(--accent); font-size: 12.5px; animation: pulse 1.6s ease-in-out infinite; }
.claude-brief { width: 100%; resize: vertical; font: inherit; }
.claude-draft { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.claude-draft textarea { width: 100%; resize: vertical; font: inherit; }
.claude-draft .paste-preview .input:not(.mini-select) { flex: 1; min-width: 0; }
.project-files { margin-top: 12px; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.note-row { width: 100%; display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--sunken); border: 1px solid transparent; border-radius: var(--r); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.note-row:hover { border-color: var(--line-strong); }
.note-row .muted:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.note-body { width: 100%; resize: vertical; font: inherit; line-height: 1.5; }
@media (max-width: 640px) { .note-row { grid-template-columns: 1fr; gap: 2px; } }

/* * AI log: who used it */
.usage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.usage-h2 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.usage-head .usage-h2 { margin: 0; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 10px 0 8px; }
.usage-table h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.usage-table td:first-child { position: relative; }
.usage-bar { display: block; height: 4px; border-radius: 2px; background: var(--accent); opacity: 0.55; margin-top: 4px; }
@media (max-width: 760px) { .usage-grid { grid-template-columns: minmax(0, 1fr); } }

/* * Brands: each brand's accounts */
.brand-accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.brand-accounts-card { border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 10px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.brand-accounts-card h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; flex-wrap: wrap; }
.brand-accounts-card h3 .muted { font-weight: 400; }
.brand-accounts-card .brand-dot { background: var(--brand); }
.brand-accounts-card .select, .brand-accounts-card select { max-width: 100%; }

/* * Profile photos */
.avatar.photo { padding: 0; overflow: hidden; background: var(--hover); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.photo-picker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .avatar { width: 32px; height: 32px; font-size: 12px; flex: none; }

/* * Overlord */
.overlord-headline { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; margin: 6px 0 16px; }
.overlord-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.overlord-list { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.overlord-list h3 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; margin-bottom: 6px; }
.overlord-list.good h3 { color: var(--ok); }
.overlord-list.warn h3 { color: var(--warn, #b7791f); }
.overlord-list ul, .overlord-questions, .alert-list { padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.alert-list { padding-left: 0; list-style: none; }
.rec-list { display: grid; gap: 10px; margin: 8px 0; }
.rec-card { border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-width: 0; }
.rec-card.s-dismissed { opacity: 0.6; }
.rec-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; flex-wrap: wrap; }
.rec-head .chevron { margin-left: auto; transition: transform .15s; color: var(--muted); }
.rec-head[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.rec-title { font-weight: 600; flex: 1 1 260px; min-width: 0; }
.rec-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rec-tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--hover); color: var(--text); }
.rec-tag.muted { color: var(--muted); }
.rec-tag.brand { display: inline-flex; align-items: center; gap: 5px; }
.rec-tag .brand-dot { width: 7px; height: 7px; }
.clear-chat { margin-top: 10px; }
.rec-impact { font-size: 11px; width: 18px; text-align: center; flex: none; }
.rec-impact.i-high { color: var(--ok); }
.rec-impact.i-medium { color: var(--accent); }
.rec-impact.i-low { color: var(--muted); }
.rec-body { padding: 0 14px 14px 42px; display: grid; gap: 8px; }
.rec-steps { padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }
.rec-measure { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rec-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.watch-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.watch-form .field { min-width: 140px; }
@media (max-width: 760px) { .overlord-two { grid-template-columns: minmax(0, 1fr); } .rec-body { padding-left: 14px; } }

/* * Issue: conversations brought in from ChatGPT */
.earlier-chats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.earlier-chats .person-chip a { color: inherit; }
.import-chat { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; margin-bottom: 10px; }

/* * Narrow phones: the top bar keeps everything on screen */
@media (max-width: 480px) {
	.brand-picker { margin-left: 4px; padding: 0 8px; }
	.topbar .avatar-button { padding: 1px; }
	.topbar { gap: 4px; padding: 0 8px; }
	.topbar .claude-button { position: relative; padding: 0 7px; margin-right: 0; }
	.topbar .claude-button .nav-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
	.topbar .update-wrap { margin-right: 0; }
}

.overlord-status { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: -4px 0 14px; }
.overlord-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.overlord-status.busy { color: var(--text); }
.overlord-status.busy .overlord-dot { background: var(--accent); animation: overlord-pulse 1.2s ease-in-out infinite; }
@keyframes overlord-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .overlord-status.busy .overlord-dot { animation: none; } }

/* * Users: sign-up message, per-person setup */
.welcome-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--hover); padding: 12px 14px; }
.welcome-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.welcome-head .button { margin-left: auto; }
.welcome-box pre { white-space: pre-wrap; font: inherit; font-size: 13.5px; margin: 0; }
.person-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.person-setup { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.person-setup .field { min-width: 200px; }
.discord-setup { margin-top: 12px; display: grid; gap: 8px; font-size: 13.5px; }
.discord-setup code { word-break: break-all; }

.invite-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .invite-extra { grid-template-columns: minmax(0, 1fr); } }
.modal.add-person { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; }
.add-person .invite-extra { margin-top: 0; }
.add-person-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* * Report a change (owners and admins) */
.change-highlight { position: fixed; z-index: 90; pointer-events: none; border: 2px solid var(--accent); border-radius: 6px; box-shadow: 0 0 0 4000px rgba(10, 20, 30, 0.12); }
.change-box { position: fixed; z-index: 91; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); padding: 12px; display: grid; gap: 8px; }
.change-handle { cursor: move; user-select: none; touch-action: none; }
.change-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.change-row select { flex: 1; min-width: 120px; }
.change-box.change-sheet { left: 50%; bottom: 0; width: min(560px, 100%); max-height: 50vh; overflow-y: auto; transform: translateX(-50%); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: change-sheet-up 0.15s ease-out; }
.change-sheet .input { font-size: 16px; } /* * 16px keeps iOS from zooming in when the notes get the focus */
@keyframes change-sheet-up { from { transform: translate(-50%, 100%); } }
/* * The picked thing is in the lower half: the sheet comes down from the top instead, and neither covers more than half */
.change-box.change-sheet.change-sheet-top { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0 0 var(--r-lg) var(--r-lg); padding: calc(16px + env(safe-area-inset-top)) 16px 16px; animation-name: change-sheet-down; }
@keyframes change-sheet-down { from { transform: translate(-50%, -100%); } }
@media (max-width: 760px) { .change-box.change-sheet { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .change-box.change-sheet, .change-box.change-sheet.change-sheet-top { animation: none; } }
.change-pick-bar { position: fixed; z-index: 92; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 4px 4px 4px 14px; box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.change-toast { position: fixed; z-index: 92; right: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line-strong); border-left: 4px solid var(--ok); border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); font-size: 13.5px; }
.change-head { cursor: default; }
.change-notes { white-space: pre-wrap; }
.change-element code { word-break: break-all; }
.change-prompt pre { white-space: pre-wrap; font-size: 12.5px; background: var(--hover); border-radius: 8px; padding: 10px; margin-top: 6px; }

/* * Brand tabs above the marketing pages, and every brand side by side */
.brand-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.all-brands { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; align-items: start; }
.all-brands-col { border: 1px solid var(--line); border-top: 3px solid var(--brand, var(--accent)); border-radius: 10px; background: var(--card); overflow: hidden; min-width: 0; }
.all-brands-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; font-size: 15px; border-bottom: 1px solid var(--line); }
.all-brands-col iframe { display: block; width: 100%; height: 900px; border: 0; }
.embedded-page { padding: 14px; }
.embedded-page .page-header { margin-bottom: 12px; }
@media (max-width: 1100px) { .all-brands { grid-template-columns: minmax(0, 1fr); } }
.schedule-row { flex-basis: 100%; margin-top: 6px; }
.schedule-row .input { max-width: 240px; }
.draft-list .status-tag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

.blocked-list { margin: 6px 0 0; padding-left: 18px; }
.blocked-list li { margin: 4px 0; }
.change-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; }
.change-pick { width: 17px; height: 17px; accent-color: var(--primary); margin-right: 4px; }
.change-built { padding: 6px 10px; border-radius: 8px; background: var(--ok-soft); }
.change-built.o-partial, .change-built.o-not-done { background: var(--warn-soft); }
.change-answer { padding: 6px 10px; border-radius: 8px; background: var(--hover); }
.change-answer-box { display: flex; gap: 8px; align-items: flex-end; margin: 6px 0; }
.change-answer-box textarea { flex: 1; min-height: 52px; }
.details-grid .detail.wide { grid-column: 1 / -1; }

/* * Analytics breakdowns (also fit the narrow "All brands" columns) */
.compact-table td, .compact-table th { padding: 7px 10px; font-size: 13px; }

/* * Mailjet lists and their brands */
.list-brand { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 18px; background: color-mix(in srgb, var(--brand, var(--accent)) 14%, transparent); color: var(--text); }
.list-brand::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand, var(--accent)); }
.list-brand.none { background: var(--warn-soft); color: var(--warn); }
.list-brand.none::before { background: currentColor; }
.list-brand-picks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.list-brand-picks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 520px; }
.list-brand-filter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }

/* * Moving lead lists between copies of the app */
.transfer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.transfer-h { font-size: 14.5px; margin: 0 0 8px; }
.transfer-pick, .transfer-preview { list-style: none; margin: 6px 0 12px; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.transfer-pick li, .transfer-preview li { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.transfer-pick li:last-child, .transfer-preview li:last-child { border-bottom: 0; }
.transfer-preview .pill { margin-left: 6px; }
.button.disabled { opacity: 0.5; pointer-events: none; }

/* * Dragging tasks and steps */
.task-row[draggable], .task-step-head[draggable] { cursor: grab; }
.step-gap { height: 0; overflow: hidden; border-radius: 8px; transition: height .12s; display: grid; place-items: center; font-size: 12.5px; color: var(--muted); }
.task-steps.dragging .step-gap { height: 30px; border: 1.5px dashed var(--line-strong); }
.task-steps.dragging { gap: 6px; }
.step-gap.over { border-color: var(--accent) !important; background: var(--accent-soft); color: var(--accent); }
.task-step.over { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }

/* * My issues as rows */
.mine-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mine-head-row .mine-head { margin: 0; }
.mine-cards.rows { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.mine-cards.rows .task-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; }
.mine-cards.rows .task-card-top { order: 0; flex: 0 0 auto; min-width: 150px; justify-content: flex-start; }
.mine-cards.rows .task-card-title { flex: 1 1 260px; min-width: 0; }
.mine-cards.rows .card-next { flex: 1 1 100%; order: 5; }
.mine-cards.rows .task-card-foot { flex: 0 0 auto; margin-left: auto; min-height: 0; }
#tasks .task-block-head h2 { margin-right: 6px; }
#tasks .task-block-head .tasks-tools { margin-left: auto; }
/* * Overlord: the button next to their picture (and Help beside it), and the window with history and tabs */
.claude-button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; margin-right: 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.claude-button:hover { border-color: var(--line-strong); }
.claude-button.on { border-color: var(--accent); color: var(--accent); }
.claude-button svg { color: var(--accent); }
.cc-page { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; height: calc(var(--vh) - var(--topbar, 64px) - 48px); min-height: 480px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.cc-side { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; background: var(--sunken); }
.cc-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-list li { display: flex; align-items: center; border-radius: 8px; }
.cc-list li.on, .cc-list li:hover { background: var(--hover); }
.cc-list-item { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; }
.cc-list-item:focus-visible { outline: 2px solid var(--primary); border-radius: 8px; }
.cc-list-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-delete { opacity: 0; }
.cc-list li:hover .cc-delete, .cc-delete:focus-visible { opacity: 1; }
.cc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 20px 12px; }
.cc-hello { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; max-width: 560px; margin: 0 auto; }
.cc-hello h1 { margin: 6px 0 0; font-size: 26px; font-weight: 700; }
.cc-hello-mark, .cc-mark { color: var(--accent); display: inline-flex; }
.cc-group { margin: 6px 9px 0; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cc-side-close, .ov-history-button { display: none; }
.ov-top { display: flex; align-items: center; gap: 8px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.ov-top .svc-tabs { flex: 1; min-width: 0; }
.ov-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 0 8px; }
.ov-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ov-pane-head p { flex: 1 1 320px; margin: 0; }
.cc-foot { display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; max-width: 760px; margin: 8px auto 0; }
.cc-foot .cc-note { margin: 0; }
.cc-messages { flex: 1; overflow-y: auto; padding: 24px 0 12px; display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 760px; margin: 0 auto; }
.cc-turn { display: flex; gap: 10px; align-items: flex-start; }
.cc-turn.user { justify-content: flex-end; }
.cc-turn.user .cc-bubble { background: var(--hover); border-radius: 14px; padding: 9px 14px; max-width: 80%; white-space: pre-wrap; }
.cc-turn.user .cc-bubble p { margin: 0; }
.cc-turn.claude .cc-bubble { flex: 1; min-width: 0; line-height: 1.6; }
.cc-turn.claude .cc-mark { margin-top: 3px; }
.cc-thinking { color: var(--muted); font-style: italic; }
.cc-composer { display: flex; align-items: flex-end; gap: 8px; width: 100%; max-width: 760px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px 8px 8px 14px; background: var(--card); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
.cc-composer textarea { flex: 1; border: 0; resize: none; padding: 6px 0; box-shadow: none; min-height: 24px; max-height: 220px; background: transparent; }
.cc-composer textarea:focus { outline: none; box-shadow: none; }
.cc-send { width: 36px; height: 36px; padding: 0; border-radius: 10px; justify-content: center; }
.cc-note { text-align: center; margin: 6px auto 0; max-width: 760px; }
.cc-staff { margin-top: 10px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.cc-staff-list { margin-top: 8px; max-height: 70vh; overflow-y: auto; }
.cc-first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-staff-view { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--card); min-height: 300px; }
.cc-staff-view .cc-messages { max-height: 70vh; padding-top: 8px; }
.my-brief h3 { margin: 18px 0 6px; font-size: 15px; }
.my-focus { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.my-focus li span { display: block; }
.my-advice { margin: 0; padding-left: 20px; }
@media (max-width: 760px) {
	.cc-page { grid-template-columns: minmax(0, 1fr); height: calc(var(--vh) - var(--topbar, 64px) - 24px); }
	.cc-side { display: none; }
	.cc-side.open { display: flex; position: absolute; inset: 0 auto 0 0; width: min(300px, 86%); z-index: 5; box-shadow: var(--shadow); }
	.cc-side-close, .ov-history-button { display: inline-flex; }
	.cc-main { padding: 0 12px 10px; }
	.cc-staff { grid-template-columns: minmax(0, 1fr); }
	.claude-button-label { display: none; }
	.claude-button { padding: 0 9px; margin-right: 6px; }
}
.content:has(.cc-page:not(.cc-issue)) { padding-bottom: 20px; }
.cc-staff-intro { margin-top: 12px; }

/* * The page's Overlord helper: a round button at the bottom right of the page that opens a compact chat window, taller or shorter by its top edge, and the changes it suggests */
button.claude-button { cursor: pointer; }
.ov-helper-button { position: fixed; right: 20px; bottom: 20px; z-index: 28; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); cursor: pointer; }
.ov-panel { position: fixed; right: 20px; bottom: 20px; z-index: 28; width: 400px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; min-height: 0; padding: 0 14px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow); }
.ov-panel-grip { flex: none; height: 14px; margin: 0 -14px; cursor: ns-resize; touch-action: none; display: grid; place-items: center; }
.ov-panel-grip::after { content: ""; width: 36px; height: 4px; border-radius: 999px; background: var(--line-strong); }
.ov-flip svg { transform: rotate(180deg); }
.ov-panel-head { display: flex; align-items: center; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ov-panel-title { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-panel-title svg { color: var(--accent); flex: none; }
.ov-panel-head .icon-button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.ov-panel-chat { display: contents; }
.ov-panel-chat[hidden] { display: none; }
.ov-panel-list { flex: 1; min-height: 0; overflow-y: auto; padding-top: 10px; }
.ov-panel .cc-hello h1 { font-size: 17px; font-weight: 650; }
.ov-panel .cc-hello p { display: none; }
.ov-panel .cc-messages { padding-top: 14px; }
.ov-panel .cc-turn.user .cc-bubble { max-width: 90%; }
.ov-helper-dot { position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 999px; background: var(--warn); border: 2px solid var(--page); }
/* * An item's log of what Claude was asked on it (overlord_panel.tsx ItemLog) */
.item-log { margin-top: 16px; }
.item-log-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.item-log-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.item-log-what { min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; }
.ov-panel-actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cc-suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cc-suggest-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
	.ov-helper-button, .ov-panel { right: 12px; bottom: 12px; }
	.has-helper .content { padding-bottom: 76px; }
}

/* * Context workstation: pasted AI chats, notes and reference files */
.context-block.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.context-block .task-block-head .button { flex: none; }
.context-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.context-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.context-entry { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.context-entry.open { border-color: var(--line-strong); }
.context-head { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding: 10px 12px; }
.context-head:focus-visible { outline: 2px solid var(--focus, var(--primary)); outline-offset: -2px; border-radius: var(--r); }
.context-entry.open .task-caret { transform: none; }
.context-title { font-size: 14px; }
.context-head .muted { margin-left: auto; }
.context-body { padding: 0 12px 12px 36px; display: flex; flex-direction: column; gap: 10px; }
.context-text { margin: 0;white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13.5px; line-height: 1.55; padding: 10px 12px; background: var(--sunken); border-radius: var(--r-sm); }
.context-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.context-files li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.context-files a { display: inline-flex; align-items: center; gap: 5px; }
.empty-note { color: var(--muted); font-size: 13.5px; padding: 18px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r); }

/* * Overlord on this issue: the Overlord window on the issue's page, and the tools on its answers */
.cc-page.cc-issue { height: calc(var(--vh) - var(--topbar, 64px) - 28px); min-height: 480px; }
.cc-issue .cc-messages, .cc-issue .cc-composer, .cc-issue .cc-foot, .cc-issue .cc-note { max-width: none; }
/* * Blocks in an answer show full length and wrap: the messages are the only thing that scrolls */
.cc-messages .cw-pre, .cc-messages .md-pre, .cc-messages .outline-preview { max-height: none; overflow: visible; }
.cc-messages .cw-pre, .cc-messages .md-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-focus { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; font-size: 16px; font-weight: 650; min-width: 0; }
.cc-focus-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-who { display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cc-composer { flex-wrap: wrap; }
.cc-composer textarea { min-width: 0; }
.cc-composer.drop-over { border-color: var(--primary); background: var(--hover); }
.cc-attach { flex: none; }
.cc-files { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-file { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--hover); font-size: 12.5px; }
.cc-pic { padding: 4px; border-radius: var(--r-sm); }
.cc-pic img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-xs); }
.cw-body { min-width: 0; flex: 1; }
.cw-body .md { font-size: 14.5px; line-height: 1.6; }
.cw-code { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.cw-code-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; background: var(--sunken); border-bottom: 1px solid var(--line); }
.cw-lang { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cw-code-actions { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.cw-pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.cw-preview { display: block; width: 100%; height: 420px; border: 0; background: #fff; resize: vertical; }
.cw-handin { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.cw-handin .input { flex: 1 1 160px; }
.cw-code .run-feedback { margin: 6px 10px; }

/* * Project knowledge */
.knowledge-drop { margin-top: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.knowledge-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.knowledge-table { margin-top: 8px; }
.knowledge-table td { vertical-align: middle; }
.file-kind { display: inline-block; font-size: 11px; font-weight: 650; color: var(--muted); background: var(--hover); border-radius: 4px; padding: 1px 6px; }

/* * All brands: side by side or stacked */
.all-brands.stacked { grid-template-columns: minmax(0, 1fr); }
.all-brands-layout { align-self: center; }

/* * Scheduled emails calendar (weekdays only) */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.cal-nav { order: 2; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.cal-key { display: inline-flex; align-items: center; gap: 6px; }
.cal-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--brand, var(--faint)); }
.cal-swatch.none { background: var(--faint); }
.cal-day-swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--card); }
.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal caption { text-align: left; font-weight: 650; font-size: 14.5px; padding: 0 4px 4px; }
.cal th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: left; padding: 0 6px; }
.cal td { vertical-align: top; height: 74px; padding: 4px; border-radius: 8px; }
.cal-day { border: 1px solid var(--line); background: var(--card); }
.cal-out { background: transparent; }
.cal-day.load-1, .cal-day-swatch.load-1 { background: color-mix(in srgb, var(--accent) 9%, var(--card)); }
.cal-day.load-2, .cal-day-swatch.load-2 { background: color-mix(in srgb, var(--accent) 20%, var(--card)); }
.cal-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.today .cal-num { color: var(--accent); font-weight: 700; }
.cal-num { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.cal-chip { display: block; width: 100%; text-align: left; margin-top: 3px; padding: 2px 6px; border: 0; border-left: 3px solid var(--brand, var(--faint)); border-radius: 4px; background: color-mix(in srgb, var(--brand, var(--faint)) 14%, var(--card)); color: var(--text); font: inherit; font-size: 11.5px; line-height: 1.35; overflow: hidden; cursor: pointer; }
.cal-chip.none { border-left-color: var(--faint); background: var(--hover); }
.cal-chip:hover, .cal-chip.on { outline: 2px solid var(--brand, var(--accent)); outline-offset: 0; }
.cal-chip:focus-visible { outline: 2px solid var(--accent); }
.cal-chip-time { display: block; font-weight: 650; }
.cal-chip-subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-detail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--hover); }
.cal-detail > div:first-child { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 560px) { .cal-months { grid-template-columns: minmax(0, 1fr); } .cal td { height: 60px; } }
/* * Fields right in issue tables; Blocked by in the issue's top row; one person for a whole step */
.issue-table .field-cell { padding-top: 4px; padding-bottom: 4px; }
.cell-field { appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px; padding: 2px 10px; color: var(--muted); cursor: pointer; max-width: 160px; }
.cell-field:hover, .cell-field:focus { border-color: var(--line-strong); }
.cell-field.set { background: color-mix(in srgb, var(--label, var(--accent)) 16%, transparent); color: var(--text); font-weight: 600; }
.blocked-pick .blocked-chips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 34px; }
.blocked-pick .issue-chip { padding: 2px 4px 2px 8px; font-size: 12.5px; }
.blocked-add { min-width: 0; width: auto; }
.holding-up { margin: 6px 2px 0; }
.issue-fields .field-people { cursor: default; margin-left: auto; border-style: solid; border-color: var(--line); }
.issue-fields .field-people:hover { background: none; }
.step-assign { margin-left: auto; height: 28px; font-size: 12.5px; max-width: 180px; }
.bulk-bar.empty { display: none; }
.mine-order { margin: 0 0 8px; }
/* * Discord channels, summaries and messages to everyone (owners) */
.discord-panel { display: grid; gap: 14px; }
.discord-picked { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.discord-picked li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.discord-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 10px; }
.discord-guild { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; gap: 4px; margin: 0; }
.discord-guild legend { font-weight: 650; padding: 0 4px; }
.discord-summarize { align-items: end; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.discord-daily { flex-basis: 100%; }
.discord-summaries { display: grid; gap: 8px; }
.discord-summary { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.discord-summary-head { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; width: 100%; box-sizing: border-box; }
.discord-summary-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 10px; }
.discord-summary-body { padding: 0 14px 12px; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.discord-channel h3 { font-size: 14.5px; margin: 6px 0 4px; }
.discord-targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; margin: 8px 0; }
.discord-preview { border-left: 3px solid var(--accent); background: var(--hover); padding: 8px 12px; border-radius: 6px; margin: 8px 0; }
.discord-preview p { margin: 4px 0 0; white-space: pre-wrap; }
.discord-history ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.discord-history p { margin: 2px 0 0; white-space: pre-wrap; }
/* * Search box in the top bar */
.search-box { position: relative; margin-left: 0; flex: 0 1 420px; min-width: 0; }
.search-field { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg, var(--card)); color: var(--muted); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-busy { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.search-toggle { display: none; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; z-index: 80; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18); padding: 6px; }
.search-group + .search-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.search-group-label { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); padding: 6px 10px 4px; }
.search-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-item.active { background: var(--accent-soft); }
.search-item-title { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
	.search-box { flex: 0 0 auto; }
	.search-box:not(.expanded) .search-field { display: none; }
	.search-box:not(.expanded) .search-toggle { display: inline-flex; }
	.search-box.expanded { position: absolute; left: 8px; right: 8px; top: 12px; z-index: 81; margin: 0; }
	.search-box.expanded .search-field { background: var(--card); }
	.search-results { width: calc(100vw - 16px); }
}

/* * Settings → Apps, and notes about a person */
.app-admin-grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 16px 28px; align-items: start; }
.app-admin-links { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; padding-top: 4px; }
.app-notes { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.app-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.app-note-edit { display: grid; gap: 8px; margin-top: 8px; }
.app-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 14px 8px 12px; border: 0; border-radius: var(--r); background: none; color: var(--text); font: inherit; cursor: pointer; transition: background 0.12s; }
.app-tile:hover { background: var(--hover); }
.app-tile-icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.app-tile.off .app-tile-icon, .app-detail-title.off .app-tile-icon { background: var(--sunken); color: var(--muted); }
.app-tile-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 550; }
.app-tile.off .app-tile-name { color: var(--muted); }
.modal.app-detail { width: min(720px, 100%); max-height: 88vh; overflow-y: auto; }
.app-detail-title { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.app-detail-title .app-tile-icon { width: 40px; height: 40px; border-radius: var(--r-sm); }
.app-detail-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.app-detail-switch .toggle { align-items: center; }
.app-detail-switch .run-feedback { margin: 0; }
.app-detail-part { padding-top: 16px; border-top: 1px solid var(--line); }
.app-detail-part .run-feedback { margin: 8px 0 0; }
.app-detail-part h3 { font-size: 11.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.plugin-settings { display: grid; gap: 8px; }
.plugin-settings .app-detail-switch + .field-label { margin-top: 6px; }
.person-about { flex: 1 1 100%; display: grid; gap: 6px; }
.person-about textarea { width: 100%; }
.about-me { white-space: pre-wrap; margin: 0; }
@media (max-width: 760px) { .app-admin-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
	.app-tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
	.app-detail-switch .toggle { min-height: 44px; }
}

/* * A sheet enlarged to fill the window */
body.sheet-popped { overflow: hidden; }
.sheet-editor-wrap.popped { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; background: var(--page); }
.sheet-editor-wrap.popped .sheet-grid { flex: 1; min-height: 0; }
.sheet-editor-wrap.popped .jss_content { max-height: calc(var(--vh) - 120px) !important; height: calc(var(--vh) - 120px) !important; }
.sheet-pop { white-space: nowrap; }

/* * Deliverables as rows or tiles, opened by clicking; older versions folded away */
.deliverables-bar { display: flex; justify-content: flex-end; margin: 4px 0 6px; }
.deliverables-h { margin: 14px 0 6px; font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
button.deliverable-main { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 12px; }
button.deliverable-main:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.deliverable.open { box-shadow: 0 0 0 2px var(--line-strong); }
.deliverable-open { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.deliverable-preview { max-width: 100%; max-height: 420px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); }
.deliverables.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.deliverables.tiles .deliverable.open { grid-column: 1 / -1; }
.deliverables.tiles button.deliverable-main { flex-direction: column; align-items: flex-start; }
.deliverables.tiles .deliverable-icon { width: 44px; height: 44px; }
.deliverables.tiles .deliverable-icon:has(img) { width: 100%; height: 130px; }
.deliverable.old { opacity: .8; background: var(--card); border-color: var(--line); }
.earlier-versions { margin-top: 14px; }
.earlier-versions > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.earlier-versions > .deliverables { margin-top: 8px; }

/* * Sortable table headers */
th.sortable { padding: 0; }
th.sortable .sort-button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 11px 16px; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
th.sortable .sort-button:hover { color: var(--text); background: var(--hover); }
th.sortable .sort-button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
th.sortable .sort-arrow { font-size: 10px; color: var(--faint); }
th.sortable.sorted .sort-arrow { color: var(--accent); }

/* * New-things badges on tabs */
.segmented button { position: relative; }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--notify); color: var(--on-notify); font-size: 11px; font-weight: 600; line-height: 1; vertical-align: 1px; }
.tab-badge.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }

/* * Tasks done in an app */
.app-chip { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.app-chip:hover { background: var(--accent); color: #fff; }
.app-chip.done { opacity: .6; }
.app-chip.off { border-color: var(--line); background: var(--sunken); color: var(--muted); font-weight: 500; }
.task-add .mini-select.app-picked { border-color: var(--accent-line); color: var(--accent); }

/* * Finished steps fold to one line */
.task-step.folded { padding-top: 2px; padding-bottom: 2px; }
.step-fold { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px; cursor: pointer; border-radius: var(--r-sm); }
.step-fold:hover { background: var(--hover); }
.step-fold:focus-visible { outline: 2px solid var(--focus); }
.step-fold .step-fold-names { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-fold .task-caret { color: var(--muted); }
/* * Unfolded done step: the same chevron in the same spot (right after the number), pointing down */
.step-refold { all: unset; display: inline-flex; align-items: center; cursor: pointer; border-radius: 4px; }
.step-refold:hover { background: var(--hover); }
.step-refold:focus-visible { outline: 2px solid var(--focus); }
.step-refold .task-caret { color: var(--muted); transform: none; }

/* * Working for an issue (an app opened from an issue) */
.working-for { position: sticky; top: 0; z-index: 20; margin: -4px 0 16px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.working-for-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; color: var(--accent); }
.working-for-what { flex: 1 1 240px; min-width: 0; color: var(--text); font-size: 13.5px; }
.working-for-what a { font-weight: 600; }
.working-for-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.working-for-send { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--accent-line); background: var(--card); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.working-for-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.working-for-link { margin: 0; overflow-wrap: anywhere; }
.working-for-flash { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; padding: 10px 16px; border-radius: var(--r-sm); background: var(--text); color: var(--page); box-shadow: var(--shadow); font-size: 13.5px; }
.check-line { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }

/* * Checklists in descriptions, comments and task notes */
.check-progress { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.check-progress-text { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 600; }
.check-progress-track { flex: 1; max-width: 220px; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.check-progress-track span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s; }
.check-progress.all { color: var(--ok); }
.check-progress.all .check-progress-track span { background: var(--ok); }
.check-count { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 0 6px; height: 18px; border-radius: 9px; background: var(--sunken); color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.check-count.all { background: var(--ok-soft); color: var(--ok); }
.md li.md-task input[type="checkbox"]:not(:disabled) { cursor: pointer; }
.md li.md-task:has(input:checked) > span { color: var(--muted); text-decoration: line-through; }
.task-notes { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.task-notes .md > :last-child { margin-bottom: 0; }
.checklist-button { margin-left: auto; }
.small-field.wide .field-label { display: flex; align-items: center; gap: 8px; }
.task-items .task-notes .md li { display: flex; border: 0; border-radius: 0; }
.task-items .task-notes .md li:not(.md-task) { display: list-item; }
.task-items .task-notes input[type=checkbox] { width: auto; height: auto; }
.task-items .task-notes .md li.md-task > span { font-weight: 400; color: var(--text); }
.task-items .task-notes .md li.md-task:has(input:checked) > span { color: var(--muted); }

/* * Mail: Gmail's layout. Folders, the conversation list, the open conversation */
.content:has(> .mail) { padding: 0; }
.mail { --mail-nav: 220px; display: grid; grid-template-columns: var(--mail-nav) minmax(340px, 460px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(var(--vh) - var(--topbar)); overflow: hidden; }
.mail-nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; border-right: 1px solid var(--line); overflow-y: auto; }
.mail-compose-button { margin: 0 0 0 4px; padding: 0 20px; height: 44px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.mail-box { display: flex; flex-direction: column; }
.mail-box-name { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.mail-box-name:hover { background: var(--hover); }
.mail-box-name > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-box.on > .mail-box-name { color: var(--accent); }
.mail-folders { display: flex; flex-direction: column; margin: 2px 0 8px; }
.mail-folder { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px 0 16px; border-radius: 0 16px 16px 0; cursor: pointer; font-size: 13.5px; color: var(--text); }
.mail-folder span:first-of-type { flex: 1; }
.mail-folder:hover { background: var(--hover); }
.mail-folder.on, .mail-folder-head.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mail-folder:focus-visible, .mail-box-name:focus-visible { outline: 2px solid var(--focus); }
.mail-count { font-size: 12px; font-weight: 700; color: var(--text); }
.mail-folder.on .mail-count { color: var(--accent); }
.mail-settings-link { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 10px; font-size: 12.5px; color: var(--muted); }

.mail-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--card); }
.mail-search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 6px; padding: 0 12px; border-radius: 22px; background: var(--sunken); color: var(--muted); }
.mail-search .input { border: 0; background: transparent; height: 40px; padding: 0; box-shadow: none; }
.mail-toolbar { display: flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); }
.mail-toolbar > input[type=checkbox] { margin-right: 8px; }
.mail-toolbar .mail-move { max-width: 130px; margin-left: 4px; }
.mail-range { margin-left: auto; white-space: nowrap; padding-right: 4px; }
.mail-searching { margin: 6px 16px 0; }
.mail-empty { padding: 32px 16px; text-align: center; }
.mail-rows { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.mail-row { display: grid; grid-template-columns: auto auto 32px minmax(0, 1fr) auto; grid-template-areas: "check star marks from when" "check star marks subject subject"; align-items: center; column-gap: 10px; row-gap: 3px; padding: 11px 16px 11px 18px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; background: var(--sunken); }
.mail-row.unread { background: var(--card); }
.mail-row:hover { box-shadow: inset 0 -1px 0 var(--line), 0 1px 3px rgba(0,0,0,.08); position: relative; z-index: 1; }
.mail-row.cursor { box-shadow: inset 3px 0 0 var(--accent); }
.mail-row.open, .mail-row.picked { background: var(--accent-soft); }
.mail-row > input { grid-area: check; }
.mail-row .mail-star { grid-area: star; }
.mail-spam:hover { color: var(--bad); }
.mail-from { grid-area: from; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.mail-row.unread .mail-from { color: var(--text); font-weight: 700; }
.mail-from { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mail-from-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-n { flex: none; display: inline-flex; align-items: center; gap: 1px; padding: 0 5px 0 7px; height: 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mail-n:hover, .mail-n.on { border-color: var(--accent-line); color: var(--accent); }
.mail-n.on svg { transform: rotate(180deg); }
.mail-unfold { padding: 0 12px 8px 64px; border-bottom: 1px solid var(--line); background: var(--sunken); list-style: none; }
.mail-unfold-list { margin: 0; padding: 4px 0 0; list-style: none; display: flex; flex-direction: column; }
.mail-unfold-msg { width: 100%; display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 12px; align-items: baseline; padding: 5px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text); }
.mail-unfold-msg:hover { background: var(--hover); }
.mail-unfold-msg.unread .mail-unfold-from { font-weight: 700; }
.mail-unfold-from, .mail-unfold-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-subject { grid-area: subject; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-subject strong { font-weight: 500; }
.mail-row.unread .mail-subject strong { font-weight: 700; }
.mail-marks { grid-area: marks; display: inline-flex; gap: 6px; color: var(--muted); width: 32px; }
.mail-drafted { color: var(--accent); display: inline-flex; }
.mail-when { grid-area: when; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-row.unread .mail-when { color: var(--text); font-weight: 700; }
.mail-star { all: unset; cursor: pointer; display: inline-flex; color: var(--faint); border-radius: 4px; padding: 2px; }
.mail-star.on { color: #e3a008; }
.mail-star.on svg { fill: currentColor; }
.mail-star:focus-visible { outline: 2px solid var(--focus); }

.mail-read { min-width: 0; overflow-y: auto; background: var(--page); }
.mail-blank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--faint); text-align: center; padding: 24px; }
.mail-thread { padding: 10px 24px 48px; max-width: 980px; }
.mail-thread-tools { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 0; background: var(--page); }
.mail-thread-tools .button { margin-left: auto; }
.mail-thread-subject { font-size: 21px; font-weight: 600; margin: 8px 0 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mail-in { font-weight: 500; padding: 1px 8px; border-radius: 4px; background: var(--sunken); }
.mail-claude { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; }
.mail-claude-head { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.mail-claude-head .muted { margin-left: auto; }
.mail-claude-summary { margin: 0; }
.mail-claude-route { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--warn-line); }
/* * Mail sorting: "Moved here from Info" on rows and conversations, and what was moved out of an inbox */
.mail-moved-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.mail-moved { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; }
.mail-moved > p { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.mail-moved > p > svg { flex: none; margin-top: 2px; color: var(--accent); }
.mail-moved.kept { flex-direction: row; align-items: center; gap: 6px; padding: 0; background: none; border: 0; }
.mail-moved-out { border-bottom: 1px solid var(--line); background: var(--card); }
.mail-moved-out > .mail-section-fold { padding: 8px 16px; font-size: 12px; font-weight: 700; color: var(--muted); }
.mail-moved-out ul { list-style: none; margin: 0; padding: 0 16px 8px; display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow-y: auto; }
.mail-moved-out li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; }
.mail-moved-out-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-sort-rules { margin: -4px 0 4px 24px; }
/* * Spam: who put it there, and the spam check */
/* * Watch rules: the bell badge on a matching item (Inbox, issues), and the Alerts list */
.watch-tag { display: inline-flex; align-items: center; gap: 3px; margin: 0 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; white-space: nowrap; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--line); }
.mail-subject .watch-tag { margin-left: 0; }
.watch-alerts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.watch-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.watch-alert-icon { color: var(--muted); display: inline-flex; }
.watch-alert-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.watch-alert-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-alert.unread .watch-alert-title { font-weight: 700; }
.watch-alert.unread .watch-alert-icon { color: var(--accent); }
.watch-alert .watch-tag { margin: 0; }
.watch-rule.is-off { opacity: 0.6; }
.watch-person { display: flex; gap: 8px; flex-wrap: wrap; }
.watch-person .input { width: auto; }
.mail-spam-tag { display: inline-flex; align-items: center; margin-right: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; color: var(--muted); background: var(--hover); border: 1px solid var(--line); }
.mail-spam-tag.person { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.mail-spam-check { padding: 6px 16px 10px; border-bottom: 1px solid var(--line); background: var(--card); }
.mail-spam-check-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mail-spam-check-head .mail-section-fold { font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.mail-spam-check > p { margin: 4px 0 6px; }
.mail-spam-check ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 35vh; overflow-y: auto; }
.mail-spam-check-item { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--warn-line, var(--line)); background: var(--warn-soft, var(--hover)); font-size: 13px; }
.mail-spam-check-item:hover, .mail-spam-check-item:focus-visible { border-color: var(--accent); }
.mail-spam-check-row { display: flex; align-items: center; gap: 8px; }
.mail-spam-check-row .mail-spam-check-item { flex: 1; min-width: 0; }
.mail-in-spam { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft, var(--hover)); border: 1px solid var(--warn-line, var(--line)); font-size: 13px; }
.mail-in-spam > p { display: flex; align-items: center; gap: 8px; margin: 0; }
@media (max-width: 700px) { .mail-moved-out li { grid-template-columns: 1fr auto; } .mail-moved-out li > .muted { grid-column: 1; } }
.mail-drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mail-draft { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; color: var(--muted); }
.mail-draft strong { color: var(--text); font-size: 13px; }
.mail-draft span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mail-draft:hover { border-color: var(--accent); }
.mail-draft:focus-visible { outline: 2px solid var(--focus); }
.mail-claude-ask { display: flex; gap: 8px; }
.mail-claude-ask .input { flex: 1; height: 34px; }
.mail-images { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.mail-to-issue { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.mail-to-issue .input:not(.mini-select) { flex: 1 1 220px; height: 32px; }
.mail-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mail-msg { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.mail-msg-head { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; cursor: pointer; }
.mail-msg-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mail-msg-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-msg-snip, .mail-msg-to { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { position: relative; padding: 0 16px 12px; }
.mail-body iframe { display: block; width: 100%; height: 120px; border: 0; border-radius: 6px; }
.mail-quotes { all: unset; cursor: pointer; margin-top: 4px; padding: 0 8px; border-radius: 8px; background: var(--sunken); color: var(--muted); font-size: 12px; letter-spacing: 1px; line-height: 16px; }
.mail-quotes:focus-visible { outline: 2px solid var(--focus); }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.mail-filed { margin: -6px 0 0; padding: 0 16px 14px; }
.mail-reactions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.mail-reaction { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunken); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-reaction-emoji { font-size: 16px; line-height: 1; }
.mail-reaction-line { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 16px; font-size: 13.5px; }
.mail-reaction-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-reaction-when { margin-left: auto; white-space: nowrap; }
.mail-invite { display: flex; flex-direction: column; gap: 10px; margin: 0 16px 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.mail-invite-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; color: var(--accent); }
.mail-invite-title { min-width: 0; color: var(--text); font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.mail-invite-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.mail-invite-facts dt { color: var(--muted); font-weight: 600; }
.mail-invite-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; font-variant-numeric: tabular-nums; }
.mail-invite-off { text-decoration: line-through; color: var(--muted); }
.mail-invite-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mail-invite-rsvp { display: flex; align-items: center; gap: 8px; }
.mail-invite-going { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mail-invite-by { font-size: 13px; color: var(--faint); }
@media (max-width: 560px) {
	.mail-invite { margin: 0 10px 12px; padding: 12px; }
	.mail-invite-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.mail-invite-facts dd { margin-bottom: 6px; }
}
.mail-reply-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mail-reply-bar .button { border-radius: 18px; }

.mail-composer { position: fixed; z-index: 60; right: 24px; bottom: 0; width: min(620px, calc(100vw - 32px)); max-height: calc(var(--vh) - var(--topbar) - 16px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px 12px 0 0; box-shadow: var(--shadow); }
.mail-composer-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; margin: 0 -14px 4px; padding: 10px 14px; background: var(--sunken); font-size: 13.5px; }
.mail-field { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.mail-field > span { width: 56px; flex: none; color: var(--muted); font-size: 13px; }
.mail-field .input { border: 0; box-shadow: none; background: transparent; height: 34px; padding: 0; }
.mail-address-field { position: relative; }
.mail-address-suggest { top: 100%; left: 64px; width: min(420px, calc(100% - 64px)); max-height: 240px; margin: 0; list-style: none; }
.mail-address-suggest .search-item { cursor: pointer; }
.mail-text { min-height: 200px; resize: vertical; border: 0; box-shadow: none; padding: 8px 0; font-family: inherit; }
.mail-draft-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--accent); }
.mail-sig { margin: 0; }
.mail-composer-actions { display: flex; align-items: center; gap: 10px; }
.mail-composer-actions .button.primary { border-radius: 18px; padding: 0 22px; }
.mail-composer-actions .ghost:not(.mail-discard) { margin-left: auto; }
/* Files attached in the composer: pills with their own X; the composer outlined while a file is dragged over it */
.mail-compose-files { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-compose-files .file-pill { max-width: 100%; min-height: 32px; padding: 0 2px 0 10px; }
.mail-compose-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-compose-files .file-pill .muted { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-composer.dropping { outline: 2px dashed var(--accent); outline-offset: -4px; }
.mail-composer-head-tools { display: flex; align-items: center; gap: 2px; }
/* Minimized: just the title bar in the corner, so the email behind it can be read */
.mail-composer.minimized { width: min(340px, calc(100vw - 32px)); padding-bottom: 0; overflow: hidden; }
.mail-composer.minimized .mail-composer-head { margin-bottom: 0; }
.mail-composer.minimized .run-feedback { margin: 6px 0 10px; }
/* Full page: across the page under the top bar, what's written in a column down the middle */
.mail-composer.full { --pad: max(24px, calc(50vw - 440px)); top: var(--topbar); left: 0; right: 0; width: auto; max-height: none; padding: 0 var(--pad) 16px; border-width: 1px 0 0; border-radius: 0; }
.mail-composer.full .mail-composer-head { margin: 0 calc(-1 * var(--pad)) 4px; padding: 10px var(--pad); }
.mail-composer.full .mail-text { flex: 1 0 200px; resize: none; }
.mail-composer-restore { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mail-composer-restore .muted { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mail-polish-bar { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
/* One line that grows with the note; on a phone it takes its own full-width line under the menus and Polish */
.mail-polish-note { flex: 1 1 180px; min-width: 0; min-height: 30px; height: 30px; padding: 5px 10px; font: inherit; font-size: 12.5px; line-height: 1.5; resize: none; overflow: hidden; }
@media (max-width: 560px) {
	.mail-polish-bar { flex-wrap: wrap; }
	.mail-polish-note { flex-basis: 100%; order: 1; }
	.mail-composer-actions { gap: 6px; }
	.mail-composer-keys { display: none; }
}
/* The composer's chips (Polish, Claude's drafts) are one-row pills, not the stacked step tiles .chip draws */
.mail-composer .chip { flex-direction: row; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--raised); color: var(--text); font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.mail-composer .chip:hover:not(:disabled) { border-color: var(--accent-line); color: var(--accent); }
.mail-composer .chip:disabled { opacity: 0.6; cursor: default; }
.mail-composer .chip.mail-polish { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mail-composer .chip.mail-polish:hover:not(:disabled) { border-color: var(--accent); }
.mail-polished { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); }
.mail-polished p { margin: 0 0 6px; }
.mail-polished-text { white-space: pre-wrap; font-size: 13.5px; }
.mail-polished-actions { display: flex; gap: 8px; }
.mail-polished-changes { margin: 8px 0; }
.mail-polished-changes ul { margin: 0; padding-left: 18px; font-size: 13px; }
.mail-toast { position: fixed; left: 24px; bottom: 24px; z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 8px; background: #202124; color: #fff; font-size: 13.5px; box-shadow: var(--shadow); }
.mail-toast button { all: unset; cursor: pointer; color: #8ab4f8; font-weight: 600; }

/* * Mail → Mailboxes */
.mail-conn { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mail-conn-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 14px; }
.mail-conn-form .small-field { flex: 1 1 180px; max-width: 360px; }
.mail-box-settings { padding: 0; border-bottom: 1px solid var(--line); }
.mail-box-settings:last-child { border-bottom: 0; }
.mail-box-settings.hidden-box { opacity: .65; }
.mail-box-settings > :not(summary) { margin: 0 0 12px 22px; }
.mail-box-settings[open] { padding-bottom: 8px; }
.mail-box-settings-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 4px; cursor: pointer; list-style: none; }
.mail-box-settings-head::-webkit-details-marker { display: none; }
.mail-box-settings-head > svg { transform: rotate(-90deg); transition: transform .15s; color: var(--muted); flex: none; }
.mail-box-settings[open] > .mail-box-settings-head > svg { transform: none; }
.mail-box-settings-head:focus-visible { outline: 2px solid var(--focus); border-radius: 6px; }
.mail-box-brands { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mail-box-who { margin-left: auto; }
.mail-box-addresses { display: grid; gap: 8px; margin-bottom: 16px; }
.mail-box-addresses .small-field > .muted { font-weight: 400; overflow-wrap: anywhere; }
.mail-people { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.danger-text { color: var(--bad); }

/* * Mail laid out per person: by folder, and full-screen reading */
.mail.full { grid-template-columns: var(--mail-nav) minmax(0, 1fr); }
.mail.full .mail-read { display: none; }
.mail.full.reading .mail-list { display: none; }
.mail.full.reading .mail-read { display: block; }
.mail.full .mail-list { border-right: 0; }
.mail-folders.by-folder { display: flex; flex-direction: column; gap: 6px; }
.mail-folder-group { display: flex; flex-direction: column; }
.mail-folder-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px 2px 4px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; cursor: pointer; text-align: left; }
.mail-folder-head:hover { color: var(--text); background: var(--raised); }
.mail-folder-group > .mail-folder-head > svg:first-child, .mail-folder-fold svg { transition: transform 0.15s ease; flex: none; }
.mail-folder-group.folded > .mail-folder-head > svg:first-child, .mail-folder-group.folded .mail-folder-fold svg { transform: rotate(-90deg); }
/* * A heading that opens its folder from every mailbox, with its own fold arrow */
.mail-folder-head-row { display: flex; align-items: center; }
.mail-folder-head-row .mail-folder-head { flex: 1; min-width: 0; padding: 6px 10px 6px 4px; }
.mail-folder-fold { flex: none; color: var(--muted); }
.mail-folder-group.folded { margin-bottom: 2px; }
.mail-folder-head .mail-count { margin-left: auto; color: var(--muted); }
.mail-folder-box { padding-left: 32px; height: 30px; }
.mail-nav-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0 10px; }
.mail-nav-foot .mail-settings-link { margin: 0; }
/* * Sort report (mail_report.tsx) */
.mail-report-count { margin: 0 0 12px; font-size: 14px; }
.mail-report-filters input[type='date'] { height: 100%; border: 0; background: transparent; padding: 0 8px; font: inherit; font-size: 13.5px; color: var(--text); }
.mail-report-email { min-width: 220px; max-width: 360px; }
.mail-report-email strong, .mail-report-email span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-report-why { font-size: 12.5px; }
.mail-report tr.mail-report-open td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.mail-report .actions { flex-wrap: nowrap; }
.mail-report-note td { padding-top: 0; background: var(--card); }
.table tbody tr.mail-report-note:hover td { background: var(--card); }
.mail-report-more { margin-top: 12px; text-align: center; }
.mail-autoread-rules { list-style: none; margin: 0 0 12px; padding: 0; }
.mail-autoread-rule { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mail-autoread-rule .run-feedback { flex-basis: 100%; margin: 0; }
.mail-autoread-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mail-autoread-add .input { width: auto; min-width: 180px; }
.mail-autoread-replied { display: block; margin-top: 4px; }
.mail-autoread-note { margin: 6px 0 0; }
.mail-view-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.mail-view { display: flex; flex-direction: column; gap: 6px; margin: 8px 4px 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.mail-view .segmented { align-self: stretch; display: flex; flex-direction: column; height: auto; }
.mail-view .segmented button { text-align: left; }
/* * Mail's menu folded to icons (on a computer); it opens out over the list while the pointer is on it */
.mail-nav-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.mail-box-initial { display: none; }
@media (min-width: 761px) {
	.mail.nav-folded { --mail-nav: 64px; }
	.mail.nav-folded .mail-nav { position: relative; z-index: 5; width: 240px; background: var(--raised); box-shadow: var(--shadow); }
	.mail.nav-icons .mail-nav { width: auto; padding: 16px 8px; background: none; box-shadow: none; }
	.mail.nav-icons .mail-nav-top { flex-direction: column; gap: 8px; }
	.mail.nav-icons .mail-compose-button { width: 44px; margin: 0; padding: 0; justify-content: center; }
	.mail.nav-icons :is(.mail-compose-button > span, .mail-box-name > span:first-child, .mail-folder > span:not(.mail-count), .mail-folder-head > span:not(.mail-count)) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.mail.nav-icons :is(.mail-folder-group > .mail-folder-head > svg:first-child, .mail-folder-fold, .mail-folder-box, .mail-nav-foot, .mail-view) { display: none; }
	.mail.nav-icons .mail-nav .run-feedback { width: 8px; height: 8px; margin: 2px auto; border-radius: 999px; background: var(--bad); font-size: 0; overflow: hidden; }
	.mail.nav-icons :is(.mail-box-name, .mail-folder, .mail-folder-head) { position: relative; justify-content: center; height: 36px; padding: 0; border-radius: var(--r-sm); }
	.mail.nav-icons .mail-box-initial { display: grid; }
	.mail.nav-icons .mail-count { position: absolute; top: 0; right: 0; padding: 0 4px; border-radius: 999px; background: var(--sunken); font-size: 10.5px; font-variant-numeric: tabular-nums; }
}

@media (max-width: 1180px) {
	.mail { --mail-nav: 200px; grid-template-columns: var(--mail-nav) minmax(0, 1fr); }
	.mail-read { display: none; }
	.mail.reading .mail-list { display: none; }
	.mail.reading .mail-read { display: block; }
}
@media (max-width: 760px) {
	.mail { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; min-height: calc(var(--vh) - var(--topbar)); overflow: visible; }
	.mail.full { grid-template-columns: minmax(0, 1fr); }
	.mail-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
	.mail-compose-button { margin: 0; height: 36px; }
	.mail-nav-top { margin: 0; }
	.mail-fold { display: none; }
	.mail-folded-errors { display: none; }
	.mail-box { flex-direction: row; flex-wrap: wrap; align-items: center; }
	.mail-box.on, .mail-folders { flex-basis: 100%; }
	.mail-folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; margin: 4px 0 0; }
	.mail-folder { height: auto; min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); }
	.mail-folder > svg, .mail-folder .mail-count { flex: none; }
	.mail-folder span:first-of-type { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
	.mail.reading .mail-nav { display: none; }
	.mail-thread { padding: 8px 12px 40px; }
	.mail-composer { right: 0; width: 100vw; border-radius: 12px 12px 0 0; }
}

/* * Outlines: paste a plan, edit the task list as text, Claude's plans */
.outline-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; tab-size: 2; white-space: pre; overflow-x: auto; }
.outline-paste, .outline-editor { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.outline-paste-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.outline-editor-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.outline-help summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.outline-help pre { margin: 6px 0; padding: 10px 12px; background: var(--sunken); border-radius: 8px; font-size: 12px; overflow-x: auto; }
.outline-help p { margin: 0; }
.outline-ask { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 13px; }
.outline-preview { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px; background: var(--sunken); font-size: 13px; }
.outline-sum { margin: 0; font-weight: 600; }
.outline-issue + .outline-issue { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.outline-title { display: block; margin-bottom: 2px; }
.outline-step-name { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: none; }
.outline-step ul { margin: 2px 0 4px; padding-left: 18px; }
.outline-step li.done { color: var(--muted); text-decoration: line-through; }
.outline-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-size: 11px; color: var(--muted); text-decoration: none; }
.outline-tag.unknown { border-color: var(--warn-line); color: var(--warn-strong); }
.step-name { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 2px; border-radius: 4px; padding: 0 2px; }
.step-name:hover { background: var(--hover); }
.step-name:focus-visible { outline: 2px solid var(--focus); }
.step-name-add { opacity: 0; margin-left: 6px; }
.task-step-head:hover .step-name-add, .step-name:focus-visible .step-name-add { opacity: 1; }
.step-name-input { width: 220px; }
.step-paste { margin-left: auto; opacity: .55; }
.task-step-head:hover .step-paste, .step-paste:focus-visible { opacity: 1; }
.step-refold + .step-paste { margin-left: 4px; }
.paste-list-link { align-self: flex-start; }
.add-to { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-to-select { max-width: 200px; font-weight: 600; color: var(--accent); }
.cw-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.cw-outline { margin: 8px 0; border: 1px solid var(--accent-line); border-radius: 10px; overflow: hidden; background: var(--card); }
.cw-outline .outline-preview { margin: 0; border-radius: 0; background: var(--card); }
.cw-outline .run-feedback { margin: 6px 10px; }
.deliverable-note .add-to { margin-top: 6px; }

/* * Mail: inbox sections, fixed From on replies, your signature */
.mail-section { padding: 10px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--line); list-style: none; }
.mail-inbox-type { margin-left: auto; max-width: 140px; }
.mail-inbox-type + .mail-range { margin-left: 8px; }
.mail-quote-preview { display: grid; gap: 4px; padding: 8px 0; border-top: 1px dashed var(--line); }
.mail-quote-preview p { margin: 0; }
.mail-quote { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-signature { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--line); }
.mail-signature.editing { flex-direction: column; gap: 6px; }
.mail-signature-text { flex: 1; margin: 0; font: inherit; font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.label-rank { width: 56px; text-align: center; }

/* * Active tasks */
.active-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.active-filters .small-field { min-width: 220px; }
.active-today-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.active-sub { display: block; margin-top: 2px; }
/* * Waiting for deliverable (v114): the alert at the top, the row and its tag */
.deliverable-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--warn-line); border-left: 4px solid var(--warn-strong); border-radius: var(--r); background: var(--warn-soft); color: var(--text); }
.deliverable-alert.mine { border-color: var(--bad-line); border-left-color: var(--bad); background: var(--bad-soft); }
.deliverable-alert > svg { flex: none; margin-top: 2px; color: var(--warn); }
.deliverable-alert.mine > svg { color: var(--bad); animation: pulse 1.6s ease-in-out infinite; }
.deliverable-alert p { margin: 0; }
.deliverable-alert p + p { margin-top: 6px; }
.deliverable-alert a { font-weight: 600; }
.status-tag.s-alert { display: inline-flex; align-items: center; gap: 4px; background: var(--bad); color: #fff; }
.active-table tr.active-row-alert td { background: var(--bad-soft); }
.active-table tr.active-row-alert td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.chip.chip-alert:not(.on) { color: var(--bad); border-color: var(--bad-line); }
.active-table .active-task-cell { min-width: 260px; }
.active-table .active-issue-cell, .active-today-table .active-issue-cell { min-width: 220px; max-width: 420px; }
.active-table tbody tr:hover, .active-today-table tbody tr:not(.active-group-row):hover { background: var(--hover); }
.avatar-stack { display: inline-flex; }
.avatar-stack > * + * { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); border-radius: 999px; }
.quiet-select { border-color: transparent; background-color: transparent; padding-left: 4px; }
.quiet-select:hover, .quiet-select:focus { border-color: var(--line); background-color: var(--raised); }
.quiet-select.nobody { color: var(--muted); font-style: italic; }
.active-today-table .active-update { width: 60%; line-height: 1.45; }
.active-group-row th { background: var(--raised); text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 16px; }
.active-group.g-you .active-group-row th { color: var(--accent); }
.active-group.g-hold .active-group-row th { color: var(--muted); }
.active-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.active-people .chip { flex-direction: row; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: var(--raised); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.active-people .chip:hover:not(.on) { border-color: var(--accent-line); }
.active-people .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-count { font-size: 11px; opacity: .75; margin-left: 2px; }
.active-show { margin-left: auto; }
.active-who { display: inline-flex; align-items: center; gap: 6px; }
.active-who .mini-select { max-width: 150px; }
.active-table td { vertical-align: middle; }

/* * What's new */
.whats-new { position: relative; flex: none; }
.whats-new-button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.whats-new-button.needs { border-color: var(--line); background: var(--card); color: var(--muted); padding-left: 10px; }
.whats-new-button .wn-need { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--notify); color: var(--on-notify); }
.whats-new-button .wn-info { color: var(--accent); }
.whats-new-button.needs .wn-info { font-weight: 500; }
.whats-new-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; padding: 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.whats-new-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.whats-new-item { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.whats-new-item.need { border-color: var(--warn-line); background: var(--warn-soft); }
.whats-new-item .button { align-self: flex-start; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--notify); flex: none; margin-left: auto; }
.nav-item .new-dot + .nav-badge, .app-row .new-dot + .nav-badge { margin-left: 6px; }
/* * "Updated to vNN": the notice above every page after a version goes live */
.update-notice-buttons { align-items: center; }
.update-notice-lines { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; overflow-wrap: anywhere; }
.update-notice-version { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .whats-new-button .wn-info { display: none; } .whats-new-button .wn-need { padding: 0 6px; font-size: 0; } .whats-new-button .wn-need::before { content: '!'; font-size: 12px; } }

/* * Approver picker: one or more approvers */
.approver-picker { position: relative; display: inline-flex; }
.approver-button { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; text-align: left; }
.approver-button.set { color: var(--text); font-weight: 600; }
.approver-button svg { opacity: 0.6; }
.approver-menu { left: 0; right: auto; max-height: 320px; overflow-y: auto; }
.approver-option { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.approver-option:hover { background: var(--hover); }
/* * Add a task / comment: folded behind a button until wanted */
.add-open-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.task-state-tag { cursor: help; }
.deliverable-mismatch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; font-size: 13px; color: var(--text); background: var(--warn-soft, var(--hover)); border-top: 1px solid var(--line); }
.avatar.xs.claude-avatar { display: inline-grid; place-items: center; background: var(--accent-soft, var(--hover)); color: var(--accent); font-size: 11px; }
.mail-writing { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft, var(--hover)); border: 1px solid var(--warn-line, var(--line)); font-size: 13px; }

/* * Phone */
.phone-number { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.muted-row td { opacity: 0.65; }
.phone-call-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.phone-call { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.phone-call-main { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.phone-call-main:focus-visible { outline: 2px solid var(--focus); border-radius: 10px; }
.phone-call-who { display: flex; flex-direction: column; min-width: 0; }
.phone-call-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13.5px; }
.phone-call.open .phone-call-summary { white-space: normal; color: var(--text); }
.phone-call-open { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.phone-turns { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.phone-turns li, .phone-try-box p { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; margin: 0; font-size: 13.5px; }
.turn-who { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; padding-top: 2px; }
.turn-ai .turn-who { color: var(--accent); }
.phone-voicemail { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.phone-voicemail audio { max-width: 420px; width: 100%; }
.phone-numbers { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.phone-numbers li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phone-line { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.phone-answers-note { margin: 2px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; }
.phone-line:first-of-type { border-top: 0; }
.phone-line h3 { margin: 0; }
.phone-people { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.phone-try { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--page); }
.phone-try summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.phone-try-box { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.code-block { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
@media (max-width: 760px) {
	.phone-call-main { grid-template-columns: minmax(0, 1fr) auto; }
	.phone-call-summary { grid-column: 1 / -1; grid-row: 2; }
}
.phone-try-box p.run-feedback, .phone-try-box p.muted { display: block; }
.phone-line textarea[rows="10"] { min-height: 190px; }
.phone-lookups { display: flex; flex-direction: column; gap: 2px; margin-bottom: 3px; }
.phone-lookups > span { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.phone-gap-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.phone-gap-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.phone-gap-list li > span:first-child { flex: 1 1 260px; min-width: 0; }

/* * Link to a section of an issue */
.section-link { color: var(--faint); opacity: 0.7; }
.task-block-head:hover .section-link, .section-link:focus-visible, .section-link.copied { opacity: 1; color: var(--accent); }
.section-link-done { font-size: 11.5px; margin-left: 3px; }

/* * Shift hours */
.shift-editor { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.shift-editor .small-field { max-width: 380px; }
.shift-grid th, .shift-grid td { padding: 6px 6px; text-align: center; }
.shift-grid th[scope="row"] { text-align: left; white-space: nowrap; font-weight: 600; }
.shift-grid .mini-input { width: 108px; }
.shift-grid tr.shift-evening > * { border-top: 2px solid var(--line-strong); padding-top: 10px; }
/* * Appointments' kinds: the name widest, the numbers narrow, so a row fits without scrolling on a desktop */
.kinds-table th { white-space: normal; }
.kinds-table .kind-name { min-width: 200px; }
.kinds-table .kind-name .input { text-overflow: ellipsis; }
.kinds-table .mini-input { width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.kind-extra { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.kind-extra h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 650; }
.kind-photo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.kind-photo img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.icon-picks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pw-row { display: flex; gap: 6px; align-items: center; } .pw-row .input { flex: 1; }

/* * Mail list: one line per conversation in full-screen reading (as in Gmail), quick actions on hover */
.mail-row { position: relative; }
.mail.full .mail-row { grid-template-columns: auto auto 32px minmax(140px, 230px) minmax(0, 1fr) 80px; grid-template-areas: "check star marks from subject when"; column-gap: 16px; padding: 11px 20px; }
/* * Cold outreach in the Inbox (mail_cold.tsx): rows without the tick box and star, the email's campaign, the reply box */
.mail .mail-row.cold-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "from when" "subject subject"; }
.mail.full .mail-row.cold-row { grid-template-columns: minmax(140px, 230px) minmax(0, 1fr) 80px; grid-template-areas: "from subject when"; }
.cold-toolbar { flex-wrap: wrap; gap: 8px; padding: 6px 10px 6px 16px; }
.cold-tie { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.cold-tie strong { color: var(--text); font-weight: 600; }
.cold-msg-head { cursor: default; }
.cold-text { padding: 0 16px 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cold-reply { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.cold-reply-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cold-sort { margin: 0 0 14px; }
.mail.full .mail-when { text-align: right; }
.mail-hover { display: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); align-items: center; gap: 2px; padding-left: 10px; background: inherit; }
.mail.full .mail-hover { right: 12px; }
.mail-row:hover .mail-hover, .mail-hover.on { display: inline-flex; }
.mail-row:hover .mail-when, .mail-row:has(.mail-hover.on) .mail-when { visibility: hidden; }
.mail-unsub { all: unset; cursor: pointer; font-size: 12px; padding: 2px 8px; margin-right: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }
.mail-unsub:hover, .mail-unsub:focus-visible { border-color: var(--accent); color: var(--accent); }
.mail-snooze { position: relative; display: inline-flex; }
.mail-snooze-menu { width: 270px; top: calc(100% + 6px); right: 0; cursor: default; }
.mail-snooze-menu .menu-item { display: flex; justify-content: space-between; gap: 10px; }
.mail-section-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; }
.mail-section-fold.folded svg { transform: rotate(-90deg); }
.mail-section-fold:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }
@media (hover: none) { .mail-hover { display: none !important; } }

/* * Files (like Google Drive) */
.files-app { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); height: calc(var(--vh) - var(--topbar)); overflow: hidden; }
.files-places { display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; border-right: 1px solid var(--line); overflow-y: auto; }
.files-new { align-self: flex-start; margin: 0 0 12px 4px; padding: 0 20px; height: 44px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.files-places nav { display: flex; flex-direction: column; gap: 2px; }
.files-place { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px 0 14px; border-radius: 0 17px 17px 0; cursor: pointer; font-size: 13.5px; }
.files-place > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-place:hover { background: var(--hover); }
.files-place.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.files-place:focus-visible { outline: 2px solid var(--focus); }
.files-place .folder-faces { flex: none; margin-top: 0; }
.files-add { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 12px; font-size: 12.5px; }
.files-main { position: relative; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; padding: 14px 20px 80px; }
.files-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; min-height: 40px; }
.files-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; font-size: 18px; font-weight: 600; }
.files-crumbs .link-button { font-size: inherit; font-weight: inherit; color: var(--text); text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.files-crumbs .link-button:hover { background: var(--hover); }
.files-move .files-crumbs { font-size: 14px; }
.files-tools { display: flex; align-items: center; gap: 8px; }
.files-filter { width: 200px; }
.files-bar { display: flex; align-items: center; gap: 8px; margin-left: auto; height: 36px; padding: 0 10px; border-radius: 12px; background: var(--accent-soft); }
.files-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.files-grid .file-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: default; user-select: none; outline: none; }
.files-grid .file-item:hover { background: var(--hover); }
.file-item.picked, .files-grid .file-item.picked:hover { background: var(--accent-soft); border-color: var(--accent); }
.file-item:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.drive-thumb { height: 120px; display: grid; place-items: center; border-radius: 8px; background: var(--sunken); color: var(--muted); overflow: hidden; }
.k-folder .drive-thumb { background: none; height: 56px; color: var(--accent); }
.drive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.file-more { position: absolute; right: 4px; bottom: 22px; opacity: 0; }
.file-item:hover .file-more, .file-item.picked .file-more, .file-more:focus-visible { opacity: 1; }
/* * Who can open the folders: a few faces (or the SigmaWear logo for everyone), tucked under the name */
.folder-faces { display: inline-flex; align-items: center; min-height: 24px; margin-top: 2px; }
.folder-faces.everyone { gap: 6px; }
.folder-logo { width: 30px; height: 22px; }
.avatar.xs.folder-more { background: var(--hover); color: var(--muted); }
/* * Cut, waiting to be pasted: faded until it moves */
.file-item.cut { opacity: 0.5; }
/* * The folder (or trail step) a drag lets go on */
.files-grid .file-item.drop-on, .files-crumbs .drop-on { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.files-table tr.file-item.drop-on td { background: var(--accent-soft); }
.files-clip-note { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; }
.menu-key { margin-left: auto; font-size: 12px; color: var(--faint); }
.files-table tr.file-item { cursor: default; user-select: none; }
.files-table tr.file-item:hover td { background: var(--hover); }
.files-table tr.file-item.picked td { background: var(--accent-soft); }
.file-row-name { display: inline-flex; align-items: center; gap: 10px; }
.file-rename { width: 100%; }
.files-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 0; color: var(--faint); }
.files-app.dropping .files-main { outline: 2px dashed var(--accent); outline-offset: -8px; }
.files-drop { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; pointer-events: none; }
.files-menu { position: fixed; right: auto; width: 210px; z-index: 50; }
.files-menu.popover-menu { top: auto; }
.files-uploads { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 340px; max-height: 300px; overflow-y: auto; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.files-uploads-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--sunken); }
.files-uploads ul { list-style: none; margin: 0; padding: 6px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.files-uploads li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 13px; }
.files-up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-up-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.files-up-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.files-up-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.files-preview { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: rgba(10, 14, 20, 0.88); color: #fff; }
.files-preview-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.files-preview-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-preview-head .muted { color: rgba(255, 255, 255, 0.7); }
.files-preview-head .icon-button { color: #fff; }
.files-preview-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 0 70px 30px; }
.files-preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.files-preview-body iframe { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
.files-text { width: min(1000px, 100%); height: 100%; overflow: auto; margin: 0; padding: 16px; border-radius: 6px; background: var(--card); color: var(--text); font-size: 13px; white-space: pre-wrap; }
.files-sheet { width: min(1200px, 100%); min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-lg); background: var(--card); color: var(--text); }
.files-sheet .sheet-editor-wrap { min-width: 0; }
.files-noview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.files-prev, .files-next { all: unset; cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; }
.files-prev { left: 14px; }
.files-next { right: 14px; }
.files-prev:hover, .files-next:hover { background: rgba(255, 255, 255, 0.24); }
.files-move-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.files-move-list li { padding: 2px 4px; }
.files-setup { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; }
@media (max-width: 760px) {
	.files-app { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(var(--vh) - var(--topbar)); overflow: visible; }
	.files-places { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
	.files-places nav { flex-direction: row; flex-wrap: wrap; }
	.files-new { margin: 0; height: 36px; }
	.files-main { padding: 12px; }
	.files-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	.files-filter { width: 140px; }
	.files-by { display: none; }
	.files-preview-body { padding: 0 8px 20px; }
}
.content:has(> .files-app) { padding: 0; }
.drive-thumb:has(img) { display: block; }
.photo-locked { display: flex; align-items: center; gap: 16px; }
.photo-locked p { margin: 0; }
/* PDF viewer (everywhere) and Files previews for PDF, Illustrator and Photoshop */
.pdf-viewer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: rgb(15 18 24 / 0.82); }
.pdf-viewer-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.pdf-viewer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-viewer-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pdf-zoom { min-width: 3.5em; text-align: center; }
.pdf-viewer-body { flex: 1; overflow: auto; padding: 20px 16px 40px; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pdf-page { position: relative; max-width: 1100px; width: 100%; background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / 0.25); }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.pdf-viewer .pdf-page { width: min(100%, 900px); }
.pdf-loading, .pdf-error { text-align: center; padding: 40px 16px; color: #fff; }
.files-preview .pdf-loading, .files-preview .pdf-error, .psd-view .pdf-error { color: inherit; }
.files-pdf { position: relative; width: 100%; height: 100%; overflow: auto; padding: 12px; }
.files-pdf .pdf-page { max-width: 900px; }
.files-pdf-zoom { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; justify-content: flex-end; }
.psd-view { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 12px; }
.psd-view .psd-canvas { max-width: 100%; max-height: 100%; object-fit: contain; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.drive-ext { position: relative; display: inline-grid; place-items: center; }
.drive-ext b { position: absolute; bottom: 4px; font-size: 9px; letter-spacing: 0.03em; background: var(--accent); color: #fff; border-radius: 3px; padding: 0 3px; }
.modal.files-trash { width: min(860px, 100%); max-height: 85vh; overflow: auto; }
.files-trash-head { display: flex; align-items: center; justify-content: space-between; }
.files-trash-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.files-trash td .link-button { margin-left: 10px; }
.files-pdf-zoom .icon-button { background: rgb(255 255 255 / 0.16); color: #fff; }
.files-pdf-zoom .icon-button:hover { background: rgb(255 255 255 / 0.28); }
/* Files: Scan (phone camera to one PDF) and Email file, with "Sent to" on emailed files */
.files-scan-button { cursor: pointer; }
.file-sent { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--accent); font-size: 12px; }
.pill.file-view-only { margin-left: 6px; }
.files-access button { display: inline-flex; align-items: center; gap: 6px; }
.files-sent-history { list-style: none; margin: 0; padding: 0 18px 10px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.files-sent-history li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.files-sent-history .muted { color: rgba(255, 255, 255, 0.65); }
.modal.files-scan, .modal.files-mail { width: min(640px, 100%); max-height: 92vh; overflow-y: auto; }
.scan-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.scan-pages li { display: flex; flex-direction: column; gap: 4px; }
.scan-pages img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; }
.scan-page-tools { display: flex; align-items: center; gap: 2px; }
.scan-page-tools .muted { flex: 1; }
.files-scan label.button, .files-scan label.link-button { cursor: pointer; }
.files-scan label.disabled { pointer-events: none; opacity: 0.5; }
.files-scan .grow { flex: 1; }
.scan-name { display: flex; align-items: center; gap: 6px; }
.scan-name .input { flex: 1; }
.files-mail-list { list-style: none; margin: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--sunken); border-radius: 8px; font-size: 13px; }
.files-mail-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.files-mail-fields { grid-template-columns: minmax(0, 1fr); }
.files-mail-hint { margin: -6px 0 0; }
@media (max-width: 760px) {
	.files-tools { flex-wrap: wrap; }
}
.label-count { text-decoration: none; }
.label-count:hover, .label-count:focus-visible { color: var(--accent); text-decoration: underline; }
button.filter-tag { cursor: pointer; font: inherit; }
/* Mail: your signatures, per mailbox and domain */
.modal.mail-sigs { width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.mail-sigs-head { display: flex; align-items: center; justify-content: space-between; }
.mail-sigs-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.mail-sigs-box { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.mail-sigs-box h3 { font-size: 14px; font-weight: 700; }
.mail-sig-row { display: grid; grid-template-columns: 200px 1fr; gap: 6px 14px; align-items: start; }
.mail-sig-row .row-actions { grid-column: 2; }
.mail-sig-for { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .mail-sig-row { grid-template-columns: 1fr; } .mail-sig-row .row-actions { grid-column: 1; } }

/* Mail: the signature template and previews */
.sig-template { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sig-edit, .sig-preview { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sig-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.sig-preview-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.sig-preview-picks .small-field { flex: 1 1 140px; min-width: 0; }
.sig-fields summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.sig-fields ul { margin: 8px 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.sig-fields code { font-size: 12px; }
.sig-text { white-space: pre-wrap; font-size: 12.5px; background: var(--sunken); padding: 8px 10px; border-radius: 8px; }
.signature-frame { width: 100%; min-height: 60px; border: 1px solid var(--line); border-radius: 8px; }
.mail-signature .signature-frame { border-style: dashed; }
@media (max-width: 900px) { .sig-template { grid-template-columns: 1fr; } }
.brand-logo-slots { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.brand-logo-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; }
.brand-logo img { height: 32px; width: auto; max-width: 140px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; }
.brand-logo img.dark { background: var(--card); }
.signature-details { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.signature-details .field { flex: 1 1 200px; min-width: 0; }
.sig-which { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sig-which .small-field { min-width: 280px; }
/* Issue watchers and "notify me" bells */
.watchers { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.watchers-faces { all: unset; cursor: pointer; display: inline-flex; align-items: center; }
.watchers-faces .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg, var(--card)); }
.watchers .button.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.watchers-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; max-height: 320px; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.notify-bell { color: var(--faint); }
.notify-bell.on { color: var(--accent); opacity: 1 !important; visibility: visible !important; }
.notify-bell.on svg { fill: currentColor; }
.task-row-tools:has(.notify-bell.on) { opacity: 1; }
.task-row-tools:has(.notify-bell.on) > :not(.notify-bell) { opacity: 0; }
.task-items li:hover .task-row-tools > *, .task-row-tools:focus-within > * { opacity: 1; }
.task-step-head .notify-bell { margin-left: auto; opacity: .55; }
.task-step-head:hover .notify-bell { opacity: 1; }
.task-step-head .notify-bell + .step-paste { margin-left: 2px; }
.input.fit-height { resize: none; overflow: hidden; }
.input.fit-height.resizable { resize: vertical; overflow: auto; }
.add-to-done { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; animation: add-to-pop .25s ease-out; }
.add-to-done.good { background: color-mix(in srgb, var(--ok) 14%, var(--card)); color: var(--ok); }
.add-to-done.bad { background: color-mix(in srgb, var(--bad) 12%, var(--card)); color: var(--bad); }
@keyframes add-to-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.cw-body .md a, .md-task a { -webkit-user-drag: none; user-drag: none; }
.deliverables-bar { align-items: center; gap: 10px; flex-wrap: wrap; }
.deliverables-bar .segmented { margin-left: auto; }
.deliverables-all { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.deliverables-bulk { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.deliverable-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
/* * Room for the title first: "Undo approval" wraps under it on a phone */
.deliverable-head > .deliverable-main { flex: 1 1 220px; min-width: 0; }
/* * On a phone the title gets the row and the status goes under it */
@media (max-width: 560px) {
	.deliverables:not(.tiles) .deliverable-head > button.deliverable-main { flex-wrap: wrap; }
	.deliverables:not(.tiles) .deliverable-head .deliverable-text { flex-basis: calc(100% - 52px); }
	.deliverables:not(.tiles) .deliverable-head .deliverable-main > .status-tag { margin-left: 52px; }
}
.deliverable-pick { margin-top: 12px; flex: none; }

/* * Outreach plan */
.outreach .section { margin-bottom: 18px; }
.outreach > .segmented { margin-bottom: 14px; }
.aud-table .aud-row { cursor: pointer; }
.aud-table .aud-row:hover td { background: var(--page); }
.segments .toolbar .input { width: 200px; }
.split-part { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.aud-yes { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); white-space: nowrap; }
.aud-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.aud-needs { color: var(--warn-text, #9a5b00); font-size: 13px; }
.aud-head { margin-bottom: 14px; }
.aud-head h2 { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.aud-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.aud-strategy { white-space: pre-wrap; font-family: inherit; font-size: 14px; font-weight: 400; margin: 2px 0 12px; }
.aud-sub { margin: 10px 0 2px; font-size: 13px; color: var(--muted); }
.aud-facts { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.org-personal { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; margin-top: 2px; }
.aud-now { color: var(--good-text, #1f7a43); font-weight: 600; font-size: 13.5px; }
.has-helper .aud-savebar { margin-right: 60px; }
.aud-savebar { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 10px 14px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.aud-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
@media (max-width: 960px) { .aud-top { grid-template-columns: minmax(0, 1fr); } }
.aud-year { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 12px 0 14px; }
.aud-wheel { width: min(100%, 440px); }
.aud-wheel svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; font-family: var(--font); }
.wheel-track { fill: none; stroke: var(--sunken); stroke-width: 40; }
.wheel-split { stroke: var(--line); stroke-width: 1; }
.wheel-month { fill: var(--muted); font-size: 11.5px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.wheel-month.now { fill: var(--text); font-weight: 700; }
.wheel-arc { cursor: pointer; outline: none; }
.wheel-arc text { font-size: 11.5px; font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.wheel-arc.season path { fill: var(--line-strong); }
.wheel-arc.season text { fill: var(--text); }
.wheel-arc.talk path { fill: var(--primary); }
.wheel-arc.talk text { fill: var(--on-primary); }
.wheel-arc:hover path { opacity: 0.85; }
.wheel-arc.on path, .wheel-arc:focus-visible path { stroke: var(--focus); stroke-width: 2.5; }
.wheel-arc.talk.on path, .wheel-arc.talk:focus-visible path { stroke: var(--text); }
.wheel-paint { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; pointer-events: none; }
.wheel-today { pointer-events: none; }
.wheel-today path { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.wheel-today circle { fill: var(--text); }
.wheel-date { fill: var(--muted); font-size: 13px; font-weight: 600; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.modal.wheel-edit { width: min(460px, 100%); max-height: 92vh; overflow-y: auto; }
.aud-bar { display: inline-block; border-radius: var(--r-xs); }
.aud-bar.season { background: var(--line-strong); }
.aud-bar.talk { background: var(--primary); }
.aud-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.aud-legend span { display: inline-flex; align-items: center; gap: 6px; }
.aud-legend i.aud-bar { flex: none; width: 14px; height: 14px; }
.loose-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.loose-list .empty-line { margin: 0; }
.loose-list .inline-add { flex: 0 1 420px; flex-wrap: wrap; }
.loose-list .inline-add .input { flex: 1 1 200px; min-width: 0; }
.outreach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; margin-bottom: 14px; }
.outreach-hours .mini-input { width: 64px; }
.outreach-hours { display: inline-flex; align-items: center; gap: 8px; }
.outreach-more { margin: 10px 0; }
.outreach-more > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.outreach-for { font-size: 15px; margin: 16px 0 8px; }
/* * A help icon by a section title, its tooltip floating under the title (the heading's height stays the same) */
.section.has-tip { position: relative; }
.icon-button.small.info-tip { display: inline-grid; width: 32px; height: 32px; margin: -6px 0 -6px 4px; vertical-align: middle; }
.info-tip-text { position: absolute; top: 52px; left: 22px; z-index: 20; width: max-content; max-width: min(400px, calc(100% - 44px)); padding: 8px 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); color: var(--text); font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.info-tip-text[hidden] { display: none; }
.table-wrap + .inline-add, .inline-add + .inboxkit-order, .table-wrap + .table-more { margin-top: 12px; }
.inbox-names { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-bottom: 8px; }
.inbox-names > .field:first-child .input { width: 96px; }
.inbox-names-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox-names-row .input { width: 140px; }
.inbox-names > .run-feedback { align-self: center; }
.inboxkit-review { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-top: 4px; overflow-wrap: anywhere; }
.inboxkit-review p { margin: 0 0 8px; }
.inboxkit-order .row-actions .button { white-space: normal; height: auto; min-height: 38px; text-align: center; }
.inboxkit-orders { margin-top: 16px; }
.inboxkit-orders .table-wrap { margin-top: 8px; }
.outreach-month { margin: 14px 0; }
.outreach-month.past { opacity: .75; }
.outreach-campaign { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 8px; }
.outreach-campaign.s-approved { border-color: var(--ok-line, var(--ok)); }
.outreach-campaign.s-launched { background: var(--sunken); }
.outreach-campaign-head { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand title pill" "brand sub pill"; column-gap: 12px; padding: 10px 14px; }
.outreach-campaign-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--r); }
.outreach-campaign-brand { grid-area: brand; align-self: center; font-size: 12px; font-weight: 650; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; min-width: 80px; }
.outreach-campaign-head strong { grid-area: title; }
.outreach-campaign-head .muted { grid-area: sub; }
.outreach-campaign-head .pill { grid-area: pill; align-self: center; }
.outreach-campaign-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.outreach-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.outreach-steps li { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--sunken); border-radius: var(--r-sm); }
.outreach-subject { margin: 0; font-weight: 600; }
.outreach-body { margin: 0; white-space: pre-wrap; font: inherit; font-size: 14px; }
.outreach-launch { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.outreach-launch h4 { margin: 0; }
.outreach-lists { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.outreach-add-step { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.active-table .num-cell { font-variant-numeric: tabular-nums; }
button.active-update-line { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; font-size: 12.5px; }
button.active-update-line:hover { color: var(--text); text-decoration: underline dotted; }
.active-update-basis { display: block; margin-top: 2px; max-width: 520px; }
.active-update-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; max-width: 520px; }
.active-who.faces .avatar-stack .avatar + .avatar { margin-left: -6px; }
.face-pick { position: relative; display: inline-flex; cursor: pointer; }
.face-pick .face-select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; font-size: 14px; }
.face-pick:focus-within .avatar { box-shadow: 0 0 0 2px var(--primary); }
.avatar.nobody { border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); display: inline-grid; place-items: center; }
.active-other { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.active-other li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; grid-template-areas: "group issue when" "group line line"; column-gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.active-other-group { grid-area: group; font-size: 12px; font-weight: 600; color: var(--muted); }
.active-other a { grid-area: issue; }
.active-other .active-update-line { grid-area: line; max-width: none; }
.active-other .small { grid-area: when; white-space: nowrap; }
.mail-section { display: flex; align-items: center; gap: 10px; }
.mail-section-pick { margin: 0; }
.sig-fill { all: unset; cursor: pointer; border-radius: 4px; }
.sig-fill:hover code, .sig-fill:focus-visible code { background: var(--accent-soft); color: var(--accent); }
.sig-fill:focus-visible { outline: 2px solid var(--focus); }
.mail-box-brand { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--hover); color: var(--muted); font-size: 12px; font-weight: 600; }
.sheet-sort-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.sheet-sort { background: var(--card); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); width: min(560px, 100%); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.sheet-sort-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-sort-head h3 { margin: 0; font-size: 20px; font-weight: 500; }
.sheet-sort-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto 32px; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sheet-sort-label { color: var(--muted); }
.sheet-sort-dir { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sheet-sort-add { align-self: flex-start; }
.sheet-sort-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.sheet-drop-line { position: fixed; background: var(--accent); border-radius: 2px; z-index: 900; pointer-events: none; }
.jss_worksheet > thead > tr > td.selected, .jss_worksheet > tbody > tr > td.jss_row.selected { cursor: grab; }
body.sheet-dragging-rows, body.sheet-dragging-cols, body.sheet-dragging-rows *, body.sheet-dragging-cols * { cursor: grabbing !important; user-select: none; }
.sheet-sort-menu { position: relative; display: inline-flex; }
.sheet-sort-button { width: auto; padding: 0 8px; font-size: 13px; font-weight: 600; }
.sheet-sort-popup { left: 0; right: auto; width: 300px; }
.sheet-sort-popup .menu-item { display: block; white-space: nowrap; }
.sheet-sort-popup .menu-label { margin: 4px 8px 0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.sheet-sort-popup .menu-note { margin: 2px 8px 4px; }
.sheet-sort-popup hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.sheet-history { position: fixed; z-index: 40; width: min(320px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); font-size: 13.5px; }
.sheet-history p { margin: 0; }
.sheet-history-head { display: flex; align-items: center; gap: 2px; }
.sheet-history-head strong { flex: 1; font-size: 14.5px; font-weight: 650; }
.sheet-history-who { display: flex; align-items: center; gap: 8px; }
.sheet-history-who .avatar.xs { margin: 0; flex: none; }
.sheet-history-who > span { display: flex; flex-direction: column; min-width: 0; }
.sheet-history-when { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sheet-history-change { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.sheet-history-change dt { color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.sheet-history-change dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sheet-history-deleted { color: var(--bad); font-weight: 600; }
.active-step-cell { min-width: 220px; }
.active-step-name { display: block; font-size: 12px; font-weight: 650; color: var(--muted); }
.active-step-tasks { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.active-people .active-tools { margin-left: auto; }
.site-audit > .segmented { margin-bottom: 12px; }
.audit-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 12px 0 6px; }
.audit-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.audit-big { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.audit-health.h-good .audit-big { color: var(--ok); }
.audit-health.h-ok .audit-big { color: var(--warn-strong, var(--warn)); }
.audit-health.h-bad .audit-big { color: var(--bad); }
.audit-history span { display: inline-block; margin: 0 4px; font-variant-numeric: tabular-nums; }
.audit-issues { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.audit-issues > li + li { border-top: 1px solid var(--line); }
.audit-issue-head { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; }
.audit-issue-head:hover { background: var(--hover); }
.audit-issue-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.audit-issue-title { font-weight: 600; }
.audit-new { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--bad); text-transform: uppercase; }
.audit-count { font-variant-numeric: tabular-nums; font-weight: 700; }
.audit-issue-body { padding: 0 14px 12px 116px; }
.audit-issue-body p { margin: 0 0 8px; }
.audit-urls { margin: 0; padding-left: 18px; font-size: 13px; columns: 2; }
.audit-urls a { overflow-wrap: anywhere; }
.audit-urls.audit-targets { columns: 1; }
.audit-urls.audit-targets li { margin-bottom: 4px; }
.audit-pages .num { text-align: right; font-variant-numeric: tabular-nums; }
.audit-url { overflow-wrap: anywhere; }
@media (max-width: 760px) { .audit-issue-body { padding-left: 14px; } .audit-urls { columns: 1; } }
.audit-issue-head .pill { justify-self: start; }
.mc-account-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-account-issues li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.mc-account-issues .pill { justify-self: start; }
.mc-product { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.mc-product img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--card); border: 1px solid var(--line); flex: none; }
.mc-products .num { text-align: right; }

/* * Updates: the button at the top (owners) */
.update-button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.update-button.ready { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.update-button.ready:hover { filter: brightness(1.08); }
.update-button.busy { border-color: var(--accent); color: var(--accent); cursor: progress; }
.update-button.busy svg { animation: update-spin 1.4s linear infinite; }
.update-button.failed { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.update-button.on { box-shadow: 0 0 0 2px var(--accent-soft); }
.update-wrap { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin-right: 10px; }
.update-link { font-size: 13px; font-weight: 550; color: var(--accent); text-decoration: none; white-space: nowrap; }
.update-link:hover, .update-link.on { text-decoration: underline; }
.update-icon.on { background: var(--accent-soft); color: var(--accent); }
.update-note { max-width: 280px; font-size: 12.5px; color: var(--bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes update-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .update-button.busy svg { animation: none; } }
/* * Settings → Updates: the Update button while its version goes live (v114): spinning icon, moving stripes */
.button.is-running, .button.is-running:disabled { opacity: 1; cursor: progress; background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: update-stripes 0.9s linear infinite; }
.button.is-running svg { animation: update-spin 1.4s linear infinite; }
@keyframes update-stripes { to { background-position: 28px 0; } }
@media (max-width: 720px) {
	.update-button-label { display: none; }
	.update-button { padding: 0 9px; }
	.update-wrap { gap: 6px; margin-right: 6px; }
	.update-link { display: none; }
	.update-note { max-width: 30vw; }
}

/* Outreach autopilot (outreach_auto.tsx) */
.pb-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-bottom: 10px; }
.pb-controls .field { margin: 0; }
.pb-waiting { border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); padding: 10px 12px; margin: 10px 0 14px; }
.pb-waiting h4 { margin: 0 0 4px; }
.outreach-campaign.pb.s-live { border-color: var(--ok-line, var(--ok)); }
.outreach-campaign.pb.s-paused { border-color: var(--bad, #c33); }
.pb-angle { white-space: pre-wrap; margin: 0; }
.pb-pending p { margin: 0 0 6px; }
.pb-pending details { margin: 6px 0; }
.pb-learned, .pb-log { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.pb-log { list-style: none; padding-left: 0; max-height: 320px; overflow: auto; font-size: 13.5px; }

/* * Settings → Updates: update history */
.update-history { display: flex; flex-direction: column; gap: 6px; }
.update-past { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.update-past.current { border-color: var(--primary); }
/* * The summary stays on the title's line when there's room, else drops under it (phones) */
.update-past summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; cursor: pointer; }
.update-past-line { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-past[open] .update-past-line { white-space: normal; }
.update-past-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; }

/* * The bell: each thing that needs you, linked */
.wn-need-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.wn-need-items a { font-weight: 600; }
.deliverable.linked { box-shadow: 0 0 0 2px var(--primary); }

/* * Issue page (v92): step heads line up with the tasks under them; pencils on hover; bigger checkboxes */
.task-row { grid-template-columns: auto minmax(0, 1fr) auto 150px 108px; }
.task-step-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(150px, auto) 108px; gap: 10px; align-items: center; padding: 5px 6px; }
.task-step-head .step-num { justify-self: center; width: 22px; }
.task-step-head .step-assign { margin-left: 0; max-width: none; width: auto; }
.step-assigns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.task-step-head .step-tools { opacity: 0; }
.task-step-head:hover .step-tools, .task-step-head .step-tools:focus-within, .task-step-head .step-tools:has(.notify-bell.on) { opacity: 1; }
.task-step-head:hover .step-tools > * { opacity: 1; }
.step-name { all: unset; display: inline-flex; align-items: center; min-width: 0; white-space: pre; }
.step-name .rename-pencil, .task-text-wrap .rename-pencil { margin-left: 4px; }
.rename-pencil { opacity: 0; flex: none; }
.task-step-head:hover .rename-pencil, .task-row:hover .rename-pencil, .issue-link:hover .rename-pencil, .rename-pencil:focus-visible { opacity: 1; }
/* * Tools that show on hover stay in view on touch screens, where there is no hover */
@media (hover: none) {
	.rename-pencil, .task-step-head .step-tools, .task-row-tools, .cc-delete, .step-name-add, .file-more,
	.sheet-check, .block-tools, .step-paste, .section-link, .task-step-head .notify-bell { opacity: 1; }
}
.task-text-wrap { display: flex; align-items: center; gap: 2px; min-width: 0; }
.task-rename { height: 30px; font-size: 14px; }
/* * The checkbox's target: the box plus room around it (34 px square) */
.task-check { display: grid; place-items: center; width: 34px; height: 34px; margin: -8px -6px -8px -8px; border-radius: 8px; cursor: pointer; }
.task-check:hover { background: var(--hover); }
.task-check.off { cursor: default; }
.task-check.off:hover { background: none; }
.task-check input[type=checkbox] { cursor: inherit; }
/* * Unfolded task: app and approver as two small pickers */
.task-detail-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-pick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.chip-pick.set { color: var(--text); border-color: var(--line-strong); }
.chip-select { all: unset; cursor: pointer; padding-right: 4px; }
.chip-pick .approver-button { border: 0; background: none; box-shadow: none; height: 28px; padding: 0 4px; font-size: 13px; color: inherit; }
/* * The tasks in the issue bar */
.tasks-now { display: flex; align-items: center; gap: 6px; }
/* * Links workstation */
.issue-links { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; }
.issue-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); }
.issue-link-text { display: flex; align-items: center; gap: 2px; min-width: 0; }
.issue-link-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.issue-link-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.link-add { flex-wrap: wrap; }
.link-add .input:first-child { flex: 2 1 260px; }
.link-add .input { flex: 1 1 160px; }
.links-mentioned summary { cursor: pointer; margin: 8px 0; }
@media (max-width: 760px) {
	.task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
	.task-step-head { grid-template-columns: auto minmax(0, 1fr) auto; }
	.task-step-head > span:empty { display: none; }
	.task-step-head .step-assigns { grid-column: 2 / 3; }
	.task-step-head .step-assign { flex: 1 1 auto; }
	.task-step-head .step-tools { opacity: 1; }
	/* * Narrow: the task's name gets the whole first line; who and the buttons go under it */
	.task-row > .task-text-wrap, .task-row > .task-rename { grid-column: 2 / -1; }
	.issue-link { grid-template-columns: auto minmax(0, 1fr) auto; }
	.issue-link-meta { display: none; }
}

/* * Site audit: every brand in one table (health gauge, changes, history when unfolded) */
.audit-projects { margin: 0 0 18px; }
.audit-projects .table th { white-space: nowrap; }
.audit-project { cursor: pointer; }
.audit-project:hover td { background: var(--hover); }
.audit-project.current td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.audit-project-name { display: flex; align-items: center; gap: 10px; }
.audit-unfold { all: unset; cursor: pointer; display: inline-flex; color: var(--muted); border-radius: 4px; }
.audit-unfold svg { transform: rotate(-90deg); transition: transform .15s; }
.audit-project.open .audit-unfold svg { transform: none; }
.audit-unfold:focus-visible { outline: 2px solid var(--focus); }
.audit-logo { width: 34px; height: 34px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-weight: 700; background: var(--card); border: 1px solid var(--line); }
.audit-logo img { width: 100%; height: 100%; object-fit: contain; }
.audit-project-name > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.audit-project-link { font-weight: 650; font-size: 15px; text-align: left; }
.audit-domain { text-decoration: none; }
.audit-speed-line { white-space: nowrap; }
.speed-table td { vertical-align: top; }
.speed-fixes { margin: 0; padding-left: 18px; }
/* * SEO → Weekly to-do */
.todo-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todo-items li { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.todo-items li:last-child { border-bottom: 0; }
.todo-items p { margin: 6px 0 0; font-size: 14px; }
.todo-items li.done .todo-title { color: var(--faint); text-decoration: line-through; }
.todo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.todo-check { display: flex; align-items: flex-start; gap: 10px; min-height: 32px; cursor: pointer; }
.todo-check input { width: 17px; height: 17px; margin-top: 3px; flex: none; accent-color: var(--primary); }
.todo-title { font-size: 15px; font-weight: 600; }
.todo-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.todo-sub { font-size: 14px; font-weight: 650; margin: 16px 0 8px; }
.audit-score { display: inline-flex; align-items: flex-end; gap: 8px; }
.audit-score-num { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.audit-score-num small { font-size: 13px; margin-left: 2px; color: var(--muted); }
.audit-score.small { font-size: 13px; gap: 6px; align-items: center; }
.audit-gauge { flex: none; }
.audit-gauge .gauge-track, .audit-gauge .gauge-fill { fill: none; stroke-width: 7; stroke-linecap: butt; }
.audit-gauge .gauge-track { stroke: var(--line); }
.audit-gauge.g-good .gauge-fill { stroke: #2e9e5b; }
.audit-gauge.g-ok .gauge-fill { stroke: #8fbf3a; }
.audit-gauge.g-bad .gauge-fill { stroke: #e8743b; }
.audit-change { font-size: 12px; font-weight: 600; white-space: nowrap; margin-left: 4px; }
.audit-change.up { color: #2e9e5b; }
.audit-change.down { color: #d64545; }
.status-tag.audit-done { background: #2e9e5b; color: #fff; border-color: transparent; }
.status-tag .spinner { width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.audit-start { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: #e8743b; }
.audit-start svg { fill: currentColor; }
.audit-off-line { margin: 10px 16px 4px; }
.audit-history-row > td { background: var(--page); padding: 12px 16px 16px 52px; }
.audit-history-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.audit-spark { margin-left: auto; }
.audit-spark polyline { fill: none; stroke: var(--primary); stroke-width: 2; }
.audit-spark circle { fill: var(--primary); }
.kw-trend { display: block; }
.kw-trend rect { fill: var(--primary); }
/* * Site audit: AI readiness and AI visibility */
.ready-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.ready-head .audit-spark { margin-left: 0; }
.ready-group, .vis-title { font-size: 15px; margin: 18px 0 0; }
.vis-confirm { margin: 0 0 8px; }
.vis-brands tr.current td, .vis-voice tr.current td { background: var(--hover); }
.vis-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 12px; }
.vis-counts { list-style: none; margin: 6px 0 0; padding: 0; }
.vis-counts li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.vis-answer { white-space: pre-wrap; }
.vis-details { margin-top: 14px; }
.vis-details > summary { cursor: pointer; margin-bottom: 10px; }
.vis-engine { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.audit-history-table { background: var(--card); }
.audit-report-title { margin: 8px 0 12px; font-size: 18px; }
@media (max-width: 760px) { .audit-history-row > td { padding-left: 12px; } .audit-spark { margin-left: 0; } }
/* * Site audit, always on: the crawl's status and settings, problems grouped by kind, the health trend */
.audit-always-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audit-always-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 10px 0 6px; }
.audit-always-stats dt { font-size: 12px; color: var(--muted); }
.audit-always-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.audit-settings > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.audit-settings-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; }
.audit-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-hours select { width: auto; }
.audit-category { font-size: 15px; margin: 16px 0 0; }
.audit-trend { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.audit-trend .audit-spark { margin-left: 0; }
.audit-spark circle.partial { fill: var(--card); stroke: var(--primary); }
.audit-count .audit-change { margin-left: 6px; }
/* * Approvals (v93): one color for "needs an OK / waiting for one" (amber, shield or clock), red for changes asked */
.ok-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: 1px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); white-space: nowrap; }
.ok-tag.waiting { color: #fff; background: var(--warn-strong); border-color: var(--warn-strong); }
.ok-tag.changes { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.task-step-head > .ok-tag { margin-left: 0; justify-self: end; }
.task-items li.needs-ok > .task-row, .task-items li.waiting-ok > .task-row, .task-items li.changes-ok > .task-row { box-shadow: inset 3px 0 0 var(--warn-strong); }
.task-items li.changes-ok > .task-row { box-shadow: inset 3px 0 0 var(--bad); }
.task-items li.waiting-ok > .task-row { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.ok-hourglass { display: grid; place-items: center; width: 17px; height: 17px; color: var(--warn); }
.final-tag { margin-left: 8px; font-size: 11px; }
/* * The Review step at the end of the tasks */
.review-step { margin-top: 8px; border: 1px dashed var(--warn-line); background: color-mix(in srgb, var(--warn-soft) 40%, transparent); padding: 10px 12px; }
.review-step.r-work { opacity: .75; }
.review-step.r-handin, .review-step.r-issue, .review-step.r-project, .review-step.r-changes { border-style: solid; border-color: var(--warn-strong); }
.review-step.r-approved { border-style: solid; border-color: var(--ok-line); background: var(--ok-soft); }
.review-head { display: flex; align-items: center; gap: 8px; }
.review-head .muted { flex: 1; }
.review-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--warn-strong); color: #fff; }
.r-approved .review-icon { background: var(--ok); }
.review-lines { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.review-lines li { display: flex; align-items: center; gap: 8px; }
.review-lines li.s-later { color: var(--muted); }
.review-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 11px; font-weight: 700; flex: none; }
.review-mark.m-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.review-mark.m-now { background: var(--warn-strong); border-color: var(--warn-strong); color: #fff; }
.review-mark.m-back { background: var(--bad); border-color: var(--bad); color: #fff; }
.review-final { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.review-final a, .review-final .link-button { font-weight: 600; }
.review-note { flex-basis: 100%; font-size: 13.5px; }
.review-changes { display: inline-flex; margin: 8px 0 0; white-space: normal; }
.review-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.review-handin { margin-top: 10px; }
.final-review-switch { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.task-step-head.step-fold { display: flex; width: 100%; }
.task-step-head.step-fold .step-fold-names { flex: 1; }
.task-step-head.step-fold .task-caret { margin-right: -4px; }

/* * Approvals stand out (v94): amber while fresh, red once someone has waited over a day or it's on you */
.appr-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--on-notify); background: var(--notify); border: 1px solid var(--notify); white-space: nowrap; vertical-align: 1px; }
/* * Red only for late: waiting too long, and filled when it's waiting on you */
.appr-badge.late { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.appr-badge.mine.late { color: #fff; background: var(--bad); border-color: var(--bad); }
.appr-badge.compact { margin: 0; padding: 0 5px; font-size: 10.5px; gap: 2px; }
.appr-age { font-weight: 500; }
.station .appr-badge { margin: 4px 0 0; align-self: flex-start; }
.station-text { display: flex; flex-direction: column; }
.station-appr { position: absolute; right: -10px; top: -8px; }
.station-icon { position: relative; }
.appr-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid var(--warn-strong); color: var(--warn); }
.appr-banner > span { flex: 1; color: var(--text); }
.appr-banner.late { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.nav-count.appr { background: var(--notify); color: var(--on-notify); }
.nav-count.appr.late { background: var(--bad); }
.comment-about { display: inline-flex; align-items: center; gap: 3px; color: var(--warn); }
.my-approval { flex-wrap: wrap; }
.my-approval > svg { color: var(--warn); }
/* * Active tasks: the state filter */
.active-states { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-approval.on { background: var(--warn-strong); border-color: var(--warn-strong); color: #fff; }
.chip-approval svg { margin-right: 3px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
/* * Projects page */
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; text-decoration: none; }
.project-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.project-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 16px; }
.project-card-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-stats { display: flex; gap: 12px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.project-card-appr { display: flex; align-items: center; gap: 6px; }
.project-card-appr .appr-badge { margin-left: 0; }
.project-card-progress { display: flex; flex-direction: column; gap: 4px; }
.project-card-people { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-card-people > span { display: inline-flex; align-items: center; gap: 6px; }
.bad-text { color: var(--bad); }
/* * Approvals queue */
.queue-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.queue-bar .appr-badge { margin-left: auto; }
.queue-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.queue-work { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-height: 60vh; display: flex; flex-direction: column; gap: 12px; }
.queue-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-title h2 { margin: 0; font-size: 18px; }
.queue-preview { flex: 1; display: flex; border-radius: 10px; background: var(--page); min-height: 50vh; }
.queue-preview.image { align-items: center; justify-content: center; padding: 10px; }
.queue-preview.image img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.queue-preview.pdf { width: 100%; height: 70vh; border: 0; }
.queue-preview.video { width: 100%; max-height: 70vh; }
.queue-preview.note { display: block; padding: 18px 20px; overflow: auto; max-height: 70vh; font-size: 15px; }
.queue-preview.other { flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; }
.queue-link { word-break: break-all; font-weight: 600; }
.queue-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--topbar) + 12px); }
.queue-side > * { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.queue-context { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.queue-issue { font-weight: 700; }
.queue-context p { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.queue-task { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--warn-strong); background: var(--page); border-radius: 6px; width: 100%; box-sizing: border-box; }
.queue-earlier ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.queue-earlier summary { cursor: pointer; }
.queue-comments { display: flex; flex-direction: column; gap: 8px; }
.queue-comment { display: flex; gap: 8px; }
.queue-comment > div { min-width: 0; }
.queue-comment-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.queue-comment-form textarea { width: 100%; box-sizing: border-box; }
.queue-decide { display: flex; flex-direction: column; gap: 8px; border-color: var(--warn-strong) !important; }
.queue-decide textarea { width: 100%; box-sizing: border-box; }
.queue-decide-buttons { display: flex; gap: 8px; }
/* * Photos sent with "Request changes": while writing the note, and under the note afterward */
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.photo-row img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.photo-staged { position: relative; }
.photo-staged .icon-button { position: absolute; top: -6px; right: -6px; background: var(--surface, #fff); border-radius: 50%; }
.queue-decide-buttons .button { flex: 1; justify-content: center; }
.queue-decide kbd, .approvals-queue .page-intro kbd { font: 11px ui-monospace, monospace; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; opacity: .7; margin-left: 4px; }
.queue-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 20px; text-align: center; color: var(--ok); }
.queue-empty h2 { color: var(--text); margin: 0; }
@media (max-width: 960px) {
	.queue-main { grid-template-columns: minmax(0, 1fr); }
	.queue-side { position: static; }
}
.active-states .chip { flex-direction: row; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: var(--raised); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.active-states .chip:hover:not(.on) { border-color: var(--accent-line); }
.active-states .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.active-states .chip.chip-approval:not(.on) { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.active-states .chip.chip-approval.on { background: var(--warn-strong); border-color: var(--warn-strong); }
.station .appr-badge { white-space: normal; max-width: 100%; }
.station .appr-badge .appr-age { display: none; }
.nav-count.appr { min-width: 18px; padding: 0 6px; border-radius: 999px; font-weight: 700; font-size: 11.5px; line-height: 18px; text-align: center; }

/* * Answers: approved answers, unanswered questions */
.answers-bar { margin-bottom: 10px; }
.answer-list, .unanswered-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.answer-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.answer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.answer-head strong { font-size: 15px; }
.answer-brands { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.answer-also { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.answer-text { margin: 0; white-space: pre-wrap; }
.answer-spoken { margin: 0; color: var(--muted); display: flex; gap: 6px; align-items: baseline; }
.answer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.web-status { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.web-status p { margin: 0; }
.web-status-numbers { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
.web-status-numbers strong { font-size: 1.25rem; margin-right: 4px; }
.web-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.web-switch .button { margin-left: auto; }
.web-card.is-hidden { opacity: 0.6; }
.web-card .answer-foot a { color: inherit; text-decoration: underline; }
.answer-editor { margin: 0 0 16px; padding: 14px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 10px; }
.answer-editor h3 { margin: 0; }
.unanswered-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.unanswered-from { color: var(--muted); display: inline-flex; }
.unanswered-q { display: flex; flex-direction: column; gap: 2px; }
.unanswered-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.unanswered-proposed { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mail-feed { display: flex; flex-direction: column; gap: 14px; }
.mail-feed > * { margin: 0; }
@media (max-width: 700px) { .unanswered-list li { grid-template-columns: auto minmax(0, 1fr); } .unanswered-list li > .row-actions, .unanswered-list li > .link-button { grid-column: 2; } }

/* * v100: the end of an issue: hand-in, then Review and Finalize steps */
.end-handin, .end-step { margin-top: 8px; }
.end-handin { border: 1px solid var(--warn-strong); background: color-mix(in srgb, var(--warn-soft) 40%, transparent); padding: 10px 12px; }
.end-step { padding: 8px 10px; border-left: 3px solid var(--warn-strong); }
.end-step.step-done { border-left-color: var(--ok); }
.end-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0 6px; }
.end-head .end-people { margin-left: auto; }
.end-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.end-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.end-row.here { border-color: var(--warn-strong); }
.end-row.back { border-color: var(--bad); }
.end-row-title { flex: 1; min-width: 0; }
.end-row-title a, .end-row-title .link-button { font-weight: 600; }
.end-row .ok-tag, .end-row .status-tag { margin-left: 0; }
.end-row-actions { display: inline-flex; gap: 6px; }
.end-why { flex-basis: 100%; }
.end-send { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.end-handin .handin-form { margin-top: 8px; }
.step-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 6px 2px 40px; }
.step-add-link { display: inline-flex; align-items: center; gap: 4px; }
.step-add { flex: 1 1 100%; flex-wrap: wrap; }
.step-add > .input:first-child { flex: 1 1 260px; }
.task-steps.single .step-foot { padding-left: 38px; }
.end-later { margin: 0 0 2px 30px; }
/* * v137: Review, Finalize and Ship's own tasks and checklist, and the note on what still holds the step */
.end-items { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0 30px; }
.end-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.end-task { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.end-task.done .end-task-text { color: var(--muted); text-decoration: line-through; }
.end-task-text { flex: 1; min-width: 0; }
.end-checklist textarea { width: 100%; }
.end-held { margin: 8px 0 0 30px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: 13.5px; }

/* ---- Audience → Sequence (v107): steps on a timeline, A and B side by side ---- */
.seq { display: flex; flex-direction: column; gap: 14px; }
.seq-picks, .seq-season { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.aud-wave-tests { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.state-chip.seq-pick { height: auto; min-height: 32px; padding: 1px 1px 1px 10px; cursor: default; max-width: 100%; }
.seq-pick a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-pick .mini-input { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.seq-season { gap: 8px; }
.seq-season .input { min-width: 0; width: 96px; font-variant-numeric: tabular-nums; }
.seq-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; background: var(--page); }
.seq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seq-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); border-radius: 999px; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.seq-chip:hover { border-color: var(--accent); }
.seq-chip.thin { background: var(--sunken); border-color: var(--line); color: var(--muted); }
.seq-chip-n { font-family: inherit; font-size: 11px; color: var(--muted); }
.seq-lead { max-width: 420px; }
.seq-legend { margin: -6px 0 0; }
.seq-timeline { display: flex; flex-direction: column; }
.seq-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.seq-timeline.two .seq-row { grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr); }
.seq-row:not(.seq-heads):not(.seq-foot):not(.seq-ask)::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.seq-row:nth-last-child(1 of .seq-row:not(.seq-heads):not(.seq-foot):not(.seq-ask))::before { display: none; }
.seq-heads { padding-bottom: 8px; }
.seq-arm-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--sunken); }
.seq-arm-head.ahead { background: var(--ok-soft); }
.seq-arm { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; background: var(--info); margin-right: 4px; }
.seq-arm.arm-B { background: var(--accent); }
.seq-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; position: relative; z-index: 1; }
.seq-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-strong); font-weight: 700; font-size: 13px; }
.seq-day { font-size: 12px; font-weight: 600; white-space: nowrap; }
.seq-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.seq-card.seq-none { justify-content: center; align-items: center; background: transparent; border-style: dashed; }
.seq-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seq-card-head .mini-input { width: 56px; }
.seq-remove { margin-left: auto; }
/* A step sending an email template: the template's text, shown as it is there */
.seq-card.linked { background: var(--sunken); border-color: var(--accent-soft); }
.seq-linked { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.seq-linked span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-card-head .seq-email { width: auto; max-width: 100%; }
.seq-thread { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--info-soft); color: var(--info); }
.seq-subject-read { margin: 0; font-weight: 600; }
.seq-body-read { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.seq-body { font-size: 14px; line-height: 1.5; }
.seq-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 0 3px; border-radius: 4px; background: var(--accent-soft); }
.seq-token.unknown { background: var(--warn-soft); color: var(--warn-ink, var(--text)); }
.seq-fill { background: var(--ok-soft); border-radius: 3px; padding: 0 2px; }
.seq-missing { background: var(--bad-soft); color: var(--bad); border-radius: 3px; padding: 0 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.seq-foot-add { grid-column: 2 / -1; }
.seq-ask .inline-add { margin: 0; }
.seq-ask .inline-add .input { flex: 1; min-width: 0; }
.seq-empty { display: flex; flex-direction: column; gap: 10px; }
.seq-ghost { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; opacity: .6; }
.seq-ghost li { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); }
.seq-ghost .seq-day { width: 52px; }
@media (max-width: 860px) {
	.seq-timeline.two .seq-row { grid-template-columns: 46px minmax(0, 1fr); }
	.seq-timeline.two .seq-row > :nth-child(3) { grid-column: 2; }
	.seq-row { grid-template-columns: 46px minmax(0, 1fr); }
	.seq-row::before { display: none; }
}
.seq .link-button { display: inline-flex; align-items: center; gap: 4px; }

/* * Email on Amazon SES (email_blast.tsx) */
.section-heading { font-size: 15px; margin: 20px 0 8px; }
.blast-sends td { vertical-align: top; }
.blast-sends .sub-row td, .table .sub-row td { background: var(--sunken); border-top: 0; }
.blast-progress { display: block; width: 100%; max-width: 140px; height: 5px; margin-top: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.blast-progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.blast-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.blast-domains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.blast-domains > li { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.blast-test { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.blast-test .row-actions { flex-wrap: wrap; }
.dns-records, .auth-days { margin-top: 8px; }
.dns-records code { font-size: 12px; word-break: break-all; }
.blast-add, .blast-form-code { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.input.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.blast-new-list { margin-top: 12px; }
.blast-new-list .input { min-width: 260px; }
.blast-pick { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; }
.blast-warnings { margin: 6px 0 0; padding-left: 18px; }

/* ============================================================ Projects tutorial (the tour on My work) */
.tutorial-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tutorial-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tutorial-replay { display: inline-flex; align-items: center; gap: 4px; }
.tutorial-controls .run-feedback { text-align: right; font-size: 12.5px; }
.tour-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.tour-scrim { position: fixed; inset: 0; background: rgba(10, 14, 20, 0.45); pointer-events: auto; }
.tour-spot { position: fixed; border-radius: var(--r-sm); box-shadow: 0 0 0 9999px rgba(10, 14, 20, 0.45); outline: 2px solid var(--primary); pointer-events: none; transition: top 0.15s, left 0.15s, width 0.15s, height 0.15s; }
.tour-box { position: fixed; width: min(400px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); pointer-events: auto; animation: pop 0.15s ease-out; }
.tour-box.centered { top: 50%; left: 50%; transform: translate(-50%, -50%); max-height: calc(var(--vh) - 24px); overflow: auto; animation: none; }
.tour-box.practice { width: min(620px, calc(100vw - 24px)); }
.tour-box h2 { font-size: 17px; margin: 0; }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-count { font-size: 12px; font-weight: 650; color: var(--muted); }
.tour-text { margin: 0; font-size: 14px; line-height: 1.5; }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.tour-practice { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--sunken); }
.tour-practice-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-practice .run-feedback { margin: 0; }
.tour-box > .run-feedback { margin: 0; }
/* * The demo issue the tour walks through: a pretend issue page over the whole screen */
.tour-demo { position: fixed; inset: 0; overflow: auto; overscroll-behavior: contain; background: var(--page); pointer-events: auto; }
.tour-demo-page { max-width: 1240px; margin: 0 auto; padding: 16px 20px 45vh; }
.tour-demo-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.tour-demo .field-select { display: inline-flex; align-items: center; cursor: default; }
.tour-demo .station-rail { top: 14px; }
.tour-demo .rail-shrink, .tour-demo .rail-shrink:hover { cursor: default; background: none; color: var(--faint); }
.tour-demo .task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.tour-demo-table { border-collapse: collapse; font-size: 13.5px; }
.tour-demo-table th, .tour-demo-table td { padding: 4px 12px; border: 1px solid var(--line); text-align: left; }
.tour-demo-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-demo-chat p { margin: 0 0 8px; font-size: 14px; }
.tour-demo-chat strong { margin-right: 6px; }

/* * Timesheet (components/timesheet.tsx) */
.ts-clock { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.button.ts-big { height: 56px; padding: 0 28px; font-size: 17px; font-weight: 600; gap: 8px; }
.ts-clock-state { display: flex; flex-direction: column; gap: 3px; }
.ts-today-list { margin: 4px 0 0; padding-left: 18px; }
.ts-period-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ts-table tr.ts-today td { background: var(--accent-soft); }
.ts-table tfoot th { border-top: 2px solid var(--line-strong); }
.ts-punch { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.ts-form { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; }
.ts-form-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.ts-zone { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ts-zone select { width: auto; max-width: 260px; }
.small-field.ts-note .input { height: auto; min-height: 56px; width: 100%; max-width: 640px; }
.ts-form .quick-add-actions, .ts-sheet .quick-add-actions { flex-wrap: wrap; }
/* * On a phone: the clock buttons share the width, the form's fields and the day table fit without scrolling sideways, taps are at least 36px */
@media (max-width: 560px) {
	.button.ts-big { flex: 1 1 140px; padding: 0 16px; }
	.ts-clock-state { flex-basis: 100%; }
	.ts-form-row .small-field { flex: 1 1 140px; }
	.ts-form-row .small-field .input { min-width: 0; width: 100%; height: 40px; }
	.ts-zone { display: flex; }
	.ts-zone select { flex: 1 1 180px; min-width: 0; max-width: 100%; }
	.ts-table th, .ts-table td { padding-inline: 8px; }
	.ts-table td.nowrap:first-child { white-space: normal; }
	.ts-table td:first-child strong { white-space: nowrap; }
	.ts-table .link-button { min-height: 36px; }
	.ts-sheet .button.small, .ts-form .button.small, .ts-zone .button.small { height: 36px; }
}

/* * Legal (legal.tsx), and who has it on Settings → Apps */
.app-access { margin-top: 14px; }
.app-access .muted.small { margin: 2px 0 6px; }
.legal-table .legal-bottom { font-size: 13px; color: var(--muted); }
.legal-file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.legal-chat { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legal-chat li { padding: 10px 14px; border-radius: var(--r); background: var(--sunken); }
.legal-chat li.person { background: var(--accent-soft); margin-left: 12%; }
.legal-chat li.counsel { margin-right: 12%; }
.legal-who { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 650; }
.legal-said, .legal-brief { margin: 0; white-space: pre-wrap; }
.legal-docs { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.legal-docs li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.legal-docs-head { margin-top: 14px; }
.legal-own { margin: 0 0 16px; }
.legal-setup { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 16px; margin-bottom: 14px; }
.legal-setup .field.wide { grid-column: 1 / -1; }
.legal-specialists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; margin: 6px 0 12px; }
.legal-specialist { align-items: flex-start; white-space: normal; }
.legal-specialist input { margin-top: 2px; flex: none; }
.legal-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legal-issue { padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r); }
.legal-issue.risk-high { border-left-color: var(--bad); }
.legal-issue.risk-medium { border-left-color: var(--warn); }
.legal-issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legal-issue .muted.small { margin: 4px 0 6px; }
.legal-issue-body { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13.5px; }
.legal-issue-body dt { color: var(--muted); font-weight: 600; }
.legal-issue-body dd { margin: 0; }
.legal-fold { margin-top: 12px; }
.legal-fold summary { cursor: pointer; color: var(--accent); font-size: 13.5px; }
.legal-memo { margin-top: 10px; }
@media (max-width: 760px) {
	.legal-setup, .legal-issue-body { grid-template-columns: 1fr; }
	.legal-chat li.person, .legal-chat li.counsel { margin-left: 0; margin-right: 0; }
}

/* * Documents: the contract library (components/documents.tsx) */
.docs-page.docs-drop { outline: 2px dashed var(--brand); outline-offset: 6px; border-radius: var(--r-lg); }
.docs-progress, .docs-import { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; margin: 0 0 16px; }
.docs-import-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.docs-import-head .progress { flex: 1; }
.docs-import-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.docs-import-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.docs-bar .docs-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.docs-sub { font-weight: 400; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-file { margin-right: 4px; }
.docs-head-pills { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.docs-entry { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 36%, 480px); gap: 0 20px; align-items: start; }
.docs-main { min-width: 0; }
.docs-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.docs-meta[hidden] { display: none; }
.docs-title-row { display: flex; align-items: flex-end; gap: 8px; }
.docs-title-row .small-field { flex: 1 1 auto; min-width: 0; }
.docs-title-row .small-field .input { width: 100%; }
.docs-sticky { position: sticky; top: var(--topbar); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 10px; padding: 8px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.docs-sticky .row-actions, .docs-sticky .docs-text-actions, .docs-sticky .docs-tools { margin: 0; }
@media (max-width: 760px) {
	.docs-sticky { flex-wrap: nowrap; overflow-x: auto; gap: 8px; }
	.docs-sticky > *, .docs-sticky .docs-align { flex: none; flex-wrap: nowrap; }
	.docs-sticky .button { white-space: nowrap; }
}
textarea.input.docs-editor { width: 100%; min-height: 60vh; }
.docs-editor.justify { text-align: justify; }
.docs-side { position: sticky; top: calc(var(--topbar) + 16px); max-height: calc(var(--vh) - var(--topbar) - 32px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; min-width: 0; overflow-wrap: anywhere; }
.docs-side .input, .docs-side select, .docs-side .mini-select, .docs-side .mini-input { max-width: 100%; min-width: 0; }
.docs-side .row-actions { flex-wrap: wrap; }
.docs-text { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 32px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.docs-text-table td { height: 44px; vertical-align: middle; }
.docs-page-break { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.docs-page-break::before, .docs-page-break::after { content: ''; flex: 1; border-top: 1px dashed var(--line-strong); }
.docs-tools { gap: 6px; margin-bottom: 8px; }
.docs-tools .docs-tool-bold { font-weight: 700; }
.docs-tools .docs-tool-italic { font-style: italic; }
.docs-tools .docs-tool-underline { text-decoration: underline; }
@media print { .docs-page-break { break-before: page; height: 0; margin: 0; visibility: hidden; } .docs-text { border: 0; padding: 0; } }
.docs-field-on { outline: 2px solid var(--focus); outline-offset: 2px; background: var(--warn-soft); color: var(--text); }
textarea.input.docs-label { height: auto; min-height: 30px; field-sizing: content; resize: none; flex: 1 1 100%; padding: 5px 8px; line-height: 1.4; max-width: none; }
textarea.input.docs-grow { field-sizing: content; min-height: 4.5em; resize: vertical; }
.docs-spots { display: inline-flex; align-items: center; gap: 2px; }
.docs-spots .icon-button { width: 30px; height: 30px; }
.docs-blank-label { flex: 1 1 140px; min-width: 0; font-size: 13.5px; }
.docs-text h2 { font-size: 18px; text-align: center; margin: 0 0 16px; }
.docs-text h3 { font-size: 15px; margin: 18px 0 8px; }
.docs-text h4 { font-size: 14px; margin: 14px 0 6px; font-style: italic; }
.docs-text p { margin: 0 0 10px; }
.docs-text .docs-li { display: flex; gap: 10px; }
.docs-text .docs-num { flex: none; min-width: 2em; font-weight: 600; }
.docs-text .docs-li-text { flex: 1; min-width: 0; }
.docs-text .docs-logo { display: block; max-width: 240px; max-height: 72px; margin: 0 auto 20px; }
.docs-align { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.docs-text-table { border-collapse: collapse; margin: 0 0 12px; width: 100%; font-size: 13px; }
.docs-text-table th, .docs-text-table td { border: 1px solid var(--line-strong); padding: 6px 8px; text-align: left; vertical-align: top; }
.docs-text-table th { background: var(--sunken); }
.docs-field-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.92em; }
.docs-text-actions { margin: 0 0 10px; }
.docs-fields { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.docs-fields li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.docs-fields .mini-input { flex: 1 1 140px; }
.docs-fields .docs-key { flex: 1 1 100%; max-width: none; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.docs-fields .docs-choices { flex: 1 1 100%; max-width: none; }
.docs-make, .docs-blanks { display: grid; gap: 8px; }
.docs-files, .docs-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docs-files li, .docs-history li { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.docs-files a { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.docs-join { display: grid; gap: 6px; margin-top: 14px; }
.docs-picked { align-items: center; margin: 0 0 10px; }
/* the form filler (components/form_filler.tsx): what went where beside the filled form */
.form-fill { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 16px; align-items: start; }
.form-fill .form-preview { grid-column: 1; grid-row: 1; }
.form-fill .form-fields { grid-column: 2; grid-row: 1; }
.content:has(.form-fill) .page-header { min-height: 0; margin-bottom: 10px; align-items: center; }
.content:has(.form-fill) .page-header h1 { font-size: 20px; }
.content:has(.form-fill) .page-header > div:first-child { display: flex; align-items: baseline; gap: 2px 12px; flex: 1 1 auto; min-width: 0; }
.content:has(.form-fill) .page-header > div:first-child > * { flex: none; margin: 0; }
.content:has(.form-fill) .page-header > div:first-child > h1 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content:has(.form-fill) .page-header .page-intro { font-size: 13px; }
.form-zoom { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.form-doc { height: calc(var(--vh) - var(--topbar, 64px) - 150px); min-height: 420px; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; padding: 12px; background: var(--sunken); border-radius: var(--r); }
/* the pages are the zoom's percent of the area's own width (a fixed width, so the page can't grow itself) */
.form-preview .pdf-pages { width: 100%; }
.form-doc .pdf-page { max-width: none; flex: none; margin-inline: auto; }
.form-fields .table th, .form-fields .table td { padding-inline: 10px; }
.form-fields .table td.strong { min-width: 90px; overflow-wrap: anywhere; }
.form-fields .table .pill { white-space: normal; }
.form-fill .table td .input { width: 100%; min-width: 120px; }
.form-fill .check-chip { margin-top: 6px; }
.form-value { background: var(--accent-soft); color: var(--text); border-radius: var(--r-xs); padding: 0 4px; }
.form-answer { display: flex; align-items: center; gap: 6px; }
.form-fill .form-answer .input { flex: 1; width: auto; }
.form-more { margin: 12px 0 16px; }
.form-more > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 6px 0; }
.form-more[open] > summary { margin-bottom: 8px; }
/* answers drawn over a PDF page while they're typed: drag to move, the corner to resize */
.form-over { position: absolute; inset: 0; container-type: inline-size; overflow: hidden; }
.form-answer-box { position: absolute; display: inline-block; white-space: nowrap; line-height: 1.25; padding: 0 2px; background: var(--accent-soft); color: var(--text); border-radius: var(--r-xs); outline: 1px dashed var(--accent); cursor: grab; touch-action: none; user-select: none; }
.form-answer-box.dragging { cursor: grabbing; outline-style: solid; }
.form-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--primary); border-radius: var(--r-xs); cursor: nwse-resize; touch-action: none; }
.form-answer-box.picture { padding: 0; line-height: 0; background: transparent; }
.form-answer-box img { display: block; width: 100%; height: auto; pointer-events: none; }
.form-answer-box input { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; margin: 0; min-width: 4ch; outline: none; cursor: text; user-select: text; }
.form-over.adding { cursor: crosshair; }
.form-add { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.form-add .button.small[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.form-drop { position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; display: grid; place-items: center; padding: 0; background: var(--raised); color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
/* a person's own signature and initials: the dialog that makes them, and how they show in the table */
.form-marks { max-height: calc(var(--vh) - 32px); overflow-y: auto; }
.form-mark-editor { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.form-mark-editor h3 { font-size: 14.5px; font-weight: 600; }
.form-mark-editor + .form-mark-editor { padding-top: 14px; border-top: 1px solid var(--line); }
.form-pad { width: 100%; max-width: 420px; background: var(--sunken); border: 1px solid var(--line-strong); border-radius: var(--r-sm); touch-action: none; cursor: crosshair; }
.form-mark-now { display: flex; align-items: center; gap: 8px; }
.form-mark-img { display: block; height: 40px; max-width: 200px; object-fit: contain; }
.form-mark-text { font-style: italic; font-size: 18px; color: var(--text); overflow-wrap: anywhere; }
.dark .form-pad, .dark .form-mark-img { filter: invert(1); }
.form-fact-value { white-space: pre-wrap; overflow-wrap: break-word; min-width: 120px; }
@media (max-width: 1000px) {
	.docs-entry { grid-template-columns: 1fr; }
	.form-fill { grid-template-columns: minmax(0, 1fr); }
	.content:has(.form-fill) .page-header > div:first-child { flex-wrap: wrap; max-width: 100%; }
	.form-fill .form-preview, .form-fill .form-fields { grid-column: 1; grid-row: auto; }
	.form-doc { height: 70vh; }
	.docs-text { padding: 16px; }
	.docs-side { position: static; max-height: none; overflow: visible; }
}
/* Company facts on a phone: each entry a small card (name, value, then its tag and buttons on one line) */
@media (max-width: 640px) {
	.form-facts thead, .form-facts .form-fact-updated { display: none; }
	.form-facts tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
	.form-facts tr:last-child { border-bottom: 0; }
	.form-facts td { padding: 0; border-bottom: 0; }
	.form-facts td:nth-child(-n+2) { flex-basis: 100%; min-width: 0; }
	.form-facts td .input { width: 100%; }
	.form-facts td.row-actions { margin: 0 0 0 auto; }
}

/* ============================================================ customer side (components/customer_app.tsx) and Settings → Customers */

.cust-tabs { display: flex; align-items: stretch; gap: 6px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cust-tabs::-webkit-scrollbar { display: none; }
.cust-tabs .app-tab, .cust-topbar > .icon-button, .cust-topbar > .button { flex: none; }
.cust-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cust-name { font-weight: 600; font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-content { margin: 0 auto; width: 100%; }
.cust-kids { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cust-login { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cust-login .button { text-decoration: none; }
.cust-kid-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-kid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; padding: 10px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cust-kid:hover { background: var(--hover); border-color: var(--line-strong); }
.cust-kid > span:last-child { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.cust-photo > .avatar { margin-right: 6px; }
.cust-status { margin-bottom: 12px; }
.cust-enroll { align-items: flex-start; text-align: left; margin-bottom: 14px; }
.cust-pics { display: flex; flex-wrap: wrap; gap: 6px; }
.cust-pic { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--muted); cursor: pointer; }
.cust-pic:hover { background: var(--hover); color: var(--text); }
.cust-pic.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cust-row-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cust-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 16px; }
.cust-cards > .section { margin-bottom: 0; min-width: 0; }
.cust-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.cust-shortcut { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.cust-shortcut:hover { background: var(--hover); border-color: var(--line-strong); color: var(--text); }
.cust-shortcut > svg { flex: none; margin-top: 3px; color: var(--accent); }
.cust-shortcut > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cust-shortcut strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-shortcut span span { color: var(--muted); font-size: 13px; }
.cust-link-copy { margin-top: 12px; text-align: left; white-space: normal; }
@media (max-width: 640px) { .cust-name, .cust-topbar .brand-name { display: none; } }

/* ============================================================ the public website (armada/site.ts) */

body.site { display: flex; flex-direction: column; min-height: var(--vh); }
.site-inner { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.site-staff { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; }
.site-staff a { font-weight: 600; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .site-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 17px; font-weight: 700; text-decoration: none; }
.site-brand img { width: 32px; height: 32px; border-radius: var(--r-xs); flex: none; }
.site-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px; color: var(--muted); font-weight: 550; text-decoration: none; }
.site-nav a:hover { background: var(--hover); color: var(--text); }
.site-nav a[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }
.site-member { display: flex; align-items: center; gap: 8px; min-width: 0; }
.site-member .button { text-decoration: none; }
.site-member-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.site-main { flex: 1; padding-top: 32px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.site-page-head h1 { font-size: 26px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.site-page-head p { margin-top: 6px; color: var(--muted); }
.site-block { display: flex; flex-direction: column; gap: 12px; }
.site-block h2 { font-size: 17px; font-weight: 650; }
.site-block h3 { font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.site-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.site-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); text-decoration: none; min-width: 0; }
.site-card:hover { border-color: var(--line-strong); background: var(--hover); color: var(--text); }
.site-card h2 { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.site-card p { color: var(--muted); font-size: 14px; }
.site-meta { color: var(--muted); font-size: 13px; font-weight: 600; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px; }
.site-links .button { text-decoration: none; }
.site-text { display: flex; flex-direction: column; gap: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.site-text h2 { font-size: 17px; font-weight: 650; margin-top: 10px; }
.site-text h3 { font-size: 16px; font-weight: 650; margin-top: 6px; }
.site-text h4 { font-size: 14.5px; font-weight: 650; }
.site-text ul, .site-text ol { margin: 0; padding-left: 22px; }
.site-text img { max-width: 100%; height: auto; border-radius: var(--r); }
.site-facts { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 10px 20px; margin: 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 640px; }
.site-facts dt { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.site-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.site-main .table td { font-variant-numeric: tabular-nums; }
.site-footer { background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.site-footer .site-inner { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; }
.site-footer a { color: var(--muted); }
.site-menu-row { margin-bottom: 8px; }
.site-menu-row .input { flex: 1; min-width: 160px; }
.site-share-preview { width: 120px; height: 63px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-xs); }
@media (max-width: 560px) {
	.site-inner { padding: 0 16px; }
	.site-main { padding-top: 24px; }
	.site-facts { grid-template-columns: 1fr; gap: 2px; }
	.site-facts dd { margin-bottom: 8px; }
}

/* Players (modules/players): a gamer tag with its picture, on the website and the profile pages */
.pl-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; color: var(--text); }
.pl-who > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-who .avatar { flex: none; width: 28px; height: 28px; }
.pl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.pl-head p { color: var(--muted); overflow-wrap: anywhere; }
.pl-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* A player's dashboard cards on Home (/my) */
.pl-dash-who { display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 12px; }
.pl-dash-who .avatar { flex: none; }
.pl-dash-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pl-dash-list li { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.pl-dash-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ============================================================ Homestead (Inventory and Food log) */
.hs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.hs-row.editing { display: block; background: var(--sunken); }
.hs-row.editing .run-row { margin-top: 16px; }
.hs-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hs-name { font-weight: 600; }
.hs-meta { color: var(--muted); font-size: 13px; }
.hs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-filter { margin-bottom: 14px; }
.hs-form .toggle { margin-top: 16px; }
.hs-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.hs-day-label { min-width: 110px; text-align: center; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hs-goal { margin-bottom: 16px; }
.hs-goal-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.hs-goal-row .field { flex: 0 1 220px; }
.hs-totals .kpi-value, .hs-goal .progress-text { font-variant-numeric: tabular-nums; }
.hs-add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.hs-add-ways { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; flex: 1 1 auto; min-width: 0; max-width: 480px; }
.hs-add-bar .select { flex: 0 1 240px; min-width: 0; }
.hs-add-bar .select select { width: 100%; }
.hs-add-ways .button { flex-direction: column; gap: 2px; min-width: 0; height: auto; min-height: 56px; padding: 6px 4px; font-size: 12.5px; }
.hs-add-ways .button > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hs-add-ways .button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.hs-add-quick { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.hs-add-open { display: flex; flex-direction: column; gap: 12px; }
.hs-add-quick { width: 100%; min-width: 0; }
.hs-entry { flex-wrap: nowrap; padding-right: 6px; }
.hs-entry .hs-main { flex: 1 1 auto; }
.hs-entry .hs-name, .hs-entry .hs-meta { overflow-wrap: anywhere; }
.hs-icons { flex: none; display: flex; }
.hs-item { flex-wrap: nowrap; align-items: flex-start; padding: 8px 6px 8px 14px; }
.hs-item .hs-main { flex: 1 1 auto; padding-top: 4px; }
.hs-quick { flex: none; display: flex; }
.hs-soon { margin-bottom: 16px; }
.hs-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hs-plus { width: 38px; padding: 0; }
.hs-add-panel { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; padding: 14px; border-radius: var(--r); background: var(--sunken); }
.hs-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hs-way { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; font: inherit; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; }
.hs-way:hover:not(:disabled) { background: var(--hover); }
.hs-way.on { border-color: var(--accent); background: var(--accent-soft); }
.hs-way:disabled { color: var(--muted); cursor: not-allowed; }
.hs-way .icon { flex: none; margin-top: 2px; color: var(--accent); }
.hs-way > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-added { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.hs-added h3 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.hs-added .run-row { margin-top: 12px; }
.hs-shop-add { margin-top: 20px; }
.hs-fav { align-items: flex-start; }
.hs-fav .hs-main { flex-basis: 180px; }
.hs-photo { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }
.hs-notes { font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.hs-photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
@media (max-width: 760px) {
	.hs-ways { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.hs-actions { width: 100%; }
	.hs-actions .button { flex: 1; }
	.hs-add-ways { flex-basis: 100%; max-width: none; }
	.hs-add-bar .select { flex: 1 1 100%; }
	.hs-day { justify-content: center; }
}

/* ============================================================ Homestead (Cars) */
.car-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.car-card { display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.car-card:hover { background: var(--hover); }
.car-pic { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }
.car-pic-none { display: flex; align-items: center; justify-content: center; color: var(--accent); background: var(--sunken); }
.car-due { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.car-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-bottom: 16px; }
.car-hero { flex: none; width: 120px; height: 90px; object-fit: cover; border-radius: var(--r); }
.car-top .hs-meta { overflow-wrap: anywhere; }
.car-miles { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 8px; }
.car-miles .field { flex: 0 1 200px; min-width: 0; }
.car-miles > .button { width: 40px; padding: 0; }
.car-vin { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 16px; }
.car-vin .field { flex: 1 1 220px; min-width: 0; max-width: 320px; }
.car-drivers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.car-drivers .field-label { flex-basis: 100%; }
.car-drivers .toggle { margin-top: 0; }
.car-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.car-thumb { position: relative; display: block; width: 64px; height: 64px; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.car-thumb .icon-button { position: absolute; top: -8px; right: -8px; width: 32px; height: 32px; background: var(--raised); border: 1px solid var(--line); }
.car-lines { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.car-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.car-line .select select { width: 100%; }
.car-read { margin: 0 0 16px; }
.car-tab { margin-top: 16px; }
.car-tab-head { margin-bottom: 12px; }
.car-tab-head h3, .car-tab-title { margin: 0; font-size: 16px; font-weight: 650; }
.car-tab-title { margin-bottom: 12px; }
.car-gap { margin-top: 16px; }
@media (max-width: 560px) {
	.car-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
	.car-line > .input:first-child { grid-column: 1 / -1; }
	.car-hero { width: 100%; height: 160px; }
}

/* ============================================================ Homestead (Fitbit, and its part of the Food log) */
.hs-fitbit { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.hs-fitbit h3 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.hs-fitbit .notice, .hs-fitbit .hs-meta { margin: 0 0 16px; }
.fb-today { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fb-num, .fb-today .kpi-value, .hs-fitbit td { font-variant-numeric: tabular-nums; }
.fb-head { margin: 20px 0 10px; font-size: 14.5px; font-weight: 650; }
.fb-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; }
.fb-head .muted { font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; }
.fb-night { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.fb-night h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 650; }
.fb-night-main { flex: 1 1 260px; min-width: 0; }
.fb-stages { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fb-nap { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.fb-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 20px; }
.fb-chart { min-width: 0; }
@media (max-width: 560px) { .fb-charts { grid-template-columns: 1fr; } }

/* ============================================================ Homestead (Travel) */
.tv-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tv-line { display: flex; align-items: center; gap: 8px; min-height: 40px; border-bottom: 1px solid var(--line); }
.tv-line:last-child { border-bottom: 0; }
.tv-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; overflow-wrap: anywhere; }
.tv-check input { flex: none; width: 18px; height: 18px; }
.tv-line.done .tv-check span { color: var(--muted); text-decoration: line-through; }
.tv-progress { margin-bottom: 16px; }
.tv-progress .progress-text { font-variant-numeric: tabular-nums; }
.tv-add { margin-top: 12px; }
.tv-vaccine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tv-vaccine .input { flex: 1 1 160px; min-width: 0; }
.tv-day + .tv-day { margin-top: 20px; }
.tv-day h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 650; }
.tv-warnings { margin: 0; padding-left: 18px; }
.tv-notes { white-space: pre-line; }

/* ============================================================ Homestead (Baby) */
.bb-since { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bb-since .kpi-value, .bb-clock, .bb-side-time, .bb-charts + .table-wrap td { font-variant-numeric: tabular-nums; }
.bb-timer { display: flex; flex-direction: column; gap: 8px; }
.bb-timer + .bb-timer { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.bb-timer h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.bb-clock { font-size: 24px; font-weight: 700; line-height: 1.1; }
.bb-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.button.bb-big { height: 42px; flex: 1 1 140px; max-width: 260px; }
.bb-side-time { font-weight: 500; }
.button.bb-big[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.bb-note { white-space: pre-line; overflow-wrap: anywhere; }
.bb-file { align-self: center; min-width: 0; max-width: 100%; }
.bb-preview { margin: 20px 0 0; }
.bb-subhead { margin: 16px 0 8px; font-size: 14.5px; font-weight: 650; }
.bb-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 20px; }
.bb-charts h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 760px) {
	.bb-charts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.bb-since { grid-template-columns: 1fr; }
	.button.bb-big { max-width: none; }
}

/* ============================================================ Exclaim data (Product match) */
.ex-rule { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-bottom: 12px; }
.ex-rule .field { flex: 1 1 160px; max-width: 260px; }
.ex-table td.right { font-variant-numeric: tabular-nums; }
.ex-cell { display: block; max-width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ex-table td.open { max-width: 480px; white-space: normal; }
.ex-table td.open .ex-cell { white-space: pre-wrap; overflow-wrap: anywhere; }
.ex-columns { max-height: 320px; overflow-y: auto; }
.ex-table .icon-button.small { vertical-align: middle; margin-left: 6px; }

/* * Settings (components/settings.tsx): its grouped menu beside the page; on a phone the menu, then the page with a back link */
.settings { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-menu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-search { margin-bottom: 12px; border-radius: 999px; }
.settings-group + .settings-group { margin-top: 14px; }
.settings-menu .nav-group { margin: 0 0 6px 12px; }
.settings-menu .nav-item { min-height: 38px; padding: 0 12px; gap: 12px; border-radius: var(--r-sm); }
.settings-menu .empty-line { margin: 4px 12px; font-size: 13.5px; }
.settings-stop { margin-top: 14px; }
.settings-page { min-width: 0; }
.settings-page > .svc-tabs { margin-bottom: 20px; }
.settings-back { display: none; }
@media (max-width: 760px) {
	.settings { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.settings.has-page .settings-menu { display: none; }
	.settings-back { display: inline-flex; margin-bottom: 14px; }
}

/* Production: an Exclaim order */
.prod-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.prod-sub { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.prod-raw + .prod-raw { margin-top: 20px; }
.prod-raw details { margin-bottom: 8px; }
.prod-raw summary, .prod-tree summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.prod-tree ul { list-style: none; margin: 4px 0 0; padding-left: 14px; border-left: 1px solid var(--line); font-size: 13.5px; }
.prod-tree li { overflow-wrap: anywhere; }
.prod-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-pics.gallery { margin-bottom: 16px; }
.prod-pic { flex: none; width: 72px; height: 72px; padding: 0; display: grid; place-items: center; overflow: hidden; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: zoom-in; }
.prod-pics.gallery .prod-pic { width: 140px; height: 140px; }
.prod-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prod-note { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.prod-key { font-family: var(--mono, monospace); font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.prod-full { overflow-wrap: anywhere; white-space: normal; }
.prod-print { margin-top: 20px; }
.prod-print .pdf-pages { margin: 12px 0; }
.prod-icc { margin: 12px 0 0; font-size: 13.5px; }
.prod-pic.missing { padding: 6px; cursor: pointer; color: var(--muted); font-size: 12.5px; line-height: 1.3; text-align: center; text-decoration: none; }
.modal.prod-big { width: min(920px, 100%); max-height: 92vh; overflow: auto; }
.prod-big img { align-self: center; max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: var(--r-sm); }
.prod-big a { font-size: 13px; }

/* * Chat (components/chat.tsx): the conversations on the left, the open one on the right; one at a time on a phone */
.chat-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100dvh - var(--topbar) - 200px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.chat-page .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-page .faint { color: var(--faint); }
.chat-page .nowrap { white-space: nowrap; }
.chat-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-right: 1px solid var(--line); background: var(--sunken); overflow-y: auto; }
.chat-part { display: flex; flex-direction: column; gap: 4px; }
.chat-part-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 10px; }
.chat-part-head h2 { margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.chat-part-head .icon-button { width: 32px; height: 32px; }
.chat-part .empty-line { margin: 0; padding: 4px 10px 8px; }
.chat-convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-conv { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-conv:hover { background: var(--hover); }
.chat-conv.on { background: var(--accent-soft); }
.chat-conv .avatar { flex: none; }
.chat-conv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-conv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-main > .notice { margin: 12px 16px 0; }
.chat-pick { margin: auto; padding: 24px; text-align: center; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-head-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head-title h2 { font-size: 16px; font-weight: 650; }
.chat-head-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-back { display: none; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-note { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--muted); }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; }
.chat-msg > .avatar { flex: none; }
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.chat-msg-actions { display: inline-flex; gap: 4px; margin-left: auto; opacity: 0; }
.chat-msg:hover .chat-msg-actions, .chat-msg-actions:focus-within { opacity: 1; }
@media (hover: none) { .chat-msg-actions { opacity: 1; } }
.chat-text { overflow-wrap: anywhere; }
.chat-text p { margin: 2px 0; }
.chat-deleted { margin: 2px 0; color: var(--faint); font-style: italic; font-size: 13.5px; }
.chat-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.chat-edit-row { display: flex; gap: 6px; }
.chat-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chat-img { display: block; max-width: min(320px, 100%); max-height: 240px; border: 1px solid var(--line); border-radius: var(--r-sm); object-fit: cover; }
.chat-file, .chat-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunken); color: var(--text); font-size: 13px; text-decoration: none; }
.chat-file:hover { background: var(--hover); }
.chat-chip .icon-button { width: 28px; height: 28px; margin-right: -6px; }
.chat-composer { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-attached { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-compose-row textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 200px; resize: vertical; }
.chat-composer .field-hint, .chat-composer .run-feedback { margin: 0; }
.chat-people { max-height: 50vh; overflow-y: auto; }
.chat-people .avatar { width: 28px; height: 28px; margin: 0; font-size: 11px; border: 0; }
.chat-dialog-row { margin-top: 0; }
.chat-refs { max-height: 50vh; overflow-y: auto; }
.chat-refs .search-item { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.chat-refs .search-item:hover { background: var(--hover); }
.chat-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-icons .icon-button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) {
	.chat-page { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--topbar) - 170px); }
	.chat-page.has-open .chat-list, .chat-page:not(.has-open) .chat-main { display: none; }
	.chat-list { border-right: 0; }
	.chat-back { display: grid; flex: none; }
	.chat-page .button.small { height: 32px; }
}

/* * The Claude connector: its card on Integrations and the Allow page (components/claude_connector.tsx) */
.connector-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.connector-card > .notice { margin: 0; }
.connector-list { display: grid; gap: 14px; margin-top: 6px; }
.connector-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.connector-row code { overflow-wrap: anywhere; }
.connector-status { margin: 0; font-size: 13.5px; color: var(--muted); }
.connector-status strong { color: var(--text); font-weight: 600; }

/* * Help: tours and how-to guides (components/help.tsx) */
.help-list { list-style: none; margin: 0; padding: 0; }
.help-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.help-row:first-child { border-top: 0; padding-top: 0; }
.help-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.help-text span { color: var(--muted); font-size: 13.5px; }
.help-group + .help-group { margin-top: 16px; }
.help-group h3 { margin: 0 0 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.help-guide { border-top: 1px solid var(--line); }
.help-guide summary { padding: 10px 0; font-weight: 600; cursor: pointer; }
.help-guide ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; }

/* * The Dashboard (components/dashboard.tsx, dash_card.tsx): short cards, two columns, one on a phone */
.nav-home { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-grid > .section { margin: 0; min-width: 0; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-head h2 { min-width: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.dash-head .link-button { flex-shrink: 0; font-size: 13.5px; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li + li { border-top: 1px solid var(--line); }
.dash-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 0; color: var(--text); text-decoration: none; }
.dash-row:hover .dash-text > .clamp:first-child { color: var(--accent); }
.dash-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dash-text .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row .pill { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dash-sub { color: var(--muted); font-size: 13px; }
.dash-more { margin-top: 6px; color: var(--faint); font-size: 13px; }
.dash-brief { font-weight: 600; }
.dash-nothing { margin-bottom: 16px; }
.dash-card .ts-clock { flex-wrap: wrap; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tournaments (modules/tournaments): a bracket's rounds as columns, scrolling sideways inside the section on a phone, on the staff page and the public website */
.tn-bracket { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; }
.tn-round { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: none; width: 200px; }
.tn-round h3 { color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.tn-match { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.tn-match.picked { border-color: var(--accent); }
.tn-side { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 10px; font-size: 13.5px; }
.tn-side + .tn-side { border-top: 1px solid var(--line); }
.tn-match.done .tn-side { color: var(--muted); }
.tn-match.done .tn-side.won, .tn-side.won { color: var(--text); font-weight: 600; }
.tn-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-tbd { color: var(--faint); }
.tn-score { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.tn-actions { display: flex; justify-content: flex-end; padding: 4px 6px; background: var(--sunken); border-top: 1px solid var(--line); }
.tn-report { margin-top: 20px; padding: 16px; background: var(--sunken); border-radius: var(--r); }
.tn-report h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 12px; overflow-wrap: anywhere; }
.tn-report .run-row { margin-top: 14px; }
.tn-copy > .table-wrap + * { margin-top: 12px; }
.tn-copy td { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* * Cold email → Campaigns: one folded row per campaign */
.campaigns { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.campaign-fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.campaign-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 48px; padding: 10px 16px; cursor: pointer; }
/* * Cold email → Inbox Kit: a domain's audience, with the other audiences it's shared with under Advanced */
.kit-audience { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.kit-audience .input { height: 34px; font-size: 13.5px; }
.kit-audience .outreach-more { margin: 0; font-size: 13px; }
.kit-share { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.kit-share label { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.campaign-name { font-weight: 600; min-width: 0; }
.campaign-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; }
.campaign-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.campaign-facts dt { color: var(--muted); font-weight: 600; }
.campaign-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.campaign-wave { display: inline-block; margin: 0 6px 4px 0; padding: 2px 10px; border-radius: 999px; background: var(--hover); }
/* * The campaign builder (campaign_builder.tsx): one row per step, opened one at a time */
.build-open { margin-bottom: 16px; }
.builder { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.builder-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.build-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.build-step > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; cursor: pointer; list-style: none; min-width: 0; }
.build-step > summary::-webkit-details-marker { display: none; }
.build-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 999px; }
.build-check.done { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.build-title { flex: none; font-weight: 600; }
.build-step > summary .clamp { flex: 1; min-width: 0; }
.build-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; }
.build-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 36px; font-size: 14px; }
.campaign-wave.now { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ============================================================ Contacts (Lead generation) */
.contact-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.contact-history { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact-toolbar .input { flex: 1 1 340px; min-width: 0; max-width: 480px; }
.contact-toolbar .select select { height: 40px; max-width: 200px; }
.contact-picker { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; padding: 16px 20px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.contact-presets { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.contact-pick-group { display: flex; flex-direction: column; gap: 6px; min-width: 160px; margin: 0; padding: 0; border: 0; }
.contact-pick-group legend { padding: 0; margin-bottom: 6px; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.contact-pick { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13.5px; cursor: pointer; }
.contacts-wrap.loading { opacity: 0.6; }
.contacts-table { width: max-content; min-width: 100%; }
.contacts-table .faint { color: var(--faint); }
.contacts-table .contact-cell { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contacts-table th.pin, .contacts-table td.pin { position: sticky; z-index: 1; background: var(--card); }
.contacts-table th.pin { background: var(--sunken); z-index: 2; }
.contacts-table tbody tr:hover td.pin { background: var(--hover); }
.contacts-table .pin-name { left: 0; width: 220px; min-width: 220px; max-width: 220px; }
.contacts-table .pin-name .contact-cell { white-space: normal; overflow-wrap: anywhere; }
.contacts-table .pin-email { left: 220px; width: 230px; min-width: 230px; max-width: 230px; border-right: 1px solid var(--line); }
.contacts-table .contact-groups th { padding: 4px 8px; border-bottom: 1px solid var(--line); }
.contact-group-head { border-left: 1px solid var(--line); }
.contact-group-head button { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; background: none; border: 0; padding: 0 4px; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.contact-group-head button:hover { color: var(--accent); }
.fold-arrow { display: inline-flex; }
.fold-arrow.folded { transform: rotate(-90deg); }
.contacts-table .fold-cell { width: 28px; min-width: 28px; max-width: 28px; padding: 0; overflow: hidden; font-size: 0; border-left: 1px solid var(--line); }
.contact-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.contact-pager .muted { margin-right: auto; }
.contact-page { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.contact-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flag-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; min-width: 0; max-width: 100%; }
.flag-chip { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.flag-chip > span { display: inline-flex; min-width: 0; }
.flag-chip .pill { min-width: 0; max-width: 100%; }
.flag-chip .icon-button.small { width: 32px; height: 32px; flex: none; }
.flag-form { flex-basis: 100%; margin-bottom: 0; }
.flag-chip .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-group h3 { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.contact-group dl { display: flex; flex-direction: column; margin: 0; }
.contact-field { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.contact-field dt { color: var(--muted); }
.contact-field dd { margin: 0; }
.contact-full { white-space: pre-wrap; overflow-wrap: anywhere; }
.touch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.touch-head h3 { margin: 0 auto 0 0; }
.touch-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; margin-bottom: 14px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); }
.touch-quick { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.touch-quick > * { min-width: 0; }
.touch-quick > :first-child { flex: 1 1 160px; }
.touch-quick > :nth-child(2) { flex: 1 1 200px; }
.touch-quick > :last-child { flex: 3 1 220px; }
.touch-quick textarea { min-height: 40px; }
.touch-more summary { display: flex; align-items: center; min-height: 32px; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 550; }
.touch-more .form-grid { margin-top: 8px; }
.touch-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.touch-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.tl-ladder { display: flex; flex-wrap: wrap; gap: 10px 4px; margin: 0 0 16px; padding: 0; list-style: none; }
.tl-ladder li { flex: 1 1 76px; min-width: 0; padding-top: 6px; border-top: 4px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 550; overflow-wrap: anywhere; }
.tl-ladder li.done { border-top-color: var(--accent-line); }
.tl-ladder li.on { border-top-color: var(--primary); color: var(--accent); font-weight: 650; }
.tl-ladder li.split { margin-left: 8px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.tl-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.tl { position: relative; }
.tl::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-group { position: relative; }
.tl-day { position: sticky; top: var(--topbar); z-index: 3; margin: 0; padding: 6px 0 6px 44px; background: var(--page); color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-item { --kind: var(--region-6); position: relative; padding: 0 0 10px 44px; font-size: 13.5px; }
.tl-item.email { --kind: var(--region-1); }
.tl-item.call { --kind: var(--region-4); }
.tl-item.note { --kind: var(--region-5); }
.tl-item.order { --kind: var(--region-3); }
.tl-item.account { --kind: var(--region-2); }
.tl-dot { position: absolute; left: 3px; top: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--kind); color: var(--on-primary); box-shadow: 0 0 0 3px var(--page); }
.tl-item.milestone .tl-dot { left: 0; top: 6px; width: 34px; height: 34px; }
.tl-card { display: block; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); background: color-mix(in srgb, var(--kind) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--kind) 30%, var(--line)); border-left: 3px solid var(--kind); border-radius: var(--r); }
.tl-item.anon .tl-card { border-style: dashed; background: var(--sunken); color: var(--muted); }
.tl-item.anon .tl-dot { opacity: 0.6; }
.tl-head { display: block; width: 100%; min-height: 32px; padding: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.tl-head:hover .tl-title { color: var(--accent); }
.tl-chev { display: inline-flex; margin-right: 2px; color: var(--faint); transition: transform 0.12s; }
.tl-chev.open { transform: rotate(180deg); }
.tl-mile { margin: 0 0 4px; color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.tl-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tl-title { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.tl-at { margin-left: auto; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tl-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.tl-steps { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding: 8px 12px; list-style: none; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-xs); }
.tl-steps li { display: flex; flex-wrap: wrap; gap: 2px 8px; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tl-run { flex-basis: 100%; margin: 4px 0 0; padding: 0 0 0 14px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tl-gap, .tl-divider { padding: 0 0 10px 44px; font-size: 12.5px; }
.tl-gap span { display: inline-block; padding: 2px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; background: var(--page); color: var(--muted); }
.tl-divider { display: flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 650; }
.tl-divider::after { content: ''; flex: 1; border-top: 1px solid var(--accent-line); }
@media (max-width: 560px) {
	.contact-field { grid-template-columns: 1fr; gap: 2px; }
	.contact-toolbar .select select { max-width: 100%; }
	/* * Only Name stays pinned, narrower, so the other columns scroll into view */
	.contacts-table .pin-name { width: 130px; min-width: 130px; max-width: 130px; }
	.contacts-table th.pin-email, .contacts-table td.pin-email { position: static; }
}
/* * Settings → Journey data: a table's columns wrap in a column wide enough to read */
.journey-tables td:last-child { min-width: 260px; }

/* Promocode Automations */
.promo-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.promo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.promo-row > * { flex: 1 1 160px; min-width: 0; }
.promo-row > .icon-button { flex: 0 0 40px; }
.promo-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }

/* * Timesheet → Time off */
.to-bar { margin-bottom: 14px; }
.to-bar .select { min-width: 150px; }
.to-month { width: 160px; height: 40px; }
.to-form { padding: 4px 0 16px; }
.to-pick { max-width: 360px; margin-bottom: 16px; }
.to-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.to-pick-grid { touch-action: none; user-select: none; margin-bottom: 8px; }
.to-pick-day { height: 40px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--text); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.to-pick-day:hover { background: var(--hover); }
.to-pick-day.today { border-color: var(--accent); }
.to-pick-day.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.to-pick-day.lit { background: var(--accent-soft); border-color: var(--accent); }
.to-pick-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.to-note-latest { color: var(--text); }
.to-form-actions { align-items: center; margin-top: 20px; }
.to-note-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.to-note-row .field { flex: 1 1 220px; }
.to-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.to-wide { grid-column: 1 / -1; }
.to-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.to-when { font-size: 13.5px; margin: 2px 0; overflow-wrap: anywhere; }
.to-details { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; background: var(--sunken); border-radius: var(--r); }
.to-facts, .to-history { margin: 0; padding-left: 18px; font-size: 13.5px; }
.to-history { color: var(--muted); font-size: 12.5px; }
.to-note { margin: 0 0 8px; font-size: 13.5px; }
.to-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.to-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.to-cal-head { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 4px; }
.to-cal-day { min-height: 76px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.to-cal-day.today { border-color: var(--accent); }
.to-cal-num { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.to-cal-wd { display: none; }
.to-chip { border: 0; border-radius: var(--r-xs); padding: 4px 6px; font: inherit; font-size: 12.5px; line-height: 1.35; text-align: left; background: var(--hover); color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.to-chip strong { font-weight: 600; }
.to-chip.good { background: var(--ok-soft); }
.to-chip.info { background: var(--info-soft); }
.to-chip.warn { background: var(--warn-soft); }
.to-chip.bad { background: var(--bad-soft); }
@media (max-width: 640px) {
	/* The month calendar becomes a list; the day picker keeps its 7 columns */
	.to-cal:not(.to-pick-grid) { grid-template-columns: 1fr; }
	.to-cal:not(.to-pick-grid) .to-cal-head, .to-cal-day.none { display: none; }
	.to-cal-day { min-height: 0; }
	.to-cal-wd { display: inline; }
	.to-chip { min-height: 32px; }
	.to-month { flex: 1 1 140px; }
}

/* Contact page: the right column holds the account strip (when there is an account), then the Flags card */
.contact-cols { display: grid; grid-template-columns: minmax(0, 760px) minmax(320px, 1fr); gap: 16px 24px; align-items: start; }
.contact-cols .contact-page { grid-column: 1; grid-row: 1 / span 2; }
.contact-account { grid-column: 2; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; min-width: 0; }
.contact-account-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.contact-account-item { display: flex; flex-direction: column; min-width: 0; }
.contact-account-item .kpi-label { margin-bottom: 4px; }
.contact-account-value { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-account h3 { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.contact-account-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.contact-account-orders li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto auto; align-items: baseline; gap: 4px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.contact-account-orders li:last-child { padding-bottom: 0; border-bottom: 0; }
.contact-account-orders li strong { text-align: right; }
.contact-flag-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-flag-rows li { display: flex; align-items: center; gap: 8px 12px; min-width: 0; }
.contact-flag-rows li > span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.contact-flag-rows .meta { color: var(--muted); font-size: 12.5px; }
.contact-flag-rows .toggle { flex: none; min-height: 32px; }
.contact-account-orders .clamp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 960px) {
	.contact-cols { grid-template-columns: minmax(0, 1fr); }
	.contact-cols .contact-page, .contact-account { grid-column: 1; grid-row: auto; }
	.contact-account { order: -1; }
}

/* * The Calendar page (components/calendar.tsx): each layer's color is a --region-* token */
.calendar-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.calendar-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.calendar-title { margin: 0 0 0 6px; font-size: 16px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calendar-layers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.calendar-swatch { flex: none; width: 10px; height: 10px; border-radius: 999px; }
.calendar-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.calendar-weekday { padding: 8px 10px; background: var(--sunken); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.calendar-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 104px; padding: 6px; background: var(--card); }
.calendar-cell.other { background: var(--sunken); }
.calendar-num { align-self: flex-start; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.calendar-num:hover { background: var(--hover); }
.calendar-cell.other .calendar-num { color: var(--faint); }
.calendar-cell.today .calendar-num { background: var(--primary); color: var(--on-primary); }
.calendar-event { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 2px 6px; border-radius: var(--r-xs); color: var(--text); font-size: 12.5px; text-decoration: none; }
.calendar-event:hover { background: var(--hover); }
.calendar-event-time { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.calendar-event-time:empty { display: none; }
.calendar-event-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more { align-self: flex-start; padding: 2px 6px; font-size: 12.5px; }
.calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-week-day { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 160px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); }
.calendar-week-day.today { border-color: var(--accent-line); background: var(--accent-soft); }
.calendar-day-head { min-height: 32px; padding: 4px 6px; border: 0; border-radius: var(--r-xs); background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.calendar-day-head:hover { background: var(--hover); color: var(--text); }
.calendar-week-day.today .calendar-day-head { color: var(--accent); }
.calendar-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.calendar-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.calendar-list li:last-child .calendar-row { border-bottom: 0; }
.calendar-row:hover { background: var(--hover); }
.calendar-row-when { flex: none; width: 140px; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.calendar-row-what { display: flex; flex-direction: column; min-width: 0; }
.calendar-row-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-none { margin-top: 12px; }
@media (max-width: 760px) {
	.calendar-week { grid-template-columns: minmax(0, 1fr); }
	.calendar-week-day { min-height: 0; }
	.calendar-event { min-height: 36px; }
}
/* * On a phone a month day shows its events as dots; its number opens the day */
@media (max-width: 640px) {
	.calendar-weekday { padding: 6px 2px; font-size: 11px; text-align: center; }
	.calendar-cell { align-items: center; min-height: 72px; padding: 4px 2px; }
	.calendar-num { align-self: center; padding: 0; }
	.calendar-cell .calendar-event { min-height: 0; padding: 0; pointer-events: none; }
	.calendar-cell .calendar-event-title, .calendar-cell .calendar-more { display: none; }
	.calendar-row-when { width: 96px; }
}

/* Birthday: the month, day and year boxes, and the confetti over the page on the day */
.birthday-details .field { flex: 1 1 110px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }

/* * The annotator (components/annotator.tsx): over everything, the picture as big as fits */
.annot-scrim { z-index: 95; }
.modal.annotator { width: min(1100px, 100%); max-height: 100%; overflow: auto; gap: 12px; }
.annot-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.annot-tools .icon-button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.annot-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.annot-ink { width: 32px; height: 32px; padding: 0; border: 3px solid var(--raised); border-radius: 999px; cursor: pointer; }
.annot-ink[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 1px; }
.annot-pages { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-variant-numeric: tabular-nums; }
.annot-stage { display: grid; place-items: center; min-height: 160px; padding: 8px; background: var(--sunken); border-radius: var(--r-sm); }
.annot-paper { position: relative; max-width: 100%; }
.annot-canvas { display: block; max-width: 100%; max-height: calc(var(--vh) - 240px); touch-action: none; cursor: crosshair; }
.annot-canvas.tool-text { cursor: text; }
.annot-canvas.tool-select { cursor: default; }
.annot-scrim.annot-full { padding: 0; }
.annot-full .modal.annotator { width: 100%; height: 100%; border-radius: 0; }
.annot-full .annot-stage { flex: 1; }
.annot-full .annot-canvas { max-height: calc(var(--vh) - 190px); }
.annot-text { position: absolute; width: min(260px, 60vw); height: 34px; transform: translateY(-4px); }
.annot-foot { justify-content: flex-end; }
.annot-foot .run-feedback { margin-right: auto; }
.photo-staged .icon-button.photo-annotate { top: auto; bottom: -6px; }
.change-box.capturing { visibility: hidden; }
@media (max-width: 640px) { .files-preview-head { flex-wrap: wrap; gap: 8px; } .files-preview-head strong { flex-basis: 100%; } }
/* * A working file on a phone: the name gets the first line, its controls the next */
@media (max-width: 560px) { .files-block .file { flex-wrap: wrap; } .files-block .file-meta { flex-basis: calc(100% - 60px); } }
/* * Legacy Capture: a recording's player or the live camera, full width on a phone */
.lg-media { display: block; width: 100%; max-width: 480px; border-radius: var(--r-sm); background: var(--sunken); }
audio.lg-media { height: 40px; }
.lg-clock { font-variant-numeric: tabular-nums; }
.hs-form > .segmented, .hs-form > .lg-media { margin: 12px 0; }
