:root {
  color-scheme: dark;
  --bg: #05070b;
  --surface-1: #0a0f15;
  --surface-2: #101720;
  --surface-3: #151d27;
  --surface-4: #1b2631;
  --surface-inset: #070b10;
  --surface-hover: #18222c;
  --text: #f2f6f7;
  --text-2: #9aa8b2;
  --text-3: #687681;
  --cyan: #00d9ff;
  --mint: #4dffb5;
  --success: #3dff88;
  --warning: #ffb547;
  --danger: #ff6872;
  --info: #65afff;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --border: rgba(177, 199, 212, .12);
  --border-strong: rgba(177, 199, 212, .2);
  --border-focus: rgba(0, 217, 255, .48);
  --border-success: rgba(61, 255, 136, .28);
  --border-warning: rgba(255, 181, 71, .32);
  --border-danger: rgba(255, 92, 103, .32);
  --focus: #6ce8ff;
  --radius-control: 7px;
  --radius-card: 12px;
  --radius-panel: 15px;
  --shadow-panel: 0 12px 36px rgba(0, 0, 0, .2);
  --shadow-dialog: 0 24px 80px rgba(0, 0, 0, .48);
  --motion-slow: 240ms;
  --ease-standard: cubic-bezier(.2, .7, .2, 1);
  --control-height-compact: 36px;
  --control-height-touch: 46px;
  --motion-fast: 150ms;
  --motion-ui: 180ms;
  --control-height: 42px;
  --icon-size-sm: 16px;
  --icon-size-md: 20px;
  --z-rail: 4;
  --z-topbar: 3;
  --z-toast: 8;
  --breakpoint-mobile: 700px;
  --breakpoint-tablet: 920px;
  --breakpoint-laptop: 1180px;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: rgba(0, 217, 255, .25); color: var(--text); }

