@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/instrument-sans-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Instrument Serif";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2")}
/* Layout: the didii app as a support team sees it (sidebar, top bar, one screen at a time) under a thin dark demo bar.
   The customer's phone docks beside the inbox on a dotted stage, so everything that belongs to the demo reads as
   outside the product. Identity follows didiiai.com: warm paper, ink, one cobalt accent, Instrument Sans for the
   interface and Instrument Serif italic for a few display moments. */
:root {
  --paper: #f7f6f3;
  --side: #f1f0ec;
  --surface: #ffffff;
  --raised: #fbfaf8;
  --sunk: #efeee9;
  --hover: #e9e7e1;
  --line: #e4e2db;
  --line-2: #d4d1c7;
  --fg: #0c0d10;
  --fg-2: #2b2e36;
  --muted: #5c6170;
  --faint: #868b97;
  --accent: #2d43e6;
  --accent-2: #2236c9;
  --accent-soft: #e8ebfd;
  --accent-ink: #1f30b0;
  --on-accent: #ffffff;
  --ok: #1d7f47; --ok-bg: #e3f4ea;
  --warn: #a35f00; --warn-bg: #fdf0dc;
  --bad: #c8372a; --bad-bg: #fbe5e1;
  --unk: #575d6b; --unk-bg: #ecebe6;
  --ask: #1f30b0; --ask-bg: #e8ebfd;
  --c-ai: #2d43e6; --c-people: #a7b0f5;
  --av1: #e6e9fd; --av1-fg: #1f30b0;
  --av2: #e1f3e8; --av2-fg: #1b6a3d;
  --av3: #fcefd9; --av3-fg: #85500a;
  --av4: #f7e4ee; --av4-fg: #8a2d60;
  --av5: #e0f0f3; --av5-fg: #1d5f6e;
  --av6: #eee8fb; --av6-fg: #5a3aa2;
  --demo: #0b0c10; --demo-2: #17191f; --demo-3: #20232b; --demo-line: #2a2d36; --demo-fg: #f2f2ef; --demo-muted: #a2a7b5; --demo-accent: #8f9dff;
  --stage: #ebe9e3; --stage-dot: #d6d3c9;
  --device: #0c0d10;
  --wa-bg: #efe9e1; --wa-in: #ffffff; --wa-out: #dcf4d4; --wa-head: #f7f6f3; --wa-ink: #0c0d10; --wa-tick: #2d43e6;
  --sms-in: #e9e9ec; --sms-out: #2d43e6; --sms-out-fg: #ffffff;
  --call-a: #26306e; --call-b: #0d0e13; --call-fg: #f2f2ef; --call-muted: #a3a9b8;
  --lock-a: #2b3474; --lock-b: #0b0c10;
  --ws-uk: #2f5d50; --ws-ng: #8a4b14;
  --scrim: rgb(12 13 16 / .34);
  --sh-1: 0 1px 2px rgb(12 13 16 / .06);
  --sh-2: 0 1px 2px rgb(12 13 16 / .05), 0 8px 24px -8px rgb(12 13 16 / .16);
  --sh-3: 0 2px 6px rgb(12 13 16 / .08), 0 30px 70px -24px rgb(12 13 16 / .36);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --side-w: 236px;
  --bar-h: 40px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0c10; --side: #0e0f13; --surface: #131419; --raised: #17181e; --sunk: #1c1e25; --hover: #21232b;
    --line: #25272f; --line-2: #333640;
    --fg: #f2f2ef; --fg-2: #d6d7db; --muted: #a2a7b5; --faint: #767c8b;
    --accent: #8191ff; --accent-2: #9aa6ff; --accent-soft: #1c2254; --accent-ink: #c6cdff; --on-accent: #0b0c10;
    --ok: #5ccf8c; --ok-bg: #11301f; --warn: #f0b35a; --warn-bg: #33250e; --bad: #ff8b7b; --bad-bg: #3b1713;
    --unk: #b3b8c4; --unk-bg: #23252c; --ask: #c6cdff; --ask-bg: #1c2254;
    --c-ai: #8191ff; --c-people: #414c9e;
    --av1: #1c2254; --av1-fg: #c6cdff; --av2: #11301f; --av2-fg: #93e0b3; --av3: #33250e; --av3-fg: #f3cd8d;
    --av4: #3a1830; --av4-fg: #f2b5d6; --av5: #10292f; --av5-fg: #9fdbe6; --av6: #261c42; --av6-fg: #cfc0f8;
    --stage: #0f1014; --stage-dot: #24262e;
    --device: #000000;
    --wa-bg: #0e1317; --wa-in: #1f242a; --wa-out: #1d3b2b; --wa-head: #15191e; --wa-ink: #e8ecee; --wa-tick: #8191ff;
    --sms-in: #26282f; --sms-out: #4457f0;
    --ws-uk: #3f7a69; --ws-ng: #a8611f;
    --scrim: rgb(0 0 0 / .55);
    --sh-1: 0 1px 2px rgb(0 0 0 / .4);
    --sh-2: 0 1px 2px rgb(0 0 0 / .4), 0 10px 28px -8px rgb(0 0 0 / .55);
    --sh-3: 0 2px 6px rgb(0 0 0 / .45), 0 30px 70px -24px rgb(0 0 0 / .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0c10; --side: #0e0f13; --surface: #131419; --raised: #17181e; --sunk: #1c1e25; --hover: #21232b;
  --line: #25272f; --line-2: #333640;
  --fg: #f2f2ef; --fg-2: #d6d7db; --muted: #a2a7b5; --faint: #767c8b;
  --accent: #8191ff; --accent-2: #9aa6ff; --accent-soft: #1c2254; --accent-ink: #c6cdff; --on-accent: #0b0c10;
  --ok: #5ccf8c; --ok-bg: #11301f; --warn: #f0b35a; --warn-bg: #33250e; --bad: #ff8b7b; --bad-bg: #3b1713;
  --unk: #b3b8c4; --unk-bg: #23252c; --ask: #c6cdff; --ask-bg: #1c2254;
  --c-ai: #8191ff; --c-people: #414c9e;
  --av1: #1c2254; --av1-fg: #c6cdff; --av2: #11301f; --av2-fg: #93e0b3; --av3: #33250e; --av3-fg: #f3cd8d;
  --av4: #3a1830; --av4-fg: #f2b5d6; --av5: #10292f; --av5-fg: #9fdbe6; --av6: #261c42; --av6-fg: #cfc0f8;
  --stage: #0f1014; --stage-dot: #24262e;
  --device: #000000;
  --wa-bg: #0e1317; --wa-in: #1f242a; --wa-out: #1d3b2b; --wa-head: #15191e; --wa-ink: #e8ecee; --wa-tick: #8191ff;
  --sms-in: #26282f; --sms-out: #4457f0;
  --ws-uk: #3f7a69; --ws-ng: #a8611f;
  --scrim: rgb(0 0 0 / .55);
  --sh-1: 0 1px 2px rgb(0 0 0 / .4);
  --sh-2: 0 1px 2px rgb(0 0 0 / .4), 0 10px 28px -8px rgb(0 0 0 / .55);
  --sh-3: 0 2px 6px rgb(0 0 0 / .45), 0 30px 70px -24px rgb(0 0 0 / .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--fg); font-family: var(--sans); font-size: 13.5px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; overflow: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
table { font: inherit; border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .88em; }
.num, .mono, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.start { align-items: flex-start; }
.stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
.stack.tight { gap: 6px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.ic { flex: none; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---------- Brand marks ---------- */
.logo { display: inline-flex; align-items: center; gap: 7px; color: currentColor; }
.logo svg { width: 22px; height: 22px; display: block; }
.logo svg path { stroke: currentColor; }
.logo .dot { fill: var(--accent); }
.logo-word { font-weight: 600; font-size: 18px; letter-spacing: -0.045em; line-height: 1; }
.orb {
  --o: 18px; width: var(--o); height: var(--o); border-radius: 50%; flex: none; display: inline-block;
  background: conic-gradient(from 200deg, #2d43e6, #8a96ff, #6fd6c4, #2d43e6);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28);
}
.orb.sm { --o: 14px; } .orb.lg { --o: 28px; } .orb.xl { --o: 40px; }
.orb.think { animation: spin 2.2s linear infinite; }

/* ---------- Avatars ---------- */
.av {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative;
  display: inline-grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 600; letter-spacing: .01em;
  background: var(--av1); color: var(--av1-fg);
}
.av.sm { --s: 22px; } .av.md { --s: 32px; } .av.lg { --s: 40px; } .av.xl { --s: 56px; }
.av.h2 { background: var(--av2); color: var(--av2-fg); } .av.h3 { background: var(--av3); color: var(--av3-fg); }
.av.h4 { background: var(--av4); color: var(--av4-fg); } .av.h5 { background: var(--av5); color: var(--av5-fg); }
.av.h6 { background: var(--av6); color: var(--av6-fg); }
.av .chb {
  position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); color: var(--muted); display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--surface);
}
.av .online { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--surface); }
.av.sm .chb { width: 13px; height: 13px; right: -4px; bottom: -4px; }
.av.sm .chb svg { width: 8px; height: 8px; }
.ws-logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1; color: #fff; background: var(--ws-uk);
}
.ws-logo.ng { background: var(--ws-ng); }
.ws-logo.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 14px; }
.ws-logo.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 25px; }

