/* /classic (release 5d): the retirement banner. */
.classic-banner{position:sticky;top:0;z-index:1000;padding:10px 16px;background:#FFF1C7;color:#5C4300;font:600 14px/1.4 "ARR Sans",system-ui,sans-serif;text-align:center}
.classic-banner a{color:#6B016E}

@font-face {
  font-family: "ARR Sans";
  src: url("./assets/arr-sans-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #19161b;
  --muted: #5f5862;
  --line: #ded7de;
  --paper: #fffdf8;
  --white: #ffffff;
  --surface-soft: #f8f4f7;
  --surface-plum: #f4eaf2;
  --plum: #3a0140;
  --plum-2: #6b016e;
  --gold: #fabd06;
  --gold-soft: #fff4c4;
  --control-border: #766a75;
  --green: #1d6b4a;
  --green-soft: #e6f4ed;
  --amber: #704000;
  --amber-soft: #fff2dd;
  --red: #a62f3b;
  --red-soft: #fee8e9;
  --focus-dark: #3a0140;
  --dark-plum: #231721;
  --dark-plum-deep: #17071d;
  --rail-text: #e7dde5;
  --rail-muted: #b9a9b6;
  --line-strong: #c9bcc6;
  --success-line: #bcdcca;
  --success-bright: #63d6a6;
  --text-on-dark-muted: #dfd3dc;
  --bitrix-blue: #33aee5;
  --genie-light: #f8d7c3;
  --genie-mid: #9d3b88;
  --radius: 22px;
  --radius-control: 12px;
  --shadow: 0 20px 60px rgba(58, 1, 64, .08);
  --shadow-panel: 0 12px 36px rgba(58, 1, 64, .05);
  font-family: "ARR Sans", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.op-icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op-icon use[href="#op-overview"] { fill: currentColor; stroke: none; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); }
body { font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-dark); }
.side-rail :focus-visible { outline-color: var(--white); box-shadow: 0 0 0 6px var(--gold); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: .5rem; left: -1000px; z-index: 99; padding: .75rem 1rem; border-radius: 12px; background: var(--white); }
.skip-link:focus { left: .5rem; }

.access-gate { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; padding: 32px; text-align: center; background: radial-gradient(circle at 50% 20%, var(--surface-plum), var(--paper) 46%); }
.access-gate .access-logo { width: min(300px, 78vw); height: auto; margin-bottom: 8px; object-fit: contain; }
.access-gate h1 { max-width: 720px; margin: 0; }
.access-gate > p { max-width: 650px; margin: 0; color: var(--muted); }
.access-gate .eyebrow { color: var(--plum-2); }
.access-gate .secondary-button { margin-top: 10px; padding-inline: 22px; }
.access-note { margin-top: 10px !important; font-size: .8125rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.side-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; color: var(--paper); background: linear-gradient(180deg, var(--plum) 0%, var(--dark-plum) 58%, var(--dark-plum-deep) 100%); z-index: 20; }
.rail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#workspace-nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.brand { min-width: 0; flex: 1 1 auto; display: flex; align-items: flex-start; flex-direction: column; gap: 3px; padding: 8px 10px 10px; border-radius: 15px; background: var(--paper); color: var(--plum); text-decoration: none; }
.brand-logo { width: min(100%, 174px); height: auto; display: block; object-fit: contain; }
.brand-product { padding-left: 2px; color: var(--plum-2); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.nav-label { margin: 22px 12px 8px; color: var(--rail-muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 13px; color: var(--rail-text); text-decoration: none; font-size: .88rem; font-weight: 650; }
.nav-button { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.nav-item + .nav-item { margin-top: 4px; }
.nav-item > .op-icon { color: var(--rail-muted); }
.nav-demo-label { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(250,189,6,.45); border-radius: 999px; color: var(--gold); font-size: .62rem; font-weight: 900; letter-spacing: .05em; }
.nav-item b { margin-left: auto; min-width: 23px; padding: 2px 7px; border-radius: 999px; background: var(--gold); color: var(--plum); text-align: center; font-size: .68rem; }
.nav-item:hover, .nav-item.is-active { background: rgba(255,255,255,.1); color: var(--white); }
.nav-item.is-active > .op-icon { color: var(--gold); }
.rail-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 10px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.rail-foot strong, .rail-foot small { display: block; }
.rail-foot strong { font-size: .75rem; }
.rail-foot small { color: var(--rail-muted); font-size: .68rem; }
.safe-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--success-bright); box-shadow: 0 0 0 5px rgba(99,214,166,.12); }
.nav-close { display: none; flex: 0 0 auto; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: var(--white); }
.nav-scrim { display: none; position: fixed; inset: 0; z-index: 19; width: 100%; height: 100%; min-height: 100%; border: 0; background: rgba(31,18,29,.55); }

.workspace { min-width: 0; }
.topbar { min-height: 78px; display: flex; align-items: center; gap: 14px; padding: 14px clamp(18px, 3vw, 42px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 15; }
.topbar-kicker, .topbar-title { margin: 0; }
.topbar-kicker { color: var(--muted); font-size: .72rem; }
.topbar-title { font-size: .95rem; font-weight: 780; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mobile-brand { display: none; min-height: 44px; align-items: center; gap: 6px; color: var(--plum); text-decoration: none; white-space: nowrap; }
.mobile-brand .mobile-brand-mark { width: 48px; height: auto; display: block; object-fit: contain; flex: 0 0 auto; }
.mobile-brand span { font-size: .75rem; font-weight: 750; }
.prototype-badge { margin-left: auto; min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-plum); color: var(--plum-2); font-size: .75rem; font-weight: 900; letter-spacing: .03em; }
.prototype-badge + .topbar-actions { margin-left: 0; }
.icon-button, .search-button, .secondary-button { border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.avatar-button { border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: default; }
.icon-button { width: 46px; padding: 0; border-radius: 14px; position: relative; }
.notification-button span { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 999px; background: var(--red); color: var(--white); font-size: .62rem; font-weight: 900; }
.search-button { min-width: 240px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-radius: 13px; color: var(--muted); text-align: left; }
.search-button kbd { margin-left: auto; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--paper); font-size: .68rem; }
.avatar-button { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 15px; }
.avatar-button > span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--plum); color: var(--white); font-weight: 800; }
.avatar-copy { text-align: left; }
.avatar-copy strong, .avatar-copy small { display: block; }
.avatar-copy strong { font-size: .76rem; }
.avatar-copy small { color: var(--muted); font-size: .67rem; }
.menu-button { display: none; }

main { max-width: 1580px; margin: 0 auto; padding: clamp(24px, 3vw, 44px); }
main > section, main > [id] { scroll-margin-top: 96px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 7px; color: var(--plum-2); font-size: .68rem; line-height: 1.2; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 10px; font-family: "ARR Sans", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 3.5vw, 3.45rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 720; }
h2 { margin-bottom: 0; font-size: clamp(1.12rem, 2vw, 1.48rem); letter-spacing: -.025em; }
.hero-copy { max-width: 730px; margin-bottom: 0; color: var(--muted); font-size: clamp(.93rem, 1.35vw, 1.06rem); }
.hero-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.mode-pill, .live-chip, .owner-only { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .72rem; font-weight: 800; }
.mode-pill i, .live-chip i { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.secondary-button { padding: 0 15px; border-radius: 12px; font-weight: 750; border-color: var(--plum-2); color: var(--plum-2); }
.status-banner { display: flex; align-items: center; gap: 9px; min-height: 48px; margin-bottom: 18px; padding: 10px 14px; border: 1px solid var(--success-line); border-radius: 15px; background: var(--green-soft); color: var(--green); font-size: .78rem; }
.status-banner > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--green); color: var(--white); font-weight: 900; }
.status-banner > span:first-child .op-icon { width: 15px; height: 15px; }

.access-summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line-strong); border-left: 4px solid var(--plum-2); border-radius: 6px var(--radius) var(--radius) 6px; background: var(--white); box-shadow: var(--shadow-panel); }
.access-summary h2 { margin: 0; }
.access-summary p:last-child { max-width: 820px; margin: 5px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.access-policies { max-width: 440px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.policy-chip { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: var(--surface-plum); color: var(--plum-2); font-size: .75rem; font-weight: 800; line-height: 1.25; }
.policy-chip .op-icon { width: 16px; height: 16px; }
.policy-chip.policy-muted { background: var(--surface-plum); color: var(--plum); }

.pulse-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.pulse-card { min-height: 164px; display: grid; grid-template-columns: auto 1fr; gap: 13px; align-content: start; position: relative; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-panel); }
.pulse-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -45px; bottom: -60px; border-radius: 999px; background: var(--surface-plum); }
.pulse-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-plum); color: var(--plum); font-weight: 900; }
.pulse-icon .op-icon { width: 19px; height: 19px; }
.pulse-card small, .pulse-card strong, .pulse-card p { display: block; }
.pulse-card small { color: var(--muted); font-size: .72rem; }
.pulse-card strong { margin-top: 2px; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.04em; }
.pulse-card p { margin: 4px 0 12px; color: var(--muted); font-size: .72rem; }
.pulse-plum { border-color: transparent; background: linear-gradient(145deg, var(--plum), var(--plum-2)); color: var(--white); box-shadow: 0 18px 42px rgba(58,1,64,.22); }
.pulse-plum .pulse-icon { background: rgba(255,255,255,.14); color: var(--white); }
.pulse-plum small, .pulse-plum p { color: var(--text-on-dark-muted); }
.trend { grid-column: 1 / -1; justify-self: start; border-radius: 999px; padding: 4px 8px; font-size: .64rem; font-weight: 800; }
.trend.urgent { background: rgba(255,255,255,.14); color: var(--white); }
.trend.positive { background: var(--green-soft); color: var(--green); }
.trend.neutral { background: var(--amber-soft); color: var(--amber); }
.trend-action { min-height: 44px; border: 1px solid rgba(255,255,255,.25); cursor: pointer; }

