/* EMLbot console: the www v3 system (white, black type, one blue accent) as a product UI. Dark mode follows the system. */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --bg-3: #eff1f4;
  --panel: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #2a2d33;
  --muted: #5d636e;
  --faint: #8d939e;
  --line: #e7e9ee;
  --line-2: #d9dce3;
  --blue: #005afd;
  --blue-soft: rgba(0, 90, 253, .09);
  --blue-ink: #0047c9;
  --go: #0e9f6e;
  --go-soft: rgba(14, 159, 110, .1);
  --hold: #b86e00;
  --hold-soft: rgba(184, 110, 0, .1);
  --stop: #dc3c42;
  --stop-soft: rgba(220, 60, 66, .09);
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 8px 24px -12px rgba(10, 10, 10, .16);
  --shadow-lg: 0 2px 6px rgba(10, 10, 10, .05), 0 32px 64px -24px rgba(10, 10, 10, .28);
  --r: 14px;
  --r-lg: 20px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mint: #eaf7f1; --mint-ink: #0e7a55;
  --sky: #eaf2fe; --sky-ink: #1c5fd6;
  --lilac: #f1edfb; --lilac-ink: #6b4fc8;
  --peach: #fdf0e8; --peach-ink: #b5531e;
  --butter: #fbf6e3; --butter-ink: #8a6a00;
  --side: #fafbfc;
  --sb: 248px;
  --top: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) {
    --bg: #0b0d12;
    --bg-2: #11141b;
    --bg-3: #171b24;
    --panel: #12151c;
    --ink: #f3f5f9;
    --ink-2: #d6dae3;
    --muted: #9aa1ae;
    --faint: #6f7684;
    --line: #222733;
    --line-2: #2d3341;
    --blue: #4d8dff;
    --blue-soft: rgba(77, 141, 255, .14);
    --blue-ink: #8db5ff;
    --go: #34c38f;
    --go-soft: rgba(52, 195, 143, .14);
    --hold: #f0a43a;
    --hold-soft: rgba(240, 164, 58, .14);
    --stop: #ff6b70;
    --stop-soft: rgba(255, 107, 112, .14);
    --mint: rgba(52, 195, 143, .14); --mint-ink: #6fe0b5;
    --sky: rgba(77, 141, 255, .16); --sky-ink: #9cc0ff;
    --lilac: rgba(160, 130, 255, .16); --lilac-ink: #c6b5ff;
    --peach: rgba(255, 150, 100, .15); --peach-ink: #ffb58f;
    --butter: rgba(240, 200, 80, .14); --butter-ink: #f0d27a;
    --side: #0e1117;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 32px 64px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0b0d12;
    --bg-2: #11141b;
    --bg-3: #171b24;
    --panel: #12151c;
    --ink: #f3f5f9;
    --ink-2: #d6dae3;
    --muted: #9aa1ae;
    --faint: #6f7684;
    --line: #222733;
    --line-2: #2d3341;
    --blue: #4d8dff;
    --blue-soft: rgba(77, 141, 255, .14);
    --blue-ink: #8db5ff;
    --go: #34c38f;
    --go-soft: rgba(52, 195, 143, .14);
    --hold: #f0a43a;
    --hold-soft: rgba(240, 164, 58, .14);
    --stop: #ff6b70;
    --stop-soft: rgba(255, 107, 112, .14);
    --mint: rgba(52, 195, 143, .14); --mint-ink: #6fe0b5;
    --sky: rgba(77, 141, 255, .16); --sky-ink: #9cc0ff;
    --lilac: rgba(160, 130, 255, .16); --lilac-ink: #c6b5ff;
    --peach: rgba(255, 150, 100, .15); --peach-ink: #ffb58f;
    --butter: rgba(240, 200, 80, .14); --butter-ink: #f0d27a;
    --side: #0e1117;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 32px 64px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
h1 { font-size: 28px; line-height: 1.1; font-weight: 700; }
h2 { font-size: 17px; line-height: 1.25; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--bg-3); padding: .12em .4em; border-radius: 6px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; }
.lede { color: var(--muted); font-size: 15px; max-width: 64ch; margin-top: 6px; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* Logo: light and dark files swap with the scheme */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; }
.brand img { height: 25px; width: auto; }
.brand .mark { height: 30px; }
.only-dark { display: none !important; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .only-light { display: none !important; }:root:not([data-theme="light"]) .only-dark { display: block !important; } }
:root[data-theme="dark"] .only-light { display: none !important; }:root[data-theme="dark"] .only-dark { display: block !important; }

/* Buttons */
button, .btn { font: 600 13.5px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--bg-2); border-color: var(--faint); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.accent { background: var(--blue); border-color: var(--blue); color: #fff; }
.accent:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.danger { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 35%, var(--line)); }
.danger:hover { background: var(--stop-soft); border-color: var(--stop); }
.ghost { border-color: transparent; background: transparent; }
.ghost:hover { background: var(--bg-3); border-color: transparent; }
.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.icon-btn { width: 38px; padding: 0; }
.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--blue); font-weight: 600; }
.link:hover { background: none; text-decoration: underline; }
button svg, .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Forms */
input, textarea, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { resize: vertical; min-height: 90px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue); }
label { font-weight: 600; font-size: 13px; }
.field { display: grid; gap: 6px; }
.form { display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input { margin-top: 2px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 14px; margin: 0; }
legend { font-weight: 650; font-size: 13px; padding: 0 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Chips, pills, badges */
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--bg-3); color: var(--ink-2); font: 600 11.5px/1.5 var(--sans); }
.chip button { min-height: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 13px; }
.chip.ok { background: var(--go-soft); color: var(--go); }
.chip.admin, .chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.warn { background: var(--hold-soft); color: var(--hold); }
.chip.bad { background: var(--stop-soft); color: var(--stop); }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.soon { background: var(--blue-soft); color: var(--blue); text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.badge-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hold); color: #fff; font: 700 11px/20px var(--sans); text-align: center; }
.kbd { font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); }