/* ---------- Pills, chips, keys ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; background: var(--unk-bg); color: var(--unk);
  transition: background-color .3s, color .3s;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.bare::before { display: none; }
.pill.live::before { animation: pulse-dot 1.4s ease-in-out infinite; }
.s-done { background: var(--ok-bg); color: var(--ok); }
.s-wait { background: var(--warn-bg); color: var(--warn); }
.s-bad { background: var(--bad-bg); color: var(--bad); }
.s-unk { background: var(--unk-bg); color: var(--unk); }
.s-ask { background: var(--ask-bg); color: var(--ask); }
.s-ai { background: var(--accent-soft); color: var(--accent-ink); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--sunk); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1;
}
.chip.out { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.chip.acc { background: var(--accent-soft); color: var(--accent-ink); }
.chip.ink { background: var(--fg); color: var(--paper); }
.kbd {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 5px; font-family: var(--sans);
  font-size: 11px; font-weight: 500; color: var(--faint); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
}
.count { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; user-select: none;
  background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-1);
  transition: background-color .15s, box-shadow .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--raised); box-shadow: inset 0 0 0 1px var(--faint), var(--sh-1); }
.btn:active { transform: translateY(.5px); }
.btn.pri { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 1px 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.pri:hover { background: var(--accent-2); }
.btn.ink { background: var(--fg); color: var(--paper); box-shadow: none; }
.btn.ink:hover { background: var(--fg-2); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.lg { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted);
  position: relative; flex: none; transition: background-color .15s, color .15s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--hover); color: var(--fg); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--paper); line-height: 1;
}
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.seg.lg button { height: 32px; padding: 0 14px; font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; height: 42px; padding: 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--fg); }
.input {
  width: 100%; height: 34px; border-radius: 8px; border: 0; background: var(--surface); padding: 0 10px; font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s;
}
.input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
textarea.input { height: auto; padding: 9px 10px; line-height: 1.45; resize: vertical; }
select.input { padding-right: 8px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.toggle {
  position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); flex: none;
  transition: background-color .2s;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .22s var(--ease);
}
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { transform: translateX(16px); }
.toggle.warn[aria-checked="true"] { background: var(--warn); }
.toggle.bad[aria-checked="true"] { background: var(--bad); }

/* ---------- Demo bar (outside the product) ---------- */
.demobar {
  flex: none; height: var(--bar-h); background: var(--demo); color: var(--demo-fg); display: flex; align-items: center; gap: 12px;
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px));
  font-size: 12.5px; position: relative; z-index: 40; min-width: 0; box-shadow: inset 0 -1px 0 var(--demo-line);
}
.demobar .sm-only { display: none; }
.demobar .logo .dot { fill: var(--demo-accent); }
.demobar .logo svg { width: 20px; height: 20px; }
.demobar .logo-word { font-size: 17px; }
.db-tag {
  height: 22px; padding: 0 8px; border-radius: 6px; background: var(--demo-2); box-shadow: inset 0 0 0 1px var(--demo-line);
  font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
}
.db-note { color: var(--demo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.db-right { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.db-btn {
  height: 28px; padding: 0 10px; border-radius: 7px; color: var(--demo-fg); display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; white-space: nowrap; transition: background-color .15s;
}
.db-btn:hover, .db-btn[aria-expanded="true"] { background: var(--demo-3); }
.db-cta {
  height: 28px; padding: 0 13px; border-radius: 999px; background: var(--demo-fg); color: var(--demo); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-left: 6px; transition: background-color .15s;
}
.db-cta:hover { background: #ffffff; }
.db-tour { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--demo-2); box-shadow: inset 0 0 0 1px var(--demo-line); white-space: nowrap; }
.db-tour .trk { width: 64px; height: 4px; border-radius: 99px; background: var(--demo-3); overflow: hidden; }
.db-tour .trk i { display: block; height: 100%; background: var(--demo-accent); border-radius: 99px; transition: width .4s var(--ease); }

/* ---------- App frame ---------- */
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); position: relative; }
.app.side-collapsed { --side-w: 64px; }
.side {
  background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0;
  padding: 10px; gap: 8px; overflow: hidden; padding-left: max(10px, env(safe-area-inset-left, 0px));
}
.ws { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 9px; width: 100%; transition: background-color .15s; }
.ws:hover, .ws[aria-expanded="true"] { background: var(--hover); }
.ws-text { display: grid; min-width: 0; flex: 1; text-align: left; }
.ws-text b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws > .ic { color: var(--faint); }
.side-search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 9px; border-radius: 8px; color: var(--muted); width: 100%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); font-size: 13px; transition: box-shadow .15s;
}
.side-search:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-1); }
.side-search .kbd { margin-left: auto; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; margin-top: 2px; }
.nav-i {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 9px; border-radius: 8px; color: var(--fg-2);
  font-size: 13.5px; font-weight: 500; position: relative; white-space: nowrap; flex: none; transition: background-color .15s, color .15s;
}
.nav-i .ic { color: var(--muted); }
.nav-i:hover { background: var(--hover); }
.nav-i[aria-current="page"] { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.nav-i[aria-current="page"] .ic { color: var(--fg); }
.nav-n { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-n.hot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; line-height: 1; }
.nav-n.bump { animation: bump .5s var(--ease); }
.nav-label { font-size: 11px; font-weight: 600; color: var(--faint); padding: 14px 9px 4px; letter-spacing: .02em; flex: none; }
.side-foot { display: grid; gap: 6px; flex: none; }
.ai-card { border-radius: 11px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); padding: 10px; display: grid; gap: 8px; }
.ai-card .r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-orb { display: inline-grid; place-items: center; border-radius: 50%; flex: none; transition: box-shadow .2s; }
.ai-orb:hover, .ai-orb[aria-expanded="true"] { box-shadow: 0 0 0 4px var(--accent-soft); }
.ai-card .r1 b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ai-state { margin-left: auto; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--ok); white-space: nowrap; }
.ai-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-dot 2s ease-in-out infinite; }
.ai-card[data-state="paused"] .ai-state { color: var(--warn); }
.ai-card[data-state="paused"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, var(--line)), var(--sh-1); }
.ai-card .r2 { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.me { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 9px; width: 100%; min-width: 0; transition: background-color .15s; }
.me:hover { background: var(--hover); }
.me div { display: grid; min-width: 0; text-align: left; }
.me b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-collapsed .side { padding-inline: 8px; align-items: center; }
.side-collapsed .side .ws { width: auto; padding: 5px; }
.side-collapsed .side :is(.ws-text, .ws > .ic, .side-search span, .side-search .kbd, .nav-i > span:not(.nav-n), .nav-n:not(.hot), .ai-card .r2, .ai-card .btns, .ai-card .r1 b, .ai-state, .me div) { display: none; }
.side-collapsed .side .side-search { width: 40px; justify-content: center; padding: 0; }
.side-collapsed .side .nav { align-items: center; }
.side-collapsed .side .nav-i { width: 40px; justify-content: center; padding: 0; }
.side-collapsed .side .nav-n.hot { position: absolute; top: 1px; right: -2px; transform: scale(.86); }
.side-collapsed .side .nav-label { height: 1px; padding: 0; margin: 9px 10px; width: 24px; background: var(--line); overflow: hidden; color: transparent; }
.side-collapsed .side .ai-card { padding: 8px; justify-items: center; }
.side-collapsed .side .me { width: auto; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding-left: 16px;
  padding-right: max(14px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--paper); min-width: 0;
}
.topbar h1 { font-size: 15px; font-weight: 600; white-space: nowrap; }
.top-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.clock { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 4px; }
.clock i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse-dot 2s ease-in-out infinite; }
.presence { display: inline-flex; align-items: center; padding: 0 4px 0 10px; }
.presence .av { box-shadow: 0 0 0 2px var(--paper); margin-left: -7px; }
.presence span { margin-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.view { flex: 1; min-height: 0; overflow-y: auto; position: relative; }
.view.fill { overflow: hidden; }
.page { padding: 22px 24px 64px; max-width: 1480px; margin: 0 auto; display: grid; gap: 16px; align-content: start; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.page-h h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.022em; }
.page-h p { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.greet { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.greet em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* ---------- Panels, tables, stats ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.panel.clip { overflow: hidden; }
.panel-h { display: flex; align-items: center; gap: 8px 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 48px; }
.panel-h h3 { font-size: 13.5px; font-weight: 600; }
.panel-h .sub { color: var(--muted); font-size: 12.5px; }
.panel-h .end { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-b { padding: 14px 16px; }
.panel-b.flush { padding: 0; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.g-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 16px; align-items: start; }
.g-main.wide-side { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
.g-side-l { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 14px 12px;
  display: grid; gap: 3px; box-shadow: var(--sh-1); position: relative; overflow: hidden; min-width: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
button.kpi:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-1px); }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; padding-right: 92px; }
.kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.12; margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi .more { font-size: 12px; color: var(--accent); font-weight: 500; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpis.compact .k { padding-right: 0; }
.kpi[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.spark { position: absolute; right: 12px; top: 14px; width: 84px; height: 30px; overflow: visible; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spark .ar { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.spark .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.tscroll { overflow-x: auto; min-width: 0; }
.tbl { font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--raised);
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .2s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--raised); }
.tbl tr.hl td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.tbl tr.arrive td { animation: flash-bg 1.6s var(--ease); }
.tbl .who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tbl td.mono { white-space: nowrap; }
.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .7s var(--ease); }
.bar.warn > i { background: var(--warn); } .bar.ok > i { background: var(--ok); } .bar.bad > i { background: var(--bad); } .bar.ppl > i { background: var(--c-people); }
.empty { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty .orb { margin-bottom: 4px; }
.note { font-size: 12.5px; color: var(--muted); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); }
.callout.ok { background: var(--ok-bg); color: var(--ok); }
.callout.bad { background: var(--bad-bg); color: var(--bad); }
.callout .ic { margin-top: 1px; }
.callout b { font-weight: 600; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { list-style: none; display: grid; }
.li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .t { font-size: 13px; font-weight: 500; }
.li .d { font-size: 12px; color: var(--muted); }
.skel { border-radius: 6px; background: linear-gradient(90deg, var(--sunk) 0%, var(--hover) 50%, var(--sunk) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel.still { animation: none; background: var(--sunk); }
.skel.line { height: 10px; display: block; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-dot 1.6s ease-in-out infinite; }

/* Activity feed */
.feed { list-style: none; display: grid; }
.feed li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: start; }
.feed li:last-child { border-bottom: 0; }
.feed li.new { animation: rise .5s var(--ease) both; }
.feed .fi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.feed .fi.ok { background: var(--ok-bg); color: var(--ok); }
.feed .fi.wait { background: var(--warn-bg); color: var(--warn); }
.feed .fi.bad { background: var(--bad-bg); color: var(--bad); }
.feed .fi.ask { background: var(--ask-bg); color: var(--ask); }
.feed .ft { color: var(--fg-2); line-height: 1.4; }
.feed .ft b { font-weight: 600; color: var(--fg); }
.feed .tm { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart text.tot { fill: var(--fg); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .b-ai { fill: var(--c-ai); }
.chart .b-ppl { fill: var(--c-people); }
.chart .col { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y .8s var(--ease) both; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Inbox ---------- */
.inbox { height: 100%; display: grid; grid-template-columns: 330px minmax(0, 1fr) 370px; min-height: 0; }
.inbox.with-dock { grid-template-columns: 400px minmax(0, 1fr) 370px; }
.ib-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--paper); }
.ib-list-h { padding: 12px 12px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); flex: none; }
.ib-list-h .row b { font-size: 14px; font-weight: 600; }
.ib-items { overflow-y: auto; flex: 1; min-height: 0; padding: 6px; display: grid; gap: 2px; align-content: start; }
.ib-item {
  width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 10px;
  position: relative; transition: background-color .15s, box-shadow .15s;
}
.ib-item:hover { background: var(--hover); }
.ib-item[aria-current="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.ib-item.arrive { animation: arrive .7s var(--ease) both; }
.ib-item .l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ib-item .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-item .tm { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.ib-item .l2 { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-item .l3 { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ib-item .l4 { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; min-width: 0; }
.ib-item .unread { position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.who-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.sla { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.sla.urgent { color: var(--bad); }
.typing-inline { color: var(--accent); font-style: italic; }
.conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); position: relative; }
.conv-h { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); min-height: 58px; min-width: 0; }
.conv-h .who { display: grid; min-width: 0; }
.conv-h .who b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-h .who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.conv-h .end { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.owner { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px 0 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); overscroll-behavior: contain; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--sunk); }
.msg { display: grid; gap: 4px; max-width: min(80%, 560px); min-width: 0; }
.msg.enter, .ev.enter, .blocked.enter, .typing.enter { animation: rise .4s var(--ease) both; }
.msg .meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.msg .meta b { color: var(--fg-2); font-weight: 600; }
.msg .bub { padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; }
.msg.in .bub { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; justify-items: end; }
.msg.out .meta { justify-content: flex-end; }
.msg.ai .bub { background: var(--accent-soft); border-top-right-radius: 4px; }
.msg.person .bub { background: var(--sunk); border-top-right-radius: 4px; }
.msg.auto .bub { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); border-top-right-radius: 4px; }
.msg.note { align-self: stretch; max-width: none; }
.msg.note .bub { background: var(--warn-bg); color: var(--fg); border-radius: 10px; }
.msg .bub.photo { padding: 5px; }
.msg.voice .bub { border-radius: 12px; }
.ev { align-self: center; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 2px 6px; max-width: 94%; text-align: center; }
.ev .ic { color: var(--faint); }
.ev.ok .ic { color: var(--ok); } .ev.wait .ic { color: var(--warn); } .ev.bad .ic { color: var(--bad); } .ev.ask .ic { color: var(--accent); }
.ev b { color: var(--fg-2); font-weight: 600; }
.ev .tm { color: var(--faint); font-variant-numeric: tabular-nums; }
.blocked {
  align-self: flex-end; max-width: min(80%, 560px); border-radius: 12px; padding: 9px 12px; display: grid; gap: 4px; font-size: 12.5px;
  border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad-bg) 55%, var(--surface));
}
.blocked .bl-h { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--bad); font-size: 11.5px; }
.blocked s { color: var(--muted); text-decoration-thickness: 1.5px; }
.receipt { margin-top: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: 9px 10px; display: grid; gap: 4px; font-size: 12px; white-space: normal; text-align: left; color: var(--fg); }
/* Label and value share a line when they fit; on a narrow phone the value drops below, never mid-word. */
.receipt .rr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; }
.receipt .rr > span:first-child { color: var(--muted); white-space: nowrap; }
.receipt .rr > span:last-child { margin-left: auto; text-align: right; overflow-wrap: break-word; min-width: 0; }
.receipt .rh { display: flex; align-items: center; gap: 6px; font-weight: 600; }

/* What didii checked, for the team: one line per system, filling in as it reads */
.chk { align-self: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); padding: 9px 11px 7px; display: grid; gap: 6px; max-width: 640px; width: 100%; justify-self: center; margin: 0 auto; min-width: 0; }
.chk.enter { animation: rise .4s var(--ease) both; }
.chk-h { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.chk-h b { color: var(--fg-2); font-weight: 600; }
.chk-h .chk-n { font-variant-numeric: tabular-nums; }
.chk-h .tm { margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.chk ul { list-style: none; display: grid; gap: 1px; }
.chk li { display: grid; grid-template-columns: 16px minmax(92px, max-content) minmax(0, 1fr); gap: 2px 9px; align-items: baseline; font-size: 12.5px; line-height: 1.4; padding: 4px 0; border-top: 1px solid var(--line); animation: rise .3s var(--ease) both; }
.chk li:first-child { border-top: 0; }
.chk-i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; align-self: center; color: var(--faint); }
.chk li[data-s="ok"] .chk-i { background: var(--ok-bg); color: var(--ok); }
.chk-sys { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.chk-sys .ic { color: var(--muted); }
.chk-w { color: var(--muted); }
.chk-r { grid-column: 3; color: var(--fg); overflow-wrap: anywhere; }
.chk li[data-s="run"] .chk-r { color: var(--faint); }
.chk li[data-s="stop"] .chk-r { color: var(--faint); font-style: italic; }
.spin { display: block; width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* Orders didii found, shown inside its question */
.ocards { display: grid; gap: 5px; margin-top: 7px; white-space: normal; }
.ocard { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border-radius: 9px; background: color-mix(in srgb, currentColor 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 10%, transparent); text-align: left; }
.oc-i { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.oc-b { display: grid; min-width: 0; font-size: 12px; line-height: 1.3; }
.oc-b b { font-weight: 600; font-size: 12.5px; }
.oc-b span { opacity: .7; }
.olines { display: grid; gap: 2px; margin-top: 6px; white-space: normal; }
.cursor::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2, start) infinite; }
.typing { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.typing.out { align-self: flex-end; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.delay { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.dbar { display: flex; width: 90px; height: 5px; border-radius: 99px; overflow: hidden; background: var(--sunk); }
.dbar i { display: block; height: 100%; }
.composer { flex: none; border-top: 1px solid var(--line); padding: 10px 14px 12px; display: grid; gap: 8px; background: var(--surface); }
.ai-owns { display: flex; align-items: center; gap: 9px; padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; }
.ai-owns .btn { margin-left: auto; }
.ai-owns.idle { background: var(--sunk); color: var(--muted); }
.comp-box { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface); transition: box-shadow .15s; }
.comp-box:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.comp-box.note { background: color-mix(in srgb, var(--warn-bg) 60%, var(--surface)); }
.comp-box textarea { border: 0; width: 100%; resize: none; background: transparent; padding: 10px 12px 4px; min-height: 52px; outline: none; font-size: 13.5px; line-height: 1.45; display: block; }
.comp-tools { display: flex; align-items: center; gap: 4px; padding: 4px 6px 6px; flex-wrap: wrap; }
.comp-tools .btn.pri { margin-left: auto; }
.suggest-card { border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); padding: 10px 12px; display: grid; gap: 8px; animation: rise .4s var(--ease) both; }
.suggest-card .sc-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.suggest-card .sc-t { font-size: 13px; line-height: 1.5; white-space: pre-line; }
.menu-pop { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-2); display: grid; padding: 4px; }
.menu-pop button { text-align: left; padding: 7px 9px; border-radius: 7px; font-size: 12.5px; }
.menu-pop button:hover { background: var(--hover); }
.case { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.case-b { flex: 1; overflow-y: auto; min-height: 0; padding: 14px; display: grid; gap: 14px; align-content: start; overscroll-behavior: contain; }
.case-sec { display: grid; gap: 10px; min-width: 0; }
.case-sec-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
.case-sec-h .end { margin-left: auto; display: flex; gap: 6px; align-items: center; font-weight: 500; min-width: 0; }
.case-sec-h .nw { white-space: nowrap; }
.guards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.guard {
  border-radius: 11px; border: 1px solid var(--line); background: var(--raised); padding: 9px 10px; display: grid; gap: 3px;
  align-content: start; min-width: 0; transition: border-color .35s, background-color .35s, box-shadow .35s;
}
.guard .gh { display: flex; align-items: center; gap: 7px; min-width: 0; }
.guard .gn { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.guard .gw { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.guard .gq { font-size: 11.5px; color: var(--faint); }
.guard .gs { font-size: 12px; color: var(--fg-2); line-height: 1.4; overflow-wrap: anywhere; }
.gi { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--faint); position: relative; transition: background-color .3s, box-shadow .3s, color .3s; }
.guard[data-s="checking"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); background: var(--surface); }
.guard[data-s="checking"] .gi { box-shadow: none; color: var(--accent); }
.guard[data-s="checking"] .gi::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.guard[data-s="checking"] .gw { color: var(--accent); }
.guard[data-s="pass"] .gi { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.guard[data-s="pass"] .gw { color: var(--accent); }
.gi.drawn svg path { stroke-dasharray: 24; animation: draw .45s var(--ease) both; }
.guard[data-s="stop"] { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad-bg) 50%, var(--surface)); }
.guard[data-s="stop"] .gi { background: var(--bad); color: #fff; box-shadow: none; }
.guard[data-s="stop"] .gw { color: var(--bad); }
.guard[data-s="wait"] { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface)); }
.guard[data-s="wait"] .gi { background: var(--warn); color: #fff; box-shadow: none; }
.guard[data-s="wait"] .gw { color: var(--warn); }
.guard[data-s="unknown"] { border-color: color-mix(in srgb, var(--unk) 40%, var(--line)); background: color-mix(in srgb, var(--unk-bg) 60%, var(--surface)); }
.guard[data-s="unknown"] .gi { background: var(--unk); color: var(--surface); box-shadow: none; }
.guard[data-s="skip"] { background: transparent; border-style: dashed; }
.guard[data-s="skip"] .gs, .guard[data-s="idle"] .gs { color: var(--faint); }
.guard.flash { animation: lit .6s ease-out; }
.now-check { font-size: 12px; color: var(--muted); display: block !important; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.now-check b { color: var(--accent-ink); font-weight: 600; }
.cl { list-style: none; display: grid; }
.cl-step { position: relative; padding: 0 0 16px 28px; display: grid; gap: 4px; min-width: 0; }
.cl-step::before { content: ""; position: absolute; left: 8px; top: 21px; bottom: -1px; width: 2px; border-radius: 2px; background: var(--line); }
.cl-step:last-child { padding-bottom: 2px; }
.cl-step:last-child::before { display: none; }
.cl-step[data-s="done"]::before { background: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cl-step.enter { animation: rise .45s var(--ease) both; }
.cl-node { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); color: var(--on-accent); }
.cl-step[data-s="done"] .cl-node { background: var(--accent); box-shadow: none; }
.cl-step[data-s="now"] .cl-node { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.cl-step[data-s="now"] .cl-node::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse-dot 1.4s ease-in-out infinite; }
.cl-step[data-s="bad"] .cl-node { background: var(--bad); box-shadow: none; color: #fff; }
.cl-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cl-h b { font-size: 13px; font-weight: 600; }
.cl-h .tm { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cl-p { font-size: 12.5px; color: var(--muted); }
.facts { list-style: none; display: grid; gap: 4px; margin-top: 2px; }
.facts li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 7px; font-size: 12.5px; line-height: 1.4; }
.facts .ic { margin-top: 2px; }
.facts .f-check .ic { color: var(--ok); } .facts .f-cross .ic { color: var(--bad); } .facts .f-clock .ic { color: var(--warn); }
.facts .f-q .ic { color: var(--unk); } .facts .f-dot .ic { color: var(--faint); }
.rec { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--sunk); border-radius: 6px; padding: 6px 8px; overflow-wrap: anywhere; margin-top: 4px; }
.cust-card { display: grid; gap: 10px; }
.cust-top { display: flex; align-items: center; gap: 10px; }
.cust-top b { font-size: 14px; font-weight: 600; display: block; }
.cust-top span { font-size: 12px; color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-stats div { border-radius: 9px; background: var(--raised); border: 1px solid var(--line); padding: 8px; display: grid; gap: 1px; }
.mini-stats b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11px; color: var(--muted); }
.order-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); }
.order-row .thumb { width: 34px; height: 34px; border-radius: 8px; flex: none; background: var(--sunk); display: grid; place-items: center; color: var(--muted); }
.sugg { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--raised); display: grid; gap: 6px; transition: border-color .3s, box-shadow .3s; min-width: 0; }
.sugg.latest { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); background: var(--surface); }
.sugg.enter { animation: rise .45s var(--ease) both; }
.sugg .k { font-size: 11px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.sugg b { font-size: 13.5px; font-weight: 600; }
.sugg p { font-size: 12.5px; color: var(--muted); }
.miniguards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mg { border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; font-size: 11.5px; display: grid; gap: 2px; background: var(--surface); transition: border-color .3s; }
.mg b { font-size: 11.5px; display: flex; gap: 5px; align-items: center; font-weight: 600; }
.mg.ok { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mg.ok .ic { color: var(--accent); }
.call-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--paper); }
.call-band { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.call-band .tm { font-variant-numeric: tabular-nums; font-weight: 600; }
.vwave { display: flex; align-items: center; gap: 2px; height: 22px; }
.vwave i { width: 3px; height: 4px; border-radius: 3px; background: var(--accent); opacity: .45; }
.vwave.on i { animation: wave 1.05s var(--ease) infinite; opacity: .9; }
.vwave i:nth-child(2n) { animation-delay: .12s; } .vwave i:nth-child(3n) { animation-delay: .24s; } .vwave i:nth-child(5n) { animation-delay: .36s; }
.tline { display: grid; gap: 3px; max-width: 640px; }
.tline .sp { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tline.agent .sp { color: var(--accent); }
.tline p { font-size: 13.5px; line-height: 1.5; }

/* ---------- The customer's phone (demo layer) ---------- */
.dock {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line);
  background-color: var(--stage); background-image: radial-gradient(var(--stage-dot) 1px, transparent 1.2px); background-size: 16px 16px;
}
.dock-h { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; min-width: 0; }
.sim-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; flex: none;
  background: var(--demo); color: var(--demo-fg); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.sim-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--demo-accent); }