.outcome-strip { display: grid; grid-template-columns: minmax(230px,.72fr) minmax(0,2fr); gap: 18px; align-items: stretch; margin-bottom: 18px; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(115deg,var(--dark-plum) 0 28%,var(--plum) 28% 29%,var(--white) 29%); box-shadow: var(--shadow); }
.outcome-head { align-self: center; padding: 4px 8px; color: var(--white); }
.outcome-head .eyebrow { color: var(--gold); }
.outcome-head h2 { max-width: 260px; }
.outcome-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.outcome-metrics article { min-width: 0; padding: 13px; border-left: 3px solid var(--line-strong); border-radius: 4px 13px 13px 4px; background: var(--surface-soft); }
.outcome-metrics small,.outcome-metrics strong,.outcome-metrics span { display: block; }
.outcome-metrics small { color: var(--muted); }
.outcome-metrics strong { margin-top: 5px; color: var(--plum); font-family: Georgia,serif; font-size: 1.4rem; }
.outcome-metrics span { margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.35; }

.panel { padding: clamp(18px, 2.2vw, 26px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-panel); }
.panel + .panel, .panel + section, section + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.attention-panel .panel-head { align-items: flex-start; flex-direction: column; }
.attention-panel .panel-tools { width: 100%; justify-content: flex-start; }
.work-filters { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.work-filters button { min-height: 44px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .75rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.work-filters button.is-selected { background: var(--plum); color: var(--white); box-shadow: 0 3px 10px rgba(58,1,64,.18); }
.panel-head a { color: var(--plum-2); font-size: .76rem; font-weight: 800; }
.text-button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--white); color: var(--plum-2); font-weight: 800; cursor: pointer; }
.segmented { display: flex; padding: 3px; border-radius: 11px; background: var(--paper); }
.segmented button { min-height: 44px; border: 0; border-radius: 8px; padding: 0 13px; background: transparent; color: var(--muted); font-size: .7rem; font-weight: 750; cursor: pointer; }
.segmented button.is-selected { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(57,34,54,.08); }
.pipeline { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; align-items: end; }
.pipeline article { min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; padding: 14px 12px; border-radius: 16px; background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-plum) 100%); }
.pipeline article::before { content: ""; position: absolute; inset: auto 0 0; height: 0; background: linear-gradient(180deg, rgba(114,32,95,.05), rgba(114,32,95,.13)); transition: height .18s ease; }
.pipeline article.fill-1::before { height: 20%; }
.pipeline article.fill-2::before { height: 40%; }
.pipeline article.fill-3::before { height: 60%; }
.pipeline article.fill-4::before { height: 80%; }
.pipeline article.fill-5::before { height: 100%; }
.pipeline article > * { position: relative; z-index: 1; }
.pipeline span { font-family: Georgia, serif; color: var(--plum); font-size: 1.85rem; font-weight: 700; }
.pipeline strong { min-height: 36px; font-size: .76rem; line-height: 1.2; }
.pipeline small { margin-top: 5px; color: var(--muted); font-size: .62rem; line-height: 1.25; }
.command-chat-page { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-panel); }
.command-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 26px 21px; background: linear-gradient(118deg,var(--dark-plum),var(--plum)); color: var(--white); }
.command-chat-head .eyebrow { color: var(--gold); }
.command-chat-head h2 { margin: 0; font-size: clamp(1.35rem,2.2vw,1.9rem); }
.command-chat-head p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--text-on-dark-muted); font-size: .875rem; line-height: 1.5; }
.command-chat-mode { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 0 11px; border: 1px solid rgba(250,189,6,.52); border-radius: 999px; background: rgba(250,189,6,.12); color: var(--gold); font-size: .75rem; font-weight: 900; white-space: nowrap; }
.command-chat-mode .op-icon { width: 16px; height: 16px; }
.command-chat-safety { display: flex; align-items: center; gap: 12px; padding: 12px 26px; border-bottom: 1px solid var(--line); background: var(--gold-soft); color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.command-chat-safety strong { flex: 0 0 auto; color: var(--plum); }
.command-chat-layout { display: grid; grid-template-columns: minmax(310px,.75fr) minmax(520px,1.25fr); min-width: 0; }
.command-thread { min-width: 0; padding: 24px 24px 26px; border-right: 1px solid var(--line); background: linear-gradient(165deg,var(--surface-soft),var(--white) 56%); }
.command-section-title h3,.command-progress-head h3 { margin: 0; font-size: 1rem; }
.command-messages { display: grid; gap: 18px; margin: 22px 0 26px; padding: 0; list-style: none; }
.command-message { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: start; }
.command-message.is-owner { padding-left: 28px; }
.command-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: var(--plum); color: var(--white); font-size: .72rem; font-weight: 900; }
.command-message.is-planner .command-avatar { background: var(--gold); color: var(--plum); }
.command-message small { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; }
.command-message p { margin: 5px 0 0; padding: 11px 13px; border-left: 3px solid var(--line-strong); border-radius: 3px 13px 13px 3px; background: var(--white); font-size: .8125rem; line-height: 1.5; }
.command-message.is-planner p { border-left-color: var(--gold); background: var(--gold-soft); }
.command-composer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.command-composer > label { display: block; margin-bottom: 7px; color: var(--plum); font-size: .8125rem; font-weight: 850; }
.command-composer textarea { width: 100%; min-height: 100px; padding: 11px 12px; resize: none; border: 1px solid var(--control-border); border-radius: 13px; background: #f0ecef; color: var(--muted); opacity: 1; line-height: 1.45; }
.command-composer > div { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.command-composer > div span { margin-right: auto; color: var(--muted); font-size: .7rem; }
.command-composer .primary-button { width: auto; min-width: 112px; margin: 0; }
.command-workstream { min-width: 0; padding: 24px 26px 26px; }
.command-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.command-progress-head > strong { color: var(--plum); font-size: 1.5rem; letter-spacing: -.04em; }
.command-progress { width: 100%; height: 8px; display: block; margin: 12px 0 6px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-plum); accent-color: var(--plum-2); }
.command-progress::-webkit-progress-bar { background: var(--surface-plum); }
.command-progress::-webkit-progress-value { background: linear-gradient(90deg,var(--plum),var(--plum-2)); }
.command-plan { margin: 18px 0 0; padding: 0; list-style: none; }
.command-plan > li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.command-step-number { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--plum); font-size: .75rem; font-weight: 900; }
.command-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.command-step-head h4 { margin: 0; font-size: .875rem; }
.command-step-state { padding: 4px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .68rem; font-weight: 850; white-space: nowrap; }
.command-step-state.is-done { background: var(--green-soft); color: var(--green); }
.command-step-state.is-active { background: var(--gold-soft); color: var(--plum); }
.command-step-state.is-blocked { background: var(--red-soft); color: var(--red); }
.command-plan dl { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 18px; margin: 8px 0 0; }
.command-plan dl > div { display: flex; gap: 5px; min-width: 0; }
.command-plan dt,.command-plan dd { margin: 0; font-size: .75rem; line-height: 1.4; }
.command-plan dt { color: var(--muted); }
.command-plan dd { font-weight: 750; }
.command-plan a { color: var(--plum-2); font-weight: 800; text-underline-offset: 3px; }
.command-blockers { margin-top: 8px; padding: 14px 0; border-block: 1px solid var(--line-strong); }
.command-blockers h4 { margin: 0 0 7px; color: var(--red); font-size: .8rem; }
.command-blockers ul { margin: 0; padding-left: 19px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.command-next { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 12px 13px; border-radius: 14px; background: var(--surface-plum); color: var(--plum); }
.command-next > span { font-size: 1.25rem; }
.command-next small,.command-next strong { display: block; }
.command-next small { font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.command-next strong { margin-top: 3px; font-size: .8125rem; }
.crm-page { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-panel); }
.crm-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 26px 20px; background: linear-gradient(112deg,var(--dark-plum),var(--plum)); color: var(--white); }
.crm-heading .eyebrow { color: var(--gold); }
.crm-heading h2 { margin: 0; font-size: clamp(1.3rem,2.2vw,1.8rem); }
.crm-heading p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--text-on-dark-muted); font-size: .875rem; line-height: 1.5; }
.crm-safe-badge { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 0 11px; border: 1px solid rgba(250,189,6,.52); border-radius: 999px; background: rgba(250,189,6,.12); color: var(--gold); font-size: .75rem; font-weight: 850; white-space: nowrap; }
.crm-safe-badge .op-icon { width: 16px; height: 16px; }
.crm-access-model { display: grid; grid-template-columns: auto minmax(220px,1fr) auto minmax(280px,1.4fr); gap: 10px 16px; align-items: start; padding: 14px 26px; border-bottom: 1px solid var(--line); background: var(--gold-soft); color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.crm-access-model strong { color: var(--plum); white-space: nowrap; }
.crm-pipeline-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 26px 12px; }
.crm-pipeline-head h3,.crm-list-head h3,.crm-guardrail h3,.crm-customer-tools h3 { margin: 0; font-size: 1rem; }
.crm-pipeline-head .text-button.is-selected { border-color: var(--plum); background: var(--surface-plum); color: var(--plum); }
.crm-stage-track { display: grid; grid-template-columns: repeat(12,minmax(102px,1fr)); gap: 0; margin: 0; padding: 0 18px 18px; overflow-x: auto; list-style: none; scrollbar-width: thin; }
.crm-stage-track li { min-width: 102px; position: relative; }
.crm-stage-track li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 26px; left: 66%; width: 68%; height: 2px; background: var(--line-strong); }
.crm-stage-track button { width: 100%; min-height: 116px; display: flex; align-items: center; flex-direction: column; position: relative; z-index: 1; padding: 7px 5px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.crm-stage-track button > span { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--plum); font-size: .9rem; font-weight: 900; }
.crm-stage-track button strong { margin-top: 9px; font-size: .75rem; line-height: 1.2; text-align: center; }
.crm-stage-track button small { margin-top: 3px; color: var(--muted); font-size: .7rem; line-height: 1.2; text-align: center; }
.crm-stage-track button:hover,.crm-stage-track button.is-current { border-bottom-color: var(--plum-2); background: linear-gradient(180deg,transparent,var(--surface-plum)); }
.crm-stage-track button.is-current > span { border-color: var(--plum); background: var(--plum); color: var(--white); }
.crm-stage-track .is-terminal button > span { border-style: dashed; color: var(--muted); }
.crm-stage-track .is-terminal button.is-current > span { color: var(--white); }
.crm-sla-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 12px 26px; border-block: 1px solid var(--line); background: var(--surface-soft); font-size: .8125rem; }
.crm-sla-strip > strong { margin-right: auto; color: var(--plum); }
.crm-sla-strip span { color: var(--muted); }
.crm-sla-strip b { margin-left: 4px; color: var(--ink); }
.crm-ledger { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,310px); min-width: 0; }
.crm-list { min-width: 0; padding: 22px 26px 24px; }
.crm-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.crm-list-head > span { color: var(--muted); font-size: .75rem; text-align: right; }
.crm-table-wrap { min-width: 0; overflow-x: auto; border-block: 1px solid var(--line); }
.crm-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: .8125rem; }
.crm-table th { padding: 10px 9px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.crm-table td { padding: 12px 9px; border-top: 1px solid var(--line); vertical-align: middle; }
.crm-table tbody tr:first-child td { border-top-color: var(--line-strong); }
.crm-table tbody tr:hover { background: var(--surface-soft); }
.crm-customer strong,.crm-customer small { display: block; }
.crm-customer strong { color: var(--ink); }
.crm-customer small { margin-top: 3px; color: var(--muted); }
.crm-stage-pill,.crm-task-pill,.crm-route-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.crm-task-copy { display: block; }
.crm-task-copy small { display: block; max-width: 180px; margin-top: 4px; color: var(--muted); line-height: 1.3; }
.crm-stage-pill { background: var(--surface-plum); color: var(--plum); }
.crm-task-pill { background: var(--green-soft); color: var(--green); }
.crm-task-pill.is-overdue { background: var(--red-soft); color: var(--red); }
.crm-task-pill.is-due-soon,.crm-task-pill.is-callback { background: var(--amber-soft); color: var(--amber); }
.crm-task-pill.is-waiting-customer { background: var(--surface-soft); color: var(--muted); }
.crm-route-pill { background: var(--surface-soft); color: var(--muted); }
.crm-route-pill.is-offline { border: 1px dashed var(--line-strong); background: var(--white); color: var(--plum); }
.crm-open-button { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--white); color: var(--plum); font-weight: 800; white-space: nowrap; cursor: pointer; }
.crm-open-button:hover { border-color: var(--plum); background: var(--surface-plum); }
.crm-guardrail { padding: 24px 22px; border-left: 1px solid var(--line); background: linear-gradient(160deg,var(--surface-soft),var(--surface-plum)); }
.crm-guardrail > p:not(.eyebrow) { margin: 8px 0 18px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.crm-guardrail dl { display: grid; gap: 0; margin: 0; }
.crm-guardrail dl > div { padding: 13px 0; border-top: 1px solid var(--line-strong); }
.crm-guardrail dt,.crm-guardrail dd { margin: 0; }
.crm-guardrail dt { color: var(--plum); font-size: .75rem; font-weight: 850; }
.crm-guardrail dd { margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.prototype-note { margin: 12px 0 0; color: var(--muted); font-size: .66rem; }
.section-note { margin: -10px 0 14px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.bridge-panel { overflow: hidden; background: linear-gradient(140deg, var(--white) 0%, var(--white) 62%, var(--surface-plum) 100%); }
.bridge-rule { min-height: 34px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 999px; background: var(--surface-plum); color: var(--plum); font-size: .7rem; font-weight: 850; }
.team-flow { display: grid; grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr); gap: 14px; align-items: stretch; }
.team-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.online-card { border-top: 4px solid var(--plum-2); }
.offline-card { border-top: 4px solid var(--green); }
.team-title { display: flex; align-items: center; gap: 11px; }
.team-title > span { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--surface-plum); color: var(--plum); font-size: .72rem; font-weight: 900; }
.offline-card .team-title > span { background: var(--green-soft); color: var(--green); }
.team-title small { color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .1em; }
.team-title h3 { margin: 2px 0 0; font-size: .96rem; }
.team-card ul { display: grid; gap: 8px; margin: 18px 0; padding-left: 19px; color: var(--muted); font-size: .72rem; }
.team-card li::marker { color: var(--plum-2); }
.offline-card li::marker { color: var(--green); }
.team-target { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 12px; background: var(--surface-soft); }
.team-target strong { color: var(--plum); font-size: .88rem; }
.team-target span { color: var(--muted); font-size: .65rem; }
.bridge-core { display: grid; grid-template-columns: auto 1fr auto; gap: 4px; align-items: center; text-align: center; color: var(--rail-muted); }
.bridge-core > span { font-size: 1.15rem; }
.bitrix-node { min-height: 154px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 22px; background: radial-gradient(circle at 50% 25%, var(--white) 0 15%, var(--surface-plum) 70%); }
.bitrix-node b { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 12px; background: var(--bitrix-blue); color: var(--white); font-size: 1rem; }
.bitrix-node strong { font-size: .75rem; }
.bitrix-node small { margin-top: 4px; color: var(--muted); font-size: .57rem; line-height: 1.3; }
.bridge-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 9px; }
.bridge-meta span { padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--muted); font-size: .75rem; font-weight: 700; }
.handoff-contract { display: flex; align-items: center; gap: 9px; overflow-x: auto; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--dark-plum); color: var(--text-on-dark-muted); white-space: nowrap; font-size: .65rem; }
.handoff-contract i { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 999px; background: var(--rail-muted); }
.handoff-label { color: var(--gold); font-weight: 900; letter-spacing: .09em; }
.two-column { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(330px,.92fr); gap: 18px; margin-top: 18px; }
.two-column .panel { margin-top: 0; }
.attention-list { display: grid; gap: 7px; }
.attention-item { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; min-height: 64px; padding: 10px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-soft); cursor: pointer; }
.attention-item:hover { border-color: var(--line-strong); }
.attention-item .initial { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-plum); color: var(--plum); font-size: .75rem; font-weight: 900; }
.attention-item strong, .attention-item small { display: block; }
.attention-item strong { font-size: .8rem; }
.attention-item small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.attention-item time { color: var(--red); font-size: .67rem; font-weight: 800; }
.attention-item time[data-tone="scheduled"] { color: var(--muted); }
.attention-item time[data-tone="soon"] { color: var(--amber); }
.attention-item time[data-tone="overdue"] { color: var(--red); }
.genie-panel { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--white) 30%, var(--surface-plum)); }
.genie-orb { position: absolute; top: 80px; right: -28px; width: 108px; height: 108px; display: grid; place-items: center; border-radius: 44% 56% 61% 39% / 42% 38% 62% 58%; background: radial-gradient(circle at 35% 30%, var(--genie-light) 0 12%, var(--genie-mid) 38%, var(--plum) 74%); color: var(--white); box-shadow: 0 20px 42px rgba(98,31,82,.20); transform: rotate(8deg); }
.genie-orb span { transform: rotate(-8deg); font-size: 1.8rem; }
.genie-lead { max-width: calc(100% - 90px); margin-bottom: 20px; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.next-actions { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.next-actions li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: start; padding-top: 9px; border-top: 1px solid var(--line); }
.next-actions li > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--plum); color: var(--white); font-size: .67rem; font-weight: 850; }
.next-actions p { margin: 0; }
.next-actions strong, .next-actions small { display: block; }
.next-actions strong { font-size: .74rem; }
.next-actions small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.live-chip { min-height: 30px; padding-inline: 9px; background: var(--surface-plum); color: var(--plum-2); }
.system-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.system-card { padding: 14px; border-radius: 15px; background: var(--surface-soft); }
.system-card .system-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.system-card strong, .system-card small { display: block; }
.system-card strong { font-size: .78rem; }
.system-card small { margin-top: 8px; color: var(--muted); font-size: .66rem; }
.state-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; font-weight: 850; line-height: 1.15; text-align: center; }
.state-pill.demo { background: var(--green-soft); color: var(--green); }
.state-pill.off { background: var(--amber-soft); color: var(--amber); }
.state-pill.not-connected { background: var(--red-soft); color: var(--red); }
.state-pill.incomplete,.state-pill.attention { background: var(--amber-soft); color: var(--amber); }.state-pill.unavailable{background:var(--red-soft);color:var(--red)}.system-next-action{margin-top:7px;color:var(--ink)!important}.owner-technical{border-color:var(--line-strong)}
.state-lab { display: grid; grid-template-columns: minmax(260px,1.1fr) minmax(180px,.45fr) minmax(300px,1fr); gap: 14px; align-items: center; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.state-lab h3 { margin: 0 0 6px; font-size: 1rem; }
.state-lab p { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.state-lab label { font-size: .8125rem; font-weight: 800; }
.state-lab select { width: 100%; min-height: 46px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--white); color: var(--ink); }
.state-preview { min-height: 102px; padding: 14px; border-left: 4px solid var(--plum); border-radius: 4px 14px 14px 4px; background: var(--white); }
.state-preview.warning { border-left-color: var(--amber); background: var(--amber-soft); }
.state-preview.danger { border-left-color: var(--red); background: var(--red-soft); }
.state-preview strong, .state-preview small { display: block; }
.state-preview p { margin: 5px 0; color: var(--ink); }
.state-preview small { color: var(--muted); font-size: .75rem; }
.state-preview button { margin-top: 10px; }
.state-preview button[aria-disabled="true"] { cursor: default; opacity: .7; }
.last-checked, .owner-only { color: var(--muted); font-size: .68rem; }
.owner-only { background: var(--surface-plum); color: var(--plum); }
.governance-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.governance-grid > div { padding: 15px; border-left: 3px solid var(--line-strong); background: var(--surface-soft); border-radius: 4px 14px 14px 4px; }
.governance-value, .governance-grid strong, .governance-grid small { display: block; }
.governance-value { color: var(--plum); font-family: Georgia, serif; font-size: 1.5rem; font-weight: 700; }
.governance-grid strong { margin-top: 4px; font-size: .75rem; }
.governance-grid small { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.governance-grid a { color: var(--plum-2); text-underline-offset: 2px; }
.owner-technical { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.owner-technical .panel-head { margin-bottom: 14px; }
.workload-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.workload-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.86); }
.workload-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workload-card strong, .workload-card small { display: block; }
.workload-card small { margin-top: 8px; color: var(--muted); line-height: 1.45; }
.workload-identity { min-width: 0; }
.workload-identity small { margin-top: 3px; overflow-wrap: anywhere; font-size: .7rem; }
.workload-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 14px 0 0; }
.workload-metrics > div { min-width: 0; padding: 9px; border-radius: 10px; background: var(--surface-soft); }
.workload-metrics > div[data-tone="soon"] { background: var(--amber-soft); color: var(--amber); }
.workload-metrics > div[data-tone="overdue"] { background: var(--red-soft); color: var(--red); }
.workload-metrics dt { color: var(--muted); font-size: .68rem; line-height: 1.2; }
.workload-metrics dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 850; }
.workload-metrics > div[data-tone] dt { color: currentColor; }
.incentive-rule { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid var(--gold); border-radius: 5px 15px 15px 5px; background: var(--gold-soft); color: var(--plum); }
.incentive-rule strong { flex: 0 0 auto; }
.incentive-rule span { color: var(--muted); font-size: .8125rem; line-height: 1.45; text-align: right; }
.finance-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.finance-summary article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.finance-summary small, .finance-summary strong, .finance-summary span { display: block; }
.finance-summary strong { margin: 5px 0; color: var(--plum); font-size: 1.45rem; letter-spacing: -.03em; }
.finance-summary span { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.incentive-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.incentive-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.incentive-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.incentive-card > div strong, .incentive-card > div small { display: block; }
.incentive-card > div small { margin-top: 3px; color: var(--muted); }
.incentive-card dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 14px 0 0; }
.incentive-card dl > div { min-width: 0; padding: 10px; border-radius: 11px; background: var(--surface-soft); }
.incentive-card dt { color: var(--muted); font-size: .7rem; }
.incentive-card dd { margin: 5px 0; color: var(--plum); font-size: 1.1rem; font-weight: 850; }
.incentive-card dl small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.customer-preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.customer-preview-card { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; }
.customer-preview-card:hover { border-color: var(--plum-2); box-shadow: var(--shadow-panel); }
.customer-preview-card > span:nth-child(2) { min-width: 0; }
.customer-preview-card strong, .customer-preview-card small { display: block; overflow-wrap: anywhere; }
.customer-preview-card small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.preview-open { color: var(--plum-2); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.empty-state { margin: 0; padding: 15px; border: 1px dashed var(--line-strong); border-radius: 13px; background: var(--surface-soft); color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.evidence-grid > article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.evidence-grid h3 { margin: 0 0 11px; font-size: .9rem; }
.evidence-list { display: grid; gap: 7px; }
.customer-timeline-list { margin: 10px 0 0; padding: 0; list-style: none; }
.evidence-item { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.evidence-item strong { min-width: 0; overflow-wrap: anywhere; font-size: .8125rem; }
.evidence-item small { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: .75rem; }
.evidence-item time { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: .75rem; text-align: right; }
.evidence-result-button { width: 100%; color: var(--ink); text-align: left; cursor: pointer; }
.evidence-result-button:hover { border-color: var(--plum-2); }
.evidence-more { width: 100%; margin-top: 9px; }
.audit-list { margin-top: 14px; }
body[data-mode="demo-only"] .prototype-badge { border-color: #d9a441; background: var(--amber-soft); color: var(--amber); }
body[data-mode="demo-only"] .mode-pill { background: var(--amber-soft); color: var(--amber); }
body[data-mode="demo-only"] .status-banner { border-color: #e8c47b; background: var(--amber-soft); color: var(--amber); }
body[data-mode="partial"] .prototype-badge { background: var(--amber-soft); color: var(--amber); }
body[data-mode="synthetic"] .prototype-badge { border-color: var(--gold); background: var(--gold-soft); color: var(--plum); }
body[data-mode="synthetic"] .mode-pill { background: var(--gold-soft); color: var(--plum); }
body[data-mode="synthetic"] .status-banner { border-color: var(--gold); background: #fff9dc; color: var(--plum); }
body[data-mode="synthetic"] .status-banner > span:first-child { background: var(--plum); color: var(--gold); }
body[data-mode="synthetic"] .customer-dialog { box-shadow: 0 35px 120px rgba(58,1,64,.38), inset 0 5px 0 var(--gold); }
.role-boundary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-soft); font-size: .75rem; }
.role-boundary > * { padding: 5px 8px; border-radius: 8px; background: var(--white); }
.role-boundary > strong { color: var(--plum); }
.rbac-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
.rbac-table { width: 100%; min-width: 700px; border-collapse: collapse; background: var(--white); font-size: .8125rem; }
.rbac-table caption { padding: 12px; background: var(--surface-plum); color: var(--plum); font-weight: 850; text-align: left; }
.rbac-table th, .rbac-table td { padding: 11px 12px; border-top: 1px solid var(--line); text-align: left; }
.rbac-table thead th { background: var(--surface-soft); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.customer-dialog { width: min(900px, calc(100vw - 24px)); max-height: min(880px, calc(100vh - 24px)); padding: 0; overflow: auto; overscroll-behavior: contain; border: 0; border-radius: 24px; background: var(--white); color: var(--ink); box-shadow: 0 35px 120px rgba(30,14,27,.34); }
.customer-dialog::backdrop { background: rgba(29,18,28,.64); backdrop-filter: blur(4px); }
.dialog-shell { min-width: 0; max-width: 100%; padding: 24px; overflow-wrap: anywhere; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-head > div { min-width: 0; }
.dialog-head .icon-button { flex: 0 0 46px; font-size: 1.35rem; }
.customer-summary { display: grid; grid-template-columns: auto minmax(150px,1fr) minmax(170px,.75fr) auto; gap: 12px; align-items: center; margin: 18px 0; padding: 14px; border-radius: 16px; background: linear-gradient(100deg, var(--surface-plum), var(--surface-soft)); }
.privacy-state { display: flex; align-items: center; gap: 10px; margin: -6px 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--muted); font-size: .75rem; line-height: 1.4; }
.privacy-state .policy-chip { flex: 0 0 auto; }
.profile-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--plum); color: var(--white); font-size: .76rem; font-weight: 900; }
.customer-summary strong, .customer-summary small { display: block; }
.customer-summary strong { font-size: .84rem; }
.customer-summary small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.customer-authorised-phone { min-width: 0; padding-left: 13px; border-left: 1px solid var(--line-strong); }
.customer-authorised-phone strong,.customer-authorised-phone span { display: block; overflow-wrap: anywhere; }
.customer-authorised-phone strong { margin-top: 3px; color: var(--plum); }
.customer-authorised-phone span { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.3; }
.customer-desk-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) minmax(170px,1.35fr); gap: 0; margin: 14px 0 0; padding: 0; border-block: 1px solid var(--line); background: var(--white); }
.customer-desk-facts > div { min-width: 0; padding: 11px 12px; border-left: 1px solid var(--line); }
.customer-desk-facts > div:first-child { border-left: 0; }
.customer-desk-facts dt,.customer-desk-facts dd { margin: 0; overflow-wrap: anywhere; }
.customer-desk-facts dt { color: var(--muted); font-size: .75rem; }
.customer-desk-facts dd { margin-top: 4px; color: var(--plum); font-size: .8125rem; font-weight: 850; line-height: 1.3; }
.customer-live-focus { margin-top: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 15px; background: linear-gradient(110deg,var(--white),var(--surface-plum)); }
.customer-live-focus-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.customer-live-focus-head h3 { margin: 2px 0 0; font-size: .9rem; }
.live-context-policy { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .68rem; font-weight: 800; }
.customer-live-focus-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 12px 0 0; }
.customer-live-focus-grid > div { min-width: 0; padding: 10px; border-radius: 11px; background: var(--white); }
.customer-live-focus-grid dt,.customer-live-focus-grid dd { margin: 0; overflow-wrap: anywhere; }
.customer-live-focus-grid dt { color: var(--muted); font-size: .72rem; }
.customer-live-focus-grid dd { margin-top: 4px; color: var(--plum); font-size: .8125rem; font-weight: 800; line-height: 1.35; }
.priority-chip { padding: 6px 9px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .66rem; font-weight: 850; }
.priority-chip[data-tone="overdue"] { background: var(--red-soft); color: var(--red); }
.priority-chip[data-tone="scheduled"] { background: var(--surface-soft); color: var(--muted); }
.dialog-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px,.8fr); gap: 16px; }
.dialog-grid > section { padding: 17px; border: 1px solid var(--line); border-radius: 17px; }
.dialog-grid h3, .conversation-summary h3 { margin: 0 0 12px; font-size: .86rem; }
.customer-timeline { margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; }
.customer-timeline > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.customer-timeline h3 { margin: 0; font-size: .9rem; }
.customer-timeline .micro-status { margin: 0 0 10px; }
.customer-channel-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.customer-channel-filters button { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: .7rem; font-weight: 800; cursor: pointer; }
.customer-channel-filters button:hover,.customer-channel-filters button.is-selected { border-color: var(--plum); background: var(--surface-plum); color: var(--plum); }
.evidence-source-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.source-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; background: var(--surface-plum); color: var(--plum); font-size: .65rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.source-badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.source-badge[data-source="WEBSITE"] { background: var(--green-soft); color: var(--green); }
.source-badge[data-source="GENIE"] { background: var(--gold-soft); color: var(--plum); }
.source-badge[data-source="META"],.source-badge[data-source="WHATSAPP"] { background: #e8f7ee; color: #17633e; }
.source-badge[data-source="BITRIX"] { background: #e6f5fb; color: #126088; }
.source-badge[data-source="PAYU"] { background: var(--amber-soft); color: var(--amber); }
.timeline-boundary { margin: 8px 0 12px; padding: 9px 11px; border-left: 3px solid var(--gold); background: var(--gold-soft); color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.detail-list { display: grid; gap: 8px; margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(110px,.7fr) minmax(0,1.3fr); gap: 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.detail-list dt, .detail-list dd { margin: 0; font-size: .69rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { text-align: right; font-weight: 750; }
.detail-list dd { overflow-wrap: anywhere; }
.consent-ok { color: var(--green); }
.contact-panel > p { color: var(--muted); font-size: .69rem; }
.contact-panel label { display: block; margin: 14px 0 5px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.contact-panel select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); }
.contact-panel input { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); }
.contact-panel [aria-invalid="true"] { border-color: var(--red); }
.agent-customer-desk { margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg,var(--white),var(--surface-soft)); }
.crm-customer-tools { display: grid; grid-template-columns: minmax(230px,.85fr) minmax(260px,1.15fr); gap: 12px 18px; align-items: end; margin-top: 16px; padding: 17px; border: 1px solid var(--line-strong); border-left: 4px solid var(--plum-2); border-radius: 6px 17px 17px 6px; background: var(--surface-soft); }
.crm-tools-copy p:last-child { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.calling-capability { display: inline-flex; margin-top: 9px; padding: 5px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .75rem; font-weight: 800; }
.crm-customer-tools > .micro-status { align-self: center; margin: 0 !important; }
.crm-tool-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.crm-tool-actions .primary-button,.crm-tool-actions .secondary-button { width: auto; min-width: 118px; margin: 0; }
.crm-preview-form { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); }
.crm-preview-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.crm-preview-form-head h4 { margin: 5px 0 0; font-size: .95rem; }
.demo-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--gold-soft); color: var(--plum); font-size: .68rem; font-weight: 900; letter-spacing: .04em; }
.crm-preview-owner { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 11px; padding: 9px 10px; border-radius: 10px; background: var(--surface-plum); font-size: .8125rem; }
.crm-preview-owner span { color: var(--muted); }
.crm-preview-owner strong { color: var(--plum); text-align: right; }
.crm-preview-form label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: .8125rem; font-weight: 750; }
.crm-preview-form input,.crm-preview-form select,.crm-preview-form textarea { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); font: inherit; }
.crm-preview-form textarea { min-height: 70px; resize: vertical; }
.crm-preview-form [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.crm-preview-field-grid { display: grid; grid-template-columns: minmax(130px,.6fr) minmax(220px,1.4fr); gap: 10px; }
.crm-preview-form .field-help { margin-top: 10px !important; }
.crm-preview-form .primary-button { width: auto; min-width: 210px; }
.crm-customer-tools + .privacy-state { margin-top: 16px; }
.agent-desk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.agent-desk-head h3 { margin: 0; font-size: .95rem; }
.agent-call-facts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; margin: 14px 0 0; }
.agent-call-facts > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.agent-call-facts dt,.agent-call-facts dd { margin: 0; overflow-wrap: anywhere; }
.agent-call-facts dt { color: var(--muted); font-size: .75rem; }
.agent-call-facts dd { margin-top: 4px; font-size: .8125rem; font-weight: 850; }
.agent-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.agent-source-grid article { min-width: 0; padding: 11px; border-radius: 11px; background: var(--surface-plum); }
.agent-source-grid strong,.agent-source-grid span { display: block; overflow-wrap: anywhere; }
.agent-source-grid strong { color: var(--plum); font-size: .75rem; }
.agent-source-grid span { margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.agent-call-controls { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.agent-call-controls label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: .8125rem; font-weight: 750; }
.agent-call-controls select,.agent-call-controls input,.agent-call-controls textarea { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); font: inherit; }
.agent-call-controls textarea { min-height: 82px; resize: vertical; }
.agent-call-controls .secondary-button { min-height: 44px; }
.field-help { margin: 0 0 6px !important; color: var(--muted); font-size: .8125rem !important; line-height: 1.4; }
.field-error { margin: 5px 0 0 !important; color: var(--red); font-size: .8125rem !important; font-weight: 750; line-height: 1.4; }
.agent-call-controls [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.primary-button { width: 100%; margin-top: 10px; border: 0; border-radius: 12px; background: var(--plum-2); color: var(--white); padding: 0 14px; font-weight: 800; cursor: pointer; }
.primary-button:disabled { cursor: not-allowed; opacity: .48; }
.caution-button:not(:disabled) { background: var(--white); color: var(--ink); border: 2px solid var(--ink); }
.micro-status { margin: 8px 0 0 !important; color: var(--muted); font-size: .8125rem !important; }
.conversation-summary { margin-top: 16px; padding: 17px; border-radius: 17px; background: var(--dark-plum); color: var(--white); }
.conversation-summary p { margin-bottom: 12px; color: var(--text-on-dark-muted); font-size: .72rem; line-height: 1.55; }
.summary-guard { display: flex; align-items: center; gap: 8px; color: var(--success-bright); font-size: .65rem; }
.workflow-demo { margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-soft); }
.workflow-demo h3 { margin: 0; }
.workflow-role { display: inline-flex; align-items: center; min-height: 30px; margin-top: 7px; padding: 0 9px; border-radius: 999px; background: var(--surface-plum); color: var(--plum); font-size: .75rem; font-weight: 800; }
.workflow-state { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 14px 0; padding: 0; list-style: none; }
.workflow-step { min-height: 58px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--muted); font-size: .75rem; font-weight: 750; }
.step-state { display: block; margin-bottom: 3px; font-size: .75rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.workflow-step.is-done { border-color: var(--success-line); background: var(--green-soft); color: var(--green); }
.workflow-step.is-current { border-color: var(--line-strong); background: var(--surface-plum); color: var(--plum); }
.workflow-controls { display: grid; grid-template-columns: auto minmax(180px,1fr) repeat(3,auto); gap: 8px; align-items: center; }
.workflow-controls > * { min-width: 0; max-width: 100%; }
.workflow-controls label { font-size: .75rem; font-weight: 750; }
.workflow-controls select { min-height: 44px; padding: 0 10px; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); }
.workflow-controls .secondary-button { white-space: nowrap; }
.workflow-controls .secondary-button:disabled,.workflow-controls select:disabled { cursor: not-allowed; opacity: .48; }
.workflow-notes-label { display: block; margin-top: 12px; font-size: .8125rem; font-weight: 800; }
#workflow-notes { width: 100%; min-height: 72px; margin-top: 5px; padding: 10px; resize: vertical; border: 1px solid var(--control-border); border-radius: 11px; background: var(--white); color: var(--ink); }
#workflow-notes:disabled { opacity: .6; }
.search-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(720px, calc(100vh - 24px)); padding: 0; border: 0; border-radius: 24px; background: var(--white); color: var(--ink); box-shadow: 0 35px 120px rgba(30,14,27,.34); }
.search-dialog::backdrop { background: rgba(29,18,28,.64); backdrop-filter: blur(4px); }
.search-shell { padding: 22px; }
.search-field { min-height: 52px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin: 18px 0 10px; padding: 0 14px; border: 1px solid var(--control-border); border-radius: 14px; }
.search-field input { min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.search-field:focus-within { outline: 3px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-dark); }
.search-results { display: grid; gap: 7px; max-height: 390px; overflow: auto; }
.search-section-label { margin: 10px 0 2px; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #6c6070); }
.search-result { width: 100%; min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--ink); text-align: left; cursor: pointer; }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: 2px; color: var(--muted); }
.search-result > span:last-child { color: var(--plum-2); font-weight: 900; }