/* App shell */
.app { display: grid; grid-template-columns: var(--sb) minmax(0, 1fr); min-height: 100vh; }
.sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-right: 1px solid var(--line); background: var(--side); overflow-y: auto; }
.sb__brand { display: flex; align-items: center; padding: 6px 8px 12px; }
.ws { width: 100%; justify-content: flex-start; gap: 10px; padding: 8px 10px; min-height: 48px; border-radius: 12px; background: var(--panel); border-color: var(--line); text-align: left; }
.ws__logo { width: 28px; height: 28px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; flex: none; }
.ws__logo img { width: 20px; height: auto; }
.ws__txt { display: grid; line-height: 1.2; min-width: 0; }
.ws__txt b { font-size: 13px; }
.ws__txt span { font-size: 11.5px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ws svg:last-child { margin-left: auto; color: var(--faint); }
.nav { display: grid; gap: 2px; margin-top: 8px; }
.nav__label { padding: 12px 10px 4px; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550; text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { background: var(--bg-3); }
.nav a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.nav a[aria-current="page"] svg { color: var(--blue); }
.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.nav .chip.soon { margin-left: auto; font-size: 9px; padding: 2px 6px; }
.sb__foot { margin-top: auto; padding-top: 12px; display: grid; gap: 10px; }
.sb-live { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.sb-live__head { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font: 650 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sb-live__head i { width: 7px; height: 7px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 0 var(--go); animation: sbPulse 2.4s ease-out infinite; }
@keyframes sbPulse { 0% { box-shadow: 0 0 0 0 rgba(52, 195, 143, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(52, 195, 143, 0); } }
.sb-live__grid { display: grid; gap: 2px; }
.sb-live__stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 6px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 12.5px; }
.sb-live__stat:hover { background: var(--bg-3); }
.sb-live__stat b { order: 2; font: 650 15px/1 var(--sans); color: var(--ink); }
.sb-live.is-hot .sb-live__stat:first-child { background: var(--peach); }
.sb-live.is-hot .sb-live__stat:first-child b { color: var(--peach-ink); }
.sb-theme { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 2px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.sb-theme button { display: grid; place-items: center; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.sb-theme button:hover { color: var(--ink); }
.sb-theme button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.sb-theme .i { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .sb-live__head i { animation: none; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.top .brand { display: none; }
.search { flex: 1; max-width: 520px; justify-content: flex-start; gap: 10px; color: var(--muted); font-weight: 500; background: var(--bg-2); border-color: var(--line); }
.search .kbd { margin-left: auto; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; font: 700 13px/1 var(--sans); color: #fff; background: var(--blue); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.sq { border-radius: 12px; }
.me-btn { padding: 0 4px 0 4px; border-radius: 999px; min-height: 40px; gap: 8px; }
.view { padding: 28px clamp(16px, 3vw, 36px) 48px; width: 100%; max-width: 1360px; }
.view.full { max-width: none; padding: 0; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

.menu { position: absolute; z-index: 50; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu a, .menu button { display: flex; width: 100%; justify-content: flex-start; gap: 10px; padding: 9px 10px; min-height: 0; border: 0; border-radius: 9px; background: none; color: var(--ink); font-weight: 550; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--bg-3); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .menu__head { padding: 10px; display: grid; gap: 2px; }

/* Cards, stats */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card__head a { font-size: 13px; font-weight: 600; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 4px; }
.stat b { font: 700 30px/1.1 var(--display); letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 550; }
.stat small { color: var(--faint); font-size: 12px; }
.stat svg { width: 18px; height: 18px; stroke: var(--blue); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Hero header: a calm white card, film on the right (no dark panels in light mode) */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; border-radius: 24px; overflow: hidden; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero__txt { padding: 26px 28px; display: grid; align-content: center; gap: 8px; }
.hero h1 { font-size: clamp(26px, 2.6vw, 34px); }
.hero p { color: var(--muted); max-width: 52ch; }
.hero .chips { margin-top: 8px; }
.hero__art { position: relative; min-height: 210px; background: var(--bg-3); }
.hero__art video, .hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Lists and feed */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 6px; border-radius: 12px; }
.feed li.new { animation: flash 1.6s var(--ease); }
@keyframes flash { from { background: var(--blue-soft); } to { background: transparent; } }
.feed .ev { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.feed .ev b { color: var(--ink); }
.feed .ev .sub { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.ev-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.ev-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ev-ico.in { background: var(--blue-soft); color: var(--blue); }
.ev-ico.out { background: var(--go-soft); color: var(--go); }
.ev-ico.hold { background: var(--hold-soft); color: var(--hold); }
.live { display: inline-flex; align-items: center; gap: 7px; font: 600 12px/1 var(--sans); color: var(--go); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 0 var(--go); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--go) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.mini-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none !important; color: inherit; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--bg-2); border-radius: 10px; }
.mini-row .grow { min-width: 0; flex: 1; }
.mini-row .grow b { display: block; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .grow span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Empty states with film */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 18px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 17px; }
.empty p { max-width: 46ch; }
.empty .art { width: min(360px, 100%); aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--bg-3); margin-bottom: 6px; box-shadow: var(--shadow); }
.empty .art video, .empty .art img { width: 100%; height: 100%; object-fit: cover; }
.soon-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.soon-page .art { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 11; background: var(--bg-3); box-shadow: var(--shadow-lg); }
.soon-page .art video, .soon-page .art img { width: 100%; height: 100%; object-fit: cover; }
.soon-page h1 { font-size: clamp(28px, 3.4vw, 44px); margin-top: 12px; }
.soon-page ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.soon-page li { display: flex; gap: 10px; color: var(--ink-2); }
.soon-page li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2 7.6 11.8 13 6.4' fill='none' stroke='%23005afd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.preview-ui { margin-top: 22px; border: 1px dashed var(--line-2); border-radius: 18px; padding: 14px; display: grid; gap: 10px; opacity: .9; }
.preview-ui .ph-row { display: flex; gap: 10px; align-items: center; }
.preview-ui .ph-bar { height: 10px; border-radius: 6px; background: var(--bg-3); }

/* Skeletons and spinners */
.sk { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 37%, var(--bg-3) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spin { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; }
.spin::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--blue); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Notes and toasts */
.note { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); }
.note.err { background: var(--stop-soft); border-color: color-mix(in srgb, var(--stop) 30%, transparent); }
.note.warn { background: var(--hold-soft); border-color: color-mix(in srgb, var(--hold) 30%, transparent); }
.note.good { background: var(--go-soft); border-color: color-mix(in srgb, var(--go) 30%, transparent); }
.secret { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.secret code { flex: 1; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: 13px; }
#toasts { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 550; animation: up .3s var(--ease); max-width: 380px; }
.toast.err { background: var(--peach); color: var(--peach-ink); border-color: transparent; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font: 600 11.5px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.revoked td { opacity: .5; }

/* Segmented tabs */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-3); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg > * { flex: none; }
.seg a, .seg button { padding: 7px 12px; min-height: 0; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 13px/1 var(--sans); text-decoration: none !important; text-transform: capitalize; }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* Inbox: three panes */
.mail { display: grid; grid-template-columns: 220px minmax(280px, 380px) minmax(0, 1fr); height: calc(100vh - var(--top)); border-top: 0; }
.mail__folders { border-right: 1px solid var(--line); padding: 16px 10px; overflow-y: auto; background: var(--bg-2); display: grid; align-content: start; gap: 2px; }
.mail__folders .who { padding: 4px 8px 14px; display: grid; gap: 2px; }
.mail__folders .who b { font-size: 14px; overflow-wrap: anywhere; }
.mail__folders a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550; text-decoration: none; }
.mail__folders a:hover { background: var(--bg-3); }
.mail__folders a.btn, .mail__folders a.btn:hover { color: #fff; background: var(--blue); }
.mail__folders a[aria-current="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.mail__folders a span:last-child { margin-left: auto; color: var(--faint); font-size: 12px; }
.mail__folders .lbl::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--faint); }
.mail__list { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.mail__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.mail__bar input { min-height: 36px; padding: 7px 12px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; position: relative; }
.msg:hover { background: var(--bg-2); }
.msg[aria-current="true"] { background: var(--blue-soft); }
.msg.unread::before { content: ""; position: absolute; left: 5px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.msg__top { display: flex; gap: 8px; align-items: baseline; }
.msg__from { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.msg.unread .msg__from, .msg.unread .msg__subj { font-weight: 700; }
.msg__top time { color: var(--faint); font-size: 12px; flex: none; }
.msg__subj { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg__prev { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg .chips { margin-top: 6px; }
.mail__read { overflow-y: auto; min-width: 0; background: var(--bg); }
.reader { padding: 22px clamp(16px, 2.6vw, 34px) 40px; display: grid; gap: 16px; max-width: 920px; }
.reader__head { display: grid; gap: 12px; }
.reader__head h1 { font-size: 23px; }
.reader__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.reader__meta > div:last-child:not(.grow) { margin-left: auto; }
.reader__meta .grow { min-width: 0; flex: 1; }
.reader__meta .grow b { display: block; overflow-wrap: anywhere; }
.reader__meta .grow span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.reader__body { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.reader__body pre { margin: 0; padding: 18px; white-space: pre-wrap; font: 14px/1.6 var(--sans); color: #111; overflow-wrap: anywhere; }
iframe.mail-frame { width: 100%; min-height: 380px; border: 0; display: block; background: #fff; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; }
.atts button { justify-content: flex-start; gap: 10px; }
.composer { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--panel); display: grid; gap: 12px; }
.composer textarea { border: 0; padding: 4px 2px; box-shadow: none !important; min-height: 110px; background: transparent; }
.reader-empty { height: 100%; display: grid; place-items: center; padding: 24px; }
.back-btn { display: none; }

/* Approvals */
.queue { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.queue__list { display: grid; gap: 8px; }
.qitem { display: grid; gap: 4px; text-align: left; justify-content: stretch; padding: 12px 14px; min-height: 0; border-radius: 14px; white-space: normal; font-weight: 500; }
.qitem[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.qitem b { font-size: 14px; }
.qitem span { color: var(--muted); font-size: 12.5px; }
.diff { display: grid; gap: 10px; }
.diff__row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13.5px; }
.diff__row > span:first-child { color: var(--muted); font-weight: 600; padding-top: 3px; }
.diff__body { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); padding: 14px; white-space: pre-wrap; font: 13.5px/1.6 var(--sans); overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; }
.decide { position: sticky; bottom: 0; display: flex; gap: 8px; padding-top: 12px; }

/* Bots directory */
.bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.bot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.bot:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bot__top { display: flex; gap: 12px; align-items: center; }
.bot__top .grow { min-width: 0; }
.bot__top .grow b { display: block; font-size: 15px; }
.bot__top .grow span { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.bot dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 12.5px; }
.bot dt { color: var(--muted); }
.bot dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bot .actions { margin-top: 2px; }

/* Keys */
.scope-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-pick label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-weight: 600; }
.scope-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.scope-pick label:has(input:checked) { background: var(--sky); border-color: var(--sky-ink); color: var(--sky-ink); }
.scope-pick label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--blue-soft); }
.keycards { display: grid; gap: 10px; }
.keycard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.keycard.revoked { opacity: .5; }
.keycard b { display: block; }
.keycard .k { color: var(--muted); font-size: 12px; display: block; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Drawer, dialog, palette */
.drawer { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .3s var(--ease); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__body { padding: 20px; overflow-y: auto; flex: 1; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 14, .38); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); max-width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8, 10, 14, .42); }
dialog h2 { font-size: 19px; margin-bottom: 8px; }
dialog p { color: var(--muted); margin-bottom: 18px; }
dialog .actions { justify-content: flex-end; }
.palette { position: fixed; z-index: 80; top: 12vh; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .2s var(--ease); }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li button { width: 100%; justify-content: flex-start; gap: 12px; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-weight: 550; min-height: 0; }
.palette li button[aria-selected="true"] { background: var(--blue-soft); color: var(--ink); }
.palette li .hint { margin-left: auto; }
.palette .group { padding: 10px 12px 4px; font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }

/* Phone tab bar */
.tabbar { display: none; }

/* Sign-in and auth */
.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--bg); }
.gate-side { display: grid; place-items: center; padding: 32px 20px; }
.gate-card { width: min(420px, 100%); display: grid; gap: 14px; }
.gate-card .brand img { height: 28px; }
.gate-card .brand .mark { height: 34px; }
.gate-card h1 { font-size: 30px; margin-top: 18px; }
.gate-card > p { color: var(--muted); font-size: 15px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: 600 15px/1 var(--sans); text-decoration: none !important; transition: background .15s, box-shadow .15s; margin-top: 8px; }
.gbtn:hover { background: var(--bg-2); box-shadow: var(--shadow); }
.gbtn svg { width: 20px; height: 20px; }
.gbtn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.keylink { min-height: 46px; border-radius: 12px; width: 100%; }
.keyform { display: grid; gap: 10px; }
.keyform label { display: grid; gap: 4px; }
.keyform input { min-height: 46px; }
.keyform .primary { min-height: 46px; }
.email-signin { display: grid; gap: 10px; }
.gate-legal { color: var(--faint); font-size: 12.5px; margin-top: 8px; }
.gate-media { position: relative; margin: 12px; border-radius: 28px; overflow: hidden; background: #1c2330 center/cover; min-height: 420px; }
.gate-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-media figcaption { position: absolute; left: 24px; right: 24px; bottom: 22px; color: #fff; font: 600 clamp(18px, 1.8vw, 24px)/1.25 var(--display); letter-spacing: -0.02em; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); max-width: 26ch; }
.gate-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 10, 14, .55)); }
.gate-media figcaption { z-index: 1; }

/* Pastel tints (status chips, room badges, levels, avatars) */
.t-mint { background: var(--mint) !important; color: var(--mint-ink) !important; }
.t-sky { background: var(--sky) !important; color: var(--sky-ink) !important; }
.t-lilac { background: var(--lilac) !important; color: var(--lilac-ink) !important; }
.t-peach { background: var(--peach) !important; color: var(--peach-ink) !important; }
.t-butter { background: var(--butter) !important; color: var(--butter-ink) !important; }
.chip.ok { background: var(--mint); color: var(--mint-ink); }
.chip.warn { background: var(--butter); color: var(--butter-ink); }
.chip.bad { background: var(--peach); color: var(--peach-ink); }
.chip.blue, .chip.admin { background: var(--sky); color: var(--sky-ink); }
.chip.soon { background: var(--lilac); color: var(--lilac-ink); }
.lvl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font: 600 11.5px/1.5 var(--sans); white-space: nowrap; }
.lvl b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .75); font-size: 11px; }
.presence { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--panel); }
.presence.online { background: #2fbf86; }
.presence.idle { background: #f0b429; }
.presence.offline { background: #c4c9d2; }
.ribbon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--lilac); color: var(--lilac-ink); font-size: 13px; font-weight: 550; margin-bottom: 16px; }
.ribbon b { font-weight: 700; }
.ribbon button { margin-left: auto; min-height: 30px; font-size: 12.5px; background: var(--panel); border-color: transparent; color: var(--lilac-ink); }
.dial { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; border-radius: 12px; background: var(--bg-3); gap: 2px; }
.dial button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 12.5px; }
.dial button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.dial button[aria-pressed="true"][data-v="Manual"] { color: var(--peach-ink); }
.dial button[aria-pressed="true"][data-v="Supervised"] { color: var(--sky-ink); }
.dial button[aria-pressed="true"][data-v="Autonomous"] { color: var(--mint-ink); }

/* Bot profile */
.profile { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile__head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile__head .avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.kv2 { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; margin: 0; }
.kv2 dt { color: var(--muted); }
.kv2 dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 13.5px; }
.timeline li > a, .timeline li > span:not(.ev-ico) { min-width: 0; overflow-wrap: anywhere; }
.timeline li:last-child { border-bottom: 0; }
.timeline .ev-ico { width: 30px; height: 30px; border-radius: 9px; }
.timeline time { color: var(--faint); font-size: 12px; }

/* Chat (IRC-style) */
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; height: calc(100vh - var(--top)); }
.chat__rooms { border-right: 1px solid var(--line); background: var(--side); padding: 14px 10px; overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.chat__rooms a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550; text-decoration: none; }
.chat__rooms a:hover { background: var(--bg-3); }
.chat__rooms a[aria-current="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.chat__rooms .hash { color: var(--faint); font-weight: 700; width: 14px; text-align: center; }
.chat__rooms .n { margin-left: auto; min-width: 20px; height: 20px; border-radius: 999px; background: var(--sky); color: var(--sky-ink); font: 700 11px/20px var(--sans); text-align: center; }
.chat__main { display: flex; flex-direction: column; min-width: 0; }
.chat__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat__head h1 { font-size: 18px; }
.chat__head p { color: var(--muted); font-size: 13px; }
.chat__stream { flex: 1; overflow-y: auto; padding: 14px 18px; display: grid; align-content: start; gap: 2px; }
.cmsg { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 8px 10px; border-radius: 12px; }
.cmsg:hover { background: var(--bg-2); }
.cmsg.pinned { background: var(--butter); }
.cmsg .avatar { border-radius: 11px; }
.head > * { min-width: 0; max-width: 100%; }
.cmsg__top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cmsg__top b { font-size: 14px; }
.cmsg__top time { color: var(--faint); font-size: 12px; }
.cmsg__body { color: var(--ink-2); overflow-wrap: anywhere; }
.cmsg__body .mention { background: var(--sky); color: var(--sky-ink); padding: 0 4px; border-radius: 5px; font-weight: 600; }
.cmsg__cmd { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.cmsg__cmd code { background: var(--lilac); color: var(--lilac-ink); }
.cmsg__meta { display: flex; gap: 10px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.chat__compose { padding: 12px 18px 16px; border-top: 1px solid var(--line); position: relative; }
.chat__compose .box { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 14px; background: var(--panel); }
.chat__compose input { border: 0; padding: 8px 0; box-shadow: none !important; }
.slash { position: absolute; left: 18px; right: 18px; bottom: calc(100% - 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.slash button { justify-content: flex-start; gap: 10px; border: 0; background: none; padding: 8px 10px; min-height: 0; border-radius: 9px; font-weight: 500; }
.slash button:hover, .slash button[aria-selected="true"] { background: var(--sky); }
.slash code { background: var(--lilac); color: var(--lilac-ink); }
.chat__side { border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; display: grid; align-content: start; gap: 16px; background: var(--side); }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; text-decoration: none; color: inherit; }
.member .avatar { width: 28px; height: 28px; font-size: 11px; border-radius: 9px; }
.member .presence { margin-left: auto; }

/* Tasks (Kanban) */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--side); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 10px; min-height: 160px; align-content: start; }
.col__head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; padding: 2px 4px; }
.col__head .n { color: var(--faint); font-weight: 600; }
.col.drop { outline: 2px dashed var(--blue); outline-offset: -4px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgba(10, 10, 10, .03); cursor: grab; }
.tcard:hover { box-shadow: var(--shadow); }
.tcard b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.tcard__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard__foot .avatar { width: 24px; height: 24px; font-size: 10px; border-radius: 8px; }

/* Security */
.lvl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.lvl-card { border-radius: 16px; padding: 14px; display: grid; gap: 6px; }
.lvl-card b { font: 700 26px/1 var(--display); }
.lvl-card span { font-weight: 650; }
.lvl-card p { font-size: 12.5px; opacity: .9; }
.policy { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.policy:last-child { border-bottom: 0; }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue-soft); }
.matrix td, .matrix th { white-space: nowrap; }

/* Connections */
.conn { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.conn .card { display: grid; gap: 10px; align-content: start; }
.codebox { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); margin: 0; }

/* Collapsible create forms (webhooks, people) */
details.card { padding: 0; margin-bottom: 18px; }
details.card > summary { list-style: none; cursor: pointer; padding: 16px 18px; font: 650 15px/1.2 var(--display); display: flex; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "+"; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--sky); color: var(--sky-ink); font: 600 16px/1 var(--sans); }
details.card[open] > summary::before { content: "−"; }
details.card > .form { padding: 0 18px 18px; }
.grow { flex: 1; min-width: 0; }
.more { display: flex; justify-content: center; padding: 12px; }
.list > li > .item { display: block; padding: 14px 16px; color: inherit; text-decoration: none; }
.item-top { display: flex; justify-content: space-between; gap: 10px; }

/* Responsive */
@media (max-width: 1180px) {
  .chat { grid-template-columns: 220px minmax(0, 1fr); }
  .chat__side { display: none; }
  .profile { grid-template-columns: 1fr; }
  .lvl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .mail { grid-template-columns: 190px minmax(240px, 320px) minmax(0, 1fr); }
  .keycard { grid-template-columns: minmax(0, 1fr) auto; }
  .keycard .hide-md { display: none; }
}
@media (max-width: 900px) {
  :root { --top: 58px; }
  .app { grid-template-columns: 1fr; padding-bottom: 72px; }
  .sb { position: fixed; z-index: 75; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .app.nav-open .sb { transform: none; }
  .top { padding: 0 14px; }
  .top .brand { display: inline-flex; }
  .top .brand img { height: 20px; }
  .search { max-width: none; min-width: 0; padding: 0 10px; }
  .search .lbl, .search .kbd { display: none; }
  .search { flex: 0 0 auto; width: 40px; justify-content: center; margin-left: auto; }
  .top__right { margin-left: 0; }
  .top__right .hide-sm { display: none; }
  .tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 3px; min-height: 52px; padding: 6px 0 0; border: 0; background: none; color: var(--muted); font: 600 11px/1 var(--sans); text-decoration: none !important; position: relative; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current="page"] { color: var(--blue); }
  .tabbar .badge-n { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
  .view { padding: 20px 16px 32px; }
  h1 { font-size: 24px; }
  .hero { grid-template-columns: 1fr; border-radius: 20px; }
  .hero__art { order: -1; min-height: 180px; }
  .hero__txt { padding: 18px; }
  .mail { display: block; height: auto; }
  .mail__folders { display: flex; overflow-x: auto; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .mail__folders .who, .mail__folders .lbl-head { display: none; }
  .mail__folders a { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
  .mail__folders a span:last-child { margin-left: 4px; }
  .mail__list { border-right: 0; }
  .mail.reading .mail__folders, .mail.reading .mail__list { display: none; }
  .mail:not(.reading) .mail__read { display: none; }
  .back-btn { display: inline-flex; }
  .chat { display: block; height: auto; }
  .chat__rooms { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 6px; }
  .chat__rooms .nav__label { display: none; }
  .chat__rooms a { flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; }
  .board { grid-template-columns: repeat(4, minmax(260px, 82vw)); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .lvl-grid { grid-template-columns: 1fr 1fr; }
  .kv2 { grid-template-columns: 100px minmax(0, 1fr); }
  .reader__meta .grow { flex-basis: calc(100% - 60px); }
  .reader__meta > div:last-child:not(.grow), .reader__meta > .chip { margin-left: 56px; text-align: left !important; }
  .queue, .soon-page { grid-template-columns: 1fr; }
  .gate { grid-template-columns: 1fr; }
  .gate-media { order: -1; min-height: 260px; margin: 12px 12px 0; border-radius: 22px; }
  .gate-side { padding: 22px 18px 40px; place-items: start center; }
  .keycard { grid-template-columns: 1fr; }
  #toasts { left: 12px; right: 12px; bottom: 84px; }
}
@media (max-width: 520px) {
  .stats { gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 24px; }
  .head { align-items: flex-start; }
  .feed li { grid-template-columns: 32px minmax(0, 1fr); }
  .feed time { grid-column: 2; }
  .diff__row { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Live chat and board (tracks A/B) ---- */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; border-radius: 7px; flex: none; }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); font: inherit; cursor: pointer; box-shadow: none; }
.linkish:hover { color: var(--ink); text-decoration: underline; }
.cmsg .cmsg__act { opacity: 0; transition: opacity .15s; }
.cmsg:hover .cmsg__act, .cmsg:focus-within .cmsg__act { opacity: 1; }
.cmsg__top .cmsg__act { margin-left: auto; }
.cmsg.sys { grid-template-columns: 38px minmax(0, 1fr); align-items: center; padding: 4px 10px; color: var(--muted); font-size: 13px; }
.cmsg.sys > span:first-child { display: grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border-radius: 9px; background: var(--bg-3); color: var(--faint); }
.cmsg.sys .cmsg__body { color: var(--muted); }
.taskref { font-weight: 650; color: var(--blue); text-decoration: none; background: var(--sky); padding: 0 5px; border-radius: 5px; }
.taskref:hover { text-decoration: underline; }
.board--5 { grid-template-columns: repeat(5, minmax(190px, 1fr)); }
.tcard { cursor: pointer; }
.tcard:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tone-bad { color: var(--peach-ink); }
.tone-warn { color: var(--butter-ink); }
.tone-blue { color: var(--sky-ink); }
ul.plain { list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) {
  .board--5 { grid-template-columns: repeat(5, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
  .board--5 .col { scroll-snap-align: start; }
}
@media (hover: none) { .cmsg .cmsg__act { opacity: 1; } }
.grid-2 > *, .grid > * { min-width: 0; }

/* ---- Track C: connect page (phone-first), add-a-bot tabs, wake ---- */
.connect { display: grid; place-items: start center; padding: 8px 0 40px; }
.connect__card { width: min(560px, 100%); display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 4vw, 30px); box-shadow: var(--shadow); }
.connect__card h1 { font-size: clamp(24px, 6vw, 32px); line-height: 1.1; }
.connect__who { display: flex; gap: 14px; align-items: center; }
.connect__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--sky); color: var(--sky-ink); flex: none; }
.connect__icon svg { width: 28px; height: 28px; }
.connect__kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.connect__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); font-size: 14px; }
.connect__facts dt { color: var(--muted); }
.connect__facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.connect__step { display: grid; gap: 8px; }
.connect__step h2 { font-size: 16px; }
.connect__profiles { display: grid; gap: 8px; }
.connect__profile { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; }
.connect__profile:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.connect__profile input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.connect__profile .grow { display: grid; gap: 3px; }
.connect__profile .grow span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.connect__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 4px; }
.connect__go, .connect__no { min-height: 52px; font-size: 16px; justify-content: center; }
.connect__code { font: 700 28px/1 var(--mono, ui-monospace, monospace); letter-spacing: .12em; text-align: center; text-transform: uppercase; min-height: 60px; }
.connect__done { text-align: center; justify-items: center; }
.connect__ok { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); }
.connect__ok svg { width: 36px; height: 36px; }
.connect__done .connect__actions { width: 100%; grid-template-columns: 1fr 1fr; }
.addtabs { margin-bottom: 16px; flex-wrap: wrap; }
.addtabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
ol.steps li { display: grid; gap: 6px; }
.wake__seg { flex-wrap: wrap; }
.wake__seg button[aria-checked="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
fieldset.card legend { padding: 0 6px; font-weight: 650; font-size: 13.5px; }
@media (max-width: 560px) {
  .connect { padding-top: 0; }
  .connect__card { border-radius: 20px; }
  .connect__actions { grid-template-columns: 1fr; position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 2; background: var(--panel); padding: 10px 0 4px; margin: 0 -2px; }
  .connect__done .connect__actions { position: static; }
  .connect__actions .connect__go { order: -1; }
}

/* ---- Track F: faces and network ---- */
.avatar.xl { width: 72px; height: 72px; font-size: 24px; border-radius: 22px; }
.avatar img[src^="data:image/svg"] { object-fit: contain; }
.photo-preview .avatar { width: 112px; height: 112px; border-radius: 30px; font-size: 36px; }
.netnow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.netnow__cc { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; background: var(--sky); color: var(--sky-ink); font: 800 13px/1 var(--sans); letter-spacing: .06em; }
.netnow .grow { display: grid; gap: 2px; }
.netnow .grow b { display: block; }
.netnow .grow span { display: block; font-size: 13px; color: var(--muted); }

/* ---- Track D: contact policy ---- */
.pm { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 10px; border-radius: 999px; border: 0; font: 650 12.5px/1.2 var(--sans); white-space: nowrap; }
.pm small { font-weight: 500; opacity: .75; }
.pm--auto { background: var(--mint); color: var(--mint-ink); }
.pm--admin_approval { background: var(--butter); color: var(--butter-ink); }
.pm--owner_approval { background: var(--peach); color: var(--peach-ink); }
.pm--blocked { background: #fde8e8; color: #b42318; }
.pm-legend { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pm-grid table { min-width: 640px; }
.pm-grid th[scope="row"] { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.pm-cell { width: 100%; justify-content: center; flex-direction: column; min-height: 38px; border-radius: 12px; cursor: pointer; box-shadow: none; }
.pm-cell:disabled { cursor: default; opacity: 1; }
.pm-cell:hover:not(:disabled) { outline: 2px solid var(--blue); outline-offset: 1px; }
.pm-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-pick .pm { min-height: 40px; padding: 0 16px; cursor: pointer; }
.pm-pick .pm[aria-checked="true"] { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.linkrow { width: 100%; text-align: left; background: none; border: 0; box-shadow: none; cursor: pointer; border-radius: 10px; }
.linkrow:hover:not(:disabled) { background: var(--bg-2); }
.sec-link { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; }
.sec-link:hover { box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .pm--blocked { background: rgba(244, 63, 94, .16); color: #fca5a5; } }
:root[data-theme="dark"] .pm--blocked { background: rgba(244, 63, 94, .16); color: #fca5a5; }

/* ---- Track G: domain setup ---- */
.dsetup { margin: 4px 0 6px; }
.dsetup__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dsetup__steps li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: start; }
.dsetup__steps .chip { justify-self: start; text-transform: capitalize; }
.dsetup__diff { display: grid; gap: 4px; }
.diffline { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 6px 10px; border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.diffline--add { background: var(--mint); }
.diffline--del { background: #fde8e8; text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, .5); }
.diffline--keep { background: var(--bg-2); }
@media (max-width: 560px) { .dsetup__steps li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
/* ---- Track H: storage ---- */
.gauge { height: 12px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.gauge span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #7aa7ff); }
.gauge.is-warn span { background: var(--hold); }
.gauge.is-over span { background: var(--stop); }
/* ---- usage (Billing) ---- */
.use-rows { display: grid; gap: 14px; }
.use-row { display: grid; gap: 6px; }
.use-row__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.use-over { color: var(--stop); font-weight: 600; }
.ph-usage { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; }
.ret-rows { display: grid; }
.ret-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .8fr); gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ret-row:first-child { border-top: 0; }
.ret-row__label, .ret-row__ctl, .ret-row__use { display: grid; gap: 4px; }
.ret-row__ctl input[type=range] { width: 100%; accent-color: var(--blue); }
@media (max-width: 860px) { .ret-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.ev-link { color: inherit; overflow-wrap: anywhere; }
.feed .ev { min-width: 0; overflow-wrap: anywhere; }
.pm-grid { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.pm-grid table { width: max-content; min-width: 100%; }
.linkrow { max-width: 100%; min-width: 0; white-space: normal; }
.linkrow .grow b, .linkrow .grow span { white-space: normal; overflow-wrap: anywhere; }

/* ---- Premium kit: tabular numbers, hairlines, chart kit (charts.js) ---- */
.num, .stat b, td, .ch-kpi__value, .chip, time { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "cv11" 1; }
.ch-spark { display: block; width: 100%; }
.ch-trend { position: relative; width: 100%; }
.ch-svg { position: absolute; inset: 0 0 0 0; width: 100%; height: 100%; overflow: visible; }
.ch-grid line { stroke: var(--line); stroke-width: 1; }
.ch-cross { stroke: var(--ink-2); opacity: .45; stroke-width: 1; }
.ch-bar { opacity: .9; }
.ch-ylabels span { position: absolute; left: 0; transform: translateY(-50%); font: 500 11px/1 var(--sans); color: var(--faint); font-variant-numeric: tabular-nums; }
.ch-xlabels span { position: absolute; bottom: 0; transform: translateX(-50%); font: 500 11px/1 var(--sans); color: var(--faint); white-space: nowrap; }
.ch-tip { position: absolute; top: 4px; z-index: 3; min-width: 120px; display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(10, 20, 40, .12); font-size: 12px; pointer-events: none; }
.ch-tip span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ch-tip i { width: 8px; height: 8px; border-radius: 3px; }
.ch-tip strong { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.ch-hbars { display: grid; gap: 8px; }
.ch-hbar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; font-size: 13px; text-decoration: none; color: inherit; }
.ch-hbar__label { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ch-hbar__track { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.ch-hbar__track span { display: block; height: 100%; border-radius: inherit; }
.ch-donut-wrap, .ch-ring { position: relative; display: grid; place-items: center; flex: none; }
.ch-donut-wrap svg, .ch-ring svg { position: absolute; inset: 0; }
.ch-donut__center { display: grid; justify-items: center; line-height: 1.1; }
.ch-donut__center b { font: 700 22px/1 var(--display); }
.ch-donut__center span { font-size: 11px; color: var(--muted); }
.ch-ring b { font: 700 12.5px/1 var(--sans); }
.ch-stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; background: transparent; }
.ch-stack span { min-width: 3px; }
.ch-stack span:first-child { border-radius: 999px 0 0 999px; }
.ch-stack span:last-child { border-radius: 0 999px 999px 0; }
.ch-stack span:only-child { border-radius: 999px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ch-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ch-legend i { width: 8px; height: 8px; border-radius: 3px; }
.ch-legend b { color: var(--ink); font-weight: 600; }
.ch-heat { display: grid; gap: 4px; overflow-x: auto; }
.ch-heat__cols { display: grid; margin-left: 150px; font-size: 10.5px; color: var(--faint); }
.ch-heat__row { display: grid; grid-template-columns: 140px auto; gap: 10px; align-items: center; }
.ch-heat__label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-heat__label .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 7px; }
.ch-heat__cells { display: grid; }
.ch-heat__cells span { border-radius: 3px; background: var(--bg-3); }
.ch-heat__cells .l1 { background: #dbe7ff; } .ch-heat__cells .l2 { background: #a9c6ff; } .ch-heat__cells .l3 { background: #5c93ff; } .ch-heat__cells .l4 { background: #005afd; }
.ch-kpi { display: grid; gap: 6px; padding: 14px 16px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
a.ch-kpi:hover { box-shadow: var(--shadow); }
.ch-kpi__top { display: flex; align-items: center; gap: 8px; }
.ch-kpi__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ch-kpi__label .i { width: 15px; height: 15px; }
.ch-kpi__value { font: 700 28px/1.05 var(--display); letter-spacing: -.02em; color: var(--ink); }
.ch-kpi__sub { font-size: 12px; color: var(--muted); }
.ch-delta { margin-left: auto; font: 650 11.5px/1 var(--sans); padding: 3px 7px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-delta.up { background: var(--mint); color: var(--mint-ink); }
.ch-delta.down { background: var(--peach); color: var(--peach-ink); }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .ch-heat__cells .l1 { background: rgba(0, 90, 253, .22); }:root:not([data-theme="light"]) .ch-heat__cells .l2 { background: rgba(0, 90, 253, .45); }:root:not([data-theme="light"]) .ch-heat__cells .l3 { background: rgba(0, 90, 253, .7); } }
:root[data-theme="dark"] .ch-heat__cells .l1 { background: rgba(0, 90, 253, .22); }:root[data-theme="dark"] .ch-heat__cells .l2 { background: rgba(0, 90, 253, .45); }:root[data-theme="dark"] .ch-heat__cells .l3 { background: rgba(0, 90, 253, .7); }

/* ---- Mission Control ---- */
.ch-ylabels, .ch-xlabels { position: absolute; inset: 0; pointer-events: none; }
.mc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.mc-head h1 { font-size: clamp(26px, 3vw, 34px); }
.mc-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 650 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.mc-kicker .i { width: 15px; height: 15px; }
.mc-live { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); color: var(--mint-ink); padding: 6px 10px; border-radius: 999px; background: var(--mint); }
.mc-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: mcPulse 2s ease-in-out infinite; }
@keyframes mcPulse { 50% { opacity: .35; } }
.mc-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.mc-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mc-col, .mc-side { display: grid; gap: 14px; min-width: 0; }
.mc-sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mc-sec h2 { font-size: 16px; }
.mc-sec a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.mc-sec a .i { width: 14px; height: 14px; }
.mc-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mc-proj { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; transition: box-shadow .2s, transform .2s; }
.mc-proj:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.mc-proj__top { display: flex; gap: 12px; align-items: center; }
.mc-proj__top .grow { display: grid; gap: 1px; min-width: 0; }
.mc-proj__top b { font: 700 16px/1.2 var(--display); }
.mc-proj__key { font: 700 11px/1 var(--mono); color: var(--blue); letter-spacing: .04em; }
.mc-proj__mid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.mc-proj__vel { display: grid; gap: 4px; min-width: 0; }
.mc-proj__vel .hint { font-size: 11px; }
.mc-faces { display: flex; }
.mc-faces .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; box-shadow: 0 0 0 2px var(--panel); }
.mc-faces .avatar + .avatar { margin-left: -7px; }
.mc-faces__more { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -7px; border-radius: 9px; background: var(--bg-3); font: 600 11px/1 var(--sans); box-shadow: 0 0 0 2px var(--panel); }
.mc-proj__foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-width: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.mc-proj__foot > .ellipsis { display: flex; align-items: center; gap: 6px; flex: 1; }
.mc-proj__foot .i { width: 14px; height: 14px; flex: none; color: var(--faint); }
.mc-blk { display: inline-flex; gap: 4px; flex: none; }
.mc-blk .chip { font-size: 11px; min-height: 22px; padding: 2px 8px; }
.mc-bots { display: grid; gap: 2px; }
.mc-bot { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.mc-bot:hover { background: var(--bg-2); }
.mc-bot__face { position: relative; flex: none; }
.mc-bot__face .presence { position: absolute; right: -2px; bottom: -2px; box-shadow: 0 0 0 2px var(--panel); }
.mc-bot .grow { display: grid; min-width: 0; }
.mc-bot .grow b { font-size: 13.5px; }
.mc-bot .grow > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-feed { margin-top: 16px; }
.mc-stream { list-style: none; margin: 0; padding: 0; display: grid; }
.mc-stream li { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.mc-stream li:first-child { border-top: 0; }
.mc-stream .grow { display: grid; gap: 2px; min-width: 0; }
.mc-stream .grow a, .mc-stream .grow > span:first-child { color: var(--ink); font-size: 13.5px; overflow-wrap: anywhere; }
.mc-stream .grow .hint { font-size: 12px; }
.mc-stream time { flex: none; font-size: 12px; color: var(--faint); }
.mc-stream select { min-height: 32px; font-size: 12.5px; }
@media (max-width: 1100px) { .mc-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .mc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-head { flex-direction: column; align-items: flex-start; }
  .mc-projects { grid-template-columns: minmax(0, 1fr); }
  .ch-kpi__value { font-size: 24px; }
}
.mc-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); text-decoration: none; }
.mc-back:hover { color: var(--ink); }
.mc-back .i { width: 15px; height: 15px; }
.mc-ph { display: flex; gap: 16px; align-items: center; min-width: 0; }
.mc-stucks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mc-stuck { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font-size: 13px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.mc-stuck .i { width: 15px; height: 15px; }
.mc-stuck.bad { background: var(--peach); border-color: transparent; }
.mc-stuck.bad .i { color: var(--peach-ink); }
.mc-stuck.warn { background: var(--butter); border-color: transparent; }
.mc-stuck.warn .i { color: var(--butter-ink); }
.mc-stuck b { font-size: 15px; }
.mc-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; margin-bottom: 18px; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.mc-hero__txt { padding: 28px 30px; display: grid; align-content: center; gap: 4px; min-width: 0; }
.mc-hero__txt h1 { font-size: clamp(26px, 3vw, 36px); }
.mc-hero__txt .mc-kicker .mc-live { margin-left: 8px; padding: 4px 8px; font-size: 11px; letter-spacing: 0; text-transform: none; }
.mc-hero__art { position: relative; min-height: 220px; }
.mc-hero__art video, .mc-hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-now { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mc-now__item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; font: 600 13px/1 var(--sans); text-decoration: none; }
.mc-now__item .i { width: 15px; height: 15px; }
.mc-now__item.bad { background: var(--peach); color: var(--peach-ink); }
.mc-now__item.warn { background: var(--butter); color: var(--butter-ink); }
.mc-now__item.ok { background: var(--mint); color: var(--mint-ink); }
@media (max-width: 820px) { .mc-hero { grid-template-columns: minmax(0, 1fr); } .mc-hero__art { min-height: 180px; order: -1; } .mc-hero__txt { padding: 20px; } }
.mc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mc-sec--feed { flex-wrap: wrap; }
.mc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-filters select { width: auto; min-width: 0; max-width: 100%; min-height: 34px; padding-block: 4px; font-size: 13px; }
.mc-stream .grow .hint, .mc-stream .grow a { overflow-wrap: anywhere; }
.mc-more { margin: 12px auto 0; display: flex; }
@media (max-width: 560px) { .mc-filters { width: 100%; } .mc-filters select { flex: 1 1 140px; } .mc-stream li { gap: 10px; } .mc-stream time { font-size: 11px; } }
@media (max-width: 560px) { .mc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mc-cycle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.mc-cycle > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.mc-cycle b { font: 700 22px/1 var(--display); }
/* Bot cards: identity never squeezes; chips drop to their own row when the card is narrow. */
.bot { container-type: inline-size; }
.bot__top--card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
.bot__face { position: relative; width: 48px; height: 48px; flex: none; }
.bot__face .avatar { width: 48px; height: 48px; }
.bot__face .presence { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; box-shadow: 0 0 0 2.5px var(--panel); }
.bot__id { min-width: 0; display: grid; gap: 2px; }
.bot__name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.bot__name b { flex: none; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.bot__name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.bot__role { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot__chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bot__chips .pm { margin: 0; }
@container (max-width: 470px) { .bot__chips { grid-column: 2 / -1; justify-content: flex-start; } }
.bots-search { width: min(100%, 420px); min-width: min(100%, 320px); }
@media (max-width: 640px) { .bots-search { width: 100%; } .head > .actions { width: 100%; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lvl b { background: rgba(255, 255, 255, .14); } }
:root[data-theme="dark"] .lvl b { background: rgba(255, 255, 255, .14); }
.menu__theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; }
.menu__theme .sb-theme { width: 132px; }

/* ---- Trusted approver bots (Track J) ---- */
.untrusted { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.untrusted__src { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px/1 var(--sans); letter-spacing: .02em; color: var(--muted); }
.untrusted__src .i { width: 13px; height: 13px; }
.untrusted p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: 13.5px; }
.rstrips { display: grid; gap: 8px; margin-bottom: 14px; }
.rstrip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--sky); }
.rstrip--held { background: var(--mint); }
.rstrip--held.is-reject, .rstrip--esc { background: var(--butter); }
.rstrip--done { background: var(--bg-2); }
.rstrip__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rstrip__who > div { display: grid; gap: 2px; min-width: 0; }
.rstrip__who b { font-size: 13.5px; }
.rstrip__who span { font-size: 12.5px; color: var(--ink-2); }
.rstrip__who .avatar { width: 34px; height: 34px; }
.rstrip .num { font-variant-numeric: tabular-nums; }
.ctx { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.ctx summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.ctx summary .i { width: 15px; height: 15px; }
.ctx__body { margin-top: 10px; }
.ctx__rcpts { display: grid; gap: 4px; font-size: 13px; }
.ctx__guide { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--sky); }
.ctx__guide p { margin: 4px 0 0; white-space: pre-wrap; font-size: 13px; }
.seg--chips { display: inline-flex; flex-wrap: wrap; }
.seg--chips a { display: inline-flex; align-items: center; gap: 5px; }
.seg--chips .i { width: 14px; height: 14px; }
.trust__checks, .trust__reasons { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.trust__checks li, .trust__reasons li { display: flex; gap: 8px; align-items: flex-start; }
.trust__checks .i, .trust__reasons .i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.trust__checks .ok .i { color: var(--mint-ink); }
.trust__checks .no { color: var(--muted); }
.trust__checks .no .i, .trust__reasons .i { color: var(--peach-ink); }
.rt { padding: 0; overflow: hidden; }
.rt-head, .rt-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) auto minmax(0, 2fr) minmax(140px, 1fr); gap: 14px; align-items: start; padding: 14px 18px; }
.rt-head { font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
.rt-row { border-top: 1px solid var(--line); }
.rt-row.is-dirty { background: color-mix(in srgb, var(--sky) 60%, transparent); }
.rt-what { display: grid; gap: 4px; justify-items: start; }
.rt-what .hint { font-size: 12px; }
.rt-bot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; min-width: 0; }
.rt-bot select { min-height: 34px; max-width: 100%; }
.rt-bot label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rt-num { width: 72px; min-height: 32px; padding: 4px 8px; }
.rt-more { flex-basis: 100%; }
.rt-more summary { cursor: pointer; font-size: 12.5px; color: var(--blue); }
.rt-more__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.rt-more__grid label { display: grid; gap: 4px; }
.rt-check { display: inline-flex !important; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.rt-status { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-status .chip { font-size: 11.5px; }
.rt-foot { justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 900px) {
  .rt-head { display: none; }
  .rt-row { grid-template-columns: minmax(0, 1fr); }
}
.rt-status .chip { white-space: normal; text-align: left; line-height: 1.35; }
.seg--chips a { text-transform: none; }

/* ---- One-step onboarding form ---- */
.obf { display: grid; gap: 16px; }
.obf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.obf-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); min-height: 44px; }
.obf-chips input { flex: 1 1 140px; min-width: 0; border: 0; background: transparent; padding: 6px; min-height: 30px; box-shadow: none; }
.obf-chips input:focus { outline: none; }
.obf-chip { display: inline-flex; align-items: center; gap: 4px; }
.obf-chip button { border: 0; background: none; padding: 0 2px; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; min-height: 0; }
.obf-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.obf-role { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.obf-role:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.obf-role input { margin-top: 3px; }
.obf-role span { display: grid; gap: 2px; min-width: 0; }
.obf-role span span { font-size: 12.5px; color: var(--muted); }
.obf-rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.obf-room { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.obf-room:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.obf-room.is-default span:first-of-type { font-weight: 600; }
.obf-room .hint { font-size: 11px; }
.obf-panel { margin-bottom: 16px; border-color: var(--hold); }
.connect__card--wide { max-width: 720px; }
.connect__addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; justify-content: center; margin: 6px 0 4px; }
.connect__addr b { font-size: 15px; overflow-wrap: anywhere; }
@media (max-width: 560px) { .obf-row, .obf-roles { grid-template-columns: minmax(0, 1fr); } }
.obf, .connect__card--wide { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.obf > *, .obf .field, .obf-row > *, .connect__step { min-width: 0; }
.obf select, .obf textarea, .obf input:not([type="checkbox"]):not([type="radio"]) { max-width: 100%; }
.obf .dial { display: flex; width: 100%; }
.obf .dial button { flex: 1 1 0; padding: 0 6px; }
.connect__card--wide { width: 100%; box-sizing: border-box; }
.obf-room { max-width: 100%; } .obf-room span { overflow-wrap: anywhere; }

/* ---- Task board polish ---- */
.tb-meta { margin: -6px 0 12px; gap: 10px; }
.tb-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.tb-search { flex: 1 1 220px; min-width: 0; max-width: 340px; min-height: 36px; }
.tb-bar select { min-height: 36px; width: auto; max-width: 100%; }
.tb-bulk { position: sticky; top: calc(var(--top) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--panel); box-shadow: var(--shadow-lg); }
.tb-bulk .hint { color: color-mix(in srgb, var(--panel) 70%, transparent); }
.tb-bulk select { min-height: 32px; width: auto; }
.tb-bulk .ghost { color: var(--panel); }
.tb-quickwrap { display: grid; gap: 4px; }
.tb-quick { width: 100%; min-height: 36px; border: 1px dashed var(--line-2); background: transparent; border-radius: 12px; padding: 6px 10px; font-size: 13px; }
.tb-quick:focus { border-style: solid; background: var(--panel); }
.tb-quickwrap .hint { font-size: 11px; padding-left: 4px; display: none; }
.tb-quickwrap:focus-within .hint { display: block; }
.tb-empty { padding: 4px 6px; font-size: 12.5px; }
.tcard { position: relative; border-left: 3px solid transparent; }
.tcard.is-overdue { border-left-color: var(--stop); }
.tcard.is-soon { border-left-color: var(--hold); }
.tcard.is-blocked { background: color-mix(in srgb, var(--peach) 55%, var(--panel)); }
.tcard.is-sel { outline: 2px solid var(--blue); outline-offset: 1px; }
.tcard__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard__key { font-size: 11.5px; margin-right: auto; }
.tcard__sel { width: 15px; height: 15px; margin: 0; opacity: .35; cursor: pointer; }
.tcard:hover .tcard__sel, .tcard.is-sel .tcard__sel, .tcard__sel:focus-visible { opacity: 1; }
.tcard__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.tb-block { display: grid; gap: 10px; }
.tb-today__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tb-group .card__head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.tb-group .card__head h2 .i { width: 16px; height: 16px; color: var(--muted); }
.tb-rows { display: grid; gap: 2px; }
.tb-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; font-size: 13px; color: inherit; cursor: pointer; min-width: 0; }
.tb-row:hover { background: var(--bg-2); }
.tb-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-row__who { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: 12.5px; }
.tb-row__who .avatar, .tb-load__row .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 7px; }
.tb-load { display: grid; gap: 4px; }
.tb-load__row { display: flex; align-items: center; gap: 10px; padding: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .tb-search { max-width: none; flex-basis: 100%; }
  .tb-today__grid { grid-template-columns: minmax(0, 1fr); }
  .tb-row__who span:last-child { display: none; }
}
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg a .i, .seg button .i { width: 15px; height: 15px; flex: none; }

/* ---------- Phone card on a bot profile ---------- */
.ph-card .card__head h2 { display: flex; align-items: center; gap: 8px; }
.ph-card .card__head h2 .i { width: 16px; height: 16px; color: var(--ink-3); }
.ph { display: grid; gap: 14px; }
.ph-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--lilac); color: var(--lilac-ink); font-size: 13px; }
.ph-note .i { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.ph-num { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.ph-num > div:first-child { display: grid; gap: 2px; margin-right: auto; }
.ph-num b.mono { font-size: 18px; letter-spacing: .01em; }
.ph-num--none { flex-wrap: nowrap; align-items: flex-start; }
.ph-num--none > div { display: grid; gap: 2px; }
.ph-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.ph-ico .i { width: 18px; height: 18px; }
.ph-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-msg { max-width: min(80%, 340px); display: grid; gap: 6px; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--bg-3); justify-self: start; }
.ph-msg.is-out { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--blue-soft); }
.ph-msg p { margin: 0; font-size: 14px; line-height: 1.4; }
.ph-msg time { font-size: 11px; color: var(--ink-3); }
.ph-msg.is-out time { text-align: right; }
.ph-media { display: grid; gap: 4px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); }
.ph-media.n2 { --n: 2; } .ph-media.n3 { --n: 3; }
.ph-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; min-width: 72px; border-radius: 10px; overflow: hidden; background: var(--bg-2); color: var(--ink-3); }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-play { position: absolute; inset: auto 6px 6px auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(15, 20, 30, .62); color: #fff; }
.ph-play .i { width: 13px; height: 13px; }
.ph-actions { display: grid; gap: 10px; justify-items: start; }
.ph-req { display: grid; gap: 4px; width: 100%; }
.ph-req__go { align-self: end; justify-content: flex-end; }

/* ---------- Look pass: row headers, stacked tables on phones ---------- */
th[scope="row"] { font: inherit; letter-spacing: normal; text-transform: none; color: inherit; background: none; }
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { padding: 3px 0; border: 0; }
  table.stack td[data-label] { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
  table.stack td[data-label] > * { justify-self: start; }
  table.stack td[data-label]::before { content: attr(data-label); font: 600 11px/1.8 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
}
.ph-files { gap: 6px; }
.ph-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ph-file .i { flex: none; width: 14px; height: 14px; color: var(--ink-3); }

/* Account lifecycle: the countdown banner while a workspace waits for deletion, and the danger zone card (Settings > Data). */
.lc-banner { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 10px 16px; background: var(--stop-soft); color: var(--stop); border-bottom: 1px solid color-mix(in srgb, var(--stop) 30%, var(--line)); font-size: 14px; }
.lc-banner a { color: inherit; font-weight: 600; text-decoration: underline; }
.danger-zone { border-color: color-mix(in srgb, var(--stop) 35%, var(--line)); }
/* ---- Track L: sign-up screens, the first-run checklist and the connect wizard ---- */
.su-plan { display: grid; gap: 8px; }
.su-plan .seg button { text-transform: none; }
.su-terms { font-size: 13.5px; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.su-form { gap: 14px; }
.su-field { display: grid; gap: 6px; }
.su-field label, .su-field .label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13.5px; }
.su-field select { min-height: 46px; }
.su-offer { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.su-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--muted); }
.su-price .num { font: 700 26px/1.1 var(--display); color: var(--ink); }
.su-disclosure { font-size: 14px; color: var(--ink); margin: 0; }
.su-form .su-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; font-weight: 500; }
.su-form .su-check input { margin-top: 2px; flex: none; }
.su-links { margin: -4px 0 0; }
.su-meter { display: grid; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--hold-soft); }
.su-meter .num { font: 700 26px/1.1 var(--display); color: var(--hold); }
.gate-card .btn.primary { display: flex; align-items: center; justify-content: center; min-height: 48px; }
.ob { margin: 0 0 18px; display: grid; gap: 14px; }
.ob .card__head { align-items: flex-start; }
.ob-bar { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.ob-bar i { display: block; height: 100%; border-radius: inherit; background: var(--go); transition: width .4s var(--ease); }
.ob-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ob-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.ob-step:first-child { border-top: 0; }
.ob-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.ob-dot .i { width: 14px; height: 14px; stroke-width: 2.4; }
.ob-step.is-done .ob-dot { background: var(--go); border-color: var(--go); }
.ob-step.is-done .ob-txt b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.ob-txt { display: grid; gap: 2px; min-width: 0; }
.ob-txt b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ob-wiz { display: grid; gap: 12px; margin-top: 14px; }
.ob-card { display: grid; gap: 10px; }
.ob-card h3 { display: flex; align-items: center; gap: 10px; }
.ob-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); font: 700 13px/1 var(--sans); flex: none; }
.ob-code { position: relative; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.ob-code pre { margin: 0; padding: 12px 14px; padding-right: 76px; overflow-x: auto; font: 12.5px/1.55 var(--mono); white-space: pre; }
.ob-code button { position: absolute; top: 8px; right: 8px; }
.ob-wiz-grid { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ob-wiz-nav .ob-txt { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ob-step.is-current { background: var(--bg-2); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.ob-live { margin-top: 8px; }
.ob-live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ob-live-list li { display: grid; gap: 2px; padding: 8px 4px; border-top: 1px solid var(--line); }
.sb-setup { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; background: var(--bg-2); border: 1px solid var(--line); }
.sb-setup:hover, .sb-setup.is-current { background: var(--bg-3); }
.sb-setup__lbl { font-weight: 650; flex: 1; }
.page-help { margin: 0 0 8px; }
@media (max-width: 800px) { .ob-wiz-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ob-step { grid-template-columns: 24px minmax(0, 1fr); } .ob-step > :last-child { grid-column: 2; justify-self: start; } }
