/* Generect workspace — one product over Brain, CRM, skills, agents, meetings and content.
   The design language is the one of app.generect.com (frontend-v2 src/index.css): cream rail, white canvas,
   rounded-xl hairline cards, overline labels, black pill actions, the atom. Tokens below are copied from there. */
:root {
  --cream: #F1EAE0; --cream-2: #F7F2EA; --line: #E7E5E1; --ink: #0E0E0E;
  --red: #EC5134; --blue: #5F6BDE; --yellow: #F4BD38;
  --fg: hsl(194, 9%, 10%); --fg-muted: hsl(194, 9%, 30%); --fg-subtle: hsl(194, 9%, 46%); --fg-faint: hsl(194, 9%, 62%);
  --paper: #fff; --on-ink: #fff; --bg: var(--paper); --bg-muted: hsl(204, 45%, 98%); --bg-subtle: hsl(194, 9%, 97%); --n95: hsl(194, 9%, 95%);
  --border: hsl(194, 9%, 90%); --border-strong: hsl(194, 9%, 80%);
  --primary: hsl(223, 63%, 48%); --primary-95: hsl(221, 62%, 95%); --primary-97: hsl(221, 100%, 98%); --primary-fg: hsl(223, 63%, 36%);
  --success: hsl(108, 39%, 50%); --success-95: hsl(108, 39%, 95%); --success-fg: hsl(108, 45%, 26%);
  --warn: hsl(50, 62%, 48%); --warn-95: hsl(50, 62%, 94%); --warn-fg: hsl(42, 70%, 26%);
  --error: hsl(7, 73%, 50%); --error-95: hsl(7, 73%, 95%); --error-fg: hsl(7, 70%, 38%);
  --accent: var(--ink);
  /* the signature dot (the atom's nucleus, the caret) and the rail; a theme below changes them */
  --spot: var(--red);
  --rail: var(--cream); --rail-fg: var(--ink); --rail-line: var(--line); --rail-card: color-mix(in srgb, var(--paper) 55%, transparent); --rail-card-hover: var(--paper); --rail-logo: none;
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 12px; --r-2xl: 16px; --pill: 999px;
  --shadow-xs: 0 1px 2px rgba(13, 18, 28, .06);
  --shadow-sm: 0 2px 4px rgba(13, 18, 28, .06), 0 1px 2px rgba(13, 18, 28, .04);
  --shadow-md: 0 4px 8px rgba(5, 58, 97, .10);
  --shadow-lg: 0 8px 24px rgba(5, 58, 97, .12);
  --shadow-xl: 0 24px 60px rgba(5, 30, 60, .20);
  --fast: 120ms; --base: 200ms; --slow: 320ms; --route: 420ms;
  --enter: cubic-bezier(.2, 0, 0, 1); --exit: cubic-bezier(.4, 0, 1, 1); --spring: cubic-bezier(.3, 1.35, .5, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 248px; --top-h: 56px;
}
/* ── themes ──────────────────────────────────────────────────────────────────────────────────────
   Andrii, 18.11.2026: «давай в трохи інших кольорах зробимо систему, бо зараз дуже нагадує Generect». The shapes stay
   (hairline cards, pill buttons, the rail); a theme changes the paper, the ink and the dot. «sand» is the old look,
   the one of app.generect.com. A workspace picks its theme in Налаштування (white-label); the platform's default is
   «fog». The names of the tokens are historical: --cream is the paper of the rail and of tinted cards. */
:root[data-theme="fog"] { --cream: #E8EDF1; --cream-2: #F2F5F8; --line: #DCE3E9; --ink: #0C1B27; --spot: #12A594; --red: #E5484D; --blue: #3E63DD; --yellow: #F2B84B; --bg-muted: hsl(204, 33%, 98%); }
:root[data-theme="sage"] { --cream: #E7EDE4; --cream-2: #F1F5EF; --line: #DAE3D6; --ink: #13231A; --spot: #5BA637; --red: #E5484D; --blue: #3A7D6B; --yellow: #D9A93A; --bg-muted: hsl(110, 20%, 98%); }
:root[data-theme="lilac"] { --cream: #ECE9F5; --cream-2: #F5F3FA; --line: #DFDAEE; --ink: #1A1730; --spot: #7A5AF0; --red: #E5484D; --blue: #5B6BE0; --yellow: #F0B84A; --bg-muted: hsl(255, 40%, 98.5%); }
:root[data-theme="graphite"] { --cream: #ECEEF0; --cream-2: #F4F5F6; --line: #DFE2E5; --ink: #14171A; --spot: #F2B33D; --red: #E5484D; --blue: #4C6FE0; --yellow: #F2B33D;
  --rail: #14171A; --rail-fg: #EEF0F2; --rail-line: #14171A; --rail-card: rgba(255, 255, 255, .06); --rail-card-hover: rgba(255, 255, 255, .11); --rail-logo: invert(1) brightness(1.6); }
/* ── dark ───────────────────────────────────────────────────────────────
   Andrii, 19.11.2026: «зроби темну тему в апці». A person's own choice on their device (web/mode.js sets data-mode),
   not a workspace's: the workspace's theme keeps its dot and its accents, the paper and the ink turn over. The pairs
   stay pairs (ink under cream text, paper under fg), so a rule written for the light look reads right here too. */
:root[data-mode="dark"] {
  color-scheme: dark;
  --paper: #171B21; --on-ink: #101317; --bg-muted: #13161B; --bg-subtle: #1D2229; --n95: #232931;
  --border: #2A313A; --border-strong: #3B444F;
  --fg: #E8ECF0; --fg-muted: #B9C1CB; --fg-subtle: #8D97A3; --fg-faint: #69737F;
  --cream: #101317; --cream-2: #14181D; --line: #252B33; --ink: #E9EDF1;
  --primary: hsl(221, 83%, 70%); --primary-95: hsl(221, 42%, 20%); --primary-97: hsl(221, 42%, 15%); --primary-fg: hsl(221, 90%, 80%);
  --success: hsl(108, 42%, 54%); --success-95: hsl(108, 32%, 15%); --success-fg: hsl(108, 52%, 70%);
  --warn: hsl(46, 78%, 56%); --warn-95: hsl(46, 48%, 15%); --warn-fg: hsl(46, 82%, 70%);
  --error: hsl(7, 82%, 62%); --error-95: hsl(7, 46%, 17%); --error-fg: hsl(7, 92%, 76%);
  --rail: #0C0F12; --rail-fg: #E9EDF1; --rail-line: #1B2027; --rail-card: rgba(255, 255, 255, .05); --rail-card-hover: rgba(255, 255, 255, .09); --rail-logo: invert(1) brightness(1.6);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, .45);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .6);
}
/* our own logo is dark ink on nothing: turned over where it sits on the dark paper (a client's logo is left alone) */
:root[data-mode="dark"] img[src$="logo.svg"] { filter: invert(1) brightness(1.6); }
/* dark: initials on a deep tint of their hue, the shimmer and the muted toggles a step above the paper */
:root[data-mode="dark"] .av:not(.ink):not(.has) { background: hsl(var(--h, 220), 34%, 22%); color: hsl(var(--h, 220), 62%, 80%); }
:root[data-mode="dark"] .logo:not(.has) { background: hsl(var(--h, 220), 34%, 22%); color: hsl(var(--h, 220), 62%, 80%); }
/* a company's logo is drawn for white paper: it keeps a light tile */
:root[data-mode="dark"] .logo.has { background: #EEF1F4; box-shadow: none; }
:root[data-mode="dark"] .skel { background: linear-gradient(90deg, var(--n95) 25%, var(--border) 37%, var(--n95) 63%); background-size: 200% 100%; }
:root[data-mode="dark"] .sw:not([aria-checked="true"]) { background: var(--border-strong); }
/* the veil under a sheet or a dialog is ink in the light look; here ink is light, so the veil is plain dark */
:root[data-mode="dark"] .scrim, :root[data-mode="dark"] .app.nav-open .nav-scrim, :root[data-mode="dark"] .sheet-scrim, :root[data-mode="dark"] .veil { background: rgba(0, 0, 0, .58); }
:root[data-mode="dark"] .tone-yellow { --tone: hsl(42, 85%, 62%); } :root[data-mode="dark"] .tone-green { --tone: hsl(108, 48%, 62%); }
/* a workspace's own colour under its initials keeps white letters */
.ws-mark[style*="background"] { color: #fff; }
/* theme swatches in the settings */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.theme-b { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 6px; text-align: left; transition: box-shadow var(--fast), border-color var(--fast); background: var(--paper); }
.theme-b:hover { border-color: var(--border-strong); }
.theme-b[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-b .pv { display: grid; grid-template-columns: 26% 1fr; height: 44px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.theme-b .pv i { display: block; }
.theme-b .pv span { display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; padding: 5px; background: var(--paper); }
.theme-b .pv b { width: 9px; height: 9px; border-radius: 50%; display: block; }
.theme-b small { display: block; font-size: 11.5px; font-weight: 500; margin: 6px 2px 1px; }
/* every icon has a size of its own; a place that wants another says so (zero specificity: any rule wins over it) */
:where(svg.ic) { width: 16px; height: 16px; flex: none; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: color-mix(in oklab, var(--yellow) 45%, var(--paper)); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }

/* ── motion: four durations, two easings, as in the app ─────────────────────────────────────────── */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes route { from { opacity: .5; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes sheet { from { transform: translateX(28px); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes fly { to { opacity: 0; transform: translateX(40px) scale(.97); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
.rise { animation: rise var(--slow) var(--enter) both; animation-delay: calc(var(--i, 0) * 34ms); }
.fade { animation: fade var(--base) var(--enter) both; }

/* ── boot ──────────────────────────────────────────────────────────────────────────────────────── */
.boot { height: 100vh; display: grid; place-items: center; background: var(--cream); }
.boot .atom { width: 110px; height: 110px; color: var(--ink); }

/* ── atom ──────────────────────────────────────────────────────────────────────────────────────── */
.atom { display: block; overflow: visible; }
.atom ellipse { fill: none; stroke: currentColor; }
.atom .e-spin, .atom .e-unspin { transform-box: view-box; transform-origin: 0 0; animation: orbit var(--dur, 9s) linear var(--phase, 0s) infinite; }
.atom .e-unspin { animation-direction: reverse; }
.atom.busy .rings { transform-box: view-box; transform-origin: center; animation: orbit 3.2s linear infinite; }

/* ── shell ─────────────────────────────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.side { --ink: var(--rail-fg); --cream: var(--rail); background: var(--rail); color: var(--rail-fg); border-right: 1px solid var(--rail-line); display: flex; flex-direction: column; padding: 16px 12px 12px; min-height: 0; position: relative; z-index: 20; }
.side-logo { display: block; padding: 2px 6px 12px; color: var(--ink); }
.side-logo img { height: 50px; width: auto; display: block; filter: var(--rail-logo, none); }
.ws-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); background: var(--rail-card); transition: background var(--fast), box-shadow var(--fast); }
.ws-switch:hover { background: var(--rail-card-hover); box-shadow: var(--shadow-xs); }
.ws-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.ws-switch .nm { flex: 1; min-width: 0; }
.ws-switch b { font-weight: 600; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 16px; }
.ws-switch small { display: block; font-size: 11px; color: color-mix(in srgb, var(--ink) 50%, transparent); font-weight: 400; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-switch > svg { width: 14px; height: 14px; color: color-mix(in srgb, var(--ink) 45%, transparent); flex: none; }
.side-cta { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.side-sep { height: 1px; background: color-mix(in srgb, var(--ink) 6%, transparent); margin: 12px 4px; flex: none; }
.side-nav { position: relative; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 45%, transparent); padding: 12px 10px 6px; }
.nav-label:first-of-type { padding-top: 2px; }
.nav-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; line-height: 16px; color: color-mix(in srgb, var(--ink) 85%, transparent); transition: color var(--base), background var(--fast); flex: none; }
.nav-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.nav-row > svg { width: 18px; height: 18px; flex: none; color: color-mix(in srgb, var(--ink) 55%, transparent); transition: color var(--base); }
.nav-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-row .n { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--ink) 55%, transparent); padding: 1px 6px; border-radius: var(--pill); background: color-mix(in srgb, var(--ink) 6%, transparent); transition: background var(--base), color var(--base); }
.nav-row .n.hot { background: var(--red); color: #fff; }
.nav-row.active { background: var(--ink); color: var(--cream); }
.nav-row.active > svg { color: var(--cream); }
.nav-row.active .n { background: color-mix(in srgb, var(--cream) 18%, transparent); color: var(--cream); }
.side-nav[data-pill="on"] .nav-row.active { background: transparent; }
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 32px; border-radius: var(--r-md); background: var(--ink); transition: transform var(--slow) var(--enter), height var(--base) var(--enter); display: none; pointer-events: none; }
.side-nav[data-pill="on"] .nav-pill { display: block; }
.ico-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; flex: none; }
.ico-dot svg { width: 11px; height: 11px; }
.nav-row kbd { font: 500 10px/1 var(--font); color: color-mix(in srgb, var(--ink) 50%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); border-radius: 4px; padding: 3px 4px; background: var(--rail-card); }
.side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); display: flex; flex-direction: column; gap: 8px; flex: none; }
.spend { border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); background: var(--rail-card); border-radius: var(--r-xl); padding: 10px 12px; }
.spend-l { display: flex; align-items: center; gap: 7px; font-size: 12px; color: color-mix(in srgb, var(--ink) 70%, transparent); font-weight: 500; }
.spend-l svg { width: 14px; height: 14px; }
.spend-v { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.spend-v b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spend-v span { font-size: 11px; color: color-mix(in srgb, var(--ink) 50%, transparent); }
.meter { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--ink); transform-origin: left; animation: grow var(--slow) var(--enter) both; }
.meter.warn i { background: var(--red); }
.me { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.me .who { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { display: block; font-weight: 400; color: color-mix(in srgb, var(--ink) 50%, transparent); font-size: 11px; line-height: 13px; }
.side .icon-btn { color: color-mix(in srgb, var(--ink) 60%, transparent); } .side .icon-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--fg-muted); transition: background var(--fast), color var(--fast); flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.sm { width: 26px; height: 26px; border-radius: var(--r-sm); }
.icon-btn.sm svg { width: 14px; height: 14px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
/* the top bar. Its class is also the word for «align to the top» on a row («row top»), so the bar is named by its tag:
   as a bare «.top» this rule gave every such row the bar's height, padding and line (19.11: the cards of a tool's
   requests squeezed to 56 px and their text ran over the next card) */
header.top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px 0 20px; border-bottom: 1px solid var(--border); background: var(--paper); position: relative; z-index: 10; }
header.top h1 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg-subtle); font-size: 12.5px; min-width: 200px; transition: border-color var(--fast), box-shadow var(--fast); }
.search-btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.search-btn svg { width: 14px; height: 14px; }
.search-btn kbd { margin-left: auto; font: 500 10px/1 var(--font); border: 1px solid var(--border); border-radius: 4px; padding: 3px 5px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--pill); background: var(--bg-subtle); font-size: 11.5px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-faint); flex: none; display: inline-block; }
.dot.ok { background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 22%, transparent); }
.dot.warn { background: var(--yellow); box-shadow: 0 0 0 3px color-mix(in oklab, var(--yellow) 28%, transparent); }
.dot.err { background: var(--error); }
.dot.live { animation: pulse 1.6s ease-in-out infinite; }
.burger { display: none; }
.page { flex: 1; min-height: 0; overflow: auto; }
.page > .wrap { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; animation: route var(--route) var(--enter) both; }
.page > .wrap.narrow { max-width: 940px; }
.page > .fill { height: 100%; animation: route var(--route) var(--enter) both; }

/* ── type helpers ──────────────────────────────────────────────────────────────────────────────── */
.over { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-subtle); }
.h1 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.h2 { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.h3 { font-size: 14px; line-height: 1.35; font-weight: 600; }
.sub { font-size: 12.5px; line-height: 1.6; color: var(--fg-muted); }
.muted { color: var(--fg-muted); } .subtle { color: var(--fg-subtle); } .small { font-size: 12px; } .xs { font-size: 11px; }
.num { font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.screen-head .over { margin-bottom: 6px; }
.screen-head .sub { margin-top: 6px; max-width: 640px; font-size: 13.5px; }
.screen-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sec { margin-top: 30px; }
.sec-head { margin-bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head .over { margin-bottom: 6px; }
.sec-head .sub { margin-top: 4px; max-width: 640px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

/* ── buttons ───────────────────────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: var(--pill); font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--ink); color: var(--cream); transition: background var(--fast), transform var(--fast) var(--enter), box-shadow var(--fast), opacity var(--fast); flex: none; text-decoration: none; }
.btn:hover { background: color-mix(in srgb, var(--ink) 85%, transparent); }
.btn:active { transform: scale(.98); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn.out { background: var(--paper); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.btn.out:hover { background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn.ghost { background: transparent; color: var(--fg-muted); }
.btn.ghost:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.btn.danger { background: var(--paper); color: var(--error-fg); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--error) 35%, var(--paper)); }
.btn.danger:hover { background: var(--error-95); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; display: inline-block; }
.link { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--fg); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link svg { width: 13px; height: 13px; transition: transform var(--fast) var(--enter); }
.link:hover svg { transform: translateX(2px); }
.link.blue { color: var(--primary); }

/* ── cards ─────────────────────────────────────────────────────────────────────────────────────── */
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 14px 16px; transition: box-shadow var(--base), transform var(--base) var(--enter), border-color var(--base); min-width: 0; display: block; width: 100%; }
.card.pad { padding: 18px 20px; }
.card.click { cursor: pointer; }
.card.click:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.card.flat { border-style: dashed; background: var(--bg-muted); }
.card-foot { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-x { position: absolute; top: 10px; right: 10px; }
.tile { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; background: color-mix(in oklab, var(--tone, var(--ink)) 10%, var(--paper)); color: var(--tone, var(--ink)); }
.tile svg { width: 18px; height: 18px; }
.tile.lg { width: 44px; height: 44px; border-radius: var(--r-lg); } .tile.lg svg { width: 22px; height: 22px; }
.tile.sm { width: 26px; height: 26px; border-radius: var(--r-sm); } .tile.sm svg { width: 13px; height: 13px; }
.tile.dark { background: var(--ink); color: var(--cream); }
.tone-blue { --tone: var(--primary); } .tone-red { --tone: var(--red); } .tone-yellow { --tone: hsl(38, 88%, 36%); } .tone-green { --tone: hsl(108, 45%, 32%); } .tone-violet { --tone: var(--blue); } .tone-ink { --tone: var(--ink); }
.stat { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 16px 18px 14px; background: linear-gradient(160deg, color-mix(in oklab, var(--tone, var(--blue)) 7%, var(--paper)) 0%, var(--paper) 55%); transition: box-shadow var(--base), transform var(--base) var(--enter); text-align: left; display: block; width: 100%; }
.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--tone, var(--blue)) 0%, color-mix(in oklab, var(--tone, var(--blue)) 25%, transparent) 100%); }
.stat-l { font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.stat-v { margin-top: 12px; font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 14px; font-weight: 600; color: var(--fg-subtle); letter-spacing: 0; margin-left: 5px; }
.stat-f { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 11px; font-weight: 500; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creamcard { position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, #000 15%, var(--border)); padding: 16px 18px 14px; background: linear-gradient(135deg, var(--cream), color-mix(in oklab, var(--cream) 60%, var(--paper))); color: var(--ink); min-height: 124px; display: flex; flex-direction: column; }
.creamcard > .atom { position: absolute; top: 50%; right: -44px; width: 240px; height: 160px; margin-top: -80px; pointer-events: none; }
.creamcard > :not(.atom) { position: relative; z-index: 1; }
.creamcard .stat-v { font-size: 28px; margin-top: 10px; }
.creamcard .btn { align-self: flex-start; margin-top: auto; }
.creamcard .cc-note { font-size: 11px; font-weight: 500; color: color-mix(in oklab, var(--ink) 60%, var(--paper)); margin: 6px 0 12px; max-width: 68%; }

/* ── chips, avatars, misc ──────────────────────────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--pill); font-size: 11px; font-weight: 600; background: var(--bg-subtle); color: var(--fg-muted); white-space: nowrap; flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip svg { width: 11px; height: 11px; flex: none; }
.chip.blue { background: var(--primary-95); color: var(--primary-fg); } .chip.green { background: var(--success-95); color: var(--success-fg); }
.chip.yellow { background: var(--warn-95); color: var(--warn-fg); } .chip.red { background: var(--error-95); color: var(--error-fg); }
.chip.ink { background: var(--ink); color: var(--cream); } .chip.out { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.chip.cream { background: var(--cream); color: var(--ink); }
/* categories, as in To send (PRO-2173): chips with counts over a list, a badge, the groups of «Розмови»; theme tokens only */
.cat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.cat-chips::-webkit-scrollbar { display: none; }
.list-h .cat-chips { margin-top: 10px; }
.cat-pick { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--paper); color: var(--fg-muted); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cat-pick:hover { border-color: var(--border-strong); }
.cat-pick b { font-weight: 700; color: var(--fg); }
.cat-pick.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.cat-pick.on b { color: var(--on-ink); }
.cat-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--fg-subtle)); }
.chip.cat { background: color-mix(in oklab, var(--c) 14%, var(--paper)); color: color-mix(in oklab, var(--c) 72%, var(--fg)); }
.li-group { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-subtle); }
.li-group b { color: var(--fg); font-weight: 700; }
/* the calendar's meetings and the recorder's notes in a thread (PRO-2174) */
.event.ahead { border-style: dashed; }
.event.rec { flex-wrap: wrap; }
.event .rec-notes { flex: 1 1 100%; margin-top: 6px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; color: var(--fg-muted); text-align: left; }
.cal-rec { display: inline-flex; align-items: center; gap: 4px; }
/* «Вийшла нова версія сторінки» (web/app.js newRelease): above the phone's tab bar, out of the way of the page */
.newver { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; box-shadow: 0 8px 30px rgb(0 0 0 / .25); max-width: calc(100vw - 32px); }
.newver { width: max-content; }
.newver > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.newver .btn { background: var(--paper); color: var(--fg); flex: none; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; background: hsl(var(--h, 220), 46%, 93%); color: hsl(var(--h, 220), 42%, 30%); letter-spacing: -.01em; }
.av.sm { width: 24px; height: 24px; font-size: 10px; } .av.lg { width: 44px; height: 44px; font-size: 15px; } .av.xl { width: 56px; height: 56px; font-size: 18px; }
.av.ink { background: var(--ink); color: var(--cream); }
.sep { height: 1px; background: var(--border); margin: 14px 0; }
.dash { border-top: 1px dashed var(--border); margin: 12px 0; }
.skel { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--n95) 25%, hsl(194, 9%, 98%) 37%, var(--n95) 63%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; height: 12px; }
.empty { text-align: center; padding: 44px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-xl); background: var(--bg-muted); }
.empty .tile { margin: 0 auto 12px; }
.empty .h3 { font-size: 15px; } .empty .sub { margin: 6px auto 14px; max-width: 440px; }
.empty .btn { margin: 0 4px; }
.note { border-radius: var(--r-md); padding: 10px 12px; font-size: 12.5px; line-height: 1.55; background: var(--bg-subtle); color: var(--fg-muted); }
.note.blue { background: var(--primary-97); color: var(--primary-fg); box-shadow: inset 2px 0 0 var(--primary); }
.note.yellow { background: var(--warn-95); color: var(--warn-fg); box-shadow: inset 2px 0 0 var(--warn); }
.note.green { background: var(--success-95); color: var(--success-fg); box-shadow: inset 2px 0 0 var(--success); }
.note.red { background: var(--error-95); color: var(--error-fg); box-shadow: inset 2px 0 0 var(--error); }
.note.cream { background: var(--cream-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.check-draw { width: 44px; height: 44px; color: var(--success); display: block; margin: 0 auto 10px; }
.check-draw circle { stroke-dasharray: 126; stroke-dashoffset: 126; animation: draw .5s var(--enter) .05s forwards; }
.check-draw path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .3s var(--enter) .45s forwards; }

/* ── forms ─────────────────────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.hint { font-size: 11.5px; color: var(--fg-subtle); line-height: 1.5; }
.in, .ta, .sel { width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--paper); padding: 8px 11px; font-size: 13.5px; line-height: 20px; transition: border-color var(--fast), box-shadow var(--fast); outline: 0; }
.in:hover, .ta:hover, .sel:hover { border-color: var(--border-strong); }
.in:focus, .ta:focus, .sel:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.in::placeholder, .ta::placeholder { color: var(--fg-faint); }
.ta { resize: vertical; min-height: 84px; display: block; }
.ta.doc { min-height: 420px; font: 400 13px/1.65 var(--mono); padding: 16px 18px; border-radius: var(--r-xl); }
.sel { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7478' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; }
.in-ico { position: relative; }
.in-ico > svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--fg-subtle); pointer-events: none; }
.in-ico .in { padding-left: 32px; }
.sw { position: relative; width: 34px; height: 20px; border-radius: var(--pill); background: hsl(194, 9%, 82%); transition: background var(--base); flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--base) var(--spring); }
.sw[aria-checked="true"] { background: var(--ink); }
.sw[aria-checked="true"]::after { transform: translateX(14px); }
.sw[disabled] { opacity: .45; pointer-events: none; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--bg-subtle); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: 12.5px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; transition: background var(--fast), color var(--fast), box-shadow var(--fast); display: inline-flex; align-items: center; gap: 6px; flex: none; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--fg); font-weight: 600; box-shadow: var(--shadow-xs); }
.seg .n { font-size: 10.5px; font-weight: 600; color: var(--fg-subtle); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; padding: 9px 0 11px; font-size: 13px; font-weight: 500; color: var(--fg-subtle); white-space: nowrap; transition: color var(--fast); display: inline-flex; align-items: center; gap: 7px; flex: none; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); font-weight: 600; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; transform: scaleX(0); transition: transform var(--base) var(--enter); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs .n { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: var(--pill); background: var(--bg-subtle); color: var(--fg-muted); }

/* ── table ─────────────────────────────────────────────────────────────────────────────────────── */
.tablecard { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--paper); }
.tablecard .scrollx { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-subtle); text-align: left; padding: 10px 14px; background: var(--bg-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--fast); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: var(--bg-muted); }
.tbl .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl .who b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.tbl .who small { display: block; color: var(--fg-subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tbl td.cut { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--fg-subtle); background: var(--bg-muted); }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .in-ico { width: 280px; max-width: 100%; }

/* ── overlays ──────────────────────────────────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 34%, transparent); z-index: 80; animation: fade var(--base) var(--enter) both; display: grid; place-items: center; padding: 20px; }
.scrim.closing { opacity: 0; transition: opacity var(--fast) var(--exit); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--paper); border-radius: var(--r-2xl); box-shadow: var(--shadow-xl); animation: pop var(--slow) var(--spring) both; }
.modal.wide { width: min(720px, 100%); }
.modal-h { padding: 20px 22px 0; }
.modal-h .sub { margin-top: 6px; }
.modal-b { padding: 16px 22px 4px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 16px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.scrim.right { place-items: stretch end; padding: 0; }
.sheet { width: min(520px, 100vw); height: 100vh; background: var(--paper); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; animation: sheet var(--slow) var(--enter) both; }
.sheet.wide { width: min(700px, 100vw); }
.sheet-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); flex: none; }
.sheet-b { flex: 1; min-height: 0; overflow: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.sheet-b > * { flex-shrink: 0; }
.sheet-f { flex: none; padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--bg-muted); }
.menu { position: fixed; z-index: 95; min-width: 210px; max-width: 320px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 5px; animation: pop var(--base) var(--enter) both; transform-origin: top left; }
.menu button, .menu a { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: var(--r-sm); font-size: 13px; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--bg-subtle); }
.menu button > svg { width: 15px; height: 15px; color: var(--fg-subtle); flex: none; }
.menu button .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu button.danger { color: var(--error-fg); } .menu button.danger > svg { color: var(--error); }
.menu .menu-l { padding: 7px 9px 4px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-subtle); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 420px; background: var(--ink); color: var(--cream); border-radius: var(--r-xl); padding: 11px 14px; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-lg); animation: pop var(--slow) var(--spring) both; }
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast.err svg { color: #ff9c8a; } .toast.ok svg { color: #9fe08c; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity var(--base) var(--exit), transform var(--base) var(--exit); }
.scrim.topc { place-items: start center; }
.pal { width: min(600px, 100%); background: var(--paper); border-radius: var(--r-2xl); box-shadow: var(--shadow-xl); overflow: hidden; animation: pop var(--base) var(--enter) both; margin-top: 12vh; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pal-in svg { width: 16px; height: 16px; color: var(--fg-subtle); }
.pal-in input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; }
.pal-list { max-height: 380px; overflow: auto; padding: 6px; }
.pal-g { padding: 8px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-subtle); }
.pal-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-md); font-size: 13px; }
.pal-i > svg { width: 15px; height: 15px; color: var(--fg-subtle); flex: none; }
.pal-i small { margin-left: auto; color: var(--fg-subtle); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pal-i.on { background: var(--ink); color: var(--cream); } .pal-i.on > svg, .pal-i.on small { color: color-mix(in srgb, var(--cream) 70%, transparent); }

/* ── today ─────────────────────────────────────────────────────────────────────────────────────── */
/* no ceiling on a card at rest: a long letter on a phone was cut at 600 px together with its «Надіслати» (found by
   tools/devstand/check-layout.js, 19.11.2026). The ceiling is there only for the moment a card folds away. */
.decision { display: flex; gap: 14px; align-items: flex-start; overflow: hidden; }
.decision.gone { max-height: 600px; animation: fly var(--slow) var(--exit) forwards; }
.decision .body { flex: 1; min-width: 0; }
.decision .meta { font-size: 11.5px; color: var(--fg-subtle); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.decision .q { font-size: 14px; font-weight: 600; line-height: 1.4; }
.decision .ctx { margin-top: 4px; font-size: 12.5px; color: var(--fg-muted); line-height: 1.55; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.opt { padding: 6px 12px; border-radius: var(--pill); font-size: 12.5px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--border); background: var(--paper); transition: background var(--fast), box-shadow var(--fast), color var(--fast), transform var(--fast); text-align: left; }
.opt:hover { background: var(--ink); color: var(--cream); box-shadow: none; }
.opt:active { transform: scale(.98); }
.answer-row { display: flex; gap: 8px; margin-top: 10px; }
.feed-i { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; line-height: 1.45; }
.feed-i:last-child { border-bottom: 0; }
.feed-i time { display: block; font-size: 11px; color: var(--fg-subtle); margin-top: 1px; }
.modstrip { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.modstrip button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-md); font-size: 12.5px; width: 100%; transition: background var(--fast); }
.modstrip button:hover { background: var(--bg-subtle); }
.modstrip .t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modstrip small { color: var(--fg-subtle); font-size: 11.5px; white-space: nowrap; }

/* ── inbox ─────────────────────────────────────────────────────────────────────────────────────── */
.inbox { display: grid; grid-template-columns: 336px minmax(0, 1fr) 312px; height: 100%; }
.inbox.no-lead { grid-template-columns: 336px minmax(0, 1fr); }
.list-h .seg button { padding: 0 10px; }
.list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.list-h { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); flex: none; }
.list-b { flex: 1; min-height: 0; overflow: auto; padding: 6px; }
.li { display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: var(--r-lg); transition: background var(--fast); position: relative; }
.li:hover { background: var(--bg-subtle); }
.li.on { background: var(--cream-2); box-shadow: inset 0 0 0 1px var(--line); }
.li .mid { flex: 1; min-width: 0; }
.li .l1 { display: flex; align-items: baseline; gap: 8px; }
.li .l1 b { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .l1 time { font-size: 11px; color: var(--fg-subtle); flex: none; }
.li .l2 { font-size: 12px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .l3 { font-size: 12.5px; color: var(--fg-muted); margin-top: 3px; line-height: 1.4; }
.li .flags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-muted); overflow-x: clip; container: conv / inline-size; }
.conv-h { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--paper); flex: none; }
.conv-h .t { flex: 1; min-width: 96px; }
.conv-h .t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-h .t small { display: block; font-size: 12px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-h .back { display: none; }
.thread { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 10px; }
.thread > * { flex-shrink: 0; }
.day { align-self: center; font-size: 11px; font-weight: 500; color: var(--fg-subtle); padding: 3px 10px; border-radius: var(--pill); background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); margin: 6px 0; }
.bubble { max-width: min(640px, 86%); padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; animation: rise var(--base) var(--enter) both; }
.bubble.in { align-self: flex-start; background: var(--paper); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--cream); border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.bubble .who { display: flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 600; color: var(--fg-subtle); margin-bottom: 4px; }
/* The bottom of a conversation: the message itself sits where a messenger has its field (Andrii, 19.11.2026). The
   Writer's row is the thin strip above it; the letter the Writer prepared lands in the field, to fix and send. */
/* never more than about two thirds of the conversation's height: the letter and its reasons scroll inside, the
   thread above keeps a place of its own */
.composer { flex: none; max-height: min(70%, 66vh); margin: 8px 20px 18px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; transition: border-color var(--base), box-shadow var(--base); }
.composer:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.writer { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--cream), color-mix(in oklab, var(--cream) 55%, var(--paper))); }
.writer > svg { flex: none; width: 15px; height: 15px; color: var(--fg-muted); }
.writer .ta { flex: 1; min-width: 0; border: 0; padding: 0; min-height: 20px; max-height: 96px; resize: none; box-shadow: none !important; background: transparent; font-size: 13px; line-height: 1.5; }
.writer { flex: none; }
.writer .btn { flex: none; }
/* the note is one line until a person writes more: a long example is cut, not wrapped */
.writer .ta::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
/* a long letter with its reasons scrolls inside the field, so the conversation above keeps its place */
.msg-b { padding: 12px 14px 2px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 46px; max-height: min(46vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.msg-b > * { flex-shrink: 0; }
.msg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-h .atom { width: 20px; height: 20px; flex: none; }
.msg-h b { font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.msg-subj { font-weight: 600; }
.msg-ta { width: 100%; border: 0; outline: 0; resize: none; font-size: 13.5px; line-height: 1.65; background: transparent; padding: 0; overflow: hidden; display: block; min-height: 24px; color: inherit; font-family: inherit; }
.msg-typing { font-size: 13.5px; line-height: 1.65; }
.msg-typing.typing::after { content: "▍"; animation: caret .9s steps(1) infinite; color: var(--spot); margin-left: 1px; }
.msg-f { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 14px; flex: none; }
.msg-ch { height: 28px; padding: 0 10px; flex: none; }
.msg-route { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-f .btn { flex: none; }
.msg-paste { padding: 0 14px 12px; }
.msg-paste .seg button { padding: 0 8px; font-size: 12px; }
/* a message on its way: there until the pause for «Скасувати» ends */
.bubble.pending { opacity: .6; }
.bubble .unsend { font: inherit; font-weight: 600; color: var(--fg); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* a long list name in a person's card is cut, not pushed past both edges */
.hero .row.wrap { max-width: 100%; }
.hero .row.wrap .chip { display: inline-block; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero .row.wrap .chip svg { vertical-align: -2px; margin-right: 4px; }
.thinking { padding: 2px 0 10px; display: flex; flex-direction: column; gap: 9px; }
.thinking .atom { width: 20px; height: 20px; flex: none; }
.thinking .st b { font-size: 12px; font-weight: 600; color: var(--fg); }
.thinking .st { font-size: 12.5px; color: var(--fg-muted); display: flex; gap: 8px; align-items: center; min-height: 18px; }
.why summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--fg-muted); list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.why summary::-webkit-details-marker { display: none; }
.why summary svg { width: 12px; height: 12px; transition: transform var(--fast); }
.why[open] summary svg { transform: rotate(90deg); }
.why ul { margin: 8px 0 0; padding: 0 0 0 16px; font-size: 12.5px; color: var(--fg-muted); line-height: 1.6; }
.profile { border-left: 1px solid var(--border); overflow: auto; padding: 20px 18px 28px; display: flex; flex-direction: column; gap: 16px; background: var(--paper); }
.profile > * { flex-shrink: 0; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.hero b { font-size: 15px; font-weight: 600; margin-top: 8px; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 7px 10px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--fg-subtle); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.kv a { color: var(--primary); text-decoration: none; } .kv a:hover { text-decoration: underline; }
.conv-empty { flex: 1; display: grid; place-items: center; padding: 24px; }

/* ── board (pipeline) ──────────────────────────────────────────────────────────────────────────── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-size: 12px; font-weight: 600; }
.col-h .n { margin-left: auto; color: var(--fg-subtle); font-weight: 500; }
.col-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--fg-faint)); }
.pcard { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 4px; width: 100%; transition: box-shadow var(--fast), transform var(--fast) var(--enter); }
.pcard:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.pcard b { font-size: 13px; font-weight: 600; } .pcard small { font-size: 12px; color: var(--fg-subtle); }
.col-more { font-size: 11.5px; color: var(--fg-subtle); padding: 2px 4px; }

/* ── meetings / content / agents / skills / modules ────────────────────────────────────────────── */
.top-l { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--fg-subtle); margin-bottom: 6px; flex-wrap: wrap; }
.mcard .h3 { font-size: 15px; }
.mcard .sub { margin-top: 6px; }
.counts { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--fg-muted); flex-wrap: wrap; }
.counts b { font-weight: 600; color: var(--fg); margin-right: 3px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; line-height: 1.5; width: 100%; }
.task:last-child { border-bottom: 0; }
.task .box { width: 17px; height: 17px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--border-strong); flex: none; margin-top: 2px; display: grid; place-items: center; transition: background var(--fast), box-shadow var(--fast); }
.task .box svg { width: 11px; height: 11px; color: var(--on-ink); opacity: 0; transform: scale(.5); transition: opacity var(--fast), transform var(--base) var(--spring); }
.task.done .box { background: var(--ink); box-shadow: none; } .task.done .box svg { opacity: 1; transform: none; }
.task.done .tx { color: var(--fg-subtle); text-decoration: line-through; }
.task small { display: block; color: var(--fg-subtle); font-size: 11.5px; }
.topic { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.topic:last-child { border-bottom: 0; }
.topic .t { display: flex; gap: 8px; align-items: baseline; font-weight: 600; font-size: 13px; }
.topic .t time { font: 500 11px/1 var(--mono); color: var(--fg-subtle); }
.topic ul, .bul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--fg-muted); line-height: 1.6; }
.transcript { font-size: 13px; line-height: 1.7; color: var(--fg-muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.idea .hook { font-size: 14.5px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.idea .why2 { margin-top: 8px; font-size: 12.5px; color: var(--fg-muted); line-height: 1.55; }
.quote { border-left: 2px solid var(--spot); padding: 2px 0 2px 10px; font-size: 12.5px; color: var(--fg-muted); font-style: italic; margin-top: 10px; line-height: 1.5; }
.agent { display: flex; flex-direction: column; gap: 10px; }
.agent .hd { display: flex; align-items: center; gap: 12px; }
.agent .hd b { font-size: 14px; font-weight: 600; display: block; }
.agent .hd small { font-size: 12px; color: var(--fg-subtle); }
.agent.off { background: var(--bg-muted); } .agent.off .tile { filter: grayscale(1); opacity: .6; }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.mini div { font-size: 11px; color: var(--fg-subtle); }
.mini b { display: block; font-size: 15px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.skill { display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.skill .hd { display: flex; align-items: flex-start; gap: 10px; }
.md { font-size: 13.5px; line-height: 1.7; color: var(--fg-muted); }
.md h4 { font-size: 13px; font-weight: 600; color: var(--fg); margin: 16px 0 6px; }
.md h4:first-child { margin-top: 0; }
.md ul { margin: 6px 0; padding-left: 18px; } .md li { margin: 3px 0; } .md p { margin: 8px 0; }
.md p:first-child { margin-top: 0; }
.mod { display: flex; gap: 12px; align-items: flex-start; }
.mod .body { flex: 1; min-width: 0; }
.mod .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod.soon { background: var(--bg-muted); border-style: dashed; }
.mod.soon .tile { opacity: .55; }
.canvas { position: relative; border: 1px solid var(--line); border-radius: var(--r-2xl); background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 0) 0 0 / 18px 18px, var(--cream-2); padding: 24px; overflow: hidden; }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 30px; align-items: center; position: relative; z-index: 1; }
.lane { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: center; }
.lane-l { grid-column: 1 / -1; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 50%, transparent); margin-top: 6px; }
.lane-l:first-child { margin-top: 0; }
.node { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-xs); width: 100%; transition: transform var(--fast) var(--enter), box-shadow var(--fast); }
.node:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.node.off { background: color-mix(in srgb, var(--paper) 50%, transparent); border-style: dashed; color: var(--fg-subtle); box-shadow: none; }
.node .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.corewrap { display: grid; place-items: center; }
.core { width: 150px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; text-align: center; position: relative; box-shadow: 0 0 0 10px color-mix(in srgb, var(--ink) 5%, transparent), var(--shadow-lg); }
.core > .atom { position: absolute; left: -27%; top: -27%; width: 154%; height: 154%; color: var(--ink); opacity: .5; pointer-events: none; }
.core b { font-size: 15px; font-weight: 600; display: block; position: relative; }
.core small { font-size: 11px; opacity: .7; display: block; margin-top: 2px; position: relative; }

/* ── assistant panel ───────────────────────────────────────────────────────────────────────────── */
.ask { width: min(440px, 100vw); }
.ask .sheet-h { align-items: center; background: linear-gradient(135deg, var(--cream), color-mix(in oklab, var(--cream) 55%, var(--paper))); border-bottom-color: var(--line); }
.ask .sheet-h .atom { width: 34px; height: 34px; flex: none; }
.ask-log { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-muted); }
.ask-log > * { flex-shrink: 0; }
.ask-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; animation: rise var(--base) var(--enter) both; }
.ask-msg.me { align-self: flex-end; background: var(--ink); color: var(--cream); border-bottom-right-radius: 4px; }
.ask-msg.ai { align-self: flex-start; background: var(--paper); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ask-msg .links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ask-sugg { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ask-sugg button { text-align: left; padding: 9px 12px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--border); font-size: 12.5px; transition: border-color var(--fast), box-shadow var(--fast); }
.ask-sugg button:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.ask-in { flex: none; padding: 12px 14px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; background: var(--paper); }
.ask-in textarea { flex: 1; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 9px 12px; outline: 0; resize: none; max-height: 140px; font-size: 13.5px; line-height: 1.5; display: block; }
.ask-in textarea:focus { border-color: var(--ink); }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-faint); animation: pulse 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }

/* ── home (workspace picker) ───────────────────────────────────────────────────────────────────── */
.home { min-height: 100vh; background: var(--cream); display: flex; flex-direction: column; align-items: center; padding: 56px 20px 80px; position: relative; overflow: hidden; }
.home > .atom { position: absolute; right: -200px; top: -110px; width: 820px; height: 560px; color: var(--ink); opacity: .55; pointer-events: none; }
.home-in { width: min(940px, 100%); position: relative; z-index: 1; }
.home-in > img { height: 64px; display: block; margin-bottom: 44px; }
.home h1 { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; max-width: 640px; }
.home .lead { font-size: 15px; line-height: 1.6; color: color-mix(in oklab, var(--ink) 70%, var(--paper)); margin-top: 12px; max-width: 580px; }
.home .grid { margin-top: 34px; }
.wscard { display: flex; flex-direction: column; gap: 12px; padding: 18px; text-align: left; }
.wscard .hd { display: flex; align-items: center; gap: 12px; }
.wscard .ws-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
.wscard .hd b { font-size: 15px; font-weight: 600; display: block; }
.wscard .hd small { font-size: 12px; color: var(--fg-subtle); }
.wscard.new { border-style: dashed; background: color-mix(in srgb, var(--paper) 50%, transparent); align-items: center; justify-content: center; text-align: center; min-height: 150px; }

/* ── phone ─────────────────────────────────────────────────────────────────────────────────────── */
.bnav { display: none; }
@media (max-width: 1180px) {
  .inbox, .inbox.no-lead { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox .profile { display: none; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lanes { gap: 16px; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); }
  .lane { grid-template-columns: minmax(0, 1fr); }
  .core { width: 130px; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .side-logo img { height: 40px; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform var(--slow) var(--enter); z-index: 60; }
  .app.nav-open .side { transform: none; box-shadow: var(--shadow-xl); }
  .nav-scrim { display: none; }
  .app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 30%, transparent); z-index: 55; animation: fade var(--base) both; }
  .burger { display: inline-grid; }
  header.top { padding: 0 12px 0 8px; gap: 6px; }
  .search-btn { min-width: 0; padding: 0 9px; } .search-btn span, .search-btn kbd, .status-pill { display: none; }
  .page > .wrap { padding: 20px 16px 40px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-v { font-size: 28px; }
  .inbox, .inbox.no-lead { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-lead .list, .inbox:not(.has-lead) .conv { display: none; }
  .conv-h .back { display: inline-grid; }
  /* a phone's head holds the name first. The category is in the list, the agent has its own tab: with both here the
     name shrank to nothing and «⋯» sat past the edge of the screen (19.11.2026) */
  .conv-h { padding: 10px 12px; gap: 8px; }
  .conv-h .t { min-width: 72px; }
  .conv-h .chip.cat, .conv-h .ask-lead { display: none; }
  .composer { margin: 8px 10px 12px; } .thread { padding: 14px 12px 6px; }
  .msg-b { max-height: min(38vh, 340px); } .writer-x { max-height: min(24vh, 200px); }
  /* a phone's row under the field: the channel, the three dots, «Smart Send» as its clock, «Надіслати». Where the
     letter leaves from is one tap away, in the title of the channel */
  .msg-f .msg-route { visibility: hidden; }
  .msg-f [data-smart] { font-size: 0; gap: 0; padding: 0 11px; }
  .bnav { --ink: var(--rail-fg); --cream: var(--rail); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rail-line); background: var(--rail); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 10px; font-weight: 500; color: color-mix(in srgb, var(--ink) 55%, transparent); border-radius: var(--r-md); position: relative; }
  .bnav button svg { width: 19px; height: 19px; }
  .bnav button.active { color: var(--ink); font-weight: 600; }
  .bnav button .n { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 15px; height: 15px; border-radius: 8px; background: var(--red); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
  .sheet, .sheet.wide, .ask { width: 100vw; }
  .lanes { grid-template-columns: minmax(0, 1fr); } .core { width: 140px; margin: 0 auto; } .lane { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbl .hide-s { display: none; }
  .home h1 { font-size: 26px; }
  .home { padding-top: 36px; }
  #toasts { left: 12px; right: 12px; bottom: 74px; align-items: stretch; }
  .screen-head { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .atom .e-spin, .atom .e-unspin { animation-duration: 60s !important; }
  .skel { animation: none; }
}

/* a re-render of the same page (after an action) must not replay entrances */
.soft, .soft .rise, .soft .fade { animation: none !important; }
.sheet.ask { border-left: 1px solid var(--border); box-shadow: var(--shadow-xl); }
body.ask-open #toasts { right: 460px; }
.composer .seg button { padding: 0 8px; font-size: 12px; }
@media (max-width: 820px) { body.ask-open #toasts { right: 12px; } }

/* a conversation across channels */
.conv-filter { padding: 8px 20px; border-bottom: 1px solid var(--border); background: var(--paper); flex: none; overflow-x: auto; }
.bubble.ext { border-style: dashed; }
.bubble .subj2 { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.event { align-self: center; display: inline-flex; align-items: center; gap: 8px; max-width: 92%; font-size: 12px; color: var(--fg-muted); padding: 5px 12px; border-radius: var(--pill); background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); animation: rise var(--base) var(--enter) both; }
.event svg { width: 13px; height: 13px; flex: none; color: var(--fg-subtle); }
.event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event .subtle { flex: none; }
@media (max-width: 820px) { .conv-filter { padding: 8px 12px; } }

/* sign-in, invitations */
.auth { min-height: 100vh; min-height: 100dvh; background: var(--cream); display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth > .atom { position: absolute; right: -220px; top: -120px; width: 820px; height: 560px; color: var(--ink); opacity: .5; pointer-events: none; }
.auth-card { position: relative; z-index: 1; width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: 28px 26px 22px; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 44px; }
.home-top img { margin: 0; }
/* first steps */
.onb { background: linear-gradient(135deg, var(--cream-2), var(--paper) 60%); border-color: var(--line); }
.onb-step { display: flex; align-items: flex-start; gap: 12px; padding: 9px 10px; border-radius: var(--r-lg); }
.onb-step.next { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-xs); }
.onb-step.done .h3 { color: var(--fg-subtle); text-decoration: line-through; font-weight: 500; }
.onb-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 1.5px var(--border-strong); color: var(--fg-muted); }
.onb-step.next .onb-n { background: var(--ink); color: var(--cream); box-shadow: none; }
.onb-step.done .onb-n { background: var(--success-95); color: var(--success-fg); box-shadow: none; }
.onb-n svg { width: 13px; height: 13px; }
.home-top img { height: 64px; display: block; }
@media (max-width: 720px) { .home-top img { height: 48px; } }

/* the server is answering for longer than a blink */
#net { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 90; pointer-events: none; opacity: 0; transition: opacity var(--fast); overflow: hidden; }
#net.on { opacity: 1; }
#net::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 34%; background: var(--accent, var(--ink)); border-radius: 2px; animation: net 1.1s var(--enter) infinite; }
@keyframes net { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
.card.gone:not(.decision) { animation: fly var(--slow) var(--exit) forwards; }
.modstrip button > svg { width: 14px; height: 14px; color: var(--fg-subtle); }
@media (prefers-reduced-motion: reduce) { #net::before { animation-duration: 2.4s; } }

/* logos and photos */
.logo { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; overflow: hidden; background: hsl(var(--h, 220), 46%, 93%); color: hsl(var(--h, 220), 42%, 30%); }
.logo.has { background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; display: block; }
.logo.l2 { width: 36px; height: 36px; border-radius: var(--r-md); } .logo.sm { width: 26px; height: 26px; border-radius: var(--r-sm); font-size: 11px; } .logo.sm img { padding: 4px; }
.logo.xs { width: 16px; height: 16px; border-radius: 4px; font-size: 8px; } .logo.xs img { padding: 1.5px; }
.av { overflow: hidden; } .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.has { background: var(--n95); }
.avw { position: relative; display: inline-flex; flex: none; align-self: flex-start; height: max-content; line-height: 0; }
.who > .avw, .row > .avw, .conv-h > .avw { align-self: center; }
.avw > .logo.badge { position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 5px; font-size: 8px; box-shadow: 0 0 0 2px var(--paper); }
.avw > .logo.badge.has { box-shadow: 0 0 0 2px var(--paper); } .avw > .logo.badge img { padding: 1.5px; }
.avw.xl > .logo.badge { width: 22px; height: 22px; border-radius: 7px; right: -3px; bottom: -2px; } .avw.lg > .logo.badge { width: 18px; height: 18px; }
.li.on .avw > .logo.badge { box-shadow: 0 0 0 2px var(--cream-2); }
.ws-mark { overflow: hidden; } .ws-mark.has { background: #fff !important; box-shadow: inset 0 0 0 1px var(--border); }
.ws-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; display: block; }
.hero .avw { margin: 0 auto; }

/* social sign-in */
.btn.social { gap: 10px; font-weight: 600; } .btn.social svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; font-size: 11.5px; color: var(--fg-subtle); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── 19.11.2026: the agent's work (tasks, letters that are ready), the tools page, the rhythm of letters ───────── */
.nav-row .n.live { background: color-mix(in oklab, var(--spot) 18%, transparent); color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
/* a letter on «Сьогодні»: who, what they wrote, what we answer; edited in place */
.letter { display: block; }
.letter .body { display: flex; flex-direction: column; }
.letter-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.who2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who2 b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.who2 small { display: block; font-size: 11.5px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.who2:hover b { text-decoration: underline; text-underline-offset: 2px; }
.theirs { align-self: flex-start; max-width: 92%; background: var(--bg-subtle); border-radius: 14px 14px 14px 4px; padding: 9px 12px; font-size: 13px; line-height: 1.55; color: var(--fg-muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.theirs small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 2px; }
.ours { align-self: stretch; background: color-mix(in oklab, var(--cream) 55%, var(--paper)); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 10px 12px; }
.ours:focus-within { border-color: var(--border-strong); background: var(--paper); box-shadow: var(--shadow-xs); }
.ours .subj { height: 30px; font-weight: 600; font-size: 13px; margin-bottom: 6px; background: transparent; border: 0; border-bottom: 1px dashed var(--border); border-radius: 0; padding: 0 0 6px; box-shadow: none; }
textarea.sms { width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 0; font-size: 13.5px; line-height: 1.6; display: block; overflow: hidden; }
/* what the agent does right now */
.now-i { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; margin: 0 -8px; border-radius: var(--r-md); transition: background var(--fast); }
.now-i:hover { background: var(--bg-subtle); }
.now-i b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.now-i small { display: block; font-size: 11.5px; color: var(--fg-subtle); line-height: 1.4; margin-top: 1px; }
.now-i .spin, .now-i .dot { margin-top: 4px; flex: none; }
.composer2 { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--base), box-shadow var(--base); }
.composer2:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.composer2.compact { border: 0; padding: 0; gap: 8px; }
.composer2.compact:focus-within { box-shadow: none; }
.composer2.compact .ask-task { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 9px 11px; min-height: 40px; }
.composer2.compact .row .xs { display: none; }
.composer2.compact .row { justify-content: flex-end; }
.ask-task { border: 0; outline: 0; resize: none; padding: 0; font-size: 14px; line-height: 1.55; min-height: 44px; width: 100%; background: transparent; box-shadow: none; overflow: hidden; }
.trow { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.trow b { font-size: 13.5px; font-weight: 600; }
.steps { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 5px; }
.step { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; padding: 4px 0 4px 14px; position: relative; color: var(--fg-muted); }
.step::before { content: ""; position: absolute; left: -5px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--border-strong); }
.step.live { color: var(--fg); font-weight: 500; }
.step.live::before { background: var(--spot); box-shadow: 0 0 0 3px color-mix(in oklab, var(--spot) 25%, transparent); animation: pulse 1.6s ease-in-out infinite; }
.step time { color: var(--fg-faint); font-variant-numeric: tabular-nums; flex: none; }
.src { display: flex; align-items: center; gap: 12px; text-align: left; }
.src > svg.ic { color: var(--fg-faint); flex: none; }
/* one of a few ways, as a card (the «Видалити» dialog of a tool): the chosen card is outlined */
.pick-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; transition: box-shadow var(--fast), background var(--fast); }
.pick-card + .pick-card { margin-top: 8px; }
.pick-card > input { margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.pick-card.on { background: var(--bg-muted); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pick-card.off { cursor: default; opacity: .6; }
.pick-card .bul { margin: 6px 0 0; }
.did { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.planbox .sw { flex: none; }
/* the rhythm of letters as a line of steps */
.seqline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px; border-radius: var(--r-lg); background: var(--bg-muted); border: 1px dashed var(--border); }
.seqline .st { padding: 4px 10px; border-radius: var(--pill); background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); font-size: 12px; font-weight: 600; white-space: nowrap; }
.seqline .gap { font-size: 11px; color: var(--fg-subtle); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seqline .gap::before, .seqline .gap::after { content: ""; width: 10px; height: 1px; background: var(--border-strong); }
/* the tools page: tools on the left, a line from each to the agent */
.wire { position: relative; display: grid; grid-template-columns: minmax(0, 420px) minmax(120px, 1fr) 220px; align-items: center; gap: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-2xl); background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 0) 0 0 / 18px 18px, var(--cream-2); }
.wcol { display: flex; flex-direction: column; gap: 8px; grid-column: 1; position: relative; z-index: 1; }
.wnode { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow-xs); transition: transform var(--fast), box-shadow var(--fast); }
.wnode:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.wnode b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wnode small { display: block; font-size: 11.5px; color: var(--fg-subtle); }
.wnode.off { border-style: dashed; }
.wnode.add { background: color-mix(in srgb, var(--paper) 55%, transparent); border-style: dashed; box-shadow: none; }
.wnode.add:hover { background: var(--paper); }
.wlines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wlines path { fill: none; stroke: color-mix(in srgb, var(--ink) 38%, transparent); stroke-width: 1.4; }
.wlines path.dash { stroke-dasharray: 4 5; stroke: color-mix(in srgb, var(--ink) 22%, transparent); }
.wagent { grid-column: 3; justify-self: end; width: 200px; padding: 18px 14px; border-radius: var(--r-2xl); background: var(--ink); color: var(--cream); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; position: relative; z-index: 1; box-shadow: var(--shadow-lg); }
.wagent .atom { width: 70px; height: 70px; color: var(--cream); margin-bottom: 4px; }
.wagent b { font-size: 15px; font-weight: 600; }
.wagent small { font-size: 12px; opacity: .75; }
.wagent .xs { font-size: 11px; opacity: .55; margin-top: 6px; }
.cat { display: flex; align-items: flex-start; gap: 12px; }
.cat .body { flex: 1; min-width: 0; }
.cat > .btn { flex: none; }
.chip.tool { height: 26px; padding: 0 10px; font-size: 12px; gap: 7px; cursor: pointer; background: var(--paper); }
.chip.tool:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip.tool .subtle { font-weight: 500; }
@media (max-width: 860px) {
  .wire { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .wagent { grid-column: 1; justify-self: stretch; width: auto; flex-direction: row; gap: 12px; text-align: left; padding: 12px 14px; }
  .wagent .atom { width: 44px; height: 44px; margin: 0; }
  .wagent .xs { display: none; }
  .wlines { display: none; }
  .cat { flex-wrap: wrap; } .cat > .btn { margin-left: 48px; }
  .who2 small { max-width: 200px; }
}
/* ── an agency: its name on top of the rail, its clients' projects under it, «YEP × OBRIY» inside a project ──── */
.ag { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 2px; }
.ag-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-lg); background: var(--rail-card); margin-bottom: 6px; color: var(--rail-fg); min-width: 0; transition: background var(--fast); }
.ag-head:hover { background: var(--rail-card-hover); }
.ag-head .nm { min-width: 0; flex: 1; }
.ag-head b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-head b i { font-style: normal; font-weight: 400; opacity: .55; }
.ag-head small { display: block; font-size: 11px; opacity: .6; }
.xmark { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.xmark > i { font-style: normal; font-size: 11px; opacity: .5; }
.ag-row { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: var(--r-md); font-size: 12.5px; font-weight: 500; color: color-mix(in srgb, var(--rail-fg) 78%, transparent); width: 100%; text-align: left; transition: background var(--fast), color var(--fast); }
.ag-row:hover { background: var(--rail-card); color: var(--rail-fg); }
.ag-row.on { background: var(--rail-card-hover); color: var(--rail-fg); font-weight: 600; box-shadow: var(--shadow-xs); }
.ag-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row small { font-size: 10.5px; opacity: .55; white-space: nowrap; }
.ag-row .ico { width: 20px; height: 20px; display: grid; place-items: center; flex: none; opacity: .7; }
.ag-row .ico svg { width: 14px; height: 14px; }
.ag-row.add { opacity: .75; }
.team-btn { height: 28px; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.spark i { width: 5px; border-radius: 1px; background: var(--border-strong); display: block; }
.spark i.hit { background: var(--spot); }
.ag-group { margin-bottom: 8px; }
@media (max-width: 640px) { .team-btn { display: none; } }
.ag-head, .ag-row, .who2, a.card { text-decoration: none; }
.ag-head b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* ── a project's own pages and the shared view ───────────────────────────────────────────────────── */
.nav-label { display: flex; align-items: center; justify-content: space-between; }
.nav-add { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; opacity: .55; }
.nav-add:hover { opacity: 1; background: var(--rail-card); }
.nav-add svg { width: 12px; height: 12px; }
.grid.g2.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.g3.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.funnel { display: flex; flex-direction: column; gap: 7px; }
.f-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.f-l { color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-bar { height: 14px; border-radius: 4px; background: var(--bg-subtle); overflow: hidden; }
.f-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tone, var(--ink)); }
.f-row b { text-align: right; font-weight: 600; }
.wk { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 14px; }
.wk-c { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wk-n { font-size: 11px; font-weight: 600; color: var(--fg-muted); height: 14px; }
.wk-b { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; gap: 3px; }
.wk-b i, .wk-b em { flex: 1; display: block; border-radius: 3px 3px 0 0; background: color-mix(in oklab, var(--blue) 70%, var(--paper)); }
.wk-b em { background: var(--success); }
.wk-c small { font-size: 10.5px; color: var(--fg-faint); white-space: nowrap; }
.wk-leg { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--fg-subtle); }
.wk-leg span { display: inline-flex; align-items: center; gap: 6px; }
.wk-leg i, .wk-leg em { width: 10px; height: 10px; border-radius: 2px; background: color-mix(in oklab, var(--blue) 70%, var(--paper)); display: block; } .wk-leg em { background: var(--success); }
.ins-h { font-size: 15px; font-weight: 600; line-height: 1.45; margin-bottom: 10px; }
.ins-i { padding: 10px 0; border-top: 1px dashed var(--border); font-size: 13px; line-height: 1.55; }
.ins-i b { display: block; font-weight: 600; margin-bottom: 2px; }
.shared { min-height: 100vh; background: var(--bg-muted); }
.shared-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; background: var(--paper); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.shared-h b { font-size: 15px; }
.shared-b { max-width: 1060px; margin: 0 auto; padding: 28px 20px 60px; }
@media (max-width: 640px) { .f-row { grid-template-columns: 96px minmax(0, 1fr) 36px; } .wk { gap: 5px; } .grid.g3.kpis, .grid.g4.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the microphone: quiet until pressed, then a red dot and a timer */
.btn.voice { padding: 0 10px; gap: 6px; min-width: 36px; }
.btn.voice.sm { height: 34px; }
.btn.voice .v-t { font-variant-numeric: tabular-nums; font-size: 12px; }
.btn.voice .v-t:empty { display: none; }
.btn.voice.rec { background: var(--error-95); color: var(--error-fg); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--error) 45%, transparent); }
.btn.voice.rec svg { animation: pulse 1.1s ease-in-out infinite; }
.btn.voice.busy { opacity: .7; pointer-events: none; }
/* ── blocks people fill on a project's own page: facts, notes, a table, targets, a checklist, a pipeline board ──── */
.weeks { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.weeks button { height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px var(--border); background: var(--paper); color: var(--fg-muted); transition: background var(--fast), color var(--fast); }
.weeks button:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.weeks button.on { background: var(--ink); color: var(--cream); box-shadow: none; font-weight: 600; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; padding: 4px 2px 14px; border-bottom: 2px solid var(--ink); }
.facts small { display: block; font-size: 11.5px; color: var(--fg-subtle); margin-bottom: 2px; }
.facts b { font-size: 13.5px; font-weight: 600; }
textarea.pnote { min-height: 84px; font-size: 13.5px; line-height: 1.65; background: var(--bg-muted); }
.pnote-r { font-size: 13.5px; line-height: 1.65; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.ptable td { padding-top: 6px; padding-bottom: 6px; } .ptable td.rl { font-weight: 500; white-space: nowrap; }
.ptable .cell { height: 30px; min-width: 70px; padding: 0 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.tg { background: var(--paper); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tg .tg-v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tg .tg-in { height: 34px; width: 96px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tg .auto { margin-left: 6px; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--success-fg); background: var(--success-95); padding: 1px 5px; border-radius: 4px; }
.checks { display: flex; flex-direction: column; }
.chk { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.45; }
.chk input { width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.chk .box { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--border-strong); display: grid; place-items: center; flex: none; } .chk .box svg { width: 11px; height: 11px; }
.chk.done .grow { text-decoration: line-through; color: var(--fg-subtle); }
.kb { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kb-col { flex: 0 0 228px; background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 96px; transition: background var(--fast), border-color var(--fast); }
.kb-col.over { background: color-mix(in oklab, var(--spot) 9%, var(--paper)); border-color: var(--spot); }
.kb-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 4px 4px; }
.kb-h .n { font-variant-numeric: tabular-nums; color: var(--fg-subtle); background: var(--paper); border-radius: var(--pill); padding: 0 7px; box-shadow: inset 0 0 0 1px var(--border); }
.kb-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 9px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-xs); }
.kb-card[draggable="true"] { cursor: grab; } .kb-card.drag { opacity: .45; }
.kb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
button.kb-dot { cursor: pointer; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--border); }
.kb-n { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.kb-n:hover { text-decoration: underline; text-underline-offset: 2px; }
.kb-li, .kb-x { width: 18px; height: 18px; display: grid; place-items: center; color: var(--fg-faint); flex: none; border-radius: 4px; } .kb-li svg, .kb-x svg { width: 12px; height: 12px; }
.kb-li:hover, .kb-x:hover { color: var(--fg); background: var(--bg-subtle); }
.kb-c { font-size: 11px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-note { width: 100%; border: 0; outline: 0; background: var(--bg-muted); border-radius: 5px; padding: 4px 6px; font-size: 11.5px; line-height: 1.4; color: var(--fg-muted); }
.kb-note:focus { background: var(--paper); box-shadow: inset 0 0 0 1px var(--border-strong); }
.kb-empty { font-size: 11px; color: var(--fg-faint); text-align: center; padding: 14px 0; border: 1px dashed var(--border); border-radius: var(--r-md); }
.kb-leg { gap: 14px; font-size: 11.5px; color: var(--fg-subtle); } .kb-leg span { display: inline-flex; align-items: center; gap: 6px; } .kb-leg i { width: 8px; height: 8px; border-radius: 50%; display: block; }
/* the reasoning next to a letter, and the talk about a list's brief */
.reason { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; font-size: 13px; line-height: 1.55; }
.reason .over { margin-bottom: 3px; } .reason p { color: var(--fg-muted); } .reason .bul { color: var(--fg-muted); }
.reason .chip { height: 18px; font-size: 10px; vertical-align: 1px; }
.note.warn { color: var(--warn-fg); }
.brief-log { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }

/* ── Brain → «Карта»: the 3D map of what the system knows (web/map.js) ─────────────────────────────── */
.kmap { position: relative; height: clamp(520px, calc(100vh - 306px), 980px); border: 1px solid var(--border); border-radius: var(--r-2xl); overflow: hidden;
  background: radial-gradient(1200px 700px at 70% 40%, var(--paper) 0%, var(--cream-2) 60%, var(--cream) 100%); }
.kmap:fullscreen { height: 100vh; border: 0; border-radius: 0; }
.kmap-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: var(--fg-muted); font-size: 13px; text-align: center; }
.kmap-wait .note { max-width: 460px; }
.kmap-view { position: absolute; inset: 0 0 0 346px; }
.kmap:fullscreen .kmap-view { inset: 0 0 0 346px; }
.kmap-graph { position: absolute; inset: 0; }
.kmap-graph canvas { display: block; outline: none; }
.kmap-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.kmap-lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--fg-muted); will-change: transform;
  text-shadow: 0 0 4px var(--cream-2), 0 0 8px var(--cream-2), 0 0 2px var(--paper); transition: opacity var(--fast); }
.kmap-lbl.area { font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: -.005em; }
.kmap-lbl.area.closed { color: var(--fg-subtle); font-weight: 600; }
.kmap-lbl.dim { opacity: .18; }
.kmap-tip { position: absolute; left: 0; top: 0; z-index: 3; max-width: 264px; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-md);
  background: var(--ink); color: var(--on-ink); font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-lg); overflow-wrap: anywhere; }
.kmap-tip[hidden] { display: none; }
.kmap-tip span { opacity: .72; font-size: 11px; }
.kmap-tip span:empty { display: none; }
.kmap-panel { position: absolute; z-index: 2; top: 14px; left: 14px; width: 318px; max-height: calc(100% - 28px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px;
  background: color-mix(in oklab, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.kmap-title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 3px 0 4px; }
.kmap-h2 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin: 3px 0 2px; overflow-wrap: anywhere; }
.kmap-areas, .kmap-list { display: flex; flex-direction: column; }
.kmap-area, .kmap-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 30px; padding: 4px 8px; border-radius: var(--r-sm); font-size: 12.5px; text-align: left; color: var(--fg); transition: background var(--fast); }
.kmap-area:hover, .kmap-row:hover { background: var(--bg-subtle); }
.kmap-area[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.kmap-area[aria-pressed="true"] .kmap-n, .kmap-area[aria-pressed="true"] svg { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.kmap-area svg { width: 12px; height: 12px; color: var(--fg-subtle); flex: none; }
.kmap-area .grow, .kmap-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kmap-n { flex: none; font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.kmap-sw { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.kmap-sw.round { width: 8px; height: 8px; border-radius: 50%; }
.kmap-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-muted); cursor: pointer; }
.kmap-check input { accent-color: var(--ink); }
.kmap-detail { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.kmap-detail.focus { padding-top: 0; border-top: 0; }
.kmap-areas[hidden] { display: none; }
.kmap-detail .sub { font-size: 12.5px; line-height: 1.55; }
.kmap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kmap-chips .chip { height: auto; min-height: 22px; padding: 3px 8px; text-align: left; white-space: normal; cursor: pointer; }
.kmap-chips .chip:hover { background: var(--n95); }
.kmap-hint { position: absolute; right: 14px; bottom: 12px; z-index: 1; padding: 5px 11px; border-radius: var(--pill); background: color-mix(in oklab, var(--paper) 85%, transparent); border: 1px solid var(--border); font-size: 11px; color: var(--fg-subtle); pointer-events: none; }
@media (max-width: 820px) {
  .kmap { height: auto; overflow: visible; display: flex; flex-direction: column; }
  .kmap-view { position: relative; inset: auto; order: -1; height: 62vh; min-height: 380px; }
  .kmap-panel { position: static; width: auto; max-height: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
  .kmap-hint { display: none; }
  .kmap-wait { position: static; min-height: 240px; }
}

/* ── where a connected tool stands, on the page its data belongs to (web/pages.js syncStrip) ────────── */
.sync-strip { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 2px; }
.wrap > .sync-strip { margin: 0 0 16px; }
.sync-line { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--r-md); font-size: 12.5px; line-height: 1.45; }
.sync-line .spin { width: 12px; height: 12px; }
.sync-line .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }
.sync-line.blue { background: var(--primary-97); color: var(--primary-fg); }
.sync-line.yellow { background: var(--warn-95); color: var(--warn-fg); }
.sync-line.quiet { padding: 2px 4px; color: var(--fg-subtle); font-size: 11.5px; }
.sync-line .link { flex: none; font-size: 12px; }
.legal { display: inline-flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--fg-subtle); }
.legal a { color: var(--fg-subtle); text-decoration: none; }
.legal a:hover { color: var(--fg); text-decoration: underline; }

/* ── no connection: one strip, nothing thrown away (web/ui.js LINK) ───────────────────────────────── */
#offline { position: fixed; z-index: 400; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(560px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink); font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-lg); animation: route var(--base) var(--enter) both; }
#offline .spin { width: 12px; height: 12px; flex: none; }

/* ── the Google Meet bot, beta (web/meetbot.js): invite it, see what the agent hears and sees ──────────── */
.mb-panel { margin-bottom: 16px; }
.mb-form .in { flex: 1; min-width: 0; }
.mb-runs { margin-top: 12px; }
.mb-card { padding: 14px; }
.mb-past { padding: 8px 2px; border-top: 1px solid var(--border); }
.mb-live { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.mb-col { min-width: 0; }
.mb-col > .over { margin-bottom: 6px; }
.mb-lines { height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 12px; background: var(--bg-muted); font-size: 13.5px; line-height: 1.5; }
.mb-line { display: grid; grid-template-columns: 38px auto minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.mb-line time { font: 11px/1.9 var(--mono); color: var(--fg-faint); }
.mb-line b { font-weight: 600; white-space: nowrap; }
.mb-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg-subtle); }
.mb-shotbtn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mb-shot .chip { margin-left: 6px; }
.mb-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.mb-thumb { flex: none; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); cursor: zoom-in; overflow: hidden; }
.mb-thumb img { display: block; width: 76px; height: 44px; object-fit: cover; }
.mb-thumb.big { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 0 4px; }
.mb-thumb.big img { width: 132px; height: 76px; }
.mb-thumb.big span { padding: 0 6px; color: var(--fg-subtle); }
.mb-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-full { display: block; width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
@media (max-width: 820px) {
  .mb-live { grid-template-columns: minmax(0, 1fr); }
  .mb-lines { height: 240px; }
  .mb-form { flex-wrap: wrap; }
  .mb-form .btn { width: 100%; justify-content: center; }
}

/* ── which account of ours writes to a person (web/pages.js senderChip, senderFilter) ─────────────── */
.chip.sender { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.li .l4 { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; color: var(--fg-subtle); min-width: 0; white-space: nowrap; }
.li .l4 .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.li .l4 .tl { flex: none; }
.li .l4 svg { width: 11px; height: 11px; flex: none; }
.sender-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--fg-subtle); }
.sender-row svg { width: 14px; height: 14px; flex: none; }
.sender-pick { height: 32px; padding-top: 0; padding-bottom: 0; font-size: 12.5px; flex: 1; min-width: 0; }
.conv-from { display: none; align-items: center; gap: 6px; padding: 7px 14px; border-bottom: 1px solid var(--border); background: var(--paper); font-size: 12px; color: var(--fg-subtle); flex: none; min-width: 0; }
.conv-from svg { width: 12px; height: 12px; flex: none; }
.conv-from span { flex: none; }
.conv-from b { font-weight: 600; color: var(--fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .conv-h .chip.sender { display: none; } .conv-from { display: flex; } }
/* the same when the conversation's own column is narrow on a wide screen (the list on one side, the person on the
   other): the name was squeezed to one letter by the chips (19.11.2026) */
@container conv (max-width: 700px) { .conv-h .chip.sender, .conv-h .chip.cat { display: none; } .conv-from { display: flex; } }

/* ── a person's place in a tool's campaign (web/pages.js «Люди») ───────────────────────────────────── */
.in-tool { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 240px; }
.in-tool .cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.in-tool small { font-size: 11.5px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px 4px; }
.more-row:empty { display: none; }

/* ── a letter on its way: «Скасувати» in the notification (web/tasks.js sendSoon) ──────────────────── */
.toast.undo { position: relative; align-items: center; overflow: hidden; min-width: 300px; padding-right: 9px; }
.toast.undo svg, .toast.undo .spin { margin-top: 0; flex: none; }
.toast-btn { flex: none; height: 26px; padding: 0 11px; border-radius: var(--pill); background: color-mix(in srgb, var(--cream) 18%, transparent); color: var(--cream); font-size: 12px; font-weight: 600; transition: background var(--fast); }
.toast-btn:hover { background: color-mix(in srgb, var(--cream) 30%, transparent); }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cream); opacity: .6; transform-origin: left center; animation: drain linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }
/* ── Today: the right column stays beside the queue; the feed scrolls inside its card ──────────────── */
@media (max-width: 1180px) { .feed-scroll .feed-i:nth-child(n+10) { display: none; } .feed-scroll .feed-i:nth-child(9) { border-bottom: 0; } }
@media (min-width: 1181px) {
  .feed-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin-right: -8px; padding-right: 8px; }
  .cols > .pin-col { position: sticky; top: 16px; max-height: calc(100dvh - var(--top-h) - 32px); }
  .cols > .pin-col > * { flex: none; }
  .cols > .pin-col > .feed-card { flex: 0 1 auto; min-height: 150px; display: flex; flex-direction: column; overflow: hidden; }
  .cols > .pin-col > .feed-card > .feed-scroll { max-height: none; min-height: 0; flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .toast-bar { animation-duration: 0s !important; } }
.feed-what { display: -webkit-box; font-size: 11.5px; line-height: 1.4; color: var(--fg-muted); margin-top: 2px; }

/* ── the funnel of «Сьогодні»: who needs what next (web/pages.js funnelStrip) ─────────────────────── */
.stepline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stepline-gap { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }
.stepline-pill { display: inline-flex; align-items: baseline; gap: 9px; height: 38px; padding: 0 14px 0 15px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--paper); font-size: 13px; color: var(--fg-muted); white-space: nowrap; transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast); }
.stepline-pill > * { align-self: center; }
.stepline-pill b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--fg); font-variant-numeric: tabular-nums; }
.stepline-pill:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.stepline-pill.red { background: var(--error-95); border-color: color-mix(in oklab, var(--error-fg) 22%, transparent); color: var(--error-fg); } .stepline-pill.red b { color: var(--error-fg); }
.stepline-pill.yellow { background: var(--warn-95); border-color: color-mix(in oklab, var(--warn-fg) 20%, transparent); color: var(--warn-fg); } .stepline-pill.yellow b { color: var(--warn-fg); }
.stepline-pill.blue { background: var(--primary-95); border-color: color-mix(in oklab, var(--primary-fg) 16%, transparent); color: var(--primary-fg); } .stepline-pill.blue b { color: var(--primary-fg); }
.stepline-pill.green { background: var(--success-95); border-color: color-mix(in oklab, var(--success-fg) 18%, transparent); color: var(--success-fg); } .stepline-pill.green b { color: var(--success-fg); }
.stepline-pill.faint { background: transparent; border-style: dashed; color: var(--fg-subtle); } .stepline-pill.faint b { color: var(--fg-muted); font-weight: 600; }
.stepline-pill.zero { background: var(--paper); border-color: var(--border); color: var(--fg-subtle); } .stepline-pill.zero b { color: var(--fg-faint); }
.stepline-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--fg-subtle); }
.stepline-foot .sep { color: var(--fg-faint); }
.stepline-foot .link { margin-left: 4px; }
@media (max-width: 820px) { .stepline { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; } .stepline::-webkit-scrollbar { display: none; } .stepline-pill { flex: none; } }