.who-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); margin-left: auto; min-width: 0; }
.who-tabs button { height: 24px; padding: 0 10px 0 4px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; position: relative; white-space: nowrap; }
.who-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1); }
.who-tabs .ping { position: absolute; top: 1px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--stage); animation: pulse-dot 1.2s infinite; }
.dock-b { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 14px 10px; overflow: hidden; }
.device {
  position: relative; height: 100%; max-height: 690px; aspect-ratio: 33 / 69; max-width: 100%; background: var(--device);
  border-radius: 46px; padding: 9px; box-shadow: var(--sh-3), inset 0 0 0 1.5px rgb(255 255 255 / .09); flex: none;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; display: flex; flex-direction: column; background: var(--wa-bg); color: var(--wa-ink); isolation: isolate; }
.island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 30%; max-width: 92px; height: 26px; border-radius: 999px; background: #000; z-index: 5; }
.sbar { flex: none; height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 6px 26px 0 30px; font-size: 13px; font-weight: 600; z-index: 4; font-variant-numeric: tabular-nums; }
.sbar .si { display: flex; gap: 5px; align-items: center; }
.sbar svg { display: block; }
.home-ind { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 34%; height: 4px; border-radius: 99px; background: currentColor; opacity: .75; z-index: 5; }
.wa-h { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; background: var(--wa-head); border-bottom: 1px solid color-mix(in srgb, var(--wa-ink) 9%, transparent); }
.wa-h .back { color: var(--wa-tick); }
.wa-h .t { display: grid; min-width: 0; flex: 1; }
.wa-h b { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-h b .ver { color: var(--wa-tick); flex: none; }
.wa-h span { font-size: 11px; opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-thread {
  flex: 1; min-height: 0; overflow-y: auto; padding: 10px 9px 8px; display: flex; flex-direction: column; gap: 5px; overscroll-behavior: contain;
  background-color: var(--wa-bg); background-image: radial-gradient(color-mix(in srgb, var(--wa-ink) 7%, transparent) 1px, transparent 1.2px); background-size: 15px 15px;
}
.wb { max-width: 86%; padding: 6px 8px 6px 9px; border-radius: 11px; font-size: 13px; line-height: 1.42; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 1px .5px rgb(0 0 0 / .12); position: relative; color: var(--wa-ink); }
.wb.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 4px; }
.wb.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 4px; }
.wb.enter { animation: bubble .35s var(--ease) both; }
.wb .by { display: block; font-size: 11px; font-weight: 600; color: var(--accent); margin-bottom: 1px; }
.wb .wt { float: right; margin: 7px 0 -3px 10px; font-size: 10.5px; opacity: .55; display: inline-flex; gap: 2px; align-items: center; line-height: 1; }
.wb .wt .tk { color: var(--wa-tick); opacity: 1; }
.wb.photo { padding: 4px; }
.wa-sys { align-self: center; font-size: 11px; line-height: 1.35; padding: 4px 9px; border-radius: 8px; text-align: center; max-width: 92%; background: color-mix(in srgb, var(--wa-in) 85%, transparent); color: color-mix(in srgb, var(--wa-ink) 65%, transparent); box-shadow: 0 1px .5px rgb(0 0 0 / .08); }
.wa-typing { align-self: flex-start; background: var(--wa-in); border-radius: 11px; border-top-left-radius: 4px; padding: 9px 11px; box-shadow: 0 1px .5px rgb(0 0 0 / .12); color: color-mix(in srgb, var(--wa-ink) 50%, transparent); }
.qr { flex: none; padding: 8px 9px 4px; display: grid; gap: 6px; background: var(--wa-head); border-top: 1px solid color-mix(in srgb, var(--wa-ink) 9%, transparent); }
.qr-l { font-size: 10.5px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 5px; }
.qr button {
  text-align: left; font-size: 12.5px; line-height: 1.35; padding: 8px 10px; border-radius: 12px; background: var(--wa-in); color: var(--wa-ink);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 1px 2px rgb(0 0 0 / .08); animation: rise .35s var(--ease) both; transition: background-color .15s, transform .1s;
}
.qr button:hover { background: color-mix(in srgb, var(--accent) 9%, var(--wa-in)); }
.qr button:active { transform: scale(.99); }
.qr button.alt { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-ink) 22%, transparent), 0 1px 2px rgb(0 0 0 / .06); }
.qr .tag { display: block; font-size: 10.5px; font-weight: 600; color: var(--accent); margin-bottom: 1px; }
.qr button.alt .tag { color: color-mix(in srgb, var(--wa-ink) 55%, transparent); }
.qr-wait { font-size: 11.5px; color: color-mix(in srgb, var(--wa-ink) 55%, transparent); padding: 2px 2px 4px; display: flex; align-items: center; gap: 6px; }
.wa-input { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px 20px; background: var(--wa-head); }
.wa-input .fld { flex: 1; height: 34px; border-radius: 999px; background: var(--wa-in); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; color: color-mix(in srgb, var(--wa-ink) 42%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-ink) 8%, transparent); }
.wa-input .mic { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.screen.sms { background: var(--surface); }
.sms-h { flex: none; display: grid; justify-items: center; gap: 3px; padding: 2px 12px 10px; border-bottom: 1px solid var(--line); background: var(--raised); }
.sms-h b { font-size: 12px; font-weight: 600; }
.sms-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.sb { max-width: 80%; padding: 7px 11px; border-radius: 17px; font-size: 13px; line-height: 1.42; white-space: pre-line; overflow-wrap: anywhere; color: var(--fg); }
.sb.in { align-self: flex-start; background: var(--sms-in); }
.sb.out { align-self: flex-end; background: var(--sms-out); color: var(--sms-out-fg); }
.sb.enter { animation: bubble .35s var(--ease) both; }
.sb.photo { padding: 4px; border-radius: 14px; }
.sb.photo .photo-art { border-radius: 11px; }
.sb .receipt { color: var(--fg); }
.screen.sms .qr, .screen.sms .wa-input { background: var(--raised); }
.screen.call { background: radial-gradient(130% 70% at 50% 0%, var(--call-a) 0%, var(--call-b) 62%); color: var(--call-fg); }
.call-top { flex: none; text-align: center; padding: 14px 16px 8px; display: grid; gap: 5px; justify-items: center; }
.call-top b { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.call-top span { font-size: 12.5px; color: var(--call-muted); font-variant-numeric: tabular-nums; }
.call-top .vwave i { background: var(--call-fg); }
.captions {
  flex: 1; min-height: 0; overflow-y: auto; padding: 10px 18px; display: flex; flex-direction: column; gap: 10px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px); mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}
.cap { font-size: 13px; line-height: 1.45; color: color-mix(in srgb, var(--call-fg) 82%, transparent); }
.cap .sp { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--call-muted); margin-bottom: 1px; }
.cap.ai .sp { color: #a9b5ff; }
.cap.cust { color: #ffffff; }
.cap.sys { font-size: 11.5px; color: var(--call-muted); text-align: center; }
.cap.enter { animation: rise .35s var(--ease) both; }
.call-qr { flex: none; padding: 6px 14px 2px; display: grid; gap: 6px; }
.call-qr button { text-align: left; font-size: 12.5px; line-height: 1.35; padding: 8px 11px; border-radius: 12px; background: rgb(255 255 255 / .1); color: #fff; box-shadow: inset 0 0 0 1.5px #a9b5ff; animation: rise .35s var(--ease) both; }
.call-qr button.alt { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
.call-qr button:hover { background: rgb(255 255 255 / .16); }
.call-qr .tag { display: block; font-size: 10.5px; font-weight: 600; color: #a9b5ff; margin-bottom: 1px; }
.call-qr .qr-wait { color: var(--call-muted); }
.call-btns { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 10px 30px 26px; justify-items: center; }
.cbtn { width: 50px; height: 50px; border-radius: 50%; background: rgb(255 255 255 / .12); display: grid; place-items: center; color: #fff; }
.cbtn.end { background: #e5484d; }
.cbtn.on { background: #fff; color: #0c0d10; }
.keys-anim { font-family: var(--mono); letter-spacing: .3em; }
.keys-lbl { font-size: .9em; opacity: .7; }
.browser { width: 100%; max-width: 440px; height: 100%; max-height: 690px; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; border: 1px solid var(--line); }
.br-bar { flex: none; height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.br-bar > i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.br-url { flex: 1; height: 22px; border-radius: 6px; background: var(--surface); font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; padding: 0 8px; font-family: var(--mono); min-width: 0; margin-left: 6px; white-space: nowrap; overflow: hidden; }
.site { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--paper); overflow: hidden; }
.site-nav { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; background: var(--surface); flex-wrap: wrap; }
.site-nav b { font-family: var(--serif); font-style: italic; font-size: 18px; font-weight: 400; margin-right: auto; letter-spacing: -0.01em; }
.site-nav .lk { position: relative; padding: 3px 6px; border-radius: 6px; transition: box-shadow .3s, background-color .3s; }
.site-nav .lk.guided { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); color: var(--accent-ink); animation: pulse-ring 1.6s ease-out infinite; }
.site-main { padding: 14px; display: grid; gap: 10px; align-content: start; }
.site-main h4 { font-size: 15px; font-weight: 600; }
.site-card { border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: 10px; display: flex; gap: 10px; align-items: center; font-size: 12px; }
.site-card .thumb { width: 38px; height: 38px; border-radius: 8px; flex: none; }
.guide-pointer { position: absolute; z-index: 4; pointer-events: none; transition: transform .9s var(--ease), opacity .3s; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); }
.guide-label { position: absolute; z-index: 4; font-size: 11px; font-weight: 600; background: var(--accent); color: var(--on-accent); padding: 3px 8px; border-radius: 6px; white-space: nowrap; animation: pop .3s var(--ease) both; }
.widget { position: absolute; right: 10px; bottom: 10px; left: 10px; height: 76%; max-width: 330px; margin-left: auto; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.widget-h { flex: none; padding: 10px 12px; display: flex; align-items: center; gap: 9px; background: var(--fg); color: var(--paper); }
.widget-h .t { display: grid; flex: 1; min-width: 0; }
.widget-h b { font-size: 13px; font-weight: 600; }
.widget-h span { font-size: 11px; opacity: .7; }
.widget .wa-thread { background-image: none; background-color: var(--paper); }
.widget .wb.in { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.widget .wb.out { background: var(--accent); color: var(--on-accent); }
.widget .wb.out .wt { color: var(--on-accent); }
.widget .qr { background: var(--surface); border-top-color: var(--line); }
.mailc { width: 100%; max-width: 440px; height: 100%; max-height: 690px; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; border: 1px solid var(--line); }
.mail-top { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--raised); font-size: 12px; color: var(--muted); }
.mail-h { flex: none; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.mail-h b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.mail-h span { font-size: 11.5px; color: var(--muted); }
.mail-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.em { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.em.own { background: var(--accent-soft); border-color: transparent; }
.em.enter { animation: rise .4s var(--ease) both; }
.em .from { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; white-space: normal; }
.em .from b { color: var(--fg); font-weight: 600; }
.em .sig { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); }
.mailc .qr { background: var(--surface); border-top-color: var(--line); padding-bottom: 10px; }
.screen.lock { background: linear-gradient(165deg, var(--lock-a), var(--lock-b) 75%); color: #fff; }
.lock-time { text-align: center; margin-top: 30px; font-size: 64px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lock-date { text-align: center; font-size: 14px; opacity: .82; margin-top: 6px; }
.notif {
  margin: 20px 10px 0; padding: 11px 12px; border-radius: 18px; background: rgb(250 250 252 / .9); color: #0c0d10; display: grid; gap: 2px; text-align: left;
  box-shadow: 0 10px 30px rgb(0 0 0 / .3); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: drop .55s var(--ease) both; width: calc(100% - 20px);
}
.notif .app { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #5c6170; }
.notif .app .orb { --o: 16px; }
.notif .app .tm { margin-left: auto; font-weight: 500; }
.notif b { font-size: 13px; font-weight: 600; }
.notif span { font-size: 12.5px; line-height: 1.35; }
.lock-hint { margin: 14px auto 0; font-size: 11.5px; opacity: .75; display: flex; align-items: center; gap: 6px; }
.apage { flex: 1; overflow-y: auto; background: var(--surface); color: var(--fg); padding: 12px 14px 24px; display: grid; gap: 10px; align-content: start; }
.apage > .btns { position: sticky; bottom: -24px; padding: 10px 0 22px; background: linear-gradient(to top, var(--surface) 75%, transparent); }
.apage .url { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-family: var(--mono); background: var(--sunk); border-radius: 8px; padding: 6px 8px; }
.apage h4 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.apage .kv { font-size: 12.5px; }
.approved-big { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 26px 8px; }
.approved-big .ok-ring { width: 58px; height: 58px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop .45s var(--ease) both; }
.photo-art { width: 196px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; display: block; }

/* Demo controls, inside the stage under the phone */
.console {
  flex: none; margin: 0 12px 12px; padding: 10px 11px; border-radius: 14px; background: var(--demo); color: var(--demo-fg);
  box-shadow: 0 10px 34px -10px rgb(0 0 0 / .45), inset 0 0 0 1px var(--demo-line); display: grid; gap: 8px; font-size: 12.5px; min-width: 0;
}
.console.ask { box-shadow: 0 10px 34px -10px rgb(0 0 0 / .45), inset 0 0 0 1px var(--demo-accent), 0 0 0 4px color-mix(in srgb, var(--demo-accent) 22%, transparent); animation: console-in .4s var(--ease) both; }
.con-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.con-l { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--demo-muted); white-space: nowrap; }
.con-h .end { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.con-q { font-weight: 600; font-size: 13px; line-height: 1.35; }
.con-q span { display: block; font-weight: 400; font-size: 12px; color: var(--demo-muted); margin-top: 2px; }
.con-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.con-opts.one { grid-template-columns: minmax(0, 1fr); }
.con-btn {
  min-height: 30px; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--demo-fg); background: var(--demo-2);
  box-shadow: inset 0 0 0 1px var(--demo-line); text-align: left; display: grid; gap: 1px; transition: background-color .15s, box-shadow .15s; line-height: 1.3;
}
.con-btn:hover { background: var(--demo-3); box-shadow: inset 0 0 0 1px var(--demo-muted); }
.con-btn small { font-size: 11px; color: var(--demo-muted); font-weight: 400; }
.con-btn.pri { background: var(--demo-fg); color: var(--demo); box-shadow: none; }
.con-btn.pri small { color: #4a4f5c; }
.con-btn.pri:hover { background: #fff; }
.con-icon { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--demo-muted); }
.con-icon:hover, .con-icon[aria-pressed="true"] { background: var(--demo-3); color: var(--demo-fg); }
.con-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.con-chan { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--demo-2); box-shadow: inset 0 0 0 1px var(--demo-line); }
.con-sel { position: relative; display: inline-flex; align-items: center; }
.con-sel select {
  appearance: none; -webkit-appearance: none; height: 28px; padding: 0 26px 0 9px; border-radius: 8px; border: 0; background: var(--demo-2); color: var(--demo-fg);
  box-shadow: inset 0 0 0 1px var(--demo-line); font-size: 12px; font-weight: 500; cursor: pointer; color-scheme: dark;
}
.con-sel .ic { position: absolute; right: 7px; pointer-events: none; color: var(--demo-muted); }
.con-note { font-size: 11.5px; color: var(--demo-muted); line-height: 1.4; }
.nudge {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 26;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--demo); color: var(--demo-fg);
  box-shadow: 0 12px 40px -8px rgb(0 0 0 / .45), inset 0 0 0 1px var(--demo-accent); animation: console-in .45s var(--ease) both; max-width: calc(100% - 32px); font-size: 12.5px;
}

/* ---------- Home and operations ---------- */
.att { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.att:last-child { border-bottom: 0; }
.att .t { font-weight: 600; font-size: 13px; }
.att .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.team-row .t { font-size: 13px; font-weight: 500; }
.team-row .d { font-size: 11.5px; color: var(--muted); }
.team-row .load { margin-left: auto; width: 70px; }
.ap-card { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: grid; gap: 6px; background: var(--raised); min-width: 0; }
.ap-card.live { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }
.ap-card.enter { animation: rise .45s var(--ease) both; }
.ap-card .t { font-weight: 600; font-size: 13px; }
.ap-card .d { font-size: 12px; color: var(--muted); }
.ap-item { width: 100%; text-align: left; display: grid; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--line); transition: background-color .15s; }
.ap-item:hover { background: var(--raised); }
.ap-item[aria-current="true"] { background: var(--accent-soft); }
.ap-item .t { font-weight: 600; font-size: 13.5px; }
.ap-item .d { font-size: 12px; color: var(--muted); }
.ap-stage { border-radius: var(--r-lg); background-color: var(--stage); background-image: radial-gradient(var(--stage-dot) 1px, transparent 1.2px); background-size: 16px 16px; border: 1px solid var(--line); display: grid; gap: 10px; justify-items: center; padding: 16px 12px; }
.ap-stage .device { height: 560px; max-height: none; }
.safe { list-style: none; display: grid; gap: 8px; }
.safe li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; font-size: 12.5px; color: var(--fg-2); }
.safe .ic { color: var(--accent); margin-top: 1px; }

/* ---------- Discover and improvements ---------- */
.src-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 4px; border-radius: 12px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); max-width: 560px; }
.src-switch button { display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 9px; transition: background-color .2s, box-shadow .2s, color .2s; color: var(--muted); }
.src-switch button b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.src-switch button span { font-size: 11.5px; }
.src-switch button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line); }
.src-switch button[aria-pressed="true"] span { color: var(--muted); }
.pat-share { display: grid; grid-template-columns: minmax(70px, 1fr) 42px; gap: 8px; align-items: center; font-size: 12px; }
.pat-share .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.said { color: var(--fg-2); }
.real { color: var(--fg); }
.real b { color: var(--warn); font-weight: 600; }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 4px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.col-h .count { margin-left: auto; }
.col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.imp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 9px; box-shadow: var(--sh-1); min-width: 0; }
.imp-card.enter { animation: rise .5s var(--ease) both; }
.imp-card .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.imp-card .d { font-size: 12px; color: var(--muted); }
.ba { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 6px 8px; align-items: center; font-size: 11.5px; }
.ba .lab { color: var(--muted); }
.ba .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Studio ---------- */
.studio { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0; height: 100%; min-height: 0; }
.studio-nav { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 2px; align-content: start; background: var(--paper); overflow-y: auto; }
.studio-nav .nav-i { font-size: 13px; }
.studio-body { overflow-y: auto; min-height: 0; }
.procs { display: grid; gap: 6px; }
.proc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; text-align: left; border-radius: 11px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; width: 100%; }
.proc:hover { border-color: var(--line-2); }
.proc[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.proc b { font-size: 13px; font-weight: 600; }
.proc .sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.steps { list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--muted); }
.steps .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; position: relative; }
.rung { display: grid; gap: 3px; align-content: start; text-align: left; border-radius: 11px; border: 1px solid var(--line); background: var(--raised); padding: 10px; min-width: 0; position: relative; }
.rung b { font-size: 13px; font-weight: 600; }
.rung span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.rung.past { background: var(--surface); }
.rung.past b::before { content: "✓ "; color: var(--accent); }
.rung.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.rung.on span { color: var(--accent-ink); }
.gate { list-style: none; display: grid; gap: 7px; }
.gate li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 13px; }
.gate .ic { margin-top: 1px; color: var(--accent); }
.gate .ic.pend { color: var(--faint); }
.rules { list-style: none; display: grid; }
.rules li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px 10px; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: start; border-radius: 8px; transition: background-color .3s; }
.rules li:last-child { border-bottom: 0; }
.rules .rn { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 1px; }
.rules li.hit { background: var(--accent-soft); }
.verdict { border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; transition: background-color .3s, color .3s; }
.verdict b { font-size: 15px; font-weight: 600; }
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.track > div { border-radius: 10px; padding: 9px 10px; background: var(--sunk); font-size: 12.5px; display: grid; gap: 2px; transition: background-color .4s, color .4s; }
.track > div b { font-weight: 600; }
.track > div.on { background: var(--fg); color: var(--paper); }
.track > div.bad { background: var(--bad-bg); color: var(--bad); }
.switchrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switchrow:last-child { border-bottom: 0; }
.switchrow b { font-size: 13px; font-weight: 600; }
.switchrow p { font-size: 12.5px; color: var(--muted); grid-column: 1; }
.test-list { list-style: none; display: grid; }
.test-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.test-list li.enter { animation: rise .35s var(--ease) both; }
.test-list li:last-child { border-bottom: 0; }

