:root {
  --app-bg: #f4f6f8;
  --surface-soft: #f8f9fb;
  --text: #17202b;
  --muted: #687381;
  --faint: #929ba7;
  --border: #e1e5e9;
  --border-strong: #cbd2da;
  --accent: #3554b5;
  --accent-hover: #29469f;
  --accent-soft: #eef1fb;
  --ai: #665bb9;
  --ai-soft: #f3f1fa;
  --success: #19745c;
  --success-soft: #eaf5f1;
  --warning: #9b6118;
  --warning-soft: #fff5e4;
  --danger: #b54b4b;
  --sidebar: 208px;
  --radius: 8px;
  --surface-bg: #ffffff;
  --surface-border: #dde2e8;
  --surface-radius: 8px;
  --surface-radius-large: 10px;
  --surface-padding-x: 16px;
  --surface-padding-y: 12px;
  --conversation-width: 780px;
  --conversation-indent: 44px;
  --conversation-object-width: calc(var(--conversation-width) - var(--conversation-indent));
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --elevation-0: none;
  --elevation-1: 0 1px 2px rgba(31,42,57,.025), 0 4px 10px rgba(31,42,57,.035);
  --elevation-2: 0 2px 4px rgba(31,42,57,.03), 0 8px 20px rgba(31,42,57,.05);
  --elevation-modal: 0 10px 28px rgba(25,34,49,.11), 0 24px 64px rgba(25,34,49,.09);
  color-scheme: light;
  font-family: Avenir Next, Avenir, Helvetica Neue, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--app-bg); color: var(--text); font-size: 13px; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #6178d0; outline-offset: 2px; }
