@import url("./brand-tokens.css?v=b671ce94d413e180cb03");

/* Playbook authoring: business guidance and its executable process share one home. */
.playbook-library-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.playbook-library-intro h2 { margin: 12px 0; font-size: 30px; }
.playbook-library-intro p { max-width: 630px; margin-bottom: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.playbook-library-intro .eyebrow, .playbook-step-intro .eyebrow { color: var(--forest); }
.playbook-library-steps { display: grid; gap: 20px; padding-left: 28px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.editor-dialog.playbook-create-dialog { width: min(960px, calc(100vw - 32px)); max-width: 960px; }
.playbook-create-dialog .editor-footer { position: sticky; bottom: 0; background: var(--paper); padding-top: 16px; padding-bottom: 16px; z-index: 1; }
.playbook-create-dialog .editor-form { gap: 24px; }
.playbook-guide-fields { display: grid; min-width: 0; margin: 0; padding: 0; gap: 24px; border: 0; }
.playbook-guide-fields > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.playbook-guide-fields label { display: grid; gap: 8px; font-size: 13px; font-weight: 650; }
.playbook-guide-fields label small, .playbook-guide-fields .muted { color: var(--muted); font-weight: 400; font-size: 12px; line-height: 1.65; }
.playbook-guide-fields input:not([type=checkbox],[type=radio]), .playbook-guide-fields select, .playbook-guide-fields textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); }
.playbook-guide-fields textarea { resize: vertical; min-height: 100px; }
.playbook-step-intro h3 { margin: 12px 0; font-size: 24px; letter-spacing: -.025em; }
.playbook-step-intro p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0; }
.playbook-callout { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); font-size: 13px; line-height: 1.65; }
.playbook-callout p { margin: 6px 0 0; color: var(--muted); }
.playbook-callout button { margin-top: 10px; }
.playbook-capability { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.playbook-capability.selected { border-color: var(--forest); }
.playbook-guide-fields .playbook-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.5; }
.playbook-check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--forest); }
.playbook-check > span:nth-child(2) { flex: 1; min-width: 0; }
.playbook-check strong, .playbook-check small { display: block; }
.playbook-check small { margin-top: 5px; }
.playbook-source { margin: 12px 0 0 29px; color: var(--muted); font-size: 12px; }
.playbook-capability-options { display: grid; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.playbook-capability-options p { margin-bottom: 0; }
.playbook-progress { display: flex; gap: 15px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.playbook-progress li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.playbook-progress li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); }
.playbook-progress li[aria-current=step] { color: var(--forest); font-weight: 750; }
.playbook-progress li[aria-current=step] span { color: var(--brand-primary-contrast); background: var(--forest); border-color: var(--forest); }
.playbook-view-switch { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
.playbook-view-switch button { border-radius: 8px; padding: 10px 16px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.playbook-view-switch button[aria-pressed=true] { background: var(--mint); color: var(--forest-dark); }
.playbook-view-switch > span { margin-left: auto; color: var(--muted); font-size: 12px; }
.playbook-guide-panel { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 460px; background: var(--paper); }
.workflow-studio-dialog .playbook-guide-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.workflow-studio-dialog .studio-workflow-view { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: auto; }
.playbook-section-nav { padding: 24px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.playbook-section-nav button { display: flex; align-items: center; gap: 12px; text-align: left; border-radius: 8px; padding: 13px; background: transparent; color: var(--muted); font-size: 13px; }
.playbook-section-nav button span { color: var(--muted); font-size: 11px; }
.playbook-section-nav button[aria-current=step] { background: var(--mint); color: var(--forest-dark); font-weight: 700; }
.playbook-guide-content { max-width: 920px; width: 100%; min-width: 0; padding: 32px 40px; display: grid; gap: 24px; align-content: start; }
.playbook-guide-save { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 22px; border-top: 1px solid var(--line); }
.playbook-guide-save > span { flex: 1; color: var(--muted); font-size: 12px; }
.playbook-notice-preview { margin: 12px 0 0; padding: 16px; border-left: 3px solid var(--forest); background: var(--canvas); white-space: pre-wrap; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.workflow-studio-dialog.has-playbook .console-output, .workflow-studio-dialog.has-playbook .console-head { font-size: 12px; line-height: 1.6; }
.playbook-published-examples > button { display: block; padding: 9px 0; text-align: left; }
/* Saved examples, case runs and immutable publication history. */
.workflow-studio-dialog .playbook-lifecycle-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 32px; background: var(--paper); font-size: 14px; line-height: 1.65; }
.playbook-lifecycle-panel h3 { font-size: 25px; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -.02em; }
.playbook-lifecycle-panel h4 { margin: 0 0 12px; font-size: 17px; }
.playbook-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.playbook-panel-heading p, .playbook-panel-heading > span { color: var(--muted); font-size: 13px; max-width: 660px; margin-bottom: 0; }
.playbook-panel-heading > button { flex: 0 0 auto; }
.playbook-suite-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 16px 20px; margin: 0 0 24px; border: 1px solid var(--line); background: var(--canvas); border-radius: 10px; }
.playbook-suite-summary span { font-size: 12px; color: var(--muted); }
.playbook-examples-layout { display: grid; grid-template-columns: minmax(170px, 250px) minmax(0, 1fr); gap: 32px; }
.playbook-example-list { display: flex; flex-direction: column; align-self: start; gap: 8px; min-width: 0; }
.playbook-example-list button { display: grid; gap: 6px; padding: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); text-align: left; color: var(--ink); }
.playbook-example-list button[aria-current=true] span, .playbook-example-list button[aria-current=true] small { color: var(--forest-dark); }
.playbook-example-list button[aria-current=true] { background: var(--mint); border-color: var(--forest); }
.playbook-example-list strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.playbook-example-list span, .playbook-example-list small { color: var(--muted); font-size: 12px; }
.playbook-example-editor, .playbook-version-detail { min-width: 0; }
.playbook-example-editor form { margin-bottom: 28px; }
.playbook-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.playbook-milestones { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 12px; }
.playbook-milestones legend { font-size: 13px; font-weight: 650; padding: 0 8px; }
.playbook-advanced-example { border-top: 1px solid var(--line); padding-top: 16px; }
.playbook-lifecycle-panel summary { cursor: pointer; font-size: 13px; font-weight: 650; padding: 8px 0; }
.playbook-advanced-example p { margin: 12px 0; color: var(--muted); font-size: 13px; }
.playbook-advanced-example label { margin-bottom: 20px; }
.playbook-advanced-example textarea.code-input { min-height: 150px; font: 12px/1.7 ui-monospace, monospace; }
.playbook-example-result { margin-bottom: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--canvas); }
.playbook-example-result.failed { border-left: 4px solid var(--danger); }
.playbook-result-facts { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 20px 0; }
.playbook-result-facts div { display: grid; gap: 3px; min-width: 100px; }
.playbook-result-facts dt { color: var(--muted); font-size: 12px; }
.playbook-result-facts dd { margin: 0; font-weight: 650; }
.playbook-step-trace { margin: 0; padding: 0 0 0 24px; }
.playbook-step-trace li { padding: 10px 0 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.playbook-step-trace strong { display: inline-block; color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 14px; }
.playbook-panel-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--line); }
.playbook-panel-footer > span { color: var(--muted); font-size: 12px; }
.playbook-json-record { max-height: 320px; overflow: auto; padding: 16px; border-radius: 8px; background: var(--canvas); font-size: 12px; line-height: 1.7; }
.playbook-activation { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; }
.playbook-version-detail > .playbook-callout { margin: 20px 0; }
.playbook-run-filter { display: grid; gap: 8px; font-size: 13px; max-width: 260px; margin-bottom: 24px; }
.playbook-run-filter select { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.playbook-run-list { display: grid; gap: 16px; }
.playbook-run-list article { padding: 22px; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 760px) {
  .workflow-studio-dialog .playbook-lifecycle-panel { padding: 22px 16px; }
  .playbook-panel-heading { flex-wrap: wrap; gap: 14px; }
  .playbook-examples-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .playbook-example-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .playbook-example-list button { min-width: 180px; max-width: 220px; flex: 0 0 auto; }
  .playbook-field-pair { grid-template-columns: minmax(0, 1fr); }
  .playbook-view-switch { overflow-x: auto; }
  .playbook-view-switch button { padding: 10px 12px; }
  .playbook-activation { padding: 16px; }
}
@media (max-width: 760px) {
  .playbook-library-intro { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 24px; }
  .playbook-library-steps { padding-left: 0; border-left: 0; gap: 12px; }
  .playbook-guide-panel { grid-template-columns: minmax(0, 1fr); }
  .playbook-section-nav { flex-direction: row; flex-wrap: wrap; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
  .playbook-section-nav button { padding: 9px; font-size: 12px; gap: 6px; }
  .playbook-guide-content { padding: 22px 16px; }
  .playbook-view-switch { padding: 12px; }
  .playbook-view-switch > span { display: none; }
  .playbook-capability { padding: 15px; }
  .playbook-check .badge { display: none; }
  .playbook-progress { gap: 10px; }
}

:root {
  color-scheme: light;
  --ink: var(--safest-ink-950);
  --muted: var(--safest-stone-650);
  --canvas: var(--safest-parchment-50);
  --paper: var(--safest-paper);
  --line: var(--safest-line);
  --forest: var(--safest-evergreen-800);
  --forest-dark: var(--safest-evergreen-950);
  --mint: var(--safest-mint-100);
  --danger: var(--safest-danger-700);
  --danger-soft: var(--safest-danger-100);
  --sans: var(--safest-font-sans);
  --serif: var(--safest-font-serif);
  --brand-primary-contrast: #ffffff;
  --brand-accent: var(--safest-lime-400);
  --customer-radius: 12px;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); letter-spacing: -.035em; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 50px); line-height: 1; }
h2 { margin-bottom: 6px; font-size: 24px; }
:focus-visible { outline: 3px solid rgba(47, 121, 81, .28); outline-offset: 2px; }

