/* Tessera – design tokens and components. One stylesheet for the whole app, including the assistant. */
:root {
  --accent: #0f8f7e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f4f1;
  --accent-strong: #0b7366;
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --line: #e4e6e1;
  --line-strong: #d1d5cd;
  --ink: #1b211f;
  --ink-2: #5d6662;
  --ink-3: #8b938f;
  --danger: #d4483b;
  --danger-soft: #fbe9e7;
  --warn: #c98a0c;
  --ok: #1f9d55;
  --side-bg: #15201d;
  --side-ink: #c9d3cf;
  --side-ink-2: #82908b;
  --side-active: #22332f;
  --side-strong: #ffffff;
  --side-line: #2c3b37;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 4px 16px rgba(20, 30, 25, .06);
  --shadow-lg: 0 10px 40px rgba(20, 30, 25, .18);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent: #2bb3a0;
  --accent-ink: #06231f;
  --accent-soft: #143430;
  --accent-strong: #4cc9b6;
  --bg: #0f1413;
  --surface: #171e1c;
  --surface-2: #1c2422;
  --line: #27312e;
  --line-strong: #34403c;
  --ink: #e6ebe9;
  --ink-2: #a3aeaa;
  --ink-3: #74807b;
  --danger: #ef6b5e;
  --danger-soft: #3a1f1c;
  --side-bg: #0b100f;
  --side-ink: #c9d3cf;
  --side-ink-2: #6f7c77;
  --side-active: #1a2522;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

/* ───────── shell ───────── */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; font-weight: 700; font-size: 16px; color: var(--side-strong); letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; background: var(--accent); }
.brand-mark i { background: rgba(255, 255, 255, .9); border-radius: 2px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: rgba(255, 255, 255, .45); }
.tenant-pick { margin: 0 12px 10px; }
.tenant-pick select { width: 100%; background: var(--side-active); color: var(--side-ink); border: 1px solid var(--side-line); border-radius: var(--radius-sm); padding: 7px 9px; font-size: 13px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav h6 { margin: 16px 10px 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--side-ink-2); font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--side-ink); font-size: 13.5px; text-decoration: none; }
.nav a:hover { background: var(--side-active); }
.nav a.active { background: var(--side-active); color: var(--side-strong); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.side-foot { padding: 12px; border-top: 1px solid #23302c; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: var(--side-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { color: var(--side-ink-2); font-size: 12px; }
.side-foot button { background: none; border: 0; color: var(--side-ink-2); cursor: pointer; padding: 6px; border-radius: 6px; }
.side-foot button:hover { background: var(--side-active); color: var(--side-strong); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { flex: 1; overflow: auto; padding: 22px 24px 90px; }

/* ───────── primitives ───────── */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 550; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); outline: none; }
textarea.input { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.search { position: relative; }
.search input { padding-left: 32px; width: 260px; }
.search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 14px; font-weight: 650; }
.card-b { padding: 16px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: #e3f5ea; color: #17733f; border-color: #c4e8d2; }
.badge.warn { background: #fdf3dc; color: #8a5d00; border-color: #f2dfaf; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #f3cdc8; }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
:root[data-theme="dark"] .badge.ok { background: #143522; color: #6fd69a; border-color: #1f4a30; }
:root[data-theme="dark"] .badge.warn { background: #3a2d0c; color: #f0c45a; border-color: #4d3c12; }
:root[data-theme="dark"] .badge.danger { border-color: #4d2722; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; border-radius: 999px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }

/* ───────── kanban ───────── */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: calc(100vh - 200px); }
.col { flex: 0 0 272px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.col-h { padding: 10px 12px 8px; border-top: 4px solid var(--c, var(--accent)); border-radius: var(--radius) var(--radius) 0 0; }
.col-h .t { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: 13px; }
.col-h .s { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.col-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.col-b.over { background: var(--accent-soft); border-radius: 0 0 var(--radius) var(--radius); }
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 11px; cursor: grab; box-shadow: 0 1px 1px rgba(0, 0, 0, .03); }
.deal:hover { border-color: var(--line-strong); }
.deal.dragging { opacity: .45; }
.deal .t { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.deal .a { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.deal .m { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; }
.col-add { margin: 0 8px 8px; border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--radius-sm); padding: 7px; color: var(--ink-2); cursor: pointer; font-size: 12.5px; }
.col-add:hover { background: var(--surface); color: var(--ink); }

/* ───────── drive ───────── */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); cursor: pointer; }
.crumbs b { font-weight: 650; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-height: 128px; }
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tile .ico { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 11px; letter-spacing: .03em; color: #fff; }
.tile .n { font-weight: 600; font-size: 13px; word-break: break-word; line-height: 1.35; }
.tile .d { font-size: 11.5px; color: var(--ink-3); margin-top: auto; }
.tile .more { position: absolute; top: 8px; right: 8px; }
.drop-zone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--ink-2); margin-bottom: 16px; transition: .15s; }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ───────── menus, modals, drawers, toasts ───────── */
.menu { position: fixed; z-index: 80; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 5px; }
.menu button { display: flex; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.overlay { position: fixed; inset: 0; background: rgba(10, 16, 14, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 980px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 16px; font-weight: 650; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 14, .35); animation: fade .12s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease; }
.drawer .modal-b { flex: 1; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-lg); animation: fade .15s; max-width: 90vw; }
.toast.error { background: var(--danger); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 9px 12px; cursor: pointer; color: var(--ink-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); margin-left: 6px; position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline .meta { font-size: 11.5px; color: var(--ink-3); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }

/* ───────── documents: signing & scanning ───────── */
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; background: var(--surface-2); padding: 16px; border-radius: var(--radius); max-height: 70vh; overflow: auto; }
.pdf-page { position: relative; box-shadow: var(--shadow); background: #fff; cursor: crosshair; }
.pdf-page canvas { display: block; }
.sig-place { position: absolute; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); cursor: move; }
.sig-place img { width: 100%; display: block; pointer-events: none; }
.sig-place .x { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; border: 0; font-size: 12px; cursor: pointer; line-height: 20px; padding: 0; }
.sig-pad { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; touch-action: none; width: 100%; height: 170px; cursor: crosshair; }
.scan-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.scan-page { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.scan-page img { width: 100%; display: block; aspect-ratio: 1 / 1.41; object-fit: contain; background: #fff; }
.scan-page .bar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px; }
.scan-page .bar button { background: none; border: 0; color: #fff; cursor: pointer; padding: 2px 4px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { background: var(--surface); border: 0; padding: 6px 12px; cursor: pointer; font-size: 12.5px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* ───────── auth pages ───────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--side-bg); color: #e6ebe9; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .mosaic { position: absolute; right: -60px; bottom: -60px; display: grid; grid-template-columns: repeat(5, 70px); gap: 10px; opacity: .9; transform: rotate(-8deg); }
.auth-art .mosaic i { height: 70px; border-radius: 12px; background: #1f2f2b; }
.auth-art .mosaic i:nth-child(3n) { background: var(--accent); opacity: .8; }
.auth-art .mosaic i:nth-child(7n) { background: #2c403b; }
.auth-art h2 { font-size: 34px; letter-spacing: -.02em; max-width: 420px; line-height: 1.15; position: relative; }
.auth-art p { color: #9fb0aa; max-width: 380px; position: relative; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--surface); }
.auth-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { font-size: 24px; letter-spacing: -.01em; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ═════════ AI Assistant (ported from the previous system, restyled to this design) ═════════ */
.ast-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; gap: 8px; font-weight: 650; cursor: pointer; box-shadow: var(--shadow-lg); }
.ast-fab:hover { background: var(--accent-strong); }
.ast-fab svg { width: 20px; height: 20px; }
.ast-panel { position: fixed; right: 22px; bottom: 82px; z-index: 70; width: 390px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 120px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; }
.ast-panel.open { display: flex; animation: fade .15s; }
.ast-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.ast-head .ast-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; }
.ast-head .ast-ico svg { width: 17px; height: 17px; }
.ast-head .t { flex: 1; min-width: 0; }
.ast-head .t b { display: block; font-size: 14px; }
.ast-head .t span { font-size: 11.5px; color: var(--ink-3); }
.ast-head button { background: none; border: 0; color: var(--ink-2); width: 30px; height: 30px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.ast-head button:hover { background: var(--surface-2); color: var(--ink); }
.ast-head button svg { width: 17px; height: 17px; }
.ast-ask { padding: 12px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.ast-ask .row { display: flex; gap: 8px; margin-top: 8px; }
.ast-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ast-msg { max-width: 86%; padding: 9px 12px; font-size: 13.5px; line-height: 1.5; border-radius: 14px; }
.ast-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ast-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ast-msg.sys { align-self: center; background: none; color: var(--ink-3); font-size: 12px; text-align: center; padding: 2px 8px; }
.ast-msg.bot p { margin: 0 0 8px; } .ast-msg.bot p:last-child { margin-bottom: 0; }
.ast-msg.bot ul, .ast-msg.bot ol { margin: 4px 0 8px; padding-left: 20px; } .ast-msg.bot li { margin-bottom: 3px; }
.ast-msg.bot strong { font-weight: 700; }
.ast-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.ast-input textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; max-height: 140px; min-height: 38px; background: var(--surface); outline: none; line-height: 1.4; }
.ast-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ast-send { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.ast-send:hover { background: var(--accent-strong); }
.ast-send svg { width: 17px; height: 17px; }
.ast-settings { flex: 1; overflow-y: auto; padding: 16px; }
.ast-settings h4 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 6px; font-weight: 650; }
.ast-settings h4:first-child { margin-top: 0; }
.ast-settings p { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.ast-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); border: 0; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }
.ast-dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; }
.ast-dots span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: ast-bounce 1.1s infinite ease-in-out; }
.ast-dots span:nth-child(2) { animation-delay: .15s; } .ast-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes ast-bounce { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* full-page assistant */
.ast-page { display: grid; grid-template-columns: 260px 1fr; height: calc(100vh - 58px); min-height: 420px; overflow: hidden; }
.ast-page .ast-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--surface); min-height: 0; }
.ast-page .ast-side .top { padding: 12px; }
.ast-page .ast-side .top .btn { width: 100%; justify-content: center; }
.ast-hist { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.ast-hist .empty-h { font-size: 12.5px; color: var(--ink-3); padding: 8px; }
.ast-hist-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ast-hist-item:hover { background: var(--surface-2); }
.ast-hist-item.active { background: var(--accent-soft); }
.ast-hist-item .t { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-hist-item .t small { display: block; font-size: 11px; color: var(--ink-3); }
.ast-hist-item .x { background: none; border: 0; color: var(--ink-3); cursor: pointer; opacity: 0; padding: 2px 5px; border-radius: 5px; }
.ast-hist-item:hover .x { opacity: 1; }
.ast-hist-item .x:hover { color: var(--danger); background: var(--danger-soft); }
.ast-page .ast-side .foot { border-top: 1px solid var(--line); padding: 10px 12px; }
.ast-page .ast-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ast-page .ast-log { padding: 24px max(24px, calc((100% - 760px) / 2)); }
.ast-page .ast-msg { max-width: 78%; font-size: 14px; }
.ast-page .ast-input { padding: 14px max(24px, calc((100% - 760px) / 2)); }

/* ───────── responsive ───────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 75; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 16px 90px; }
  .search input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .ast-page { grid-template-columns: 1fr; height: calc(100vh - 58px); }
  .ast-page .ast-side { display: none; }
  .ast-panel { right: 16px; bottom: 78px; }
  .ast-fab { right: 16px; bottom: 16px; }
  .ast-fab span { display: none; }
  .ast-fab { padding: 0 14px; }
  .bar-row { grid-template-columns: 90px 1fr 70px; }
}

/* ═════════ Team chat ═════════ */
.nav a .count { margin-left: auto; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.chat-wrap { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 58px); min-height: 420px; }
.chat-list { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.chat-list .top { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.chat-list .top .search { flex: 1; }
.chat-list .top .search input { width: 100%; }
.rooms { flex: 1; overflow-y: auto; }
.room { display: flex; gap: 11px; align-items: center; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.room:hover { background: var(--surface-2); }
.room.active { background: var(--accent-soft); }
.room .av { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.room .av.group { border-radius: 11px; }
.room .av .on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.room .meta { flex: 1; min-width: 0; }
.room .meta .n { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13.5px; }
.room .meta .n span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .meta .n time { font-weight: 400; font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; }
.room .meta .p { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.room .meta .p span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .badge-n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; flex-shrink: 0; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-2); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); height: 64px; flex-shrink: 0; }
.chat-head .t { flex: 1; min-width: 0; }
.chat-head .t b { display: block; font-size: 15px; }
.chat-head .t span { font-size: 12px; color: var(--ink-3); }
.msgs { flex: 1; overflow-y: auto; padding: 18px max(18px, calc((100% - 820px) / 2)); display: flex; flex-direction: column; gap: 4px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.day-sep { align-self: center; margin: 12px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.sys-msg { align-self: center; font-size: 12px; color: var(--ink-2); background: var(--surface); border-radius: 8px; padding: 3px 10px; margin: 4px 0; border: 1px solid var(--line); }
.msg-row { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row .avatar { width: 28px; height: 28px; font-size: 11px; }
.msg-row.cont .avatar { visibility: hidden; }
.bubble { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 7px 11px 6px; font-size: 13.5px; line-height: 1.45; min-width: 80px; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.msg-row.mine .bubble { background: var(--accent-soft); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.bubble .who { font-size: 12px; font-weight: 650; color: var(--accent-strong); margin-bottom: 1px; }
.bubble .txt { white-space: pre-wrap; word-break: break-word; }
.bubble .txt a { word-break: break-all; }
.bubble .tm { display: block; text-align: right; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.bubble .more { position: absolute; top: 4px; right: -30px; opacity: 0; }
.msg-row.mine .bubble .more { right: auto; left: -30px; }
.msg-row:hover .bubble .more { opacity: 1; }
.bubble img.att { max-width: 280px; max-height: 260px; border-radius: 9px; display: block; cursor: zoom-in; margin: 2px 0; }
.file-att { display: flex; gap: 10px; align-items: center; padding: 4px 0; text-decoration: none; color: inherit; }
.file-att .ico { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.voice button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.voice .wave { flex: 1; height: 26px; display: flex; align-items: center; gap: 2px; }
.voice .wave i { flex: 1; background: var(--line-strong); border-radius: 2px; }
.voice .wave i.played { background: var(--accent); }
.voice .dur { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.poll { min-width: 260px; }
.poll .q { font-weight: 650; margin-bottom: 8px; }
.poll .opt { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; overflow: hidden; font-size: 13px; }
.poll .opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0; transition: width .25s; }
.poll .opt.mine { border-color: var(--accent); }
.poll .opt.mine .fill { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.poll .opt span { position: relative; z-index: 1; }
.poll .opt b { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.poll .foot { font-size: 11.5px; color: var(--ink-3); }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px max(18px, calc((100% - 820px) / 2)) 14px; background: var(--surface); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 12px; padding: 9px 12px; max-height: 160px; min-height: 40px; background: var(--surface); outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer .btn.icon { height: 40px; width: 40px; border-radius: 12px; }
.composer .send { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.composer .rec { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.rec-bar { flex: 1; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 13px; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--ink-2); text-align: center; padding: 20px; }
.people-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.people-pick label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.people-pick label:last-child { border-bottom: 0; }
body.on-chat-page .ast-fab { display: none; }
@media (max-width: 820px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-wrap.has-room .chat-list { display: none; }
  .chat-wrap:not(.has-room) .chat-pane { display: none; }
  .msg-row { max-width: 92%; }
  .bubble .more { opacity: 1; position: static; float: right; margin-left: 4px; }
}

/* ═════════ Marketing start screen ═════════ */
.launch h3 { font-size: 13px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 12px; }
.launch h3:first-child { margin-top: 4px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.ltile { position: relative; border: 0; border-radius: 14px; padding: 18px 16px 16px; min-height: 118px; text-align: left; color: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; background: var(--c); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; overflow: hidden; }
.ltile::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 22px; background: rgba(255, 255, 255, .12); transform: rotate(18deg); }
.ltile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ltile .ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.ltile .ic svg { width: 20px; height: 20px; }
.ltile b { font-size: 14px; font-weight: 650; display: block; }
.ltile small { font-size: 12px; opacity: .85; display: block; margin-top: 2px; }
.ltile .tag { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 10.5px; font-weight: 700; background: rgba(0, 0, 0, .22); padding: 2px 8px; border-radius: 999px; }
.ltile.soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ltile.soft .ic { background: var(--accent-soft); color: var(--accent-strong); }
.ltile.soft::after { background: var(--surface-2); }
.ltile.soft .tag { background: var(--surface-2); color: var(--ink-2); }
.merge-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.merge-tags button { border: 1px dashed var(--line-strong); background: var(--surface-2); border-radius: 6px; font-size: 12px; padding: 2px 8px; cursor: pointer; font-family: var(--mono); }
.aud-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.aud-box b.big { font-size: 22px; display: block; }
.chat-pane { position: relative; }
.ast-invite { color: var(--accent-strong); border-color: var(--accent-soft); background: var(--accent-soft); }
.ast-invite:hover { background: var(--accent-soft); filter: brightness(.97); }
.ast-side-panel { position: absolute; top: 64px; right: 0; bottom: 0; width: min(380px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 5; animation: slide .18s ease; }
.ast-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) { .ast-invite span { display: none; } }

/* ═════════ Contact center inbox ═════════ */
.cc-inbox { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 236px); min-height: 440px; padding: 0; overflow: hidden; }
.cc-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cc-filter { margin: 12px; align-self: flex-start; }
.cc-items { flex: 1; overflow-y: auto; border-top: 1px solid var(--line); }
.cc-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cc-conv .msgs { padding: 16px 20px; }
.cc-src { padding: 6px 20px; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-form table { border-collapse: collapse; font-size: 13px; }
.cc-form th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 3px 14px 3px 0; vertical-align: top; white-space: nowrap; }
.cc-form td { padding: 3px 0; word-break: break-word; }
@media (max-width: 820px) {
  .cc-inbox { grid-template-columns: 1fr; height: auto; }
  .cc-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cc-conv { min-height: 420px; }
}
.table td .btn { vertical-align: middle; }

/* ═════════ Help panel ═════════ */
.help-btn svg { width: 20px; height: 20px; }
body.help-open .help-btn { background: var(--accent-soft); color: var(--accent); }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 65; width: 380px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .2s ease; visibility: hidden; }
.help-panel.open { transform: none; visibility: visible; }
.help-head { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.help-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.help-ico svg { width: 17px; height: 17px; }
.help-search { position: relative; margin: 14px 16px 6px; }
.help-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.help-search input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px 0 34px; font: inherit; background: var(--surface-2); color: var(--ink); outline: none; }
.help-search input:focus { border-color: var(--accent); background: var(--surface); }
.help-body { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.help-body h6 { margin: 14px 8px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.help-item { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 8px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.help-item:hover { background: var(--surface-2); }
.help-item svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.help-none { padding: 30px 12px; text-align: center; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.help-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 8px 6px; }
.help-back svg { width: 15px; height: 15px; }
.help-art { padding: 0 8px; font-size: 14px; line-height: 1.6; color: var(--ink); }
.help-art h3 { margin: 6px 0 10px; font-size: 18px; line-height: 1.3; }
.help-art p { margin: 0 0 10px; }
.help-art ol, .help-art ul { margin: 0 0 10px; padding-left: 20px; }
.help-art li { margin-bottom: 6px; }
.help-art code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.help-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (min-width: 1280px) {
  body.help-open .main { margin-right: 380px; transition: margin .2s ease; }
}
body.help-open .ast-fab { right: 402px; }
@media (max-width: 1279px) { body.help-open .ast-fab { display: none; } }

/* ═════════ Quick add on boards ═════════ */
.quick-btn { margin: 0 8px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 7px; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.quick-btn svg { width: 14px; height: 14px; }
.quick-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.quick-form { margin: 0 8px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 0 0 3px var(--accent-soft); animation: fade .12s; }
.quick-form .input { height: 32px; font-size: 13px; padding: 0 9px; width: 100%; min-width: 0; }
.quick-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick-form .acts { display: flex; align-items: center; gap: 6px; }
.quick-form .acts .small { margin-left: auto; font-size: 11px; }
.task-card .m { margin-top: 6px; }
.help-head [data-close] { margin-left: auto; }
@media (max-width: 480px) { .help-panel { width: 100vw; border-left: 0; } }

/* ═════════ External guests & invites ═════════ */
.invite-scope { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.invite-scope ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.invite-scope li { display: flex; align-items: center; gap: 8px; }
.invite-scope .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ext-tag { font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #9a5b00; background: #fff1d6; border: 1px solid #f3d9a4; border-radius: 999px; padding: 0 7px; line-height: 17px; white-space: nowrap; vertical-align: middle; }
:root[data-theme="dark"] .ext-tag { color: #f5c46b; background: rgba(245, 196, 107, .12); border-color: rgba(245, 196, 107, .3); }
.ext-banner { display: flex; align-items: center; gap: 8px; padding: 7px 18px; font-size: 12.5px; color: #8a5300; background: #fff7e6; border-bottom: 1px solid #f3d9a4; }
:root[data-theme="dark"] .ext-banner { color: #f5c46b; background: rgba(245, 196, 107, .08); border-color: rgba(245, 196, 107, .25); }
.ext-banner svg { width: 15px; height: 15px; flex-shrink: 0; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pick-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.pick-list label:last-child { border-bottom: 0; }
.pick-list .empty-note { padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-cards label { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.role-cards label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-cards b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.role-cards input { margin-top: 3px; }
@media (max-width: 560px) { .role-cards { grid-template-columns: 1fr; } }

/* ═════════ Leads ═════════ */
.col-closed { flex-basis: 236px; opacity: .92; }
.col-closed .col-h .s { font-style: italic; }
.lead-card .small { margin: -1px 0 3px; }
.lead-steps { display: flex; margin: 0 0 16px; }
.lead-steps .step { flex: 1; position: relative; border: 0; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 9px 10px 9px 18px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); margin-right: -6px; }
.lead-steps .step:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; padding-left: 12px; }
.lead-steps .step.done { background: var(--accent-soft); color: var(--accent); }
.lead-steps .step.cur { background: var(--accent); color: var(--accent-ink); }
.lead-steps .step:disabled { cursor: default; }
.lead-steps .step:not(:disabled):not(.cur):hover { filter: brightness(.96); }
.lead-note { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lead-note.won { background: rgba(31, 157, 85, .1); color: var(--ok); }
.lead-note.lost { background: rgba(212, 72, 59, .08); color: var(--danger); }
.lead-note a { color: inherit; font-weight: 600; }
.feed-h { margin: 6px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

/* ═════════ Automation ═════════ */
.drawer.wide { width: min(760px, 100vw); }
.auto-stages { display: flex; flex-direction: column; gap: 12px; }
.auto-stage { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.auto-stage header { display: flex; align-items: center; gap: 8px; }
.auto-stage header .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.auto-stage header .btn { margin-left: auto; }
.auto-rule { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.auto-rule.off { opacity: .55; }
.auto-rule .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.auto-rule .ic svg { width: 15px; height: 15px; }
.auto-rule .tx { flex: 1; min-width: 0; line-height: 1.45; }
.toggle { position: relative; display: inline-block; width: 34px; height: 20px; flex-shrink: 0; margin-top: 4px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle i { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background .15s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(14px); }

/* ═════════ Time tracking ═════════ */
.timer-chip { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; max-width: 320px; }
.timer-chip .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; flex-shrink: 0; }
.timer-chip b { font-variant-numeric: tabular-nums; }
.timer-chip .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
@keyframes pulse { 50% { opacity: .35; } }
.timer-btn svg { width: 13px; height: 13px; }
.timer-btn.on { color: var(--danger); }
@media (max-width: 640px) { .timer-chip .lbl { display: none; } }
.tc-top { display: flex; align-items: flex-start; gap: 4px; }
.tc-top .t { flex: 1; }
.tc-top .timer-btn { margin: -4px -6px 0 0; }
.proj-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin: 2px 0; }
.proj-tag::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }

/* ───────── projects ───────── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.proj-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; color: inherit; text-decoration: none; border-top: 3px solid var(--c); transition: box-shadow .15s, transform .15s; }
.proj-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); transform: translateY(-1px); }
.proj-card p { margin: 0; }
.ph { display: flex; align-items: center; gap: 8px; }
.ph b { flex: 1; font-size: 15px; }
.ph h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.sw { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.pf { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); margin-top: auto; }
.pf svg { width: 14px; height: 14px; vertical-align: -2px; }
.pbar { height: 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 4px; }
.pbar i { display: block; height: 100%; border-radius: 4px; }
.proj-head { margin-bottom: 14px; }
.proj-head > a { display: inline-block; margin-bottom: 6px; text-decoration: none; }
.proj-meta { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 18px; margin-top: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.proj-meta b { font-size: 14px; }

/* gantt */
.gantt-card { padding: 0; overflow: hidden; }
.gantt-tools { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gantt { display: flex; }
.g-left { width: 230px; flex: none; border-right: 1px solid var(--line); background: var(--surface); }
.g-lh { height: 52px; display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.g-row { height: 40px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.g-name { padding: 0 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.g-name:hover { background: var(--surface-2); }
.st { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #64748b; }
.st.in_progress { background: #d97a1f; } .st.done { background: #1f9d55; }
.g-right { flex: 1; overflow-x: auto; position: relative; }
.g-canvas { position: relative; }
.g-head { height: 52px; position: relative; border-bottom: 1px solid var(--line); background: var(--surface); }
.gm { position: absolute; top: 6px; font-size: 12px; font-weight: 600; padding-left: 6px; white-space: nowrap; border-left: 1px solid var(--line); line-height: 16px; }
.g-days { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; }
.gd { position: absolute; bottom: 0; height: 24px; line-height: 24px; text-align: center; font-size: 11px; color: var(--ink-3); }
.gd.we { color: var(--ink-3); opacity: .6; }
.gd.today { color: var(--accent); font-weight: 700; }
.g-grid { position: relative; background-image: linear-gradient(to bottom, transparent 39px, var(--line) 39px); background-size: 100% 40px; min-height: 40px; }
.g-we { position: absolute; top: 0; bottom: 0; background: var(--surface-2); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); opacity: .7; z-index: 1; }
.g-bound { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--ink-3); opacity: .5; }
.g-bar { position: absolute; height: 24px; border-radius: 6px; background: var(--c); color: #fff; display: flex; align-items: center; font-size: 12px; font-weight: 550; cursor: grab; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.15); user-select: none; touch-action: none; overflow: hidden; }
.g-bar.done { opacity: .45; }
.g-bar.late { background: var(--danger); }
.g-bar.drag { cursor: grabbing; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 3; }
.g-bar .lbl { flex: 1; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar .h { width: 7px; align-self: stretch; cursor: ew-resize; flex: none; }
.g-bar .h:hover { background: rgba(255,255,255,.3); }
.g-unsched { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.g-un { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; }

/* time */
.time-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 70px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .b { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar .b i { display: block; height: 100%; border-radius: 4px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.timesheet th.today, .timesheet td.today { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.timesheet tfoot th { border-top: 1px solid var(--line-strong); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); font-weight: 700; }
.timesheet td.num, .timesheet th.num { font-variant-numeric: tabular-nums; }
.sec-h { margin: 22px 0 10px; font-size: 15px; }
@media (max-width: 820px) {
  .proj-meta { grid-template-columns: 1fr 1fr; }
  .time-split { grid-template-columns: 1fr; }
  .g-left { width: 140px; }
}

/* ───────── finance ───────── */
:root { --rev: #0f8f7e; --exp: #d97a1f; }
:root[data-theme="dark"] { --rev: #26a593; --exp: #d9873a; }
.tabs a { padding: 9px 12px; color: var(--ink-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.strike { text-decoration: line-through; }
.danger-t { color: var(--danger); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.table tfoot th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); font-weight: 700; border-top: 1px solid var(--line-strong); }
.kv { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.field.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.field.check > span { font-weight: 500; color: var(--ink); }
.field small { font-size: 11.5px; }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.fin-side { display: flex; flex-direction: column; gap: 16px; }
.fin-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.fin-row:last-child { border-bottom: 0; }
a.fin-row:hover b:first-child { color: var(--accent); }
.fin-callout { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--accent-soft); border-color: transparent; }
.fin-callout svg { width: 22px; height: 22px; color: var(--accent); }
.fin-callout > div:nth-child(2) { flex: 1; font-size: 13px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend span, .mc-tip div { display: inline-flex; align-items: center; gap: 6px; }
.sw-rev, .sw-exp { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--rev); }
.sw-exp { background: var(--exp); }
.mchart { display: flex; gap: 8px; height: 260px; padding-bottom: 22px; }
.mc-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--ink-3); text-align: right; min-width: 56px; margin: -6px 0 -6px; font-variant-numeric: tabular-nums; }
.mc-plot { position: relative; flex: 1; display: flex; border-bottom: 1px solid var(--line-strong); }
.mc-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.mc-col { flex: 1; position: relative; display: flex; justify-content: center; outline: none; cursor: default; }
.mc-col.hot, .mc-col:focus-visible { background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: 6px 6px 0 0; }
.mc-col.future .mc-x { opacity: .5; }
.mc-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 64%; max-width: 34px; }
.mc-bars b { flex: 1; border-radius: 4px 4px 0 0; min-height: 0; background: var(--rev); }
.mc-bars b.exp { background: var(--exp); }
.mc-x { position: absolute; bottom: -20px; font-size: 11px; color: var(--ink-3); }
.mc-tip { position: absolute; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 12px; min-width: 170px; pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
.mc-tip[hidden] { display: none; }
.mc-tip div { display: flex; }
.mc-tip div span { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; font-weight: 600; }
.mc-tip .pr { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.mc-table { margin-top: 10px; }
.mc-table summary { cursor: pointer; }
/* invoice editor */
.inv-top { margin-bottom: 14px; }
.inv-top > a { text-decoration: none; }
.inv-top .ph { margin: 6px 0 4px; gap: 10px; }
.inv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.inv-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
.inv-doc { padding: 20px; }
.inv-head { display: flex; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.li-table { width: 100%; border-collapse: collapse; }
.li-table th { font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-align: left; padding: 0 4px 6px; }
.li-table th.num, .li-table td.num { text-align: right; }
.li-table td { padding: 4px; vertical-align: top; }
.li-table .input { padding: 6px 8px; font-size: 13px; }
.li-table textarea.input { resize: none; overflow: hidden; min-height: 33px; line-height: 1.4; }
.li-table input.num { text-align: right; }
.li-table td:nth-child(2) { width: 70px; } .li-table td:nth-child(3) { width: 70px; } .li-table td:nth-child(4) { width: 110px; } .li-table select { width: 82px; }
.li-amt { padding-top: 11px !important; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; font-size: 13px; }
.li-table .input:disabled { background: transparent; border-color: transparent; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.inv-foot { display: flex; gap: 24px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); align-items: flex-start; }
.inv-totals { width: 300px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.inv-totals div { display: flex; justify-content: space-between; gap: 12px; }
.inv-totals .grand { font-size: 17px; font-weight: 700; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 2px; }
.inv-doc .input:disabled { background: var(--surface-2); color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.fin-settings { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
@media (max-width: 1100px) { .fin-grid, .inv-grid { grid-template-columns: 1fr; } .inv-side { position: static; } }
@media (max-width: 820px) { .inv-head, .inv-foot { flex-direction: column; } .inv-totals { width: 100%; } .li-table thead { display: none; } .li-table tr { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--line); padding: 6px 0; } .li-table td:first-child { grid-column: 1 / -1; } .li-table td { width: auto !important; } .mc-axis { min-width: 44px; } }
.fin-tabs { overflow-x: auto; scrollbar-width: none; } .fin-tabs a { flex: none; white-space: nowrap; }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fin-callout.warn { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); margin-bottom: 14px; }
.fin-callout.warn svg { color: var(--danger); }
.modal .field.check { align-self: start; padding-bottom: 0; }
.bank-list { padding: 0; overflow: hidden; }
.bank-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bank-row:last-child { border-bottom: 0; }
.bank-main { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.bank-amt { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 108px; text-align: right; }
.bank-amt.in { color: var(--ok, #17733f); }
.bank-amt.out { color: var(--ink); }
.bank-txt { display: flex; flex-direction: column; min-width: 0; }
.bank-txt b, .bank-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; flex: 0 1 auto; }
.bank-act .btn svg { width: 14px; height: 14px; }
.bank-act .small svg { width: 14px; height: 14px; vertical-align: -2px; }
.bank-imports { margin-top: 14px; }
.bank-imports .fin-row { gap: 10px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .kpis.kpis-3 { grid-template-columns: 1fr 1fr; }
  .kpis.kpis-3 > :last-child { grid-column: 1 / -1; }
  .bank-amt { min-width: 0; text-align: left; }
  .bank-main { flex-basis: 100%; }
  .bank-act { justify-content: flex-start; }
}

/* ───────── brand pulse ───────── */
.tabs button svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--accent); }
.pulse-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.pulse-hero { display: flex; gap: 24px; align-items: center; padding: 22px; }
.gauge { position: relative; width: 150px; height: 150px; flex: none; }
.gauge svg { width: 100%; height: 100%; }
.g-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.g-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.g-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-num b { font-size: 44px; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.g-num span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }
.pulse-sum h2 { margin: 4px 0 10px; font-size: 20px; letter-spacing: -.01em; }
.pulse-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip.up { color: #1a7f4b; background: #e5f5ec; border-color: #c4e8d3; }
.chip.down { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.chip.warn { color: #8a5d00; background: #fdf3dc; border-color: #f2dfaf; }
:root[data-theme="dark"] .chip.up { color: #6fd39d; background: #173226; border-color: transparent; }
:root[data-theme="dark"] .chip.warn { color: #f0c66b; background: #3a2e12; border-color: transparent; }
.up-t { color: #1a7f4b; font-weight: 600; } .down-t { color: var(--danger); font-weight: 600; }
:root[data-theme="dark"] .up-t { color: #6fd39d; }
.trend-wrap { position: relative; }
.trend { width: 100%; height: 180px; display: block; overflow: visible; }
.t-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.t-ax { font-size: 10.5px; fill: var(--ink-3); }
.t-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.t-area { fill: var(--accent); opacity: .08; }
.t-cross { stroke: var(--ink-3); stroke-width: 1; }
.t-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.t-tip { position: absolute; top: -6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.t-tip b { font-size: 15px; }
.pulse-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.pulse-side { display: flex; flex-direction: column; gap: 16px; }
.pulse-parts { display: flex; flex-direction: column; gap: 16px; }
.pp-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.pp-s { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-bottom: 5px; }
.pp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.pp.off .pp-h b, .pp.off .pp-s { color: var(--ink-3); }
.pot-now, .pot-full { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.pot-now b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pot-full b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pot-now small, .pot-full small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.pot-gap { display: inline-block; font-size: 12.5px; font-weight: 650; color: #8a5d00; background: #fdf3dc; padding: 4px 10px; border-radius: 6px; }
.pot-gap.ok { color: #1a7f4b; background: #e5f5ec; }
:root[data-theme="dark"] .pot-gap { color: #f0c66b; background: #3a2e12; }
:root[data-theme="dark"] .pot-gap.ok { color: #6fd39d; background: #173226; }
.pulse-tips { display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.pulse-tips p { margin: 3px 0 0; color: var(--ink-2); }
.pulse-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pulse-sources .card-h h3, .card-h h3 { display: flex; align-items: center; gap: 8px; }
.meta-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.meta-dot.on { background: #1f9d55; }
.pulse-warn { margin-top: 10px; font-size: 12.5px; color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: 6px; }
.src-list { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.media-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: relative; }
.mthumb { width: 96px; height: 120px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; }
.mthumb span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; }
.mthumb svg { width: 30px; height: 30px; }
.mbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; }
.mbody > .small.muted:last-child, .mbody > div[title] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mreach b { font-size: 17px; }
.macts { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; }
.media-form .drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.media-form .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.media-form .drop [data-preview] { display: flex; align-items: center; gap: 10px; min-width: 0; }
.media-form .drop [data-preview] svg { width: 26px; height: 26px; color: var(--ink-3); flex: none; }
.drop-img { width: 48px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.drop-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.drop-btns label { cursor: pointer; }
.media-form .est { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; min-height: 20px; }
.media-form .est:empty { display: none; }
.media-form .est svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
@media (max-width: 1100px) { .pulse-top, .pulse-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .pulse-sources { grid-template-columns: 1fr; } .pulse-hero { flex-direction: column; text-align: center; } .pulse-chips { justify-content: center; } }
@media (max-width: 820px) { .hide-m { display: none; } }
.pulse-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pulse-sources .kv > div { flex-wrap: wrap; }
@media (max-width: 820px) { .pulse-sources { grid-template-columns: minmax(0, 1fr); } .media-grid { grid-template-columns: minmax(0, 1fr); } }
/* unit economics */
.econ-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.econ-hero .v small, .econ-big .v small { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.econ-big { padding: 16px; display: flex; flex-direction: column; gap: 6px; border-width: 2px; }
.econ-big .l { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.econ-big .v { font-size: 36px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.econ-big .s { font-size: 12px; color: var(--ink-3); }
.econ-big .badge { align-self: flex-start; }
.econ-big.good { border-color: #9fd9b6; }
.econ-big.warn { border-color: #ecd193; }
.econ-big.bad { border-color: #efb7af; }
:root[data-theme="dark"] .econ-big.good { border-color: #2a6342; }
:root[data-theme="dark"] .econ-big.warn { border-color: #6b5517; }
:root[data-theme="dark"] .econ-big.bad { border-color: #6b3029; }
.econ-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius, 10px); overflow: hidden; margin-bottom: 16px; }
.econ-row .mini { background: var(--surface); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.econ-row .mini span { font-size: 12px; color: var(--ink-2); }
.econ-row .mini b { font-size: 16px; font-variant-numeric: tabular-nums; }
.econ-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.econ-checks { display: flex; flex-direction: column; gap: 12px; }
.ck { display: flex; gap: 10px; align-items: flex-start; }
.ck p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ck b { font-size: 13.5px; }
.ck-i { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.ck.good .ck-i { background: #e3f5ea; color: #17733f; border-color: #c4e8d2; }
.ck.warn .ck-i { background: #fdf3dc; color: #8a5d00; border-color: #f2dfaf; }
.ck.bad .ck-i { background: var(--danger-soft); color: var(--danger); border-color: #f3cdc8; }
:root[data-theme="dark"] .ck.good .ck-i { background: #143522; color: #6fd69a; border-color: #1f4a30; }
:root[data-theme="dark"] .ck.warn .ck-i { background: #3a2d0c; color: #f0c45a; border-color: #4d3c12; }
.badge.light { font-size: 11px; }
.small-chart { height: 200px; }
.mc-bars.one { max-width: 24px; width: 46%; }
.econ-how { margin: 18px 0 8px; font-size: 13px; color: var(--ink-2); }
.econ-how summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.econ-how ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1200px) { .econ-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); } .econ-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .econ-hero, .econ-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .econ-big { grid-column: 1 / -1; } .econ-grid { grid-template-columns: 1fr; } }
.tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { white-space: nowrap; flex-shrink: 0; }
/* shared small bits (v0.8) */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
.empty .spinner { display: block; margin: 0 auto 10px; width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.chip b { color: var(--ink-3); font-weight: 600; margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on b { color: inherit; opacity: .8; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 13px; margin-bottom: 12px; }
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.callout.warn { background: #fdf3dc; border-color: #f2dfaf; color: #6b4a00; }
:root[data-theme="dark"] .callout.warn { background: #3a2d0c; border-color: #4d3c12; color: #f0c45a; }
.input.sm { height: 30px; font-size: 12.5px; padding: 0 9px; }
.seg.sm button { padding: 4px 10px; font-size: 12px; }
.tcount { font-size: 11px; color: var(--ink-3); font-weight: 600; margin-left: 3px; }
/* channel advisor */
.adv-bar { flex-wrap: wrap; gap: 10px; }
.adv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.adv-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius, 10px); overflow: hidden; }
.adv-sum > div { background: var(--surface); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.adv-sum span { font-size: 12px; color: var(--ink-2); }
.adv-sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.adv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.adv { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--line-strong); }
.adv.lean { border-left-color: #2f9e62; } .adv.cut { border-left-color: var(--danger); } .adv.fit { border-left-color: #d9a21f; } .adv.try, .adv.idea { border-left-color: var(--accent); }
.adv-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adv-h b { font-size: 14px; }
.adv p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.adv-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.conv { display: flex; align-items: center; gap: 8px; }
.conv > span { font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.conv-t { position: relative; flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; }
.conv-t i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; min-width: 2px; }
.conv-t s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; text-decoration: none; }
.fitdots { display: inline-flex; gap: 2px; vertical-align: 1px; }
.fitdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.fitdots i.on { background: var(--accent); }
.fitdots i.half { background: linear-gradient(90deg, var(--accent) 50%, var(--line-strong) 50%); }
.adv-ph { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plays { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.play { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .3s; }
.play.flash { box-shadow: 0 0 0 3px var(--accent); }
.play-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.play-fit { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); align-items: center; }
.play p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.play-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.play-tags span { font-size: 11.5px; background: var(--surface-2); border-radius: 6px; padding: 2px 7px; color: var(--ink-2); }
.play details { font-size: 12.5px; }
.play summary { cursor: pointer; font-weight: 600; }
.play ol { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.play .btn { align-self: flex-start; margin-top: auto; }
.dash-tip { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin: 16px 0; background: var(--accent-soft); border-color: transparent; }
.dash-tip .ico svg { width: 22px; height: 22px; color: var(--accent); }
.dash-tip > div:nth-child(2) { flex: 1; min-width: 0; }
.dash-tip .k { display: block; font-size: 11.5px; font-weight: 650; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .04em; }
.dash-tip b { display: block; margin-top: 2px; }
.dash-tip p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.dash-tip .acts { display: flex; gap: 6px; flex-shrink: 0; }
/* assistant nudge */
.ast-fab.has-nudge::after { content: ''; position: absolute; top: 4px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #e2533d; border: 2px solid var(--accent); }
.ast-nudge { align-self: stretch; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; animation: fade .25s; }
.ast-nudge .k { font-size: 11px; font-weight: 650; color: var(--accent-strong); display: inline-flex; gap: 5px; align-items: center; text-transform: uppercase; letter-spacing: .04em; }
.ast-nudge .k svg { width: 13px; height: 13px; }
.ast-nudge b { font-size: 13.5px; }
.ast-nudge p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.ast-nudge .row { display: flex; gap: 6px; margin-top: 4px; }
/* ideation */
.idea-search { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.is-row { display: flex; gap: 8px; }
.is-q { flex: 1; position: relative; }
.is-q svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.is-q .input { padding-left: 34px; height: 40px; font-size: 14.5px; width: 100%; }
.is-row .btn { height: 40px; }
.is-opts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.is-opts .input.sm { flex: 1; min-width: 200px; max-width: 360px; }
.idea-how { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding: 20px; }
.idea-how h3 { margin: 0 0 6px; }
.idea-how p, .idea-how li { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.idea-how ol { padding-left: 18px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.idea-how .chips { margin-top: 6px; }
.is-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 12px; font-size: 13.5px; flex-wrap: wrap; }
.is-sum { margin-bottom: 12px; }
.is-sum h3 { display: flex; align-items: center; gap: 6px; }
.is-sum h3 svg { width: 16px; height: 16px; color: var(--accent); }
.md { font-size: 13.5px; line-height: 1.55; }
.md p { margin: 0 0 8px; } .md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.themes { margin-bottom: 12px; }
.kindf { margin-bottom: 10px; }
.pp-list { display: flex; flex-direction: column; gap: 8px; }
.pp-item { display: flex; gap: 14px; padding: 12px 14px; align-items: flex-start; }
.pp-item > .btn { flex-shrink: 0; }
.pp-sel { margin-top: 14px; flex-shrink: 0; }
.pain { width: 52px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pain b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1; }
.pain small { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.pain span { width: 100%; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.pain span i { display: block; height: 100%; border-radius: 3px; background: var(--ink-3); }
.pain.mid b { color: #a86a00; } .pain.mid span i { background: #d9a21f; }
.pain.hi b { color: var(--danger); } .pain.hi span i { background: var(--danger); }
:root[data-theme="dark"] .pain.mid b { color: #f0c45a; }
.pp-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pp-t { display: flex; gap: 8px; align-items: baseline; }
.pp-t .badge { flex-shrink: 0; }
.pp-t a, .pp-t b { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pp-t a:hover { color: var(--accent); }
.pp-b p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.pp-b mark { background: color-mix(in srgb, var(--danger) 16%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.pp-m { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); }
.pp-m span { display: inline-flex; align-items: center; gap: 3px; }
.pp-m svg { width: 12px; height: 12px; }
.pp-m a { color: var(--accent); text-decoration: none; }
.pp-m select { width: auto; max-width: 220px; }
.idea-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 6px; }
.ib-col { background: var(--surface-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.ib-h { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 4px; }
.ib-h span { color: var(--ink-3); }
.ib-card { padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.ib-card:hover { border-color: var(--accent); }
.ib-t { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ib-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); white-space: pre-line; }
.vote { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 12px; padding: 2px 7px; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; color: var(--ink-2); flex-shrink: 0; }
.vote svg { width: 12px; height: 12px; }
.vote:hover { border-color: var(--accent); color: var(--accent); }
.ib-m { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.pain-chip { display: inline-flex; gap: 3px; align-items: center; font-weight: 600; }
.pain-chip svg { width: 12px; height: 12px; }
.pain-chip.hi { color: var(--danger); } .pain-chip.mid { color: #a86a00; }
.ib-empty { font-size: 12px; color: var(--ink-3); text-align: center; padding: 18px 0; }
.tabs button svg { color: var(--accent); }
@media (max-width: 900px) { .adv-list, .idea-how { grid-template-columns: 1fr; } .adv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .is-row { flex-direction: column; } .pp-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); } .pp-item.saved { grid-template-columns: auto 52px minmax(0, 1fr); } .pp-item > .btn { grid-column: -2 / -1; justify-self: start; } .dash-tip { flex-wrap: wrap; } .idea-board { grid-template-columns: repeat(4, minmax(240px, 82vw)); } }
/* calls */
.call-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.call-banner svg { width: 16px; height: 16px; color: var(--accent); }
.call-banner > span:nth-of-type(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dotlive { width: 8px; height: 8px; border-radius: 50%; background: #e2533d; animation: pulse 1.4s infinite; flex-shrink: 0; }
.call-ring { position: fixed; top: 16px; right: 16px; z-index: 95; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px 14px; animation: fade .2s; max-width: calc(100vw - 32px); }
.call-ring .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; animation: pulse 1.2s infinite; flex-shrink: 0; }
.call-ring .ico svg { width: 18px; height: 18px; }
.call-ring div { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.call-ring div span { color: var(--ink-2); font-size: 12px; }
.call-win { position: fixed; inset: 24px 24px 24px calc(var(--side-w, 232px) + 24px); z-index: 90; background: #111614; color: #f2f5f4; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; animation: fade .2s; }
.cw-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; }
.cw-head .rec { width: 8px; height: 8px; border-radius: 50%; background: #e2533d; animation: pulse 1.4s infinite; }
.cw-time { font-variant-numeric: tabular-nums; color: #a9b4b0; }
.cw-n { color: #a9b4b0; margin-left: auto; }
.cw-btn { background: rgba(255,255,255,.08); border: 0; color: inherit; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.cw-btn svg { width: 16px; height: 16px; }
.cw-grid { flex: 1; display: grid; gap: 8px; padding: 0 12px; min-height: 0; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.cw-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
.cw-grid[data-count="3"], .cw-grid[data-count="4"] { grid-template-columns: 1fr 1fr; }
.cw-grid[data-count="5"], .cw-grid[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.cw-grid[data-count="7"], .cw-grid[data-count="8"], .cw-grid[data-count="9"] { grid-template-columns: repeat(3, 1fr); }
.cw-tile { position: relative; background: #1d2522; border-radius: 12px; overflow: hidden; min-height: 0; box-shadow: 0 0 0 0 transparent; transition: box-shadow .15s; }
.cw-tile.speaking { box-shadow: 0 0 0 3px #26a593; }
.cw-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #1d2522; }
.cw-tile.me video { transform: scaleX(-1); }
.cw-tile.screen video, .cw-tile.me.screen video { object-fit: contain; transform: none; background: #000; }
.cw-av { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; place-items: center; font-size: 28px; font-weight: 700; color: #fff; }
.cw-tile.nocam video { visibility: hidden; }
.cw-tile.nocam .cw-av { display: grid; }
.cw-name { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.55); padding: 4px 9px; border-radius: 8px; font-size: 12.5px; max-width: calc(100% - 20px); }
.cw-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-name .mut { display: none; color: #ff8a78; }
.cw-name .mut svg { width: 14px; height: 14px; display: block; }
.cw-tile.muted .mut { display: block; }
.cw-tile[data-conn="connecting"]::after, .cw-tile[data-conn="new"]::after { content: 'Connecting…'; position: absolute; top: 10px; right: 10px; font-size: 11.5px; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; }
.cw-tile[data-conn="failed"]::after { content: 'Connection failed'; position: absolute; top: 10px; right: 10px; font-size: 11.5px; background: #8b2b20; padding: 3px 8px; border-radius: 6px; }
.cw-bar { display: flex; justify-content: center; gap: 12px; padding: 14px; }
.cw-ctl { width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.cw-ctl:hover { background: rgba(255,255,255,.2); }
.cw-ctl svg { width: 21px; height: 21px; }
.cw-ctl.off { background: #f2f5f4; color: #111614; }
.cw-ctl.on { background: #26a593; }
.cw-ctl.end { background: #d4483b; width: 64px; border-radius: 25px; }
.cw-ctl.end:hover { background: #b93a2e; }
.cw-ctl:disabled { opacity: .4; cursor: default; }
.cw-pill { display: none; }
.call-win.min { inset: auto auto 22px calc(var(--side-w, 232px) + 22px); width: auto; height: auto; background: transparent; box-shadow: none; overflow: visible; }
.call-win.min > :not(.cw-pill) { display: none; }
.call-win.min .cw-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: #111614; color: #fff; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg); font-variant-numeric: tabular-nums; }
.call-win.min .cw-pill svg { width: 18px; height: 18px; color: #26a593; }
@media (max-width: 820px) {
  .call-win { inset: 0; border-radius: 0; }
  .call-win.min { inset: auto auto 16px 16px; }
  .cw-grid[data-count="2"] { grid-template-columns: 1fr; }
  .cw-grid[data-count="3"], .cw-grid[data-count="4"], .cw-grid[data-count="5"], .cw-grid[data-count="6"] { grid-template-columns: 1fr 1fr; }
  .call-ring { left: 16px; right: 16px; }
}

/* ───────── Processes: approvals, runs, designer ───────── */
.feedlist { display: flex; flex-direction: column; }
.feedlist > div { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feedlist > div:last-child { border-bottom: 0; }
.feedlist > div > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feedlist > div > span:first-child svg { width: 18px; height: 18px; color: var(--accent); display: block; }
.ap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ap { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ap-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-t { font-size: 15.5px; }
.ap p { margin: 0; color: var(--ink-2); }
.ap-vars { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.ap-vars dt { color: var(--ink-3); text-transform: capitalize; }
.ap-vars dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ap-a { display: flex; gap: 8px; flex-wrap: wrap; }
.ap-a .ghost { margin-left: auto; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pr-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pr-card p { margin: 0; color: var(--ink-2); font-size: 13px; flex: 1; }
.pr-card .btn { margin-top: 4px; }
.pr-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.pr-ico svg { width: 19px; height: 19px; }
.pr-card.blank { border-style: dashed; box-shadow: none; background: transparent; }
.run-top { margin-bottom: 14px; }
.run-top > a { display: inline-flex; align-items: center; gap: 4px; }
.run-top > a svg { width: 15px; height: 15px; }
.run-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.run-h h2 { margin: 0; font-size: 20px; }
.run-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pd-view { overflow: hidden; }
.pd-view .pd-scroll { max-height: 70vh; }
.run-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.run-steps li { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.run-steps li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.run-steps li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rs-i { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #fff; }
.rs-i svg { width: 15px; height: 15px; }
.run-steps li.waiting .rs-i { box-shadow: 0 0 0 4px var(--accent-soft); animation: pd-pulse 1.6s ease-in-out infinite; }
.run-steps li.rejected b { color: var(--danger); }
.run-steps li.skipped { opacity: .55; }
.rs-c { margin: 6px 0 0; padding: 7px 10px; background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: 0 6px 6px 0; font-size: 13px; }
@keyframes pd-pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.pd { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pd-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pd-name { flex: 1; min-width: 180px; max-width: 420px; font-weight: 600; font-size: 15px; }
.pd-trig { width: auto; max-width: 280px; }
.pd-dirty { font-size: 12px; font-weight: 600; color: var(--warn); }
.pd-on { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; margin-left: auto; cursor: pointer; }
.pd-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) 300px; }
.pd-pal { padding: 14px 12px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.pd-pi { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-weight: 550; cursor: grab; text-align: left; }
.pd-pi:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pd-pi > span, .pd-dot { width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; flex-shrink: 0; }
.pd-pi svg, .pd-dot svg { width: 14px; height: 14px; }
.pd-tip { margin-top: 10px; line-height: 1.45; }
.pd-scroll { overflow: auto; background-color: var(--bg); background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 20px 20px; }
.pd-canvas { position: relative; }
.pd-side { border-left: 1px solid var(--line); background: var(--surface); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.pd-side h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pd-side p { margin: 0; }
.pd-side code { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 0 4px; border-radius: 4px; }
.pd-side > .btn { align-self: flex-start; }
.pd-fields { display: flex; flex-direction: column; gap: 8px; }
.pd-f { display: grid; grid-template-columns: 1fr 92px 28px; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.pd-f label { grid-column: 1; display: flex; align-items: center; gap: 4px; }
.pd-f code { grid-column: 2 / 4; justify-self: end; }
.pd-f [data-fx] { grid-row: 1; grid-column: 3; }
.pd-probs { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px; border-top: 1px solid var(--line); background: var(--surface); }
.pd-probs svg { width: 16px; height: 16px; flex-shrink: 0; }
.pd-probs.warn { color: #8a5d00; background: #fdf3dc; }
.pd-probs.ok { color: #17733f; }
.pd-probs.ok svg { color: var(--ok); }
.pd-small { display: none; margin: 16px; }
.pd-svg { position: absolute; inset: 0; overflow: visible; }
.pd-edge { cursor: pointer; color: var(--ink-3); }
.pd-edge .hit { fill: none; stroke: transparent; stroke-width: 14; }
.pd-edge .ln { fill: none; stroke: currentColor; stroke-width: 2; }
.pd-edge.yes, .pd-edge.approved { color: var(--ok); }
.pd-edge.no, .pd-edge.rejected { color: var(--danger); }
.pd-edge:hover .ln { stroke-width: 3; stroke-dasharray: 6 4; }
.pd-view .pd-edge { cursor: default; }
.pd-view .pd-edge:hover .ln { stroke-width: 2; stroke-dasharray: none; }
.pd-edge.dim { opacity: .3; }
.pd-edge.taken .ln { stroke-width: 3; }
.pd-temp { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
#pd-arrow path { fill: currentColor; }
.pd-node { position: absolute; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); cursor: grab; user-select: none; touch-action: none; display: flex; flex-direction: column; }
.pd-view .pd-node { cursor: default; }
.pd-node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.pd-nh { display: flex; align-items: center; gap: 7px; padding: 8px 10px 4px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--c); }
.pd-nh span { width: 20px; height: 20px; border-radius: 5px; background: var(--c); color: #fff; display: grid; place-items: center; }
.pd-nh svg { width: 12px; height: 12px; }
.pd-nh em { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--accent-strong); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; }
.pd-sum { padding: 0 10px 8px; font-size: 13px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.pd-node.end .pd-sum, .pd-node.start .pd-sum { color: var(--ink-2); }
.pd-in { position: absolute; left: -6px; top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.pd-port { position: absolute; right: -8px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink-3); cursor: crosshair; }
.pd-port:hover { transform: scale(1.25); }
.pd-port.yes, .pd-port.approved { border-color: var(--ok); }
.pd-port.no, .pd-port.rejected { border-color: var(--danger); }
.pd-port b { position: absolute; left: 18px; top: -9px; font-size: 10.5px; font-weight: 650; font-style: normal; color: var(--ink-2); background: var(--surface); padding: 0 4px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.pd-view .pd-port { cursor: default; }
.pd-view .pd-port:hover { transform: none; }
.pd-node.st-done, .pd-node.st-approved { border-color: var(--ok); }
.pd-node.st-rejected { border-color: var(--danger); }
.pd-node.st-waiting { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.pd-node.st-skipped, .pd-node.unvisited { opacity: .45; box-shadow: none; }
:root[data-theme="dark"] .pd-probs.warn { color: #f0c96a; background: #33290f; }
:root[data-theme="dark"] .pd-probs.ok { color: #6fd39b; }
@media (max-width: 1100px) { .pd-main { grid-template-columns: 150px minmax(0, 1fr) 260px; } .run-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .pd-main, .pd-probs { display: none; }
  .pd-small { display: block; }
  .pd-top .pd-trig, .pd-top .pd-on, .pd-top [data-save] { display: none; }
  .ap-list { grid-template-columns: 1fr; }
}
.pd-zoom button { min-width: 34px; font-variant-numeric: tabular-nums; }
.pd-zoom [data-zl] { min-width: 54px; }
@media (max-width: 900px) { .pd-top .pd-zoom { display: none; } }

/* ───────── E-signature: send for signature, requests ───────── */
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-strong); cursor: pointer; font: inherit; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn svg { width: 13px; height: 13px; }
.pdf-pno { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #8b938f; background: rgba(255,255,255,.85); padding: 0 6px; border-radius: 4px; pointer-events: none; }
.sr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.sr-grid .card-h { flex-wrap: wrap; gap: 10px; }
.sr-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.sr-pick select { width: 240px; max-width: 100%; }
.sr-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; }
.sr-signers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sr-s { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.sr-s.on { background: color-mix(in srgb, var(--c) 7%, var(--surface)); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); border-left-color: var(--c); }
.sr-n { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; }
.sr-in { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sr-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.sr-add { display: flex; gap: 8px; margin-bottom: 10px; }
.sr-fieldcount { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.sr-chip.miss { border-style: dashed; color: var(--ink-2); }
.sr-msg { display: flex; flex-direction: column; gap: 12px; }
.sr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sr-send { width: 100%; justify-content: center; height: 40px; }
.sf-box { position: absolute; aspect-ratio: 3.2 / 1; border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 6px; cursor: move; display: flex; align-items: flex-end; padding: 4px 6px; touch-action: none; }
.sf-box span { font-size: 11px; font-weight: 650; color: var(--c); background: rgba(255,255,255,.85); padding: 0 5px; border-radius: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.sf-box .x { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; border: 0; font-size: 12px; cursor: pointer; line-height: 20px; padding: 0; }
.sr-links { display: flex; flex-direction: column; gap: 14px; }
.sr-link { display: flex; gap: 10px; align-items: flex-start; }
.sr-link > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sr-people { display: flex; flex-wrap: wrap; gap: 5px; }
.sr-p { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.sr-p::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); opacity: .4; }
.sr-p.sent::before, .sr-p.viewed::before { opacity: 1; }
.sr-p.signed { border-color: #c4e8d2; background: #e3f5ea; color: #17733f; }
.sr-p.signed::before { display: none; }
.sr-p.signed svg { width: 12px; height: 12px; }
.sr-p.declined { border-color: #f3cdc8; background: var(--danger-soft); color: var(--danger); }
:root[data-theme="dark"] .sr-p.signed { background: #143522; color: #6fd69a; border-color: #1f4a30; }
.sr-detail { display: flex; flex-direction: column; gap: 12px; }
.sr-detail h4 { margin: 8px 0 0; }
.sr-detail > .btn { align-self: flex-start; }
.sr-dh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sr-sl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sr-sl li { display: flex; gap: 10px; }
.sr-sl li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.sr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sr-ev { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sr-ev li { display: flex; flex-direction: column; }
.sr-detail code { font-size: 11px; word-break: break-all; }
@media (max-width: 1100px) { .sr-grid { grid-template-columns: 1fr; } .sr-side { position: static; } }

/* contact drawer: client portal */
.cp { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.cp-h { display: flex; align-items: center; gap: 8px; }
.cp-h h4 { margin: 0; }
.cp p { margin: 0; }
.cp-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cp-list > a, .cp-list > div { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); min-width: 0; }
.cp-list span svg { width: 14px; height: 14px; color: var(--accent); display: block; }
.cp-list .in span svg { color: var(--ok); }
.cp-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-list em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ───────── public pages: signer + client portal ───────── */
body.pub { min-height: 100%; height: auto; }
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.pub-top b { font-size: 16px; }
.pub-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.pub-lock svg { width: 15px; height: 15px; color: var(--accent); }
.pub-main { max-width: 1180px; margin: 0 auto; padding: 24px 24px 60px; }
.pub-msg { max-width: 520px; margin: 40px auto; padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pub-msg h1 { margin: 0; font-size: 22px; }
.pub-msg p { margin: 0; }
.pub-code input { text-align: center; font-size: 20px; letter-spacing: .15em; max-width: 260px; height: 46px; }
.pub-err { color: var(--danger); font-size: 13px; margin: 0; }
.ps-head { margin-bottom: 18px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ps-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.ps-note { margin: 6px 0 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: pre-wrap; max-width: 760px; }
.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ps-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.ps-pages { max-height: none; }
.ps-page { cursor: default; }
.ps-field { position: absolute; aspect-ratio: 3.2 / 1; border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: 6px; display: flex; align-items: center; justify-content: center; animation: ps-pulse 2s ease-in-out infinite; }
.ps-field span { font-size: 12px; font-weight: 700; color: var(--c); }
.ps-field img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; display: none; }
.ps-field.filled { animation: none; background: transparent; border-style: solid; border-width: 1px; }
.ps-field.filled span { display: none; }
.ps-field.filled img { display: block; }
@keyframes ps-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); } }
.ps-side { position: sticky; top: 76px; }
.ps-side .card-b { display: flex; flex-direction: column; gap: 12px; }
.ps-side h3 { margin: 0; font-size: 16px; }
.ps-side h4 { margin: 6px 0 0; font-size: 13px; }
.ps-side p { margin: 0; }
.ps-agree { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer; }
.ps-agree input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.ps-sign { height: 44px; justify-content: center; font-size: 15px; }
.ps-decline summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.ps-decline[open] { display: flex; flex-direction: column; gap: 8px; }
.ps-decline[open] .btn { align-self: flex-start; }
.ps-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%; }
.ps-people li { display: grid; grid-template-columns: 24px 1fr; column-gap: 9px; font-size: 13px; align-items: center; }
.ps-people li > span { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ps-people li.signed > span { background: var(--ok); border-color: var(--ok); color: #fff; }
.ps-people li.me b { color: var(--accent-strong); }
.ps-people em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.ps-done { max-width: 560px; }
.ps-done .ps-head { align-items: center; text-align: center; margin: 0; }
.ps-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 32px; display: grid; place-items: center; margin: 8px 0 0; }
.ps-done h2 { margin: 0; font-size: 20px; }
.pt-head { margin-bottom: 18px; }
.pt-head h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; }
.pt-head p { margin: 0; }
.pt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.pt-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.pt-stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pt-stats span { font-size: 12.5px; color: var(--ink-2); }
.pt-stats .hot { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.pt-stats .hot b { color: var(--accent-strong); }
.pt-sec { margin-bottom: 16px; }
.pt-list { list-style: none; margin: 0; padding: 0; }
.pt-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pt-list li:last-child { border-bottom: 0; }
.pt-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-list li > div b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; }
.pt-ico.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pt-ico.ok { background: #e3f5ea; border-color: #c4e8d2; color: #17733f; }
:root[data-theme="dark"] .pt-ico.ok { background: #143522; border-color: #1f4a30; color: #6fd69a; }
.pt-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-empty { margin: 0; }
.pt-up { display: flex; flex-direction: column; gap: 10px; }
.pt-up .btn { align-self: flex-start; }
.pt-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; text-align: center; background: var(--surface-2); }
.pt-drop b { color: var(--accent-strong); word-break: break-word; }
.pt-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.pt-sent { margin-top: 12px; }
.pt-foot { text-align: center; margin-top: 20px; }
.pt-list li.pt-decide { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 10px; }
.pt-decide form { display: flex; flex-direction: column; gap: 10px; }
.pt-decide p { margin: 0; }
.pt-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pt-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.pt-dbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-flash { animation: pt-flash 1.6s ease-out; }
@keyframes pt-flash { from { background: var(--accent-soft); } to { background: transparent; } }
@media (max-width: 900px) {
  .ps-grid { grid-template-columns: 1fr; }
  .ps-side { position: static; }
  .pub-main { padding: 16px 16px 40px; }
  .pub-top { padding: 12px 16px; }
  .pt-stats b { font-size: 18px; }
  .pt-list li { flex-wrap: wrap; }
  .pt-list li > div { flex-basis: calc(100% - 46px); }
  .pt-list li .btn, .pt-amt { margin-left: 46px; }
  .pt-list li .btn + .btn { margin-left: 0; }
  .pt-list li.pt-decide .btn { margin-left: 0; }
  .pt-amt { flex-direction: row; align-items: center; gap: 8px; }
}
.otp-input { font-size: 20px; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }

/* ───── security (v1.1) ───── */
.tf-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; }
.tf-steps li { line-height: 1.5; }
.tf-qr { margin: 10px 0 6px; width: 184px; height: 184px; padding: 8px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.tf-qr svg { width: 100%; height: 100%; display: block; }
.tf-key { margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; word-break: break-all; user-select: all; }
.tf-confirm { display: flex; gap: 8px; margin-top: 8px; max-width: 320px; }
.tf-confirm .input { flex: 1; }
.tf-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14px; }
.tf-ok { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ink); margin-bottom: 14px; }
.tf-saved { display: flex; gap: 8px; align-items: center; margin: 14px 0 10px; font-size: 14px; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sec-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } .sec-grid .card-h { flex-wrap: wrap; gap: 8px; } }
.sec-scroll { overflow-x: auto; }
.sec-scroll .table td, .sec-scroll .table th { white-space: nowrap; }
.sec-state { display: flex; align-items: flex-start; gap: 12px; }
.sec-state .dot { margin-top: 6px; }
.sec-state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); flex: none; }
.sec-state.on .dot { background: var(--ok); }
.sec-state.off .dot { background: var(--warn); }
.sec-list { display: flex; flex-direction: column; }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sec-row:first-child { border-top: 0; }
.sec-row .grow { flex: 1; min-width: 0; }
.sec-row .sub { font-size: 12px; color: var(--ink-3); }
.sec-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); flex: none; }
.sec-ico svg { width: 16px; height: 16px; }
.sec-ico.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.sec-ico.good { color: var(--ok); }
.audit-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.audit-filters select { max-width: 220px; }
.tf-lock { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.tf-lock .card { width: 100%; max-width: 560px; }
.tf-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 16px 4px; color: var(--ink); }

/* ───── timestamp vault (v1.2) ───── */
.tsv { display: flex; flex-direction: column; gap: 16px; }
.tsv-intro-t { display: flex; gap: 16px; align-items: flex-start; }
.tsv-intro h2 { margin: 0 0 4px; font-size: 18px; }
.tsv-intro p { margin: 0; max-width: 820px; line-height: 1.55; }
.tsv-seal { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.tsv-seal svg { width: 22px; height: 22px; }
.tsv-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); align-items: center; }
.tsv-stats > div { display: flex; flex-direction: column; gap: 2px; }
.tsv-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.tsv-stats span { font-size: 12px; color: var(--ink-3); }
.tsv-stats > div:last-child { flex-direction: row; align-items: center; gap: 10px; margin-left: auto; }
.tsv-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tsv-grid { grid-template-columns: minmax(0, 1fr); } .tsv-stats > div:last-child { margin-left: 0; } .tsv .card-h { flex-wrap: wrap; gap: 8px; } }
.tsv-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.tsv-drop.sm { padding: 20px 16px; }
.tsv-drop svg { width: 26px; height: 26px; color: var(--accent); }
.tsv-drop:hover, .tsv-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.tsv-items { display: flex; flex-direction: column; }
.tsv-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tsv-item .grow { flex: 1; min-width: 0; }
.tsv-item .mono { word-break: break-all; }
.tsv-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); flex: none; }
.tsv-ico svg { width: 16px; height: 16px; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brk { word-break: break-all; }
.tsv-name { display: flex; align-items: center; gap: 8px; }
.tsv-name svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.tsv-scroll { overflow-x: auto; }
.tsv-proof { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); margin: 12px 0 8px; border: 1px solid var(--line); }
.tsv-proof .tsv-seal { width: 36px; height: 36px; }
.tsv-proof.ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.tsv-proof.ok .tsv-seal { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tsv-proof.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.tsv-proof.bad .tsv-seal { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tsv-detail .tsv-proof { margin-top: 0; }
.tsv-dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 16px 0; font-size: 13.5px; }
.tsv-dl dt { color: var(--ink-3); font-size: 12.5px; }
.tsv-dl dd { margin: 0; }
.vf-main { max-width: 720px; }
.vf-main h1 { font-size: 26px; margin: 8px 0 6px; }
.vf-main .tsv-drop { padding: 44px 16px; margin-top: 18px; background: var(--surface); }
.vf-receipt { margin-top: 18px; }
.auth-ok { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
.auth-msg { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-msg h1 { font-size: 24px; letter-spacing: -.01em; margin: 0; }
.auth-msg p { margin: 0; }
.app-banner { display: flex; align-items: center; gap: 10px; padding: 9px 24px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.app-banner svg { width: 16px; height: 16px; color: var(--accent-strong); flex: none; }
.app-banner span { flex: 1; min-width: 200px; }
.app-banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.app-banner.warn svg { color: var(--warn); }
.push-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin: 14px 0; font-size: 13.5px; }
.push-cats label { display: flex; align-items: center; gap: 8px; }

/* ───── platform console (v1.3) ───── */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 4px; }
.pf-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.pf-tile b { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pf-tile span { font-size: 13px; color: var(--ink-2); }
.pf-tile small { font-size: 12px; color: var(--ink-3); }
.pf-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.pf-bars i { flex: 1; background: var(--line); border-radius: 3px 3px 0 0; min-height: 2px; }
.pf-bars i.on { background: var(--accent); }
.pf-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.pf-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pf-actions .btn { justify-content: flex-start; }

/* ───────── v1.5: phone layout + offline ───────── */
.bnav, .side-scrim { display: none; }
.net-bar { display: flex; align-items: center; gap: 10px; padding: 8px 24px; font-size: 13px; background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.net-bar svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent-strong); }
.net-bar span { flex: 1; min-width: 0; }
.net-bar.off { background: color-mix(in srgb, var(--warn, #c98a12) 16%, var(--surface)); }
.net-bar.off svg { color: var(--warn, #c98a12); }
.net-bar.bad { background: var(--danger-soft); }
.net-bar.bad svg { color: var(--danger); }
.net-list { list-style: none; margin: 0 0 12px; padding: 0; }
.net-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.net-list li > span:first-child { flex: 1; min-width: 0; }
[data-pending], .pending { opacity: .75; }
.topbar h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .shell { height: 100dvh; }
  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 58; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .04); }
  .bnav[hidden] { display: none; }
  .bnav a, .bnav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; border: 0; background: none; color: var(--ink-3); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bnav svg { width: 22px; height: 22px; }
  .bnav .active { color: var(--accent-strong); }
  .bnav .active svg { stroke-width: 2.2; }
  .bnav .count { position: absolute; top: 3px; left: calc(50% + 6px); background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 0 6px; line-height: 17px; }
  .bnav [data-net-count] { background: var(--warn, #c98a12); }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 74; background: rgba(10, 16, 14, .38); }
  .side-scrim[hidden] { display: none; }
  .side { padding-bottom: env(safe-area-inset-bottom); }
  .content { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .ast-fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; height: 46px; width: 46px; padding: 0; justify-content: center; }
  .ast-fab span { display: none; }
  .ast-panel { bottom: calc(132px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 200px); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100vw - 32px); }
  .on-chat-page .content { padding-bottom: 0; }
  .on-chat-page .chat-wrap { height: calc(100dvh - 58px - 61px - env(safe-area-inset-bottom)); min-height: 0; }
  /* inside an open chat the bottom navigation steps aside for the composer (back arrow returns to the list) */
  body:has(.chat-wrap.has-room) .bnav { display: none; }
  .on-chat-page .chat-wrap.has-room { height: calc(100dvh - 58px - env(safe-area-inset-bottom)); }
  .on-assistant-page .content, .on-chat-page .bnav ~ .ast-fab { padding-bottom: 0; }
  .net-bar { padding: 8px 14px; }
  .topbar { gap: 8px; }
  #top-actions { gap: 6px !important; min-width: 0; }
  #top-actions.squeeze .btn.primary { font-size: 0; gap: 0; padding: 0 10px; }
  #top-actions.squeeze .btn.primary svg { width: 18px; height: 18px; }
  .btn { height: 38px; }
  .btn.sm { height: 32px; }
  .input, select.input { min-height: 40px; font-size: 16px; } /* 16px stops iOS from zooming into fields */
  .modal { max-height: calc(100dvh - 24px); }
  .dash-tip > div:nth-child(2) { flex-basis: calc(100% - 40px); }
  .dash-tip > div:last-child { margin-left: 36px; }
}
/* tables become stacked cards on phones (labels come from the header, set by mobile.js) */
@media (max-width: 640px) {
  .table[data-cards] thead { display: none; }
  .table[data-cards], .table[data-cards] tbody, .table[data-cards] tfoot { display: block; }
  .table[data-cards] tr { display: flex; flex-direction: column; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table[data-cards] tr:last-child { border-bottom: 0; }
  .table[data-cards] td, .table[data-cards] tfoot th { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0; border: 0; text-align: right; min-width: 0; background: none !important; }
  .table[data-cards] td::before, .table[data-cards] tfoot th::before { content: attr(data-label); flex-shrink: 0; color: var(--ink-3); font-size: 12px; font-weight: 500; text-align: left; }
  .table[data-cards] td[data-label=""]::before, .table[data-cards] tfoot th[data-label=""]::before { content: none; }
  .table[data-cards] td:first-child { justify-content: flex-start; text-align: left; font-size: 15px; padding-bottom: 5px; }
  .table[data-cards] td:first-child::before { content: none; }
  .table[data-cards] td:empty { display: none; }
  .table[data-cards] td > div, .table[data-cards] td > .small { text-align: inherit; }
  .table[data-cards] tfoot tr { background: var(--surface-2); }
  .table-wrap { overflow-x: visible; }
  .table[data-cards] td.num { font-weight: 600; }
  .table[data-cards] td .btn { margin-left: auto; }
  .kpis { gap: 10px; }
  .kpi .v { font-size: 22px; }
  .table[data-cards] tfoot th:empty, .timesheet[data-cards] td.muted { display: none; }
  /* a leading checkbox sits to the left of the card; the next cell becomes the title */
  .table[data-cards] tr { position: relative; }
  .table[data-cards] tr:has(> td:first-child > input[type=checkbox]:only-child) { padding-left: 46px; }
  .table[data-cards] td:first-child:has(> input[type=checkbox]:only-child) { position: absolute; left: 14px; top: 12px; padding: 0; }
  .table[data-cards] td:first-child:has(> input[type=checkbox]:only-child) input { width: 20px; height: 20px; }
  .table[data-cards] td:first-child:has(> input[type=checkbox]:only-child) + td { justify-content: flex-start; text-align: left; font-size: 15px; padding-bottom: 5px; display: block; }
  .table[data-cards] td:first-child:has(> input[type=checkbox]:only-child) + td::before { content: none; }
  /* a trailing cell of buttons moves to the card's top-right corner */
  .table[data-cards] tr > td:last-child[data-label=""]:has(.btn):not(:first-child) { position: absolute; top: 6px; right: 8px; padding: 0; gap: 2px; }
  .table[data-cards] tr:has(> td:last-child[data-label=""] .btn) > td:nth-child(-n+2) { padding-right: 84px; }
}
/* captcha status line on the sign-in page and hosted forms */
.captcha-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); min-height: 20px; }
.captcha-line svg { width: 16px; height: 16px; flex-shrink: 0; }
.captcha-line.ok { color: var(--accent-strong, var(--accent)); }
.captcha-line.captcha-box { min-height: 65px; }

/* sidebar footer buttons keep their size, icons always visible */
.side-foot button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side-foot button svg { width: 18px; height: 18px; }
.side-foot .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink-3) 45%, transparent) transparent; }
.side, .side * { scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.nav:hover { scrollbar-color: rgba(255, 255, 255, .28) transparent; }
/* collapse button and icons-only sidebar (desktop) */
.side-toggle { margin-left: auto; background: none; border: 0; color: var(--side-ink-2); cursor: pointer; padding: 5px; border-radius: 6px; display: inline-flex; }
.side-toggle:hover { background: var(--side-active); color: var(--side-strong); }
.side-toggle svg { width: 18px; height: 18px; }
@media (min-width: 821px) {
  .side-mini { --side-w: 64px; }
  .side-mini .shell { grid-template-columns: 64px 1fr; }
  .side-mini .brand { flex-direction: column; gap: 10px; padding: 16px 0 12px; }
  .side-mini .brand #app-name, .side-mini .tenant-pick, .side-mini .nav h6, .side-mini .nav a span, .side-mini .side-foot .who { display: none; }
  .side-mini .side-toggle { margin: 0; }
  .side-mini .nav { padding: 4px 8px 16px; }
  .side-mini .nav a { justify-content: center; padding: 9px 0; position: relative; }
  .side-mini .nav a + h6 + a, .side-mini .nav h6 + a { margin-top: 0; }
  .side-mini .nav h6 { display: block; height: 1px; margin: 10px 8px; padding: 0; overflow: hidden; color: transparent; background: #23302c; }
  .side-mini .nav a .count { position: absolute; top: 2px; right: 4px; margin: 0; font-size: 10px; padding: 0 5px; line-height: 15px; }
  .side-mini .side-foot { flex-direction: column; padding: 10px 0; gap: 6px; }
}
@media (max-width: 820px) { .side-toggle { display: none; } }
/* Brand Pulse: Facebook connect and post list */
.fb-connect { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.posts-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.posts-ctl .input { min-height: 32px; height: 32px; padding: 0 8px; font-size: 13px; }
.post-list { display: flex; flex-direction: column; }
.post-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.post-row:first-child { border-top: 0; }
a.post-row[href]:hover { background: var(--surface-2); text-decoration: none; }
.post-pic { position: relative; width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.post-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-src { position: absolute; left: 3px; bottom: 3px; font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; padding: 0 4px; border-radius: 4px; line-height: 15px; }
.post-src.facebook { background: #1877f2; } .post-src.instagram { background: #c13584; }
.post-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; }
.post-nums { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-nums b { min-width: 44px; text-align: right; font-size: 14px; color: var(--ink); }
.post-nums b.post-hot, .post-hot-k { color: var(--accent-strong, var(--accent)); }
.post-nums b.post-hot::before { content: '● '; font-size: 9px; vertical-align: 2px; }
@media (max-width: 640px) {
  .post-row { grid-template-columns: 48px 1fr; }
  .post-pic { width: 48px; height: 48px; }
  .post-nums { grid-column: 2; flex-wrap: wrap; gap: 10px; }
  .post-nums b { min-width: 0; margin-left: auto; }
}
.auth-form { position: relative; }
.auth-legal { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-legal a { color: var(--ink-3); }
.help-legal { padding: 10px 16px 14px; color: var(--ink-3); }
.help-legal a { color: var(--ink-3); }

/* content ideas: light grey previews above the post list */
[data-ideas].has-ideas { margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.post-row.idea { grid-template-columns: 56px 1fr; align-items: start; background: var(--surface-2); border: 1px dashed var(--line-strong, var(--line)); border-radius: 10px; padding: 12px; margin-bottom: 8px; color: var(--ink-2); }
.post-row.idea:first-child { border-top: 1px dashed var(--line-strong, var(--line)); }
.idea-pic { display: grid; place-items: center; background: var(--surface); color: var(--ink-3, var(--ink-2)); border: 1px dashed var(--line-strong, var(--line)); }
.idea-pic svg { width: 22px; height: 22px; opacity: .7; }
.idea-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.idea-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 999px; border: 1px dashed currentColor; color: var(--ink-3, var(--ink-2)); }
.idea-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 4px 0 2px; }
.post-main .small svg { width: 13px; height: 13px; vertical-align: -2px; }
.idea-why { font-style: italic; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.idea-btn svg { width: 15px; height: 15px; }
.idea-skel { display: block; height: 10px; border-radius: 5px; background: var(--line); margin-top: 8px; animation: idea-pulse 1.2s ease-in-out infinite; }
.idea-skel.short { width: 60%; }
@keyframes idea-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .idea-skel { animation: none; } }
@media (max-width: 820px) { .post-row.idea { grid-template-columns: 40px 1fr; } .post-row.idea .post-pic { width: 40px; height: 40px; } .idea-pic svg { width: 18px; height: 18px; margin-bottom: 10px; } }

/* ───────── v1.6 Marketing → Landing pages ───────── */
.lp-bar .lp-camp { display: inline-flex; align-items: center; gap: 6px; }
.lp-bar .lp-camp > span svg { width: 16px; height: 16px; color: var(--ink-2); }
.lp-bar .lp-camp select { min-width: 260px; max-width: 420px; font-weight: 550; }
.lp-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.2fr); gap: 12px; margin-bottom: 16px; }
.lp-sum .lp-hero { background: var(--accent-soft); border-color: transparent; }
.lp-sum .lp-hero .v { color: var(--accent-strong); }
.lp-table td b + .small { margin-top: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.linkish svg { width: 13px; height: 13px; }
.warn-t { color: #8a5d00; }
:root[data-theme="dark"] .warn-t { color: #f0c45a; }
.lp-empty .ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 10px; }
.lp-empty .ic svg { width: 24px; height: 24px; }
.lp-empty { max-width: 640px; margin: 0 auto; }
.lp-url { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.lp-url a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lp-url svg, .lp-url .badge svg { width: 14px; height: 14px; }
.lp-url .small { margin-left: auto; }
.lp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius, 10px); overflow: hidden; margin-bottom: 14px; }
.lp-kpis > div { background: var(--surface); padding: 10px 14px; display: flex; flex-direction: column; gap: 1px; }
.lp-kpis span { font-size: 12px; color: var(--ink-2); }
.lp-kpis b { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lp-kpis small { font-size: 11.5px; color: var(--ink-3); }
.lp-h { margin: 18px 0 8px; font-size: 13.5px; }
.lp-chart { position: relative; margin-top: 6px; }
.lp-chart svg { width: 100%; height: auto; display: block; }
.lp-chart .o { fill: color-mix(in srgb, var(--ink) 14%, transparent); }
.lp-chart .p { fill: var(--accent); }
.lp-chart .c { fill: #d97a1f; stroke: var(--surface); stroke-width: 1.5; }
.lp-chart .s { fill: none; stroke: #7c5cd6; stroke-width: 1.8; stroke-linejoin: round; }
.lp-chart .ax { stroke: var(--line-strong); }
.lp-chart text { font-size: 10.5px; fill: var(--ink-3); }
.lp-chart .hit { fill: transparent; }
.lp-chart .hit:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.lp-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lp-sw.paid { background: var(--accent); } .lp-sw.other { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.lp-sw.conv { background: #d97a1f; border-radius: 50%; } .lp-sw.spend { background: #7c5cd6; height: 3px; }
.lp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-steps { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.lp-copy { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 4px; }
.lp-copy textarea { flex: 1; min-height: 52px; font-size: 12px; resize: none; }
.lp-campsel { display: flex; gap: 6px; }
.lp-campsel select { flex: 1; }
.field .check.small { display: flex; gap: 6px; align-items: center; margin-top: 6px; color: var(--ink-2); font-weight: 400; }
.lp-danger { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .lp-sum { grid-template-columns: 1fr 1fr; } .lp-sum .lp-hero { grid-column: 1 / -1; order: -1; } .lp-kpis { grid-template-columns: 1fr 1fr; } .lp-cols { grid-template-columns: 1fr; } .lp-bar .lp-camp, .lp-bar .lp-camp select { min-width: 0; width: 100%; } .lp-bar .lp-camp { flex: 1 1 100%; } }
.lp-guide { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2, var(--surface)); }
.lp-guide-h { font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }
.lp-gtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lp-gtabs button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; }
.lp-gtabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lp-gbody { font-size: 12.5px; margin-bottom: 8px; }
.lp-gbody ol, .lp-gbody ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lp-gbody p { margin: 0 0 6px; }
.lp-gbody .lp-copy textarea { min-height: 0; }
.lp-steps details { margin-top: 6px; } .lp-steps summary { cursor: pointer; color: var(--ink-2); }
.dash-pulse .pulse-top { margin-bottom: 18px; }
@media (max-width: 700px) { .dash-pulse .pulse-trend { display: none; } .dash-pulse .pulse-hero .gauge { transform: scale(.8); } }

/* ───────── v1.6.4 appearance: accent color, corner roundness, style (data attributes on <html>, set by public/js/look.js) ───────── */
:root[data-accent] { --accent: var(--acc); --accent-strong: color-mix(in srgb, var(--acc) 80%, #000); --accent-soft: color-mix(in srgb, var(--acc) 12%, #fff); --accent-ink: #fff; }
:root[data-accent][data-theme="dark"] { --accent: color-mix(in srgb, var(--acc) 72%, #fff); --accent-strong: color-mix(in srgb, var(--acc) 50%, #fff); --accent-soft: color-mix(in srgb, var(--acc) 24%, #171e1c); --accent-ink: #0b100f; }
:root[data-radius="sharp"] { --radius: 3px; --radius-sm: 2px; }
:root[data-radius="round"] { --radius: 16px; --radius-sm: 11px; }
:root[data-radius="sharp"] .badge, :root[data-radius="sharp"] .chip { border-radius: 3px; }
:root[data-style="flat"] { --shadow: none; }
:root[data-style="flat"] .card { box-shadow: none; }
:root[data-style="light"] { --side-bg: var(--surface); --side-ink: var(--ink-2); --side-ink-2: var(--ink-3); --side-active: var(--accent-soft); --side-strong: var(--ink); --side-line: var(--line-strong); }
:root[data-style="light"] .side { border-right: 1px solid var(--line); }
:root[data-style="light"] .nav a.active { color: var(--accent-strong); }
:root[data-style="colored"] { --side-bg: color-mix(in srgb, var(--accent) 78%, #000); --side-ink: rgba(255, 255, 255, .86); --side-ink-2: rgba(255, 255, 255, .6); --side-active: rgba(255, 255, 255, .14); --side-strong: #fff; --side-line: rgba(255, 255, 255, .2); }
:root[data-style="colored"][data-theme="dark"] { --side-bg: color-mix(in srgb, var(--acc, #0f8f7e) 45%, #0b100f); }
:root[data-style="colored"] .nav a.active { box-shadow: inset 3px 0 0 #fff; }
:root[data-style="colored"] .brand-mark { background: rgba(255, 255, 255, .2); }
/* company logo instead of the brand mark */
.brand-logo { max-height: 30px; max-width: 150px; width: auto; display: block; object-fit: contain; }
.brand.has-logo #app-name { display: none; }
.side-mini .brand-logo { max-width: 34px; }
/* appearance settings */
.look-row { display: flex; flex-direction: column; gap: 8px; }
.look-row > span { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; display: grid; place-items: center; color: #fff; }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.swatches button svg { width: 16px; height: 16px; }
.swatches .co { width: auto; border-radius: 999px; padding: 0 12px 0 6px; gap: 6px; display: inline-flex; align-items: center; background: var(--surface); color: var(--ink); font-size: 12px; }
.swatches .co i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.look-styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.look-styles button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: stretch; font-size: 12px; color: var(--ink); }
.look-styles button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.look-styles .mini { height: 44px; border-radius: 5px; display: grid; grid-template-columns: 30% 1fr; overflow: hidden; border: 1px solid var(--line); }
.look-styles .mini b { display: block; }
.look-styles .mini em { display: block; background: var(--bg); position: relative; }
.look-styles .mini em::after { content: ''; position: absolute; left: 8px; right: 8px; top: 9px; height: 14px; background: var(--surface); border-radius: 3px; }
.look-styles [data-s="flat"] .mini em::after { box-shadow: none; border: 1px solid var(--line); }
.look-styles [data-s="classic"] .mini em::after { box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.brand-edit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.brand-edit .logo-box { width: 180px; height: 56px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--side-bg); overflow: hidden; color: var(--ink-3); font-size: 12px; }
.brand-edit .logo-box img { max-width: 150px; max-height: 48px; }
@media (max-width: 700px) { .look-styles { grid-template-columns: 1fr 1fr; } }
:root[data-style="light"] .auth-art { background: #15201d; }
:root[data-style="light"][data-theme="dark"] .auth-art { background: #0b100f; }
.look-row .seg { align-self: flex-start; }
/* v1.6.5 background picture (data-bg on <html>): background-size cover keeps the picture's proportions and trims the edges, it never stretches */
:root[data-bg="side"] .side { background: linear-gradient(color-mix(in srgb, var(--side-bg) var(--bg-mix-side), transparent), color-mix(in srgb, var(--side-bg) var(--bg-mix-side), transparent)), var(--bg-img) center / cover no-repeat, var(--side-bg); }
:root[data-bg="app"] body { background: linear-gradient(color-mix(in srgb, var(--bg) var(--bg-mix), transparent), color-mix(in srgb, var(--bg) var(--bg-mix), transparent)) fixed, var(--bg-img) center / cover no-repeat fixed, var(--bg); }
:root[data-bg="app"] .side { background: linear-gradient(color-mix(in srgb, var(--side-bg) var(--bg-mix-side), transparent), color-mix(in srgb, var(--side-bg) var(--bg-mix-side), transparent)) fixed, var(--bg-img) center / cover no-repeat fixed, var(--side-bg); }
:root[data-bg="app"] .shell, :root[data-bg="app"] .main { background: transparent; }
:root[data-bg="app"] .topbar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); }
/* background picker */
.bg-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-tiles button { width: 58px; height: 40px; border-radius: var(--radius-sm); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; background-size: cover; background-position: center; color: var(--ink-2); font-size: 11px; display: grid; place-items: center; }
.bg-tiles button.on { box-shadow: 0 0 0 2px var(--ink); }
.bg-tiles .none { background: var(--surface); }
.bg-tiles .add { background: var(--surface-2); border-style: dashed; }
.bg-tiles .add svg { width: 16px; height: 16px; }
.bg-strength { display: flex; align-items: center; gap: 10px; }
.bg-strength input { flex: 1; max-width: 260px; accent-color: var(--accent); }
.bg-opts[hidden] { display: none; }
/* v1.6.6 quote of the day */
.dash-quote { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 16px 0; position: relative; overflow: hidden; }
.dash-quote .qmark { font: 700 64px/0.8 Georgia, "Times New Roman", serif; color: var(--accent); opacity: .35; flex: none; margin-top: 6px; }
.dash-quote > div:nth-child(2) { flex: 1; min-width: 0; }
.dash-quote .k { display: block; font-size: 11.5px; font-weight: 650; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.dash-quote blockquote { margin: 0; font: italic 500 17px/1.45 Georgia, "Times New Roman", serif; color: var(--ink); }
.dash-quote figcaption { margin-top: 8px; font-size: 13px; }
.dash-quote .reflect { margin: 12px 0 0; padding: 9px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn, #c46a12) 12%, var(--surface)); font-size: 13px; color: var(--ink); display: flex; gap: 8px; align-items: flex-start; }
.dash-quote .reflect svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--warn, #c46a12); }
.dash-quote .acts { display: flex; gap: 4px; flex: none; }
@media (max-width: 700px) { .dash-quote { flex-wrap: wrap; } .dash-quote .qmark { display: none; } .dash-quote .acts { width: 100%; justify-content: flex-end; } }
/* v1.7 plans */
.pf-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pf-plans .card { box-shadow: none; border: 1px solid var(--line); }
.pf-plans .form-grid { grid-template-columns: 1fr; }
.pf-plans .check { display: flex; gap: 6px; align-items: center; font-weight: 400; color: var(--ink); margin-top: 4px; }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-cards > div { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.plan-cards > div.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-cards .price { font-size: 22px; font-weight: 700; }
.plan-cards .price small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.plan-cards ul { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
@media (max-width: 900px) { .pf-plans, .plan-cards { grid-template-columns: 1fr; } }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .pf-grid .wide { grid-column: 1 / -1; } @media (max-width: 900px) { .pf-grid { grid-template-columns: 1fr; } }
.plan-lock { max-width: 560px; margin: 24px auto; }
.plan-lock .card-b { display: flex; gap: 16px; align-items: flex-start; padding: 22px; }
.plan-lock .ico svg { width: 28px; height: 28px; color: var(--accent); }
.plan-lock p { margin: 6px 0 14px; color: var(--ink-2); }
/* v1.7.1 funnel */
.fn-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fn-body { padding: 18px 22px 22px; }
.fn-funnel { display: flex; flex-direction: column; align-items: stretch; }
.fn-funnel { --narrow: 40; }
.fn-stage { --w1: calc(100% - var(--i) * var(--narrow) / var(--n) * 1%); --w2: calc(100% - (var(--i) + 1) * var(--narrow) / var(--n) * 1%); --pad: calc((100% - var(--w2)) / 2 + 30px);
  position: relative; height: 74px; border: 0; cursor: pointer; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; text-align: left;
  background: color-mix(in srgb, var(--accent) var(--shade), #1b2421);
  clip-path: polygon(calc((100% - var(--w1)) / 2) 0, calc(50% + var(--w1) / 2) 0, calc(50% + var(--w2) / 2) 100%, calc((100% - var(--w2)) / 2) 100%); transition: filter .15s; }
.fn-stage:hover { filter: brightness(1.08); }
.fn-stage.on { filter: brightness(1.18) saturate(1.1); }
.fn-stage .fn-l { display: flex; flex-direction: column; min-width: 0; }
.fn-stage .fn-l b { font-size: 15px; }
.fn-stage .fn-l small { line-height: 1.3; }
.fn-stage .fn-l small, .fn-stage .fn-v small { font-size: 11.5px; opacity: .85; font-weight: 400; }
.fn-stage .fn-v { display: flex; flex-direction: column; align-items: flex-end; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fn-stage .fn-flag { position: absolute; left: calc(var(--pad) - 26px); top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--danger); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.fn-stage.has-warn .fn-flag { color: var(--warn); }
.fn-stage.has-tip .fn-flag { color: var(--accent-strong); }
.fn-rate { text-align: center; font-size: 12px; color: var(--ink-3); padding: 3px 0; }
.fn-rate span { font-weight: 700; color: var(--ink-2); }
.fn-parts { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650; }
.fn-issues { display: flex; flex-direction: column; gap: 10px; }
.fn-issue { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.fn-issue.bad { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.fn-issue.warn { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); }
.fn-issue p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.fn-issue p.fix { color: var(--ink); display: flex; gap: 6px; align-items: flex-start; }
.fn-issue p.fix svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--accent); }
.fn-items { display: flex; flex-direction: column; gap: 12px; }
.fn-ih { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; }
.fn-h4 { margin: 18px 0 10px; font-size: 13px; }
.pulse-diag { margin: 16px 0; }
.pulse-diag .card-b { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .fn-wrap { grid-template-columns: 1fr; } .fn-funnel { --narrow: 24; } .fn-stage { height: auto; min-height: 70px; padding-top: 8px; padding-bottom: 8px; --pad: calc((100% - var(--w2)) / 2 + 24px); } .fn-stage .fn-v { font-size: 17px; } }
.fn-stage .fn-v small { white-space: nowrap; }
.seg button { white-space: nowrap; }