/* ---------- Connections and setup ---------- */
.conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.conn { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; box-shadow: var(--sh-1); align-content: start; min-width: 0; }
.conn .hd { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.conn .tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sunk); color: var(--fg-2); flex: none; }
.conn .hd b { font-size: 13.5px; font-weight: 600; display: block; }
.conn .hd .grow > span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; display: block; }
.conn .hd .pill { flex: none; margin-top: 2px; }
.conn ul { list-style: none; display: grid; gap: 5px; }
.conn li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 7px; font-size: 12px; color: var(--fg-2); }
.conn li .ic { margin-top: 2px; color: var(--ok); }
.conn li.no .ic { color: var(--faint); }
.hero-card { border-radius: 16px; padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--fg); color: var(--paper); }
.hero-card h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.hero-card h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero-card p { font-size: 13px; opacity: .72; margin-top: 4px; max-width: 60ch; }
.hero-card .btn { margin-left: auto; background: var(--paper); color: var(--fg); box-shadow: none; }
.setup { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; height: 100%; }
.setup-rail { border-right: 1px solid var(--line); padding: 20px 14px; overflow-y: auto; background: var(--paper); display: grid; gap: 14px; align-content: start; }
.day { list-style: none; display: grid; }
.day li { position: relative; }
.day button { width: 100%; display: grid; grid-template-columns: 44px 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 8px; border-radius: 9px; text-align: left; transition: background-color .15s; }
.day button:hover { background: var(--hover); }
.day button[aria-current="step"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.day .tm { font-size: 12px; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.day .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--on-accent); margin-top: 1px; transition: background-color .3s, box-shadow .3s; }
.day .done .dot { background: var(--accent); box-shadow: none; }
.day .tt { font-weight: 500; font-size: 13px; }
.day li:not(:last-child)::after { content: ""; position: absolute; left: 69px; top: 30px; bottom: -6px; width: 2px; background: var(--line); }
.day li.done:not(:last-child)::after { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.setup-body { overflow-y: auto; min-height: 0; }
.setup-in { max-width: 760px; padding: 28px 28px 60px; display: grid; gap: 16px; }
.setup-in > .chip, .setup-in > .btns { justify-self: start; }
.setup-in > h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.sys-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sys { display: grid; gap: 6px; border-radius: 12px; padding: 12px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; transition: border-color .15s, box-shadow .15s; }
.sys[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.sys b { font-size: 14px; font-weight: 600; }
.sys span { font-size: 12.5px; color: var(--muted); }
.sys-pick.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Setup fills the screen, under the demo bar */
.app.bare { grid-template-columns: minmax(0, 1fr); }
.app.bare > .setup { min-height: 0; }
.setup-rail .rail-note { margin-top: 2px; }
.ob-q { font-size: 14px; font-weight: 600; margin-top: 4px; }
.ob-effect { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.ob-effect .ic { margin-top: 1px; flex: none; }
button.rung.pick { cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
button.rung.pick:hover { border-color: var(--line-2); }
button.rung.pick .chip { justify-self: start; margin-top: 4px; }
.rung.off { opacity: .55; }
.facts.drafting li { animation: rise .3s var(--ease) both; }
.code { font-family: var(--mono); font-size: 12px; background: var(--sunk); border-radius: 8px; padding: 10px 11px; overflow-x: auto; white-space: pre; }
.prog { display: grid; grid-template-columns: minmax(0, 1fr) 140px 64px; gap: 8px 12px; align-items: center; font-size: 13px; }
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cmp > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--raised); font-size: 12.5px; display: grid; gap: 4px; }
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--sunk); gap: 2px; }
.stackbar i { display: block; height: 100%; animation: grow-x .9s var(--ease) both; transform-origin: 0 50%; }

