:root {
  --navy-950: #10243a;
  --navy-900: #18354f;
  --navy-800: #244a6d;
  --blue-700: #2d628f;
  --blue-600: #3979ad;
  --blue-100: #e9f3fb;
  --canvas: #ffffff;
  --panel: #ffffff;
  --text: #172433;
  --muted: #697788;
  --quiet: #8e9aaa;
  --line: #dfe5eb;
  --line-soft: #edf0f3;
  --green: #16845b;
  --green-soft: #e7f6ef;
  --red: #c33f55;
  --red-soft: #fcecef;
  --amber: #b56a18;
  --amber-soft: #fff4df;
  --violet: #7456b7;
  --violet-soft: #f1edfb;
  --shadow: 0 1px 2px rgba(16, 36, 58, .04), 0 7px 24px rgba(16, 36, 58, .035);
  --sidebar-width: 224px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--text);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
code, pre, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bac4ce; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #91a0af; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #4a5361;
  background: #f6f7f8;
  border-right: 1px solid rgba(15,23,42,.06);
}
.sidebar-backdrop { display: none; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: 74px; padding: 20px 22px 0; }
.brand-logo { display: block; height: 18px; width: auto; max-width: 132px; object-fit: contain; filter: brightness(0); opacity: .92; }
.brand-label { color: #8a94a3; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px; }
.primary-nav { padding: 18px 0; }
.nav-section { margin: 0 22px 8px; color: #8b95a3; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px; }
.nav-section-spaced { margin-top: 26px; }
.primary-nav a { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 22px; color: #4b5563; font-weight: 520; transition: background .15s ease, color .15s ease; }
.primary-nav a:hover { color: #4b5563; background: rgba(15,23,42,.05); font-weight: 520; }
.primary-nav a.active { color: #111827; background: #ffffff; box-shadow: inset 0 1px 0 rgba(15,23,42,.06), inset 0 -1px 0 rgba(15,23,42,.06); font-weight: 600; }
.primary-nav svg { width: 17px; height: 17px; color: #6b7280; }
.primary-nav a.active svg { color: #111827; }
.sidebar-status { margin: auto 11px 13px; padding: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
.status-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; color: #9fb2c2; font-size: 10px; }
.status-row strong { color: #dce8f1; font-size: 10px; font-weight: 600; }
.status-row-top { margin-top: 14px; }
.live-dot, .idle-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #38c78a; box-shadow: 0 0 0 3px rgba(56,199,138,.1); }
.idle-dot { background: #d99a42; box-shadow: 0 0 0 3px rgba(217,154,66,.1); }
.sidebar-status code { display: block; overflow: hidden; margin-top: 7px; color: #6f8da5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.workspace { width: calc(100% - var(--sidebar-width)); min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; height: 55px; padding: 0 26px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-context, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions { margin: 0 auto; width: 100%; max-width: 520px; }
.environment-pill { display: inline-flex; align-items: center; gap: 7px; color: #38556e; font-size: 11px; font-weight: 650; }
.environment-pill span { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px var(--green-soft); }
.topbar-separator { width: 1px; height: 16px; background: var(--line); }
.quiet { color: var(--quiet); font-size: 11px; }
.search-shortcut { display: flex; align-items: center; gap: 7px; flex: 1; padding: 8px 10px 8px 12px; color: #83909e; background: #f7f9fa; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.search-shortcut svg { width: 14px; height: 14px; }
.search-shortcut kbd { margin-left: auto; padding: 1px 5px; color: #8995a1; background: white; border: 1px solid #dce2e7; border-radius: 4px; font: 9px inherit; }
.mobile-menu { display: none !important; }

.main-content { width: min(1480px, 100%); margin: 0 auto; padding: 30px 30px 56px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.page-header h1, .detail-header h1, .inspector-header h1 { margin: 2px 0 7px; color: #132333; font-size: clamp(24px, 2.4vw, 34px); font-weight: 710; letter-spacing: -1px; line-height: 1.15; }
.dashboard-header { padding-top: 4px; }
.dashboard-header h1 { max-width: 720px; font-size: clamp(29px, 3vw, 42px); letter-spacing: -1.5px; }
.compact-header { align-items: center; }
.compact-header h1 { font-size: 31px; }
.eyebrow, .panel-kicker { margin: 0 0 4px; color: var(--blue-600); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.35px; }
.page-lede { max-width: 700px; margin: 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 680; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-primary { color: white; background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 1px 2px rgba(16,36,58,.15); }
.button-primary:hover { background: var(--navy-900); }
.button-secondary { color: #304b63; background: white; border-color: #d6dde4; box-shadow: 0 1px 1px rgba(16,36,58,.03); }
.button-secondary:hover { border-color: #aebbc7; }
.button-ghost { color: #587086; background: transparent; border-color: transparent; }
.button-ghost:hover { background: #f1f4f6; transform: none; }
.button-small { min-height: 31px; padding: 0 11px; font-size: 10px; }
.button-tiny { min-height: 26px; padding: 0 7px; font-size: 9px; }
.button-block { width: 100%; margin-top: 9px; }
.icon-button { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; color: #526b80; background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button.disabled, .icon-button:disabled { cursor: not-allowed; opacity: .35; pointer-events: none; }
.text-link { color: var(--blue-700); font-size: 11px; font-weight: 650; }
.text-link:hover { text-decoration: underline; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px 14px; }
.panel-header h2, .form-section h2, .editor-summary h2, .pane-heading h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.3px; }
.panel-header p:not(.panel-kicker) { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-header.padded { padding: 18px 20px; }
.flush-panel { overflow: hidden; margin-top: 18px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.metric-card { position: relative; min-height: 129px; overflow: hidden; padding: 17px 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card::before { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #8096a8; content: ""; opacity: .8; }
.metric-accent-blue::before { background: var(--blue-600); }
.metric-accent-violet::before { background: var(--violet); }
.metric-accent-green::before { background: var(--green); }
.metric-accent-amber::before { background: #d18a2e; }
.metric-label { color: #5e6f7f; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .65px; }
.metric-value { margin: 10px 0 5px; color: #172a3c; font-size: 27px; font-weight: 730; letter-spacing: -1px; line-height: 1; }
.metric-foot { position: relative; z-index: 2; color: #84909d; font-size: 10px; }
.metric-foot a { color: var(--blue-700); }
.info-dot { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 3px; color: #8b99a5; border: 1px solid #cbd3da; border-radius: 50%; font-size: 8px; text-transform: none; cursor: help; }
.sparkline { position: absolute; right: -2px; bottom: 0; width: 48%; height: 39px; opacity: .35; }
.sparkline path { fill: none; stroke: var(--blue-600); stroke-width: 2; }
.sparkline-violet path { stroke: var(--violet); }
.mini-ring { position: absolute; right: 17px; bottom: 15px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--green) var(--score), #e9eef1 0); }
.mini-ring span { width: 28px; height: 28px; background: white; border-radius: 50%; }
.latency-bars { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: end; gap: 3px; height: 28px; }
.latency-bars i { width: 4px; height: 30%; background: #d7c2a4; border-radius: 2px; }
.latency-bars i:nth-child(2) { height: 55%; }.latency-bars i:nth-child(3) { height: 38%; }.latency-bars i:nth-child(4) { height: 82%; }.latency-bars i:nth-child(5) { height: 63%; }.latency-bars i:nth-child(6) { height: 100%; background: #cc8b35; }.latency-bars i:nth-child(7) { height: 72%; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, .8fr); gap: 17px; }
.panel-large { min-width: 0; overflow: hidden; }
.insight-panel { min-width: 0; }
.count-pill { display: inline-grid; min-width: 25px; height: 22px; place-items: center; padding: 0 7px; color: #526678; background: #f1f4f6; border: 1px solid #e0e6eb; border-radius: 12px; font-size: 10px; font-weight: 700; }
.failure-list { padding: 4px 20px 13px; }
.failure-item { margin: 12px 0 15px; }
.failure-item > div:first-child { display: flex; justify-content: space-between; color: #556676; font-size: 11px; }
.failure-item strong { color: #2c4052; }
.failure-track { height: 4px; margin-top: 7px; overflow: hidden; background: #edf1f4; border-radius: 4px; }
.failure-track span { display: block; min-width: 6%; height: 100%; background: #d17a86; border-radius: inherit; }
.insight-callout { display: flex; gap: 10px; margin: 7px 15px 15px; padding: 13px; color: #39556d; background: #eef5fa; border: 1px solid #d9e7f1; border-radius: 8px; }
.callout-icon { display: grid; place-items: center; flex: 0 0 25px; height: 25px; color: var(--blue-700); background: white; border-radius: 6px; }
.insight-callout strong { font-size: 10px; }.insight-callout p { margin: 2px 0 0; color: #708498; font-size: 10px; }
.small-empty { display: grid; place-items: center; padding: 25px; color: var(--quiet); text-align: center; }
.small-empty span { display: grid; width: 32px; height: 32px; place-items: center; margin-bottom: 5px; color: #9aa8b5; background: #f1f4f6; border-radius: 8px; }
.small-empty p { max-width: 260px; margin: 5px 0; }.small-empty.roomy { min-height: 190px; }
.reliability-panel { margin-top: 17px; }
.case-reliability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 20px 20px; }
.reliability-card { padding: 13px; border: 1px solid var(--line-soft); border-radius: 8px; transition: .15s; }
.reliability-card:hover { border-color: #b8c9d7; transform: translateY(-1px); }
.reliability-card > strong { display: block; overflow: hidden; margin: 5px 0 12px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.reliability-card > div { display: flex; align-items: baseline; justify-content: space-between; }
.reliability-card small { color: var(--quiet); font-size: 9px; }
.reliability-score { font-size: 18px; font-weight: 750; }.reliability-score.good { color: var(--green); }.reliability-score.mixed { color: var(--amber); }.reliability-score.bad { color: var(--red); }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 34px; padding: 0 13px; color: #7c8996; background: #f8fafb; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .65px; white-space: nowrap; }
.data-table td { min-height: 57px; padding: 11px 13px; color: #415365; border-bottom: 1px solid var(--line-soft); font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfd; }
.data-table small { display: block; margin-top: 3px; color: #8b97a3; font-size: 9px; white-space: nowrap; }
.row-title { display: block; color: #1d3549; font-weight: 680; }.row-title:hover { color: var(--blue-600); }
.row-subtitle { display: block; overflow: hidden; max-width: 240px; margin-top: 3px; color: #8b97a3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.row-arrow { display: inline-grid; width: 26px; height: 26px; place-items: center; color: #6f8293; border-radius: 6px; }.row-arrow:hover { color: var(--blue-700); background: var(--blue-100); }
.suite-label { display: block; color: #334c61; font-weight: 620; white-space: nowrap; }
.metric-cell { color: #203b52 !important; font-size: 13px !important; font-weight: 720; }
.muted-strong { color: #405467; }.clickable-row { cursor: pointer; }
.progress-inline { display: flex; align-items: center; gap: 7px; min-width: 90px; }.progress-inline > div { width: 54px; height: 4px; overflow: hidden; background: #e9edf1; border-radius: 4px; }.progress-inline span { display: block; height: 100%; background: var(--blue-600); }.progress-inline small { margin: 0; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; color: #596a79; background: #f0f3f5; border: 1px solid #e1e6ea; border-radius: 12px; font-size: 9px; font-weight: 690; white-space: nowrap; }
.status-badge > span { width: 5px; height: 5px; background: #8c99a5; border-radius: 50%; }
.status-passed, .status-completed { color: #116944; background: var(--green-soft); border-color: #ccebdc; }.status-passed > span, .status-completed > span { background: var(--green); }
.status-failed, .status-error { color: #a42f45; background: var(--red-soft); border-color: #f3d0d7; }.status-failed > span, .status-error > span { background: var(--red); }
.status-running, .status-grading { color: #285f8d; background: var(--blue-100); border-color: #d2e7f5; }.status-running > span, .status-grading > span { background: var(--blue-600); animation: pulse 1.5s infinite; }
.status-queued { color: #77569f; background: var(--violet-soft); border-color: #e0d6f3; }.status-queued > span { background: var(--violet); }
.status-draft { color: #7b6853; background: #f6f2ed; border-color: #e9ded1; }.status-draft > span { background: #a88e70; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.7); } }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; padding: 10px; }
.filter-form { display: flex; align-items: center; gap: 7px; }
.wide-filter-form { width: min(100%, 900px); }.wide-filter-form .search-field { flex: 1; }
.search-field { display: flex; align-items: center; width: 290px; height: 32px; gap: 7px; padding: 0 9px; background: #fafbfc; border: 1px solid #dce2e7; border-radius: 6px; }
.search-field svg { width: 14px; color: #8a98a5; }.search-field input { width: 100%; padding: 0; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 11px; }
.filter-select { height: 32px; min-width: 125px; padding: 0 27px 0 9px; color: #526475; background: #fff; border: 1px solid #dce2e7; border-radius: 6px; font-size: 10px; }

.toast-stack { position: fixed; top: 68px; right: 22px; z-index: 80; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 11px 13px; color: #385369; background: white; border: 1px solid var(--line); border-left: 3px solid var(--blue-600); border-radius: 7px; box-shadow: 0 8px 30px rgba(16,36,58,.13); font-size: 11px; animation: toast-in .2s ease; }
.toast-success { border-left-color: var(--green); }.toast-error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.empty-state { display: grid; place-items: center; min-height: 330px; padding: 40px; text-align: center; }
.empty-icon { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 10px; color: var(--blue-700); background: var(--blue-100); border-radius: 12px; font-size: 20px; }
.empty-state h3 { margin: 4px 0; font-size: 16px; }.empty-state p { max-width: 390px; margin: 0 0 17px; color: var(--muted); }

/* Forms */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 17px; }
.editor-main { display: grid; gap: 14px; }
.form-section { padding: 21px; }
.form-section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 21px; }
.form-section-heading > span { display: grid; flex: 0 0 28px; height: 28px; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 7px; font-size: 9px; font-weight: 750; }
.form-section-heading h2 { margin: 1px 0 2px; }.form-section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; gap: 17px; }.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }.form-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }.span-2 { grid-column: 1 / -1; }
.field label { display: flex; justify-content: space-between; margin: 0 0 6px; color: #405366; font-size: 10px; font-weight: 680; }.field label span { color: #97a1ab; font-size: 9px; font-weight: 500; }
.form-control { width: 100%; min-height: 36px; padding: 8px 10px; color: #22384b; background: #fbfcfd; border: 1px solid #d9e0e6; border-radius: 6px; outline: none; transition: .15s; font-size: 11px; }
textarea.form-control { resize: vertical; line-height: 1.55; }.form-control:focus { background: white; border-color: #7da9ca; box-shadow: 0 0 0 3px rgba(57,121,173,.09); }
.form-control[aria-invalid="true"] { background: #fffafb; border-color: #dc8392; box-shadow: 0 0 0 3px rgba(195,63,85,.07); }
.field > small { display: block; margin-top: 5px; color: #8a96a2; font-size: 9px; line-height: 1.4; }
.field-live-error { color: var(--red) !important; font-weight: 620; }.field-live-error:empty { display: none; }
.field-inactive { opacity: .72; }.field-inactive .form-control { color: #71808d; background: #f0f3f5; cursor: not-allowed; }
.errorlist { margin: 5px 0 0; padding: 0; color: var(--red); font-size: 9px; list-style: none; }
.form-alert { margin-bottom: 14px; padding: 11px 13px; color: #9d3145; background: var(--red-soft); border: 1px solid #f1ccd4; border-radius: 7px; font-size: 11px; }
.formula-note { display: flex; gap: 10px; margin-top: 18px; padding: 11px; color: #5e7182; background: #f6f9fb; border: 1px solid #e6ebef; border-radius: 7px; }
.formula-note > span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--violet); background: var(--violet-soft); border-radius: 6px; font-family: Georgia, serif; }.formula-note p { margin: 1px 0; font-size: 10px; }
.editor-summary { position: sticky; top: 72px; padding: 19px; }
.editor-summary h2 { margin: 0 0 15px; font-size: 17px; }
.summary-list { margin: 0; border-top: 1px solid var(--line-soft); }.summary-list > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }.summary-list dt { color: #7d8995; font-size: 10px; }.summary-list dd { margin: 0; color: #30485d; font-size: 10px; font-weight: 680; }
.summary-warning { display: flex; gap: 9px; margin: 15px 0 10px; padding: 10px; color: #805d2c; background: var(--amber-soft); border: 1px solid #f0dfbd; border-radius: 7px; }.summary-warning.configured { color: #23674a; background: var(--green-soft); border-color: #d2eadf; }.summary-warning > span { display: grid; flex: 0 0 21px; height: 21px; place-items: center; background: rgba(255,255,255,.7); border-radius: 50%; font-weight: 800; }.summary-warning p { margin: 0; font-size: 9px; }.summary-warning strong { display: block; color: inherit; font-size: 10px; }
.summary-warning.inactive { color: #46657e; background: var(--blue-100); border-color: #d2e5f2; }
.summary-warning p > span { display: block; }
.summary-validation { display: flex; gap: 8px; margin: 14px 0 -5px; padding: 9px; color: #9d3145; background: var(--red-soft); border: 1px solid #f1ccd4; border-radius: 7px; }.summary-validation[hidden] { display: none; }.summary-validation > span { display: grid; flex: 0 0 20px; height: 20px; place-items: center; background: white; border-radius: 50%; font-weight: 800; }.summary-validation p { margin: 1px 0 0; font-size: 9px; }
.summary-foot { display: block; margin-top: 10px; color: #919ca6; font-size: 9px; text-align: center; }
.narrow-form { max-width: 790px; padding: 24px; }.case-editor { display: grid; max-width: 1100px; gap: 14px; }.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line-soft); }.sticky-actions { position: sticky; bottom: 12px; z-index: 4; padding: 11px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 7px 25px rgba(16,36,58,.08); backdrop-filter: blur(10px); }
.checkbox-field { display: flex; align-items: end; padding-bottom: 8px; }.checkbox-field label { justify-content: flex-start; align-items: center; gap: 8px; margin: 0; }.checkbox { accent-color: var(--blue-700); }

/* Suites and graders */
.suite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.suite-card { position: relative; min-height: 265px; padding: 19px; transition: .18s ease; }.suite-card:hover { border-color: #b7c8d6; box-shadow: 0 10px 30px rgba(16,36,58,.07); transform: translateY(-2px); }
.suite-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }.suite-icon { display: grid; width: 36px; height: 36px; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 9px; font-size: 16px; }
.demo-pill, .revision-badge { padding: 3px 7px; color: #72519b; background: var(--violet-soft); border: 1px solid #dfd5f2; border-radius: 12px; font-size: 8px; font-weight: 720; text-transform: uppercase; letter-spacing: .45px; }.revision-badge { color: #46627a; background: #eef3f6; border-color: #dce4e9; }
.suite-card h2 { margin: 4px 0 7px; font-size: 17px; }.suite-card > p:not(.panel-kicker) { min-height: 43px; margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.suite-card-meta { display: flex; gap: 20px; padding-top: 13px; border-top: 1px solid var(--line-soft); color: #87939e; font-size: 9px; }.suite-card-meta strong { color: #364d61; font-size: 11px; }
.suite-tags { display: flex; gap: 5px; margin-top: 13px; }.suite-tags span, .case-tags span { padding: 2px 6px; color: #697989; background: #f1f4f6; border-radius: 4px; font-size: 8px; }
.card-link { position: absolute; right: 18px; bottom: 18px; color: var(--blue-700); font-size: 10px; font-weight: 650; }
.case-list { padding: 0 20px 20px; }.case-row { display: grid; grid-template-columns: 35px minmax(0, 1.6fr) minmax(190px, .8fr) 130px; align-items: center; gap: 15px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.case-order { color: #a0aab4; font-family: "SFMono-Regular", monospace; font-size: 10px; }.case-main h3 { margin: 4px 0; font-size: 13px; }.case-main > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 10px; }.case-id { color: var(--blue-700); font-family: "SFMono-Regular", monospace; font-size: 8px; font-weight: 720; text-transform: uppercase; letter-spacing: .6px; }.case-tags { display: flex; gap: 4px; margin-top: 7px; }
.case-policy > p { margin: 5px 0 4px; color: #929da7; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }.case-policy > strong { font-size: 12px; }.case-patient small { display: block; color: #929da7; font-size: 8px; text-transform: uppercase; }.case-patient strong { color: #40576a; font-size: 9px; font-family: "SFMono-Regular", monospace; }
.policy-chip { display: inline-block; margin: 2px 2px 2px 0; padding: 3px 6px; border-radius: 4px; font-family: "SFMono-Regular", monospace; font-size: 8px; }.policy-chip.expected { color: #28634c; background: var(--green-soft); }.policy-chip.forbidden { color: #9b3447; background: var(--red-soft); }
.grader-callout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 23px; }.judge-orb { display: grid; width: 53px; height: 53px; place-items: center; color: white; background: linear-gradient(145deg, #866ac2, #5d4691); border-radius: 15px; font-family: Georgia, serif; font-size: 22px; box-shadow: 0 7px 18px rgba(116,86,183,.2); }.grader-callout h2 { margin: 1px 0 5px; font-size: 19px; }.grader-callout p:not(.panel-kicker) { max-width: 730px; margin: 0; color: var(--muted); font-size: 11px; }
.grader-state { display: grid; grid-template-columns: 8px 1fr; gap: 3px 8px; min-width: 205px; padding: 11px; color: #7e5e32; background: var(--amber-soft); border: 1px solid #ecd9b5; border-radius: 8px; }.grader-state > span { grid-row: 1 / 3; width: 7px; height: 7px; margin-top: 4px; background: #ce8a32; border-radius: 50%; }.grader-state strong { font-size: 10px; }.grader-state small { color: #927a59; font-size: 8px; }.grader-state.ready { color: #28684e; background: var(--green-soft); border-color: #cfe7dc; }.grader-state.ready > span { background: var(--green); }.grader-state.ready small { color: #658979; }
.grader-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }.grader-card { min-height: 290px; padding: 20px; }.grader-card-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 21px; border-radius: 9px; font-size: 15px; }.rules-icon { color: var(--green); background: var(--green-soft); }.judge-icon-large { color: var(--violet); background: var(--violet-soft); }.grader-card h2 { margin: 3px 0 8px; font-size: 16px; }.grader-card > p:not(.panel-kicker) { color: var(--muted); font-size: 11px; }.grader-card > code { display: inline-block; margin-bottom: 4px; padding: 3px 6px; color: #644a95; background: var(--violet-soft); border-radius: 4px; font-size: 9px; }.grader-card ul { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft); color: #5f7181; list-style: none; font-size: 10px; }.grader-card li { margin: 7px 0; }.grader-card li::before { margin-right: 8px; color: var(--green); content: "✓"; }.grader-card-foot { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: #71808e; font-size: 9px; }.muted-card { opacity: .72; }

/* Experiment detail */
.detail-header, .inspector-header { margin: -30px -30px 20px; padding: 22px 30px 0; background: white; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #8a96a1; font-size: 9px; }.breadcrumb a { color: #58748b; }.breadcrumb a:hover { text-decoration: underline; }.breadcrumb span:not(:last-child) { color: #b8c0c7; }
.detail-title-row, .inspector-title-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; }.detail-title-row p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }.title-with-status { display: flex; align-items: center; gap: 10px; }.title-with-status h1 { margin: 0 0 5px; font-size: 27px; }
.metadata-strip { display: flex; overflow-x: auto; margin-top: 3px; border-top: 1px solid var(--line-soft); }.metadata-strip > span { min-width: 130px; padding: 11px 24px 11px 0; margin-right: 24px; border-right: 1px solid var(--line-soft); }.metadata-strip > span:last-child { border: 0; }.metadata-strip small { display: block; margin-bottom: 2px; color: #929ca6; font-size: 8px; text-transform: uppercase; letter-spacing: .55px; }.metadata-strip strong { color: #405568; font-size: 9px; font-weight: 640; white-space: nowrap; }
.detail-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }.detail-metrics .metric-card { min-height: 108px; }.detail-metrics .metric-value { font-size: 24px; }.detail-metrics .metric-card::before { display: none; }
.run-progress { display: grid; grid-template-columns: auto minmax(200px, 1fr) 35px; align-items: center; gap: 18px; margin-bottom: 14px; padding: 13px 16px; }.run-progress > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 190px; }.run-progress strong { display: block; font-size: 10px; }.run-progress p { margin: 1px 0; color: var(--muted); font-size: 9px; }.spinner { display: block; width: 20px; height: 20px; border: 2px solid #d8e3ec; border-top-color: var(--blue-600); border-radius: 50%; animation: spin .9s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }.progress-wide { height: 5px; overflow: hidden; background: #e9eef2; border-radius: 6px; }.progress-wide span { display: block; height: 100%; background: var(--blue-600); transition: width .3s; }.run-progress > small { color: #5d7284; font-weight: 700; }
.matrix-panel { overflow: hidden; margin-top: 4px; }.legend { display: flex; flex-wrap: wrap; gap: 7px 12px; color: #768492; font-size: 9px; }.legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }.legend i { width: 7px; height: 7px; border-radius: 2px; }.legend i.cell-autofail { display: inline-grid; width: 19px; height: 15px; place-items: center; color: white; background: var(--red); border: 1px solid #ab3045; border-radius: 4px; font-size: 8px; font-style: normal; font-weight: 800; line-height: 1; }.cell-pass { background: var(--green); }.cell-fail { background: var(--red); }.cell-error { background: var(--amber); }.cell-wait { background: #c7d0d7; }
.matrix-wrap { isolation: isolate; overflow-x: auto; padding: 0 20px 20px; }.matrix-head, .matrix-row { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(var(--attempts, 5), 38px) 72px; align-items: center; gap: 7px; min-width: max-content; }.matrix-head { padding: 8px 0; color: #8995a0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: 8px; text-align: center; text-transform: uppercase; letter-spacing: .5px; }.matrix-head > span { text-align: left; }.matrix-row { min-height: 58px; border-bottom: 1px solid var(--line-soft); }.matrix-case { min-width: 0; }.matrix-case strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.matrix-case small { color: #8d98a3; font-size: 8px; }.matrix-cell { position: relative; display: grid; width: 29px; height: 29px; place-items: center; color: #778796; background: #f0f3f5; border: 1px solid #e2e7eb; border-radius: 6px; font-size: 11px; font-weight: 750; transition: .14s; }.matrix-cell:hover { transform: scale(1.08); }.matrix-cell.cell-passed { color: var(--green); background: var(--green-soft); border-color: #cae8da; }.matrix-cell.cell-failed { color: var(--red); background: var(--red-soft); border-color: #f0ccd3; }.matrix-cell.cell-error { color: var(--amber); background: var(--amber-soft); border-color: #ecd9b3; }.matrix-cell.cell-running, .matrix-cell.cell-grading { color: var(--blue-600); background: var(--blue-100); border-color: #d1e5f2; }.matrix-cell.cell-queued { color: var(--violet); background: var(--violet-soft); }.matrix-cell.cell-empty { color: #b3bec7; background: #fafbfc; }.matrix-cell-auto-fail { box-shadow: inset 0 0 0 1px rgba(195,63,85,.16); }.auto-fail-marker { position: absolute; top: -8px; right: -9px; display: grid; width: 19px; height: 15px; place-items: center; color: white; background: var(--red); border: 1px solid white; border-radius: 4px; box-shadow: 0 1px 2px rgba(16,36,58,.18); font-size: 8px; font-weight: 800; line-height: 1; }.matrix-score { color: #314a5f; font-size: 11px; text-align: right; }
.trace-badge { display: inline-block; padding: 3px 6px; color: #496377; background: #edf3f6; border-radius: 4px; font-size: 8px; }.trace-partial { color: #946622; background: var(--amber-soft); }.trace-replay { color: #6c519a; background: var(--violet-soft); }

/* Inspector */
.inspector-main { width: 100%; max-width: none; padding-bottom: 0; }.inspector-header { margin-bottom: 0; }.inspector-title-row { margin-bottom: 12px; }.inspector-title-row h1 { font-size: 21px; letter-spacing: -.5px; }.run-stepper { display: flex; align-items: center; gap: 8px; color: #788693; font-size: 9px; }.inspector-meta { margin-top: 0; }.inspector-meta > span { padding-top: 9px; padding-bottom: 9px; }
.inspector-grid { display: grid; grid-template-columns: 218px minmax(430px, 1fr) var(--grade-pane-width, 330px); min-height: calc(100vh - 196px); margin: 0 -30px -0px; background: white; }
.grade-resizer { position: absolute; top: 0; left: -4px; z-index: 10; width: 8px; height: 100%; background: transparent; cursor: col-resize; transition: background .15s ease; touch-action: none; }
.grade-resizer:hover, .grade-resizer.is-active { background: rgba(37, 99, 235, .18); }
.grade-resizer:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -2px; }
.run-navigator, .grade-pane { min-width: 0; background: #fafbfc; border-right: 1px solid var(--line); }.grade-pane { background: white; border-right: 0; border-left: 1px solid var(--line); }.pane-heading { display: flex; align-items: center; justify-content: space-between; min-height: 59px; padding: 12px 15px; border-bottom: 1px solid var(--line); }.pane-heading h2 { overflow: hidden; max-width: 175px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.pane-heading > a { color: var(--blue-700); }.navigator-summary { display: flex; gap: 10px; padding: 9px 15px; color: #84919d; background: #f5f7f9; border-bottom: 1px solid var(--line-soft); font-size: 8px; }.run-nav-list { max-height: calc(100vh - 290px); overflow-y: auto; padding: 8px; }.run-nav-list > p { overflow: hidden; margin: 12px 8px 5px; color: #8996a2; font-size: 8px; font-weight: 700; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }.run-nav-list a { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; min-height: 31px; padding: 0 8px; color: #607181; border-radius: 5px; font-size: 9px; }.run-nav-list a:hover { background: #eef2f5; }.run-nav-list a.active { color: #244761; background: #e5eff6; font-weight: 700; }.run-nav-list small { color: #8b97a2; font-size: 8px; }.run-dot { width: 6px; height: 6px; background: #9ba7b1; border-radius: 50%; }.dot-passed { background: var(--green); }.dot-failed, .dot-error { background: var(--red); }.dot-running, .dot-grading { background: var(--blue-600); }.dot-queued { background: var(--violet); }
.transcript-pane { min-width: 0; background: #fff; }.sticky-pane-heading { position: sticky; top: 55px; z-index: 9; padding: 11px 20px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }.trace-controls { display: flex; align-items: center; gap: 7px; color: #8a96a1; font-size: 8px; }
.trace-warning { display: flex; gap: 9px; margin: 14px 30px 0; padding: 10px; color: #805f31; background: var(--amber-soft); border: 1px solid #eddbb8; border-radius: 7px; }.trace-warning > span { display: grid; flex: 0 0 21px; height: 21px; place-items: center; background: white; border-radius: 50%; font-weight: 800; }.trace-warning p { margin: 0; font-size: 9px; }.trace-warning strong { display: block; }
.timeline { width: min(780px, 100%); margin: 0 auto; padding: 22px 28px 60px; }.trace-event { display: grid; grid-template-columns: 39px minmax(0, 1fr); }.event-rail { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; }.event-rail > i { position: absolute; top: 29px; bottom: 0; width: 1px; background: #e4e9ed; }.trace-event:last-child .event-rail > i { display: none; }.event-number { position: relative; z-index: 1; display: grid; width: 24px; height: 24px; place-items: center; color: #8b98a4; background: white; border: 1px solid #dce3e8; border-radius: 50%; font-family: "SFMono-Regular", monospace; font-size: 7px; }
.event-actions { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: white; }
.event-action { display: grid; width: 20px; height: 20px; place-items: center; padding: 0; color: #ccd3da; background: transparent; border: 0; border-radius: 5px; cursor: pointer; transition: color .12s ease, background .12s ease; }
.event-action:hover { color: #5f6b78; background: rgba(15,23,42,.05); }
.event-action:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 1px; }
.event-action svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.event-action[data-event-action="flag"].is-active, .event-action[data-event-action="flag"].is-active:hover { color: #dc2626; background: #fdecec; }
.event-action[data-event-action="comment"].is-active, .event-action[data-event-action="comment"].is-active:hover { color: #2563eb; background: #e7effd; }
.event-action[data-event-action="star"].is-active, .event-action[data-event-action="star"].is-active:hover { color: #d69113; background: #fdf3dd; }
.event-comment { margin-top: 10px; padding: 10px; background: #fbfcfd; border: 1px solid #dfe6ec; border-radius: 7px; }
.event-comment textarea { display: block; width: 100%; min-height: 60px; padding: 8px; color: #2d4356; background: white; border: 1px solid #dae1e7; border-radius: 5px; font: inherit; font-size: 12px; resize: vertical; }
.event-comment-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.event-body { min-width: 0; padding: 0 0 25px 9px; }.event-heading { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 8px; }.event-heading > div { min-width: 0; }.event-heading strong { display: block; color: #2d4356; font-size: 10px; }.event-heading small { display: block; overflow: hidden; max-width: 300px; color: #95a0aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.actor-icon { display: grid; flex: 0 0 24px; height: 24px; place-items: center; color: #46667f; background: #eaf1f6; border-radius: 6px; font-size: 8px; font-weight: 800; }.user-icon { color: #704e9e; background: var(--violet-soft); }.agent-icon { color: #2c658d; background: var(--blue-100); }.tool-icon { color: #936021; background: var(--amber-soft); }.result-icon { color: #2a6c51; background: var(--green-soft); }.judge-icon { color: #69489c; background: var(--violet-soft); }
.event-tag { margin-left: auto; padding: 2px 6px; color: #5c7283; background: #eff3f6; border-radius: 4px; font-size: 7px; font-weight: 700; text-transform: uppercase; }.event-tag.result-error { color: var(--red); background: var(--red-soft); }
.message-card { padding: 13px 14px; color: #334b5e; background: #f7f9fa; border: 1px solid #e4e9ed; border-radius: 3px 9px 9px 9px; font-size: 12px; line-height: 1.62; }.user-message { background: #faf8fd; border-color: #e5def2; }.assistant-message { background: #f6f9fb; border-color: #dce7ef; }
.tool-card { overflow: hidden; background: #fbfcfd; border: 1px solid #dee5ea; border-radius: 7px; }.tool-card summary { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 11px; cursor: pointer; list-style: none; }.tool-card summary::-webkit-details-marker { display: none; }.tool-name { display: flex; align-items: center; gap: 7px; color: #314b60; font: 600 10px "SFMono-Regular", monospace; }.tool-name i { width: 6px; height: 6px; background: #d28b35; border-radius: 50%; }.tool-meta { color: #8c98a3; font-size: 8px; }.tool-meta b { margin-left: 5px; font-size: 11px; }.tool-card[open] .tool-meta b { display: inline-block; transform: rotate(180deg); }.result-card .tool-name i { background: var(--green); }
.code-block { position: relative; overflow: hidden; background: #172a3a; border-top: 1px solid #dce3e8; }.code-block pre { max-height: 310px; overflow: auto; margin: 0; padding: 14px 48px 14px 14px; color: #d8e6ef; font-size: 9px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }.result-output { background: #f4f7f8; }.result-output pre { color: #405669; }.copy-button { position: absolute; top: 7px; right: 7px; z-index: 2; padding: 3px 6px; color: #afc1cd; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; cursor: pointer; font-size: 7px; }.result-output .copy-button, .raw-code .copy-button { color: #71818f; background: white; border-color: #dae1e6; }.tool-rationale { display: grid; grid-template-columns: 76px 1fr; gap: 7px; padding: 9px 11px; color: #655180; background: #f7f4fc; border-top: 1px solid #e5ddf2; }.tool-rationale span { font-size: 7px; font-weight: 750; text-transform: uppercase; letter-spacing: .5px; }.tool-rationale p { margin: 0; font-size: 8px; }.tool-verdict { margin-left: auto; padding: 2px 6px; border-radius: 4px; font-size: 7px; font-weight: 750; text-transform: uppercase; }.verdict-correct { color: var(--green); background: var(--green-soft); }.verdict-incorrect { color: var(--red); background: var(--red-soft); }.verdict-unnecessary, .verdict-unassessed { color: var(--amber); background: var(--amber-soft); }

.grade-pane { max-height: calc(100vh - 196px); overflow: hidden; display: flex; flex-direction: column; }
.grade-pane-body { flex: 1; min-height: 0; overflow-y: auto; }
.grade-hero { display: flex; align-items: center; gap: 13px; min-height: 98px; padding: 15px; background: #f8fafb; border-bottom: 1px solid var(--line); }.grade-hero h2 { margin: 1px 0; font-size: 16px; }.grade-hero > div:last-child > span { color: #8c98a3; font-size: 8px; }.grade-score-ring { display: grid; grid-template-columns: 1fr; place-items: center; align-content: center; width: 59px; height: 59px; color: var(--green); background: radial-gradient(circle at center, #fff 59%, transparent 61%), conic-gradient(var(--green) var(--score), #dfe7e3 0); border-radius: 50%; }.grade-score-ring span { font-size: 15px; font-weight: 760; line-height: 1; }.grade-score-ring small { font-size: 7px; }.grade-failed .grade-score-ring, .grade-error .grade-score-ring { color: var(--red); background: radial-gradient(circle at center, #fff 59%, transparent 61%), conic-gradient(var(--red) var(--score), #eee0e2 0); }
.tab-list { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); background: white; border-bottom: 1px solid var(--line); }.tab-list button { height: 37px; color: #7c8995; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 9px; font-weight: 670; }.tab-list button.active { color: var(--blue-700); border-bottom-color: var(--blue-600); }.tab-panel { display: none; }.tab-panel.active { display: block; }
.judge-summary { padding: 15px; border-bottom: 1px solid var(--line-soft); }.section-mini-heading { display: flex; align-items: center; gap: 8px; }.section-mini-heading strong { display: block; font-size: 9px; }.section-mini-heading small { display: block; color: #8e9aa5; font-size: 8px; }.judge-summary > p { margin: 11px 0 0; color: #526779; font-size: 10px; line-height: 1.55; }.inline-warning { margin-top: 10px; padding: 8px; color: #8b632e; background: var(--amber-soft); border-radius: 5px; font-size: 8px; }
.grade-section { padding: 15px; border-bottom: 1px solid var(--line-soft); }.grade-section h3 { margin: 0 0 11px; color: #405466; font-size: 9px; text-transform: uppercase; letter-spacing: .6px; }.dimension-list > div { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin: 10px 0; color: #617180; font-size: 8px; }.dimension-list strong { color: #334b5f; }.dimension-list > div > div { grid-column: 1 / -1; height: 3px; overflow: hidden; background: #edf0f3; border-radius: 3px; }.dimension-list i { display: block; height: 100%; background: var(--violet); border-radius: 3px; }
.criteria-list details { border-top: 1px solid var(--line-soft); }.criteria-list details:first-child { border-top: 0; }.criteria-list summary { display: grid; grid-template-columns: 18px 1fr auto; align-items: start; gap: 7px; padding: 8px 0; cursor: pointer; list-style: none; }.criteria-list summary::-webkit-details-marker { display: none; }.criteria-list summary strong { padding-top: 2px; color: #526575; font-size: 8px; line-height: 1.4; }.criteria-list summary b { color: #98a3ad; }.criteria-list details[open] summary b { transform: rotate(180deg); }.criteria-list details > p { margin: -2px 0 9px 25px; color: #7b8894; font-size: 8px; }.criterion-icon { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; font-size: 7px; font-weight: 800; }.criterion-pass { color: var(--green); background: var(--green-soft); }.criterion-fail { color: var(--red); background: var(--red-soft); }.compact-criteria > div { display: flex; align-items: center; gap: 7px; margin: 7px 0; }.compact-criteria p { margin: 0; color: #617181; font-size: 8px; }
.reference-box { padding: 10px; color: #506577; background: #f7f9fa; border: 1px solid #e5eaee; border-radius: 6px; font-size: 9px; line-height: 1.55; }.tool-policy > p { margin: 12px 0 5px; color: #8c98a3; font-size: 8px; font-weight: 700; text-transform: uppercase; }.tool-policy small { color: #8d99a3; }.raw-code { border: 1px solid #dce3e8; border-radius: 6px; }.raw-code pre { color: #425a6e; background: #f5f7f9; }.raw-metadata { margin: 0; }.raw-metadata > div { display: grid; grid-template-columns: 90px 1fr; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 8px; }.raw-metadata dt { color: #8a96a1; }.raw-metadata dd { overflow-wrap: anywhere; margin: 0; color: #465b6e; }

/* Physician annotations workbench */
.annotation-page { background: #f7fafc; }
.clinical-workspace-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 650px; border: 1px solid #dfe5eb; border-radius: 12px; background: white; }
.annotation-workbench.annotation-with-imaging { grid-template-columns: 170px minmax(0, 1fr) 280px; }
.annotation-with-imaging .annotation-center { min-width: 0; }
.annotation-viewer { height: max(520px, 65vh); background: #070d19; }
.annotation-viewer iframe { display: block; width: 100%; height: 100%; border: 0; }
.imaging-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.imaging-toolbar > div { display: flex; gap: 8px; }
.imaging-help { margin: 0; padding: 10px 14px; color: #536b7c; font-size: 12px; }
.annotation-with-imaging .annotation-center-body { max-height: 32vh; }
.annotation-with-imaging .annotation-content-box { min-height: 120px; }
.annotation-main { width: min(1760px, 100%); padding-top: 20px; }
.annotation-header h1 { margin: 2px 0 6px; color: #132333; font-size: 32px; }
.annotation-header { margin-bottom: 14px; }
.annotation-workbench {
  display: grid;
  grid-template-columns: 320px minmax(620px, 1fr) 420px;
  gap: 14px;
  min-height: calc(100vh - 170px);
}
.annotation-workbench .panel {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe5eb;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.annotation-panel-head {
  padding: 12px 14px;
  color: #38566f;
  background: linear-gradient(180deg, #f5f9fd 0%, #edf4fa 100%);
  border-bottom: 1px solid #d5e0ea;
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.annotation-turn-list { max-height: calc(100vh - 260px); overflow: auto; padding: 8px; }
.annotation-turn {
  width: 100%;
  margin-bottom: 7px;
  padding: 11px;
  color: #30485d;
  background: #fbfcfd;
  border: 1px solid #e2e8ee;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  transition: .15s ease;
}
.annotation-turn:hover { border-color: #bfd2e2; background: #f6fafe; }
.annotation-turn.active { background: #eef6fc; border-color: #8db6d6; }
.annotation-turn-kind {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--blue-700);
  font: 700 10px "SFMono-Regular", monospace;
  text-transform: uppercase;
}
.annotation-turn-preview {
  display: block;
  overflow: hidden;
  color: #5f7386;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.annotation-center-body { max-height: calc(100vh - 260px); overflow: auto; padding: 14px; }
.annotation-event { display: none; }
.annotation-event.active { display: block; }
.annotation-event-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #6f8090; font-size: 11px; }
.annotation-chip {
  padding: 2px 7px;
  color: #ffffff;
  background: var(--blue-700);
  border-radius: 10px;
  font: 700 9px "SFMono-Regular", monospace;
  text-transform: uppercase;
}
.annotation-content-box {
  min-height: 600px;
  padding: 18px;
  color: #21384b;
  background: #f8fbfe;
  border: 1px solid #d6e2ec;
  border-radius: 10px;
  line-height: 1.55;
  font-size: 13px;
}
.annotation-content-box pre {
  margin: 0;
  color: #22384b;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.65 "SFMono-Regular", monospace;
}
.annotation-controls-body { max-height: calc(100vh - 260px); overflow: auto; padding: 14px; color: #324d63; }
.annotation-block {
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fbfe;
  border: 1px solid #dbe6ef;
  border-radius: 9px;
}
.annotation-field-label {
  display: block;
  margin: 0 0 7px;
  color: #5f7386;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.annotation-help {
  margin: 0 0 9px;
  color: #708497;
  font-size: 11px;
  line-height: 1.45;
}
.annotation-subheading {
  margin: 9px 0 6px;
  color: #4f6579;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .45px;
}
.annotation-selected-turn {
  padding: 9px 10px;
  color: #2f4a60;
  background: #ffffff;
  border: 1px solid #d6e1ea;
  border-radius: 8px;
}
.annotation-toggle-row { display: flex; gap: 7px; }
.annotation-toggle {
  flex: 1;
  min-height: 37px;
  color: #425b71;
  background: #ffffff;
  border: 1px solid #d1dce6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.annotation-toggle.active { color: #ffffff; background: var(--blue-700); border-color: var(--blue-700); }
.annotation-checklist { display: grid; gap: 6px; }
.annotation-checklist label { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.annotation-checklist input[type="checkbox"] { accent-color: var(--blue-700); }
.annotation-controls textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px;
  color: #22384b;
  background: #ffffff;
  border: 1px solid #d5e0ea;
  border-radius: 8px;
  resize: vertical;
  font-size: 11px;
}
.annotation-controls textarea:focus {
  outline: 0;
  border-color: #8db6d6;
  box-shadow: 0 0 0 3px rgba(57, 121, 173, .1);
}
.annotation-save {
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
}

/* Transcript inspector: compact, but readable and continuously auditable. */
.mobile-verdict-link { display: none; }
.run-navigator, .grade-pane { position: sticky; top: 55px; align-self: start; height: calc(100vh - 55px); }
.run-navigator { overflow: hidden; }.run-nav-list { height: calc(100% - 94px); max-height: none; }
.grade-pane { max-height: calc(100vh - 55px); scroll-margin-top: 66px; }
.inspector-header .breadcrumb, .run-stepper, .inspector-main .status-badge { font-size: 10px; }
.inspector-meta small, .navigator-summary, .run-nav-list > p, .run-nav-list small, .trace-controls, .event-number, .event-heading small, .actor-icon, .event-tag, .tool-meta, .copy-button, .tool-rationale span, .tool-verdict, .grade-hero > div:last-child > span, .grade-score-ring small, .section-mini-heading small, .inline-warning, .grade-section h3, .dimension-list > div, .criteria-list summary strong, .criteria-list details > p, .compact-criteria p, .tool-policy > p, .raw-metadata > div { font-size: 10px; }
.inspector-meta strong, .pane-heading h2, .run-nav-list a, .trace-warning p, .event-heading strong, .tool-name, .tool-rationale p, .tab-list button, .section-mini-heading strong, .judge-summary > p, .reference-box, .tool-policy small, .grade-pane .policy-chip { font-size: 11px; }
.message-card { font-size: 13px; }.code-block pre { font-size: 11px; }.criterion-icon { width: 19px; height: 19px; font-size: 10px; }.grade-pane .panel-kicker { font-size: 10px; }
.button-tiny { font-size: 10px; }
.tab-list button:focus-visible { outline: 2px solid var(--blue-600); outline-offset: -3px; }
.tab-panel[hidden] { display: none; }

@media (max-width: 1250px) {
  .detail-metrics { grid-template-columns: repeat(3, 1fr); }
  .inspector-grid { grid-template-columns: 190px minmax(410px, 1fr) var(--grade-pane-width, 300px); }
  .case-row { grid-template-columns: 30px minmax(0, 1fr) 190px; }.case-patient { display: none; }
}
@media (max-width: 1040px) {
  .annotation-workbench.annotation-with-imaging { grid-template-columns: 150px minmax(0, 1fr); }
  :root { --sidebar-width: 196px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .suite-grid, .grader-grid { grid-template-columns: repeat(2, 1fr); }
  .inspector-grid { grid-template-columns: minmax(430px, 1fr) var(--grade-pane-width, 310px); }.run-navigator { display: none; }
  .annotation-workbench { grid-template-columns: 240px minmax(0, 1fr); }
  .annotation-controls { grid-column: 1 / -1; }
  .annotation-content-box { min-height: 360px; }
  .search-shortcut { display: none; }
}
@media (max-width: 800px) {
  .annotation-workbench.annotation-with-imaging { grid-template-columns: 1fr; }
  .annotation-with-imaging .annotation-turn-list { max-height: 180px; }
  :root { --sidebar-width: 224px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(16,36,58,.2); }.sidebar.open { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 45; display: block; padding: 0; background: rgba(10,25,39,.38); border: 0; cursor: pointer; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; visibility: visible; }
  .workspace { width: 100%; margin-left: 0; }.mobile-menu { display: inline-grid !important; }.topbar-context { display: none; }.topbar { padding: 0 15px; }
  .main-content { padding: 23px 16px 40px; }.page-header { align-items: flex-start; flex-direction: column; gap: 15px; }.header-actions { width: 100%; flex-wrap: wrap; }
  .dashboard-grid { grid-template-columns: 1fr; }.case-reliability-grid { grid-template-columns: 1fr; }.editor-layout { grid-template-columns: 1fr; }.editor-summary { position: static; }.form-grid.three-col { grid-template-columns: 1fr; }
  .annotation-main { padding-top: 16px; }
  .annotation-workbench { grid-template-columns: 1fr; min-height: auto; }
  .annotation-turn-list, .annotation-center-body, .annotation-controls-body { max-height: none; }
  .annotation-content-box { min-height: 280px; }
  .detail-header, .inspector-header { margin: -23px -16px 16px; padding: 17px 16px 0; }.detail-title-row, .inspector-title-row { align-items: flex-start; flex-direction: column; }.detail-title-row .header-actions { margin-bottom: 15px; }
  .matrix-panel .panel-header { align-items: flex-start; flex-direction: column; }.matrix-panel .legend { width: 100%; }
  .matrix-wrap { padding: 0 12px 18px; scroll-padding-left: 188px; }.matrix-head, .matrix-row { grid-template-columns: 180px repeat(var(--attempts, 5), 38px) 64px; }.matrix-head { position: sticky; top: 55px; z-index: 5; background: white; }.matrix-head > span, .matrix-case { position: sticky; left: 0; z-index: 3; padding-right: 10px; background: white; box-shadow: 9px 0 10px -11px rgba(16,36,58,.65); }.matrix-head > span { z-index: 6; align-self: stretch; display: flex; align-items: center; }
  .mobile-verdict-link { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; padding: 11px 13px; color: #38566f; background: white; border: 1px solid var(--line); border-left: 3px solid var(--blue-600); border-radius: 8px; box-shadow: var(--shadow); }.mobile-verdict-link.grade-passed { border-left-color: var(--green); }.mobile-verdict-link.grade-failed, .mobile-verdict-link.grade-error { border-left-color: var(--red); }.mobile-verdict-link > span:first-child { display: grid; }.mobile-verdict-link small { color: #85929e; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }.mobile-verdict-link strong { font-size: 12px; }.mobile-verdict-score { margin-left: auto; font-size: 12px; font-weight: 750; }
  .inspector-grid { grid-template-columns: 1fr; margin: 0 -16px; }.run-navigator, .grade-pane { position: static; height: auto; max-height: none; }.grade-pane { border-top: 1px solid var(--line); border-left: 0; }.grade-resizer { display: none; }.transcript-pane { min-height: 500px; }.timeline { padding: 20px 14px 40px; }.sticky-pane-heading { top: 55px; }
  .grader-callout { grid-template-columns: auto 1fr; }.grader-state { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .metric-grid, .detail-metrics, .suite-grid, .grader-grid { grid-template-columns: 1fr; }.metric-card { min-height: 112px; }
  .form-grid.two-col { grid-template-columns: 1fr; }.span-2 { grid-column: auto; }.form-section { padding: 16px; }.toolbar { align-items: stretch; flex-direction: column; }.filter-form { align-items: stretch; flex-direction: column; }.search-field { width: 100%; }.filter-select { width: 100%; }
  .topbar-actions { gap: 7px; }.topbar-actions .button { padding: 0 9px; font-size: 10px; white-space: nowrap; }.topbar-actions .button span { font-size: 13px; }.page-header h1 { font-size: 27px; }.dashboard-header h1 { font-size: 31px; }
  .case-row { grid-template-columns: 25px 1fr; }.case-policy { display: none; }.grader-callout { grid-template-columns: 1fr; }.judge-orb { width: 43px; height: 43px; }
  .metadata-strip > span { min-width: 120px; }.inspector-meta > span { min-width: 105px; }.run-stepper { width: 100%; justify-content: space-between; }
}

/* --------------------------------------------------- expert transcript audit */
.audit-panel { margin-top: .6rem; padding: .55rem .7rem; border: 1px dashed #d8d8d2;
  border-radius: 8px; background: #fcfcfb; }
.audit-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.audit-question { font-size: 12.5px; color: #6b6b66; }
.audit-tally b { font-size: 12px; margin-left: .4rem; font-weight: 600; }
.tally-up { color: #1a7f4b; } .tally-down { color: #b4341f; } .tally-note { color: #6b6b66; }
.audit-actions { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; flex-wrap: wrap; }
.audit-btn { font: inherit; font-size: 12.5px; padding: .18rem .55rem; border-radius: 999px;
  border: 1px solid #ddddd7; background: #fff; color: #43433f; cursor: pointer; }
.audit-btn:hover { border-color: #b9b9b1; }
.audit-btn.up.active { background: #eaf6ef; border-color: #1a7f4b; color: #1a7f4b; }
.audit-btn.down.active { background: #fdeeeb; border-color: #b4341f; color: #b4341f; }
.audit-btn.note.active { background: #f1f1ee; border-color: #8a8a83; }
.audit-state { font-size: 12px; color: #6b6b66; margin-left: auto; }
.audit-state.audit-error { color: #b4341f; }
.audit-comment { margin-top: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.audit-comment textarea { width: 100%; font: inherit; font-size: 13px; padding: .4rem .5rem;
  border: 1px solid #ddddd7; border-radius: 6px; resize: vertical; }
.audit-who { display: flex; gap: .4rem; flex-wrap: wrap; }
.audit-who input { font: inherit; font-size: 12.5px; padding: .3rem .45rem; border: 1px solid #ddddd7;
  border-radius: 6px; flex: 1 1 9rem; min-width: 7rem; }
.audit-save { font: inherit; font-size: 12.5px; padding: .3rem .8rem; border-radius: 6px;
  border: 1px solid #2f5fd0; background: #2f5fd0; color: #fff; cursor: pointer; }
.audit-others { margin-top: .5rem; font-size: 12.5px; color: #43433f; }
.audit-others summary { cursor: pointer; color: #6b6b66; }
.audit-others p { margin: .35rem 0; }
.audit-others .verdict-up { color: #1a7f4b; } .audit-others .verdict-down { color: #b4341f; }

.flagged-banner { margin: 0 0 .75rem; padding: .5rem .7rem; border-radius: 8px;
  background: #fdeeeb; border: 1px solid #f0c4bb; color: #7d2415; font-size: 13px; }
.flagged-banner a { color: #b4341f; font-weight: 600; }

/* Sign-in page. Standalone rather than inside .app-shell, so it centres on the
   viewport instead of sitting beside a sidebar that is not rendered. */
.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #f6f7f8; }
.auth-card { width: 100%; max-width: 348px; padding: 30px 30px 32px; }
.auth-logo { display: block; height: 19px; width: auto; margin-bottom: 22px; filter: brightness(0); opacity: .92; }
.auth-card h1 { margin: 0 0 5px; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.auth-lede { margin: 0 0 22px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-form { display: grid; gap: 15px; }
.auth-form .button-block { margin-top: 3px; }

/* Signed-in identity in the sidebar footer, pinned below the nav. The nav is
   allowed to scroll so a short viewport cannot push sign-out off the bottom;
   it has no effect at heights where the links already fit. */
.sidebar .primary-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sidebar-account { flex: 0 0 auto; margin-top: auto; padding: 12px 14px 16px; border-top: 1px solid rgba(15,23,42,.06); }
.sidebar-account-name { display: block; overflow: hidden; margin-bottom: 7px; color: #46505f; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-name span { display: block; color: #97a1ab; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-signout { width: 100%; }

/* Approve/decline sit in one table cell and should not stack. */
.request-actions { display: flex; gap: 6px; justify-content: flex-end; }
.stacked-panel { margin-top: 18px; }
/* Sign-in and request-access link to each other. */
.auth-alt { margin: 16px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.auth-alt a { color: var(--blue-700); font-weight: 650; }

/* Admin view of one person's annotation work. Each study is a block rather
   than a table row because a report carries a narrative and a nested table. */
.work-entry { padding: 15px 18px 17px; border-top: 1px solid var(--line-soft); }
.work-entry:first-of-type { border-top: 0; }
.work-entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.work-entry-head small { display: block; margin-top: 3px; color: #8a949f; font-size: 10px; font-weight: 500; }
.work-narrative { margin: 0 0 12px; padding: 10px 12px; color: #33475a; background: #f7f9fa; border-left: 2px solid var(--line); border-radius: 0 6px 6px 0; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.work-entry-foot { margin: 10px 0 0; font-size: 10px; }

/* Save state for viewer reports, above the embedded workspace. Hidden until
   the viewer first reports in, so pages that annotate nothing stay quiet. */
.workspace-bar { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.workspace-bar[hidden] { display: none; }
.workspace-save { color: #23674a; font-size: 10px; font-weight: 680; }
.workspace-save.is-error { color: #a42f45; }

/* Assigning a study. Wraps rather than scrolls, because the person list and
   the note both need to stay readable at narrow widths. */
.assign-form { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); }
.assign-label { margin: 0 0 8px; color: #5e6f7f; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; }
.assign-form select { min-width: 190px; padding: 6px 8px; color: #243242; background: white; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 11px; }
.assign-form select[multiple] { padding: 4px; }
.assign-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px; margin: 0 0 11px; padding: 0; list-style: none; }
.assign-person { display: flex; align-items: baseline; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.assign-person:hover { border-color: #9fb3c6; background: #f7fafc; }
.assign-person input { margin: 0; accent-color: var(--accent); }
.assign-person-name { color: #243242; font-size: 11.5px; font-weight: 600; }
/* Pushed right so the names stay in a readable column however long the
   workload text runs. */
.assign-person-load { margin-left: auto; color: #7c8b99; font-size: 10.5px; }
.assign-person.is-assigned { background: #f3f6f9; border-style: dashed; cursor: default; }
.assign-person.is-assigned .assign-person-name { color: #7c8b99; }
.assign-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.assign-form input[type=text] { flex: 1 1 200px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 11px; }
