/* 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%);
  --bg: #fff; --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: rgba(255, 255, 255, .55); --rail-card-hover: #fff; --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); }
/* 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: #fff; }
.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: #fff; }
.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%, #fff); }
: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: #fff; 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: rgba(0, 0, 0, .06); 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); }
.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: #fff; position: relative; z-index: 10; }
.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: #fff; 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: rgba(0, 0, 0, .05); color: var(--fg); }
.btn.danger { background: #fff; color: var(--error-fg); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--error) 35%, #fff); }
.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: #fff; 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%, #fff); 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%, #fff) 0%, #fff 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%, #fff)); 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%, #fff); 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); }
.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.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: #fff; 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: #fff; 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: #fff; 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: #fff; }
.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: #fff; 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: #fff; 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: #fff; 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: #fff; 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 ─────────────────────────────────────────────────────────────────────────────────────── */
.decision { display: flex; gap: 14px; align-items: flex-start; overflow: hidden; max-height: 600px; }
.decision.gone { 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: #fff; 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: #fff; }
.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); }
.conv-h { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: #fff; flex: none; }
.conv-h .t { flex: 1; min-width: 0; }
.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: #fff; 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: #fff; 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; }
.composer { flex: none; margin: 8px 20px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--fast), box-shadow var(--fast); }
.composer:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.composer .ta { border: 0; padding: 0; min-height: 22px; resize: none; box-shadow: none !important; background: transparent; }
.draft { align-self: stretch; background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-md); overflow: hidden; animation: pop var(--slow) var(--enter) both; }
.draft-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--cream), color-mix(in oklab, var(--cream) 55%, #fff)); }
.draft-h .atom { width: 24px; height: 24px; flex: none; }
.draft-h b { font-size: 12.5px; font-weight: 600; flex: 1; }
.draft-b { padding: 14px 16px; }
.draft-b .subj { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.draft-b textarea { width: 100%; border: 0; outline: 0; resize: none; font-size: 13.5px; line-height: 1.65; background: transparent; padding: 0; overflow: hidden; display: block; }
.draft-b .typing::after { content: "▍"; animation: caret .9s steps(1) infinite; color: var(--spot); margin-left: 1px; }
.draft-x { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.draft-f { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--border); background: var(--bg-muted); flex-wrap: wrap; }
.thinking { padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.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: #fff; }
.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: #fff; 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: #fff; 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: #fff; 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: rgba(255, 255, 255, .5); 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%, #fff)); 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: #fff; 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: #fff; 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: #fff; }
.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%, #fff); 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: rgba(255, 255, 255, .5); 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; }
  .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; }
  .conv-h { padding: 10px 12px; }
  .composer { margin: 8px 10px 12px; } .thread { padding: 14px 12px 6px; }
  .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: #fff; 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: #fff; 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: #fff; 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), #fff 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: #fff; 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: #fff; 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 #fff; }
.avw > .logo.badge.has { box-shadow: 0 0 0 2px #fff; } .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); }