/* ---------- Overlays ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; animation: fade .2s ease-out both; }
.scrim.soft { background: color-mix(in srgb, var(--scrim) 60%, transparent); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--surface); z-index: 61; border-left: 1px solid var(--line);
  box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: slide-l .32s var(--ease) both;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.drawer-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 18px; letter-spacing: -0.02em; }
.drawer-b { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.modal-wrap { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal {
  width: min(560px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--sh-3); border: 1px solid var(--line);
  animation: pop .35s var(--ease) both; position: relative; overflow: hidden;
}
.modal.wide { width: min(720px, 100%); }
.modal.full { width: min(1180px, 100%); height: min(780px, calc(100% - 8px)); display: flex; flex-direction: column; }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.welcome { padding: 30px 30px 24px; display: grid; gap: 18px; }
.welcome .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.welcome h2 { font-size: 34px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.04; }
.welcome h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.02em; }
.welcome .lead { font-size: 15px; color: var(--fg-2); line-height: 1.5; max-width: 52ch; }
.biz-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.biz-opt { display: flex; gap: 10px; align-items: center; text-align: left; border-radius: 12px; padding: 10px 12px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.biz-opt:hover { border-color: var(--line-2); }
.biz-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.biz-opt b { font-size: 13.5px; font-weight: 600; display: block; color: var(--fg); }
.biz-opt span { font-size: 12px; color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); line-height: 1.5; }
.finish-steps { list-style: none; display: grid; gap: 8px; }
.finish-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.finish-steps .ic { color: var(--accent); margin-top: 2px; }
.pop {
  position: fixed; z-index: 64; min-width: 240px; max-width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; display: grid; gap: 2px; animation: pop .18s var(--ease) both; max-height: calc(100vh - 80px); overflow-y: auto;
}
.pop-h { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 8px 9px 4px; }
.pop-i { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; font-size: 13px; text-align: left; width: 100%; min-width: 0; }
.pop-i:hover { background: var(--hover); }
.pop-i .d { display: block; font-size: 11.5px; color: var(--muted); }
.pop-i .ck { margin-left: auto; color: var(--accent); }
.pop-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.pop .seg { margin: 2px 9px 6px; }
.notif-i { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 9px; border-radius: 8px; text-align: left; width: 100%; }
.notif-i:hover { background: var(--hover); }
.notif-i b { font-size: 12.5px; font-weight: 600; display: block; }
.notif-i span { font-size: 12px; color: var(--muted); }
.palette { position: fixed; z-index: 63; top: 12vh; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 24px)); background: var(--surface); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--sh-3); overflow: hidden; animation: pop .2s var(--ease) both; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 50px; border: 0; background: transparent; font-size: 15px; outline: none; min-width: 0; }
.palette-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 6px; }
.pal-g { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 8px 10px 4px; }
.pal-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; text-align: left; }
.pal-i[aria-selected="true"] { background: var(--hover); }
.pal-i .ic { color: var(--muted); }
.pal-i .end { margin-left: auto; font-size: 12px; color: var(--faint); }
.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 70; display: grid; gap: 8px; width: min(336px, calc(100% - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 10px 10px 11px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: toast-in .4s var(--ease) both; font-size: 12.5px;
}
.toast.out { animation: toast-out .3s ease-in both; }
.ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); flex: none; }
.ti.ok { background: var(--ok-bg); color: var(--ok); }
.ti.ask { background: var(--ask-bg); color: var(--ask); }
.ti.wait { background: var(--warn-bg); color: var(--warn); }
.ti.bad { background: var(--bad-bg); color: var(--bad); }
.toast b { font-weight: 600; display: block; font-size: 13px; }
.toast span { color: var(--muted); line-height: 1.4; }

/* ---------- Guided tour ---------- */
.tour-ring { position: fixed; z-index: 55; pointer-events: none; border-radius: 12px; transition: top .35s var(--ease), left .35s var(--ease), width .35s var(--ease), height .35s var(--ease), opacity .25s; animation: breathe 2.2s ease-in-out infinite; }
.tour-card {
  position: fixed; z-index: 56; width: min(340px, calc(100% - 24px)); background: var(--demo); color: var(--demo-fg); border-radius: 16px; padding: 14px 14px 12px;
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / .55), inset 0 0 0 1px var(--demo-line); display: grid; gap: 10px;
  transition: top .4s var(--ease), left .4s var(--ease); animation: pop .35s var(--ease) both;
}
.tour-card .th { display: flex; align-items: center; gap: 8px; }
.tour-card .step { font-size: 11px; font-weight: 600; color: var(--demo-muted); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.tour-card .x { margin-left: auto; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--demo-muted); }
.tour-card .x:hover { background: var(--demo-3); color: var(--demo-fg); }
.tour-card h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tour-card p { font-size: 13px; line-height: 1.5; color: color-mix(in srgb, var(--demo-fg) 84%, transparent); }
.tour-card p b { color: var(--demo-fg); font-weight: 600; }
.tour-card .tf { display: flex; align-items: center; gap: 8px; }
.tour-card .pips { display: flex; gap: 4px; }
.tour-card .pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--demo-3); transition: background-color .3s, width .3s; }
.tour-card .pips i.on { background: var(--demo-accent); width: 14px; border-radius: 99px; }
.tour-card .pips i.done { background: var(--demo-muted); }
.tour-card .acts { margin-left: auto; display: flex; gap: 6px; }
.t-btn { height: 28px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--demo-fg); background: var(--demo-2); box-shadow: inset 0 0 0 1px var(--demo-line); white-space: nowrap; transition: background-color .15s; }
.t-btn:hover { background: var(--demo-3); }
.t-btn.pri { background: var(--demo-accent); color: #0b0c10; box-shadow: none; font-weight: 600; }
.t-btn.pri:hover { background: #aab6ff; }
.t-btn[disabled] { opacity: .4; pointer-events: none; }
.tour-wait { font-size: 12px; color: var(--demo-muted); display: flex; align-items: center; gap: 6px; }

/* ---------- Helpdesk bridge illustration ---------- */
.inbox.bridge .ib-list, .inbox.bridge .ib-list-h { background: var(--sunk); }
.inbox.bridge .conv-h { background: var(--raised); }
.inbox.bridge .case .tabs { background: var(--accent-soft); }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
.mob-tabs { display: none; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes bubble { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes slide-l { from { opacity: 0; transform: translateX(28px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes console-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 10px transparent; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .35; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 20px; } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes arrive { 0% { opacity: 0; transform: translateY(-10px); background: var(--accent-soft); } 60% { opacity: 1; transform: none; background: var(--accent-soft); } }
@keyframes flash-bg { from { background: var(--accent-soft); } }
@keyframes lit { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px var(--demo-accent), 0 0 0 7px color-mix(in srgb, var(--demo-accent) 22%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--demo-accent), 0 0 0 13px color-mix(in srgb, var(--demo-accent) 8%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1440px) {
  .inbox.with-dock { grid-template-columns: 380px minmax(0, 1fr) 340px; }
}
@media (max-width: 1280px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr) 340px; }
  .inbox.with-dock { grid-template-columns: 360px minmax(0, 1fr) 320px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presence span { display: none; }
}
@media (max-width: 1180px) {
  .inbox, .inbox.with-dock { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox.with-dock { grid-template-columns: 360px minmax(0, 1fr); }
  .inbox > .case { display: none; }
  .inbox .conv { border-right: 0; }
  .conv-tabs { display: flex !important; }
  .g-main, .g-main.wide-side, .g-side-l { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(4, minmax(230px, 1fr)); }
}
@media (max-width: 1024px) {
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .studio-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; gap: 4px; }
  .studio-nav .nav-label { display: none; }
  .setup { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .setup-rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 10px; }
  .day { display: flex; gap: 4px; overflow-x: auto; }
  .day li::after { display: none; }
  .day button { grid-template-columns: 20px auto; white-space: nowrap; }
  .day .tm { display: none; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock { display: none; }
}
@media (max-width: 860px) {
  .demobar .db-note { display: none; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpis.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.compact .kpi .s { display: none; }
  .presence { display: none; }
  .inbox, .inbox.with-dock { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .inbox > .ib-list, .inbox > .dock, .inbox > .conv { display: none; }
  .inbox[data-pane="list"] > .ib-list, .inbox[data-pane="customer"] > .dock, .inbox[data-pane="conv"] > .conv { display: flex; }
  .mob-tabs { display: flex; }
  .page { padding: 16px 16px 90px; }
  .ap-stage .device { height: 520px; }
  .cmp, .sys-pick, .sys-pick.three, .biz-pick { grid-template-columns: minmax(0, 1fr); }
  .chk li { grid-template-columns: 16px minmax(0, 1fr); }
  .chk-w { grid-column: 2; }
  .chk-r { grid-column: 2; }
  .prog { grid-template-columns: minmax(0, 1fr) 90px; }
  .prog .num { display: none; }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app, .app.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: none; border-top: 1px solid var(--line); background: var(--side);
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; font-size: 10.5px; font-weight: 500; color: var(--muted); position: relative; }
  .tabbar [aria-current="page"] { color: var(--fg); }
  .tabbar .nav-n.hot { position: absolute; top: 3px; left: calc(50% + 6px); transform: scale(.85); }
  .main { min-height: 0; }
  .topbar { padding-left: max(14px, env(safe-area-inset-left, 0px)); height: 50px; }
  .top-sub { display: none; }
  .welcome { padding: 24px 18px 18px; }
  .welcome h2 { font-size: 28px; }
  .demobar .lg-only { display: none; }
  .demobar .sm-only { display: inline; }
  .toasts { bottom: auto; top: calc(var(--bar-h) + 56px + env(safe-area-inset-top, 0px)); }
  .modal.full { height: calc(100% - 8px); }
  .board { grid-template-columns: repeat(4, minmax(250px, 1fr)); }
}
@media (max-width: 420px) {
  .demobar { gap: 8px; }
  .db-cta { padding: 0 10px; }
}