.skip-link { position: fixed; z-index: 100; top: 10px; left: 12px; padding: 9px 12px; border-radius: 8px; color: white; background: var(--forest-dark); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { margin: 0 0 7px; color: #7e8c83; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow.light { color: #b8d2c3; }

.topbar { position: sticky; z-index: 20; top: 0; height: 66px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; flex: 0 0 34px; border-radius: min(11px, var(--customer-radius)); object-fit: contain; }
.customer-brand-fallback { width: 36px; height: 36px; display: grid; place-items: center; border-radius: min(10px, var(--customer-radius)); color: var(--brand-primary-contrast); background: var(--forest); font-size: 10px; font-weight: 850; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 10px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.current-analyst { padding-right: 10px; border-right: 1px solid var(--line); }
.health { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 750; }
.health i { width: 7px; height: 7px; border-radius: 50%; background: #dda13f; box-shadow: 0 0 0 4px rgba(221,161,63,.12); }
.health.ready i { background: #4d936b; box-shadow: 0 0 0 4px rgba(77,147,107,.12); }
.health.failed i { background: var(--danger); }

.login-layout { min-height: calc(100vh - 66px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); }
.login-story { position: relative; overflow: hidden; padding: clamp(54px, 8vw, 124px); display: flex; flex-direction: column; justify-content: center; color: white; background: #123b2b; }
.login-story::after { content: ""; position: absolute; width: 520px; height: 520px; right: -260px; top: -260px; border: 1px solid rgba(218,243,142,.22); border-radius: 50%; box-shadow: 0 0 0 72px rgba(218,243,142,.035), 0 0 0 145px rgba(218,243,142,.02); }
.login-story > * { position: relative; z-index: 1; max-width: 650px; }
.login-story h1 { margin-bottom: 25px; color: white; font-size: clamp(48px, 6.2vw, 82px); letter-spacing: -.055em; }
.login-story > p:not(.eyebrow) { max-width: 560px; color: #c8dbcf; font-size: 17px; line-height: 1.65; }
.login-story ul { margin: 20px 0 0; padding: 0; display: grid; gap: 11px; list-style: none; color: #d9e9df; font-size: 12px; }
.login-story li::before { content: "✓"; margin-right: 9px; color: #d9f48a; font-weight: 900; }
.login-card { width: min(460px, calc(100% - 44px)); margin: auto; padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--safest-shadow-lg); }
.login-card h2 { font-size: 34px; }
.login-card > p:not(.eyebrow, .privacy-note) { margin-bottom: 25px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.login-card form { display: grid; gap: 11px; }
.auth-panel > .auth-copy { margin-bottom: 25px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.react-auth-root > .auth-error { min-height: 16px; margin-top: 10px; }
.auth-panel > .auth-back { margin-top: 7px; }
.auth-panel > .form-message { margin-top: 8px; }
.oauth-buttons { display: grid; gap: 8px; margin-bottom: 16px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 15px 0; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { white-space: nowrap; }
.react-auth-root button:disabled, .react-auth-root input:disabled { cursor: wait; opacity: .68; }
.auth-loading { min-height: 300px; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
label { display: grid; gap: 7px; color: #314139; font-size: 10px; font-weight: 800; }
input, select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cfd7d1; border-radius: 8px; color: var(--ink); background: white; }
input:focus, select:focus { border-color: #68a380; box-shadow: 0 0 0 3px rgba(34,108,70,.1); outline: none; }
.primary, .secondary, .icon-button { min-height: 38px; padding: 9px 14px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.primary { color: var(--brand-primary-contrast); background: var(--forest); }
.primary:hover { background: var(--forest-dark); }
.secondary, .icon-button { border: 1px solid #cfd7d1; color: #314139; background: white; }
.secondary:hover, .icon-button:hover { background: #f7f9f6; }
.wide { width: 100%; }
.divider { margin: 17px 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; }
.error { min-height: 16px; margin: 0; color: var(--danger); font-size: 11px; }
.text-button { width: fit-content; padding: 5px 0; color: var(--forest); background: transparent; font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.form-message { min-height: 16px; margin: 0; color: #42644f; font-size: 10px; line-height: 1.5; }

.workspace { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 66px; height: calc(100vh - 66px); padding: 20px 14px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fafbf9; }
.workspace-card { padding: 10px; display: flex; gap: 9px; align-items: center; border: 1px solid #e1e7e2; border-radius: 10px; background: white; }
.workspace-card > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #d9f48a; background: #193d2e; font-size: 9px; font-weight: 850; }
.workspace-card strong, .workspace-card small { display: block; }
.workspace-card strong { font-size: 10px; }
.workspace-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.sidebar nav { margin-top: 24px; display: grid; gap: 4px; }
.sidebar nav a { min-height: 40px; padding: 0 11px; display: flex; gap: 10px; align-items: center; border-radius: 8px; color: #536159; font-size: 11px; font-weight: 750; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--forest-dark); background: #e4efe7; }
.sidebar nav span { width: 18px; text-align: center; }
.active-analysts { position: relative; min-width: 0; }
.analyst-identity { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.analyst-identity > span:last-child { min-width: 0; }
.analyst-identity strong, .analyst-identity small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analyst-identity strong { color: #314139; font-size: 9px; }
.analyst-identity small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.analyst-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: inline-grid; place-items: center; overflow: hidden; border: 2px solid white; border-radius: 50%; color: white; background: var(--avatar-color); box-shadow: 0 0 0 1px rgba(30,61,45,.15); font-size: 9px; font-weight: 850; }
.analyst-avatar.small { width: 22px; height: 22px; flex-basis: 22px; margin-right: 7px; font-size: 8px; vertical-align: middle; }
.analyst-avatar.large { width: 86px; height: 86px; flex-basis: 86px; font-size: 24px; }
.analyst-avatar img { width: 100%; height: 100%; object-fit: cover; }
.presence-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #91a096; }
.presence-dot.online { background: #55a271; }
.presence-dot.viewing { background: #4d83a0; }
.presence-dot.editing { background: #cf8a38; box-shadow: 0 0 0 3px rgba(207,138,56,.13); }
.content { min-width: 0; padding: clamp(25px, 4vw, 48px); }
.page-head { max-width: 1400px; margin: 0 auto 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.metrics { max-width: 1400px; margin: 0 auto 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.metrics article { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid #b6c0b9; border-radius: 12px; background: white; }
.metrics article.urgent { border-top-color: var(--danger); }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 9px; }
.metrics strong { display: block; margin: 14px 0 8px; font: 650 32px/1 var(--serif); }
.surface { max-width: 1400px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; }
.surface-head { padding: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 1px solid var(--line); }
.surface-head h2 { margin: 0; font-size: 21px; }
.filters { display: flex; gap: 9px; }
.filters label { min-width: 150px; }
.filters select { min-height: 36px; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { padding: 10px 14px; color: #849087; background: #fafbf9; font-size: 8px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 14px; border-top: 1px solid #edf0ec; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.unclaimed { color: var(--muted); font-size: 9px; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; color: #4f6357; background: #edf1ed; font-size: 8px; font-weight: 800; text-transform: capitalize; }
.badge.urgent { color: #8d352f; background: var(--danger-soft); }
.empty { padding: 50px 20px; text-align: center; }
.empty > span { width: 42px; height: 42px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--mint); }
.empty h3 { margin-bottom: 5px; }
.empty p { color: var(--muted); font-size: 10px; }
.surface-error { padding: 0 20px 18px; }
.report-link { padding: 0; color: var(--forest); background: transparent; font: inherit; font-weight: 850; text-align: left; }
.report-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.appeals-surface { margin-top: 14px; }
.queues-surface { margin-top: 14px; }
.queue-policy-note { padding: 14px 20px; display: flex; gap: 8px; align-items: baseline; color: #52645a; background: #f4f8f4; font-size: 9px; line-height: 1.55; }
.queue-policy-note strong { flex: 0 0 auto; color: #294737; }
.routing-agent-form { padding: 17px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; border-bottom: 1px solid var(--line); background: white; }
.routing-agent-head { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.routing-agent-head h3 { margin: 0; font-size: 15px; }
.routing-agent-head p:last-child { max-width: 700px; margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.routing-agent-form select[multiple] { min-height: 94px; cursor: default; }
.routing-agent-form textarea { min-height: 105px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }
.routing-agent-instructions { grid-column: span 2; }
.routing-agent-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-list { padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; background: #fafbf9; }
.queue-card { min-width: 0; padding: 15px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-top: 3px solid #6c8276; border-radius: 10px; background: white; }
.queue-card.ai { border-top-color: #9b6545; }
.queue-card.hybrid { border-top-color: #596e9a; }
.queue-card > div:first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.queue-card > div:first-child > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.queue-card strong, .queue-card small { display: block; }
.queue-card > div:first-child strong { font-size: 11px; }
.queue-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.queue-card > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.queue-card dl { margin: 0; padding: 9px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; border-block: 1px solid #edf0ec; }
.queue-card dt { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.queue-card dd { margin: 3px 0 0; font-size: 9px; font-weight: 800; }
.queue-card .queue-instructions { min-height: 42px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #405249; }
.queue-card > button { margin-top: auto; align-self: flex-start; }
.queue-dialog { width: min(920px, calc(100% - 30px)); }
.queue-form { padding: 20px 22px 24px; display: grid; gap: 13px; }
.queue-form-section { padding: 15px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.queue-form-section > div:first-child { grid-column: 1 / -1; }
.queue-form-section h3 { margin: 0; font-size: 14px; }
.queue-form textarea { min-height: 88px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }
.queue-form .wide-field { grid-column: 1 / -1; }
.queue-form .code-input { min-height: 150px; color: #294737; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.queue-form select[multiple] { min-height: 100px; cursor: default; }
.queue-safety-copy { margin: 0; padding: 10px; border-left: 3px solid #789082; color: #536159; background: #edf4ee; font-size: 9px; line-height: 1.55; }
.queue-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-form-footer > div { display: flex; gap: 7px; }
.operations-surface { margin-top: 14px; }
.analytics-surface { margin-top: 14px; }
.surface-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.analytics-metrics { padding: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; background: #fafbf9; }
.analytics-metrics article { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.analytics-metrics span, .analytics-metrics small { display: block; color: var(--muted); font-size: 9px; }
.analytics-metrics strong { display: block; margin: 9px 0 6px; font: 650 25px/1 var(--serif); }
.analytics-body { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border-top: 1px solid var(--line); }
.analytics-body h3 { margin-bottom: 11px; font-size: 13px; }
.analytics-body p, .analytics-body li { color: var(--muted); font-size: 9px; line-height: 1.55; }
.analytics-body ul { margin: 8px 0 0; padding-left: 18px; }
.analytics-list { display: grid; gap: 7px; }
.analytics-list > div { padding: 8px 10px; display: flex; justify-content: space-between; border-radius: 7px; background: #f4f7f4; font-size: 9px; text-transform: capitalize; }
.ai-explainer { grid-column: 1 / -1; padding: 14px; border-left: 3px solid #729a7d; border-radius: 7px; background: #f1f6f2; }
.ai-explainer strong { font-size: 10px; }
.ai-explainer p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.ai-enabled { align-self: end; min-height: 40px; }
.ai-form-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-form-footer span { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.quality-surface { margin-top: 14px; }
.quality-summary { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); background: #fafbf9; }
.quality-summary p { max-width: 760px; margin: 0; font-size: 9px; line-height: 1.55; }
.quality-summary strong { flex: 0 0 auto; color: var(--forest); font-size: 10px; }
.quality-list { display: grid; }
.quality-list > article { padding: 13px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-top: 1px solid #edf0ec; }
.quality-list strong, .quality-list small { display: block; }
.quality-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.quality-dialog { width: min(900px, calc(100% - 30px)); }
.quality-detail-content { padding: 20px 22px 24px; }
.quality-detail-content > section { margin-top: 14px; }
.quality-detail-content pre { max-height: 300px; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; color: #294737; background: #f5f8f5; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.quality-review-form { margin-top: 14px; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.quality-review-form h3, .quality-review-form .quality-notes, .quality-review-form > button { grid-column: 1 / -1; }
.quality-review-form textarea { min-height: 90px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }
.operation-metrics { padding: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; background: #fafbf9; }
.operation-metrics article { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.operation-metrics span, .operation-metrics small { display: block; color: var(--muted); font-size: 9px; }
.operation-metrics strong { display: block; margin: 9px 0 6px; font: 650 25px/1 var(--serif); }
.operation-list { display: grid; }
.operation-list > article { padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #edf0ec; }
.operation-list strong, .operation-list small { display: block; }
.operation-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.empty.compact { padding-block: 28px; }
.appeal-list { display: grid; }
.appeal-row { padding: 15px 20px; display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px auto; gap: 12px; align-items: center; border-top: 1px solid #edf0ec; }
.appeal-row:first-child { border-top: 0; }
.appeal-row strong, .appeal-row small { display: block; }
.appeal-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.appeal-mobile-meta { display: none; }
.appeal-row > span { color: var(--muted); font-size: 10px; text-transform: capitalize; }

.detail-dialog { width: min(980px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; box-shadow: 0 25px 80px rgba(16,41,28,.25); }
.detail-dialog::backdrop { background: rgba(11,35,24,.48); backdrop-filter: blur(3px); }
.detail-head { position: sticky; z-index: 2; top: 0; padding: 19px 22px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.detail-head h2 { margin: 0; }
.detail-head p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.report-detail-content, .appeal-dialog > form, .appeal-dialog > p, .appeal-dialog > .claim-bar { margin-inline: 22px; }
.report-detail-content { padding-block: 20px 24px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-grid section, .detail-actions form { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.detail-grid h3, .detail-actions h3, .report-detail-content > section > h3 { margin-bottom: 13px; }
.detail-grid dl { margin: 0; display: grid; grid-template-columns: 115px 1fr; gap: 8px; font-size: 10px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.report-submission { grid-column: 1 / -1; }
.submission-meta { margin-bottom: 14px !important; grid-template-columns: 115px minmax(0, 1fr) 115px minmax(0, 1fr) !important; }
.answer-list { display: grid; gap: 8px; }
.answer-record { padding: 11px 12px; display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.4fr); gap: 16px; align-items: start; border: 1px solid #e5e9e4; border-radius: 8px; background: white; font-size: 11px; line-height: 1.5; }
.answer-record strong, .answer-record small { display: block; }
.answer-record strong { font-size: 11px; }
.answer-record small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.answer-record > :last-child { min-width: 0; overflow-wrap: anywhere; }
.answer-text { white-space: pre-wrap; }
.answer-empty { color: var(--muted); font-style: italic; }
.form-help { margin: -5px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.mutation-status { margin: 0; padding: 11px 12px; border: 1px solid #d4e7d9; border-radius: 8px; color: #23543b; background: #eff8f1; font-size: 10px; line-height: 1.45; }
.mutation-status:empty { display: none; }
.evidence-list { display: grid; gap: 7px; }
.evidence-item { padding: 8px; border-radius: 7px; color: #405249; background: white; font-size: 9px; overflow-wrap: anywhere; }
.report-detail-content > section { margin-top: 14px; }
.message-list { display: grid; gap: 8px; }
.delivery-list { display: grid; gap: 7px; }
.delivery-list article { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.delivery-list strong, .delivery-list small { display: block; }
.delivery-list strong { font-size: 10px; }
.delivery-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.finding-result-list { display: grid; gap: 7px; }
.finding-result-list article { padding: 10px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.finding-result-list strong, .finding-result-list small { display: block; }
.finding-result-list strong { font-size: 10px; }
.finding-result-list small { margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.finding-result-list pre { max-width: min(700px, 70vw); margin: 9px 0 0; padding: 9px; overflow: auto; border-radius: 6px; color: #294737; background: #edf4ee; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-run-list { display: grid; gap: 8px; }
.ai-run-list article { padding: 12px; border-left: 3px solid #729a7d; border-radius: 7px; background: #f1f6f2; }
.ai-run-list strong, .ai-run-list small { display: block; }
.ai-run-list strong { font-size: 10px; }
.ai-run-list small { color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.ai-run-list p { margin: 8px 0; font-size: 10px; line-height: 1.5; }
.report-run-list { display: grid; gap: 7px; margin-bottom: 12px; }
.report-run-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #d7e5da; border-radius: 8px; background: #f2f7f3; }
.report-run-record strong, .report-run-record small { display: block; }
.report-run-record strong { font-size: 10px; }
.report-run-record small { margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.report-timeline { position: relative; display: grid; gap: 0; }
.timeline-event { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 12px; min-height: 48px; }
.timeline-event:not(:last-child)::before { content: ""; position: absolute; top: 14px; bottom: 0; left: 5px; width: 2px; background: #d8e1da; }
.timeline-marker { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 4px; border: 3px solid #fff; border-radius: 50%; background: #527261; box-shadow: 0 0 0 1px #b9cabe; }
.timeline-marker.message { background: #2f6d91; box-shadow: 0 0 0 1px #a9c9da; }
.timeline-marker.decision { background: #245d43; box-shadow: 0 0 0 1px #9fc2ad; }
.timeline-marker.finding { background: #7a6598; box-shadow: 0 0 0 1px #c5b9d5; }
.timeline-marker.action { background: #a35b27; box-shadow: 0 0 0 1px #e0b48f; }
.timeline-event > div { padding: 2px 0 10px; }
.timeline-event strong, .timeline-event span, .timeline-event small { display: block; }
.timeline-event strong { font-size: 9px; }
.timeline-event span { margin-top: 2px; color: #304a3b; font-size: 9px; line-height: 1.4; }
.timeline-event small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.decision-record-list { display: grid; gap: 8px; }
.decision-record { padding: 11px 12px; border-left: 3px solid #315f46; border-radius: 7px; background: #f2f6f2; }
.decision-record > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.decision-record strong { font-size: 10px; }
.decision-record p { margin: 8px 0; color: #294536; font-size: 9px; line-height: 1.5; }
.decision-record small { color: var(--muted); font-size: 8px; }
.case-message { max-width: 82%; padding: 10px 12px; border-radius: 9px; background: #edf1ed; font-size: 10px; line-height: 1.5; }
.case-message.outbound { margin-left: auto; color: #244634; background: #e5f1e8; }
.case-message small { margin-top: 5px; display: block; color: var(--muted); font-size: 8px; }
.claim-bar { margin-top: 14px; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 9px; color: #4b6255; background: #edf6f0; }
.claim-bar p { margin: 0; display: flex; align-items: center; font-size: 10px; }
.claim-bar > div { display: flex; gap: 7px; }
.detail-actions { margin-top: 14px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.detail-actions form { display: grid; align-content: start; gap: 10px; }
.detail-actions textarea, .appeal-dialog textarea { min-height: 80px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }
.checkbox { grid-template-columns: auto 1fr; align-items: center; }
.checkbox input { width: auto; min-height: 0; }
.appeal-dialog { width: min(660px, calc(100% - 30px)); padding-bottom: 23px; }
.appeal-dialog > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.appeal-dialog > form { display: grid; gap: 11px; }
.explain-grid { max-width: 1400px; margin: 14px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.explain-grid article { padding: 17px; display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.62); }
.explain-grid b { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--mint); font-size: 9px; }
.explain-grid strong { font-size: 10px; }
.explain-grid p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
@media (max-width: 900px) {
  .login-layout { min-height: auto; grid-template-columns: 1fr; }
  .login-story { min-height: 0; padding: 42px 28px; }
  .login-card { margin-block: 24px 32px; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; width: auto; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .operation-metrics { grid-template-columns: 1fr 1fr; }
  .analytics-metrics { grid-template-columns: 1fr 1fr; }
  .analytics-body { grid-template-columns: 1fr; }
  .queue-list { grid-template-columns: 1fr 1fr; }
  .queue-form-section { grid-template-columns: 1fr 1fr; }
  .routing-agent-form { grid-template-columns: 1fr 1fr; }
  .quality-review-form { grid-template-columns: 1fr; }
  .quality-review-form > * { grid-column: 1 !important; }
  .explain-grid { grid-template-columns: 1fr; }
  .detail-grid, .detail-actions { grid-template-columns: 1fr; }
  .appeal-row { grid-template-columns: 1fr auto; }
  .appeal-row > span { display: none; }
  .appeal-mobile-meta { display: inline; }
}

@media (max-width: 560px) {
  .topbar { padding-inline: 14px; }
  .health span { display: none; }
  .login-story { padding: 30px 20px 28px; }
  .login-story h1 { margin-bottom: 14px; font-size: clamp(36px, 11vw, 42px); line-height: .98; }
  .login-story h1 br { display: none; }
  .login-story > p:not(.eyebrow) { font-size: 14px; line-height: 1.5; }
  .login-story ul { margin-top: 15px; gap: 8px; font-size: 11px; }
  .login-card { width: calc(100% - 28px); margin-block: 16px 26px; padding: 22px; }
  .login-card h2 { font-size: 30px; }
  .content { padding: 22px 14px; }
  .page-head, .surface-head { align-items: stretch; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .operation-metrics { grid-template-columns: 1fr; }
  .analytics-metrics { grid-template-columns: 1fr; }
  .queue-list, .queue-form-section { grid-template-columns: 1fr; }
  .routing-agent-form { grid-template-columns: 1fr; }
  .routing-agent-instructions { grid-column: 1; }
  .queue-policy-note { align-items: flex-start; flex-direction: column; }
  .quality-summary { align-items: flex-start; flex-direction: column; }
  .quality-list > article { grid-template-columns: 1fr auto; }
  .quality-list > article > button { grid-column: 1 / -1; }
  .filters { width: 100%; flex-direction: column; }
}

/* Compact live-workspace shell */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.field-help { margin: -4px 0 3px; color: var(--muted); font-size: 9px; }
.infrastructure-access { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.infrastructure-access summary { color: #4b5d53; cursor: pointer; font-size: 10px; font-weight: 800; }
.infrastructure-access > p { margin: 9px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
#invitation-form, #forgot-password-form, #password-reset-form { display: grid; gap: 11px; }

.workspace { grid-template-columns: 214px minmax(0, 1fr); background: #f4f3ee; }
.sidebar { padding: 18px 11px; border-right: 0; color: #f2f6ef; background: linear-gradient(180deg, #063a2d 0%, #073327 100%); }
.workspace-card { padding: 9px; border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.055); }
.workspace-card > span { color: #dafa72; background: rgba(218,250,114,.12); }
.workspace-card strong { color: white; }
.workspace-card small { color: #a9c3b7; }
.sidebar nav { margin-top: 19px; gap: 3px; }
.sidebar nav > small { margin: 14px 10px 5px; color: #7ba397; font-size: 7px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.sidebar nav a { min-height: 36px; color: #bdd0c8; font-size: 10px; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.07); }
.sidebar nav a.active { color: #123b2b; background: #dafa72; box-shadow: 0 7px 18px rgba(0,0,0,.12); }
.content { min-width: 0; padding: 0; transition: margin-right .2s ease; }
.queue-view { min-height: calc(100vh - 66px); }
.page-head { max-width: none; min-height: 78px; margin: 0; padding: 15px 22px; align-items: center; border-bottom: 1px solid #dedfd8; background: #fbfaf7; }
.queue-title > div { display: flex; align-items: center; gap: 11px; }
.page-head h1 { margin: 0; font-family: var(--sans); font-size: 25px; font-weight: 780; letter-spacing: -.04em; }
.queue-title p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.live-label { padding: 5px 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d4d9d3; border-radius: 7px; color: #52645a; background: white; font-size: 8px; font-weight: 800; }
.live-label i { width: 6px; height: 6px; border-radius: 50%; background: #49a467; box-shadow: 0 0 0 3px rgba(73,164,103,.12); }
.active-analysts { min-width: 0; margin: 0; padding: 0; border: 0; }
.report-surface { max-width: none; margin: 0; border: 0; border-radius: 0; background: #fbfaf7; }
.report-surface > .surface-head { padding: 11px 15px; align-items: center; border-bottom-color: #dcddd7; }
.queue-toolbar { min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.queue-toolbar label { min-width: 112px; display: block; color: transparent; font-size: 0; }
.queue-toolbar select { min-height: 33px; padding: 6px 28px 6px 9px; border-color: #d7dbd6; border-radius: 7px; color: #425148; background-color: white; font-size: 9px; font-weight: 700; }
.queue-toolbar .search-field { position: relative; min-width: 195px; }
.queue-toolbar .search-field span { position: absolute; z-index: 1; top: 8px; left: 10px; color: #849087; font-size: 13px; }
.queue-toolbar .search-field input { min-height: 33px; padding-left: 30px; font-size: 9px; }
.refresh-button { min-width: 34px; min-height: 33px; padding: 6px; font-size: 14px; }
.report-surface .table-wrap { min-height: calc(100vh - 189px); background: white; }
.report-surface table { font-size: 10px; table-layout: fixed; }
.report-surface th { height: 35px; padding: 8px 15px; color: #56645b; background: #f8f8f5; font-size: 7px; }
.report-surface th:first-child { width: 34%; }
.report-surface th:nth-child(2) { width: 21%; }
.report-surface th:nth-child(3) { width: 13%; }
.report-surface th:nth-child(4) { width: 12%; }
.report-surface th:nth-child(5) { width: 20%; }
.report-surface td { height: 62px; padding: 10px 15px; border-top-color: #e7e8e2; }
.report-surface tbody tr { cursor: pointer; transition: background .12s ease, box-shadow .12s ease; }
.report-surface tbody tr:hover { background: #f8fbf6; }
.report-surface tbody tr.selected { background: #eff7ea; box-shadow: inset 3px 0 #1f6c48; }
.report-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.report-identity > span:last-child { min-width: 0; }
.report-primary-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.report-avatar { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 50%; color: #5b4c85; background: #eeebfa; font-size: 8px; font-weight: 850; }
.report-link { color: #1e2e26; font-size: 10px; }
.report-identity small { max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-mobile-meta { display: none; }
.report-row-viewers { width: fit-content; max-width: 100%; margin-top: 5px; display: inline-flex; align-items: center; color: #496052; font-size: 8px; font-weight: 800; line-height: 1; }
.report-row-viewers-desktop { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.report-row-viewers-mobile { display: none; align-items: center; gap: 5px; }
.report-row-viewers-mobile i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #4ca36c; box-shadow: 0 0 0 3px rgba(76,163,108,.12); }
.report-row-viewers .presence-avatar-stack { padding-left: 0; }
.report-row-viewers .presence-avatar-stack .analyst-avatar.small { width: 20px; height: 20px; flex-basis: 20px; margin-left: -4px; border-width: 2px; font-size: 7px; }
.report-row-viewers .presence-overflow-avatar { width: 20px; height: 20px; margin-left: -4px; font-size: 6.5px; }
.priority-badge { padding: 4px 7px; display: inline-flex; border-radius: 6px; font-size: 8px; font-weight: 850; text-transform: capitalize; }
.priority-badge.high { color: #a23932; background: #fff0ec; }
.priority-badge.medium { color: #9b651d; background: #fff5dc; }
.priority-badge.low { color: #6b6d58; background: #f4f1dc; }
.unclaimed { padding-left: 28px; color: #56645b; }

body.report-open .content { margin-right: 408px; }
.report-drawer { position: fixed; z-index: 30; inset: 66px 0 0 auto; width: 408px; height: calc(100vh - 66px); max-height: none; margin: 0; border: 0; border-left: 1px solid #d9ddd7; border-radius: 0; box-shadow: -12px 0 35px rgba(20,49,33,.1); overflow-y: auto; }
.report-drawer::backdrop { display: none; }
.report-drawer .detail-head { padding: 17px 18px; }
.report-drawer .detail-head { background: var(--paper, #fff); backdrop-filter: none; }
.report-drawer .detail-head h2 { font-family: var(--sans); font-size: 18px; letter-spacing: -.02em; }
.report-drawer .report-detail-content { margin-inline: 15px; padding-block: 15px 24px; }
.report-drawer .detail-grid, .report-drawer .detail-actions { grid-template-columns: 1fr; }
.report-drawer .detail-grid section, .report-drawer .detail-actions form { padding: 13px; }
.report-drawer .detail-grid dl { grid-template-columns: 105px 1fr; font-size: 9px; }
.report-drawer .report-detail-content > section { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.report-drawer .claim-bar { position: sticky; z-index: 1; bottom: 0; border: 1px solid #d9e8dc; box-shadow: 0 -5px 18px rgba(29,69,46,.06); }
.report-drawer .detail-actions { padding-bottom: 18px; }
.report-drawer .case-message { max-width: 95%; }
.report-drawer .finding-result-list pre { max-width: 330px; }

.content > .surface[data-view], .content > .explain-grid[data-view] { max-width: 1180px; margin: 24px auto; }
.people-surface .surface-head p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.invite-form { padding: 15px 20px; display: grid; grid-template-columns: minmax(220px, 1fr) 190px auto; align-items: end; gap: 10px; border-bottom: 1px solid var(--line); background: #fafbf9; }
.invite-form button { min-height: 40px; }
.invite-result { margin: 14px 20px 0; padding: 12px; display: grid; grid-template-columns: minmax(170px, .7fr) minmax(260px, 1.3fr) auto; align-items: center; gap: 10px; border: 1px solid #cfe0d4; border-radius: 9px; background: #f1f8f2; }
.invite-result strong, .invite-result small { display: block; }
.invite-result strong { font-size: 10px; }
.invite-result small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.invite-result input { font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.people-columns { padding: 18px 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.people-columns h2, .people-columns h3 { margin-bottom: 10px; font: 740 13px/1.2 var(--sans); letter-spacing: -.01em; }
.people-list { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.people-list article { min-width: 0; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); background: white; }
.people-list article:first-child { border-top: 0; }
.people-actions { display: flex; flex-direction: column; gap: 6px; }
.people-list article > small { color: var(--muted); font-size: 8px; }
.people-list article > div strong, .people-list article > div small { display: block; }
.people-list article > div strong { font-size: 9px; }
.people-list article > div small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.people-role { padding: 4px 7px; border-radius: 999px; color: #335643; background: #eaf3eb; font-size: 8px; font-weight: 800; }
.people-empty { margin: 0; padding: 20px; color: var(--muted); font-size: 9px; }
.compact-button { min-height: 30px; padding: 6px 9px; font-size: 8px; }
.profile-surface .surface-head p:last-child { max-width: 620px; margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.profile-layout { padding: 24px; display: grid; grid-template-columns: 210px minmax(0, 480px); gap: 34px; align-items: start; }
.profile-photo-card { display: grid; justify-items: start; gap: 10px; }
.profile-avatar-preview { min-height: 86px; }
.profile-photo-card small { color: var(--muted); font-size: 8px; }
.upload-button { position: relative; display: inline-flex; align-items: center; }
.upload-button.disabled { opacity: .58; cursor: wait; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-form { display: grid; gap: 12px; }
.profile-form label { display: grid; gap: 6px; }
.workspace-mode button:disabled { cursor: not-allowed; opacity: .58; }
.profile-form input[readonly] { color: #526158; background: #f4f6f3; }
.profile-surface > .form-message { padding: 0 24px 5px; }

@media (max-width: 1180px) {
  body.report-open .content { margin-right: 360px; }
  .report-drawer { width: 360px; }
  .report-surface th:first-child { width: 38%; }
}

@media (max-width: 900px) {
  .workspace { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
  .sidebar { position: static; width: 100%; min-width: 0; max-width: 100vw; height: auto; padding: 10px; overflow: hidden; }
  .sidebar .workspace-card { display: none; }
  .sidebar nav { width: 100%; min-width: 0; max-width: 100%; margin: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain; }
  .sidebar nav { scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav > small { display: none; }
  .sidebar nav a { flex: 0 0 auto; }
  .content { width: 100%; min-width: 0; max-width: 100%; }
  .page-head { min-width: 0; align-items: flex-start; flex-direction: column; }
  body.report-open .content { margin-right: 0; }
  .report-drawer { top: 66px; width: min(440px, 100vw); }
  .report-drawer::backdrop { display: block; background: rgba(5,32,23,.35); }
  .invite-form, .invite-result, .people-columns, .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { height: 58px; }
  .current-analyst { display: none; }
  .queue-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .report-surface > .surface-head { align-items: stretch; flex-direction: column; }
  .queue-view, .report-surface { width: 100%; max-width: 100%; min-width: 0; }
  .report-surface > .surface-head { width: 100%; max-width: 100%; }
  .queue-toolbar { width: 100%; max-width: calc(100vw - 30px); }
  .queue-toolbar .search-field { min-width: 0; grid-column: 1 / -1; }
  .queue-toolbar label { min-width: 0; }
  .refresh-button { align-self: flex-end; }
  .report-surface table, .report-surface tbody { width: 100%; display: block; }
  .report-surface thead { display: none; }
  .report-surface tbody tr { min-width: 0; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 14px; border-top: 1px solid #e7e8e2; }
  .report-surface tbody tr:first-child { border-top: 0; }
  .report-surface td { min-width: 0; height: auto; padding: 0; border: 0; }
  .report-surface td:first-child { grid-column: 1 / -1; }
  .report-surface td:nth-child(2), .report-surface td:nth-child(3) { display: none; }
  .report-surface td:nth-child(4), .report-surface td:nth-child(5) { width: auto; display: grid; gap: 2px; align-content: end; }
  .report-surface td:nth-child(4)::before, .report-surface td:nth-child(5)::before { color: #7c8981; font-size: 7px; font-weight: 750; text-transform: uppercase; }
  .report-surface td:nth-child(4)::before { content: "Received"; }
  .report-surface td:nth-child(5)::before { content: "Owner"; text-align: right; }
  .report-surface td:nth-child(4) strong { font-size: 10px; }
  .report-surface td:nth-child(4) small { display: none; }
  .report-surface td:nth-child(5) { justify-items: end; text-align: right; }
  .report-surface td:nth-child(5) .analyst-identity { max-width: 150px; justify-content: flex-end; }
  .report-surface .unclaimed { padding-left: 0; }
  .report-identity { align-items: flex-start; }
  .report-primary-copy { width: 100%; }
  .report-link { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
  .report-identity small { max-width: 100%; display: -webkit-box; overflow: hidden; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .report-mobile-meta { margin-top: 7px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .report-mobile-meta > span:not(.priority-badge) { padding: 3px 6px; border-radius: 999px; color: #56675e; background: #f0f3ef; font-size: 7px; font-weight: 750; }
  .report-drawer { inset: var(--product-topbar) 0 0 0; width: 100%; height: calc(100dvh - var(--product-topbar)); }
  .report-surface .table-wrap { overflow-x: hidden; }
  .report-row-viewers { margin-top: 6px; padding: 4px 7px; border: 1px solid #d8e6dc; border-radius: 999px; background: #f0f7f1; font-size: 8px; }
  .report-row-viewers-desktop { display: none; }
  .report-row-viewers-mobile { display: inline-flex; }
  .people-list article { grid-template-columns: 1fr auto; }
  .people-list article > small { display: none; }
}

/* Workspace-wide customer theme application */
.topbar, .surface, .login-card, .editor-dialog, .detail-dialog, .studio-dialog, .public-top,
.command-metrics article, .command-panel, .form-field-head, input, select, textarea { background-color: var(--paper); }
.login-story { background: var(--forest); }
.surface, .login-card, .editor-dialog, .detail-dialog, .command-metrics article, .command-panel { border-radius: max(6px, var(--customer-radius)); }
.sidebar, .object-grid, .queue-list { background-color: color-mix(in srgb, var(--canvas) 65%, var(--paper)); }
.workspace-mark { color: var(--brand-primary-contrast); background: var(--forest); }

/* Product shell and builder surfaces */
.global-command { min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; color: #536159; background: #fafbf9; font-size: 10px; font-weight: 750; }
.global-command:hover { color: var(--forest); border-color: #b9cbc0; background: #f1f7f2; }
.global-command kbd { padding: 2px 5px; border: 1px solid #d7ddd8; border-radius: 5px; color: #7a867e; background: white; font: 8px var(--sans); }
.nav-count { min-width: 23px; margin-left: auto; padding: 2px 6px; border-radius: 999px; color: var(--forest); background: #dfeee3; font-size: 8px; text-align: center; }
.sidebar nav a.active .nav-count { color: white; background: var(--forest); }
.command-view, .builder-view, .assistant-view, .settings-view { max-width: 1400px; margin: 0 auto; }
.command-head { max-width: none; }
.command-head h1, .builder-view .page-head h1, .assistant-view .page-head h1, .settings-view .page-head h1 { font-size: clamp(34px, 4vw, 48px); }
.command-metrics { max-width: none; }
.command-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 14px; }
.command-panel { max-width: none; margin: 0; }
.attention-banner { margin-bottom: 14px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e8d7a6; border-radius: 11px; color: #6f5216; background: #fff8e5; font-size: 10px; }
.attention-banner strong, .attention-banner span { display: block; }
.attention-banner span { margin-top: 3px; color: #806a3d; }
.attention-list, .compact-run-list { display: grid; }
.attention-row, .compact-run-row { min-width: 0; padding: 13px 17px; display: grid; align-items: center; gap: 11px; border-top: 1px solid var(--line); }
.attention-row:first-child, .compact-run-row:first-child { border-top: 0; }
.attention-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.compact-run-row { grid-template-columns: minmax(0, 1fr) auto; }
.attention-glyph { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #9b651d; background: #fff1ce; font-size: 14px; }
.attention-glyph.danger { color: var(--danger); background: var(--danger-soft); }
.attention-row strong, .attention-row small, .compact-run-row strong, .compact-run-row small { display: block; }
.attention-row strong, .compact-run-row strong { font-size: 10px; }
.attention-row small, .compact-run-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.attention-meta { color: var(--muted); font-size: 8px; text-align: right; }
.skeleton-block, .skeleton-card { position: relative; overflow: hidden; background: #edf1ed; }
.skeleton-block::after, .skeleton-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); animation: skeleton 1.25s infinite; }
.skeleton-block { height: 72px; margin: 15px; border-radius: 9px; }
.skeleton-card { min-height: 180px; border-radius: 12px; }
@keyframes skeleton { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.builder-view > .page-head, .assistant-view > .page-head, .settings-view > .page-head { max-width: none; }
.safety-boundary { margin-bottom: 14px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; border: 1px solid #cfe0d4; border-radius: 10px; color: #345743; background: #f0f7f1; font-size: 9px; line-height: 1.55; }
.safety-boundary strong { color: #173e2c; }
.routing-boundary { border-color: #d9d9e9; color: #555477; background: #f5f4fb; }
.routing-boundary strong { color: #343253; }
.object-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.object-card { min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 4px 14px rgba(21,55,37,.03); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.object-card:hover { border-color: #b9cac0; box-shadow: 0 9px 26px rgba(21,55,37,.07); transform: translateY(-1px); }
.object-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.object-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--forest); background: var(--mint); font-size: 15px; }
.object-icon.action { color: #9d3832; background: #fff0ec; }
.object-icon.agent { color: #5b4f84; background: #f0edfa; }
.object-icon.connection { color: #285f73; background: #eaf5f8; }
.object-card h3 { margin: 0; font: 700 17px/1.2 var(--serif); letter-spacing: -.02em; }
.object-card > p { min-height: 45px; margin: -7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.object-card-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.object-card-meta div { padding: 8px; border-radius: 7px; background: #f6f8f5; }
.object-card-meta span, .object-card-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.object-card-meta span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.object-card-meta strong { margin-top: 3px; font-size: 8px; }
.object-card-footer { margin-top: auto; padding-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.object-card-footer small { color: var(--muted); font-size: 8px; }
.object-card-footer button { min-height: 31px; padding: 6px 9px; }
.empty-product { grid-column: 1 / -1; padding: 55px 25px; border: 1px dashed #cbd5ce; border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.62); text-align: center; }
.empty-product span { width: 44px; height: 44px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 12px; color: var(--forest); background: var(--mint); font-size: 20px; }
.empty-product h2 { color: var(--ink); }
.empty-product p { max-width: 520px; margin: 0 auto 14px; font-size: 10px; line-height: 1.6; }
.segmented-tabs { width: fit-content; margin-bottom: 14px; padding: 3px; display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: #eef1ed; }
.segmented-tabs button { min-height: 31px; padding: 6px 11px; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 800; }
.segmented-tabs button.active { color: var(--forest-dark); background: white; box-shadow: 0 1px 4px rgba(20,48,33,.09); }
.component-filters { margin-bottom: 12px; display: flex; gap: 9px; }
.component-filters .search-field { min-width: 260px; flex: 1; }
.configuration-tabs { max-width: 100%; overflow-x: auto; }

.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 14px; }
.assistant-panel { max-width: none; min-height: 660px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
.assistant-context { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafbf9; font-size: 9px; }
.assistant-messages { padding: 22px; display: grid; align-content: start; gap: 16px; overflow-y: auto; }
.assistant-empty { align-self: center; padding: 65px 20px; text-align: center; }
.assistant-empty > span { width: 47px; height: 47px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 14px; color: #5a4b85; background: #efecf8; font-size: 21px; }
.assistant-empty h2 { font-family: var(--sans); font-size: 24px; }
.assistant-empty p { max-width: 530px; margin: 0 auto 18px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.assistant-empty > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.assistant-empty button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: #435148; background: white; font-size: 9px; }
.assistant-message { max-width: 82%; display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 9px; }
.assistant-message.user { margin-left: auto; grid-template-columns: minmax(0, 1fr) 29px; }
.assistant-message.user .assistant-bubble { order: -1; color: #173e2c; background: #e2efe5; }
.assistant-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #5b4f84; background: #efecf8; font-size: 11px; font-weight: 850; }
.assistant-bubble { padding: 11px 13px; border-radius: 11px; background: #f4f6f3; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.assistant-bubble strong { display: block; margin-bottom: 4px; }
.assistant-citations { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.assistant-citations button { padding: 4px 7px; border: 1px solid #cdd7d0; border-radius: 6px; color: #3f5f4d; background: white; font-size: 8px; }
.assistant-composer { margin: 0 14px 12px; padding: 7px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; border: 1px solid #becbc2; border-radius: 11px; background: white; box-shadow: 0 7px 23px rgba(22,55,38,.08); }
.assistant-composer textarea { min-height: 44px; max-height: 150px; padding: 8px; border: 0; resize: vertical; font: 11px/1.5 var(--sans); outline: 0; }
.assistant-panel > .error { padding: 0 18px 8px; }
.assistant-side { display: grid; align-content: start; gap: 12px; }
.assistant-side .surface { width: 100%; max-width: none; margin: 0; padding: 16px; }
.assistant-side h2 { font: 700 15px var(--sans); }
.assistant-side ul { margin: 11px 0 0; padding-left: 18px; color: var(--muted); font-size: 9px; line-height: 1.85; }
.assistant-side p { color: var(--muted); font-size: 9px; line-height: 1.55; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(300px,.9fr); gap: 14px; }
.settings-card { width: 100%; max-width: none; margin: 0; }
.settings-wide { grid-column: 1 / -1; }
.setup-list, .integration-list { display: grid; }
.setup-row, .integration-row { padding: 13px 17px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.setup-row:first-child, .integration-row:first-child { border-top: 0; }
.setup-state { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--mint); font-size: 10px; font-weight: 850; }
.setup-state.warning { color: #8c651c; background: #fff2cf; }
.setup-row strong, .setup-row small, .integration-row strong, .integration-row small { display: block; }
.setup-row strong, .integration-row strong { font-size: 9px; }
.setup-row small, .integration-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.integration-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.settings-facts { margin: 0; padding: 17px; display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px 13px; font-size: 9px; }
.settings-fact { display: contents; }
.settings-facts dt { color: var(--muted); }
.settings-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.settings-card-loading { padding: 17px; }
.settings-empty-row { padding: 22px 17px; color: var(--muted); text-align: left; }
.settings-empty-row strong, .settings-empty-row small { display: block; }
.settings-empty-row strong { color: var(--ink); font-size: 10px; }
.settings-empty-row small { margin-top: 4px; font-size: 9px; line-height: 1.5; }
.settings-no-access { max-width: none; margin: 0; }
.settings-form-feedback { min-width: 0; display: grid !important; gap: 2px !important; }
.settings-form-feedback p { margin: 0; }

/* Builder dialogs */
.editor-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 25px 80px rgba(10,37,24,.23); overflow-y: auto; }
.editor-dialog::backdrop, .studio-dialog::backdrop { background: rgba(7,31,20,.46); backdrop-filter: blur(3px); }
.editor-form { padding: 20px; display: grid; gap: 13px; }
.editor-form fieldset { padding: 12px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 9px; }
.editor-form legend { padding: 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.template-choice { padding: 9px; display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.template-choice:has(input:checked) { border-color: #75a086; background: #f1f7f2; }
.template-choice input { width: 15px; min-height: 15px; accent-color: var(--forest); }
.template-choice strong, .template-choice small { display: block; }
.template-choice small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.editor-footer { padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.editor-footer > div { display: flex; gap: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.wide-field { grid-column: 1 / -1; }
.code-input { min-height: 118px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; color: #264635; background: #fbfcfa; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.configuration-code { min-height: 410px; }
.validation-summary { padding: 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fafbf9; font-size: 9px; line-height: 1.55; }
.validation-summary.valid { color: #316345; border-color: #c6ddcc; background: #f0f8f2; }
.validation-summary.invalid { color: #943b35; border-color: #ecd2cf; background: #fff3f1; }

.studio-dialog { width: calc(100vw - 24px); height: calc(100vh - 24px); max-width: none; max-height: none; margin: 12px; padding: 0; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--canvas); box-shadow: 0 30px 100px rgba(4,27,16,.27); overflow: hidden; }
.studio-toolbar { height: 62px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: white; }
.studio-toolbar > div:first-child { min-width: 0; display: flex; align-items: center; gap: 10px; }
.studio-toolbar .eyebrow { margin-bottom: 2px; }
.studio-toolbar h2 { margin: 0; font: 750 14px var(--sans); letter-spacing: -.015em; }
.studio-toolbar small { color: var(--muted); font-size: 8px; }
.studio-actions { display: flex; align-items: center; gap: 7px; }
.save-state { color: var(--muted); font-size: 8px; }
.studio-body { height: calc(100vh - 302px); min-height: 410px; display: grid; grid-template-columns: 210px minmax(430px, 1fr) 290px; }
.node-palette, .node-inspector { padding: 14px; background: white; overflow-y: auto; }
.node-palette { border-right: 1px solid var(--line); }
.node-inspector { border-left: 1px solid var(--line); }
.node-palette h3, .node-inspector h3 { margin: 0; font: 750 12px var(--sans); }
.node-palette > p, .node-inspector p { color: var(--muted); font-size: 8px; line-height: 1.5; }
.palette-button { width: 100%; margin-top: 6px; padding: 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; color: #35463d; background: white; text-align: left; }
.palette-button:hover { border-color: #9bb3a3; background: #f5f9f5; }
.palette-button i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 3px; background: var(--forest); }
.palette-button i.human { background: #c9862f; }
.palette-button i.action { background: var(--danger); }
.palette-button i.ai { background: #67538f; }
.palette-button strong, .palette-button small { display: block; }
.palette-button strong { font-size: 9px; }
.palette-button small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.workflow-canvas-shell { min-width: 0; overflow: auto; background-color: #f7f8f5; background-image: radial-gradient(#cdd5ce 1px, transparent 1px); background-size: 20px 20px; }
.canvas-legend { position: sticky; z-index: 2; top: 10px; left: 10px; width: fit-content; padding: 6px 8px; display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255,255,255,.93); font-size: 7px; }
.canvas-legend span { display: flex; align-items: center; gap: 4px; }
.canvas-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--forest); }
.canvas-legend i.human { background: #c9862f; }
.canvas-legend i.action { background: var(--danger); }
.workflow-canvas { position: relative; min-width: 920px; min-height: 580px; }
.workflow-edge-layer { position: absolute; inset: 0; z-index: 0; overflow: visible; pointer-events: none; }
.workflow-edge-path { fill: none; stroke: #6e8c79; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.workflow-edge-group.warning .workflow-edge-path { stroke: #ad742d; stroke-dasharray: 7 5; }
.workflow-edge-group.exception .workflow-edge-path { stroke: #bb574e; stroke-dasharray: 6 5; }
.workflow-arrow-head.standard { fill: #5d7e69; }
.workflow-arrow-head.warning { fill: #a56d29; }
.workflow-arrow-head.exception { fill: #b94f46; }
.workflow-edge-label { fill: #50645a; stroke: #f7f8f5; stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; font: 800 8px var(--sans); letter-spacing: .035em; text-transform: uppercase; }
.workflow-edge-group.warning .workflow-edge-label { fill: #946125; }
.workflow-edge-group.exception .workflow-edge-label { fill: #a1433b; }
.canvas-node { position: absolute; z-index: 1; width: 168px; min-height: 78px; padding: 11px; border: 1px solid #b9c6bd; border-radius: 11px; color: var(--ink); background: white; box-shadow: 0 4px 14px rgba(25,53,38,.07); text-align: left; }
.canvas-node:hover, .canvas-node.selected { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(49,119,78,.13), 0 5px 16px rgba(25,53,38,.08); }
.canvas-node::before, .canvas-node::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; transform: translateY(-50%); border: 2px solid white; border-radius: 50%; background: #6f8777; box-shadow: 0 0 0 1px #6f8777; }
.canvas-node::before { left: -5px; }
.canvas-node::after { right: -5px; }
.canvas-node[data-kind="start"]::before, .canvas-node[data-kind="end"]::after { display: none; }
.canvas-node-kind { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.canvas-node-kind i { width: 8px; height: 8px; border-radius: 3px; background: var(--forest); }
.canvas-node.human .canvas-node-kind i { background: #c9862f; }
.canvas-node.action .canvas-node-kind i { background: var(--danger); }
.canvas-node.ai .canvas-node-kind i { background: #67538f; }
.canvas-node h4 { margin: 9px 0 0; font-size: 10px; }
.canvas-node p { margin: 3px 0 0; color: var(--muted); font-size: 7px; line-height: 1.4; }
.node-inspector form { display: grid; gap: 10px; }
.node-inspector textarea { min-height: 76px; }
.inspector-actions { display: flex; justify-content: space-between; gap: 8px; }
.danger-button { padding: 7px 9px; border: 1px solid #e6c7c3; border-radius: 7px; color: #9d3e37; background: #fff4f2; font-size: 8px; font-weight: 800; }
.graph-json-editor { height: 230px; padding: 12px 14px; display: grid; grid-template-columns: 170px minmax(0,1fr) auto; align-items: stretch; gap: 12px; border-top: 1px solid var(--line); background: white; }
.graph-json-editor h3 { margin: 0; font: 750 11px var(--sans); }
.graph-json-editor p { color: var(--muted); font-size: 8px; line-height: 1.5; }
.graph-json-editor textarea { padding: 9px; border: 1px solid var(--line); border-radius: 8px; resize: none; color: #294737; background: #fafbf9; font: 8px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.studio-console { height: 168px; border-top: 1px solid var(--line); background: white; }
.console-head { height: 39px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 9px; }
.console-output { height: 128px; padding: 10px 14px; color: var(--muted); font-size: 8px; line-height: 1.55; overflow-y: auto; }
.console-output p { margin: 0 0 5px; }
.console-issue { padding: 6px 8px; display: grid; grid-template-columns: 65px minmax(0,1fr) auto; gap: 8px; border-top: 1px solid var(--line); }
.console-issue:first-child { border-top: 0; }
.studio-error { position: absolute; right: 14px; bottom: 171px; z-index: 5; min-height: 0; padding: 7px 10px; border-radius: 7px; background: #fff2ef; }

/* Report Workspace uses the same facts and controls in a full investigation surface. */
body.report-open .content { margin-right: 0; }
.report-drawer { inset: 74px 12px 12px auto; width: min(1120px, calc(100vw - 274px)); height: calc(100vh - 86px); border: 1px solid var(--line); border-radius: 13px; box-shadow: -18px 18px 60px rgba(10,39,24,.18); }
.report-drawer::backdrop { display: block; background: rgba(7,31,20,.31); backdrop-filter: blur(2px); }
.report-drawer .report-detail-content { margin: 0; padding: 16px 18px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr); gap: 12px; }
.report-drawer .detail-grid { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
.report-drawer .report-detail-content > section { margin: 0; }
.report-drawer .report-detail-content > section:nth-of-type(n+2) { grid-column: 1; }
.report-drawer .claim-bar, .report-drawer .detail-actions, .report-drawer .surface-error { grid-column: 2; }
.report-drawer .claim-bar { top: 0; bottom: auto; align-self: start; }
.report-drawer .detail-actions { padding: 0; grid-template-columns: 1fr; align-self: start; }

@media (max-width: 1100px) {
  .object-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .command-grid, .assistant-layout, .settings-grid { grid-template-columns: 1fr; }
  .assistant-side { grid-template-columns: 1fr 1fr; }
  .settings-wide { grid-column: auto; }
  .studio-body { grid-template-columns: 180px minmax(430px,1fr) 250px; }
  .report-drawer { width: calc(100vw - 40px); }
}

@media (max-width: 760px) {
  .global-command, .health { display: none; }
  .content { padding: 22px 14px 35px; }
  .command-grid, .object-grid, .form-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .assistant-side { grid-template-columns: 1fr; }
  .assistant-message { max-width: 94%; }
  .configuration-tabs { width: 100%; }
  .studio-dialog { width: 100vw; height: 100vh; margin: 0; border: 0; border-radius: 0; }
  .studio-toolbar { height: auto; min-height: 64px; align-items: flex-start; flex-direction: column; padding-block: 9px; }
  .studio-actions { width: 100%; overflow-x: auto; }
  .save-state { display: none; }
  .studio-body { height: calc(100vh - 290px); display: flex; flex-direction: column; overflow-y: auto; }
  .node-palette, .node-inspector { display: block; flex: 0 0 auto; overflow: visible; }
  .node-palette { border-right: 0; border-bottom: 1px solid var(--line); }
  .node-palette > p { display: none; }
  .node-palette-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
  .palette-button { min-width: 155px; margin-top: 0; flex: 0 0 155px; }
  .workflow-canvas-shell { min-height: 500px; flex: 0 0 500px; }
  .node-inspector { border-top: 1px solid var(--line); border-left: 0; }
  .graph-json-editor { height: 220px; grid-template-columns: 1fr; overflow-y: auto; }
  .graph-json-editor > div { display: none; }
  .report-drawer { inset: 58px 0 0; width: 100vw; height: calc(100vh - 58px); border-radius: 0; }
  .report-drawer .report-detail-content, .report-drawer .detail-grid { grid-template-columns: 1fr; }
  .report-drawer .report-detail-content > *, .report-drawer .claim-bar, .report-drawer .detail-actions { grid-column: 1 !important; }
  .component-filters { align-items: stretch; flex-direction: column; }
  .component-filters .search-field { min-width: 0; }
}

/* Handoff-aligned production shell */
:root {
  --product-sidebar: 248px;
  --product-topbar: 64px;
  --product-shadow: 0 1px 2px rgba(6,31,23,.06), 0 4px 14px rgba(6,31,23,.04);
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
#workspace-shell-root, #workspace-navigation-root { display: contents; }
.topbar svg, .sidebar svg, .surface-buttons svg, .command-metrics svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle, .nav-scrim { display: none; }
.nav-toggle[hidden] { display: none; }

.topbar {
  z-index: 70;
  height: var(--product-topbar);
  padding: 0 16px;
  display: grid;
  grid-template-columns: 216px minmax(188px, 240px) minmax(240px, 520px) minmax(280px, 1fr);
  justify-content: stretch;
  gap: 14px;
  background: rgba(255,255,255,.96);
}
.brand { min-width: 0; gap: 10px; }
.brand img { border-radius: 9px; }
.brand > span:last-child { min-width: 0; }
.brand strong, .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand strong { font-size: 13px; line-height: 1.25; }
.brand small { margin-top: 2px; font-size: 10px; }
.top-workspace { min-width: 0; padding: 5px 8px; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; }
.top-workspace > span:last-child { min-width: 0; }
.top-workspace strong, .top-workspace small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-workspace strong { font-size: 12px; }
.top-workspace small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.workspace-mark { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; color: var(--safest-lime-400); background: var(--forest-dark); font-size: 10px; font-weight: 850; }
.workspace-logo { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; object-fit: contain; }
.global-command { width: auto; min-width: 0; min-height: 38px; padding: 0 11px; justify-self: stretch; display: grid; grid-template-columns: 17px minmax(0,1fr) auto; gap: 9px; color: #637168; background: #fafbf8; font-size: 12px; font-weight: 550; text-align: left; }
.global-command span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-command kbd { padding: 2px 6px; font-size: 9px; }
.top-actions { min-width: 0; justify-content: flex-end; gap: 8px; }
.health { flex: 0 1 auto; padding: 6px 8px; border-radius: 999px; background: #fafbf8; font-size: 10px; white-space: nowrap; }
.current-analyst { min-width: 0; padding: 4px 10px 4px 4px; border: 0; border-radius: 8px; }
.current-analyst:hover { background: #fafbf8; }
.current-analyst .analyst-identity strong { color: var(--ink); font-size: 11px; }
.current-analyst .analyst-identity small { font-size: 9px; }
.current-analyst .analyst-avatar { width: 30px; height: 30px; flex-basis: 30px; }
.sign-out-button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: #425148; background: white; font-size: 10px; font-weight: 800; }
.sign-out-button:hover { background: #f7f9f6; }

.workspace { min-height: calc(100vh - var(--product-topbar)); grid-template-columns: var(--product-sidebar) minmax(0, 1fr); background: var(--canvas); }
.sidebar { top: var(--product-topbar); height: calc(100vh - var(--product-topbar)); height: calc(100dvh - var(--product-topbar)); min-height: 0; padding: 16px 12px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; background: var(--forest-dark); }
.sidebar nav { min-height: min-content; margin-top: 0; padding-bottom: 10px; display: grid; gap: 3px; }
.sidebar nav > small { margin: 11px 10px 5px; color: #7fa596; font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.sidebar nav > small:first-child { margin-top: 9px; }
.sidebar nav a { min-height: 40px; padding: 0 10px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; color: #c5d7cf; font-size: 13px; font-weight: 560; }
.sidebar nav a svg { width: 18px; height: 18px; }
.sidebar nav a span { width: auto; min-width: 0; text-align: left; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.065); }
.sidebar nav a.active { color: #102f24; background: var(--safest-lime-400); box-shadow: none; font-weight: 750; }
.sidebar .nav-count { min-width: 22px; margin-left: 0; color: #dceae3; background: rgba(255,255,255,.10); font-size: 9px; }
.sidebar nav a.active .nav-count { color: white; background: var(--forest-dark); }

.content { background: var(--canvas); }
.command-view { max-width: 1184px; margin: 0 auto; padding: 28px; }
.command-head { min-height: 0; margin: 0 0 24px; padding: 0; align-items: flex-start; border: 0; background: transparent; }
.command-head h1 { margin: 0; font-family: var(--sans); font-size: 28px; font-weight: 760; line-height: 1.25; letter-spacing: -.04em; }
.command-head p:last-child { max-width: 720px; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.command-head .surface-buttons { padding-top: 0; flex-wrap: nowrap; }
.surface-buttons .primary, .surface-buttons .secondary { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.surface-buttons svg { width: 16px; height: 16px; }

.attention-banner { margin: 0 0 20px; padding: 14px 16px; border: 0; border-radius: 12px; color: #764707; background: var(--safest-warning-100); font-size: 12px; }
.attention-banner > div { flex: 1; }
.attention-banner strong { font-size: 13px; }
.attention-banner span { margin-top: 3px; color: inherit; font-size: 11px; line-height: 1.45; }

.command-actions { align-items: center; }
.command-signals { margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.command-signal { min-width: 0; min-height: 82px; padding: 13px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 4px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; box-shadow: var(--product-shadow); text-align: left; }
.command-signal:hover { border-color: #bdc9c1; background: #fbfcfa; }
.command-signal > span { align-self: end; color: var(--muted); font-size: 10px; font-weight: 720; }
.command-signal > strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font: 760 25px/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.command-signal > small { color: var(--muted); font-size: 9px; }
.command-signal.danger > strong { color: var(--danger); }
.command-signal.warning > strong { color: var(--safest-warning-700); }
.command-signal.positive > strong { color: var(--safest-positive-700); }

.command-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.command-side-stack { min-width: 0; display: grid; gap: 16px; }
.command-panel { overflow: hidden; border-radius: 12px; box-shadow: var(--product-shadow); }
.command-panel .surface-head { min-height: 64px; padding: 15px 17px; align-items: flex-start; }
.command-panel .surface-head h2 { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 740; letter-spacing: -.02em; }
.command-panel .surface-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.command-panel .surface-head .text-button { margin-top: 1px; font-size: 11px; }
.surface-head-actions { display: flex; align-items: center; gap: 12px; }

.review-priority-list { display: grid; }
.review-priority-row { position: relative; min-width: 0; min-height: 88px; padding: 14px 14px 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; border-top: 1px solid var(--line); color: var(--ink); background: white; text-align: left; }
.review-priority-row:hover { background: #fafbf8; }
.review-priority-rail { position: absolute; inset: 13px auto 13px 0; width: 3px; border-radius: 0 999px 999px 0; background: #b7c2ba; }
.review-priority-row.warning .review-priority-rail { background: #d3972f; }
.review-priority-row.danger .review-priority-rail { background: var(--danger); }
.review-priority-main, .review-priority-title, .review-priority-meta { min-width: 0; display: flex; align-items: center; }
.review-priority-main { display: block; }
.review-priority-title { gap: 8px; }
.review-priority-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 12px; white-space: nowrap; }
.review-priority-main > small { margin-top: 4px; display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.review-priority-meta { margin-top: 8px; gap: 12px; color: #66766d; font-size: 9px; }
.review-priority-meta span + span::before { content: ""; width: 3px; height: 3px; margin: 0 7px 2px 0; display: inline-block; border-radius: 50%; background: #aab4ad; }
.priority-chip, .sla-chip { width: fit-content; border-radius: 999px; font-weight: 760; white-space: nowrap; }
.priority-chip { padding: 3px 6px; color: #59675f; background: #f0f3f0; font-size: 8px; }
.priority-chip.warning { color: #75520f; background: var(--safest-warning-100); }
.priority-chip.danger { color: var(--danger); background: var(--danger-soft); }
.sla-chip { padding: 5px 8px; color: #56665d; background: #f1f4f1; font-size: 9px; }
.sla-chip.positive { color: var(--safest-positive-700); background: var(--safest-positive-100); }
.sla-chip.warning { color: #75520f; background: var(--safest-warning-100); }
.sla-chip.danger { color: var(--danger); background: var(--danger-soft); }
.review-row-arrow { width: 16px; height: 16px; fill: none; stroke: #8b9890; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.queue-health-list { padding: 2px 17px 15px; display: grid; }
.queue-health-row { padding: 13px 0; border-top: 1px solid var(--line); }
.queue-health-row:first-child { border-top: 0; }
.queue-health-title, .queue-health-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.queue-health-title strong { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.queue-health-title span { color: var(--ink); font-size: 10px; font-weight: 730; white-space: nowrap; }
.queue-health-meta { margin-top: 5px; color: var(--muted); font-size: 9px; }
.queue-health-row.danger .queue-health-meta span:first-child { color: var(--danger); font-weight: 720; }
.queue-health-track { height: 5px; margin-top: 10px; display: block; overflow: hidden; border-radius: 999px; background: #edf1ed; }
.queue-health-track i { display: block; height: 100%; border-radius: inherit; background: var(--safest-positive-600); }
.queue-health-row.warning .queue-health-track i { background: #d3972f; }
.queue-health-row.danger .queue-health-track i { background: var(--danger); }
.queue-health-row > small { margin-top: 5px; display: block; color: var(--muted); font-size: 8px; }

.system-health-summary { margin: 0 16px; padding: 12px; display: flex; align-items: center; gap: 10px; border-radius: 10px; color: var(--safest-positive-700); background: var(--safest-positive-100); }
.system-health-summary.danger { color: var(--danger); background: var(--danger-soft); }
.system-health-summary > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.72); }
.system-health-summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.system-health-summary strong, .system-health-summary small { display: block; }
.system-health-summary strong { font-size: 10px; }
.system-health-summary small { margin-top: 2px; color: inherit; font-size: 8px; line-height: 1.4; opacity: 1; }
.system-health-facts { margin: 12px 16px 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.system-health-facts div { min-width: 0; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: white; }
.system-health-facts dt { color: var(--muted); font-size: 8px; }
.system-health-facts dd { margin: 0; font-size: 10px; font-weight: 760; font-variant-numeric: tabular-nums; }

.command-empty { min-height: 132px; padding: 24px 18px; display: flex; align-items: center; justify-content: center; gap: 12px; border-top: 1px solid var(--line); text-align: left; }
.command-empty > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; color: var(--safest-positive-700); background: var(--safest-positive-100); }
.command-empty svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.command-empty strong, .command-empty small { display: block; }
.command-empty strong { font-size: 12px; }
.command-empty small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.command-empty.compact { min-height: 86px; padding: 18px 0; justify-content: flex-start; border-top: 0; }

/* The remaining authenticated surfaces share the same handoff page width. */
.builder-view, .assistant-view, .settings-view { max-width: 1184px; padding: 28px; }
.builder-view > .page-head, .assistant-view > .page-head, .settings-view > .page-head { min-height: 0; margin: 0 0 24px; padding: 0; align-items: flex-start; border: 0; background: transparent; }
.builder-view > .page-head h1, .assistant-view > .page-head h1, .settings-view > .page-head h1 { font-size: 28px; }
.content > .surface[data-view], .content > .explain-grid[data-view] { max-width: 1184px; margin: 28px auto; }

@media (max-width: 1240px) {
  :root { --product-sidebar: 218px; }
  .topbar { grid-template-columns: 186px minmax(170px, 210px) minmax(210px, 1fr) auto; }
  .health { display: none; }
}

@media (max-width: 1020px) {
  :root { --product-sidebar: 72px; }
  .topbar { grid-template-columns: 190px minmax(210px, 1fr) auto; }
  .top-workspace { display: none; }
  .sidebar { padding-inline: 10px; }
  .sidebar nav > small, .sidebar nav a span, .sidebar nav a b { display: none; }
  .sidebar nav a { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
  .command-grid { grid-template-columns: 1fr; }
  .command-workspace-grid { grid-template-columns: 1fr; }
  .command-side-stack { grid-template-columns: 1fr 1fr; }
  .queue-load-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --product-topbar: 64px; }
  .topbar { height: var(--product-topbar); padding-inline: 12px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; }
  .nav-toggle { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 9px; color: var(--ink); background: transparent; }
  .nav-toggle:hover { background: #f2f5f1; }
  .nav-toggle svg { width: 20px; height: 20px; }
  .global-command, .health, .current-analyst { display: none; }
  .workspace { display: block; min-height: calc(100vh - var(--product-topbar)); }
  .sidebar { position: fixed; z-index: 66; top: var(--product-topbar); left: 0; width: min(248px, calc(100vw - 42px)); height: calc(100vh - var(--product-topbar)); padding: 14px 12px; overflow-y: auto; visibility: hidden; pointer-events: none; transform: translateX(-102%); transition: transform 180ms ease, visibility 0s linear 180ms; box-shadow: 18px 0 46px rgba(4,31,21,.22); }
  .mobile-navigation-open .sidebar { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
  .sidebar nav { display: grid; grid-template-columns: 1fr; gap: 3px; overflow: visible; }
  .sidebar nav > small { display: block; }
  .sidebar nav a { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; justify-items: stretch; padding: 0 10px; }
  .sidebar nav a span { display: block; white-space: normal; }
  .sidebar nav a b { display: inline-block; }
  .nav-scrim { position: fixed; z-index: 65; inset: var(--product-topbar) 0 0; width: 100%; height: auto; display: block; border: 0; border-radius: 0; background: rgba(5,28,20,.33); backdrop-filter: blur(1px); }
  .nav-scrim[hidden] { display: none; }
  .content { padding: 0; }
  .command-view, .builder-view, .assistant-view, .settings-view { padding: 20px 14px 34px; }
  .command-head { align-items: stretch; }
  .command-head .surface-buttons { width: 100%; justify-content: flex-start; }
  .command-metrics { grid-template-columns: 1fr 1fr; }
  .command-signals { grid-template-columns: 1fr 1fr; }
  .command-side-stack { grid-template-columns: 1fr; }
  .queue-load-list { grid-template-columns: 1fr; }
  .compact-run-row { grid-template-columns: 32px minmax(0,1fr) auto; }
  .compact-run-row .run-status, .compact-run-row .run-age { display: none; }
  .content > .surface[data-view], .content > .explain-grid[data-view] { margin: 20px 14px; }
}

@media (max-width: 460px) {
  .brand small { display: none; }
  .brand .customer-brand-fallback { display: grid; }
  .topbar { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .command-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .command-metrics article { min-height: 106px; padding: 14px; }
  .command-metrics strong { font-size: 24px; }
  .command-head h1 { font-size: 25px; }
  .command-head .surface-buttons > * { flex: 1; justify-content: center; }
  .command-actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .command-actions > * { width: 100%; min-width: 0; }
  .command-signals { gap: 8px; }
  .command-signal { min-height: 70px; padding: 10px 11px; }
  .command-signal > strong { font-size: 22px; }
  .command-signal > small { display: none; }
  .command-panel .surface-head { min-height: 58px; padding: 13px 14px; }
  .command-panel .surface-head p { display: none; }
  .review-priority-row { min-height: 94px; padding: 13px 12px 13px 16px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .review-row-arrow { display: none; }
  .review-priority-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .review-priority-title strong { max-width: 100%; }
  .review-priority-meta { gap: 8px; }
  .sla-chip { align-self: start; margin-top: 1px; }
  .queue-health-list { padding-inline: 14px; }
  .system-health-summary, .system-health-facts { margin-inline: 14px; }
  .queue-load-row { grid-template-columns: 1fr 48px; }
  .queue-load-track { grid-column: 1 / -1; grid-row: 2; }
  .attention-row { grid-template-columns: 34px minmax(0,1fr); }
  .attention-meta { grid-column: 2; text-align: left; }
}

@media (max-width: 340px) {
  .command-metrics { grid-template-columns: 1fr; }
  body.login-mode .login-story { padding: 24px 18px; }
  body.login-mode .login-story h1 { font-size: 34px; }
  body.login-mode .login-story ul { display: none; }
}

/* Visual intake form builder */
.configuration-dialog { width: min(1180px, calc(100% - 28px)); }
.configuration-dialog .editor-form { padding: 20px; }
.form-builder-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 18px; align-items: start; }
.form-builder-controls { display: grid; gap: 13px; }
.form-builder-controls > section { padding: 16px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--customer-radius); background: var(--paper); }
.form-builder-controls h3 { margin: 0; font: 720 14px/1.2 var(--sans); letter-spacing: -.01em; }
.builder-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.builder-section-head p, .builder-section-head small { margin: 3px 0 0; display: block; color: var(--muted); font-size: 9px; }
.builder-rows, .form-field-list, .field-options { display: grid; gap: 9px; }
.builder-row { padding: 11px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(130px, .7fr) auto; gap: 9px; align-items: end; border: 1px solid var(--line); border-radius: max(8px, calc(var(--customer-radius) * .75)); background: #fafbf9; }
.target-type-row { grid-template-columns: minmax(0, 1fr) auto; }
.builder-row-actions { display: flex; gap: 4px; align-items: center; }
.builder-row-actions .icon-button { width: 29px; min-height: 31px; padding: 4px; }
.danger-text { color: var(--danger); }
.form-field-card { border: 1px solid var(--line); border-radius: var(--customer-radius); background: #fafbf9; overflow: hidden; }
.form-field-head { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: var(--paper); }
.field-card-title { font-size: 11px; }
.form-field-grid { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-field-grid textarea { min-height: 72px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }
.builder-checkbox { min-height: 40px; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 8px; }
.builder-checkbox input { width: auto; min-height: 0; }
.field-number-bounds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-options-section { padding: 12px; border-top: 1px solid var(--line); background: var(--paper); }
.field-option-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .55fr) auto; gap: 8px; align-items: center; }
.field-option-row button { width: 30px; min-height: 40px; padding: 5px; }
.form-builder-preview { position: sticky; top: 86px; padding: 14px; border: 1px solid var(--line); border-radius: var(--customer-radius); background: #eef2ed; }
.form-builder-preview > div:first-child { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.form-builder-preview > div:first-child span { color: var(--muted); font-size: 9px; }
.form-builder-preview safest-report { max-height: calc(100vh - 190px); overflow-y: auto; }

/* Customer branding settings */
.brand-settings-card .surface-head p:last-child, .settings-card .surface-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.brand-form { padding: 18px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; }
.brand-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.brand-controls .wide-field { grid-column: 1 / -1; }
.brand-controls label:has(input[type=color]) { grid-template-columns: 1fr 44px; align-items: center; }
.brand-controls input[type=color] { min-height: 40px; padding: 3px; }
.brand-controls label:has(input[type=range]) { grid-template-columns: 1fr auto; }
.brand-controls input[type=range] { grid-column: 1 / -1; padding: 0; border: 0; }
.brand-preview { padding: 15px; border: 1px solid var(--line); border-radius: var(--customer-radius); background: #fafbf9; }
.brand-preview-card { padding: 18px; display: flex; gap: 12px; color: var(--preview-text); border: 1px solid var(--preview-line); border-radius: var(--preview-radius); background: var(--preview-surface); font-family: var(--preview-body); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.brand-preview-logo { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: max(5px, calc(var(--preview-radius) * .7)); color: var(--preview-primary-text); background-color: var(--preview-primary); background-position: center; background-size: contain; background-repeat: no-repeat; font-size: 10px; font-weight: 850; }
.brand-preview-logo.has-image { color: transparent; background-color: transparent; }
.brand-preview-card h3 { margin: 0 0 4px; font-family: var(--preview-heading); font-size: 18px; }
.brand-preview-card p { margin: 0; color: var(--preview-muted); font-size: 10px; }
.brand-preview-card button { margin-top: 14px; padding: 9px 12px; border-radius: max(5px, calc(var(--preview-radius) * .65)); color: var(--preview-primary-text); background: var(--preview-primary); font-size: 10px; font-weight: 800; }
.brand-form > .editor-footer { grid-column: 1 / -1; }

/* Guided reporting channel setup */
.integration-dialog { width: min(760px, calc(100% - 28px)); }
.integration-wizard { padding: 20px; }
.integration-setup-step { display: grid; gap: 13px; }
.integration-wizard fieldset { margin: 0; padding: 13px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--customer-radius); }
.integration-wizard legend { padding: 0 5px; font-size: 10px; font-weight: 800; }
.channel-choice { padding: 12px; display: flex; grid-template-columns: none; flex-direction: row; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: max(7px, calc(var(--customer-radius) * .75)); background: var(--paper); }
.channel-choice:has(input:checked) { border-color: var(--forest); background: color-mix(in srgb, var(--forest) 7%, var(--paper)); }
.channel-choice input { width: auto; min-height: 0; margin-top: 3px; accent-color: var(--forest); }
.channel-choice strong, .channel-choice small { display: block; }
.channel-choice small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; }
.field-help { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.context-field-list { display: grid; gap: 8px; }
.context-field-row { padding: 9px; display: grid; grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.4fr) 100px 105px auto auto 34px; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.context-field-row input, .context-field-row select { min-width: 0; min-height: 34px; padding: 7px 8px; font-size: 9px; }
.context-field-check { display: flex; grid-template-columns: none; flex-direction: row; gap: 5px; align-items: center; white-space: nowrap; font-size: 8px; }
.context-field-check input { width: auto; min-height: 0; padding: 0; accent-color: var(--forest); }
.context-field-remove { width: 30px; height: 30px; }
.integration-result { display: grid; gap: 17px; }
.success-heading { padding: 15px; display: flex; gap: 11px; border-radius: var(--customer-radius); background: color-mix(in srgb, var(--forest) 8%, var(--paper)); }
.success-heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-primary-contrast); background: var(--forest); font-weight: 900; }
.success-heading h3 { margin: 0 0 4px; font-size: 15px; }
.success-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.channel-result-block { display: grid; gap: 13px; }
.copy-control { display: flex; gap: 7px; align-items: stretch; }
.copy-control input, .copy-control textarea { flex: 1; }
.copy-control textarea { min-height: 230px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; font: 10px/1.55 var(--safest-font-mono); }
.copy-control button { flex: 0 0 auto; }
.link-button { display: inline-flex; width: fit-content; align-items: center; text-decoration: none; }
.secret-callout { padding: 14px; border: 1px solid #e3c27d; border-radius: var(--customer-radius); background: #fff8e7; }
.secret-callout p { color: #735c2b; font-size: 10px; }
.integration-result details { padding: 12px; border: 1px solid var(--line); border-radius: var(--customer-radius); }
.integration-result summary { cursor: pointer; font-size: 10px; font-weight: 800; }
.integration-widget-preview { max-width: 460px; margin: 12px auto 0; }

@media (max-width: 900px) {
  .form-builder-layout, .brand-form { grid-template-columns: 1fr; }
  .form-builder-preview { position: static; }
  .brand-form > .editor-footer { grid-column: auto; }
  .context-field-row { grid-template-columns: 1fr 1fr; }
  .context-field-row .context-field-remove { justify-self: end; }
}

@media (max-width: 620px) {
  .brand-controls, .form-field-grid, .builder-row { grid-template-columns: 1fr; }
  .builder-row-actions { justify-content: flex-end; }
  .copy-control { flex-wrap: wrap; }
}

/* Authoritative responsive contract for the console shell and dense editors. */
body.login-mode .topbar { display: flex; justify-content: flex-start; }
body.login-mode .top-actions { margin-left: auto; }
.session-loading {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--background, #f4f7f3);
}
.session-loading[hidden] { display: none; }
.session-loading-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--text, #183228);
  text-align: center;
}
.session-loading-card strong { font-size: 16px; }
.session-loading-card > span:last-child { color: var(--muted, #66766f); font-size: 13px; }
.session-loading-mark {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  border: 3px solid color-mix(in srgb, var(--primary, #165b43) 18%, transparent);
  border-top-color: var(--primary, #165b43);
  border-radius: 50%;
  animation: session-loading-spin .8s linear infinite;
}
@keyframes session-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .session-loading-mark { animation: none; } }

/* Report drawer: readable case record with technical execution kept secondary. */
.report-drawer .report-detail-content {
  display: block;
  max-width: 1180px;
  margin-inline: auto;
  padding: 22px 24px 36px;
}
.report-drawer .report-detail-content > section,
.report-drawer .detail-grid section,
.report-drawer .detail-actions form {
  border-color: #dce5de;
  border-radius: 12px;
  background: #fff;
}
.report-drawer .report-detail-content > section { margin-top: 16px; padding: 20px; }
.report-drawer .detail-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
.report-drawer .claim-bar,
.report-drawer .detail-actions,
.report-drawer .surface-error { width: 100%; }
.report-drawer .detail-actions { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 16px; }
.case-activity-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.case-activity-heading h3 { margin: 0 !important; font-size: 20px; }
.case-activity-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.case-activity-heading > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: #315b47; background: #edf5ef; font-size: 11px; font-weight: 750; }
.case-activity-section .report-timeline { padding-left: 2px; }
.case-activity-section .timeline-event { grid-template-columns: 18px minmax(0, 1fr); gap: 14px; min-height: 68px; }
.case-activity-section .timeline-event:not(:last-child)::before { top: 16px; bottom: 0; left: 6px; width: 2px; background: #dfe8e1; }
.case-activity-section .timeline-marker { width: 14px; height: 14px; margin-top: 3px; }
.case-activity-section .timeline-event > div { padding: 2px 0 18px; }
.case-activity-section .timeline-event strong { color: #172d23; font-size: 13px; line-height: 1.35; }
.case-activity-section .timeline-event span { margin-top: 4px; color: #40584c; font-size: 12px; line-height: 1.5; }
.case-activity-section .timeline-event small { margin-top: 6px; color: #75827b; font-size: 10px; line-height: 1.4; }
.workflow-technical { margin-top: 4px; border-top: 1px solid #e4eae5; }
.workflow-technical summary { padding: 15px 2px 5px; color: #40564b; cursor: pointer; font-size: 12px; font-weight: 750; }
.workflow-technical summary span { margin-left: 6px; color: var(--muted); font-weight: 550; }
.workflow-technical .report-run-list { margin: 10px 0 0; }
.technical-event-count { margin: 10px 2px 2px; color: var(--muted); font-size: 10px; }
.enrichment-heading { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.enrichment-heading h3 { margin: 0 !important; }
.enrichment-heading p { max-width: 66ch; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.enrichment-heading > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: #315b47; background: #edf5ef; font-size: 10px; font-weight: 800; }
.enrichment-finding-list { display: grid; gap: 11px; }
.enrichment-finding { min-width: 0; padding: 14px; border: 1px solid #dce6df; border-radius: 10px; background: #f9fbf9; }
.enrichment-finding > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.enrichment-finding > header > div { min-width: 0; }
.enrichment-finding > header strong, .enrichment-finding > header small { display: block; }
.enrichment-finding > header strong { color: #19362a; font-size: 14px; }
.enrichment-finding > header small { margin-top: 4px; color: #5e7066; font-size: 12px; line-height: 1.5; }
.enrichment-conversation, .enrichment-history { margin-top: 13px; display: grid; gap: 12px; }
.enrichment-conversation h4 { margin: 0 0 7px; color: #5f7067; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.enrichment-message-list { display: grid; gap: 6px; }
.enrichment-message { padding: 9px 10px; border: 1px solid #e1e6e2; border-radius: 8px; background: white; }
.enrichment-message.reported { border-color: #e5c98b; background: #fff9ea; box-shadow: inset 3px 0 #d39b37; }
.enrichment-message header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.enrichment-message header div strong, .enrichment-message header div span { display: block; }
.enrichment-message header strong { color: #203a2e; font-size: 12px; }
.enrichment-message header span, .enrichment-message > small { color: #76847c; font-size: 10px; }
.enrichment-message header > span { flex: 0 0 auto; text-align: right; }
.enrichment-message p { margin: 8px 0; color: #2d4639; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.enrichment-account-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.enrichment-account { min-width: 0; padding: 11px; border: 1px solid #e1e6e2; border-radius: 8px; background: white; }
.enrichment-account > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.enrichment-account > header strong, .enrichment-account > header small { display: block; overflow-wrap: anywhere; }
.enrichment-account > header strong { color: #203a2e; font-size: 14px; }
.enrichment-account > header small { margin-top: 3px; color: #748179; font-size: 10px; }
.enrichment-account > header > span { padding: 4px 7px; border-radius: 999px; color: #315b47; background: #edf5ef; font-size: 10px; font-weight: 800; }
.enrichment-account dl { margin: 12px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.enrichment-account dl div { min-width: 0; padding: 8px 6px; border-radius: 7px; background: #f4f7f4; text-align: center; }
.enrichment-account dt { color: #6f7d75; font-size: 9px; }
.enrichment-account dd { margin: 4px 0 0; color: #213d30; font-size: 13px; font-weight: 800; }
.enrichment-account > p, .enrichment-restriction { margin: 6px 0 0; display: block; color: #607068; font-size: 11px; line-height: 1.5; }
.enrichment-account .enrichment-account-tenure { color: #354f42; font-weight: 700; }
.enrichment-restriction { color: #8a5427; }
.enrichment-expand, .enrichment-technical { border-top: 1px solid #e4e9e5; }
.enrichment-expand summary, .enrichment-technical summary { padding: 11px 1px 3px; color: #3e5d4d; cursor: pointer; font-size: 11px; font-weight: 800; }
.enrichment-expand[open] summary, .enrichment-technical[open] summary { margin-bottom: 8px; }
.enrichment-event-list { display: grid; gap: 6px; }
.enrichment-event-list article { padding: 8px 9px; border-radius: 7px; background: white; }
.enrichment-event-list strong, .enrichment-event-list span, .enrichment-event-list small { display: block; }
.enrichment-event-list strong { font-size: 12px; }
.enrichment-event-list span, .enrichment-event-list small { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.enrichment-event-list p { margin: 6px 0; font-size: 11px; line-height: 1.5; }
.enrichment-technical dl { grid-template-columns: 96px minmax(0, 1fr) !important; margin-bottom: 9px; font-size: 11px !important; }
.enrichment-technical pre { max-height: 320px; margin: 0; padding: 11px; overflow: auto; border-radius: 7px; color: #34483e; background: #eef2ef; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.enrichment-empty { padding: 13px; border: 1px dashed #ccd8d0; border-radius: 9px; background: #f7faf7; }
.enrichment-empty.danger { border-color: #e7c3bc; background: #fff3f0; }
.enrichment-empty strong { color: #29483a; font-size: 13px; }
.enrichment-empty p { margin: 4px 0 0; color: #64756c; font-size: 11px; line-height: 1.5; }
.report-drawer .case-message { max-width: min(82%, 720px); padding: 13px 15px; font-size: 12px; line-height: 1.55; }
.report-drawer .case-message small { font-size: 10px; line-height: 1.45; }

@media (max-width: 800px) {
  .report-drawer .report-detail-content { padding: 14px 14px 28px; }
  .report-drawer .detail-grid,
  .report-drawer .detail-actions { grid-template-columns: 1fr; }
  .report-drawer .submission-meta { grid-template-columns: 100px minmax(0, 1fr) !important; }
  .enrichment-account-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { min-width: 0; overflow-x: clip; }
  body.login-mode .topbar { height: 58px; padding-inline: 14px; }
  body.login-mode .brand { width: auto; max-width: calc(100% - 44px); }
  body.login-mode .brand small { display: none; }
  .sidebar { top: var(--product-topbar); width: min(248px, calc(100% - 42px)); height: calc(100dvh - var(--product-topbar)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .content, .queue-view, .report-surface, .report-surface > .surface-head { width: 100%; max-width: 100%; }
  .report-drawer { inset: var(--product-topbar) 0 0; width: 100%; height: calc(100dvh - var(--product-topbar)); max-height: none; margin: 0; border-width: 0; border-radius: 0; }
  .studio-dialog { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .studio-body { height: calc(100dvh - 290px); }
  .command-head .surface-buttons { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .queue-toolbar { max-width: 100%; }
  .editor-dialog, .detail-dialog, .queue-dialog, .quality-dialog, .appeal-dialog, .configuration-dialog, .integration-dialog {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px;
  }
  .report-drawer.detail-dialog {
    inset: var(--product-topbar) 0 0;
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - var(--product-topbar));
    max-height: none;
    margin: 0;
    border-width: 0;
    border-radius: 0;
  }
  .editor-form, .configuration-dialog .editor-form, .integration-wizard { padding: 14px; }
  .editor-footer, .routing-agent-head, .routing-agent-footer { align-items: stretch; flex-direction: column; }
  .editor-footer > div, .editor-footer > button { width: 100%; }
  .editor-footer > div > button { flex: 1; }
  .context-field-row { grid-template-columns: 1fr; }
  .context-field-row .context-field-remove { justify-self: end; }
  .context-field-check { white-space: normal; }
  .copy-control input, .copy-control textarea { width: 100%; min-width: 0; }
  .setup-row, .integration-row { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }
  .setup-row > :last-child, .integration-row > :last-child { grid-column: 2; justify-self: start; }
  .settings-facts { grid-template-columns: 1fr; gap: 4px; }
  .settings-fact + .settings-fact dt { margin-top: 8px; }
}

@media (max-width: 460px) {
  .sign-out-button { min-height: 40px; padding-inline: 10px; }
  .command-view, .builder-view, .assistant-view, .settings-view { padding-inline: 12px; }
  .content > .surface[data-view], .content > .explain-grid[data-view] { margin-inline: 12px; }
  .surface-buttons { width: 100%; justify-content: flex-start; }
  .copy-control button { width: 100%; }
  .assistant-composer { margin-inline: 10px; }
  .enrichment-heading { align-items: flex-start; }
  .enrichment-account dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .enrichment-message header { display: block; }
  .enrichment-message header > span { margin-top: 3px; text-align: left; }
}

/* Console content hierarchy: one task title, one useful line, then the work. */
.workspace-mode .page-head > div:first-child,
.workspace-mode .surface-head > div:first-child { min-width: 0; }
.workspace-mode .page-head p:last-child { max-width: 62ch; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.workspace-mode .surface-head { align-items: center; }
.workspace-mode .surface-head h2,
.workspace-mode .surface-head h3,
.workspace-mode .settings-card h2 { margin: 0; font-family: var(--sans); font-size: 17px; font-weight: 740; letter-spacing: -.025em; }
.workspace-mode .surface-head p { max-width: 68ch; margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.workspace-mode .settings-card .surface-head { min-height: 54px; padding: 14px 17px; }
.workspace-mode .settings-card .surface-head h2 { font-size: 16px; }
.workspace-mode .settings-grid { gap: 12px; }
.workspace-mode .preview-label { margin: 0 0 10px; color: #526158; font-size: 10px; font-weight: 750; }
.workspace-mode .builder-view > .page-head,
.workspace-mode .assistant-view > .page-head,
.workspace-mode .settings-view > .page-head { margin-bottom: 18px; }
.workspace-mode .command-head h1 { font-size: clamp(28px, 3vw, 36px); }
.workspace-mode .command-panel .surface-head { min-height: 54px; padding-block: 13px; }
.workspace-mode .command-panel .surface-head h2 { font-size: 15px; }
.workspace-mode .people-surface .surface-head,
.workspace-mode .profile-surface .surface-head { padding-block: 16px; }
.workspace-mode .people-surface .surface-head h2,
.workspace-mode .profile-surface .surface-head h2 { font-size: 18px; }
.workspace-mode .detail-head h2 { font-family: var(--sans); font-weight: 760; letter-spacing: -.025em; }
.workspace-mode .detail-head p { margin-top: 4px; }

@media (min-width: 1021px) {
  body.workspace-mode .brand { display: none; }
  body.workspace-mode .top-workspace small { display: none; }
  body.workspace-mode .topbar { grid-template-columns: minmax(180px, 240px) minmax(240px, 520px) minmax(280px, 1fr); }
}

@media (max-width: 760px) {
  .workspace-mode .builder-view > .page-head,
  .workspace-mode .assistant-view > .page-head,
  .workspace-mode .settings-view > .page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
  }
  .workspace-mode .builder-view > .page-head > .surface-buttons { grid-column: 1 / -1; width: auto; }
  .workspace-mode .page-head h1,
  .workspace-mode .builder-view > .page-head h1,
  .workspace-mode .assistant-view > .page-head h1,
  .workspace-mode .settings-view > .page-head h1 { font-size: 24px; line-height: 1.08; }
  .workspace-mode .page-head p:last-child { font-size: 11px; line-height: 1.4; }
  .workspace-mode .settings-card .surface-head { flex-direction: row; align-items: center; }
  .workspace-mode .settings-card.settings-wide .surface-head { flex-wrap: wrap; align-items: flex-start; }
  .workspace-mode .settings-card.settings-wide .surface-head > div { flex: 1 1 220px; }
  .workspace-mode .settings-card.settings-wide .surface-head > button { flex: 0 0 auto; }
  .workspace-mode .command-panel .surface-head { flex-direction: row; justify-content: space-between; align-items: center; }
  .workspace-mode .content > .surface[data-view],
  .workspace-mode .content > .explain-grid[data-view] { margin-top: 16px; }
}

@media (max-width: 460px) {
  .workspace-mode .command-view,
  .workspace-mode .builder-view,
  .workspace-mode .assistant-view,
  .workspace-mode .settings-view { padding-top: 16px; }
  .workspace-mode .command-metrics article { min-height: 92px; }
  .workspace-mode .command-metrics strong { margin-bottom: 0; }
  .workspace-mode .command-metrics small { display: none; }
  .workspace-mode .settings-card.settings-wide .surface-head > button { width: 100%; }
}

/* Typed Operations workspace */
.operation-metrics article.urgent { border-color: #ebc9c5; background: #fffafa; }
.operations-section-head { align-items: center; }
.operations-filters { flex-direction: row; }
.operations-filters label { min-width: 132px; }
.operation-incident-list { display: grid; }
.operation-incident-row { padding: 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto 110px auto; align-items: center; gap: 12px; border-top: 1px solid #edf0ec; }
.operation-incident-row:first-child { border-top: 0; }
.operation-incident-row strong, .operation-incident-row small { display: block; }
.operation-incident-row small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.operation-state { color: var(--muted); font-size: 10px; }
.operations-dialog { width: min(900px, calc(100% - 30px)); }
.operations-detail-content { padding: 20px 22px 24px; }
.operations-summary { margin: 0 0 14px; color: #3c5146; font-size: 11px; line-height: 1.6; }
.operations-detail-content > section { margin-top: 14px; }
.operations-detail-content > section > h3 { margin-bottom: 10px; font-size: 13px; }
.operations-detail-content pre { max-height: 260px; margin: 0; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; color: #294737; background: #f5f8f5; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.operation-detail-list { display: grid; gap: 7px; }
.operation-detail-list > p { margin: 0; color: var(--muted); font-size: 10px; }
.operation-detail-list article { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.operation-detail-list strong, .operation-detail-list small { display: block; }
.operation-detail-list strong { font-size: 10px; }
.operation-detail-list small { margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.operations-actions { margin-top: 15px; padding: 15px; display: grid; grid-template-columns: auto minmax(260px, 1fr); align-items: start; gap: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.operations-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.operations-actions form { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(220px, 1.45fr) auto; align-items: end; gap: 9px; }
.operations-actions textarea { min-height: 62px; padding: 9px; border: 1px solid #cfd7d1; border-radius: 8px; resize: vertical; font: inherit; }

@media (max-width: 760px) {
  .operations-section-head { align-items: stretch; }
  .operations-filters { width: 100%; }
  .operation-incident-row { grid-template-columns: minmax(0, 1fr) auto; }
  .operation-incident-row .operation-state { grid-column: 1; }
  .operation-incident-row > button { grid-column: 2; grid-row: 2; }
  .operations-actions, .operations-actions form { grid-template-columns: 1fr; }
  .operations-actions form > button { width: 100%; }
}

@media (max-width: 460px) {
  .operations-filters { flex-direction: column; }
  .operations-filters label { min-width: 0; }
  .operation-incident-row { padding: 13px 14px; }
  .operations-detail-content { padding: 15px 14px 20px; }
  .operation-detail-list article { align-items: flex-start; flex-direction: column; }
}

/* Typed Analytics workspace */
.analytics-toolbar { align-items: center; }

/* Canonical console heading contract: stable left edge, sentence case, one scale. */
.workspace-mode .command-view,
.workspace-mode .builder-view,
.workspace-mode .view-stack {
  width: 100%;
  max-width: 1184px;
  margin-inline: auto;
  padding: 28px;
}
.workspace-mode .page-stack { min-width: 0; }
.workspace-mode [data-view] { scroll-margin-top: var(--product-topbar); }
.workspace-mode .page-stack > .surface,
.workspace-mode .view-stack > .surface { max-width: none; margin: 0; }
.workspace-mode .page-stack > .queues-surface,
.workspace-mode .page-stack > .appeals-surface,
.workspace-mode .page-stack > .quality-surface { margin-top: 0; }
.workspace-mode .console-page-head,
.workspace-mode .command-head,
.workspace-mode .builder-view > .console-page-head,
.workspace-mode .assistant-view > .console-page-head,
.workspace-mode .settings-view > .console-page-head {
  min-height: 0;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  border: 0;
  background: transparent;
  text-align: left;
}
.workspace-mode .queue-view .console-page-head {
  width: min(100%, 1184px);
  max-width: 1184px;
  margin: 0 auto;
  padding: 28px 28px 18px;
  border: 0;
  background: transparent;
}
.workspace-mode .console-page-head h1,
.workspace-mode .command-head h1,
.workspace-mode .builder-view > .console-page-head h1,
.workspace-mode .assistant-view > .console-page-head h1,
.workspace-mode .settings-view > .console-page-head h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -.04em;
  text-align: left;
  text-transform: none;
}
.workspace-mode .console-page-head .page-title-group,
.workspace-mode .console-page-head .page-title-row,
.workspace-mode .surface-head > div:first-child,
.workspace-mode .detail-head > div:first-child,
.workspace-mode .studio-toolbar > div:first-child {
  text-align: left;
}
.workspace-mode .page-title-group { min-width: 0; flex: 1 1 220px; }
.workspace-mode .page-title-row { display: flex; align-items: center; gap: 10px; }
.workspace-mode .console-page-head .surface-buttons { width: auto; margin-left: auto; flex: 0 1 auto; justify-content: flex-end; }
.workspace-mode .console-page-head .page-title-group > p:last-child { max-width: 62ch; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.workspace-mode .context-label {
  margin: 0 0 7px;
  color: #56675d;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}
.workspace-mode .surface-head h2,
.workspace-mode .surface-head h3,
.workspace-mode .detail-head h2,
.workspace-mode .studio-toolbar h2,
.workspace-mode .node-palette h3,
.workspace-mode .node-inspector h3,
.workspace-mode .graph-json-editor h3,
.workspace-mode .people-columns h2,
.workspace-mode .analytics-body h3 {
  text-align: left;
  text-transform: none;
}
.workspace-mode .sidebar nav > small {
  letter-spacing: 0;
  text-transform: none;
}
.workspace-mode th,
.workspace-mode .badge,
.workspace-mode .priority-badge,
.workspace-mode .context-label,
.workspace-mode .queue-card dt,
.workspace-mode .object-card-meta span,
.workspace-mode .appeal-row > span,
.workspace-mode .detail-head p:last-child,
.workspace-mode .analytics-list > div,
.workspace-mode .canvas-node-kind,
.workspace-mode .workflow-edge-label {
  letter-spacing: 0;
  text-transform: none;
}
.workspace-mode .empty,
.workspace-mode .empty-product,
.workspace-mode .assistant-empty {
  text-align: center;
}

/* Layered reviewer presence: a stable summary in the header, detail only on demand. */
.workspace-mode .active-analysts { position: relative; margin-left: auto; flex: 0 0 auto; }
.workspace-mode .presence-summary {
  width: auto;
  min-height: 38px;
  max-width: 100%;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #d5ddd7;
  border-radius: 10px;
  color: #31483b;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 8px rgba(24,58,40,.035);
  font: inherit;
}
.workspace-mode button.presence-summary { cursor: pointer; }
.workspace-mode button.presence-summary:hover,
.workspace-mode button.presence-summary[aria-expanded="true"] { border-color: #a9beb0; background: white; }
.workspace-mode button.presence-summary:focus-visible { outline: 3px solid rgba(43,111,72,.16); outline-offset: 2px; }
.workspace-mode .presence-summary strong { overflow: hidden; font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.workspace-mode .presence-summary-empty { color: #78867e; box-shadow: none; }
.presence-signal { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #4ca36c; box-shadow: 0 0 0 4px rgba(76,163,108,.12); }
.presence-summary-empty .presence-signal { background: #a5afa9; box-shadow: none; }
.presence-avatar-stack { display: inline-flex; align-items: center; flex: 0 0 auto; padding-left: 5px; }
.presence-avatar-stack .analyst-avatar.small { width: 24px; height: 24px; flex-basis: 24px; margin: 0 0 0 -5px; border-width: 2px; font-size: 8px; }
.presence-avatar-stack .analyst-avatar.small:first-child { margin-left: 0; }
.presence-overflow-avatar { width: 24px; height: 24px; margin-left: -5px; display: inline-grid; place-items: center; border: 2px solid white; border-radius: 50%; color: #3e5649; background: #e7eee9; font-size: 7px; font-weight: 850; }
.presence-chevron { width: 7px; height: 7px; margin: -3px 2px 0 0; flex: 0 0 7px; border-right: 1.5px solid #66776d; border-bottom: 1.5px solid #66776d; transform: rotate(45deg); transition: transform .16s ease; }
.active-analysts.open .presence-chevron { margin-top: 3px; transform: rotate(225deg); }
.presence-scrim { display: none; }
.presence-panel {
  position: absolute;
  z-index: 55;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 28px));
  max-height: min(520px, calc(100dvh - 118px));
  border: 1px solid #d7dfd9;
  border-radius: 14px;
  background: white;
  box-shadow: 0 18px 48px rgba(18,48,32,.17), 0 3px 12px rgba(18,48,32,.08);
  overflow: hidden;
}
.presence-sheet-handle { display: none; }
.presence-panel > header { padding: 15px 15px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e5e9e6; }
.presence-panel > header h2 { margin: 0; font: 760 15px/1.25 var(--sans); letter-spacing: -.02em; }
.presence-panel > header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.presence-panel > header .icon-button { width: 32px; min-width: 32px; min-height: 32px; padding: 4px; }
.presence-panel-body { max-height: min(430px, calc(100dvh - 196px)); padding: 5px 14px 12px; overflow-y: auto; overscroll-behavior: contain; }
.presence-group { padding-top: 11px; }
.presence-group + .presence-group { margin-top: 4px; border-top: 1px solid #e8ebe8; }
.presence-group h3 { margin: 0 1px 6px; display: flex; align-items: center; gap: 6px; color: #6f7e75; font-size: 9px; font-weight: 760; }
.presence-group h3 span { min-width: 18px; padding: 2px 5px; border-radius: 999px; color: #466051; background: #edf2ee; font-size: 8px; text-align: center; }
.presence-group ul { margin: 0; padding: 0; list-style: none; }
.presence-group li { min-width: 0; min-height: 48px; padding: 7px 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #eff1ef; }
.presence-group li:first-child { border-top: 0; }
.presence-group .analyst-identity { min-width: 0; flex: 1 1 auto; }
.presence-group .analyst-identity > span:last-child { min-width: 0; flex: 1 1 auto; }
.presence-group .analyst-identity strong,
.presence-group .analyst-identity small { max-width: 250px; }
.presence-group .analyst-identity strong { color: #213a2e; font-size: 10px; }
.presence-group .analyst-identity small { font-size: 9px; }
.report-collaborators { width: fit-content; max-width: 100%; margin-top: 9px; padding: 5px 8px 5px 5px; display: flex; align-items: center; gap: 7px; border-radius: 8px; color: #625233; background: #fff4d9; font-size: 9px; font-weight: 720; line-height: 1.35; }
.report-collaborators > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.report-collaborators .presence-avatar-stack { padding-left: 0; }

@media (max-width: 760px) {
  .workspace-mode .command-view,
  .workspace-mode .builder-view,
  .workspace-mode .view-stack {
    padding: 20px 14px 34px;
  }
  .workspace-mode .queue-view .console-page-head {
    padding: 20px 14px 18px;
  }
  .workspace-mode .console-page-head h1,
  .workspace-mode .command-head h1,
  .workspace-mode .builder-view > .console-page-head h1,
  .workspace-mode .assistant-view > .console-page-head h1,
  .workspace-mode .settings-view > .console-page-head h1 {
    font-size: 24px;
    line-height: 1.12;
  }
  .workspace-mode .console-page-head .page-title-group > p:last-child { font-size: 11px; line-height: 1.4; }
}

@media (max-width: 620px) {
  .workspace-mode .queue-view .console-page-head > .active-analysts {
    width: 100%;
    flex: 1 0 100%;
  }
  .workspace-mode .queue-view .presence-summary { max-width: min(100%, 330px); }
  .presence-scrim { position: fixed; z-index: 79; inset: 0; width: 100%; min-height: 0; padding: 0; display: block; border: 0; border-radius: 0; background: rgba(6,31,22,.36); backdrop-filter: blur(1px); }
  .presence-panel { position: fixed; z-index: 80; inset: auto 0 0; width: 100%; max-height: min(72dvh, 600px); border-width: 1px 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 48px rgba(15,43,29,.19); }
  .presence-sheet-handle { width: 38px; height: 4px; margin: 8px auto 0; display: block; border-radius: 999px; background: #d1d8d3; }
  .presence-panel > header { padding-top: 9px; }
  .presence-panel-body { max-height: calc(min(72dvh, 600px) - 83px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .presence-group .analyst-identity strong,
  .presence-group .analyst-identity small { max-width: calc(100vw - 94px); }
  .workspace-mode .console-page-head:has(.surface-buttons button:nth-child(2)) > .surface-buttons {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .workspace-mode .settings-card.settings-wide .surface-head > button { width: auto; margin-left: auto; }
  .workspace-mode .console-page-head .surface-buttons { width: auto; }
  .workspace-mode .console-page-head:has(.surface-buttons button:nth-child(2)) > .surface-buttons { width: 100%; }
}
.analytics-toolbar label { width: 150px; }
.analytics-list > p { margin: 0; color: var(--muted); font-size: 10px; }
.audit-verification { color: #304a3b !important; font-weight: 650; }

@media (max-width: 620px) {
  .analytics-toolbar { align-items: stretch; }
  .analytics-toolbar label { width: 100%; }
}

/* Typed Workflows workspace and studio */
.workflow-list { align-items: stretch; }
.workflow-card { min-width: 0; }
.workflow-studio-dialog[open] { display: flex; flex-direction: column; }
.workflow-studio-dialog .studio-toolbar { height: auto; min-height: 68px; flex: 0 0 auto; padding-block: 9px; }
.workflow-studio-dialog .studio-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.studio-authority { display: flex; flex-direction: row; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.studio-authority select { width: auto; min-width: 104px; min-height: 31px; padding-block: 5px; }
.workflow-studio-dialog .studio-body { height: auto; min-height: 0; flex: 1 1 auto; }
.node-palette-list { display: grid; gap: 6px; }
.workflow-studio-dialog .graph-json-editor { height: auto; flex: 0 0 230px; min-height: 0; }
.workflow-studio-dialog .studio-console { height: auto; min-height: 0; flex: 0 0 168px; }
.workflow-studio-dialog .console-output { height: 128px; }
.workflow-studio-loading { min-height: 0; flex: 1 1 auto; padding: 18px; }
.workflow-studio-loading .skeleton-block { height: 100%; min-height: 320px; }
.node-inspector-empty { padding-top: 2px; }
.pin-control { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.pin-control label { min-width: 150px; }
.pin-control select { min-height: 31px; }
.studio-error:empty { display: none; }
.workflow-studio-dialog .studio-error { position: static; flex: 0 0 auto; margin: 8px 14px; font-size: 12px; }
.workflow-studio-dialog .studio-conflict { flex: 0 0 auto; padding: 12px 16px; margin: 0; font-size: 13px; }
.workflow-studio-dialog .studio-conflict p { margin: 6px 0 10px; }
.mobile-check-toggle { display: none; }
.workflow-create-dialog { width: min(650px, calc(100% - 30px)); }

@media (max-width: 760px) {
  .workflow-studio-dialog .studio-toolbar { gap: 9px; padding: 10px 12px; }
  .workflow-studio-dialog .studio-toolbar > div:first-child { width: 100%; }
  .workflow-studio-dialog .studio-actions { width: 100%; display: flex; overflow: visible; }
  .workflow-studio-dialog .save-state { display: block; flex: 1 0 100%; order: -1; font-size: 11px; }
  .workflow-studio-dialog .studio-actions > button { flex: 1 0 70px; }
  .workflow-studio-dialog.has-playbook .studio-authority { display: none; }
  .workflow-studio-dialog .playbook-section-nav { flex-wrap: nowrap; overflow-x: auto; padding: 10px 12px; }
  .workflow-studio-dialog .playbook-section-nav button { flex: 0 0 auto; padding: 9px 11px; }
  .workflow-studio-dialog .mobile-check-toggle { display: inline-flex; margin-left: auto; padding: 4px 6px; font-size: 11px; }
  .workflow-studio-dialog .studio-console.compact-checks { flex-basis: 44px; }
  .workflow-studio-dialog .compact-checks .console-output { display: none; }
  .workflow-studio-dialog .studio-authority { flex: 1 1 150px; }
  .workflow-studio-dialog .studio-authority select { flex: 1 1 auto; min-width: 0; }
  .workflow-studio-dialog .studio-body { height: auto; min-height: 0; overflow-y: auto; }
  .workflow-studio-dialog .node-palette { padding: 12px; }
  .workflow-studio-dialog .node-palette-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
  .workflow-studio-dialog .workflow-canvas-shell { min-height: 440px; flex-basis: 440px; }
  .workflow-studio-dialog .node-inspector { padding: 14px 12px 18px; }
  .workflow-studio-dialog .graph-json-editor { height: auto; flex-basis: 220px; }
  .workflow-studio-dialog .studio-console { flex-basis: 172px; }
  .workflow-studio-dialog .console-output { height: 132px; }
  .workflow-studio-dialog .studio-error { right: 10px; bottom: 175px; left: 10px; }
}

@media (max-width: 460px) {
  .workflow-create-dialog .form-grid { grid-template-columns: 1fr; }
  .workflow-create-dialog .editor-footer { align-items: stretch; flex-direction: column; }
  .workflow-create-dialog .editor-footer > div { justify-content: flex-end; }
  .workflow-studio-dialog .studio-actions > button { padding-inline: 7px; }
  .workflow-studio-dialog .console-issue { grid-template-columns: 54px minmax(0, 1fr); }
  .workflow-studio-dialog .console-issue code { grid-column: 2; overflow-wrap: anywhere; }
  .pin-control label, .pin-control button { width: 100%; }
}

/* Typed Components and Configuration workspaces */
.registry-dialog { width: min(860px, calc(100% - 28px)); }
.registry-form .safety-boundary { margin-bottom: 0; }
.configuration-form > .form-builder { min-width: 0; margin: 0; padding: 0; border: 0; }
.configuration-dialog-loading { padding: 20px; }
.configuration-dialog-loading .skeleton-block { height: 360px; margin: 0; }
.validation-summary strong, .validation-summary p { display: block; margin: 0; }
.validation-summary ul { margin: 7px 0 0; padding-left: 18px; }
.registry-list, .configuration-list { min-width: 0; }
.registry-card .object-card-footer small { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.component-filters { align-items: end; }
.component-filters .search-field { position: relative; display: block; }
.component-filters .search-field > span { position: absolute; z-index: 1; top: 10px; left: 11px; color: #849087; font-size: 13px; }
.component-filters .search-field > input { padding-left: 32px; }
.form-builder-controls textarea { font: inherit; }

@media (max-width: 760px) {
  .registry-dialog, .configuration-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .component-filters { align-items: stretch; }
  .configuration-dialog .detail-head, .registry-dialog .detail-head { padding: 14px; }
  .configuration-dialog .editor-form, .registry-dialog .editor-form { padding: 14px; }
  .configuration-tabs { scrollbar-width: thin; }
  .submission-meta { grid-template-columns: 100px minmax(0, 1fr) !important; }
  .answer-record { grid-template-columns: 1fr; gap: 5px; }
  .configuration-tabs button { flex: 0 0 auto; }
}

@media (max-width: 460px) {
  .registry-dialog, .configuration-dialog { width: 100%; max-height: 100vh; margin: 0; border: 0; border-radius: 0; }
  .registry-card .object-card-meta, .configuration-card .object-card-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .registry-card .object-card-footer, .configuration-card .object-card-footer { align-items: stretch; flex-direction: column; }
  .registry-card .object-card-footer small { max-width: 100%; }
  .registry-card .object-card-footer button, .configuration-card .object-card-footer button { width: 100%; }
  .configuration-dialog .editor-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .configuration-dialog .editor-footer > div > button { width: 100%; }
  .form-field-grid, .field-number-bounds { grid-template-columns: 1fr; }
  .builder-row, .target-type-row, .reason-row, .field-option-row { grid-template-columns: 1fr; }
  .builder-row-actions { justify-content: flex-end; }
  .field-option-row button { width: 100%; }
}

/* Tools and connections */
.registry-workspace { max-width: 1400px; margin-inline: auto; display: grid; gap: 24px; }
.workspace-mode .registry-workspace > .console-page-head { margin: 0; }
.registry-workspace > .form-message:empty, .registry-workspace > .surface-error:empty { display: none; }
.registry-model { margin-bottom: 20px; padding: 16px 18px; display: grid; grid-template-columns: minmax(150px,1fr) auto minmax(150px,1fr) auto minmax(150px,1fr) auto minmax(150px,1fr); align-items: center; gap: 12px; border: 1px solid #d8e3da; border-radius: 13px; background: linear-gradient(135deg, #fbfdf9, #f1f7f1); }
.registry-model > div { min-width: 0; display: grid; grid-template-columns: 28px minmax(0,1fr); column-gap: 10px; align-items: center; }
.registry-model > div > span { width: 28px; height: 28px; grid-row: span 2; display: grid; place-items: center; border-radius: 8px; color: var(--forest); background: white; box-shadow: 0 0 0 1px #d7e1d9; font-size: 10px; font-weight: 850; }
.registry-model strong { font-size: 12px; }
.registry-model small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.registry-model > b { color: #8ba095; font-size: 15px; }
.registry-tabs-row { margin-bottom: 13px; display: flex; align-items: center; gap: 16px; }
.registry-tabs-row .segmented-tabs { flex: 0 0 auto; margin: 0; }
.registry-tabs-row .segmented-tabs button { font-size: 11px; }
.registry-tabs-row .segmented-tabs button span { min-width: 20px; margin-left: 4px; padding: 2px 6px; border-radius: 999px; color: #5b6a61; background: #e5eae5; font-size: 9px; }
.registry-tabs-row .segmented-tabs button.active span { color: var(--forest); background: var(--mint); }
.registry-tabs-row > p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.registry-toolbar { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.registry-toolbar .search-field { position: relative; min-width: 230px; flex: 1 1 340px; }
.registry-toolbar .search-field > span { position: absolute; z-index: 1; top: 11px; left: 12px; color: #849087; font-size: 14px; }
.registry-toolbar .search-field input { padding-left: 34px; }
.registry-filter-chips { display: flex; align-items: center; gap: 5px; }
.registry-filter-chips button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #58665e; background: white; font-size: 10px; font-weight: 750; }
.registry-filter-chips button:hover, .registry-filter-chips button.active { color: var(--forest-dark); border-color: #a8c2b0; background: #eef6f0; }
.registry-archived-toggle { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.registry-archived-toggle input { width: 15px; min-height: 15px; accent-color: var(--forest); }
.registry-resource-list { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 16px rgba(21,55,37,.035); overflow: hidden; }
.registry-resource-list > .skeleton-card { min-height: 118px; border-radius: 0; border-bottom: 1px solid var(--line); }
.registry-resource-row { min-width: 0; padding: 17px 18px; display: grid; grid-template-columns: 42px minmax(280px,1fr) 92px minmax(150px,190px) auto; align-items: center; gap: 14px; border-top: 1px solid #edf0ec; }
.registry-resource-row:first-child { border-top: 0; }
.registry-resource-row:hover { background: #fbfcfa; }
.registry-resource-row .object-icon { width: 38px; height: 38px; font-size: 15px; }
.registry-resource-main { min-width: 0; }
.registry-resource-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.registry-resource-title h3 { margin: 0; font: 720 15px/1.25 var(--sans); letter-spacing: -.015em; }
.registry-owner-badge { padding: 3px 6px; border-radius: 999px; color: #5c4b83; background: #f0edfa; font-size: 8px; font-weight: 800; }
.registry-resource-main > p { max-width: 720px; margin: 5px 0 8px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.registry-resource-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.registry-resource-tags span { padding: 3px 6px; border-radius: 5px; color: #5c6961; background: #f0f3ef; font-size: 8px; font-weight: 700; }
.registry-resource-relationship span, .registry-resource-relationship strong, .registry-resource-relationship small { display: block; }
.registry-resource-relationship span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.registry-resource-relationship strong { margin-top: 3px; font-size: 15px; }
.registry-resource-relationship small { color: var(--muted); font-size: 8px; }
.registry-resource-state { min-width: 0; }
.registry-status { width: fit-content; padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; color: #526159; background: #edf1ed; font-size: 9px; font-weight: 800; }
.registry-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.registry-status.available { color: #2f6845; background: #eaf5ed; }
.registry-status.paused { color: #896221; background: #fff3d8; }
.registry-status.archived { color: #69736d; background: #ecefed; }
.registry-resource-state small { margin-top: 6px; display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.registry-resource-row > button { justify-self: end; white-space: nowrap; }
.registry-resource-list > .empty-product { border: 0; border-radius: 0; }

.registry-detail-dialog { width: min(820px, calc(100% - 30px)); }
.registry-detail-head h2 { margin-top: 2px; font-family: var(--sans); font-size: 21px; }
.registry-detail-head p:last-child { max-width: 650px; font-size: 11px; line-height: 1.45; text-transform: none; }
.registry-detail-body { padding: 20px 22px 24px; display: grid; gap: 13px; }
.registry-detail-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.registry-detail-summary > div { min-width: 0; padding: 11px; border-radius: 9px; background: #f5f7f4; }
.registry-detail-summary span, .registry-detail-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.registry-detail-summary span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.registry-detail-summary strong { margin-top: 5px; font-size: 10px; }
.registry-detail-section { padding: 15px; border: 1px solid var(--line); border-radius: 11px; }
.registry-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.registry-section-heading h3 { margin: 0; font-size: 13px; }
.registry-section-heading p { max-width: 580px; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.registry-section-heading button { flex: 0 0 auto; }
.registry-placeholder { margin: 12px 0 0; padding: 11px; border-radius: 8px; color: var(--muted); background: #f7f8f6; font-size: 10px; }
.registry-verification { margin-top: 12px; padding: 13px; border: 1px solid; border-radius: 9px; }
.registry-verification.verified { color: #315f43; border-color: #c8ddcd; background: #f0f8f2; }
.registry-verification.attention { color: #875e1f; border-color: #ead8aa; background: #fff9e9; }
.registry-verification > div:first-child strong, .registry-verification > div:first-child span { display: block; }
.registry-verification > div:first-child strong { font-size: 11px; }
.registry-verification > div:first-child span { margin-top: 3px; font-size: 9px; }
.registry-verification ul { margin: 11px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; list-style: none; }
.registry-verification li { display: flex; align-items: center; gap: 7px; font-size: 9px; }
.registry-verification li span { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border-radius: 50%; color: #2f6845; background: #dceee1; font-size: 8px; font-weight: 900; }
.registry-verification li.failed span { color: #9b512e; background: #ffe2cf; }
.registry-verification-errors { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(74,93,80,.14); }
.registry-verification-errors p { margin: 3px 0; font-size: 9px; }
.registry-probe-form { margin: 12px 0 10px; display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 9px; }
.registry-probe-form label { font-size: 9px; }
.registry-probe-body { min-height: 88px; }
.registry-count { min-width: 27px; padding: 5px 8px; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: 10px; font-weight: 850; text-align: center; }
.registry-dependency-list { margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; list-style: none; overflow: hidden; }
.registry-dependency-list li { padding: 9px 10px; display: grid; grid-template-columns: 70px minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); }
.registry-dependency-list li:first-child { border-top: 0; }
.registry-dependency-list span, .registry-dependency-list small { color: var(--muted); font-size: 8px; }
.registry-dependency-list strong { font-size: 9px; }
.registry-lifecycle-section { border-color: #e4d7d3; background: #fffcfb; }
.registry-lifecycle-actions { margin-top: 12px; display: flex; align-items: center; gap: 9px; }
.danger-link { min-height: 38px; padding: 8px 12px; border: 1px solid #e4c6c2; border-radius: 8px; color: #973d36; background: #fff7f5; font-size: 10px; font-weight: 800; }
.danger-link:hover { background: #ffefec; }
.danger-link:disabled { cursor: not-allowed; opacity: .45; }
.registry-blocked-copy { margin: 9px 0 0; color: #82645f; font-size: 9px; }
.registry-archive-confirm { margin-top: 12px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #e7c6c2; border-radius: 9px; background: #fff1ef; }
.registry-archive-confirm strong { font-size: 11px; }
.registry-archive-confirm p { margin: 4px 0 0; color: #7e4c47; font-size: 9px; }
.registry-archive-confirm > div:last-child { flex: 0 0 auto; display: flex; gap: 7px; }
button.danger-action { min-height: 38px; padding: 9px 13px; border-radius: 8px; color: white; background: #9f4039; font-size: 10px; font-weight: 800; }
button.danger-action:hover { background: #84332e; }

.registry-wizard { width: min(900px, calc(100% - 28px)); overflow: hidden; }
.registry-wizard .detail-head { position: static; }
.registry-wizard .detail-head h2 { font-family: var(--sans); font-size: 21px; }
.registry-wizard .detail-head p:last-child { font-size: 11px; text-transform: none; }
.registry-wizard-steps { margin: 0; padding: 0 22px; display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); background: #fafbf9; list-style: none; }
.registry-wizard-steps li { position: relative; padding: 13px 8px; display: flex; align-items: center; gap: 7px; color: #7d8981; border-bottom: 2px solid transparent; font-size: 10px; font-weight: 750; }
.registry-wizard-steps li.current { color: var(--forest-dark); border-bottom-color: var(--forest); }
.registry-wizard-steps li.complete { color: #47715a; }
.registry-wizard-steps li span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: inherit; background: #edf1ed; font-size: 9px; }
.registry-wizard-steps li.current span { color: white; background: var(--forest); }
.registry-wizard .editor-form { padding: 0; gap: 0; }
.registry-wizard-content { min-height: 470px; max-height: calc(100vh - 255px); padding: 22px; overflow-y: auto; }
.registry-step-heading { margin-bottom: 16px; }
.registry-step-heading h3 { margin: 0; font-size: 17px; }
.registry-step-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.registry-purpose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.registry-purpose-grid > button { padding: 14px; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; text-align: left; }
.registry-purpose-grid > button:hover { border-color: #9db4a5; background: #fbfdfb; }
.registry-purpose-grid > button.selected { border-color: #6e9f80; background: #f0f7f2; box-shadow: 0 0 0 2px rgba(63,127,87,.1); }
.registry-purpose-grid i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--forest); background: var(--mint); font-style: normal; font-size: 16px; }
.registry-purpose-grid strong, .registry-purpose-grid small, .registry-purpose-grid em { display: block; }
.registry-purpose-grid strong { font-size: 12px; }
.registry-purpose-grid small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.registry-purpose-grid em { width: fit-content; margin-top: 8px; padding: 3px 6px; border-radius: 5px; color: #4f6256; background: #eef2ee; font-size: 8px; font-style: normal; font-weight: 750; }
.registry-identity-fields { margin-top: 16px; }
.registry-form label { font-size: 10px; }
.registry-form label > small { margin-top: 5px; display: block; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.4; }
.registry-form input, .registry-form select, .registry-form textarea:not(.code-input) { margin-top: 5px; font-size: 11px; }
.registry-action-boundary { color: #7e4740; border-color: #e6cbc7; background: #fff3f1; }
.registry-action-boundary strong { color: #8b3731; }
.registry-advanced { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.registry-advanced summary { color: #41544a; cursor: pointer; font-size: 10px; font-weight: 800; }
.registry-advanced > p { margin: 8px 0 12px; color: var(--muted); font-size: 9px; }
.registry-review { display: grid; gap: 14px; }
.registry-review dl { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.registry-review dl > div { padding: 12px 14px; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; border-top: 1px solid var(--line); }
.registry-review dl > div:first-child { border-top: 0; }
.registry-review dt { color: var(--muted); font-size: 9px; }
.registry-review dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 750; text-transform: capitalize; }
.registry-review-note { padding: 14px; border-radius: 10px; color: #315640; background: #eff7f1; }
.registry-review-note strong { font-size: 11px; }
.registry-review-note p { margin: 5px 0 0; font-size: 10px; line-height: 1.55; }
.registry-secret-next { padding: 14px; border: 1px solid #d9d4e8; border-radius: 10px; color: #4f4969; background: #f7f5fc; }
.registry-secret-next strong { font-size: 11px; }
.registry-secret-next p { margin: 5px 0 9px; font-size: 10px; line-height: 1.5; }
.registry-secret-next code { padding: 8px 10px; display: block; overflow-x: auto; border-radius: 7px; color: #35304c; background: white; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.registry-wizard-footer { min-height: 70px; padding: 13px 22px; }
.registry-wizard-footer .error { max-width: 500px; }

@media (max-width: 980px) {
  .registry-model { grid-template-columns: 1fr 1fr; }
  .registry-model > b { display: none; }
  .registry-toolbar { align-items: stretch; flex-wrap: wrap; }
  .registry-toolbar .search-field { flex-basis: 100%; }
  .registry-resource-row { grid-template-columns: 42px minmax(0,1fr) 90px auto; }
  .registry-resource-relationship { display: none; }
}

@media (max-width: 700px) {
  .registry-model { grid-template-columns: 1fr; }
  .registry-tabs-row { align-items: flex-start; flex-direction: column; }
  .registry-filter-chips { width: 100%; overflow-x: auto; }
  .registry-archived-toggle { margin-left: 0; }
  .registry-resource-row { grid-template-columns: 38px minmax(0,1fr); align-items: start; }
  .registry-resource-state { grid-column: 2; }
  .registry-resource-row > button { width: 100%; grid-column: 2; justify-self: stretch; }
  .registry-detail-summary { grid-template-columns: 1fr 1fr; }
  .registry-section-heading { flex-direction: column; }
  .registry-section-heading button { width: 100%; }
  .registry-verification ul { grid-template-columns: 1fr; }
  .registry-archive-confirm { align-items: stretch; flex-direction: column; }
  .registry-purpose-grid { grid-template-columns: 1fr; }
  .registry-wizard-content { min-height: 0; }
}

@media (max-width: 460px) {
  .registry-detail-dialog, .registry-wizard { width: 100%; max-height: 100vh; margin: 0; border: 0; border-radius: 0; }
  .registry-wizard-steps { padding-inline: 10px; }
  .registry-wizard-steps li { padding-inline: 4px; font-size: 9px; }
  .registry-wizard-content, .registry-detail-body { padding: 14px; }
  .registry-detail-summary { grid-template-columns: 1fr; }
  .registry-probe-form, .registry-review dl > div { grid-template-columns: 1fr; }
  .registry-lifecycle-actions, .registry-archive-confirm > div:last-child { align-items: stretch; flex-direction: column; }
  .registry-lifecycle-actions button, .registry-archive-confirm button { width: 100%; }
  .registry-form .form-grid { grid-template-columns: 1fr; }
  .registry-form .wide-field { grid-column: 1; }
  .registry-wizard-footer { align-items: stretch; flex-direction: column; }
  .registry-wizard-footer > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .registry-wizard-footer button { width: 100%; }
}

/* Case review belongs to the pinned playbook. */
.case-next-step { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin-bottom: 24px; }
.case-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.case-review-heading h3, .case-review-heading h4 { margin: 0 0 8px; }
.case-review-heading p, .case-review-instructions { color: var(--muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.case-review-heading > button { flex: 0 0 auto; }
.case-review-task { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.case-review-task fieldset { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; display: grid; gap: 18px; }
.case-review-task legend { font-weight: 650; padding-bottom: 16px; }
.case-review-task label:not(.checkbox) { display: grid; gap: 8px; font-size: 13px; font-weight: 650; }
.case-review-task select, .case-review-task textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); }
.case-review-task textarea { min-height: 130px; resize: vertical; }
.case-review-sources { display: grid; gap: 12px; font-size: 13px; }
.case-review-sources .checkbox { align-items: flex-start; }
.case-review-sources p { margin: 0; }
.case-action-preview pre { overflow: auto; max-height: 220px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.case-action-preview dd { min-width: 0; margin: 0; }
@media (max-width: 760px) { .case-next-step { padding: 18px; } .case-review-heading { flex-wrap: wrap; } }

.case-review-field { display: grid; gap: 8px; }

/* Five product areas; specialist tools stay within their owning area. */
.sidebar .navigation-area { min-width: 0; margin-bottom: 6px; }
.sidebar .navigation-primary { display: flex; gap: 3px; align-items: center; }
.sidebar .navigation-primary > a { flex: 1; min-width: 0; }
.sidebar .navigation-expand { display: grid; place-items: center; flex: 0 0 28px; height: 36px; padding: 0; color: #c5d7cf; background: transparent; border: 0; border-radius: 6px; font-size: 18px; }
.sidebar .navigation-expand:hover, .sidebar .navigation-admin-toggle:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar .navigation-secondary { margin: 4px 0 6px 18px; padding-left: 8px; border-left: 1px solid #507367; }
.sidebar .navigation-secondary[hidden] { display: none; }
.sidebar .navigation-secondary a { min-height: 36px; padding-inline: 7px; font-size: 12px; }
.sidebar .navigation-secondary a svg { width: 15px; height: 15px; }
.sidebar .navigation-admin { margin-top: 28px; padding-top: 14px; border-top: 1px solid #507367; }
.sidebar .navigation-admin-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; text-align: left; background: none; border: 0; color: #c5d7cf; font-size: 12px; }
.sidebar .navigation-admin-toggle > span:first-of-type { flex: 1; }
.navigation-mobile-head { display: none; }
@media (min-width: 761px) and (max-width: 1020px) {
  :root { --product-sidebar: 218px; }
  .sidebar nav a { grid-template-columns: 18px minmax(0,1fr) auto; justify-items: stretch; padding-inline: 8px; }
  .sidebar nav a span { display: block; }
  .sidebar nav a b { display: inline-block; }
}
@media (max-width: 760px) {
  .navigation-mobile-head { display: flex; align-items: center; justify-content: space-between; color: white; padding: 0 4px 12px; }
  .navigation-mobile-head button { color: white; background: transparent; border-color: #507367; }
  .sidebar .navigation-secondary { margin-left: 16px; }
  .sidebar .navigation-expand { flex-basis: 34px; height: 40px; }
}

.insights-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.insights-panel { min-width: 0; padding: 22px; }
.insights-panel h2 { margin: 0 0 8px; font-size: 18px; }
.insights-panel > p { color: var(--muted); line-height: 1.5; }
.insights-panel > small { display: block; margin-top: 14px; line-height: 1.5; color: var(--muted); }
.insights-panel > .text-button { margin-top: 16px; }
.insights-panel .analytics-list { margin-top: 16px; }
.insights-panel li { margin-block: 8px; line-height: 1.5; }
.insights-backlog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.insights-backlog button { display: flex; gap: 12px; justify-content: space-between; text-align: left; white-space: normal; }
.insights-backlog small { display: block; margin-top: 6px; font-weight: 400; }
@media (max-width: 760px) { .insights-grid, .insights-backlog { grid-template-columns: 1fr; } .insights-panel { padding: 18px; } }
.insights-workspace { display: grid; gap: 20px; }
.insights-workspace > *, .insights-grid > .insights-panel { margin: 0; width: 100%; }
.insights-panel h2 { font-family: var(--sans); }
.insights-panel p { font-size: 13px; }
.insights-panel .analytics-list > div, .insights-panel .analytics-list > p { font-size: 12px; line-height: 1.5; }
.insights-panel .analytics-list > div { gap: 18px; }

/* A case is a navigable record with one current review and a visible outcome. */
.report-drawer[open] { display: flex; flex-direction: column; overflow: hidden; }
.report-drawer .detail-head { position: static; flex: 0 0 auto; min-width: 0; }
.report-drawer .detail-head > div:first-child { min-width: 0; flex: 1; }
.report-drawer .detail-head h2 { overflow-wrap: anywhere; }
.report-drawer .report-detail-content { width: 100%; max-width: none; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.case-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.report-drawer .case-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 0; padding: 20px; background: #f4f8f4; border: 1px solid #dce5de; }
.case-summary > div:first-child { min-width: 0; flex: 1; }
.case-summary h3 { font-size: 20px; margin: 5px 0 6px; }
.case-summary p { margin: 0; overflow-wrap: anywhere; }
.case-summary-facts { display: grid; gap: 7px; max-width: 360px; font-size: 12px; color: var(--muted); }
.case-section-tabs { position: sticky; top: -1px; z-index: 2; display: flex; flex-wrap: wrap; gap: 3px; padding: 10px 0; background: white; border-bottom: 1px solid var(--line); margin: 10px 0 18px; }
.case-section-tabs button { flex: 1; padding: 11px 13px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.case-section-tabs button[aria-selected="true"] { background: #e8f1e8; color: #174c3c; font-weight: 750; }
.case-section-panel { min-width: 0; }
.case-section-panel[hidden] { display: none; }
.case-section-panel > section, .case-context-grid > section, .case-guidance { margin-bottom: 18px; padding: 20px; border: 1px solid #dce5de; border-radius: 12px; background: white; }
.case-section-panel h3 { font-size: 18px; margin: 0 0 14px; }
.case-section-panel p { line-height: 1.6; }
.case-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.case-context-grid dl { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 12px; font-size: 13px; }
.case-context-grid dd { min-width: 0; overflow-wrap: anywhere; }
.case-section-panel .claim-bar { position: static; box-shadow: none; }
.report-drawer .case-review-form, .report-drawer .case-message-form, .case-section-panel > .detail-grid { grid-template-columns: minmax(0,1fr); }
.case-continue { margin-block: 8px 20px; }
.message-audience { display: block; margin-bottom: 8px; font-size: 11px; color: #355449; }
.case-load-warning { padding: 14px; border: 1px solid currentColor; border-radius: 9px; }
@media (max-width: 760px) {
  .case-context-grid { grid-template-columns: 1fr; gap: 0; }
  .case-context-grid dl { grid-template-columns: 108px minmax(0,1fr); }
  .case-header-actions { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
  .case-header-actions .secondary { padding: 7px; font-size: 11px; }
  .case-section-tabs button { flex-basis: 30%; padding: 10px 8px; }
  .report-drawer .case-summary { padding: 16px; gap: 13px; }
  .case-summary-facts { width: 100%; max-width: none; }
  .case-section-panel > section, .case-context-grid > section { padding: 16px; }
}
.case-audience-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.case-audience-picker [aria-pressed="true"] { background: #e8f1e8; color: #174c3c; border-color: #174c3c; }
.case-customer-facts { display: grid; gap: 10px; }
.case-customer-facts > div { display: grid; grid-template-columns: minmax(110px,.6fr) 1fr; gap: 12px; }
.case-customer-facts dd { overflow-wrap: anywhere; }

.workspace-mode .case-message > small { color: #4e5c53; }

.workspace-mode .timeline-event small { color: #56675d; }

.case-refresh { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .report-drawer .detail-head { padding: 12px 14px; align-items: center; }
  .report-drawer .detail-head h2 { font-size: 15px; }
  .case-header-actions { flex-direction: row; }
  .case-refresh-label { display: none; }
  .case-header-actions .case-refresh { width: 36px; min-height: 36px; justify-content: center; font-size: 18px; }
  .report-drawer .case-summary { padding: 13px; gap: 10px; }
  .report-drawer .case-summary h3 { font-size: 17px; margin: 3px 0; }
  .case-summary-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; }
  .case-summary.compact .context-label, .case-summary.compact .case-summary-facts, .case-summary.compact > button { display: none; }
  .report-drawer .case-summary.compact { padding: 10px 13px; }
}

.investigation-brief-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.investigation-brief h4 { margin: 18px 0 6px; font-size: 13px; }
.investigation-brief ul, .investigation-brief ol { padding-left: 20px; font-size: 13px; line-height: 1.65; }
.investigation-brief li small { display: block; color: #56675d; overflow-wrap: anywhere; }
.investigation-brief details { margin-top: 18px; }
.investigation-fixture { padding: 10px; background: #fff3d5; color: #64460e; border-radius: 6px; }

.case-customer-action { margin-block: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.case-customer-action h4 { margin: 0; font-size: 16px; }
.case-customer-action summary { cursor: pointer; padding-block: 10px; font-weight: 600; }
.case-customer-action pre { max-width: 100%; overflow: auto; padding: 12px; background: var(--surface-alt, #f4f7f4); border-radius: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.case-action-details { margin-block: 12px; }
.case-action-details dt { font-weight: 600; }
.case-action-details dd { margin-inline-start: 0; }
.case-customer-action li { margin-block: 8px; overflow-wrap: anywhere; }
.case-customer-action .badge { max-width: 100%; white-space: normal; }
@media (max-width: 760px) { .case-customer-action { padding: 16px; } .case-customer-action .case-review-heading { align-items: flex-start; flex-direction: column; } }
.playbook-choice-list { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.playbook-choice-list legend { padding: 0 5px; font-weight: 650; }
.playbook-choice-list .playbook-check { margin-block: 8px; }
.playbook-input-field { display: grid; gap: 8px; min-width: 0; }
.playbook-input-field pre { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.playbook-section-nav button[aria-current="step"] span { color: #245846; }
.case-notice { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-block: 12px; }
.case-notice-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.case-notice-heading h4 { margin: 0; }
.case-notice > p { font-size: 13px; }
.case-notice details > button { margin-top: 12px; }
.case-related-list { list-style:none; padding:0; margin:16px 0; display:grid; gap:12px; }
.case-related-list li { display:flex; gap:16px; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:12px; padding:16px; }
.case-related-list p { margin:6px 0; }
.appeal-followup { margin-block:20px; }
.appeal-followup dl { display:grid; grid-template-columns:max-content 1fr; gap:8px 16px; }
.appeal-followup dd { margin:0; }
@media(max-width:700px) { .case-related-list li { align-items:flex-start; flex-direction:column; } .appeal-followup dl { grid-template-columns:1fr; gap:4px; } }
.appeal-dialog > .surface, .appeal-dialog > .case-guidance { margin:20px 22px; padding:20px; }
.appeal-dialog .appeal-followup form { display:grid; gap:12px; }
.appeal-dialog .appeal-followup label { display:grid; gap:6px; }
.appeal-dialog .appeal-followup input { min-width:0; padding:9px; border:1px solid #cfd7d1; border-radius:8px; font:inherit; }
@media(max-width:700px) { .appeal-dialog > .surface, .appeal-dialog > .case-guidance { margin:16px; padding:16px; } }
.integration-setup, .registry-tabs-row { scroll-margin-top:calc(var(--product-topbar) + 16px); }
.integration-setup { padding:24px; }
.integration-setup .surface-head { padding:0 0 20px; gap:20px; align-items:flex-start; }
.integration-setup .surface-head h2 { margin:0 0 8px; }
.integration-setup .surface-head p { max-width:70ch; }
.integration-stages { list-style:none; padding:0; margin:20px 0; display:grid; gap:10px; }
.integration-stages li { border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.integration-stages h3 { margin:0; }
.integration-stage-toggle { display:grid; grid-template-columns:30px 1fr auto; gap:14px; align-items:center; width:100%; padding:16px; border:0; background:#f7f9f5; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.integration-stage-toggle small { display:block; margin-top:5px; font-size:12px; font-weight:400; color:#526258; }
.integration-stage-number { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#e2eddf; color:#194b37; font-size:13px; }
.integration-stage-detail { padding:0 20px 20px 60px; }
.integration-stage-detail > p { max-width:80ch; }
.integration-stage-evidence { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px 0; font-size:13px; color:#526258; }
.integration-stage-evidence strong { font-size:12px; color:#254e3b; }
@media(max-width:700px) { .integration-setup { padding:16px; } .integration-setup .surface-head { flex-direction:column; align-items:flex-start; } .integration-stage-toggle { padding:12px; gap:10px; } .integration-stage-detail { padding:0 14px 16px; } }
