/* ECAI Control Plane · self-contained: no third-party UI dependencies. */
:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --paper: #fff;
  --ink: #14223d;
  --muted: #6e7a90;
  --line: #e6ebf2;
  --navy: #111d34;
  --navy-soft: #202f4b;
  --blue: #465dec;
  --blue-strong: #364dd8;
  --sky: #e9edff;
  --mint: #22bd9f;
  --alert: #b63a4b;
  --shadow: 0 9px 28px rgba(14, 30, 70, .035);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #93a6fd; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.console-shell { min-height: 100vh; display: flex; }
.console-sidebar { background: var(--navy); color: #ebf0fc; width: 244px; flex: 0 0 244px; position: sticky; height: 100vh; top: 0; display: flex; flex-direction: column; z-index: 15; overflow-y: auto; }
.brand-block { min-height: 105px; display: flex; align-items: center; gap: 12px; padding: 23px 23px 18px; }
.brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#5a66ee,#7f4fcb); box-shadow: 0 7px 20px #313c9c60; font-size: 28px; font-weight: 720; letter-spacing: -.08em; }
.brand-symbol span { color: #7ce4d3; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .12em; line-height: 1.15; }
.brand-caption { color: #8495bb; font-size: 8px; letter-spacing: .19em; font-weight: 700; margin-top: 5px; white-space: nowrap; }
.sidebar-label { padding: 20px 25px 10px; color: #7587a8; font-size: 10px; letter-spacing: .14em; font-weight: 750; }
.main-nav { display: flex; flex-direction: column; gap: 3px; padding: 0 12px 20px; }
.nav-link { border: 0; display: flex; align-items: center; gap: 13px; background: transparent; color: #aab7d0; padding: 11px 14px; border-radius: 9px; text-align: left; font-weight: 550; font-size: 12.8px; width: 100%; transition: background .15s, color .15s; }
.nav-link:hover { background: #21314e; color: #fff; }
.nav-link.is-active { background: #2c3c68; color: white; font-weight: 680; box-shadow: inset 3px 0 0 #8ea0ff; }
.nav-icon { color: #9eb5ea; font-size: 18px; width: 23px; text-align: center; font-family: ui-monospace,monospace; line-height: 20px; }
.nav-link.is-active .nav-icon { color: #fff; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #2a3852; padding-bottom: 10px; }
.sidebar-bottom .sidebar-label { padding-top: 20px; }
.subtle-link { color: #a9b8d3; font-size: 12px; display: flex; justify-content: space-between; padding: 8px 25px; }
.subtle-link:hover { color: white; }
.node-mark { border-top: 1px solid #26344e; margin: 16px 16px 0; padding: 17px 8px 4px; display: flex; gap: 8px; align-items: center; font-size: 11px; color: #98a9c6; }
.node-dot { width: 7px; height: 7px; flex: 0 0 7px; background: #6e7d95; border-radius: 50%; }
.node-dot.online { background: #28d6ae; box-shadow: 0 0 0 4px #28d6ae18; }
.node-version { margin-left: auto; font-size: 10px; }
.sidebar-close { display: none !important; }
.console-body { min-width: 0; flex: 1; }
.console-topbar { position: sticky; top: 0; z-index: 10; height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 clamp(19px, 3.6vw, 52px); border-bottom: 1px solid var(--line); background: #fffefef2; backdrop-filter: blur(16px); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { padding: 0 13px; color: #bbc3d0; }
.breadcrumb strong { color: var(--ink); font-size: 13px; }
.topbar-actions, .topbar-leading, .inline-actions { display: flex; align-items: center; gap: 10px; }
.topbar-runtime { color: var(--muted); font-size: 11px; white-space: nowrap; }
.topbar-divider { border-left: 1px solid var(--line); height: 25px; margin: 0 8px; }
.signed-in { color: #4d5b74; font-size: 11px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; border-radius: 9px; border: 0; background: transparent; font-size: 21px; color: var(--muted); }
.icon-button:hover { background: #eff2f8; color: var(--ink); }
.mobile-nav-trigger { display: none; }
.console-main { width: 100%; max-width: 1640px; padding: 32px clamp(19px, 3.6vw, 52px) 70px; margin: 0 auto; }
.view { display: none; animation: view-enter .2s ease-out; }
.view.is-visible { display: block; }
@keyframes view-enter { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 2.8vw, 34px); letter-spacing: -.047em; line-height: 1.25; font-weight: 770; margin-bottom: 8px; }
h2 { font-size: 16px; letter-spacing: -.02em; margin: 0; line-height: 1.4; }
h3 { font-size: 13px; margin: 0 0 5px; }
p { color: var(--muted); }
.eyebrow { color: #667ad8; font-size: 10px; letter-spacing: .15em; font-weight: 800; margin-bottom: 10px; }
.eyebrow-light { color: #aabafc; }
.dot-separator { padding: 0 4px; }
.page-intro { margin-bottom: 26px; }
.page-intro p { margin: 0; max-width: 760px; font-size: 13px; }
.page-intro-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.welcome-banner { display: flex; position: relative; isolation: isolate; overflow: hidden; justify-content: space-between; align-items: center; min-height: 225px; margin-bottom: 21px; border-radius: 21px; color: #fff; padding: clamp(25px,3vw,41px) clamp(28px,4vw,50px); background: radial-gradient(ellipse at 82% 12%, #4b569e 0%, transparent 45%), linear-gradient(112deg, #18263f 0%, #233965 68%, #30356a 100%); }
.welcome-banner h1 { color: white; margin-bottom: 10px; font-size: clamp(27px,3.1vw,39px); }
.welcome-banner p { color: #bbc8e2; max-width: 510px; font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; font-size: 12px; min-height: 38px; white-space: nowrap; transition: background .15s,transform .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { background: var(--blue); color: white; border-color: var(--blue); }
.button-primary:hover { background: var(--blue-strong); }
.button-outline { background: white; color: #374760; border-color: #dbe2ee; }
.button-outline:hover { background: #f3f6ff; border-color: #b7c4f2; text-decoration: none; }
.button-light { background: white; color: #263e7b; }
.button-light:hover { background: #eef1ff; text-decoration: none; }
.button-glass { background: #ffffff12; border-color: #ffffff42; color: #fff; }
.button-glass:hover { background: #ffffff20; }
.button-sm { font-size: 11px; min-height: 32px; padding: 6px 11px; }
.danger-outline { border-color: #f3ccd1; color: var(--alert); }
.danger-outline:hover { background: #fff0f3; }
.orbit-art { flex: 0 0 270px; height: 180px; position: relative; margin-right: 10px; }
.orbit { position: absolute; border: 1px solid #8aa2fd55; border-radius: 50%; width: 180px; height: 180px; left: 45px; top: 0; transform: rotate(-24deg); }
.orbit-2 { transform: rotate(62deg) scaleX(.45); border-color: #b6adffb5; }
.orbit-3 { transform: rotate(-60deg) scaleX(.45); border-color: #55d5cc92; }
.orbit-core { position: absolute; left: 124px; top: 79px; width: 20px; height: 20px; background: #b5c2ff; border: 5px solid #8a9cf9; border-radius: 50%; box-shadow: 0 0 42px 18px #6b78e683; }
.orbit-node { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #69f6df; box-shadow: 0 0 20px #58dfce; }
.orbit-node.n1 { left: 48px; top: 71px; }
.orbit-node.n2 { left: 212px; top: 33px; }
.orbit-node.n3 { left: 173px; top: 164px; background: #edc5ff; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card, .surface { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.metric-card { padding: 19px 21px; }
.metric-label { color: #607089; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 560; }
.metric-label span { color: #8c9bbb; font-size: 17px; }
.metric-value { font-size: 31px; font-weight: 750; letter-spacing: -.06em; margin: 9px 0 4px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.metric-word { font-size: 23px; letter-spacing: -.03em; }
.metric-foot { color: #95a0b2; font-size: 10px; }
.two-column { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.panel-pad { padding: 23px; margin-bottom: 20px; }
.two-column > .panel-pad { margin-bottom: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading > div { min-width: 0; }
.text-button { border: 0; padding: 3px; white-space: nowrap; background: transparent; color: var(--blue); font-size: 11px; font-weight: 680; }
.text-button:not(:disabled):hover { text-decoration: underline; }
.context-hint { font-size: 11px; line-height: 1.65; margin: 10px 0 17px; }
.service-list { display: flex; flex-direction: column; }
.service-row, .overview-job { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef0f5; }
.service-row:last-child, .overview-job:last-child { border-bottom: none; }
.service-dot { flex: 0 0 9px; height: 9px; border-radius: 50%; background: #b6c0d1; }
.service-dot.is-good { background: #22bd9f; }
.service-dot.is-bad { background: #e0a153; }
.service-name { flex: 1; font-weight: 650; font-size: 12px; }
.service-state { font-size: 11px; color: var(--muted); }
.overview-job-icon { width: 34px; height: 34px; border-radius: 10px; color: var(--blue); background: #f1f2ff; display: grid; place-items: center; font-size: 17px; }
.overview-job-copy { min-width: 0; flex: 1; }
.overview-job-copy strong { font-size: 12px; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.overview-job-copy small { color: var(--muted); }
.status-tag { border: 1px solid #e0e7fa; background: #f2f5ff; padding: 4px 8px; color: #52639f; border-radius: 7px; font-size: 10px; white-space: nowrap; }
.status-tag.state-running, .status-tag.state-completed, .status-tag.state-minted { border-color: #bdeee0; background: #e8fbf5; color: #13765d; }
.status-tag.state-failed, .status-tag.state-canceled { border-color: #f8d2d9; background: #fff1f2; color: #a33149; }
.status-tag.state-queued, .status-tag.state-paused { border-color: #ebddbc; background: #fff9e8; color: #8d6817; }
.empty-state { color: #8490a3; text-align: center; padding: 27px 16px; font-size: 12px; background: #fafbfe; border: 1px dashed #e6ebf2; border-radius: 10px; }
.empty-cell { text-align: center; color: var(--muted); padding: 20px !important; }
.search-form { display: flex; gap: 9px; align-items: center; position: relative; }
.search-form > input[type="search"] { flex: 1; min-width: 90px; padding-left: 37px; }
.search-leading { position: absolute; left: 12px; font-size: 24px; color: #95a0b5; pointer-events: none; }
label { display: flex; flex-direction: column; gap: 6px; color: #4e5c73; font-size: 11px; font-weight: 650; }
input, select, textarea { background: white; color: var(--ink); padding: 10px 12px; min-width: 0; min-height: 39px; border: 1px solid #dfe5ef; border-radius: 9px; font-size: 12px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: #7086e9; box-shadow: 0 0 0 3px #687cda19; }
textarea { resize: vertical; line-height: 1.6; }
input::placeholder,textarea::placeholder { color: #a7b0c0; }
.compact-field { max-width: 92px; white-space: nowrap; }
.compact-field input { width: 100%; }
.form-meta { display: flex; justify-content: space-between; gap: 15px; padding: 12px 1px 0; font-size: 10px; color: #8590a4; }
.result-stack { padding-top: 19px; display: flex; flex-direction: column; gap: 10px; }
.result-card { border: 1px solid #e4eaf3; padding: 14px 16px; border-radius: 10px; }
.result-card strong { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
.result-card p { margin: 0 0 9px; font-size: 11px; overflow-wrap: anywhere; }
.result-meta { font-size: 10px; color: #71809a; display: flex; gap: 15px; }
.expandable { margin-bottom: 20px; overflow: hidden; }
.expandable summary { padding: 17px 22px; cursor: pointer; font-size: 12px; font-weight: 700; }
.expandable .expand-arrow { margin-left: 12px; color: var(--muted); }
.details-content { padding: 0 22px 22px; }
.details-content form { display: flex; flex-direction: column; gap: 13px; }
.code-display { border-radius: 9px; border: 1px solid #e5ebf5; background: #f8faff; padding: 14px 15px; margin: 12px 0 0; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas,monospace; color: #31415f; overflow: auto; max-height: 410px; min-height: 61px; white-space: pre-wrap; word-break: break-word; tab-size: 2; }
.code-input { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 11px; line-height: 1.6; }
.chat-layout { max-width: 1020px; min-height: 585px; display: flex; flex-direction: column; }
.chat-toolbar { border-bottom: 1px solid var(--line); padding: 17px 21px; display: flex; align-items: center; gap: 18px; }
.chat-toolbar .text-button { margin-left: auto; }
.status-indicator { font-size: 12px; font-weight: 680; display: flex; align-items: center; gap: 8px; }
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.mono { font-family: ui-monospace,Consolas,monospace; }
.small { font-size: 11px; }
.muted { color: var(--muted); }
.chat-messages { flex: 1; min-height: 380px; max-height: 600px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 21px; }
.chat-welcome { margin: auto; text-align: center; max-width: 330px; }
.chat-welcome h2 { font-size: 19px; margin: 9px 0; }
.chat-welcome p { font-size: 12px; }
.welcome-icon { width: 58px; height: 58px; margin: 0 auto; background: linear-gradient(135deg,#566af0,#8a76d9); color: white; border-radius: 18px; display: grid; place-items: center; font-size: 25px; }
.chat-bubble { padding: 12px 15px; max-width: 78%; border-radius: 13px; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble.from-user { background: #edf0ff; color: #24345e; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.from-agent { background: #f5f7fb; margin-right: auto; border-bottom-left-radius: 4px; }
.composer { display: flex; align-items: end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 45px; max-height: 170px; }
.chat-layout > .form-meta { padding: 0 21px 13px; }
/* Conversation history + projects. Durable history is account-scoped server state. */
.chat-workspace { display:grid; grid-template-columns:260px minmax(0,1fr); gap:16px; align-items:stretch; max-width:1320px; }
.chat-workspace .chat-layout { max-width:none; min-width:0; }
.chat-history-panel { min-height:585px; max-height:720px; padding:12px; display:flex; flex-direction:column; overflow:hidden; }
.chat-history-actions { display:grid; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.chat-new-button { width:100%; justify-content:center; }
.chat-search-button { min-height:38px; width:100%; border:1px solid #dfe5ef; border-radius:9px; background:#f8faff; color:#42516d; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; padding:8px 10px; text-align:left; font-size:11px; }
.chat-search-button:hover:not(:disabled) { border-color:#bec9ee; background:#f1f4ff; }
.chat-search-button kbd { border:1px solid #dfe5ef; border-bottom-width:2px; border-radius:5px; background:white; color:#8390a5; font:9px/1.2 ui-monospace,Consolas,monospace; padding:3px 5px; }
.chat-history-auth { margin:11px 0 2px; padding:10px; border:1px solid #e6eaf4; border-radius:9px; background:#fafbfe; color:#6d7a91; font-size:10px; line-height:1.55; }
.chat-history-section { padding-top:13px; }
.chat-history-recent { min-height:0; flex:1; display:flex; flex-direction:column; }
.chat-history-heading { display:flex; align-items:center; justify-content:space-between; min-height:25px; color:#8a95a8; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; padding:0 6px 5px; }
.chat-history-icon-button, .chat-project-edit, .chat-history-toggle, .chat-dialog-close { border:0; background:transparent; color:#70809c; border-radius:7px; display:grid; place-items:center; cursor:pointer; }
.chat-history-icon-button { width:25px; height:25px; font-size:16px; }
.chat-history-icon-button:hover:not(:disabled), .chat-project-edit:hover, .chat-history-toggle:hover, .chat-dialog-close:hover { background:#eef2fb; color:#354b79; }
.chat-project-list, .chat-history-list { display:grid; gap:3px; }
.chat-history-list { overflow-y:auto; min-height:0; padding-right:2px; }
.chat-project-row { display:grid; grid-template-columns:minmax(0,1fr) 24px; gap:2px; align-items:center; }
.chat-history-item { width:100%; border:0; border-radius:8px; background:transparent; color:#43526e; min-width:0; display:flex; align-items:center; gap:8px; padding:8px 9px; text-align:left; }
.chat-history-item:hover { background:#f4f6fb; }
.chat-history-item.is-active { background:#edf1ff; color:#253c78; }
.chat-history-icon { flex:0 0 18px; color:#7e8cac; font-size:13px; text-align:center; }
.chat-history-copy { min-width:0; flex:1; display:grid; gap:2px; }
.chat-history-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:650; }
.chat-history-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#8b96a8; font-size:9px; }
.chat-thread-item { align-items:flex-start; }
.chat-history-pin { color:#7188e8; font-size:7px; padding-top:4px; }
.chat-project-edit { width:24px; height:27px; font-weight:800; }
.chat-history-empty { color:#8a96aa; font-size:10px; line-height:1.55; padding:10px 8px; }
.chat-history-toggle { display:none; width:31px; height:31px; flex:0 0 31px; font-size:16px; }
.chat-thread-heading { min-width:0; flex:1; display:grid; gap:2px; }
.chat-thread-heading strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.chat-thread-actions { display:flex; align-items:center; gap:7px; margin-left:auto; }
.chat-thread-actions .text-button { margin-left:0; }
.chat-delete-button { color:#a94b5c; }
.chat-project-select { width:auto; max-width:175px; min-height:31px; padding:5px 28px 5px 8px; font-size:10px; }
.chat-dialog { width:min(620px,calc(100vw - 28px)); max-width:620px; border:1px solid var(--line); border-radius:16px; background:white; color:var(--ink); padding:0; box-shadow:0 23px 80px #07132c61; }
.chat-dialog::backdrop { background:#0d182f94; backdrop-filter:blur(4px); }
.chat-dialog-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:21px 22px 15px; border-bottom:1px solid var(--line); }
.chat-dialog-header h2 { margin:2px 0 0; font-size:19px; }
.chat-dialog-close { width:31px; height:31px; font-size:21px; }
.chat-dialog-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,190px) auto; gap:9px; align-items:end; padding:17px 20px; }
.chat-dialog-form label { min-width:0; }
.chat-search-results { max-height:min(56vh,520px); overflow:auto; display:grid; gap:7px; padding:0 20px 20px; }
.chat-search-result { width:100%; border:1px solid #e4eaf3; background:white; color:var(--ink); border-radius:10px; padding:12px 13px; text-align:left; }
.chat-search-result:hover { border-color:#bdc9ee; background:#f9faff; }
.chat-search-result strong { display:block; font-size:12px; margin-bottom:5px; }
.chat-search-result p { margin:0 0 7px; color:#5f6f8d; font-size:11px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-search-result small { color:#909bad; font-size:9px; }
.chat-project-dialog .stack-form { padding:19px 21px 21px; }
.chat-project-dialog textarea { min-height:130px; }
@media (max-width:980px) {
  .chat-workspace { grid-template-columns:minmax(0,1fr); }
  .chat-history-panel { position:fixed; z-index:35; top:74px; bottom:18px; left:18px; width:min(310px,calc(100vw - 36px)); max-height:none; min-height:0; transform:translateX(calc(-100% - 30px)); opacity:0; pointer-events:none; transition:transform .18s ease,opacity .18s ease; box-shadow:0 18px 55px #12213c33; }
  .chat-history-panel.is-open { transform:none; opacity:1; pointer-events:auto; }
  .chat-history-toggle { display:grid; }
  .chat-toolbar { gap:10px; }
  .chat-thread-actions { flex-wrap:wrap; justify-content:flex-end; }
}
@media (max-width:700px) {
  .chat-toolbar { align-items:flex-start; flex-wrap:wrap; }
  .chat-thread-heading { flex-basis:calc(100% - 110px); }
  #chatSessionLabel { display:none; }
  .chat-thread-actions { width:100%; margin-left:41px; justify-content:flex-start; }
  .chat-project-select { max-width:210px; }
  .chat-dialog-form { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:560px) {
  .chat-history-panel { top:67px; left:10px; bottom:10px; width:calc(100vw - 20px); }
  .chat-thread-actions { margin-left:0; }
  .chat-thread-actions .chat-project-select { flex:1; min-width:140px; }
}

.three-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 18px; }
.mini-stat { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 15px 20px; color: var(--muted); }
.mini-stat strong { font-size: 24px; color: var(--ink); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 11px; }
.preset-card { border: 1px solid #e6ebf3; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.preset-card p { font-size: 11px; line-height: 1.6; margin: 0; flex: 1; }
.preset-card .button { align-self: start; }
.preset-card small { color: #8290a7; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { color: #8b96a8; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); padding: 12px 10px; white-space: nowrap; }
.data-table td { border-bottom: 1px solid #f0f2f7; padding: 15px 10px; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table strong { font-size: 12px; }
.table-link { border: none; background: transparent; color: var(--blue); text-decoration: underline; padding: 0; font-family: ui-monospace,monospace; font-size: 11px; text-align: left; }
.table-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.table-actions button { border: 1px solid var(--line); background: white; border-radius: 6px; padding: 4px 7px; color: #576986; font-size: 10px; }
.table-actions button:hover { background: var(--sky); }
.progress-track { background: #ebeff8; border-radius: 50px; width: 92px; height: 5px; overflow: hidden; margin-top: 7px; }
.progress-fill { height: 100%; background: var(--blue); border-radius: inherit; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form > .button { align-self: flex-start; }
.stack-form .inline-actions input { flex: 1; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; margin-bottom: 15px; }
.field-grid > label, .field-grid input { min-width: 0; }
.privacy-label { padding: 4px 8px; font-size: 10px; background: #e9f7f3; color: #188269; border-radius: 6px; }
.section-rule { height: 1px; border: 0; background: var(--line); margin: 17px 0; }
.wrap-actions { flex-wrap: wrap; margin: 12px 0; }
.api-explorer { display: grid; grid-template-columns: minmax(225px, 320px) minmax(0,1fr); gap: 18px; align-items: start; }
.api-list-panel { overflow: hidden; position: sticky; top: 89px; max-height: calc(100vh - 111px); display: flex; flex-direction: column; }
.api-filter { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); padding: 16px; font-size: 12px; flex-shrink: 0; }
.api-route-list { overflow-y: auto; padding: 8px; }
.api-route-group { color: #8292aa; font-size: 10px; text-transform: uppercase; padding: 13px 10px 8px; font-weight: 800; letter-spacing: .08em; }
.api-route { width: 100%; display: flex; gap: 9px; align-items: center; text-align: left; background: white; border: 0; border-radius: 8px; padding: 10px 9px; }
.api-route:hover, .api-route.is-selected { background: #f0f3ff; }
.api-route.is-selected { box-shadow: inset 2px 0 0 var(--blue); }
.http-method { min-width: 44px; font-size: 9px; font-weight: 900; color: #11725d; }
.http-method.post { color: #b77b25; }
.http-method.sse, .http-method.ws { color: #7756b8; }
.api-route-path { font: 10px/1.5 ui-monospace,monospace; overflow-wrap: anywhere; }
.api-request-panel { min-height: 400px; }
.api-request-panel .stack-form > div:not(:empty) { display: flex; flex-direction: column; gap: 11px; }
.api-request-panel .stack-form > div > label { display: flex; flex-direction: column; }
.console-toast { position: fixed; right: 22px; bottom: 21px; max-width: min(390px,calc(100vw - 35px)); z-index: 40; border-radius: 10px; border: 1px solid #b9e9d9; background: #e9faf5; color: #146b55; box-shadow: 0 14px 44px #12213c23; padding: 13px 17px; font-weight: 620; font-size: 12px; }
.console-toast.error { background: #fff0f2; color: #aa364b; border-color: #f5ccd3; }
.auth-dialog { max-width: 440px; width: calc(100% - 24px); border: 1px solid var(--line); border-radius: 17px; background: white; padding: 28px; box-shadow: 0 23px 80px #07132c61; color: var(--ink); }
.auth-dialog::backdrop { background: #0d182f94; backdrop-filter: blur(4px); }
.auth-dialog form { margin: 0; }
.login-header { display: flex; gap: 8px; justify-content: space-between; }
.login-header h2 { font-size: 21px; }
.login-header p { font-size: 12px; margin-top: 7px; }
.form-error { color: var(--alert); font-size: 12px; margin: 0; min-height: 0; }
@media (max-width: 1120px) { .metric-grid { grid-template-columns: repeat(2,1fr); } .orbit-art { flex: 0 0 200px; transform: scale(.85); transform-origin: center; margin-right: -20px; } .topbar-runtime { display: none; } }
@media (max-width: 800px) { .console-sidebar { position: fixed; transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 40px #0b173c33; } .console-sidebar.is-open { transform: none; } .sidebar-close { display: inline-grid !important; margin-left: auto; color: #b6c4df; } .mobile-nav-trigger { display: inline-grid; } .mobile-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 14; background: #0b173c82; display: block; } .console-topbar { padding: 0 19px; height: 62px; } .console-main { padding: 24px 19px 50px; } .two-column, .api-explorer { grid-template-columns: minmax(0,1fr); } .api-list-panel { position: static; max-height: 310px; } .page-intro-actions { align-items: flex-start; flex-direction: column; } }
@media (max-width: 560px) { .signed-in, .topbar-divider { display: none; } .welcome-banner { min-height: 230px; } .orbit-art { position: absolute; opacity: .25; right: -65px; top: 30px; z-index: -1; } .metric-grid { gap: 10px; } .metric-card { padding: 15px; } .metric-value { font-size: 26px; } .metric-word { font-size: 18px; } .three-stats { gap: 9px; } .mini-stat { padding: 12px; } .mini-stat strong { font-size: 17px; } .mini-stat span { font-size: 11px; } .panel-pad { padding: 17px; } .panel-heading { align-items: flex-start; } .search-form, .composer { flex-wrap: wrap; } .search-form > input[type="search"] { flex-basis: 100%; } .search-form .search-leading { top: 8px; } .chat-bubble { max-width: 95%; } .topbar-actions { gap: 4px; } .breadcrumb span { padding: 0 5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
/* Privileged code learning, repair and human review queue. */
.code-status-columns { margin-top: 17px; }
.code-status { max-height: 270px; overflow: auto; font-size: 11px; }
.code-review-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.code-review-grid > * { min-width: 0; }
.code-diff-label { margin-top: 18px; }
.code-diff { margin-top: 8px; max-height: 650px; overflow: auto; text-align: left; font-size: 11px; line-height: 1.55; tab-size: 2; }
.code-review-grid label { display: block; margin: 10px 0; }
.code-review-grid label input, .code-review-grid label textarea { width: 100%; margin-top: 6px; }
#codeReviewNote { min-height: 115px; }
#codeReviewDetail { max-height: 225px; overflow: auto; }
#codeReviewRows .table-link { max-width: 180px; overflow-wrap: anywhere; }
#codeAdminNotice { margin-bottom: 12px; }
@media (max-width: 950px) { .code-review-grid { grid-template-columns: minmax(0,1fr); } }


.job-progress-cell { min-width: 180px; }
.job-progress-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.job-progress-percent { font-weight: 700; color: var(--ink); }
.job-progress-fallback { color: var(--muted); font-size: 12px; }
.job-progress-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.progress-meta-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: #f4f7fc; color: #5f6f92; padding: 4px 8px; font-size: 10px; line-height: 1.1; }
.progress-track { position: relative; background: #ebeff8; border-radius: 50px; width: 92px; height: 5px; overflow: hidden; margin-top: 7px; }
.progress-track.progress-track-wide { width: 100%; height: 10px; margin-top: 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #6f83ff, #6be4c7); border-radius: inherit; }
.progress-fill.is-animated { background-size: 200% 100%; animation: ecaiProgressShift 1.25s linear infinite; }
.progress-track::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%); transform: translateX(-120%); opacity: 0; }
.progress-track.is-running::after { opacity: 1; animation: ecaiProgressSheen 1.8s ease-in-out infinite; }
.job-inspector { margin-top: 14px; border: 1px solid #e5ebf5; border-radius: 14px; background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%); padding: 16px; }
.job-inspector.empty { color: var(--muted); font-size: 14px; }
.job-hero { display: grid; gap: 14px; }
.job-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-hero-copy { min-width: 0; }
.job-hero-copy h3 { margin: 0; font-size: 18px; color: var(--ink); }
.job-hero-copy p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.job-progress-headline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.job-progress-value { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.04em; }
.job-progress-caption { color: var(--muted); font-size: 12px; }
.job-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.job-pill { border: 1px solid #dde5f5; border-radius: 999px; background: #fff; padding: 6px 10px; color: #4d628f; font-size: 11px; }
.job-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.job-stat-card { border: 1px solid #e6ecf8; background: #fff; border-radius: 12px; padding: 12px; }
.job-stat-label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.job-stat-value { display: block; margin-top: 6px; color: var(--ink); font-size: 18px; font-weight: 700; }
.job-stat-value.smallish { font-size: 15px; }
.job-stage-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.job-stage-card { border-radius: 12px; border: 1px solid #e6ecf8; background: #fff; padding: 11px 12px; min-height: 80px; }
.job-stage-card.is-active { border-color: #cfd9ff; box-shadow: 0 0 0 1px rgba(111,131,255,.08); }
.job-stage-card.is-done { border-color: #cdeedd; background: #f3fdfa; }
.job-stage-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; color: var(--ink); }
.job-stage-dot { width: 9px; height: 9px; border-radius: 50%; background: #d5dcec; flex: 0 0 auto; }
.job-stage-card.is-active .job-stage-dot { background: #6f83ff; box-shadow: 0 0 0 5px rgba(111,131,255,.15); }
.job-stage-card.is-done .job-stage-dot { background: #18a36d; }
.job-stage-copy { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.job-checkpoint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.job-checkpoint-card { border: 1px solid #e6ecf8; background: #fff; border-radius: 12px; padding: 12px; }
.job-checkpoint-card h4 { margin: 0 0 8px; font-size: 12px; color: var(--ink); }
.job-checkpoint-list { display: grid; gap: 8px; }
.job-checkpoint-item { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #4d628f; }
.job-checkpoint-key { color: var(--muted); }
.job-checkpoint-value { color: var(--ink); font-weight: 600; text-align: right; }
.nested-expandable { margin-top: 14px; }
@keyframes ecaiProgressShift { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes ecaiProgressSheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (max-width: 980px) { .job-stats-grid, .job-stage-list, .job-checkpoint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .job-hero-top, .job-progress-headline { flex-direction: column; align-items: flex-start; } .job-stats-grid, .job-stage-list, .job-checkpoint-grid { grid-template-columns: 1fr; } .job-progress-cell { min-width: 150px; } }

/* Per-job accordion. A single expanded job owns the authenticated live stream. */
.index-job-list { display: grid; gap: 11px; margin-top: 18px; }
.index-job-item { min-width: 0; border: 1px solid #e4eaf5; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px #142d5910; overflow: hidden; }
.index-job-item[open] { border-color: #cbd6ff; box-shadow: 0 7px 25px #354aba14; }
.index-job-summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(0,1.35fr) max-content minmax(150px,1fr) minmax(75px,.35fr); align-items: center; gap: 18px; min-height: 91px; padding: 18px 19px; }
.index-job-summary::-webkit-details-marker { display: none; }
.index-job-summary:hover { background: #fbfcff; }
.index-job-summary:focus-visible { outline: 3px solid #93a6fd; outline-offset: -3px; }
.index-job-identity { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.index-job-identity > strong { font-size: 14px; font-weight: 750; line-height: 1.3; color: var(--ink); }
.index-job-id { color: #546eaf; font-size: 11px; overflow-wrap: anywhere; }
.index-job-source { color: var(--muted); font-size: 11px; }
.index-job-meter { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.index-job-meter .progress-track { margin: 0; height: 7px; }
.index-job-meter-label { display: flex; justify-content: space-between; gap: 9px; align-items: baseline; min-width: 0; }
.index-job-meter-label strong { color: var(--ink); font-size: 13px; }
.index-job-meter-label small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.index-job-trailing { display: flex; align-items: center; justify-content: flex-end; gap: 13px; white-space: nowrap; }
.index-job-trailing small { color: #62718c; font-size: 11px; }
.index-job-chevron { font-size: 25px; line-height: 1; color: #8292b0; transition: transform .18s ease; }
.index-job-item[open] .index-job-chevron { transform: rotate(180deg); }
.index-job-expanded { border-top: 1px solid #ebeff7; background: #fbfcff; padding: clamp(15px,2vw,24px); min-width: 0; animation: indexJobReveal .2s ease-out; }
.index-job-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.index-job-tracking { color: #50658c; font-size: 12px; overflow-wrap: anywhere; }
.index-job-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.index-job-actions { margin: 0; }
.index-job-actions button { min-height: 31px; padding: 5px 11px; font-size: 11px; }
.index-job-layout { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,440px),1fr)); gap: 14px; align-items: start; min-width: 0; }
.index-job-layout > * { min-width: 0; }
.index-job-layout .job-inspector { margin: 0; }
.index-job-feed { min-width: 0; background: #fff; border: 1px solid #e6ecf8; border-radius: 12px; padding: 16px; }
.index-job-feed h3 { font-size: 14px; margin-bottom: 7px; }
.index-job-feed .context-hint { margin: 0 0 11px; }
.index-job-event-log { height: clamp(170px,23vh,280px); min-height: 170px; max-height: none; white-space: pre-wrap; font-size: 11px; overflow: auto; margin: 0; }
.index-job-raw { margin-top: 16px; }
.index-job-raw > summary { cursor: pointer; color: #50658c; font-size: 12px; padding: 7px 0; }
.index-job-raw > .code-display { margin-top: 7px; }
/* The cards need to respond to their own container width, not the device width. */
.index-job-layout .job-stats-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); }
.index-job-layout .job-stage-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); }
.index-job-layout .job-checkpoint-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.index-job-layout .job-pill { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.index-job-layout .job-hero, .index-job-layout .job-hero-top, .index-job-layout .job-hero-copy, .index-job-layout .job-progress-headline { min-width: 0; }
.index-job-layout .job-stat-value { overflow-wrap: anywhere; }
.index-job-item .progress-track { max-width: 100%; }
@keyframes indexJobReveal { from { opacity: .5; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (max-width: 1080px) { .index-job-summary { grid-template-columns: minmax(0,1fr) auto; gap: 11px 15px; } .index-job-summary > .index-job-meter { grid-column: 1; } .index-job-summary > .index-job-trailing { grid-column: 2; grid-row: 2; } .index-job-summary > .status-tag { grid-column: 2; grid-row: 1; justify-self: end; } }
@media (max-width: 520px) { .index-job-summary { padding: 14px; } .index-job-expanded { padding: 12px; } .index-job-layout .job-stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .index-job-trailing small { display: none; } .index-job-controls { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .index-job-expanded { animation: none; } .index-job-chevron { transition: none; } .index-job-item .progress-track::after, .index-job-item .progress-fill { animation: none; } }

/* Job-runtime panel uses existing dashboard components; no chart dependency. */
.job-runtime-panel { margin: 14px 0; padding: 15px; background: #f6f8fd; border: 1px solid #e3e9f6; border-radius: 12px; min-width: 0; }
.job-runtime-heading { display:flex; gap: 12px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.job-runtime-heading h4 { margin: 0; font-size: 13px; color: var(--ink); }
.job-runtime-note { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap:anywhere; }
.job-runtime-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 9px; margin-top: 10px; }
.job-runtime-stat { min-width: 0; background: white; border: 1px solid #e3e9f6; border-radius: 9px; padding: 10px 11px; }
.job-runtime-stat-title { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.job-runtime-stat-value { display: block; color: var(--ink); font-size: 14px; font-weight: 700; margin-top: 6px; min-width: 0; overflow-wrap: anywhere; }
.job-resource-grid .job-runtime-stat-value { font-size: 13px; }
.job-hero .job-pill, .job-checkpoint-value { min-width: 0; max-width: 100%; overflow-wrap:anywhere; word-break: break-word; }
.index-job-time-spent { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .progress-fill.is-animated, .progress-track.is-running::after { animation: none !important; } }

/* Human-gated code-repair workbench: filters, inline review cards, file diffs. */
.code-filter-toolbar { display:grid; grid-template-columns: minmax(190px, 1.8fr) repeat(3, minmax(128px, 1fr)) auto; align-items:end; gap: 10px; margin: 17px 0 9px; }
.code-filter-toolbar label { display:flex; flex-direction:column; gap: 6px; min-width:0; font-size:11px; font-weight:600; color:#61718f; }
.code-filter-toolbar input:not([type="checkbox"]), .code-filter-toolbar select { margin:0; width:100%; min-width:0; height:39px; padding:8px 11px; border:1px solid #dce4f1; border-radius:9px; background:white; color:var(--ink); font:inherit; font-size:12px; }
.code-filter-toolbar .code-filter-checkbox { align-self:center; flex-direction:row; align-items:center; gap:8px; white-space:nowrap; font-size:11px; font-weight:500; }
.code-filter-checkbox input { accent-color:#6476f2; }
.code-filter-clear { margin-bottom:0; align-self:end; height:39px; }
.code-filter-count { color:#6a7a98; font-size:12px; margin:2px 0 12px; }
.code-repair-list, .code-review-list { display:grid; gap:10px; min-width:0; }
.code-repair-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:14px; align-items:center; padding:13px 15px; background:#fafdff; border:1px solid #e5eaf6; border-radius:12px; min-width:0; }
.code-repair-row-main, .code-review-title { min-width:0; }
.code-repair-row-main strong, .code-review-title strong { color:var(--ink); font-size:13px; overflow-wrap:anywhere; }
.code-row-summary { color:#6a7795; font-size:11px; line-height:1.45; margin:4px 0 0; max-width:100%; overflow-wrap:anywhere; }
.code-row-hash { display:block; margin-top:4px; overflow-wrap:anywhere; }
.code-repair-row-actions { display:flex; align-items:center; white-space:nowrap; }
.code-review-card { border:1px solid #dfe6f6; border-radius:14px; background:white; overflow:hidden; min-width:0; }
.code-review-card[open] { border-color:#c5d1ff; box-shadow:0 8px 22px rgba(34,51,107,.055); }
.code-review-summary { display:grid; grid-template-columns:minmax(210px,2fr) auto auto auto minmax(110px,.7fr) 18px; gap:12px; align-items:center; padding:17px 18px; cursor:pointer; list-style:none; user-select:none; min-width:0; }
.code-review-summary::-webkit-details-marker { display:none; }
.code-review-summary::marker { content:""; }
.code-review-summary:hover { background:#f8faff; }
.code-review-summary:focus-visible, .code-file-button:focus-visible, .code-repair-row button:focus-visible { outline:3px solid #aab9ff; outline-offset:2px; }
.code-review-summary .code-row-summary { margin:7px 0 0; font-size:11px; font-weight:400; line-height:1.5; }
.code-review-title .code-row-hash { margin-top:5px; }
.code-review-time { justify-self:end; text-align:right; overflow-wrap:anywhere; }
.code-review-approval-count { white-space:nowrap; }
.code-validation-label { border:1px solid #e1e8f5; background:#f5f7fb; padding:5px 9px; color:#6b7894; border-radius:999px; font-size:10px; white-space:nowrap; font-weight:700; }
.code-validation-label.verified { color:#14805c; background:#e9faf2; border-color:#bee9da; }
.code-review-chevron { display:block; color:#60729c; font-size:21px; line-height:1; transition:transform .2s ease; }
.code-review-card[open] .code-review-chevron { transform:rotate(180deg); }
.code-review-content { border-top:1px solid #e4ebf8; padding:18px; background:#fafbff; min-width:0; }
.code-review-content > .context-hint { margin:0 0 14px; overflow-wrap:anywhere; }
.code-review-workspace { min-width:0; }
.code-review-workspace[hidden], .code-bearer-notice[hidden] { display:none !important; }
.code-review-workspace .code-review-grid { grid-template-columns:minmax(0,1.2fr) minmax(0, .9fr); align-items:start; gap:14px; }
.code-review-workspace .code-review-grid > .surface { box-shadow:none; border:1px solid #e3eaf8; }
.code-review-verification { border-radius:10px; border:1px solid #e3eaf7; background:#f7faff; padding:14px; margin-top:12px; }
.code-verification-hero { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:9px; margin-bottom:10px; }
.code-verification-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.code-verification-fact { display:flex; flex-direction:column; gap:5px; padding:9px 10px; border:1px solid #e5eaf4; background:white; border-radius:8px; min-width:0; }
.code-verification-fact span { font-size:10px; color:#73809c; }
.code-verification-fact strong { font:11px/1.6 ui-monospace,Menlo,Consolas,monospace; color:#394c6e; overflow-wrap:anywhere; }
.code-verification-steps { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.code-verification-step { border-radius:6px; padding:5px 8px; background:white; border:1px solid #e0e8f8; font-size:10px; color:#677998; }
.code-verification-step.passed { color:#178363; background:#effbf6; border-color:#d3eee1; }
.code-review-metadata { margin:12px 0; border-radius:10px; border:1px solid #e3eaf8; background:white; }
.code-review-metadata summary { cursor:pointer; padding:10px 13px; font-size:12px; color:#53688e; }
.code-review-metadata .code-display { margin:0 11px 11px; }
.code-diff-toolbar { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:flex-start; gap:12px; margin-top:16px; }
.code-diff-toolbar .code-diff-label { margin:0 0 5px; }
.code-diff-file-list { display:flex; flex-wrap:wrap; gap:6px; max-width:100%; }
.code-file-button { max-width:100%; font-size:11px; color:#536b9c; padding:7px 10px; border:1px solid #dfe6f6; background:#fff; border-radius:8px; cursor:pointer; overflow-wrap:anywhere; text-align:left; }
.code-file-button:hover { border-color:#a9b9f4; background:#f5f7ff; }
.code-file-button.is-active { color:#4055b4; background:#edf1ff; border-color:#b8c5ff; font-weight:700; }
.code-review-workspace .code-diff { background:#f6f8fc; border:1px solid #e4eafa; border-radius:10px; max-height:680px; overflow:auto; margin-top:10px; padding:5px 0 9px; font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:#465571; tab-size:2; }
.code-diff-file-heading { background:#eaf0fa; border-bottom:1px solid #dce4f1; padding:9px 12px; font-weight:700; color:#344e81; overflow-wrap:anywhere; position:sticky; top:0; }
.code-diff-line { padding:0 12px; white-space:pre; width:max-content; min-width:100%; }
.code-diff-line.is-addition { color:#14683d; background:#e9f9f0; }
.code-diff-line.is-removal { color:#a0394e; background:#fff0f3; }
.code-diff-line.is-hunk { color:#426ab0; background:#eaf1ff; font-weight:600; }
.code-diff-line.is-meta { color:#70819f; }
.code-bearer-notice { background:#fff8e9; border:1px solid #f4ddb4; color:#785a21; font-size:12px; line-height:1.6; padding:12px; border-radius:9px; margin:0 0 15px; }
.code-bearer-notice .text-button { font-weight:700; color:#6850b1; }
@media (max-width:1200px) { .code-filter-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); } .code-filter-toolbar .code-filter-search { grid-column:1/-1; } .code-review-summary { grid-template-columns:minmax(0,1fr) auto auto; } .code-review-summary .code-review-approval-count, .code-review-summary .code-review-time { display:none; } }
@media (max-width:1000px) { .code-review-workspace .code-review-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:680px) { .code-filter-toolbar { grid-template-columns:minmax(0,1fr); } .code-filter-toolbar .code-filter-search { grid-column:auto; } .code-repair-row { grid-template-columns:minmax(0,1fr) auto; } .code-repair-row .status-tag { justify-self:end; } .code-repair-row-actions { justify-self:end; } .code-review-summary { grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; } .code-review-summary .code-review-title { grid-column:1/-1; } .code-review-summary .code-validation-label { grid-column:1; } .code-review-summary .code-review-chevron { grid-column:2; grid-row:2; } .code-review-summary .status-tag { grid-column:1; grid-row:2; justify-self:start; } .code-review-summary .code-validation-label { grid-row:3; } .code-review-summary .code-review-chevron { grid-row:2/4; align-self:center; } .code-review-content { padding:10px; } .code-verification-facts { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .code-review-chevron { transition:none; } .code-review-card, .code-review-content { scroll-behavior:auto; } }

/* Node-admin operations overview: live counts, diagnostics and publication gate. */
.code-status-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:end; gap:12px; margin:23px 0 14px; }
.code-status-heading .eyebrow { margin-bottom:4px; }
.code-status-heading h3 { font-size:16px; margin:0; }
.code-metrics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.code-metric { position:relative; min-width:0; border:1px solid #e0e7f4; border-radius:13px; background:linear-gradient(180deg,#fff,#fafcff); padding:15px 17px; }
.code-metric-label { color:#687998; font-size:11px; font-weight:650; }
.code-metric-value { display:block; color:#182947; font-size:clamp(21px,2.3vw,29px); letter-spacing:-.045em; font-weight:760; margin:5px 0 3px; overflow-wrap:anywhere; }
.code-metric-caption { color:#71809d; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.code-metric.has-attention { border-color:#f4d5bc; background:linear-gradient(180deg,#fffdf9,#fff9f3); }
.code-metric.has-success { border-color:#ccece3; }
.code-services-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:13px; }
.code-service { min-width:0; border:1px solid #e1e8f5; border-radius:13px; background:#f9fbff; padding:15px; }
.code-service-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:9px; }
.code-service h4 { margin:0; font-size:13px; }
.code-service-state { border:1px solid #d9e2f1; background:#eef2fa; color:#586a8b; font-size:10px; font-weight:700; padding:4px 8px; border-radius:999px; }
.code-service-state.ok { background:#e8f9f1; color:#147858; border-color:#bdebd9; }
.code-service-state.warn { background:#fff3e7; color:#965d1d; border-color:#f1d9b7; }
.code-service-state.bad { background:#fff0f3; color:#a03049; border-color:#f3c6d0; }
.code-service-description { margin:10px 0; color:#64748f; font-size:11px; min-height:32px; line-height:1.55; overflow-wrap:anywhere; }
.code-service-facts { display:grid; gap:7px; margin-top:10px; }
.code-service-fact { display:flex; gap:10px; justify-content:space-between; align-items:baseline; color:#74829c; font-size:11px; min-width:0; }
.code-service-fact strong { color:#273a5d; font-size:11px; overflow-wrap:anywhere; text-align:right; }
.code-mini-progress { width:100%; height:8px; border-radius:999px; background:#e5ebf7; overflow:hidden; margin-top:12px; }
.code-mini-progress > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#6476f0,#32b9a8); transition:width .25s ease; }
.code-raw-telemetry { margin-top:15px; border:1px solid #e2e9f6; border-radius:11px; background:#fff; }
.code-raw-telemetry summary { cursor:pointer; padding:12px 15px; color:#536a99; font-size:12px; font-weight:650; }
.code-raw-telemetry .code-status-columns { padding:0 13px 14px; }
.code-publish-gate { border:1px solid #e0e7f4; background:#f8faff; color:#4d628b; border-radius:11px; padding:13px; margin:10px 0 14px; font-size:12px; }
.code-publish-gate.is-ready { background:#f0fbf5; border-color:#c2ebd5; color:#236b4f; }
.code-publish-gate.is-blocked { background:#fff9f0; border-color:#f0dabb; color:#755522; }
.code-publish-gate-title { display:block; font-weight:760; font-size:13px; color:inherit; margin-bottom:6px; }
.code-publish-gate ul { margin:8px 0 0; padding-left:18px; line-height:1.7; }
.code-publish-gate p { font-size:11px; margin:7px 0 0; color:inherit; }
@media(max-width:1160px) { .code-metrics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .code-services-grid { grid-template-columns:minmax(0,1fr); } .code-service-description { min-height:0; } }
@media(max-width:620px) { .code-metrics-grid { grid-template-columns:minmax(0,1fr); } .code-raw-telemetry .code-status-columns { grid-template-columns:minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { .code-mini-progress > span { transition:none; } }

.code-settings-surface { margin-top:16px; }
.code-settings-surface > summary { cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.code-settings-surface > summary strong { display:block; margin-top:3px; font-size:16px; color:#20304f; }
.code-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.code-settings-card { min-width:0; padding:16px; border:1px solid #e2e9f6; border-radius:12px; background:#fbfcff; }
.code-settings-card h3 { margin:4px 0 13px; font-size:14px; color:#273a5d; }
.code-settings-card > label, .code-role-group { display:grid; gap:6px; margin:10px 0; font-size:11px; font-weight:650; color:#536889; }
.code-settings-card input:not([type="checkbox"]) { width:100%; min-width:0; }
.code-settings-card small { color:#7b8ba5; line-height:1.45; font-weight:500; }
.code-toggle { display:flex !important; align-items:center; gap:8px; grid-template-columns:auto 1fr; }
.code-toggle input[type="checkbox"] { width:16px; height:16px; margin:0; accent-color:var(--blue); }
.code-role-list { display:flex; flex-wrap:wrap; gap:7px; min-height:30px; align-items:center; }
.code-role-chip { display:inline-flex; align-items:center; gap:8px; max-width:100%; border:1px solid #dbe4f5; background:#fff; border-radius:999px; padding:5px 7px 5px 10px; font-size:10px; font-weight:600; color:#435675; }
.code-role-chip > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:290px; }
.code-role-remove { border:0; border-radius:999px; background:#eef2fa; color:#64748f; padding:3px 7px; cursor:pointer; font-size:10px; }
.code-role-remove:disabled { opacity:.5; cursor:not-allowed; }
.code-bundle-list { display:grid; gap:6px; margin-top:10px; max-height:180px; overflow:auto; }
.code-bundle { border:1px solid #e1e8f5; border-radius:8px; background:#fff; padding:8px 10px; color:#526481; font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere; }
.code-settings-footer { display:flex; gap:14px; justify-content:space-between; align-items:center; flex-wrap:wrap; margin-top:16px; padding-top:14px; border-top:1px solid #e8edf6; }
.code-settings-footer .context-hint { margin:0; flex:1 1 300px; }
.code-sharing-card { grid-column:span 2; }
@media(max-width:900px) { .code-settings-grid { grid-template-columns:minmax(0,1fr); } .code-sharing-card { grid-column:auto; } }
@media(max-width:620px) { .code-settings-card .field-grid { grid-template-columns:minmax(0,1fr); } .code-role-group .inline-actions { align-items:stretch; } .code-role-group .inline-actions input { flex-basis:100%; } }

/* Wikimedia source picker: compact project selection and server-reviewed plans. */
.wiki-picker-surface, .wiki-custom-surface { margin-bottom: 18px; }
.wiki-picker-surface .context-hint, .wiki-custom-surface .context-hint { margin: 8px 0 14px; }
.wiki-picker-tools { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.wiki-search-label { display: block; flex: 1; max-width: 360px; }
.wiki-search-label input { width: 100%; }
.wiki-preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 11px; }
.wiki-project-card { display: flex; flex-direction: column; gap: 11px; cursor: pointer; background: #fbfcff; border: 1px solid #e2e8f3; padding: 17px; border-radius: 13px; min-width: 0; transition: border-color .15s, background .15s; }
.wiki-project-card:hover { border-color: #abbcfb; }
.wiki-project-card.is-selected { border-color: #7189f3; background: #f0f3ff; box-shadow: inset 0 0 0 1px #9cafff; }
.wiki-project-card:focus-within { outline: 3px solid #a5b5ff; outline-offset: 2px; }
.wiki-project-card-head { display: flex; align-items: flex-start; gap: 11px; }
.wiki-project-card input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); margin: 2px 0 0; flex: 0 0 18px; }
.wiki-project-card-copy { display: grid; gap: 2px; min-width: 0; }
.wiki-project-card-copy strong { font-size: 13px; color: #1e2b44; }
.wiki-project-card-copy small { color: #6b7c9a; font-size: 11px; }
.wiki-project-description { font-size: 12px; line-height: 1.55; color: #60718f; }
.wiki-project-active { color: #9c7117; background: #fff6df; border: 1px solid #f8e9bd; border-radius: 7px; padding: 6px 8px; font-size: 11px; }
.wiki-picker-footer { margin-top: 17px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #ebeff7; padding-top: 17px; }
.wiki-picker-count { display: grid; gap: 1px; }
.wiki-picker-count strong { font-size: 15px; }
.wiki-picker-count span { color: var(--muted); font-size: 11px; }
.wiki-picker-notice { margin-top: 13px; font-size: 12px; color: #536889; }
.wiki-enqueue-results { display: grid; gap: 7px; margin-top: 8px; }
.wiki-queue-result { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; justify-content: space-between; padding: 9px 11px; border-radius: 9px; border: 1px solid #deebdf; background: #f4fcf6; font-size: 12px; color: #24734e; }
.wiki-queue-result.is-error { background: #fff5f5; border-color: #f5d4d6; color: #a42e45; }
.wiki-custom-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 19px; align-items: stretch; margin-top: 14px; }
.wiki-custom-config { min-width: 0; }
.wiki-custom-fields { grid-template-columns: repeat(3, minmax(0,1fr)); }
.wiki-source-choice-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; }
.wiki-source-choice-head > label, .wiki-field-label { font-size: 12px; color: #455675; font-weight: 650; }
.wiki-field-label small { color: #7b8ba5; font-size: 10px; font-weight: 500; margin-left: 7px; }
.wiki-custom-config > select { width: 100%; }
.wiki-month-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.wiki-month-choice { display: flex; gap: 7px; align-items: center; border: 1px solid #e3e9f3; background: #fbfcff; border-radius: 8px; padding: 9px 10px; font-size: 12px; color: #566889; cursor: pointer; white-space: nowrap; }
.wiki-month-choice.is-selected { border-color: #b0bfff; color: #3349b7; background: #eff2ff; }
.wiki-month-choice:focus-within { outline: 2px solid #8ca0fb; outline-offset: 1px; }
.wiki-month-choice input { accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }
.wiki-plan-card { min-width: 0; border: 1px solid #dfe7f6; border-radius: 13px; padding: 17px; background: linear-gradient(165deg,#f6f8ff,#fff); }
.wiki-plan-card h3 { font-size: 17px; margin: 0 0 13px; }
.wiki-plan-summary { display: grid; gap: 8px; }
.wiki-plan-summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e7ecf7; padding-bottom: 9px; font-size: 12px; }
.wiki-plan-summary-line span { color: #6b7e9c; }
.wiki-plan-summary-line strong { text-align: right; color: #293a5a; overflow-wrap: anywhere; }
.wiki-plan-warning, .wiki-plan-approved { margin-top: 12px; padding: 9px 11px; border: 1px solid #f0dfa4; border-radius: 8px; color: #836a2a; background: #fff9e7; font-size: 11px; }
.wiki-plan-approved { color: #147956; background: #eafbf3; border-color: #b8e8d3; }
.wiki-plan-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 17px 0 8px; }
.wiki-plan-actions .button { flex: 1 1 130px; }
.wiki-json-details { margin-top: 16px; }
.wiki-json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 15px 16px; }
.wiki-json-grid section { min-width: 0; }
.wiki-json-grid h3 { margin-bottom: 8px; }
.wiki-json-grid .code-display { margin: 0; min-height: 130px; max-height: 260px; }
@media (max-width: 1100px) { .wiki-custom-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .wiki-custom-fields { grid-template-columns: 1fr; } .wiki-json-grid { grid-template-columns: 1fr; } .wiki-picker-tools { flex-wrap: wrap; } .wiki-search-label { max-width: none; flex-basis: 100%; } .wiki-picker-footer .button { width: 100%; } .wiki-plan-card { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .wiki-project-card { transition: none; } }