/* Consequential operational text remains at least 13px for sustained console use. */
.app-shell small, .eyebrow, .nav-label, .trend, .last-checked, .owner-only,
.bridge-rule, .prototype-note, .attention-item time, .live-chip, .handoff-contract,
.detail-list dt, .detail-list dd, .contact-panel p, .contact-panel label,
.micro-status, .conversation-summary p, .summary-guard, .segmented button,
.topbar-kicker, .topbar-title, .crm-stage-track button small, .crm-table th,
.crm-stage-pill, .crm-task-pill, .crm-route-pill { font-size: .8125rem; }
.customer-dialog small, .search-dialog small, .customer-dialog p, .search-dialog p,
.customer-dialog dt, .customer-dialog dd, .customer-dialog label, .priority-chip,
.workflow-step, .workflow-controls label, .search-result small { font-size: .8125rem; }
.nav-item b, .rail-foot strong, .mobile-brand span, .prototype-badge,
.notification-button span, .avatar-copy strong, .mode-pill, .status-banner,
.pulse-card p, .outcome-metrics span, .panel-head a, .pipeline strong,
.team-title > span, .team-card ul, .bitrix-node strong, .bridge-meta span,
.attention-item strong, .next-actions li > span, .next-actions strong,
.system-card strong, .state-pill, .governance-grid strong, .role-boundary,
.rbac-table thead th, .workflow-role, .step-state { font-size: .8125rem; }