/* ── attachments of a message for the agent (web/attach.js) ───────────────────────────────────────── */
.att-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--paper); border-top: 1px solid var(--border); }
.att-row.said { padding: 0 0 7px; background: transparent; border-top: 0; }
.att { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; max-width: 220px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); font-size: 12px; color: var(--fg-muted); }
.att.image { padding: 0; width: 44px; overflow: visible; background: transparent; }
.att img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-md); display: block; }
.att svg { width: 15px; height: 15px; flex: none; }
.att-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.att-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.att-x svg { width: 10px; height: 10px; }
.att.wait { width: 44px; justify-content: center; }
.ask-msg.me .att { background: color-mix(in srgb, var(--cream) 14%, transparent); border-color: color-mix(in srgb, var(--cream) 22%, transparent); color: var(--cream); }
.att-pick { display: inline-flex; flex: none; }
.ask.dropping::after { content: ''; position: absolute; inset: 8px; border: 2px dashed var(--border-strong); border-radius: var(--r-xl); background: color-mix(in srgb, var(--paper) 70%, transparent); pointer-events: none; z-index: 5; }

/* ── the LinkedIn mark next to a person's name opens the profile (web/tasks.js liOpen) ────────────── */
.li-open { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); color: #0a66c2; flex: none; transition: background var(--fast); }
.li-open:hover { background: color-mix(in srgb, #0a66c2 12%, transparent); }
.li-open svg { width: 17px; height: 17px; }
/* a request of a tool on its sheet: a long sample or path never leaves its card */
.sheet-b .stack.tight > .card .xs { overflow-wrap: anywhere; }
/* under the Writer's row: what is wrong with the letter, and why it is what it is (only when a person changes it) */
.writer-x { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; flex: 0 1 auto; min-height: 44px; max-height: min(30vh, 260px); overflow-y: auto; overscroll-behavior: contain; }
.writer-x > * { flex-shrink: 0; }
.writer-x[hidden] { display: none; }
.fix { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fix .chip { cursor: pointer; }
.fix .icon-btn { margin-left: auto; }
/* the key that presses a button, shown on it where there is a keyboard */
kbd.key-e { font: 600 10px/1 var(--font); border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 4px; padding: 2px 4px; margin-left: 2px; opacity: .75; }
/* the state of a message of ours, and a letter that waits for its hour */
.mstate { display: inline-grid; place-items: center; width: 14px; height: 14px; flex: none; color: var(--fg-subtle); }
.mstate svg { width: 12px; height: 12px; }
.mstate.sent { color: var(--ok-fg, #1a7f4b); } .mstate.failed { color: var(--error-fg); } .mstate.sending svg { animation: spin 1s linear infinite; }
.bubble.sched { border-style: dashed; opacity: .82; }
.bubble.failed { border-color: var(--error-fg); }
.bubble .mwhy { margin-top: 6px; font-size: 12px; color: var(--error-fg); }
.clock-in { font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.clock-in svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; }
/* the line that says where a letter leaves from is cut with dots, whatever it is made of */
a.msg-route { display: block; }

/* ── the brain assembles while a project opens from the start page (web/brainload.js, PRO-2177) ──────────────────
   Over the page and its sheets, under the toasts and the strip of a lost connection: what went wrong is still said. */
.brainveil { position: fixed; inset: 0; z-index: 110; background: var(--cream); opacity: 0; transition: opacity 180ms var(--enter), background-color 300ms; cursor: progress; touch-action: none; }
.brainveil.on { opacity: 1; }
.brainveil.out { opacity: 0; pointer-events: none; transition: opacity 300ms var(--exit); }
.brainveil canvas { display: block; width: 100%; height: 100%; }
/* who wrote a message of ours: the Writer's atom, the atom with «правки», a pen */
.origin { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--fg-subtle); font: inherit; font-weight: 600; }
.origin .atom { width: 13px; height: 13px; } .origin svg { width: 12px; height: 12px; }
button.origin.edited { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; color: var(--fg-muted); }
.diff { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.7; }
.diff del { color: var(--error-fg); background: color-mix(in srgb, var(--error-fg) 9%, transparent); text-decoration-thickness: 1px; }
.diff ins { color: var(--ok-fg, #1a7f4b); background: color-mix(in srgb, var(--ok-fg, #1a7f4b) 11%, transparent); text-decoration: underline; text-underline-offset: 2px; }

/* ── the history of the interface (web/versions.js): the version on the left, the list of versions on the right ── */
.vh-scrim { padding: 0; place-items: stretch; }
.vh { width: 100%; height: 100vh; height: 100dvh; background: var(--bg-muted); display: flex; flex-direction: column; animation: fade var(--base) var(--enter) both; }
.vh-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--border); flex: none; }
.vh-kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-subtle); }
.vh-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.vh-main { min-width: 0; overflow: auto; padding: 18px 24px 40px; }
.vh-tools { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.vh-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-muted); cursor: pointer; }
.vh-pane { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.vh-what { padding-bottom: 2px; }
.vh-group { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.vh-group-h { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-subtle); }
.vh-group-h .xs { text-transform: none; letter-spacing: 0; font-weight: 400; }
.vh-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); border-left: 3px solid transparent; }
.vh-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.vh-was { display: block; font-size: 11.5px; color: var(--fg-subtle); text-decoration: line-through; overflow-wrap: anywhere; }
.vh-page { border: 1px solid var(--border); border-radius: var(--r-lg); margin: 4px; overflow: hidden; border-left-width: 3px; }
.vh-page-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.vh-page-h > svg { width: 15px; height: 15px; color: var(--fg-subtle); flex: none; }
.vh-blocks { border-top: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 2px; background: var(--bg-muted); }
.vh-added { background: color-mix(in oklab, var(--success) 12%, var(--paper)); border-left-color: var(--success); }
.vh-changed { background: color-mix(in oklab, var(--warn) 14%, var(--paper)); border-left-color: var(--warn); }
.vh-removed { background: color-mix(in oklab, var(--error) 10%, var(--paper)); border-left-color: var(--error); }
.vh-removed .vh-name { text-decoration: line-through; color: var(--fg-muted); }
.vh-side { border-left: 1px solid var(--border); background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.vh-side-h { padding: 14px 16px 8px; font-size: 13px; font-weight: 600; flex: none; }
.vh-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.vh-item { text-align: left; padding: 10px 12px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 3px; flex: none; }
.vh-item:hover { background: var(--bg-subtle); }
.vh-item[aria-selected="true"] { background: var(--primary-95); }
.vh-item-t { font-size: 13px; font-weight: 600; }
.vh-cur { font-size: 11.5px; font-style: italic; color: var(--fg-subtle); }
.vh-item-w { font-size: 12px; color: var(--fg-muted); overflow-wrap: anywhere; }
.vh-item-by { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-muted); }
.vh-item-by i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
@media (max-width: 760px) {
  .vh-b { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 34%) minmax(0, 1fr); }
  .vh-side { order: -1; border-left: 0; border-bottom: 1px solid var(--border); }
  .vh-main { padding: 14px 14px 32px; }
  .vh-h .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
}