svg { display: block; }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); width: 100%; height: 100%; min-width: 1000px; transition: grid-template-columns 180ms ease; }
.app.nav-collapsed { --sidebar: 56px; }
.sidebar { position: relative; z-index: 5; display: flex; min-height: 0; flex-direction: column; padding: 14px 10px 12px; border-right: 1px solid var(--border); background: #fbfcfd; overflow: hidden; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 6px; background: #17202b; color: white; font-size: 12px; letter-spacing: 0; }
.collapse-nav { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 5px; background: white; color: var(--muted); }
.collapse-nav .icon, .collapse-nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav { min-height: 0; overflow-y: auto; scrollbar-width: none; }
.nav-group { margin-bottom: 10px; }
.nav-group p { margin: 0 8px 3px; color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-group button { display: flex; width: 100%; height: 31px; align-items: center; gap: 9px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: #54606d; font-size: 11px; text-align: left; white-space: nowrap; }
.nav-group button:hover { background: #f0f2f5; color: var(--text); }
.nav-group button.selected { background: #e9edf7; color: #293f84; font-weight: 700; }
.nav-icon { display: grid; width: 18px; flex: 0 0 18px; place-items: center; }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--border); white-space: nowrap; }
.user > span:last-child { display: grid; gap: 2px; }
.user strong { font-size: 10px; }
.user small { color: var(--muted); font-size: 8px; }
.avatar { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 50%; background: #dfe4eb; color: #485463; font-size: 9px; font-weight: 700; }
.nav-collapsed .sidebar { padding-inline: 12px; }
.nav-collapsed .sidebar-head { justify-content: center; }
.nav-collapsed .nav-label, .nav-collapsed .nav-group p, .nav-collapsed .brand, .nav-collapsed .user .nav-label { display: none; }
.nav-collapsed .collapse-nav { width: 30px; height: 30px; border-color: transparent; background: #f0f2f5; }
.nav-collapsed .collapse-nav svg { transform: rotate(180deg); }
.nav-collapsed .nav-group button { justify-content: center; padding: 0; }
.nav-collapsed .nav-icon { width: 20px; }
.nav-collapsed .user { justify-content: center; }

.main { min-width: 0; height: 100%; overflow: auto; background: var(--app-bg); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-family: Georgia, Times New Roman, serif; font-size: 26px; font-weight: 600; letter-spacing: 0; line-height: 1.2; }
h2 { letter-spacing: 0; }
.breadcrumb { margin: 0 0 12px; color: var(--muted); font-size: 10px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 6px; background: white; color: #33404f; font-size: 11px; font-weight: 600; white-space: nowrap; }
.button:hover { border-color: #aeb8c4; background: var(--surface-soft); }
.button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: white; }
.button.tertiary { border-color: transparent; background: transparent; color: var(--accent); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button .icon { width: 15px; height: 15px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.back-link .icon { width: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: #a3acb7; content: ""; }
.status.active { color: var(--success); }
.status.active::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

.settings-layout { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 100%; }
.settings-nav { padding: 24px 13px; border-right: 1px solid #e5e8ec; background: #fafbfc; }
.settings-nav > div { display: flex; align-items: center; gap: 8px; margin: 0 7px 17px; }
.settings-nav > div > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; background: #e8ebf0; }
.settings-nav > div strong { font-size: 12px; }
.settings-nav button { width: 100%; height: 32px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; text-align: left; }
.settings-nav button.selected { background: #edf0f6; color: #3d4d78; font-weight: 600; }
.settings-content { width: min(990px, calc(100% - 56px)); margin: 0 auto; padding: 40px 0 60px; }
.page-header.compact { margin-bottom: 25px; }
.page-header > p:last-child { margin: 0; color: var(--muted); }
.agent-list { display: grid; border-top: 1px solid var(--border); }
.agent-card { display: grid; grid-template-columns: minmax(0, 1fr) 130px 110px; min-height: 92px; align-items: center; gap: 20px; padding: 15px 4px; border-bottom: 1px solid var(--border); }
.agent-identity { display: flex; align-items: flex-start; gap: 13px; }
.agent-symbol { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #ced4e7; border-radius: 7px; background: white; color: var(--ai); }
.agent-symbol.large { width: 42px; height: 42px; }
.agent-copy h2 { margin: 0 0 4px; font-size: 13px; }
.agent-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.agent-card .button { justify-self: end; }

.entry-page { max-width: 900px; }
.entry-page > .breadcrumb { margin-top: 18px; }
.agent-hero.compact { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.title-line { display: flex; align-items: center; gap: 14px; }
.title-line h1 { margin-bottom: 5px; font-size: 23px; }
.agent-hero p { max-width: 700px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.readiness-line { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px; min-height: 45px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.readiness-line > span:first-child { display: flex; align-items: center; gap: 6px; color: var(--text); }
.readiness-line > span:last-child { justify-self: end; }
.entry-heading { margin: 27px 0 15px; }
.entry-heading h2 { margin-bottom: 4px; font-size: 15px; }
.entry-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.setup-options { display: grid; grid-template-columns: 1.45fr .75fr; gap: 12px; align-items: stretch; }
.guided-option, .manual-option { display: flex; min-height: 240px; flex-direction: column; padding: 20px; border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: var(--surface-bg); }
.guided-option { border-color: #cbd3e8; background: linear-gradient(145deg, #fff 55%, #f8f9fd); box-shadow: var(--elevation-2); }
.manual-option { box-shadow: var(--elevation-0); }
.guided-option .agent-symbol { border-color: #cbd3e8; background: #f8f9fe; box-shadow: var(--elevation-1); }
.option-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; }
.option-top h3, .manual-option h3 { margin: 2px 0 6px; font-size: 14px; }
.option-top p, .manual-option p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.recommend-label { color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.mini-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 7px; margin: 18px 0; padding: 12px; border-radius: 6px; background: rgba(238, 241, 251, .72); }
.mini-flow span { display: flex; align-items: center; gap: 5px; color: #5f6b7a; font-size: 10.5px; line-height: 1.3; }
.mini-flow i { color: #9aa4b7; }
.mini-flow .icon { width: 14px; }
.guided-option > .button, .manual-option > .button { align-self: flex-start; margin-top: auto; }
.manual-option { justify-content: flex-start; }
.manual-option > div { display: flex; justify-content: space-between; }
.manual-option .button { width: auto; }

.manual-shell, .guided-shell { height: 100%; }
.workspace-header { display: flex; height: 58px; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--border); background: white; }
.workspace-header h1 { margin: 2px 0 0; font-family: Avenir Next, Avenir, Helvetica Neue, sans-serif; font-size: 14px; font-weight: 600; }
.manual-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); height: calc(100% - 58px); }
.manual-steps { padding: 18px 11px; border-right: 1px solid var(--border); background: #f8f9fb; }
.manual-steps button { display: flex; width: 100%; min-height: 34px; align-items: center; gap: 8px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; text-align: left; }
.manual-steps button span { color: var(--faint); font-size: 8px; }
.manual-steps button.current { background: #e8ecf5; color: #304482; font-weight: 700; }
.manual-content { overflow: auto; padding: 27px 32px 60px; }
.assist-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; max-width: 850px; margin-bottom: 27px; padding: 12px 14px; border: 1px solid #d7daee; border-radius: var(--radius); background: var(--ai-soft); }
.assist-banner > span { color: var(--ai); }
.assist-banner p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 6px; font-size: 18px; }
.section-heading > p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.requirements { max-width: 850px; border: 1px solid var(--border); border-radius: var(--radius); background: white; overflow: hidden; }
.requirement { display: grid; grid-template-columns: 24px 1fr auto; min-height: 48px; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.requirement:last-child { border: 0; }
.requirement-icon { color: var(--warning); }
.requirement-icon.ready { color: var(--success); }
.requirement div { display: grid; gap: 2px; }
.requirement strong { font-size: 11px; }
.requirement small { color: var(--muted); font-size: 10.5px; }
.requirement button { display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--accent); font-size: 10.5px; }
.requirement button .icon { width: 12px; }
.meta.success { color: var(--success); font-size: 10.5px; font-weight: 600; }
.manual-note { width: fit-content; margin-top: 12px; padding: 7px 10px; border-radius: 5px; background: var(--warning-soft); color: var(--warning); font-size: 10.5px; font-weight: 600; }
.manual-module { display: flex; max-width: 850px; min-height: 110px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.manual-module > div { display: flex; align-items: center; gap: 12px; }
.manual-module > div > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.manual-module p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }

/* Single conversational guided workspace */
.guided-shell { position: relative; display: grid; grid-template-rows: 44px 44px minmax(0, 1fr); overflow: hidden; background: #f6f7f9; }
.guided-header { display: flex; height: 44px; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--border); background: white; }
.guided-context { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 0; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.guided-context strong { color: #34404d; font-weight: 600; }
.guided-context > span:first-of-type { color: #a1a8b1; }
.guided-context .icon { width: 14px; }
.reset-control { justify-self: end; padding: 5px; border: 0; background: transparent; color: var(--muted); font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.progress-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.94); }
.module-tracker { display: flex; min-width: 0; align-items: center; padding: 0; background: transparent; }
.module { position: relative; display: flex; min-width: 0; align-items: center; gap: 6px; padding: 0 14px 0 0; border: 0; background: transparent; color: #929aa5; font-size: 9.5px; overflow: hidden; }
.module::after { width: 20px; height: 1px; margin-left: 8px; background: #e0e4e9; content: ""; }
.module:last-child::after { display: none; }
.module > span { display: grid; width: 14px; height: 14px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #d6dbe1; color: transparent; font-size: 0; }
.module strong { min-width: 0; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.module.current { color: #24376e; }
.module.current > span { width: 9px; height: 9px; margin: 0 2px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.module.complete { color: #4f5b68; }
.module.complete > span { width: 16px; height: 16px; background: var(--success-soft); color: var(--success); }
.module.complete:hover { color: #2e436f; }
.module.complete:hover strong { text-decoration: underline; text-decoration-color: #c7cfdf; text-underline-offset: 3px; }
.module.attention { color: var(--warning); }
.module.attention > span { width: 16px; height: 16px; background: var(--warning-soft); color: var(--warning); }
.module .icon { width: 13px; height: 13px; }
.module:disabled { cursor: default; }
.progress-context { padding-left: 18px; color: #6d7784; font-size: 10px; font-weight: 600; white-space: nowrap; }
.conversation-shell { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; overflow: hidden; }
.conversation { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 32px max(24px, calc((100% - var(--conversation-width)) / 2)) 52px; }
.timeline-event { position: relative; width: min(100%, var(--conversation-width)); margin-inline: auto; }
.assistant-event { margin-top: 30px; }
.assistant-event:first-child { margin-top: 0; }
.structured-event { margin-top: 14px; margin-bottom: 24px; }
.decision-event { margin-top: 10px; margin-bottom: 28px; }
.decision-event.resolved, .resolved { display: none; }
.decision-event > .button { margin-left: var(--conversation-indent); }
.completion-event { margin-top: 30px; margin-bottom: 34px; }
.user-event { margin-top: 28px; margin-bottom: 28px; }
.answer-event { margin-top: 8px; }
.resume-event { margin-top: 14px; margin-bottom: 28px; }
.message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; width: 100%; margin: 0; }
.ai-avatar { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d1d4e9; border-radius: 7px; background: var(--ai-soft); color: var(--ai); }
.ai-avatar .icon { width: 16px; }
.message-content { padding-top: 2px; }
.message-author { display: block; margin-bottom: 5px; color: #7770a0; font-size: 10.5px; font-weight: 500; letter-spacing: .02em; }
.message-content h2 { max-width: 680px; margin: 0 0 8px; font-family: Avenir Next, Avenir, Helvetica Neue, sans-serif; font-size: 15px; font-weight: 600; line-height: 1.45; }
.message-content p { max-width: 680px; margin: 0 0 8px; color: #4f5b68; font-size: 12.5px; line-height: 1.62; }
.message-content .message-lead { margin-bottom: 6px; color: #202a36; font-size: 14px; font-weight: 600; line-height: 1.52; }
.message-content .milestone-lead { font-size: 15px; }
.message-content .button { margin-top: 6px; }
.assistant-event.fresh .message, .answer-event.fresh .message { animation: message-in 200ms ease-out both; }
.user-event.fresh .mona-message { animation: message-in 150ms ease-out both; }
@keyframes message-in { from { transform: translateY(3px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.message.continuation .ai-avatar { height: 20px; border-color: transparent; background: transparent; }
.message.continuation .ai-avatar .icon { width: 12px; opacity: .55; }
.mona-row { display: flex; width: 100%; justify-content: flex-end; margin: 0; }
.mona-message { max-width: 68%; padding: 11px 14px; border: 0; border-radius: 9px 9px 3px 9px; background: #e9eefb; color: #2f3e62; font-size: 12px; line-height: 1.55; }
.mona-message span { display: none; }
.structured-card, .receipt, .test-workbench, .test-summary, .deploy-summary, .active-card, .deployment-running { width: calc(100% - var(--conversation-indent)); margin: 0 0 0 var(--conversation-indent); border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: var(--surface-bg); box-shadow: var(--elevation-1); overflow: hidden; }
.surface-level-1 { box-shadow: var(--elevation-1); }
.surface-level-2 { box-shadow: var(--elevation-2); }
.structured-card > header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--surface-padding-y) var(--surface-padding-x); border-bottom: 1px solid #e7eaee; background: #fbfcfd; }
.structured-card > header > div { display: flex; align-items: center; gap: 9px; }
.structured-card header strong, .receipt header strong { font-size: 12px; }
.structured-card header small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.card-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.card-icon .icon { width: 15px; }
.can-grid span, .signal-strip span, .scenario-body section > span { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0; color: #4f5b68; font-size: 10.5px; line-height: 1.45; }
.can-grid span .icon, .signal-strip span .icon, .scenario-body span .icon { width: 12px; height: 12px; flex: 0 0 auto; color: var(--success); }
.choice-list { display: grid; }
.choice-row { position: relative; display: grid; grid-template-columns: 27px minmax(130px, 1fr) 115px 155px; min-height: 45px; align-items: center; gap: 7px; padding: 0 13px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 10.5px; text-align: left; }
.choice-row:last-child { border: 0; }
.choice-row:hover { background: #fafbfc; }
.choice-row.selected { background: #f3f5fc; }
.choice-row strong { color: var(--text); font-size: 11px; }
.choice-row em { position: absolute; top: 4px; right: 7px; color: var(--accent); font-size: 6px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.select-box { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid var(--border-strong); border-radius: 4px; }
.selected .select-box { border-color: var(--accent); background: var(--accent); color: white; }
.select-box .icon { width: 11px; }
.action-row { display: flex; width: calc(100% - var(--conversation-indent)); flex-wrap: wrap; gap: var(--space-xs); margin: 0 0 0 var(--conversation-indent); }
.option-pair { display: grid; width: calc(100% - var(--conversation-indent)); grid-template-columns: 1fr 1fr; gap: var(--space-sm); margin: 0 0 0 var(--conversation-indent); }
.option-pair > button { display: grid; grid-template-columns: auto 1fr; gap: var(--space-sm); min-height: 126px; padding: var(--space-md); border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: var(--surface-bg); box-shadow: var(--elevation-1); text-align: left; transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.option-pair > button:hover { border-color: #aab5db; box-shadow: var(--elevation-2); }
.option-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.option-pair strong { font-size: 11px; }
.option-pair p { margin: 7px 0 15px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.option-pair small { color: var(--accent); font-size: 10.5px; font-weight: 600; }
.impact-label { color: var(--warning); font-size: 10.5px; font-weight: 600; }
.can-grid { display: grid; grid-template-columns: 1fr 1fr; }
.can-grid > div { padding: 11px 14px; }
.can-grid > div + div { border-left: 1px solid var(--border); background: #fafbfc; }
.can-grid h4 { margin: 0 0 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; }
.can-grid > div + div .icon { color: var(--muted); }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.profile-facts > div { display: grid; gap: 4px; padding: 12px; border-right: 1px solid var(--border); }
.profile-facts > div:last-child { border: 0; }
.profile-facts span { color: var(--muted); font-size: 10.5px; }
.profile-facts strong { font-size: 11px; }
.signal-strip { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 12px; border-top: 1px solid var(--border); background: #fafbfc; }
.text-action { padding: 4px; border: 0; background: transparent; color: var(--accent); font-size: 10.5px; font-weight: 700; }
.choice-list.compact .choice-row { grid-template-columns: 27px 1fr 100px; }
.eligibility-check { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); background: #fafbfc; }
.eligibility-check div { display: flex; align-items: baseline; gap: 6px; padding: 10px 13px; border-right: 1px solid var(--border); }
.eligibility-check div:last-child { border: 0; }
.eligibility-check strong { font-size: 14px; }
.eligibility-check span { color: var(--muted); font-size: 10.5px; }
.eligibility-check .attention { background: var(--warning-soft); color: var(--warning); }
.receipt { padding: 0; }
.receipt > header { display: flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding: 0 var(--space-md); color: var(--success); }
.receipt.attention > header { color: var(--warning); }
.receipt > header .icon { width: 14px; }
.receipt > div { display: grid; grid-template-columns: minmax(120px, .55fr) 1fr; min-height: 30px; align-items: center; gap: var(--space-sm); padding: 0 var(--space-md); border-top: 1px solid #edf0f3; }
.receipt > div:last-child { border: 0; }
.receipt > div span { color: var(--muted); font-size: 10.5px; }
.receipt > div strong { font-size: 10.5px; }
.working-message { display: flex; width: calc(100% - var(--conversation-indent)); align-items: center; gap: 7px; margin: 16px 0 16px var(--conversation-indent); color: var(--ai); }
.working-message strong { margin-right: 4px; font-size: 9px; }
.working-message i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: working 900ms ease-in-out infinite alternate; }
.working-message i:nth-last-child(2) { animation-delay: 150ms; }
.working-message i:last-child { animation-delay: 300ms; }
@keyframes working { to { transform: translateY(-3px); opacity: .35; } }
.scenario-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); background: #f8f9fb; }
.scenario-tabs button { display: grid; gap: 3px; padding: 10px 12px; border: 0; border-right: 1px solid var(--border); border-bottom: 2px solid transparent; background: transparent; text-align: left; }
.scenario-tabs button:last-child { border-right: 0; }
.scenario-tabs button.selected { border-bottom-color: var(--accent); background: white; }
.scenario-tabs span { font-size: 10.5px; font-weight: 600; }
.scenario-tabs small { color: var(--muted); font-size: 10.5px; }
.scenario-detail > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.scenario-detail > header h3 { margin: 3px 0 0; color: var(--success); font-size: 15px; }
.scenario-detail.attention > header h3 { color: var(--warning); }
.scenario-detail.neutral > header h3 { color: var(--muted); }
.scenario-name { display: block; margin-bottom: 4px; font-size: 12px; }
.scenario-label { color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.scenario-profile { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); background: #fbfcfd; }
.scenario-profile div { display: grid; gap: 3px; padding: 9px 13px; border-right: 1px solid var(--border); }
.scenario-profile div:last-child { border: 0; }
.scenario-profile span { color: var(--muted); font-size: 10.5px; }
.scenario-profile strong { font-size: 10.5px; }
.scenario-body { display: grid; grid-template-columns: .9fr 1.1fr; }
.scenario-body section { padding: 13px; }
.scenario-body section + section { border-left: 1px solid var(--border); }
.scenario-body h4 { margin: 0 0 8px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; }
.scenario-body blockquote { margin: 0 0 13px; padding: 10px 11px; border-left: 2px solid #9ca7d3; background: var(--accent-soft); color: #48546c; font-size: 10.5px; line-height: 1.55; }
.scenario-body ol { margin: 0 0 8px; padding-left: 17px; color: #4f5b68; font-size: 10.5px; line-height: 1.7; }
.scenario-body section > span { font-size: 10.5px; }
.expected-behavior { display: flex; align-items: center; gap: 6px; margin-top: 11px; padding: 8px 9px; border-radius: 5px; background: var(--warning-soft); color: var(--warning); font-size: 10.5px; font-weight: 600; }
.expected-behavior .icon { width: 13px; }
.outreach-preview { margin-top: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 5px; background: #fafbfc; }
.outreach-preview p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.test-summary > header { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 13px; border-bottom: 1px solid #cfe3dc; background: var(--success-soft); color: var(--success); }
.test-summary > header small { display: block; color: #55796e; font-size: 10.5px; }
.test-summary > div { display: grid; grid-template-columns: 1fr auto; min-height: 31px; align-items: center; padding: 0 13px; border-bottom: 1px solid var(--border); }
.test-summary > div:last-child { border: 0; }
.test-summary > div span { color: var(--muted); font-size: 10.5px; }
.test-summary > div strong { font-size: 10.5px; }
.deploy-summary { display: grid; grid-template-columns: repeat(3, 1fr); }
.deploy-summary > div { display: grid; gap: 5px; min-height: 61px; padding: 11px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.deploy-summary > div:nth-child(3n) { border-right: 0; }
.deploy-summary > div:nth-last-child(-n+3) { border-bottom: 0; }
.deploy-summary span { color: var(--muted); font-size: 10.5px; }
.deploy-summary strong { font-size: 10.5px; }
.active-card { border-color: #cbded7; box-shadow: var(--elevation-2); }
.active-hero { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); border-bottom: 1px solid #e6ecea; background: #fbfdfc; }
.active-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #bcd8ce; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.active-mark .icon { width: 20px; }
.active-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.active-stats { display: grid; grid-template-columns: .8fr .7fr 1.3fr 1fr; }
.active-stats span { display: grid; gap: 3px; padding: var(--space-sm) var(--space-md); border-right: 1px solid #eceff1; color: var(--muted); font-size: 10.5px; }
.active-stats span:last-child { border: 0; }
.active-stats strong { color: var(--text); font-size: 14px; font-weight: 600; }
.active-card > footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: 10px var(--space-md); border-top: 1px solid #e6ecea; background: #f7faf9; }
.active-card > footer strong { color: #31574c; font-size: 10.5px; font-weight: 600; }
.active-card > footer span { color: #6c7975; font-size: 10.5px; }
.deployment-running { box-shadow: var(--elevation-1); }
.deployment-running > header { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid #e7eaee; }
.deployment-running header > div { display: grid; gap: 2px; }
.deployment-running header strong { font-size: 12px; font-weight: 600; }
.deployment-running header small { color: var(--muted); font-size: 10.5px; }
.deployment-running > div { display: grid; grid-template-columns: repeat(3, 1fr); padding: var(--space-sm) var(--space-md); }
.deployment-running > div span { display: flex; align-items: center; gap: 6px; color: #50605b; font-size: 10.5px; opacity: 0; animation: verify-in 180ms ease-out forwards; }
.deployment-running > div span:nth-child(2) { animation-delay: 180ms; }
.deployment-running > div span:nth-child(3) { animation-delay: 360ms; }
.deployment-running > div .icon { width: 13px; color: var(--success); }
@keyframes verify-in { from { transform: translateY(2px); opacity: 0; } to { transform: none; opacity: 1; } }
.dependency-warning { display: flex; width: calc(100% - var(--conversation-indent)); align-items: center; gap: var(--space-xs); margin: var(--space-sm) 0 var(--space-sm) var(--conversation-indent); padding: var(--space-sm); border: 1px solid #ead5b1; border-radius: 6px; background: var(--warning-soft); color: var(--warning); font-size: 10px; font-weight: 700; }

.object { width: calc(100% - var(--conversation-indent)); margin: 0 0 0 var(--conversation-indent); border-radius: var(--surface-radius); overflow: hidden; }
.object > header { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.object > header > div { display: grid; gap: 3px; }
.object-kicker { color: #6c7582; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.object header strong { font-size: 12px; }
.selection-object { border: 1px solid var(--surface-border); background: #fcfdff; box-shadow: var(--elevation-1); }
.selection-object > header { border-bottom: 1px solid #e4e7ec; background: #f3f6fb; }
.selection-rows { display: grid; }
.selection-row { position: relative; display: grid; grid-template-columns: 28px minmax(170px, 1fr) 120px 120px; min-height: 46px; align-items: center; gap: var(--space-xs); padding: 0 var(--space-md); border: 0; border-bottom: 1px solid #e7e9ed; background: white; color: #687381; font-size: 10.5px; text-align: left; transition: background 140ms ease; }
.selection-row:last-child { border-bottom: 0; }
.selection-row:disabled { cursor: default; opacity: 1; }
.selection-row strong { color: #27313d; font-size: 11.5px; }
.selection-row em { justify-self: end; color: #7a8491; font-size: 10px; font-style: normal; }
.selection-row.selected .select-box { border-color: var(--accent); background: var(--accent); color: white; }
.object-total { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); border-top: 1px solid #e1e5ea; background: #f8f9fb; }
.object-total span { color: #747e8a; font-size: 10.5px; text-transform: uppercase; }
.object-total strong { font-size: 11px; }
.object-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-top: 1px solid #e0e4e9; background: white; }
.output-object { padding: 14px; border-left: 3px solid #7c89c5; background: #eef1f8; }
.output-object > header { min-height: auto; padding: 0 0 12px; }
.output-badge { padding: 3px 6px; border-radius: 4px; background: white; color: #697595; font-size: 10.5px; font-weight: 600; }
.rule-expression { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 6px; background: white; font-size: 11px; }
.rule-expression span { color: #7a8490; font-size: 10.5px; font-weight: 600; }
.rule-disclosure { margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 10.5px; font-weight: 600; }
.permission-object { border: 1px solid #d8d1e7; background: #faf9fd; }
.permission-object > header { justify-content: flex-start; border-bottom: 1px solid #e3deec; color: #665b8f; }
.permission-object > header .icon { width: 20px; height: 20px; }
.permission-boundaries { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); padding: var(--space-md); }
.permission-boundaries section { display: grid; align-content: start; gap: var(--space-xs); }
.permission-boundaries h4 { margin: 0 0 2px; color: #5b6473; font-size: 10.5px; font-weight: 600; }
.permission-boundaries span { display: flex; align-items: flex-start; gap: 7px; color: #596575; font-size: 10.5px; line-height: 1.4; }
.permission-boundaries .icon { width: 14px; flex: 0 0 auto; color: var(--success); }
.permission-boundaries section + section .icon { color: #7b8290; }
.system-summary { width: calc(100% - var(--conversation-indent)); margin: 0 0 0 var(--conversation-indent); border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: #fbfcfd; box-shadow: var(--elevation-0); overflow: hidden; }
.system-summary > header { display: flex; align-items: baseline; justify-content: space-between; padding: var(--space-sm) var(--space-md) var(--space-xs); }
.system-summary > header strong { font-size: 12px; }
.system-summary > header span { color: var(--muted); font-size: 10.5px; }
.readiness-status { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 var(--space-md) var(--space-sm); }
.readiness-status > span { display: flex; align-items: baseline; gap: 6px; color: #65716f; font-size: 10.5px; }
.readiness-status strong { color: #33413d; font-size: 16px; }
.readiness-status .attention, .readiness-status .attention strong { color: var(--warning); }
.system-summary > footer { padding: var(--space-xs) var(--space-sm); border-top: 1px solid #edf0f1; }
.module-completion { width: calc(100% - var(--conversation-indent)); margin-left: var(--conversation-indent); text-align: center; }
.completion-line { display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; gap: var(--space-xs); }
.completion-line > i { height: 1px; background: #dce3e2; }
.completion-check { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.completion-check .icon { width: 14px; }
.module-completion strong { font-size: 11.5px; }
.module-completion p { margin: 8px 0 0; color: #697570; font-size: 10.5px; }
.knowledge-rows > div { display: grid; grid-template-columns: 24px 1fr auto; min-height: 44px; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid #e5e8ec; background: white; }
.knowledge-rows > div:last-child { border: 0; }
.knowledge-rows strong { font-size: 11px; }
.knowledge-rows small { color: var(--success); font-size: 10.5px; }
.knowledge-rows .unavailable { background: #fafbfc; color: #7c8691; }
.knowledge-rows .unavailable small, .knowledge-rows .unavailable span { color: var(--warning); }
.external-step { border: 1px solid #e3cfae; background: #fffaf1; }
.external-step-main { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); }
.external-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: #f6e7cc; color: var(--warning); }
.external-step-main > div { display: grid; gap: 2px; }
.external-step-main > div > strong { font-size: 12px; }
.external-step p { margin: 0; color: #736955; font-size: 10.5px; }
.eligibility-inline { display: grid; width: calc(100% - var(--conversation-indent)); grid-template-columns: repeat(3, 1fr); margin-left: var(--conversation-indent); border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: white; box-shadow: var(--elevation-0); overflow: hidden; }
.eligibility-inline span { padding: 11px 13px; border-right: 1px solid #e3e6ea; color: #64707d; font-size: 10.5px; }
.eligibility-inline span:last-child { border: 0; }
.eligibility-inline strong { margin-right: 4px; color: #27313d; font-size: 14px; }
.eligibility-inline .attention { background: var(--warning-soft); color: var(--warning); }
.configuration-milestone { width: calc(100% - var(--conversation-indent)); margin-left: var(--conversation-indent); border: 1px solid #cbded7; border-radius: var(--surface-radius); background: white; box-shadow: var(--elevation-1); overflow: hidden; }
.configuration-milestone > header { display: flex; align-items: center; gap: 10px; padding: 14px; background: #eaf5f1; color: var(--success); }
.configuration-milestone header > .icon { width: 22px; height: 22px; }
.configuration-milestone header span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.configuration-milestone header strong { display: block; margin-top: 2px; color: #24483d; font-size: 14px; }
.configuration-milestone > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 13px 14px; }
.configuration-milestone > div span { display: flex; align-items: center; gap: 6px; color: #4f625c; font-size: 10.5px; }
.configuration-milestone > div .icon { width: 13px; color: var(--success); }
.test-running { display: grid; width: calc(100% - var(--conversation-indent)); grid-template-columns: repeat(3, 1fr); margin-left: var(--conversation-indent); border: 1px solid var(--surface-border); border-radius: var(--surface-radius); background: #f4f6fb; box-shadow: var(--elevation-1); }
.test-running span { display: flex; align-items: center; gap: 7px; padding: 12px; color: #4f5c78; font-size: 10.5px; }
.test-running .icon { width: 14px; color: var(--ai); }
.resume-label { display: flex; align-items: center; gap: 9px; margin: 0 0 9px 44px; color: #727d89; font-size: 10.5px; font-weight: 600; }
.resume-label i { height: 1px; flex: 1; background: #dfe3e7; }
.review-overlay { position: absolute; z-index: 8; top: 58px; right: 18px; width: min(390px, calc(100% - 36px)); padding-bottom: 14px; border: 1px solid #d6dbe2; border-radius: var(--surface-radius-large); background: white; box-shadow: var(--elevation-modal); }
.review-overlay > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.review-overlay header span { color: #78838f; font-size: 10px; }
.review-overlay h2 { margin: 2px 0 0; font-size: 15px; }
.review-overlay header button { width: 28px; height: 28px; border: 0; background: transparent; font-size: 18px; }
.review-overlay .receipt { width: auto; margin: 14px; }
.review-overlay > footer { display: flex; gap: 7px; padding: 0 14px; }
@keyframes object-in { from { transform: translateY(3px) scale(.997); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes intelligent-edge { 0% { box-shadow: 0 0 0 1px rgba(70,93,181,.38), 0 3px 10px rgba(73,86,165,.07); } 55% { box-shadow: 0 0 0 1px rgba(79,155,181,.17), var(--elevation-1); } 100% { box-shadow: var(--elevation-1); } }
.structured-event.fresh > :is(.object, .structured-card, .receipt, .system-summary, .test-workbench, .test-summary, .deploy-summary, .active-card, .deployment-running, .configuration-milestone, .test-running, .eligibility-inline) { animation: object-in 300ms ease-out both, intelligent-edge 680ms ease-out both; }
.assistant-event.fresh + .structured-event.fresh > :is(.object, .structured-card, .receipt, .system-summary, .test-workbench, .test-summary, .deploy-summary, .active-card, .deployment-running, .configuration-milestone, .test-running, .eligibility-inline) { animation-delay: 100ms; }
.completion-event.fresh + .assistant-event.fresh .message { animation-delay: 220ms; }
.completion-event.fresh .completion-line > i { animation: line-in 300ms ease-out both; transform-origin: center; }
.completion-event.fresh .completion-check { animation: completion-in 220ms 100ms ease-out both; }
@keyframes completion-in { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes line-in { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

.composer-wrap { position: relative; z-index: 0; width: min(var(--conversation-width), calc(100% - 48px)); margin: 0 auto 12px; }
.composer-wrap::before { position: absolute; z-index: 0; right: -16px; bottom: -12px; left: -16px; height: 92px; background: linear-gradient(transparent, #f6f7f9 30%); content: ""; pointer-events: none; }
.composer-wrap > * { position: relative; z-index: 1; }
.chat-composer { display: grid; width: 100%; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 0; padding: 8px 9px 8px 13px; border: 1px solid #cbd2dc; border-radius: var(--surface-radius-large); background: white; box-shadow: var(--elevation-2); }
.chat-composer > span { color: var(--ai); }
.chat-composer input { width: 100%; min-width: 0; height: 31px; border: 0; outline: 0; background: transparent; font-size: 12.5px; }
.chat-composer input::placeholder { color: #8a939f; }
.chat-composer button { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 6px; background: var(--accent); color: white; }
.chat-composer button .icon { width: 14px; }
.composer-hint { margin: 5px 0 0 12px; padding: 0; border: 0; background: transparent; color: #7b8591; font-size: 10px; }

.platform-shell { min-height: 100%; background: #eef1f4; }
.platform-shell > header { display: flex; height: 54px; align-items: center; justify-content: space-between; padding: 0 22px; background: #202936; color: white; }
.platform-brand { display: flex; align-items: center; gap: 8px; }
.platform-brand span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 5px; background: #516173; font-weight: 700; }
.platform-shell > header > span { color: #b9c1cb; font-size: 9px; }
.platform-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); min-height: calc(100vh - 54px); }
.platform-layout nav { padding: 21px 11px; background: #283341; color: #ccd2d9; }
.platform-layout nav p { padding: 0 8px; color: #919daa; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.platform-layout nav button { display: block; width: 100%; height: 34px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: inherit; font-size: 10px; text-align: left; }
.platform-layout nav button.selected { background: #3a4757; color: white; }
.platform-layout main { padding: 36px; }
.platform-lead { margin-bottom: 25px; color: var(--muted); }
.platform-setting { display: flex; max-width: 780px; align-items: center; justify-content: space-between; padding: 19px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.platform-setting > div { display: flex; align-items: center; gap: 12px; }
.platform-setting h2 { margin: 0 0 6px; font-size: 14px; }
.platform-setting p { margin: 0 0 6px; color: var(--muted); font-size: 10.5px; }
.platform-setting small { color: var(--faint); font-size: 10.5px; }
.toggle { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: white; }
.toggle > span { position: relative; width: 30px; height: 17px; border-radius: 10px; background: #b8c0c9; }
.toggle > span::after { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: white; content: ""; transition: transform 150ms ease; }
.toggle.on > span { background: var(--success); }
.toggle.on > span::after { transform: translateX(13px); }
.toggle b { min-width: 44px; font-size: 10.5px; }
.platform-layout main > .button { margin-top: 15px; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(25,32,43,.46); animation: backdrop-in 140ms ease-out both; }
.modal { width: min(480px, 100%); max-height: min(680px, calc(100vh - 48px)); border: 1px solid #d9dee6; border-radius: 12px; background: white; box-shadow: var(--elevation-modal); overflow: hidden; animation: modal-in 180ms ease-out both; }
.modal > header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: 17px 20px; border-bottom: 1px solid #e8ebef; }
.modal-heading { display: flex; align-items: center; gap: var(--space-sm); }
.modal-heading > div { display: grid; gap: 2px; }
.modal-heading small { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.modal h2 { margin: 0; font-size: 15px; }
.modal-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.modal-icon .icon { width: 16px; }
.modal-close { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #687381; font-size: 20px; line-height: 1; }
.modal-close:hover { background: #f1f3f6; }
.modal-body { max-height: calc(100vh - 190px); padding: 18px 20px; overflow-y: auto; }
.modal-body > p { margin: 0; color: #596575; font-size: 11.5px; line-height: 1.65; }
.modal > footer { display: flex; justify-content: flex-end; gap: var(--space-xs); padding: 14px 20px 16px; border-top: 1px solid #e8ebef; }
.modal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-top: var(--space-md); }
.modal-columns section { display: grid; align-content: start; gap: var(--space-xs); padding: var(--space-sm); border-radius: 7px; background: #f7f8fa; }
.modal-columns h3 { margin: 0 0 2px; font-size: 10.5px; }
.modal-columns span { display: flex; align-items: flex-start; gap: 6px; color: #596575; font-size: 10.5px; line-height: 1.45; }
.modal-columns .icon { width: 13px; flex: 0 0 auto; color: var(--success); }
.modal-columns section + section .icon { color: #7b8290; }
.modal-checks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.modal-checks > span { display: grid; grid-template-columns: 18px 1fr; align-items: center; min-height: 42px; padding: 6px var(--space-xs); border-radius: 6px; background: #f7f8fa; }
.modal-checks .icon { grid-row: 1 / 3; width: 13px; color: var(--success); }
.modal-checks .external .icon, .modal-checks .permission .icon { color: var(--warning); }
.modal-checks strong { font-size: 10.5px; }
.modal-checks small { color: var(--muted); font-size: 9.5px; }
.modal-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); margin-top: var(--space-md); }
.modal-facts span { display: grid; gap: 3px; padding: var(--space-sm); border-radius: 7px; background: #f5f7fa; color: var(--muted); font-size: 9.5px; }
.modal-facts strong { color: var(--text); font-size: 16px; }
.modal-callout { margin-top: var(--space-md); padding: var(--space-sm); border-left: 2px solid #8796d2; border-radius: 0 6px 6px 0; background: #f2f4fa; color: #536078; font-size: 10.5px; line-height: 1.5; }
.modal-rule, .modal-list { display: grid; gap: var(--space-xs); }
.modal-rule span { display: flex; align-items: center; gap: var(--space-sm); padding: 9px var(--space-sm); border-radius: 6px; background: #f6f7f9; font-size: 10.5px; }
.modal-rule b { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #e7ebf6; color: var(--accent); font-size: 9px; }
.modal-list { grid-template-columns: 1fr 1fr; margin-top: var(--space-md); }
.modal-list span { padding: 9px var(--space-sm); border-radius: 6px; background: #f6f7f9; font-size: 10.5px; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { transform: translateY(4px) scale(.995); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1120px) {
  :root { --sidebar: 192px; }
  .settings-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .settings-content { width: calc(100% - 40px); }
  .module { padding-inline: 4px; }
  .module { padding-right: 10px; font-size: 9.5px; }
  .module::after { width: 12px; margin-left: 7px; }
  .conversation { padding-inline: max(20px, calc((100% - var(--conversation-width)) / 2)); }
}
@media (max-height: 850px) {
  .guided-shell { grid-template-rows: 42px 44px minmax(0, 1fr); }
  .guided-header { height: 42px; }
  .conversation { padding-top: 18px; padding-bottom: 24px; }
  .message-content h2 { font-size: 14px; }
  .message-content p { line-height: 1.5; }
  .structured-card, .receipt, .test-workbench, .test-summary, .deploy-summary { margin-block: 9px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