.app-shell { min-height: 100vh; }
.rail { position: fixed; z-index: var(--z-rail); inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: var(--space-6) var(--space-4) var(--space-4); border-right: 1px solid var(--border); background: #080c11; }
.brand { display: flex; align-items: center; gap: 11px; margin: 1px 0 25px 5px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(0, 217, 255, .27); border-radius: 9px; background: linear-gradient(145deg, #101e26, #0b1117); color: #ecfbff; }
.brand-mark svg { width: 27px; height: 27px; }
.brand-word { font-size: 15px; line-height: 1; font-weight: 700; letter-spacing: .16em; }
.brand-subtitle { display: block; margin-top: 6px; color: var(--text-3); font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .105em; }
.workspace-switcher { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-1); }
.workspace-avatar, .identity-avatar { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(0, 217, 255, .28); border-radius: 8px; background: rgba(0, 217, 255, .07); color: #b8f5ff; font-size: 12px; font-weight: 650; }
.workspace-copy { min-width: 0; flex: 1; }
.workspace-copy strong, .workspace-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy strong { font-size: 12px; font-weight: 600; }
.workspace-copy small { margin-top: 3px; color: var(--text-3); font-size: 10px; }
.switch-caret { padding-right: 3px; color: var(--text-3); font-size: 17px; }
.rail-section-label, .eyebrow, .metric-label, .included-label, .command-group-label { color: var(--text-3); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.rail-section-label { margin: 27px 0 9px 10px; }
.primary-nav { display: grid; gap: 3px; }
.nav-item { position: relative; min-height: 41px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; color: var(--text-2); text-decoration: none; font-size: 12px; transition: background var(--motion-ui), color var(--motion-ui), border-color var(--motion-ui); }
.nav-item:hover { border-color: var(--border); background: rgba(255,255,255,.025); color: var(--text); }
.nav-item.active { border-color: rgba(0,217,255,.14); background: linear-gradient(90deg, rgba(0,217,255,.085), rgba(0,217,255,.015)); color: var(--text); font-weight: 600; }
.nav-item.active::before { position: absolute; inset: 8px auto 8px -1px; width: 2px; border-radius: 2px; background: var(--cyan); content: ""; }
.nav-symbol { width: 18px; color: #80909c; font-size: 17px; line-height: 1; text-align: center; }
.nav-item.active .nav-symbol { color: var(--cyan); }
.nav-count { margin-left: auto; color: var(--text-3); font: 10px var(--mono); }
.lifecycle-label { margin-top: 30px; }
.rail-lifecycle { position: relative; display: grid; gap: 2px; margin: 0; padding: 0 0 0 2px; list-style: none; }
.rail-lifecycle::before { position: absolute; top: 15px; bottom: 15px; left: 14px; width: 1px; background: #23303a; content: ""; }
.rail-lifecycle li { position: relative; z-index: 1; min-height: 33px; display: flex; align-items: center; gap: 10px; color: #7c8a94; font-size: 11px; }
.life-node { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #29343d; border-radius: 50%; background: #0a0f15; color: #75828c; font: 9px var(--mono); }
.trust-node { border-color: rgba(0,217,255,.32); color: var(--cyan); }
.outcome-node { border-color: rgba(77,255,181,.25); color: var(--mint); }
.session-card { margin-top: auto; padding: 13px 12px 12px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(150deg, #10171e, #0b1016); }
.session-heading { display: flex; align-items: center; gap: 7px; color: #aebbc4; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.session-state, .system-state-dot, .footer-indicator { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 3px rgba(255,181,71,.09); }
.session-state.connected { background: var(--success); box-shadow: 0 0 0 3px rgba(61,255,136,.09); }
.session-mode { margin-left: auto; color: #71808a; font-size: 9px; }
.session-card p { margin: 10px 0 12px; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.session-card label, .task-form label, .dialog-card label { display: block; margin: 0 0 6px; color: #b8c3ca; font-size: 11px; font-weight: 550; }
.session-card input, .task-form input, .dialog-card input[type="number"], .dialog-card input[type="file"] { width: 100%; min-width: 0; min-height: var(--control-height); padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); outline: none; background: #090e14; color: var(--text); font-size: 12px; transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast); }
.session-card input::placeholder, .task-form input::placeholder, .command-input-wrap input::placeholder { color: #61707b; }
.session-card input:focus, .task-form input:focus, .dialog-card input:focus { border-color: rgba(0,217,255,.62); box-shadow: 0 0 0 3px rgba(0,217,255,.09); }
.button { min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-control); font-size: 12px; font-weight: 600; text-decoration: none; transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast); }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { border-color: rgba(0,217,255,.42); background: #063441; color: #d8faff; }
.button-primary:hover:not(:disabled) { border-color: var(--cyan); background: #08404e; }
.button-secondary { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.button-secondary:hover:not(:disabled) { border-color: rgba(0,217,255,.38); background: var(--surface-3); }
.button-full { width: 100%; margin-top: 10px; }
.text-button { min-height: 40px; padding: 0 2px; border: 0; background: transparent; color: var(--cyan); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.identity-panel { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); }
.identity-avatar { flex-basis: 30px; width: 30px; height: 30px; }
.identity-copy { min-width: 0; flex: 1; }
.identity-name { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.identity-role { margin-top: 3px; overflow: hidden; color: var(--text-3); font: 9px var(--mono); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.privacy-note { margin-top: 10px; color: #64717b; font-size: 10px; line-height: 1.45; }
.rail-footer { display: flex; align-items: center; gap: 7px; margin: 14px 4px 0; color: #83919b; font-family: var(--mono); font-size: 9px; letter-spacing: .07em; }
.footer-indicator { width: 6px; height: 6px; flex-basis: 6px; background: var(--cyan); box-shadow: 0 0 0 3px rgba(0,217,255,.08); }
.rail-footer i, .page-footer i { color: #475660; font-style: normal; }
.version-tag { margin-left: auto; color: #62717c; }

.main-content { min-width: 0; min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; z-index: var(--z-topbar); top: 0; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(22px, 3.4vw, 50px); border-bottom: 1px solid var(--border); background: rgba(5,7,11,.93); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 11px; }
.breadcrumb-slash { color: #43505a; }
.breadcrumb strong { color: #c5d0d6; font-weight: 550; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.command-trigger { width: min(310px, 28vw); min-height: 35px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 7px; background: #0b1016; color: var(--text-3); text-align: left; }
.command-trigger:hover { border-color: var(--border-strong); background: var(--surface-1); }
.search-glyph { color: #7b8b96; font-size: 17px; line-height: 1; }
.command-placeholder { min-width: 0; flex: 1; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
kbd { min-height: 20px; display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; background: #111820; color: #9baab4; font: 9px var(--mono); white-space: nowrap; }
.system-state { display: flex; align-items: center; gap: 9px; }
.system-state-dot { background: var(--cyan); box-shadow: 0 0 0 3px rgba(0,217,255,.09); }
.system-state strong, .system-state small { display: block; white-space: nowrap; }
.system-state strong { color: #bac6cd; font: 9px var(--mono); letter-spacing: .08em; }
.system-state small { margin-top: 3px; color: var(--text-3); font: 9px var(--mono); letter-spacing: .08em; }
.icon-button { width: var(--control-height); height: var(--control-height); display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-1); color: #b8c5cc; font-size: 18px; transition: border-color var(--motion-fast), color var(--motion-fast), transform 200ms; }
.icon-button:hover:not(:disabled) { border-color: rgba(0,217,255,.4); color: var(--cyan); }
.sign-out-button { min-height: 35px; flex: none; }
.refresh-icon:active { transform: rotate(90deg); }
.content-wrap { width: min(1460px, 100%); margin: 0 auto; padding: var(--space-7) clamp(22px, 3.4vw, 50px) var(--space-5); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #81909a; }
.eyebrow-mark { width: 6px; height: 6px; border: 1px solid var(--cyan); transform: rotate(45deg); }
.eyebrow-separator { color: #465660; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 11px 0 7px; font-size: clamp(30px, 3vw, 41px); line-height: 1.08; font-weight: 600; letter-spacing: -.045em; }
.title-period { color: var(--cyan); }
.subheading { margin: 0; color: var(--text-2); font-size: 14px; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.sync-label { display: flex; align-items: center; gap: 6px; color: var(--text-3); font: 10px var(--mono); white-space: nowrap; }
.sync-icon { font-size: 14px; }
.create-shortcut { min-height: 40px; white-space: nowrap; }
.create-shortcut > span { color: var(--cyan); font-size: 17px; }

.lifecycle-panel { margin-bottom: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: radial-gradient(ellipse at 54% 120%, rgba(0,217,255,.04), transparent 50%), var(--surface-1); }
.lifecycle-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.lifecycle-caption .eyebrow { font-size: 9px; }
.model-note { color: var(--text-3); font-size: 10px; }
.lifecycle-flow { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.flow-step { min-width: 82px; display: flex; align-items: center; gap: 7px; color: #b1bdc5; white-space: nowrap; }
.flow-index { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #35414a; border-radius: 50%; background: #111922; color: #8c9aa4; font: 9px var(--mono); }
.flow-name { font-size: 11px; font-weight: 550; }
.trust-step .flow-index { border-color: rgba(0,217,255,.5); background: rgba(0,217,255,.08); color: #83ecff; }
.trust-step .flow-name { color: #d8faff; }
.outcome-step .flow-index { border-color: rgba(77,255,181,.28); color: var(--mint); }
.flow-connector { height: 1px; min-width: 14px; flex: 1; background: linear-gradient(90deg, #34424b, #29363f); }
.flow-connector::after { content: ""; display: block; width: 4px; height: 4px; margin: -2px 0 0 auto; border-top: 1px solid #4c5e68; border-right: 1px solid #4c5e68; transform: rotate(45deg); }

.payment-notice { min-height: 43px; display: flex; align-items: center; gap: 10px; margin-bottom: 13px; padding: 8px 12px; border: 1px solid rgba(255,181,71,.22); border-radius: 8px; background: rgba(255,181,71,.045); color: #c5ad87; font-size: 11px; line-height: 1.5; }
.payment-notice strong { color: #ecd4ab; font-weight: 600; }
.notice-symbol { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border: 1px solid rgba(255,181,71,.4); border-radius: 50%; color: var(--warning); font: 600 11px Georgia, serif; }
.notice-badge { margin-left: auto; padding: 5px 7px; border: 1px solid rgba(255,181,71,.18); border-radius: 4px; color: #d9b77c; font: 9px var(--mono); letter-spacing: .06em; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.metric-card { min-width: 0; min-height: 107px; padding: 13px 15px 12px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(150deg, rgba(18,26,35,.96), rgba(11,16,23,.98)); }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { overflow: hidden; font-size: 9px; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.metric-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; color: #a0afb8; font-size: 14px; line-height: 1; }
.metric-card > strong { display: block; margin-top: 7px; font: 500 25px/1 var(--mono); letter-spacing: -.04em; }
.metric-note { display: block; margin-top: 7px; overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric-attention .metric-icon { border-color: rgba(255,181,71,.2); color: var(--warning); }
.metric-verifying .metric-icon { border-color: rgba(101,175,255,.2); color: var(--info); }
.metric-complete .metric-icon { border-color: rgba(61,255,136,.19); color: var(--success); }
.metric-complete > strong { color: #e2fff0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: var(--space-3); align-items: start; }
.orders-panel, .intake-panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface-1); box-shadow: var(--shadow-panel); }
.orders-panel { padding: var(--space-4); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading .eyebrow { font-size: 9px; }
h2 { margin: 6px 0 0; font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -.025em; }
.panel-subtitle { margin: 6px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.5; }
.count-pill { min-width: 30px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(0,217,255,.17); border-radius: 7px; background: rgba(0,217,255,.055); color: #a7eefa; font: 10px var(--mono); }
.queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 17px 0 12px; }
.search-box { width: min(245px, 44%); min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--border); border-radius: 6px; color: #7e8b95; }
.search-box:focus-within { border-color: rgba(0,217,255,.48); box-shadow: 0 0 0 3px rgba(0,217,255,.06); }
.search-box > span { font-size: 17px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-box input::placeholder { color: #65737d; }
.filter-tabs { min-height: 34px; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: #0b1016; }
.filter-tab { min-height: 40px; padding: 0 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #81909a; font-size: 10px; white-space: nowrap; }
.filter-tab:hover { color: var(--text); }
.filter-tab.selected { border-color: var(--border); background: #1a242e; color: var(--text); font-weight: 550; }
.list-labels { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; color: #64737e; font: 9px var(--mono); letter-spacing: .11em; }
.task-list { display: grid; gap: 8px; }
.task-card { padding: 13px 13px 12px; border: 1px solid var(--border); border-radius: 9px; background: linear-gradient(120deg, rgba(19,27,36,.76), rgba(13,19,26,.76)); transition: border-color .16s, background .16s, transform .16s; }
.task-card:hover { transform: translateY(-1px); border-color: rgba(177,199,212,.25); background: var(--surface-2); }
.task-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-heading { min-width: 0; }
.task-id { color: #7d8d98; font: 10px var(--mono); letter-spacing: .015em; overflow-wrap: anywhere; }
.task-title { margin: 5px 0 4px; color: #e4eaed; font-size: 13px; line-height: 1.45; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.task-site { display: flex; align-items: center; gap: 5px; color: #8896a0; font-size: 11px; overflow-wrap: anywhere; }
.site-symbol { color: var(--cyan); font-size: 12px; }
.state-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; max-width: 150px; min-height: 24px; padding: 4px 8px; border: 1px solid rgba(177,199,212,.14); border-radius: 5px; background: #161f27; color: #b0bdc5; font-size: 9px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; }
.state-pill::before { width: 6px; height: 6px; flex: 0 0 6px; border: 1px solid currentColor; border-radius: 50%; content: ""; }
.state-pill.attention { border-color: rgba(255,181,71,.2); background: rgba(255,181,71,.065); color: #ffc76f; }
.state-pill.done { border-color: rgba(61,255,136,.16); background: rgba(61,255,136,.055); color: #7af6a8; }
.state-pill.verifying { border-color: rgba(101,175,255,.22); background: rgba(101,175,255,.07); color: #8bc2ff; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; margin: 11px 0 0; padding-top: 9px; border-top: 1px solid rgba(177,199,212,.08); color: #80909a; font-size: 10px; }
.task-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.task-meta span > i { color: #566671; font-style: normal; }
.task-meta strong { overflow: hidden; color: #c3cdd2; font-weight: 500; text-overflow: ellipsis; }
.task-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.action-button { min-height: 40px; padding: 0 10px; border: 1px solid rgba(0,217,255,.24); border-radius: 5px; background: rgba(0,217,255,.065); color: #bfeff6; font-size: 10px; font-weight: 550; }
.action-button:hover:not(:disabled) { border-color: rgba(0,217,255,.55); background: rgba(0,217,255,.11); }
.action-button.secondary { border-color: var(--border); background: #10171e; color: #a8b5bd; }
.action-button.secondary:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.action-button.danger { border-color: rgba(255,104,114,.22); background: rgba(255,104,114,.055); color: #ff969d; }
.empty-state { padding: 33px 18px 35px; text-align: center; }
.empty-symbol { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 15px; border: 1px solid rgba(0,217,255,.2); border-radius: 14px; background: rgba(0,217,255,.035); color: #49cde0; }
.empty-symbol svg { width: 26px; height: 26px; }
.empty-state h3 { margin: 0 0 7px; color: #dce5e9; font-size: 14px; font-weight: 550; letter-spacing: -.015em; }
.empty-state p { max-width: 310px; margin: 0 auto; color: #80909a; font-size: 11px; line-height: 1.6; }
.text-link { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; color: #8cecff; font-size: 11px; font-weight: 550; text-decoration: none; }
.text-link:hover { color: white; }

.intake-panel { padding: 17px 17px 14px; background: radial-gradient(ellipse at 100% 0, rgba(0,217,255,.07), transparent 36%), var(--surface-1); }
.intake-header { display: flex; align-items: center; justify-content: space-between; }
.intake-topline { display: flex; align-items: center; gap: 11px; }
.intake-topline .eyebrow { font-size: 9px; }
.intake-number { color: #71808a; font: 9px var(--mono); }
.intake-number i { color: #44515b; font-style: normal; }
.intake-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(0,217,255,.22); border-radius: 7px; background: rgba(0,217,255,.06); color: var(--cyan); font-size: 16px; }
.intake-panel h2 { margin-top: 10px; font-size: 19px; }
.intake-intro { margin: 7px 0 15px; color: var(--text-2); font-size: 11px; line-height: 1.6; }
.task-form { display: grid; gap: 7px; }
.task-form label { margin: 3px 0 -2px; color: #b3c0c7; font-size: 10px; }
.task-form label span { color: #7a8892; font-weight: 400; }
.task-form input { min-height: 38px; padding: 7px 9px; border-color: var(--border); background: #0a0f15; font-size: 11px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.form-row > div { min-width: 0; display: grid; gap: 7px; }
.included-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 1px; }
.included-label { width: 100%; margin-bottom: 1px; font-size: 9px; }
.included-evidence span:not(.included-label) { min-height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid rgba(177,199,212,.1); border-radius: 4px; background: #121a22; color: #9facb5; font-size: 10px; }
.included-evidence i { color: #77ddeb; font-style: normal; }
.form-footnote { margin: 1px 0 0; color: #76848e; font-size: 10px; line-height: 1.55; }
.intake-panel .button-full { min-height: 42px; margin-top: 5px; }
.assurance-strip { min-height: 47px; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(11,16,22,.7); }
.assurance-icon { width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center; color: var(--mint); font-size: 18px; }
.assurance-strip > div { min-width: 0; color: #8c9aa4; font-size: 10px; line-height: 1.5; }
.assurance-strip strong { color: #c3cdd2; font-weight: 550; }
.assurance-code { margin-left: auto; color: #6e7c86; font: 9px var(--mono); white-space: nowrap; }
.optional-evidence-setting { display: flex !important; grid-template-columns: 18px 1fr; align-items: start; gap: 9px !important; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); }
.optional-evidence-setting input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--cyan); }
.optional-evidence-setting strong, .optional-evidence-setting small { display: block; }
.optional-evidence-setting strong { color: var(--text); font-size: 10px; }
.optional-evidence-setting small { margin-top: 3px; color: var(--text-2); font-size: 9px; line-height: 1.5; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--border); color: #697781; font-size: 9px; }
.page-footer > span:first-child { color: #9aa8b2; font-family: var(--mono); letter-spacing: .08em; white-space: nowrap; }
.page-footer a { color: #8ea0ac; text-decoration: none; white-space: nowrap; }
.page-footer a:hover { color: var(--cyan); }
.footer-scope { color: #71808a; font-family: var(--mono); font-size: 8px; letter-spacing: .04em; white-space: nowrap; }

.dialog-card { width: min(520px, calc(100vw - 28px)); max-height: min(92dvh, 760px); padding: 21px; overflow: auto; border: 1px solid var(--border-strong); border-radius: 14px; background: #0d131a; color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,.65); }
.dialog-card::backdrop { background: rgba(1,4,7,.76); backdrop-filter: blur(4px); }
.dialog-card form { display: grid; gap: 9px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.dialog-header h2 { margin-top: 6px; font-size: 21px; }
.dialog-close { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 6px; border: 1px solid var(--border); border-radius: 7px; background: #111a22; color: #aab8c0; font-size: 17px; }
.dialog-close:hover { border-color: var(--border-strong); color: var(--text); }
.dialog-copy { margin: 0 0 4px; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.required-mark { margin-left: 5px; color: var(--warning); font: 9px var(--mono); letter-spacing: .08em; }
.dialog-card input[type="file"] { min-height: 43px; padding: 8px; }
.dialog-card input[type="file"]::file-selector-button { margin-right: 8px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-3); color: #d7e0e5; font-size: 10px; }
.evidence-disclosure { padding: 12px; border: 1px solid var(--border-strong); border-left: 3px solid var(--cyan); border-radius: 7px; color: var(--text-2); font-size: 11px; line-height: 1.6; }
.evidence-consent { display: flex !important; grid-template-columns: 20px 1fr; align-items: start; gap: 9px !important; padding: 9px 2px; color: var(--text); font-size: 11px; line-height: 1.55; }
.evidence-consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--cyan); }
.capture-field { display: grid; gap: 7px; }
.capture-preview { display: block; width: min(100%, 480px); max-height: 260px; border: 1px solid var(--border); border-radius: 7px; object-fit: contain; background: #090d12; }
.gps-evidence { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.gps-evidence h3 { margin: 0; color: var(--text); font-size: 12px; }
.gps-evidence > div:first-child p { margin: 4px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.55; }
.field-label { display: block; margin-bottom: 4px; color: var(--text-2); font-size: 10px; }
.upload-status { min-height: 16px; color: var(--text-2); font-size: 10px; }
.gps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--border); border-radius: 7px; background: #0a1016; }
.gps-row label { margin: 0 0 4px; }
.gps-status { color: #84939d; font-size: 10px; line-height: 1.5; }
.gps-row .button { min-height: 40px; white-space: nowrap; }
.coords-row { margin-top: 1px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.record-dialog { width: min(720px, calc(100vw - 28px)); }
.record-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 15px 0; }
.record-cell { min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 7px; background: #111820; }
.record-cell span { display: block; color: #7d8c96; font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.record-cell strong { display: block; margin-top: 6px; color: #d5dfe4; font-size: 11px; font-weight: 550; overflow-wrap: anywhere; }
.record-cell strong.technical-value { font-family: var(--mono); font-size: 10px; }
.record-section-title { margin: 18px 0 8px; color: #d8e1e5; font-size: 12px; font-weight: 600; }
.record-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.record-inline-state { color: #87959e; font: 9px var(--mono); }
.record-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.record-list li { padding: 10px 11px; border-left: 2px solid #376d7a; background: #111a21; color: #a4b1b9; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.record-list li strong { color: #d4dfe4; font-weight: 550; text-transform: capitalize; }
.evidence-meta { display: block; margin-top: 4px; color: #83919b; font-size: 10px; }
.record-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.record-timeline li { position: relative; min-height: 42px; display: flex; gap: 10px; padding: 1px 0 10px; }
.record-timeline li:not(:last-child)::after { position: absolute; top: 12px; bottom: 0; left: 4px; width: 1px; background: #293640; content: ""; }
.timeline-marker { z-index: 1; width: 9px; height: 9px; flex: 0 0 9px; margin-top: 3px; border: 1px solid #63c8d7; border-radius: 50%; background: #0d151c; }
.record-timeline li > div { min-width: 0; }
.record-timeline strong, .record-timeline small { display: block; }
.record-timeline strong { color: #d0dbe0; font-size: 11px; font-weight: 550; text-transform: capitalize; }
.record-timeline small { margin-top: 4px; color: #84939d; font-size: 10px; }
.record-timeline small i { color: #53616b; font-style: normal; }
.record-timeline .timeline-empty { min-height: auto; padding: 9px 10px; color: #85939d; font-size: 10px; }
.record-verification { display: flex; gap: 11px; margin-top: 18px; padding: 12px; border: 1px solid rgba(101,175,255,.18); border-radius: 8px; background: rgba(101,175,255,.045); }
.verification-glyph { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border: 1px solid rgba(101,175,255,.22); border-radius: 6px; color: var(--info); }
.record-verification > div { min-width: 0; }
.verification-label, .record-verification strong, .record-verification small { display: block; }
.verification-label { color: #85939d; font: 9px var(--mono); letter-spacing: .08em; }
.record-verification strong { margin-top: 5px; color: #dce9f3; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.record-verification small { margin-top: 4px; color: #8ea0ae; font-size: 10px; line-height: 1.5; }
.evidence-preview { display: block; width: min(100%, 480px); max-height: 360px; margin-top: 10px; border: 1px solid var(--border); border-radius: 6px; object-fit: contain; background: #090d12; }
.evidence-report { margin-top: 8px; color: #b1bec6; }
.evidence-report summary { cursor: pointer; font-weight: 550; }
.evidence-report pre { max-height: 240px; overflow: auto; margin: 8px 0 0; padding: 10px; border: 1px solid var(--border); border-radius: 5px; background: #090d12; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.55 var(--mono); }
.record-note { margin: 14px 0 0; color: #82909a; font-size: 10px; line-height: 1.6; }
.command-dialog { width: min(580px, calc(100vw - 26px)); padding: 0; overflow: hidden; }
.command-dialog-head { display: flex; align-items: center; gap: 11px; padding: 17px 18px 14px; border-bottom: 1px solid var(--border); }
.command-orb { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(0,217,255,.3); border-radius: 9px; background: rgba(0,217,255,.08); color: #b7f5ff; font-size: 13px; font-weight: 650; }
.command-dialog-head > div { min-width: 0; flex: 1; }
.command-dialog-head h2 { margin: 0; font-size: 14px; }
.command-dialog-head p { margin: 4px 0 0; color: #84939d; font-size: 10px; }
.command-dialog-head .dialog-close { min-width: 40px; height: 40px; font: 9px var(--mono); }
.command-input-wrap { min-height: 49px; display: flex; align-items: center; gap: 10px; margin: 12px 13px 15px; padding: 0 12px; border: 1px solid rgba(0,217,255,.24); border-radius: 7px; background: #090e14; color: var(--cyan); }
.command-input-wrap > span { font-size: 18px; }
.command-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.command-input-wrap input:focus { box-shadow: none; }
.command-group-label { margin: 0 18px 7px; font-size: 9px; }
.command-results { padding: 0 8px 9px; }
.command-option { width: 100%; min-height: 53px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.command-option:hover, .command-option:focus-visible { border-color: var(--border); background: #141d26; }
.command-option-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; color: #98a9b3; font-size: 15px; }
.command-option > span:nth-child(2) { min-width: 0; flex: 1; }
.command-option strong, .command-option small { display: block; }
.command-option strong { color: #dce4e8; font-size: 11px; font-weight: 550; }
.command-option small { margin-top: 3px; color: #7d8b95; font-size: 10px; }
.command-option kbd { visibility: hidden; }
.command-option:hover kbd, .command-option:focus-visible kbd { visibility: visible; }
.command-empty { padding: 15px 11px 19px; color: #8c9aa4; font-size: 11px; }
.command-footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 17px; border-top: 1px solid var(--border); color: #71808a; font: 9px var(--mono); letter-spacing: .05em; }
.command-footer i { color: #98a6ae; font-style: normal; }
.toast { position: fixed; z-index: var(--z-toast); right: 20px; bottom: 18px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--border-strong); border-radius: 8px; background: #141d25; color: #eff6f8; font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-panel); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity var(--motion-ui), transform var(--motion-ui); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,104,114,.5); }

@media (max-width: 1180px) {
  .rail { width: 224px; padding-right: 13px; padding-left: 13px; }
  .main-content { margin-left: 224px; }
  .workspace-grid { grid-template-columns: minmax(0,1.35fr) minmax(270px,.85fr); }
  .flow-step { min-width: 67px; gap: 5px; }
  .flow-name { font-size: 10px; }
  .orders-panel { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 920px) {
  .content-wrap { padding-right: 20px; padding-left: 20px; }
  .topbar { padding-right: 20px; padding-left: 20px; }
  .system-state { display: none; }
  .lifecycle-panel { overflow: hidden; }
  .lifecycle-flow { min-width: 620px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .intake-panel { grid-row: 1; }
  .task-form { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 12px; }
  .task-form > label, .task-form > input, .task-form > .included-evidence, .task-form > button, .task-form > .form-footnote { grid-column: 1 / -1; }
  .task-form > .form-row { grid-column: 1 / -1; }
  .intake-intro { max-width: 580px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 124px; }
  .rail { position: sticky; top: 0; width: 100%; height: auto; min-height: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 10px 13px 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { gap: 8px; margin: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand-word { font-size: 13px; }
  .brand-subtitle { margin-top: 5px; font-size: 8px; }
  .workspace-switcher, .rail-section-label, .rail-lifecycle, .rail-footer { display: none; }
  .primary-nav { grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item { min-height: 40px; flex: 0 0 auto; gap: 7px; padding: 0 10px; font-size: 11px; }
  .nav-item.active::before { inset: auto 10px -1px; width: auto; height: 2px; }
  .nav-symbol { width: auto; font-size: 15px; }
  .nav-count { margin-left: 1px; }
  .session-card { grid-row: 2; grid-column: 1 / -1; margin: 0; padding: 8px 9px; }
  .session-heading { font-size: 8px; }
  .session-card p, .session-card form label, .privacy-note { display: none; }
  .session-card form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .session-card input { min-height: 40px; }
  .session-card .button { min-height: 40px; margin: 0; padding: 0 11px; font-size: 10px; white-space: nowrap; }
  .identity-panel { margin-top: 0; padding-top: 0; border: 0; }
  .identity-avatar { display: none; }
  .text-button { min-height: 30px; margin-left: auto; }
  .main-content { min-height: calc(100vh - 112px); margin-left: 0; }
  .topbar { position: relative; height: 48px; gap: 7px; padding: 0 14px; }
  .breadcrumb { font-size: 10px; }
  .topbar-actions { gap: 8px; }
  .command-trigger { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .command-placeholder, .command-trigger kbd { display: none; }
  .search-glyph { font-size: 18px; }
  .icon-button { width: 40px; height: 40px; }
  .sign-out-button { min-width: 40px; min-height: 40px; padding: 0 11px; font-size: 10px; white-space: nowrap; }
  .content-wrap { padding: 23px 14px 18px; }
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 17px; }
  .eyebrow { gap: 6px; font-size: 8px; letter-spacing: .1em; }
  h1 { margin-top: 9px; font-size: clamp(25px, 7vw, 33px); }
  .subheading { font-size: 12px; }
  .heading-actions { align-items: flex-end; flex-direction: column-reverse; gap: 5px; }
  .heading-actions .create-shortcut { min-height: 35px; padding: 0 9px; font-size: 10px; }
  .sync-label { font-size: 9px; }
  .lifecycle-panel { margin-bottom: 11px; padding: 11px 12px; overflow-x: auto; scrollbar-width: thin; }
  .lifecycle-caption { align-items: flex-start; flex-direction: column; gap: 4px; margin-bottom: 11px; }
  .model-note { font-size: 10px; }
  .lifecycle-flow { min-width: 590px; }
  .flow-step { min-width: 66px; }
  .flow-index { width: 21px; height: 21px; font-size: 8px; }
  .flow-name { font-size: 10px; }
  .payment-notice { align-items: flex-start; padding: 9px; font-size: 10px; }
  .notice-badge { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-bottom: 11px; }
  .metric-card { min-height: 94px; padding: 10px 11px; }
  .metric-label { font-size: 8px; letter-spacing: .08em; }
  .metric-icon { width: 22px; height: 22px; }
  .metric-card > strong { font-size: 23px; }
  .metric-note { font-size: 9px; }
  .workspace-grid { gap: 10px; }
  .intake-panel { padding: 15px 13px 13px; }
  .task-form { display: grid; grid-template-columns: 1fr; }
  .task-form > * { grid-column: auto; }
  .task-form > .form-row { grid-column: auto; }
  .orders-panel { padding: 15px 11px 11px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-subtitle { max-width: 250px; font-size: 10px; }
  .queue-toolbar { align-items: stretch; flex-direction: column; margin: 13px 0 11px; }
  .search-box { width: 100%; min-height: 39px; }
  .filter-tabs { align-self: flex-start; max-width: 100%; }
  .filter-tab { min-height: 40px; padding: 0 8px; font-size: 10px; }
  .list-labels { padding-bottom: 7px; }
  .task-card { padding: 11px 10px; }
  .task-card-top { gap: 7px; }
  .task-title { font-size: 12px; }
  .task-site { font-size: 10px; }
  .state-pill { max-width: 118px; padding: 4px 6px; font-size: 8px; white-space: normal; }
  .task-meta { gap: 7px 11px; font-size: 10px; }
  .task-actions { gap: 6px; }
  .action-button { min-height: 40px; padding: 0 9px; font-size: 10px; }
  .empty-state { padding: 28px 11px; }
  .assurance-strip { align-items: flex-start; padding: 9px; }
  .assurance-strip > div { font-size: 10px; }
  .assurance-code { display: none; }
  .page-footer { flex-wrap: wrap; justify-content: flex-start; gap: 7px 14px; font-size: 9px; }
  .page-footer > span:nth-child(2) { order: 3; flex-basis: 100%; line-height: 1.5; }
  .record-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 390px) {
  .content-wrap { padding-right: 11px; padding-left: 11px; }
  .topbar { padding-right: 11px; padding-left: 11px; }
  .page-heading { flex-direction: column; }
  .heading-actions { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  h1 { font-size: 29px; }
  .flow-step { min-width: 62px; }
  .filter-tabs { width: 100%; justify-content: space-between; }
  .filter-tab { flex: 1; padding: 0 4px; font-size: 9px; }
  .form-row { gap: 7px; }
  .record-summary { grid-template-columns: 1fr; }
  .dialog-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.rail { overflow-y: auto; scrollbar-width: thin; }
.primary-nav { flex: 0 0 auto; }
.module-view { padding-top: var(--space-7); }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.module-panel { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface-1); box-shadow: var(--shadow-panel); }
.module-panel h2 { margin-top: 6px; }
.module-panel .panel-heading { align-items: center; }
.network-layout { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); }
.network-graph-panel { grid-row: span 2; }
.network-jobs { grid-column: 2; }
.live-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid rgba(61,255,136,.2); border-radius: 20px; color: var(--success); font: 9px var(--mono); white-space: nowrap; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(61,255,136,.1); }
.network-graph { min-height: 310px; display: grid; place-items: center; margin-top: 14px; overflow: auto; border: 1px solid var(--border); border-radius: 9px; background: radial-gradient(ellipse at 48% 48%, rgba(0,217,255,.055), transparent 58%), var(--surface-2); }
.network-graph svg { width: 100%; min-width: 520px; max-height: 400px; }
.graph-link { stroke: rgba(0,217,255,.42); stroke-width: 1.5; stroke-dasharray: 4 5; }
.graph-node { stroke-width: 2; }
.graph-executor { fill: #0e3b39; stroke: var(--mint); }
.graph-task { fill: #102e39; stroke: var(--cyan); }
.graph-label { fill: var(--text); font: 11px var(--sans); }
.graph-meta { fill: var(--text-3); font: 9px var(--mono); }
.graph-column { fill: var(--text-3); font: 9px var(--mono); letter-spacing: 1px; }
.compact-list { display: grid; gap: 7px; margin-top: 13px; }
.compact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.compact-row > div { min-width: 0; }
.compact-row strong, .compact-row small { display: block; overflow-wrap: anywhere; }
.compact-row strong { font-size: 11px; font-weight: 600; }
.compact-row small { margin-top: 4px; color: var(--text-3); font-size: 10px; line-height: 1.45; }
.status-tag { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); font: 9px var(--mono); text-transform: uppercase; }
.status-tag.online, .status-tag.verified, .status-tag.available, .status-tag.enabled { border-color: rgba(61,255,136,.2); color: var(--success); }
.status-tag.offline, .status-tag.revoked, .status-tag.failed, .status-tag.disabled { border-color: rgba(255,104,114,.25); color: var(--danger); }
.job-health, .trust-profile, .trust-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.job-stat, .trust-stat { min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.job-stat span, .trust-stat span { display: block; color: var(--text-3); font: 9px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.job-stat strong, .trust-stat strong { display: block; margin-top: 7px; font: 500 21px var(--mono); }
.executor-create { margin-bottom: 12px; }
.executor-create summary { cursor: pointer; color: var(--cyan); font-size: 12px; font-weight: 600; }
.executor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.executor-card { min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-1); }
.executor-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.executor-card h3 { margin: 5px 0 3px; font-size: 14px; }
.executor-id { color: var(--text-3); font: 9px var(--mono); overflow-wrap: anywhere; }
.capability-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.capability-chip { padding: 4px 7px; border: 1px solid rgba(0,217,255,.16); border-radius: 20px; background: rgba(0,217,255,.04); color: var(--text-2); font-size: 9px; }
.executor-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin: 10px 0; }
.executor-facts span { min-width: 0; color: var(--text-3); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.executor-facts strong { display: block; margin-top: 4px; color: var(--text); font: 10px var(--mono); }
.executor-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.executor-card .button, .executor-card-actions .button { min-height: 38px; font-size: 10px; }
.module-form { display: grid; gap: 10px; margin-top: 14px; }
.module-form > label, .module-form .form-row > label { display: grid; gap: 6px; color: var(--text-2); font-size: 10px; }
.module-form label small { color: var(--text-3); font-size: 9px; }
.module-form input:not([type="checkbox"]), .module-form select, .module-form textarea, .trust-select-row select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; outline: none; background: var(--surface-2); color: var(--text); font-size: 11px; }
.module-form textarea { resize: vertical; font-family: var(--mono); line-height: 1.5; }
.module-form fieldset { display: grid; gap: 6px; margin: 0; padding: 9px; border: 1px solid var(--border); border-radius: 7px; }
.module-form legend { padding: 0 5px; color: var(--text-3); font: 9px var(--mono); text-transform: uppercase; }
.module-form .check-row, .check-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 10px; }
.check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--cyan); }
.module-form .button { justify-self: start; }
.executor-detail { margin-top: 12px; }
.trust-select-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.trust-select-row label { width: min(330px, 50%); display: grid; gap: 6px; color: var(--text-2); font-size: 10px; }
.trust-profile { grid-template-columns: repeat(4,minmax(0,1fr)); }
.trust-columns { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 20px; }
.trust-columns > section { min-width: 0; }
.trust-columns .compact-list { margin-top: 8px; }
.module-note { margin: 14px 0 0; color: var(--text-3); font-size: 10px; line-height: 1.6; }
.evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.evidence-card { min-width: 0; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-1); }
.evidence-kind { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(0,217,255,.2); border-radius: 8px; background: rgba(0,217,255,.05); color: var(--cyan); font: 10px var(--mono); text-transform: uppercase; }
.evidence-card h3 { margin: 1px 0 4px; font-size: 12px; line-height: 1.4; }
.evidence-card p { margin: 0; color: var(--text-3); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.evidence-card .evidence-meta { margin-top: 5px; }
.workflow-list { display: grid; gap: 9px; margin-top: 13px; }
.workflow-inbox { margin-top: 12px; }
.workflow-card { padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-1); }
.workflow-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.workflow-card h3 { margin: 5px 0; font: 12px var(--mono); }
.workflow-card p { margin: 0; color: var(--text-2); font-size: 11px; }
.workflow-run-list { display: grid; gap: 5px; margin-top: 10px; }
.workflow-run { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px solid var(--border); color: var(--text-3); font: 9px var(--mono); }
.developer-grid { grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); }
.api-reference { display: grid; gap: 5px; max-height: 390px; margin-top: 13px; overflow: auto; }
.api-route { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.api-method { color: var(--cyan); font: 9px var(--mono); }
.api-route code { overflow-wrap: anywhere; color: var(--text); font: 10px var(--mono); }
.api-route button { min-height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 9px; }
.secret-once { margin-top: 10px; padding: 10px; border: 1px solid rgba(255,181,71,.3); border-radius: 7px; background: rgba(255,181,71,.06); color: var(--warning); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.secret-once code { display: block; margin: 6px 0; color: var(--text); font: 10px var(--mono); user-select: all; }
.api-result { max-height: 360px; min-height: 130px; margin: 12px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.55 var(--mono); }
.settings-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.field-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.field-kicker { color: var(--mint); font: 9px var(--mono); letter-spacing: .13em; }
.field-kicker span { color: var(--text-3); }
.field-heading h1 { margin-top: 9px; font-size: clamp(34px,4vw,48px); }
.field-heading p { margin: 0; color: var(--text-2); font-size: 12px; }
.field-task-list { display: grid; gap: 12px; }
.field-task { padding: 17px; border: 1px solid var(--border-strong); border-radius: 12px; background: linear-gradient(135deg, var(--surface-1), var(--surface-2)); box-shadow: var(--shadow-panel); }
.field-task-primary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.field-task h2 { margin: 6px 0; font-size: 18px; line-height: 1.35; }
.field-task-site { color: var(--text-2); font-size: 12px; line-height: 1.5; }
.field-next-action { width: 100%; min-height: 54px; margin-top: 14px; border: 1px solid rgba(0,217,255,.42); border-radius: 8px; background: #063441; color: #e4fbff; font-size: 14px; font-weight: 650; }
.field-task-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.field-route { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; }
.field-help { display: grid; gap: 5px; margin-top: 18px; padding: 12px; border-left: 3px solid var(--warning); background: rgba(255,181,71,.06); color: var(--text-2); font-size: 11px; line-height: 1.5; }
.field-help strong { color: var(--text); }
.executor-mode .field-task, .executor-mode .field-next-action, .executor-mode .field-route { min-height: 56px; }


/* --------------------------------------------------------------------------
   NEXUS DESIGN SYSTEM REFINEMENT
   Visual-only layer: preserves application behavior and API contracts.
   -------------------------------------------------------------------------- */
:root {
  --nexus-bg: #05070B;
  --nexus-surface-0: #080C11;
  --nexus-surface-1: #0A0F15;
  --nexus-surface-2: #101720;
  --nexus-surface-3: #151D27;
  --nexus-cyan: #00D9FF;
  --nexus-mint: #4DFFB5;
  --nexus-line: rgba(177,199,212,.13);
  --nexus-line-strong: rgba(177,199,212,.22);
  --nexus-focus: rgba(0,217,255,.16);
  --nexus-panel-radius: 14px;
}

body {
  background:
    radial-gradient(circle at 76% -8%, rgba(0,217,255,.045), transparent 31rem),
    var(--nexus-bg);
}

.rail {
  width: 260px;
  padding: 22px 15px 15px;
  background: linear-gradient(180deg, #080C11 0%, #070A0F 100%);
  border-right-color: var(--nexus-line);
}
.main-content { margin-left: 260px; }

.brand { margin: 0 5px 24px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #0B131A;
  border-color: rgba(0,217,255,.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.brand-word { letter-spacing: .19em; }
.brand-subtitle { letter-spacing: .09em; }

.workspace-switcher {
  min-height: 58px;
  background: rgba(16,23,32,.72);
  border-color: var(--nexus-line);
}

.nav-item {
  min-height: 42px;
  border-radius: 8px;
  font-size: 12px;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0,217,255,.105), rgba(0,217,255,.018));
  border-color: rgba(0,217,255,.17);
}
.nav-item.active::before { background: var(--nexus-cyan); width: 3px; }
.nav-symbol { color: #7F8F9A; }

.lifecycle-label { margin-top: 26px; }
.rail-lifecycle li { min-height: 34px; }
.life-node { width: 26px; height: 26px; }

.topbar {
  height: 66px;
  padding: 0 clamp(22px, 3.4vw, 50px);
  background: rgba(5,7,11,.88);
  border-bottom-color: var(--nexus-line);
  backdrop-filter: blur(18px) saturate(125%);
}
.command-trigger {
  width: min(360px, 32vw);
  min-height: 38px;
  border-radius: 8px;
  background: rgba(10,15,21,.9);
  border-color: var(--nexus-line);
}
.command-trigger:hover { border-color: rgba(0,217,255,.25); }

.content-wrap {
  width: min(1520px, 100%);
  padding-top: 34px;
}
.page-heading { margin-bottom: 25px; }
h1 { font-size: clamp(31px, 3.15vw, 44px); letter-spacing: -.05em; }
h2 { letter-spacing: -.03em; }
.subheading { max-width: 720px; line-height: 1.55; }

.lifecycle-panel {
  padding: 15px 17px;
  border-radius: var(--nexus-panel-radius);
  background:
    linear-gradient(180deg, rgba(16,23,32,.92), rgba(10,15,21,.92)),
    var(--nexus-surface-1);
  border-color: var(--nexus-line);
}
.lifecycle-caption { margin-bottom: 15px; }
.lifecycle-flow { min-height: 40px; }
.flow-step { min-width: 92px; }
.flow-index {
  width: 25px;
  height: 25px;
  background: #0C141B;
}
.flow-connector { background: linear-gradient(90deg, #2A3842, #40525E); }

.metrics { gap: 10px; }
.metric-card {
  min-height: 116px;
  padding: 15px 16px 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(17,25,34,.98), rgba(9,14,20,.98));
}
.metric-card > strong { font-size: 28px; }
.metric-note { font-size: 10px; }

.orders-panel, .intake-panel, .module-panel {
  border-radius: var(--nexus-panel-radius);
  border-color: var(--nexus-line);
  box-shadow: 0 14px 42px rgba(0,0,0,.16);
}
.orders-panel { padding: 17px; }
.queue-toolbar { margin-top: 18px; }
.search-box { min-height: 40px; border-radius: 8px; }
.filter-tabs { border-radius: 8px; }
.filter-tab.selected { background: #17222C; border-color: rgba(177,199,212,.16); }

.task-card {
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(17,25,34,.86), rgba(11,16,22,.86));
}
.task-card:hover {
  border-color: rgba(0,217,255,.22);
  background: linear-gradient(135deg, rgba(18,28,38,.95), rgba(12,18,25,.95));
}
.task-title { font-size: 13px; }
.task-id { letter-spacing: .045em; }
.task-meta { line-height: 1.5; }
.state-pill { min-height: 26px; border-radius: 6px; }

/* Statuses communicate through shape + text + tone, not color alone. */
.state-pill::before { box-shadow: inset 0 0 0 1px currentColor; }
.state-pill.verifying::before { border-radius: 2px; transform: rotate(45deg); }
.state-pill.done::before { border-radius: 2px; }

.assurance-strip {
  border-radius: 12px;
  border-color: rgba(0,217,255,.12);
  background: linear-gradient(90deg, rgba(0,217,255,.035), rgba(16,23,32,.72));
}

/* Trust is represented as explainable dimensions rather than one opaque score. */
.trust-stat, .job-stat {
  min-height: 78px;
  border-radius: 9px;
  background: linear-gradient(145deg, #111A23, #0C131A);
}
.trust-stat strong { font-size: 20px; }
.trust-stat::after {
  display: block;
  height: 3px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--nexus-cyan), var(--nexus-mint));
  opacity: .72;
  content: "";
}

/* Evidence and verification are first-class records. */
.evidence-card, .workflow-card, .executor-card {
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(16,23,32,.94), rgba(10,15,21,.94));
}
.evidence-card { padding: 14px; }
.evidence-kind { border-radius: 9px; }

.record-verification {
  border: 1px solid rgba(101,175,255,.16);
  border-radius: 10px;
  background: rgba(101,175,255,.045);
}
.record-timeline { position: relative; }
.timeline-marker { box-shadow: 0 0 0 4px rgba(0,217,255,.055); }

/* Automation stays powerful but visually subordinate to execution truth. */
.workflow-card { border-color: rgba(77,255,181,.09); }
.live-tag { border-radius: 6px; }

/* Developer surfaces intentionally resemble infrastructure tooling. */
.api-route, .api-result {
  background: #090E14;
  border-color: var(--nexus-line);
}
.api-route code, .api-result, .module-form textarea { letter-spacing: -.01em; }

/* Field mode: large controls, high contrast, low cognitive load. */
.field-task {
  border-radius: 14px;
  background: linear-gradient(145deg, #0E151D, #0A1016);
}
.field-next-action {
  min-height: 58px;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0,217,255,.07);
}

/* Command palette is a control surface, not a chat window. */
.command-dialog { border-radius: 16px; }
.command-input-wrap {
  min-height: 48px;
  border-radius: 9px;
  border-color: rgba(0,217,255,.18);
}
.command-option { min-height: 52px; border-radius: 8px; }
.command-option:hover, .command-option:focus-visible { background: #111B24; }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

@media (max-width: 1180px) {
  .rail { width: 236px; }
  .main-content { margin-left: 236px; }
  .flow-step { min-width: 74px; }
}

@media (max-width: 700px) {
  .rail { width: 100%; padding: 10px 13px 8px; }
  .main-content { margin-left: 0; }
  .topbar { height: 52px; }
  .content-wrap { padding-top: 24px; }
  .page-heading { margin-bottom: 18px; }
  h1 { font-size: clamp(27px, 7.2vw, 34px); }
  .metrics { gap: 8px; }
  .metric-card { min-height: 98px; }
  .orders-panel { padding: 14px 11px 11px; }
  .task-card { padding: 13px 11px; }
  .task-title { font-size: 13px; }
  .state-pill { min-height: 28px; }
  .module-panel { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .task-card:hover, .button:hover:not(:disabled) { transform: none; }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f7; --surface-1: #ffffff; --surface-2: #f7fafb; --surface-3: #edf2f4; --surface-4: #e4ecef;
  --text: #15252d; --text-2: #50636c; --text-3: #71818a; --cyan: #006e82; --mint: #08744c;
  --success: #147342; --warning: #925b00; --danger: #b83240; --info: #256cb1;
  --border: rgba(30,61,74,.14); --border-strong: rgba(30,61,74,.23); --focus: #006e82;
  --shadow-panel: 0 8px 28px rgba(25,53,65,.07);
}
html[data-theme="light"] .rail { background: #fff; }
html[data-theme="light"] .brand-mark { background: linear-gradient(145deg,#f0fbfd,#e9f2f5); color: #16424c; }
html[data-theme="light"] .nav-item:hover { background: rgba(0,110,130,.045); }
html[data-theme="light"] .nav-item.active { background: linear-gradient(90deg,rgba(0,110,130,.10),rgba(0,110,130,.025)); }
html[data-theme="light"] .rail-lifecycle::before { background: #cfdbdf; }
html[data-theme="light"] .rail-lifecycle li { color: #657780; }
html[data-theme="light"] .life-node { border-color: #c9d5d9; background: #f6f9fa; color: #657780; }
html[data-theme="light"] .session-card { background: linear-gradient(150deg,#f7fafb,#fff); }
html[data-theme="light"] .session-heading, html[data-theme="light"] .system-state strong { color: #425861; }
html[data-theme="light"] .session-card label, html[data-theme="light"] .task-form label, html[data-theme="light"] .dialog-card label { color: #435861; }
html[data-theme="light"] .session-card input, html[data-theme="light"] .task-form input, html[data-theme="light"] .dialog-card input[type="number"], html[data-theme="light"] .dialog-card input[type="file"] { background: #fff; color: var(--text); }
html[data-theme="light"] .session-card input::placeholder, html[data-theme="light"] .task-form input::placeholder, html[data-theme="light"] .command-input-wrap input::placeholder { color: #86969d; }
html[data-theme="light"] .button-primary { border-color: #006e82; background: #006e82; color: #fff; }
html[data-theme="light"] .button-primary:hover:not(:disabled) { background: #00596a; }
html[data-theme="light"] .text-button { color: #006e82; }
html[data-theme="light"] .topbar { background: rgba(255,255,255,.93); }
html[data-theme="light"] .breadcrumb strong, html[data-theme="light"] .system-state strong { color: #344c56; }
html[data-theme="light"] .command-trigger, html[data-theme="light"] .filter-tabs { background: #fff; }
html[data-theme="light"] kbd { background: #f2f6f7; color: #596d76; }
html[data-theme="light"] .icon-button { color: #405761; }
html[data-theme="light"] .flow-step { color: #536871; }
html[data-theme="light"] .flow-index { border-color: #c7d4d9; background: #f5f8f9; color: #657780; }
html[data-theme="light"] .trust-step .flow-name { color: #075b6c; }
html[data-theme="light"] .trust-step .flow-index { color: #006e82; }
html[data-theme="light"] .payment-notice { color: #765112; }
html[data-theme="light"] .payment-notice strong { color: #5f3d00; }
html[data-theme="light"] .notice-badge { color: #815a14; }
html[data-theme="light"] .metric-card { background: linear-gradient(150deg,#fff,#f7fafb); }
html[data-theme="light"] .metric-complete > strong { color: #17623c; }
html[data-theme="light"] .count-pill { color: #075b6c; }
html[data-theme="light"] .search-box { color: #596d76; }
html[data-theme="light"] .search-box input::placeholder { color: #86969d; }
html[data-theme="light"] .filter-tab { color: #596d76; }
html[data-theme="light"] .filter-tab.selected { background: #eaf1f3; }
html[data-theme="light"] .list-labels, html[data-theme="light"] .task-id { color: #667983; }
html[data-theme="light"] .task-card { background: linear-gradient(120deg,#fff,#f8fafb); }
html[data-theme="light"] .task-title, html[data-theme="light"] .empty-state h3 { color: #1b3039; }
html[data-theme="light"] .task-site, html[data-theme="light"] .task-meta { color: #596d76; }
html[data-theme="light"] .task-meta strong { color: #304851; }
html[data-theme="light"] .state-pill { background: #f1f5f6; color: #465c65; }
html[data-theme="light"] .state-pill.attention { color: #815400; }
html[data-theme="light"] .state-pill.done { color: #17623c; }
html[data-theme="light"] .state-pill.verifying { color: #245e99; }
html[data-theme="light"] .action-button { color: #075b6c; }
html[data-theme="light"] .action-button.secondary { background: #f1f5f6; color: #465c65; }
html[data-theme="light"] .action-button.danger { color: #9d2734; }
html[data-theme="light"] .empty-state p, html[data-theme="light"] .intake-intro, html[data-theme="light"] .form-footnote { color: #586c75; }
html[data-theme="light"] .text-link { color: #006e82; }
html[data-theme="light"] .text-link:hover { color: #004c5b; }
html[data-theme="light"] .task-form input { background: #fff; }
html[data-theme="light"] .included-evidence span:not(.included-label) { background: #f1f6f7; color: #536871; }
html[data-theme="light"] .assurance-strip { background: #fff; }
html[data-theme="light"] .assurance-strip > div, html[data-theme="light"] .assurance-strip strong { color: #50636c; }
html[data-theme="light"] .page-footer, html[data-theme="light"] .page-footer > span:first-child { color: #687b84; }
html[data-theme="light"] .dialog-card { background: #fff; box-shadow: 0 28px 90px rgba(20,40,48,.22); }
html[data-theme="light"] .dialog-close, html[data-theme="light"] .gps-row, html[data-theme="light"] .record-cell, html[data-theme="light"] .record-list li, html[data-theme="light"] .command-option:hover, html[data-theme="light"] .command-option:focus-visible { background: #f3f7f8; }
html[data-theme="light"] .dialog-card input[type="file"]::file-selector-button { color: #2c444d; }
html[data-theme="light"] .record-cell strong, html[data-theme="light"] .record-section-title, html[data-theme="light"] .record-list li strong, html[data-theme="light"] .record-timeline strong, html[data-theme="light"] .record-verification strong, html[data-theme="light"] .command-option strong { color: #233b45; }
html[data-theme="light"] .record-list li, html[data-theme="light"] .record-note, html[data-theme="light"] .record-timeline small, html[data-theme="light"] .record-inline-state, html[data-theme="light"] .command-option small { color: #5b7079; }
html[data-theme="light"] .timeline-marker { background: #fff; }
html[data-theme="light"] .record-verification { background: rgba(37,108,177,.06); }
html[data-theme="light"] .evidence-preview, html[data-theme="light"] .evidence-report pre { background: #f4f7f8; }
html[data-theme="light"] .command-input-wrap { background: #f8fbfc; }
html[data-theme="light"] .command-option-icon { color: #536871; }
html[data-theme="light"] .toast { background: #18313b; color: #f3fafb; }
html[data-theme="light"] .module-form input:not([type="checkbox"]), html[data-theme="light"] .module-form select, html[data-theme="light"] .module-form textarea, html[data-theme="light"] .trust-select-row select { background: #fff; color: var(--text); }
html[data-theme="light"] .graph-executor { fill: #ddf5e8; }
html[data-theme="light"] .graph-task { fill: #def4f7; }

@media (max-width: 920px) {
  .network-layout, .developer-grid { grid-template-columns: minmax(0,1fr); }
  .network-graph-panel { grid-row: auto; }
  .network-jobs { grid-column: auto; }
}
@media (max-width: 700px) {
  .module-grid, .executor-grid, .evidence-grid { grid-template-columns: minmax(0,1fr); }
  .module-panel { padding: 14px; }
  .module-view { padding-top: 22px; }
  .module-view .page-heading { flex-direction: column; align-items: flex-start; }
  .module-view .page-heading > .button { min-height: 42px; }
  .trust-select-row { align-items: stretch; flex-direction: column; }
  .trust-select-row label { width: 100%; }
  .trust-profile { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trust-columns { grid-template-columns: minmax(0,1fr); }
  .settings-panel { align-items: flex-start; flex-direction: column; }
  .executor-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .field-task { padding: 14px; }
  .field-next-action { min-height: 58px; }
  .api-route { grid-template-columns: 42px minmax(0,1fr); }
  .api-route button { grid-column: 2; justify-self: start; }
  .executor-mode .rail { position: sticky; }
}
@media (max-width: 390px) {
  .job-health { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .executor-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workflow-card-head { align-items: stretch; flex-direction: column; }
}

/* Nexus v1.45 product-surface expansion */
.activity-command-strip{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 20px;margin:0 0 18px;border:1px solid var(--border-strong);border-radius:14px;background:linear-gradient(110deg,rgba(0,217,255,.06),rgba(77,255,181,.025) 52%,transparent);}
.activity-command-strip strong{display:block;margin-top:6px;font-size:14px;letter-spacing:-.01em;}
.activity-ledger{border:1px solid var(--border-strong);border-radius:14px;overflow:hidden;background:var(--surface);}
.activity-event{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:14px;align-items:start;padding:16px 18px;border-bottom:1px solid var(--border);}
.activity-event:last-child{border-bottom:0}.activity-event:hover{background:rgba(0,217,255,.025)}
.activity-marker{width:10px;height:10px;border:2px solid var(--muted);border-radius:50%;margin-top:5px;box-shadow:0 0 0 3px rgba(255,255,255,.02)}
.activity-marker.task{border-color:var(--accent)}.activity-marker.match{border-color:var(--mint)}.activity-marker.evidence{border-color:var(--info)}.activity-marker.verify{border-color:var(--warning)}
.activity-event-head{display:flex;justify-content:space-between;gap:16px}.activity-event-head strong{font-size:13px}.activity-event-head time,.activity-event-main p{color:var(--muted);font-size:12px}.activity-event-main p{margin:5px 0 0}.activity-event .status-tag{margin-top:1px}
.payment-control-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:14px;margin-bottom:14px}.settlement-banner{display:flex;align-items:center;gap:16px}.settlement-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid rgba(255,181,71,.25);border-radius:12px;color:var(--warning);font-family:var(--mono);font-size:20px;background:rgba(255,181,71,.06)}
.settlement-banner h2{margin:4px 0 5px}.settlement-banner p{margin:0;color:var(--muted);font-size:13px}.payment-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}.payment-metrics .metric-card{min-height:120px;padding:13px}.payment-metrics .metric-card strong{font-size:22px}.payment-ledger{border-top:1px solid var(--border)}.payment-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:18px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}.payment-row:last-child{border-bottom:0}.payment-row strong{display:block;font-size:13px}.payment-row small{display:block;color:var(--muted);margin-top:4px}.payment-state{font-family:var(--mono);font-size:10px;letter-spacing:.08em;color:var(--warning);padding:5px 7px;border:1px solid rgba(255,181,71,.22);border-radius:6px;background:rgba(255,181,71,.05)}
@media (max-width:760px){.activity-command-strip,.settlement-banner{align-items:flex-start;flex-direction:column}.activity-event{grid-template-columns:14px minmax(0,1fr)}.activity-event>.status-tag{grid-column:2;justify-self:start}.payment-control-grid{grid-template-columns:1fr}.payment-metrics{grid-template-columns:1fr}.payment-row{grid-template-columns:minmax(0,1fr) auto}.payment-row .payment-state{grid-column:2;grid-row:1}.activity-event-head{flex-direction:column;gap:4px}}

/* Nexus decision layer */
.nexus-insight { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:16px; margin-bottom:13px; padding:15px 16px; border:1px solid rgba(0,217,255,.18); border-radius:12px; background:linear-gradient(110deg,rgba(0,217,255,.045),rgba(77,255,181,.018) 55%,rgba(10,15,21,.98)); overflow:hidden; }
.nexus-insight::after { content:""; position:absolute; inset:auto 0 0; height:1px; background:linear-gradient(90deg,transparent,rgba(0,217,255,.35),transparent); }
.insight-signal { width:36px; height:36px; display:grid; place-items:center; border:1px solid rgba(0,217,255,.3); border-radius:50%; position:relative; }
.insight-signal span { position:absolute; width:5px; height:5px; border-radius:50%; background:var(--cyan); box-shadow:0 0 0 4px rgba(0,217,255,.07); }
.insight-signal span:nth-child(1){transform:translate(-8px,-6px)} .insight-signal span:nth-child(2){transform:translate(7px,7px);background:var(--mint)} .insight-signal span:nth-child(3){transform:translate(9px,-8px);width:3px;height:3px}
.insight-copy{min-width:0}.insight-copy .eyebrow{font-size:9px}.insight-copy h2{margin:5px 0 3px;font-size:15px;letter-spacing:-.02em}.insight-copy p{margin:0;color:var(--text-2);font-size:11px;line-height:1.5}.insight-factors{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.insight-factor{padding:5px 7px;border:1px solid var(--border);border-radius:5px;background:rgba(8,13,18,.65);color:#aab8c0;font:9px var(--mono);white-space:nowrap}.action-preview-dialog{width:min(650px,calc(100vw - 28px))}.action-preview-body{padding:2px 0 4px}.preview-action-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--border);border-radius:10px;overflow:hidden}.preview-action-grid>div{min-width:0;padding:13px;border-bottom:1px solid var(--border);border-right:1px solid var(--border);background:var(--surface-1)}.preview-action-grid>div:nth-child(2n){border-right:0}.preview-action-grid>div:nth-last-child(-n+2){border-bottom:0}.preview-action-grid span{display:block;color:var(--text-3);font:9px var(--mono);text-transform:uppercase;letter-spacing:.06em}.preview-action-grid strong{display:block;margin-top:5px;color:var(--text);font-size:12px;line-height:1.4}.preview-disclaimer{margin:12px 0 0;color:var(--text-2);font-size:11px;line-height:1.6}.sort-control{display:flex;align-items:center;gap:6px;color:var(--text-3);font-size:10px;white-space:nowrap}.sort-control select{height:32px;padding:0 8px;border:1px solid var(--border);border-radius:6px;background:var(--surface-1);color:var(--text);font-size:10px;outline:none}.sort-control select:focus{border-color:rgba(0,217,255,.55);box-shadow:0 0 0 3px rgba(0,217,255,.08)}
@media (max-width:760px){.nexus-insight{grid-template-columns:auto 1fr}.nexus-insight .insight-factors{grid-column:1/-1;justify-content:flex-start}.nexus-insight #insightAction{grid-column:2;justify-self:start}.preview-action-grid{grid-template-columns:1fr}.preview-action-grid>div{border-right:0}.preview-action-grid>div:nth-last-child(-n+2){border-bottom:1px solid var(--border)}.preview-action-grid>div:last-child{border-bottom:0}.sort-control{width:100%;justify-content:space-between}.sort-control select{flex:1}}

/* Nexus depth pass: evidence, verification, automation and developer surfaces */
.module-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:0 0 12px; padding:10px; border:1px solid var(--border); border-radius:10px; background:var(--surface-1); }
.module-toolbar label { display:grid; gap:5px; color:var(--text-3); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.module-toolbar input,.module-toolbar select { min-height:38px; border:1px solid var(--border); border-radius:7px; background:var(--surface-2); color:var(--text); padding:0 10px; font:12px var(--sans); }
.toolbar-search { min-width:260px; flex:1; }
.evidence-summary,.verification-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.evidence-card-top { display:flex; justify-content:flex-end; min-height:20px; }
.evidence-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.evidence-viewer-dialog { width:min(900px,calc(100vw - 28px)); }
.evidence-viewer-body { min-height:360px; }
.evidence-viewer-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(220px,.7fr); gap:14px; }
.evidence-viewer-visual { min-height:360px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:#03060a; }
.evidence-viewer-visual img { width:100%; height:100%; max-height:560px; object-fit:contain; }
.evidence-viewer-visual pre { width:100%; height:100%; max-height:560px; overflow:auto; padding:18px; margin:0; white-space:pre-wrap; color:var(--text-2); font:11px/1.65 var(--mono); }
.viewer-placeholder { padding:30px; text-align:center; color:var(--text-3); font-size:12px; }
.viewer-placeholder.error { color:var(--danger); }
.evidence-provenance { margin:0; border:1px solid var(--border); border-radius:10px; background:var(--surface-1); overflow:hidden; }
.evidence-provenance div { padding:12px; border-bottom:1px solid var(--border); }
.evidence-provenance div:last-child { border-bottom:0; }
.evidence-provenance dt { color:var(--text-3); font-size:9px; text-transform:uppercase; letter-spacing:.1em; }
.evidence-provenance dd { margin:4px 0 0; color:var(--text); font-size:12px; overflow-wrap:anywhere; }
.verification-card { position:relative; }
.verification-check-strip { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.verification-mini { display:inline-flex; align-items:center; gap:5px; padding:5px 7px; border:1px solid var(--border); border-radius:6px; color:var(--text-2); font-size:9px; text-transform:uppercase; letter-spacing:.05em; }
.verification-mini i { font-style:normal; }
.verification-mini.pass i { color:var(--success); }
.verification-mini.pending i { color:var(--warning); }
.verification-review-dialog { width:min(620px,calc(100vw - 28px)); }
.verification-checks { display:grid; gap:7px; margin-bottom:14px; }
.verification-check { display:grid; grid-template-columns:26px minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.verification-check > span { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; border:1px solid var(--border); }
.verification-check.pass > span { color:var(--success); border-color:rgba(61,255,136,.35); }
.verification-check.pending > span { color:var(--warning); border-color:rgba(255,181,71,.35); }
.verification-check strong { display:block; font-size:11px; }
.verification-check small { display:block; margin-top:3px; color:var(--text-3); font-size:10px; line-height:1.4; }
.verification-check em { font:9px var(--mono); color:var(--text-3); font-style:normal; }
.automation-flow { display:flex; align-items:center; gap:8px; margin:12px 0 16px; color:var(--cyan); font:10px var(--mono); letter-spacing:.08em; }
.automation-flow span { padding:7px 9px; border:1px solid rgba(0,217,255,.18); border-radius:6px; background:rgba(0,217,255,.035); }
.automation-flow i { color:var(--text-3); font-style:normal; }
.automation-safety { display:flex; align-items:flex-start; gap:10px; margin-bottom:12px; padding:10px 12px; border:1px solid rgba(61,255,136,.12); border-radius:8px; background:rgba(61,255,136,.025); }
.automation-safety .status-dot { margin-top:4px; }
.automation-safety strong,.automation-safety small { display:block; }
.automation-safety small { margin-top:3px; color:var(--text-3); font-size:10px; line-height:1.5; }
.developer-docs-layout { display:grid; grid-template-columns:150px minmax(0,1fr); gap:12px; }
.developer-sidebar { display:grid; align-content:start; gap:3px; }
.dev-tab { min-height:34px; padding:0 9px; text-align:left; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--text-3); font:10px var(--sans); }
.dev-tab:hover,.dev-tab.active { border-color:var(--border); background:var(--surface-2); color:var(--text); }
@media (max-width:720px) {
  .evidence-summary,.verification-summary { grid-template-columns:1fr; }
  .evidence-viewer-grid { grid-template-columns:1fr; }
  .evidence-viewer-visual { min-height:260px; }
  .developer-docs-layout { grid-template-columns:1fr; }
  .developer-sidebar { display:flex; overflow:auto; }
  .dev-tab { white-space:nowrap; }
}

/* Subscription and usage workspace (v1.80) */
.billing-summary-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.billing-summary-head h2 { margin:8px 0 4px; font-size:24px; }
.billing-safety-note { margin-top:18px; padding:13px 15px; border:1px solid var(--border); border-radius:9px; color:var(--muted); background:var(--surface-2); font-size:13px; line-height:1.6; }
.usage-track { height:5px; margin-top:12px; overflow:hidden; border-radius:999px; background:var(--border); }
.usage-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#00d9ff,#4dffb5); }
.billing-plan-card h2 { margin:8px 0; }
.billing-plan-card ul { margin:12px 0 18px; padding-left:18px; color:var(--muted); font-size:13px; line-height:1.9; text-transform:capitalize; }
@media (max-width:640px) { .billing-summary-head { flex-direction:column; } }

#billingMetrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:12px 0; }
#billingMetrics .metric-card { min-width:0; }
@media (max-width:760px) { #billingMetrics { grid-template-columns:1fr; } }


/* Workflow run inspection console */
.workflow-run-console { margin-top: 1.25rem; }
.workflow-run-operation { align-items: flex-start; gap: 1rem; }
.workflow-run-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.workflow-run-controls .button { min-height: 2.15rem; padding: .4rem .7rem; font-size: .78rem; }
.workflow-run-detail { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line, #2b3c42); border-radius: .8rem; background: var(--surface-raised, rgba(10,25,29,.45)); }
.workflow-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.workflow-detail-grid > div { display: grid; gap: .35rem; min-width: 0; padding: .75rem; border: 1px solid var(--line, #2b3c42); border-radius: .55rem; }
.workflow-run-detail h4 { margin: 1rem 0 .5rem; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.workflow-run-detail pre { max-height: 18rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: .85rem; border-radius: .55rem; background: var(--surface, #081416); color: var(--text, #d7e5e6); font: .78rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
@media (max-width: 700px) { .workflow-run-operation { flex-direction: column; } .workflow-run-controls { justify-content: flex-start; } .workflow-detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }


/* v1.93 product polish: quieter surfaces, clearer hierarchy, and resilient touch layouts. */
:root { --radius-panel: 14px; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus, var(--cyan)); outline-offset: 3px; }
.metric-card, .module-panel, .orders-panel, .nexus-insight, .lifecycle-panel { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.metric-card:hover, .module-panel:hover, .orders-panel:hover { border-color: var(--border-strong); }
.metric-card { border-radius: var(--radius-panel); }
.task-card { transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.task-card:hover { transform: translateY(-1px); }
.button { min-height: 40px; border-radius: 9px; }
input, select, textarea { border-radius: 9px; }
.nav-item { border-radius: 9px; }
.page-heading .subheading { max-width: 64ch; }
.empty-state { text-wrap: pretty; }
@media (max-width: 700px) {
  .topbar { gap: 8px; }
  .breadcrumb { min-width: 0; }
  .topbar-actions { min-width: 0; gap: 6px; }
  .command-trigger { max-width: min(44vw, 210px); }
  .command-placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .system-state { max-width: 118px; }
  .system-state small { line-height: 1.35; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .heading-actions { flex-wrap: wrap; }
  .lifecycle-panel { overflow-x: auto; }
  .lifecycle-flow { min-width: 590px; }
  .queue-toolbar { gap: 9px; }
  .filter-tabs { max-width: 100%; overflow-x: auto; }
  .filter-tab { flex-shrink: 0; }
  .panel-heading { gap: 10px; }
  .metric-card, .module-panel, .orders-panel { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .metric-card, .module-panel, .orders-panel, .nexus-insight, .lifecycle-panel, .task-card { transition: none !important; }
  .task-card:hover { transform: none; }
}

/* Nexus secure email/password sign-in controls */
.auth-form { display: grid; gap: 8px; }
.auth-form input, #tokenConnectForm input { width: 100%; min-width: 0; box-sizing: border-box; }
.auth-form label, #tokenConnectForm label { margin-top: 5px; }
.alternate-auth { margin-top: 12px; border-top: 1px solid var(--line, rgba(150,170,180,.18)); padding-top: 10px; }
.alternate-auth summary { cursor: pointer; font-size: 11px; color: var(--muted, #8c9da7); }
#tokenConnectForm { display: grid; gap: 8px; padding-top: 10px; }


/* Nexus design-system refinement — v1.96.11
   Shared interaction, state, and responsive tokens. Keep semantic meaning visible in text. */
:root {
  --status-neutral: var(--text-2);
  --status-active: var(--cyan);
  --status-success: var(--success);
  --status-warning: var(--warning);
  --status-critical: var(--danger);
}

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 217, 255, .09);
}
:where(button, input, select, textarea) { accent-color: var(--cyan); }
:where(input, select, textarea) { min-height: var(--control-height); }
:where(button, .button, .icon-button, .nav-item) {
  transition-timing-function: var(--ease-standard);
}
:where(button, .button, .icon-button):disabled {
  cursor: not-allowed;
  filter: saturate(.55);
}
:where(.panel, .metric-card, .task-card, .module-card, .lifecycle-panel) {
  overflow-wrap: anywhere;
}
:where(code, pre, .mono, .task-id, .timestamp, .telemetry, .version-tag) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
::placeholder { color: var(--text-3); opacity: 1; }

@media (max-width: 700px) {
  :root { --control-height: var(--control-height-touch); }
  .content-wrap { min-width: 0; }
  .page-heading h1 { text-wrap: balance; }
  .topbar { gap: 10px; }
  .topbar-actions { min-width: 0; }
  .command-trigger { min-height: 44px; }
  .button, button.button, .icon-button { min-height: 42px; }
  .lifecycle-panel { overflow-x: auto; overscroll-behavior-x: contain; }
  .lifecycle-flow { min-width: 540px; }
  :where(table) { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* v1.96.13 layout integrity: prevent long content, media, and dense controls from colliding. */
:where(.app-shell, .main-content, .content-wrap, .workspace-grid, .network-layout, .developer-grid,
       .evidence-viewer-grid, .workflow-detail-grid, .payment-control-grid, .module-grid,
       .executor-grid, .evidence-grid, .trust-profile, .trust-columns, .record-summary,
       .metrics, .panel, .card, .module-card, .metric-card, .task-card, .dialog-card,
       .command-dialog, .evidence-card, .verification-check, .activity-event) { min-width: 0; }
:where(h1,h2,h3,h4,p,li,dd,dt,label,button,a,small,strong,span,code,pre,td,th) {
  overflow-wrap: anywhere;
}
:where(img, picture, video, canvas, svg) { max-width: 100%; }
:where(img, video) { height: auto; }
:where(.evidence-preview, .evidence-viewer-visual img) { object-fit: contain; }
:where(input,select,textarea,button) { max-width: 100%; }
:where(textarea, pre, code, .api-result, .secret-once) { overflow-wrap: anywhere; }
:where(.page-heading, .section-heading, .section-head, .panel-heading, .module-header) { min-width: 0; }
:where(.section-head, .panel-heading, .module-header, .activity-event-head, .settlement-banner) { flex-wrap: wrap; }
:where(.status-tag, .status-badge, .badge, .pill, .timestamp) { max-width: 100%; }
.table-wrap, .tablewrap, .table-scroll, .data-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { max-width: 100%; }
:where(.button, button, input, select, textarea, summary) { touch-action: manipulation; }
@media (max-width: 920px) {
  .workspace-grid, .network-layout, .developer-grid, .evidence-viewer-grid,
  .payment-control-grid, .workflow-detail-grid { grid-template-columns: minmax(0,1fr); }
  .content-wrap, .main-content, .page-content { max-width: 100%; }
  .page-heading h1, .hero h1 { text-wrap: balance; }
}
@media (max-width: 700px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .main-content { margin-left: 0; }
  .content-wrap, .page-content, .main-content-inner { padding-inline: clamp(12px, 3.8vw, 18px); }
  .page-heading, .section-head, .panel-heading { align-items: flex-start; gap: 10px; }
  .page-heading h1, h1 { line-height: 1.12; }
  .task-toolbar, .filter-row, .action-row, .toolbar-actions { flex-wrap: wrap; }
  .task-toolbar > *, .filter-row > *, .toolbar-actions > * { min-width: 0; }
  .module-grid, .executor-grid, .evidence-grid, .metrics, .payment-metrics,
  .evidence-summary, .verification-summary { grid-template-columns: minmax(0,1fr); }
  .form-row, .preview-action-grid, .record-summary { grid-template-columns: minmax(0,1fr); }
  .activity-event { grid-template-columns: 14px minmax(0,1fr); gap: 9px; }
  .activity-event > :last-child { grid-column: 2; justify-self: start; }
  .payment-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .payment-row .payment-state { grid-column: auto; grid-row: auto; justify-self: start; }
  :where(button, .button, input, select, textarea) { min-height: 42px; }
  :where(input,select,textarea) { width: 100%; min-width: 0; }
  .dialog-card { max-height: min(90dvh, 760px); overflow: auto; }
}
@media (max-width: 390px) {
  .page-heading h1, h1 { font-size: clamp(24px, 8vw, 32px); }
  .metric-card, .panel, .module-card { padding: 12px; }
  .api-route { grid-template-columns: minmax(0,1fr); }
}

/* Honest, responsive notice for the no-cost pilot's temporary evidence storage. */
.pilot-notice{border-bottom:1px solid rgba(255,181,71,.25);background:rgba(255,181,71,.055);color:#e7d3ad;font-size:12px;line-height:1.55}
.pilot-notice>.wrap{display:flex;align-items:center;gap:12px;padding-top:9px;padding-bottom:9px;flex-wrap:wrap}
.pilot-notice strong{font:10px var(--mono);letter-spacing:.08em;color:#ffc56e;white-space:nowrap}
.pilot-notice span{flex:1;min-width:220px}
.pilot-notice a{color:#ffd38c;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
@media(max-width:700px){.pilot-notice>.wrap{align-items:flex-start;gap:5px 10px}.pilot-notice span{flex-basis:100%;min-width:0}.pilot-notice strong{white-space:normal}}

/* Business operations signals: compact, accessible, and consistent with the console. */
.business-operations-panel { margin: 0 0 1.25rem; }
.business-operations-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.business-operations-stat { min-width: 0; border: 1px solid var(--line, rgba(148,163,184,.22)); border-radius: 12px; padding: .85rem; background: var(--surface-soft, rgba(148,163,184,.05)); }
.business-operations-stat span { display: block; font: 600 .67rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; color: var(--muted, #82909d); overflow-wrap: anywhere; }
.business-operations-stat strong { display: block; margin-top: .35rem; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.business-operations-stat.critical strong, .business-operations-alert.critical .business-operations-severity { color: var(--danger, #ef6464); }
.business-operations-stat.high strong, .business-operations-alert.high .business-operations-severity { color: var(--warning, #e7a64b); }
.business-operations-stat.complete strong { color: var(--success, #54c99b); }
.business-operations-alerts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.business-operations-alert { min-width: 0; border: 1px solid var(--line, rgba(148,163,184,.22)); border-left: 3px solid var(--muted, #82909d); border-radius: 12px; padding: .95rem; background: var(--surface, rgba(148,163,184,.03)); }
.business-operations-alert.critical { border-left-color: var(--danger, #ef6464); }
.business-operations-alert.high { border-left-color: var(--warning, #e7a64b); }
.business-operations-alert.medium { border-left-color: var(--accent, #54c99b); }
.business-operations-alert-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.business-operations-severity, .business-operations-task-id { font: 600 .68rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.business-operations-task-id { color: var(--muted, #82909d); overflow-wrap: anywhere; }
.business-operations-alert h3 { margin: .55rem 0 .35rem; font-size: 1rem; overflow-wrap: anywhere; }
.business-operations-alert p, .business-operations-next span { color: var(--muted, #82909d); font-size: .86rem; line-height: 1.5; overflow-wrap: anywhere; }
.business-operations-next { display: grid; gap: .2rem; margin: .7rem 0; font-size: .82rem; }
.business-operations-clear { display: grid; gap: .3rem; padding: 1rem; border: 1px solid var(--line, rgba(148,163,184,.22)); border-radius: 12px; }
.business-operations-clear span, .operations-disclaimer { color: var(--muted, #82909d); font-size: .82rem; line-height: 1.5; }
.operations-disclaimer { margin: .85rem 0 0; }
@media (max-width: 760px) { .business-operations-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .business-operations-alerts { grid-template-columns: minmax(0, 1fr); } .business-operations-stat:last-child { grid-column: 1 / -1; } }
.passkey-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);gap:18px 28px;align-items:start}.passkey-intro{min-width:0}.passkey-intro h2{margin:8px 0}.passkey-controls{display:grid;gap:10px;align-content:start}.passkey-controls label{display:grid;gap:7px;color:var(--muted);font-size:12px}.passkey-controls input{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-inset);color:var(--ink);font:inherit}.passkey-controls button{min-height:44px}.passkey-list,.passkey-status{grid-column:1/-1;min-width:0}.passkey-list{display:grid;gap:8px}.passkey-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:var(--surface-1)}.passkey-entry>div{display:grid;gap:4px;min-width:0}.passkey-entry strong,.passkey-entry small{overflow-wrap:anywhere}.passkey-entry small,.passkey-empty{color:var(--muted);font-size:11px;line-height:1.6}.passkey-entry .button{flex:none;min-height:38px}.passkey-status{min-height:1.4em;margin:0;color:var(--muted);font-size:11px;line-height:1.6}.passkey-controls button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:680px){.passkey-panel{grid-template-columns:minmax(0,1fr);gap:14px}.passkey-controls,.passkey-list,.passkey-status{grid-column:1}.passkey-controls button{width:100%;justify-content:center}.passkey-entry{align-items:flex-start}.passkey-entry .button{min-width:78px}}