@media (max-width: 1180px) {
  .pulse-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pipeline { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .system-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .governance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .outcome-strip { grid-template-columns: 1fr; background: linear-gradient(145deg,var(--dark-plum) 0 26%,var(--white) 26%); }
  .outcome-head h2 { max-width: none; }
  .outcome-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .workflow-controls { grid-template-columns: 1fr 1fr; }
  .state-lab { grid-template-columns: 1fr 1fr; }
  .state-lab > div:first-child { grid-column: 1 / -1; }
  .workload-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-access-model { grid-template-columns: auto minmax(0,1fr); }
  .crm-ledger { grid-template-columns: 1fr; }
  .crm-guardrail { border-top: 1px solid var(--line); border-left: 0; }
  .command-chat-layout { grid-template-columns: 1fr; }
  .command-thread { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 1080px) {
  .app-shell { display: block; }
  .side-rail { position: fixed; inset: 0 auto 0 0; width: min(82vw,280px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 55px rgba(31,16,29,.28); }
  .side-rail.is-open { transform: translateX(0); }
  .nav-close { display: grid; place-items: center; }
  .nav-scrim.is-visible { display: block; }
  .menu-button { display: inline-grid; place-items: center; flex: 0 0 46px; }
  .search-button { min-width: 46px; width: 46px; justify-content: center; }
  .search-button span:not(:first-child), .search-button kbd, .avatar-copy strong { display: none; }
  .avatar-copy small { display: block; color: var(--muted); font-weight: 800; white-space: nowrap; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; justify-content: space-between; }
  .access-summary { align-items: flex-start; flex-direction: column; }
  .access-policies { max-width: none; justify-content: flex-start; }
  .two-column { grid-template-columns: 1fr; }
  .team-flow { grid-template-columns: 1fr; }
  .bridge-core { min-height: 84px; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .bridge-core > span { transform: rotate(90deg); }
  .bitrix-node { min-height: 92px; }
  .handoff-contract { flex-wrap: wrap; white-space: normal; }
  .outcome-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .dialog-grid { grid-template-columns: 1fr; }
  .customer-desk-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .customer-desk-facts > div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .customer-desk-facts > div:nth-child(5) { grid-column: span 2; border-top: 1px solid var(--line); }
  .agent-call-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agent-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-live-focus-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-customer-tools { grid-template-columns: 1fr; }
  .crm-tool-actions { grid-column: auto; justify-content: flex-start; flex-wrap: wrap; }
  .command-chat-head { flex-direction: column; }
}

@media (max-width: 620px) {
  main { padding: 20px 14px 36px; }
  .topbar { padding-inline: 12px; }
  .topbar > div:nth-child(3) { display: none; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand .mobile-brand-mark { width: 42px; }
  .mobile-brand span { display: none; }
  .prototype-badge { margin-left: 0; min-width: 88px; justify-content: center; padding-inline: 8px; font-size: .8125rem; }
  .prototype-badge-wide { display: none; }
  .topbar-actions .notification-button, .topbar-actions .search-button { display: none; }
  .topbar-actions .avatar-button { min-height: 44px; padding: 5px 9px; }
  .topbar-actions .avatar-button > span:first-child { display: none; }
  .status-banner { align-items: flex-start; flex-wrap: wrap; }
  .status-banner > span:last-child { width: calc(100% - 34px); margin-left: 34px; }
  .pulse-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .pulse-card { min-height: 150px; padding: 14px; }
  .pulse-card p { min-height: 31px; }
  .panel-head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .panel-tools { width: 100%; align-items: stretch; justify-content: flex-start; flex-direction: column; }
  .work-filters { width: 100%; }
  .work-filters button { flex: 1 1 0; padding-inline: 7px; }
  .pipeline { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .pipeline article { min-width: 150px; min-height: 150px; scroll-snap-align: start; }
  .crm-heading { flex-direction: column; padding: 20px 18px; }
  .crm-access-model { grid-template-columns: 1fr; padding-inline: 18px; }
  .crm-access-model strong:not(:first-child) { margin-top: 5px; }
  .crm-pipeline-head { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .crm-stage-track { padding-inline: 10px; }
  .crm-sla-strip { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .crm-sla-strip > strong { margin-right: 0; }
  .crm-list { padding: 18px; }
  .crm-list-head { align-items: flex-start; flex-direction: column; }
  .crm-list-head > span { text-align: left; }
  .crm-guardrail { padding: 20px 18px; }
  .crm-tool-actions { display: grid; grid-template-columns: 1fr; }
  .crm-tool-actions .primary-button,.crm-tool-actions .secondary-button { width: 100%; }
  .crm-preview-field-grid { grid-template-columns: 1fr; gap: 0; }
  .crm-preview-form .primary-button { width: 100%; }
  .command-chat-head { padding: 20px 18px; }
  .command-chat-safety { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .command-thread,.command-workstream { padding: 20px 18px; }
  .command-message.is-owner { padding-left: 0; }
  .command-composer > div { align-items: stretch; flex-direction: column; }
  .command-composer > div span { margin-right: 0; }
  .command-composer .secondary-button,.command-composer .primary-button { width: 100%; }
  .command-step-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .command-plan dl { display: grid; gap: 4px; }
  .system-grid { grid-template-columns: 1fr 1fr; }
  .state-lab { grid-template-columns: 1fr; }
  .state-lab > div:first-child { grid-column: auto; }
  .governance-grid { grid-template-columns: 1fr; }
  .dialog-shell { padding: 16px; }
  .dialog-grid { grid-template-columns: 1fr; }
  .customer-dialog,.search-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; }
  .search-shell { padding: 16px; }
  .dialog-head .icon-button { width: 44px; flex-basis: 44px; }
  .detail-list > div { grid-template-columns: 1fr; gap: 2px; align-items: start; }
  .detail-list dd { text-align: left; }
  .customer-summary { grid-template-columns: auto 1fr; }
  .customer-authorised-phone { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid var(--line-strong); border-left: 0; }
  .customer-desk-facts { grid-template-columns: 1fr 1fr; }
  .customer-desk-facts > div { border-top: 1px solid var(--line); }
  .customer-desk-facts > div:nth-child(odd) { border-left: 0; }
  .customer-desk-facts > div:first-child,.customer-desk-facts > div:nth-child(2) { border-top: 0; }
  .customer-desk-facts > div:nth-child(5) { grid-column: 1 / -1; border-left: 0; }
  .customer-live-focus-head { flex-direction: column; }
  .customer-live-focus-grid { grid-template-columns: 1fr; }
  .privacy-state { align-items: flex-start; flex-direction: column; }
  .customer-timeline > div:first-child { align-items: flex-start; flex-direction: column; gap: 5px; }
  .customer-channel-filters { flex-wrap: nowrap; padding-bottom: 5px; overflow-x: auto; scrollbar-width: thin; }
  .customer-channel-filters button { flex: 0 0 auto; }
  .agent-desk-head { flex-direction: column; }
  .agent-call-facts { grid-template-columns: 1fr 1fr; }
  .agent-source-grid { grid-template-columns: 1fr; }
  .priority-chip { grid-column: 1 / -1; justify-self: start; }
  .workflow-state { grid-template-columns: 1fr 1fr; }
  .workflow-controls { grid-template-columns: 1fr; }
  .workflow-controls .secondary-button { width: 100%; white-space: normal; }
  .role-boundary { display: grid; }
  .workload-list, .evidence-grid { grid-template-columns: 1fr; }
  .incentive-list, .customer-preview-grid { grid-template-columns: 1fr; }
  .incentive-rule { align-items: flex-start; flex-direction: column; }
  .incentive-rule span { text-align: left; }
  .incentive-card dl { grid-template-columns: 1fr; }
  .workload-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .evidence-item { grid-template-columns: 1fr; }
  .evidence-item time { grid-column: 1; grid-row: auto; text-align: left; }
  h1 { font-size: 2.35rem; }
}

@media (max-width: 480px) {
  .pulse-grid { grid-template-columns: 1fr; }
  .pulse-card { min-height: 132px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .mode-pill { justify-content: center; }
  .system-grid { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: 1fr; }
  .outcome-strip { padding: 14px; background: linear-gradient(155deg,var(--dark-plum) 0 23%,var(--white) 23%); }
  .outcome-metrics { grid-template-columns: 1fr; }
  .workflow-state { grid-template-columns: 1fr; }
}

@media (max-width: 410px) {
  .topbar { gap: 8px; padding-inline: 8px; }
  .mobile-brand { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .mobile-brand .mobile-brand-mark { width: 40px; }
  .mobile-brand span { display: none; }
  .prototype-badge { min-width: 88px; padding-inline: 6px; font-size: .8125rem; letter-spacing: 0; }
  .agent-call-facts, .agent-source-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
