:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5d6b78;
  --line: #d9e0e6;
  --soft: #f4f6f8;
  --panel: #ffffff;
  --nav: #172a3a;
  --blue: #1769aa;
  --blue-soft: #e8f2fb;
  --green: #1f7a55;
  --green-soft: #e8f5ef;
  --red: #b33a3a;
  --red-soft: #fbecec;
  --amber: #986500;
  --amber-soft: #fff4d6;
  --shadow: 0 2px 10px rgba(23, 33, 43, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { background: var(--soft); color: var(--ink); }
body { margin: 0; min-height: 100vh; font-size: 14px; letter-spacing: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 238px; background: var(--nav); color: #f4f7f9;
  display: flex; flex-direction: column; padding: 22px 16px; z-index: 5;
}
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; padding: 0 5px 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; margin-top: 3px; color: #afbcc7; font-size: 11px; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; background: #ffcf33; color: #17212b; border-radius: 6px; font-weight: 800; flex: 0 0 auto; }
.primary-nav { display: grid; gap: 5px; margin-top: 20px; }
.primary-nav a { text-decoration: none; padding: 10px 12px; border-radius: 5px; color: #c7d0d8; }
.primary-nav a:hover, .primary-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.safety-state { margin-top: auto; display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; }
.safety-state strong { color: #fff; }
.safety-state span { color: #b8c4ce; font-size: 12px; }
.user-block { padding: 17px 5px 0; display: grid; }
.user-block small { color: #9eadb9; text-transform: capitalize; }
.user-block form { margin-top: 6px; }

.main-shell { margin-left: 238px; padding: 30px 34px 60px; max-width: 1700px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.page-header.compact { margin-bottom: 14px; }
.page-header h1 { margin: 3px 0 6px; font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
.page-header > div { min-width: 0; }
.page-header p { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; color: var(--blue) !important; font-weight: 700; font-size: 11px; }
.page-section { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.section-heading, .subsection-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.section-heading h2, .subsection-heading h3 { margin: 0 0 3px; font-size: 18px; }
.section-heading p, .subsection-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.primary-button, .secondary-button, .table-action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 13px;
  border-radius: 5px; border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.primary-button { background: var(--green); color: #fff; }
.primary-button:hover { background: #176746; }
.secondary-button { background: #fff; color: var(--ink); border-color: #bfc9d2; }
.secondary-button:hover { background: var(--soft); }
.table-action { min-height: 30px; padding: 5px 9px; border-color: #b8c7d4; color: var(--blue); background: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.link-button { border: 0; padding: 0; background: transparent; color: #cbd5dc; cursor: pointer; text-decoration: underline; }
.danger-text { color: var(--red); }

.notice, .validation-panel { padding: 12px 14px; margin: 12px 0; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.notice.success { border-color: var(--green); background: var(--green-soft); }
.notice.error, .validation-panel { border-color: var(--red); background: var(--red-soft); }
.notice.warning { border-color: var(--amber); background: var(--amber-soft); }
.operation-controls { margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.operation-controls > summary { padding: 9px 0; cursor: pointer; font-size: 12px; color: var(--muted); line-height: 1.6; }
.operation-controls > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.operation-status { display: inline-block; margin-left: 12px; overflow-wrap: anywhere; }
.operation-scope { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.operation-actions { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 2px 0 12px; }
.operation-actions form { margin: 0; max-width: 100%; display: grid; justify-items: start; gap: 8px; }
.operation-data { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.operation-actions button { white-space: normal; }
.import-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px 24px; padding: 14px 0; margin: 0; border-top: 1px solid var(--line); }
.import-scope > div { min-width: 0; }
.import-scope dt { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.import-scope dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.import-context { margin: 12px 0; }
.import-context summary { cursor: pointer; color: var(--muted); }
.import-permission { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); }
.import-permission a { color: var(--blue); }
.dataset-membership { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.dataset-membership summary { cursor: pointer; color: var(--muted); }
.dataset-membership form { display: grid; gap: 12px; }
.dataset-membership label { display: grid; gap: 6px; }
.dataset-membership textarea { width: 100%; min-width: 0; }
.dataset-membership button { white-space: normal; }
.validation-panel ul { margin: 8px 0 0; padding-left: 20px; }
.next-step { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 0 0 18px; border: 1px solid #bfd4e5; background: var(--blue-soft); }
.next-step strong { white-space: nowrap; color: #104f80; }
.next-step span { color: #38576f; }
.next-step a { margin-left: auto; white-space: nowrap; color: var(--blue); font-weight: 700; }

.ai-define-panel { margin: 0 0 18px; padding: 18px; border: 1px solid #aac6da; border-top: 4px solid var(--blue); background: #fff; }
.ai-define-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ai-define-heading h2 { margin: 3px 0 5px; font-size: 18px; }
.ai-define-heading p:last-child { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.45; }
.source-badge { display: inline-flex; flex: 0 0 auto; padding: 5px 8px; border: 1px solid #b8c6d0; border-radius: 4px; background: #eef2f5; color: #4e5d68; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.source-badge.ready { border-color: #9fc9b3; background: var(--green-soft); color: #176746; }
.source-badge.blocked { border-color: #d8b9b9; background: var(--red-soft); color: var(--red); }
.ai-define-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; border: 1px solid var(--line); list-style: none; }
.ai-define-flow li { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); }
.ai-define-flow li:last-child { border-right: 0; }
.ai-define-flow li > span { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.ai-define-flow strong, .ai-define-flow small { display: block; }
.ai-define-flow small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ai-define-source { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; border-left: 3px solid #9bbbd3; background: #f3f7fa; }
.ai-define-source > div { min-width: 0; padding: 10px 12px; }
.ai-define-source > div + div { border-left: 1px solid #d6e0e7; }
.ai-define-source strong, .ai-define-source span { display: block; }
.ai-define-source strong { color: #36546a; font-size: 11px; }
.ai-define-source span { margin-top: 3px; color: #5f707d; font-size: 11px; line-height: 1.4; }
.ai-define-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 13px; }
.ai-define-form label { display: grid; flex: 0 1 270px; gap: 4px; color: #43515d; font-size: 11px; font-weight: 700; }
.ai-define-form label.grow { flex: 1 1 420px; }
.ai-define-form label small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.35; }
.ai-define-form .primary-button { min-width: 220px; }
.ai-define-no-model { display: grid; flex: 1 1 auto; gap: 3px; color: #315847; }
.ai-define-no-model span { color: #60736a; font-size: 11px; }
.ai-define-blocker { margin: 10px 0 0; color: var(--amber); font-size: 11px; }

.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--panel); }
.summary-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-strip div { padding: 15px 18px; border-right: 1px solid var(--line); }
.summary-strip div:last-child { border-right: 0; }
.summary-strip strong { display: block; font-size: 22px; }
.summary-strip span { color: var(--muted); font-size: 12px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th { background: #eef2f5; color: #465562; font-size: 11px; text-transform: uppercase; text-align: left; padding: 10px 12px; }
td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
td small { display: block; color: var(--muted); margin-top: 3px; }
tr:hover td { background: #fafcfd; }
.workflow-group-row td { padding: 10px 12px; background: #e8f1f8; border-top: 8px solid #f4f6f8; color: #184f78; }
.workflow-group-row:first-child td { border-top-width: 1px; }
.workflow-group-row td, .workflow-group-row:hover td { background: #e8f1f8; }
.workflow-group-row td { position: relative; padding-right: 90px; }
.workflow-group-row td > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.workflow-group-row td > div > span, .workflow-group-row td > span { flex: 0 0 auto; color: #3278aa; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.workflow-group-row td > span { position: absolute; top: 12px; right: 12px; }
.workflow-group-row strong { color: #173f5d; }
.workflow-group-row small { color: #567083; white-space: normal; }
.detail-row td { padding-top: 0; background: #fafcfd; }
.detail-row:hover td { background: #fafcfd; }
.status { display: inline-flex; padding: 3px 7px; border-radius: 4px; background: #edf0f2; color: #46525d; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.status.success { background: var(--green-soft); color: var(--green); }
.status.danger { background: var(--red-soft); color: var(--red); }
.status.warning { background: var(--amber-soft); color: var(--amber); }
.status.info { background: var(--blue-soft); color: var(--blue); }
.compact-search { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.compact-search input { width: 260px; }

.directional-gate { margin-top: 18px; border: 1px solid #bad0df; border-left: 4px solid var(--blue); background: #f4f8fb; }
.directional-gate > header { padding: 14px 16px 11px; border-bottom: 1px solid #d4e0e8; }
.directional-gate h2 { margin: 3px 0 0; font-size: 16px; }
.directional-gate ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.directional-gate li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px 16px; border-right: 1px solid #d4e0e8; }
.directional-gate li:last-child { border-right: 0; }
.directional-gate li > span { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.directional-gate li strong, .directional-gate li small { display: block; }
.directional-gate li small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.workflow-browser { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 560px; border: 1px solid var(--line); background: var(--panel); }
.workflow-family-list { padding: 7px; border-right: 1px solid var(--line); background: #eef2f5; }
.workflow-family-list a { display: grid; gap: 4px; margin-bottom: 3px; padding: 11px 10px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; }
.workflow-family-list a:hover { background: #fff; }
.workflow-family-list a.active { border-left-color: var(--blue); background: #fff; }
.workflow-family-name { font-weight: 750; overflow-wrap: anywhere; }
.workflow-family-counts { color: var(--muted); font-size: 10px; }
.workflow-family-list .status { width: fit-content; margin-top: 2px; }
.workflow-pane { min-width: 0; }
.workflow-pane-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.workflow-pane-header h2 { margin: 3px 0 0; font-size: 21px; }
.workflow-pane-header dl { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); margin: 0; border: 1px solid var(--line); }
.workflow-pane-header dl div { padding: 8px 11px; border-right: 1px solid var(--line); }
.workflow-pane-header dl div:last-child { border-right: 0; }
.workflow-pane-header dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.workflow-pane-header dd { margin: 2px 0 0; font-size: 15px; font-weight: 800; }
.chapter-browser { display: grid; grid-template-columns: minmax(235px, .38fr) minmax(0, 1fr); min-width: 0; }
.chapter-sequence { min-width: 0; border-right: 1px solid var(--line); background: #fafbfc; }
.chapter-sequence > p { display: grid; gap: 2px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chapter-sequence > p small { color: var(--muted); font-size: 10px; font-weight: 400; }
.chapter-sequence ol { max-height: 560px; margin: 0; padding: 7px; overflow: auto; list-style: none; }
.chapter-sequence li a { display: flex; align-items: flex-start; gap: 9px; padding: 9px 8px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; }
.chapter-sequence li a:hover { background: #f0f5f8; }
.chapter-sequence li a.active { border-left-color: var(--green); background: var(--green-soft); }
.chapter-sequence li a > span { display: inline-grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid #aebdc8; border-radius: 50%; background: #fff; color: #496170; font-size: 10px; font-weight: 800; }
.chapter-sequence li a.active > span { border-color: var(--green); color: var(--green); }
.chapter-sequence li strong, .chapter-sequence li small { display: block; }
.chapter-sequence li strong { line-height: 1.3; overflow-wrap: anywhere; }
.chapter-sequence li small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.chapter-checkpoints { min-width: 0; padding: 15px; }
.chapter-checkpoints .section-heading.compact { align-items: flex-start; }
.chapter-checkpoints h3 { max-width: 580px; margin: 3px 0 0; font-size: 17px; line-height: 1.3; }
.catalog-field-table { min-width: 540px; }
.catalog-field-table th:nth-child(3), .catalog-field-table td:nth-child(3) { text-align: right; }
.reference-disclosure { margin-top: 26px; border-top: 1px solid var(--line); }
.reference-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; cursor: pointer; list-style: none; }
.reference-disclosure > summary::-webkit-details-marker { display: none; }
.reference-disclosure > summary span:first-child { display: grid; gap: 3px; }
.reference-disclosure > summary small { color: var(--muted); font-size: 11px; font-weight: 400; }
.reference-disclosure > summary span:last-child { color: var(--blue); font-size: 12px; font-weight: 700; }
.reference-disclosure[open] > summary span:last-child { font-size: 0; }
.reference-disclosure[open] > summary span:last-child::after { content: "Hide reference"; font-size: 12px; }
.reference-disclosure-body { padding-bottom: 20px; }

@media (max-width: 1150px) {
  .directional-gate ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directional-gate li:nth-child(2) { border-right: 0; }
  .directional-gate li:nth-child(-n+2) { border-bottom: 1px solid #d4e0e8; }
  .workflow-browser { grid-template-columns: 220px minmax(0, 1fr); }
  .chapter-browser { grid-template-columns: 240px minmax(420px, 1fr); overflow-x: auto; }
  .workflow-pane-header { display: grid; }
}

.draft-nav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.draft-nav a { padding: 10px 13px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.draft-nav a.active { color: var(--blue); border-color: var(--blue); font-weight: 700; }
.draft-nav a span { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 5px; border: 1px solid #b7c3cc; border-radius: 50%; font-size: 11px; }
.draft-nav a.active span { border-color: var(--blue); background: var(--blue); color: #fff; }

.editor-form { background: var(--panel); border: 1px solid var(--line); }
.editor-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 24px; border-bottom: 1px solid var(--line); }
.editor-label { display: flex; gap: 11px; align-items: flex-start; }
.editor-label > span { color: var(--blue); font-weight: 800; font-size: 12px; }
.editor-label h2 { margin: 0 0 5px; font-size: 17px; }
.editor-label p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.editor-section > .form-grid { grid-column: 2; }
.form-grid label, .form-grid .field-control, .stack-form label, .repeat-row label, .inline-upload label, .live-run-form label { display: grid; gap: 5px; min-width: 0; color: #43515d; font-size: 12px; font-weight: 650; }
.form-grid label > small, .form-grid .field-control > small, .stack-form label > small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.form-grid .wide { grid-column: 1 / -1; }
.value-picker { min-width: 0; }
.picker-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.picker-add { min-width: 58px; }
.picker-values { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.picker-values li { display: flex; align-items: stretch; min-width: 0; max-width: 100%; border: 1px solid #bfd0dc; border-radius: 4px; background: #f2f7fb; color: #294c66; font-size: 11px; font-weight: 650; }
.picker-values li > span { min-width: 0; padding: 6px 7px; overflow-wrap: anywhere; }
.picker-remove { display: inline-grid; place-items: center; width: 28px; min-height: 28px; flex: 0 0 28px; padding: 0; border: 0; border-left: 1px solid #bfd0dc; border-radius: 0 3px 3px 0; background: #fff; color: #567084; cursor: pointer; font-size: 17px; line-height: 1; }
.picker-remove:hover { background: var(--red-soft); color: var(--red); }
.picker-remove:focus-visible { outline: 3px solid rgba(23,105,170,.2); outline-offset: 1px; }
.picker-empty { margin: 8px 0 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.picker-empty[hidden] { display: none; }
.catalog-preset-label { display: inline-block; margin-right: 5px; padding: 2px 5px; border: 1px solid #a7c8b5; border-radius: 3px; background: var(--green-soft); color: #176746; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.catalog-preset-label[hidden], [data-editable-help][hidden] { display: none; }
.craft-reference { border: 1px solid #aebdca; border-radius: 5px; overflow: hidden; background: #fff; }
.craft-reference[hidden] { display: none; }
.craft-reference-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 11px; border-bottom: 1px solid #c8d2da; background: #eef2f5; }
.craft-reference-topbar > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.craft-reference-topbar > div > span:last-child { padding: 2px 5px; border: 1px solid #bdc8d0; border-radius: 3px; color: #5a6974; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.craft-reference-mark { display: inline-grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border-radius: 4px; background: #ffd22e; color: #172b3b; font-weight: 850; }
.craft-reference-body { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(320px, 1.15fr); min-width: 0; }
.craft-reference-body aside, .craft-reference-body article { min-width: 0; padding: 14px; }
.craft-reference-body aside { border-right: 1px solid #d6dee4; background: #f7f9fa; }
.craft-reference-label { display: block; color: #3977a3; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.craft-reference-body aside > strong { display: block; margin: 4px 0 10px; color: #324b5d; font-size: 12px; overflow-wrap: anywhere; }
.craft-reference-body ul { margin: 0; padding: 0; list-style: none; }
.craft-reference-body aside li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 7px 8px; border-top: 1px solid #dde4e9; color: #425866; font-size: 11px; }
.craft-reference-body aside li span { overflow-wrap: anywhere; }
.craft-reference-body aside li small { color: #778691; font-size: 9px; }
.craft-reference-body aside li.current { border-left: 3px solid var(--blue); background: var(--blue-soft); color: #104f80; font-weight: 750; }
.craft-reference-body article h3 { margin: 4px 0 6px; color: #183d58; font-size: 16px; }
.craft-reference-body article > p { margin: 0; color: #516675; line-height: 1.45; }
.craft-current-field, .craft-input-summary { margin-top: 12px; padding-top: 10px; border-top: 1px solid #dbe2e7; }
.craft-current-field > span, .craft-input-summary > span { display: block; color: #6a7882; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.craft-current-field strong { display: block; margin-top: 4px; color: #263d4d; overflow-wrap: anywhere; }
.craft-current-field small { display: block; margin-top: 2px; color: #6c7d89; }
.craft-input-summary ul { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.craft-input-summary li { max-width: 100%; padding: 4px 6px; border: 1px solid #c4d5e2; border-radius: 3px; background: #f5f9fc; color: #36536a; font-size: 10px; overflow-wrap: anywhere; }
.craft-input-summary li.required { border-color: #d7b36e; background: #fff8e8; color: #76530f; }
.craft-input-summary li small { display: block; margin-top: 2px; color: inherit; opacity: .72; font-size: 8px; text-transform: uppercase; }
.craft-input-summary p { margin: 6px 0 0; color: #71808a; font-size: 11px; }
.craft-input-summary p[hidden] { display: none; }
.craft-reference > footer { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 9px; padding: 9px 14px; border-top: 1px solid #c8d2da; background: #f7f9fa; color: #496275; line-height: 1.45; }
.craft-reference > footer strong { color: #285f85; }
.preset-execution-summary { border: 1px solid #bdd2c7; background: #f7fbf9; }
.preset-execution-summary > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border-bottom: 1px solid #d3e2da; }
.preset-execution-summary > header div { display: flex; align-items: baseline; gap: 9px; }
.preset-execution-summary > header span { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.preset-execution-summary > header strong { color: #254a39; }
.preset-execution-summary > header small { color: #60736a; }
.preset-execution-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.preset-execution-summary dl > div { min-width: 0; padding: 13px; border-right: 1px solid #dbe7e1; border-bottom: 1px solid #dbe7e1; }
.preset-execution-summary dl > div:nth-child(2n) { border-right: 0; }
.preset-execution-summary dt { margin-bottom: 5px; color: #61736a; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.preset-execution-summary dd { margin: 0; color: #294438; line-height: 1.45; overflow-wrap: anywhere; }
.preset-execution-summary dd strong, .preset-execution-summary dd span { display: block; }
.preset-execution-summary dd span { margin-top: 3px; color: #5b6d64; font-size: 11px; }
.preset-execution-summary dd ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.preset-execution-summary dd li { color: #2f4b3f; font-size: 11px; }
.preset-execution-summary dd li small { color: #718078; }
.preset-execution-summary > footer { display: flex; align-items: center; gap: 10px; padding: 9px 13px; background: #edf6f1; color: #4f655a; font-size: 11px; }
.preset-execution-summary > footer code { color: #1d5f42; font-weight: 700; }
.field-title { position: relative; display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; color: #364956; cursor: help; outline: none; }
.field-help-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; border: 1px solid #8ba9bf; border-radius: 50%; color: #236b9e; background: #f3f8fc; font-size: 10px; font-weight: 800; line-height: 1; }
.field-title:focus-visible .field-help-icon { outline: 3px solid rgba(23,105,170,.2); border-color: var(--blue); }
.field-tooltip { position: fixed; z-index: 40; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 9px 11px; border: 1px solid #9eb4c5; border-radius: 4px; background: #172a3a; color: #fff; box-shadow: var(--shadow); font-size: 12px; font-weight: 450; line-height: 1.45; pointer-events: none; }
.field-tooltip[hidden] { display: none; }
input, select, textarea { width: 100%; min-height: 38px; border: 1px solid #bcc7d0; border-radius: 4px; padding: 8px 9px; background: #fff; color: var(--ink); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23,105,170,.14); border-color: var(--blue); }
input[readonly], select:disabled { opacity: 1; border-color: #c9d2d9; background: #eef2f4; color: #455762; cursor: not-allowed; }
.check-label, .required-check { display: flex !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check-label input, .required-check input { width: 17px; min-height: 17px; }
.subsection-heading { grid-column: 2; margin-top: 18px; }
.editor-help { grid-column: 2; margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid #9bbbd3; background: #f2f7fb; color: #405665; }
.editor-help summary { cursor: pointer; color: #205f8d; font-weight: 700; }
.editor-help p { margin: 9px 0 0; line-height: 1.55; }
.repeat-list { grid-column: 2; display: grid; gap: 8px; }
.repeat-row { display: grid; grid-template-columns: 190px 240px minmax(240px, 1fr) auto; gap: 9px; align-items: end; padding: 11px; background: var(--soft); border: 1px solid var(--line); }
.repeat-row.fact-row { grid-template-columns: 190px 130px minmax(220px, 1fr) auto auto; }
.remove-button { min-height: 38px; border: 1px solid #ddb8b8; color: var(--red); background: #fff; border-radius: 4px; cursor: pointer; padding: 7px 9px; }
.rule-builder { grid-column: 2; display: grid; gap: 15px; min-width: 0; }
.rule-builder-intro { display: grid; gap: 3px; padding: 12px 14px; border-left: 4px solid var(--green); background: var(--green-soft); color: #315847; }
.rule-builder-intro strong { color: #195f42; }
.rule-builder-intro span { font-size: 12px; line-height: 1.5; }
.rule-template-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 13px; border: 1px solid var(--line); background: #f8fafb; }
.rule-map-panel { padding: 13px; border: 1px solid var(--line); background: #f8fafb; }
.rule-map-panel .subsection-heading { margin: 0 0 10px; }
.rule-map-panel .repeat-list { display: grid; gap: 8px; }
.rule-map-row { grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; }
.rule-preview { display: grid; gap: 4px; min-width: 0; padding: 13px 14px; border: 1px solid #b9cfdf; background: var(--blue-soft); }
.rule-preview > span { color: #3977a3; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.rule-preview > strong { color: #183f5c; line-height: 1.45; overflow-wrap: anywhere; }
.rule-preview > small { color: #576f80; }
.editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 24px; background: #fff; border-top: 1px solid var(--line); }
.editor-actions span { color: var(--muted); font-size: 12px; }

.agent-start-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); background: var(--panel); }
.agent-start-steps > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; min-width: 0; padding: 14px; border-right: 1px solid var(--line); }
.agent-start-steps > div:last-child { border-right: 0; }
.agent-start-steps > div > span { grid-row: 1 / 3; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #dfe7ed; color: #496171; font-size: 12px; font-weight: 800; }
.agent-start-steps > div.active > span { background: var(--blue); color: #fff; }
.agent-start-steps strong, .agent-start-steps small { display: block; overflow-wrap: anywhere; }
.agent-start-steps strong { font-size: 13px; }
.agent-start-steps small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.agent-start-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; align-items: start; }
.agent-start-main { padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.agent-start-form { display: grid; gap: 15px; }
.agent-start-form > label { display: grid; gap: 6px; color: #43515d; font-size: 12px; font-weight: 700; }
.agent-start-form label em { color: var(--muted); font-style: normal; font-weight: 500; }
.agent-start-form label small { color: var(--muted); font-weight: 400; line-height: 1.45; }
.agent-start-form .primary-button { justify-self: end; }
.agent-lock-summary { display: grid; gap: 4px; padding: 12px 13px; border-left: 3px solid var(--green); background: var(--green-soft); }
.agent-lock-summary strong { color: #1a6547; font-size: 12px; }
.agent-lock-summary span { color: #456657; font-size: 11px; line-height: 1.45; }
.agent-source-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); background: #f7f9fa; }
.agent-source-card h2 { margin: 0; font-size: 17px; }
.agent-source-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.agent-source-card ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #405361; font-size: 12px; }
.agent-source-card form, .agent-source-card button { width: 100%; }
.quiet-link { color: var(--blue); font-size: 12px; font-weight: 700; }
.agent-definition-complete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .7fr); gap: 18px; align-items: center; margin-bottom: 18px; padding: 17px 20px; border: 1px solid #a8cdbb; background: var(--green-soft); }
.agent-definition-complete h2 { margin: 8px 0 3px; font-size: 18px; }
.agent-definition-complete p { margin: 0; color: #476757; line-height: 1.45; }
.agent-definition-complete dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid #bdd8cb; background: #fff; }
.agent-definition-complete dl > div { min-width: 0; padding: 10px; border-right: 1px solid #d3e4dc; }
.agent-definition-complete dl > div:last-child { border-right: 0; }
.agent-definition-complete dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.agent-definition-complete dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 700; }

.input-band, .action-band { background: var(--panel); border: 1px solid var(--line); padding: 18px; }
.input-band { margin-top: 0; }
.form-submit { display: flex; justify-content: flex-end; }
.case-entry-form { display: grid; gap: 14px; }
.case-entry-section { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--line); background: #fafcfd; }
.case-entry-section legend { padding: 0 7px; color: #294656; font-size: 13px; font-weight: 750; }
.case-entry-section legend span { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: 5px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; }
.required-marker { display: inline-block; margin-left: 4px; color: var(--amber); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.fact-source-list { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.fact-source-list h3 { margin: 0 0 4px; font-size: 14px; }
.fact-source-list > p { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.advanced-inputs { padding: 11px 13px; border: 1px solid var(--line); background: #f5f7f8; }
.advanced-inputs summary { cursor: pointer; color: #435765; font-weight: 700; }
.advanced-inputs .form-grid { margin-top: 12px; }
.case-input-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 13px 0 0; border: 1px solid var(--line); background: var(--line); }
.case-input-summary div { min-width: 0; padding: 9px 10px; background: #f8fafb; }
.case-input-summary dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.case-input-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.case-input-summary pre { margin: 0; white-space: pre-wrap; font: inherit; }
.case-input-summary code { white-space: normal; }
.inline-import { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr) auto; gap: 14px; align-items: end; }
.inline-import label { display: grid; gap: 5px; color: #43515d; font-size: 12px; font-weight: 650; }
.inline-import p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.empty-state { border: 1px dashed #b8c3cc; padding: 28px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); }
.case-list { display: grid; gap: 14px; }
.case-item { border: 1px solid var(--line); background: var(--panel); padding: 16px; border-radius: 6px; }
.case-item > header { display: flex; justify-content: space-between; gap: 20px; }
.case-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compact-button { padding: 7px 10px; font-size: 12px; }
.case-item h3 { margin: 7px 0 3px; font-size: 16px; }
.case-item p { margin: 0; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 13px; }
.review-media-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.review-media-grid video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #101820; }
.review-input-summary { margin-top: 18px; }
.recorded-outcome { margin-top: 18px; }
.dataset-lifecycle { margin-top: 18px; }
.review-safety-band { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 11px 14px; border-left: 4px solid var(--green); background: var(--green-soft); color: #385c4b; }
.review-safety-band strong { color: #175f41; white-space: nowrap; }
.review-summary { margin-bottom: 18px; }
.review-browser { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 520px; border: 1px solid var(--line); background: var(--panel); }
.review-group-list { padding: 8px; border-right: 1px solid var(--line); background: #eef2f5; }
.review-group-list > p { display: grid; gap: 3px; margin: 0; padding: 10px 10px 13px; }
.review-group-list > p small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.4; }
.review-group-list > a { display: grid; gap: 5px; margin-bottom: 4px; padding: 11px 10px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; }
.review-group-list > a:hover { background: #fff; }
.review-group-list > a.active { border-left-color: var(--blue); background: #fff; }
.review-group-name { font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.review-group-meta { color: var(--muted); font-size: 10px; }
.review-progress-track, .review-progress-line { display: block; height: 5px; overflow: hidden; background: #d7dfe5; }
.review-progress-track i, .review-progress-line i { display: block; height: 100%; background: var(--green); }
.review-group-pane { min-width: 0; }
.review-group-pane > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 19px; border-bottom: 1px solid var(--line); }
.review-group-pane > header h2 { margin: 3px 0 5px; font-size: 21px; }
.review-group-pane > header p:last-child { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.5; }
.review-group-progress { display: grid; min-width: 95px; text-align: right; }
.review-group-progress strong { font-size: 25px; }
.review-group-progress span { color: var(--muted); font-size: 11px; }
.review-sequence-note { display: flex; align-items: center; gap: 8px; padding: 11px 19px; border-bottom: 1px solid var(--line); background: #f7f9fa; color: #52616c; font-size: 11px; }
.review-sequence-note > span { display: inline-grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
.review-sequence-note > i { flex: 1 1 28px; height: 1px; background: #bdc9d2; }
.review-field-list { display: grid; }
.review-field-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 86px auto; gap: 13px; align-items: center; min-width: 0; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.review-field-row:last-child { border-bottom: 0; }
.review-field-order { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid #afbdc8; border-radius: 50%; color: #456071; font-size: 11px; font-weight: 800; }
.review-field-copy { min-width: 0; }
.review-field-copy > span { color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.review-field-copy h3 { margin: 3px 0 3px; font-size: 15px; overflow-wrap: anywhere; }
.review-field-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.review-field-count { display: grid; text-align: right; }
.review-field-count strong { font-size: 16px; }
.review-field-count span { color: var(--muted); font-size: 10px; }
.review-case-header { margin-bottom: 11px; }
.review-progress-line { margin-bottom: 17px; height: 6px; }
.review-brief { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); border: 1px solid #b8ccda; background: #f7fafc; }
.review-brief > div, .review-brief > aside { min-width: 0; padding: 16px 18px; }
.review-brief > aside { border-left: 1px solid #cedae2; background: #eef4f8; }
.review-brief span, .historical-reference span { display: block; color: var(--blue); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.review-brief-main > strong { display: block; margin-top: 5px; font-size: 17px; line-height: 1.4; }
.review-brief-main > ul { display: grid; gap: 5px; margin: 12px 0 0; padding-left: 19px; color: #415361; font-size: 12px; line-height: 1.45; }
.context-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.context-chip-list li { padding: 5px 7px; border: 1px solid #bdd0dd; border-radius: 3px; background: #fff; color: #39566b; font-size: 10px; overflow-wrap: anywhere; }
.context-chip-list li.required { border-color: #d5ae65; background: #fff8e9; color: #75520f; }
.review-evidence-section, .review-decision-section { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.review-section-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.review-section-heading > span { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.review-section-heading h2 { margin: 1px 0 3px; font-size: 17px; }
.review-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.target-review-media { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.target-review-media .media-tile img, .target-review-media .media-tile video { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #e2e7ea; }
.context-review-media .media-tile img, .context-review-media .media-tile video { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #e2e7ea; }
.media-tile figure, figure.media-tile { margin: 0; }
.media-tile figcaption { padding: 8px 9px; }
.media-tile figcaption small { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.historical-reference { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 16px; margin-top: 22px; padding: 16px 18px; border: 1px solid #e0c27e; background: #fff9ea; }
.historical-reference > div > strong { display: block; margin-top: 5px; font-size: 18px; }
.historical-reference > div > p { margin: 6px 0 0; color: #5e4b25; white-space: pre-wrap; line-height: 1.45; }
.historical-reference dl { display: grid; gap: 7px; margin: 0; }
.historical-reference dl div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.historical-reference dt { color: #796c4d; font-size: 10px; text-transform: uppercase; }
.historical-reference dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 650; }
.historical-reference dd a { color: var(--blue); }
.historical-reference > small { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #ead7aa; color: #756540; }
.expert-decision-form { display: grid; gap: 14px; max-width: 980px; }
.decision-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.decision-choice legend { grid-column: 1 / -1; margin-bottom: 3px; font-size: 12px; font-weight: 750; }
.decision-option { position: relative; display: block; cursor: pointer; }
.decision-option input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.decision-option > span { display: grid; gap: 3px; min-height: 74px; padding: 13px 15px; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
.decision-option small { color: var(--muted); font-weight: 400; }
.decision-option.pass input:checked + span { border-color: var(--green); background: var(--green-soft); color: #155c3f; }
.decision-option.fail input:checked + span { border-color: var(--red); background: var(--red-soft); color: #922f2f; }
.decision-option input:focus-visible + span { outline: 3px solid rgba(23,105,170,.18); }
.rejection-fields { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 12px; padding: 14px; border-left: 4px solid var(--red); background: var(--red-soft); }
.rejection-fields label, .verified-value, .review-note label { display: grid; gap: 5px; color: #43515d; font-size: 12px; font-weight: 650; }
.verified-value { max-width: 560px; }
.verified-value small { color: var(--muted); font-weight: 400; }
.review-note { padding: 10px 12px; border: 1px solid var(--line); background: #f7f9fa; }
.review-note summary { cursor: pointer; color: #435765; font-size: 12px; font-weight: 700; }
.review-note label { margin-top: 10px; }
.review-submit-row { display: flex; justify-content: flex-end; gap: 9px; }
.media-tile { border: 1px solid var(--line); background: var(--soft); overflow: hidden; border-radius: 5px; }
.media-tile img, .video-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #dfe5e9; }
.video-placeholder { display: grid; place-items: center; color: var(--muted); }
.media-tile > div, .media-tile > form { padding: 8px 9px; }
.media-tile span, .media-tile small { display: block; color: var(--muted); margin-top: 2px; }
.inline-upload { display: grid; grid-template-columns: 190px minmax(250px,1fr) minmax(230px,1fr) auto; gap: 9px; align-items: end; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.case-delete { margin-top: 9px; }
.live-run-form { display: grid; grid-template-columns: minmax(220px, .5fr) minmax(380px, 1.4fr) auto; gap: 14px; align-items: end; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.metric { border: 1px solid var(--line); background: var(--panel); padding: 13px; border-radius: 5px; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 5px; font-size: 22px; }
.metric-footnote { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.code-panel { margin: 0; padding: 15px; border: 1px solid #cbd4dc; background: #17212b; color: #e8eef3; overflow: auto; max-height: 620px; white-space: pre-wrap; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.detail-columns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 9px; margin-top: 10px; }
.definition-list { display: grid; gap: 1px; border: 1px solid var(--line); margin: 0 0 18px; }
.definition-list div { display: grid; grid-template-columns: 180px 1fr; background: var(--soft); padding: 11px; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; font-weight: 650; }

.qualification-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--panel); }
.qualification-flow article { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 13px; border-right: 1px solid var(--line); }
.qualification-flow article:last-child { border-right: 0; }
.qualification-flow article > span { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.qualification-flow article div { min-width: 0; }
.qualification-flow strong, .qualification-flow small { display: block; }
.qualification-flow strong { font-size: 12px; }
.qualification-flow small { margin-top: 2px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.qualification-profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qualification-profile { display: grid; align-content: start; gap: 13px; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.qualification-profile > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: start; }
.qualification-profile > header div { min-width: 0; }
.qualification-profile > header h3 { margin: 7px 0 0; font-size: 18px; }
.qualification-profile > header > strong { font-size: 25px; line-height: 1; }
.qualification-profile > header > small { grid-column: 2; color: var(--muted); text-align: right; }
.qualification-profile > p { margin: 0; color: var(--muted); line-height: 1.5; }
.qualification-profile > label:not(.check-label) { display: grid; gap: 5px; color: #43515d; font-size: 12px; font-weight: 650; }
.private-media-confirm { align-items: flex-start; line-height: 1.4; }
.gate-list { display: grid; gap: 1px; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--line); list-style: none; }
.gate-list li { display: flex; gap: 9px; align-items: flex-start; min-width: 0; padding: 10px; background: #fff; }
.gate-list.compact li { padding: 8px 9px; }
.gate-list li > div { min-width: 0; }
.gate-list strong, .gate-list small { display: block; overflow-wrap: anywhere; }
.gate-list strong { font-size: 12px; }
.gate-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.gate-mark { display: inline-grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.gate-mark.pass { background: var(--green-soft); color: var(--green); }
.gate-mark.fail { background: var(--red-soft); color: var(--red); }
.qualification-result { display: grid; gap: 12px; }
.qualification-result > .section-heading { margin-bottom: 0; }
.result-band { border: 1px solid var(--line); background: var(--panel); }
.result-band > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f7f9fa; }
.result-band > header h3 { margin: 0; font-size: 14px; }
.result-band > .gate-list { border: 0; }
.inline-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.inline-metrics div { padding: 12px 13px; border-right: 1px solid var(--line); }
.inline-metrics div:last-child { border-right: 0; }
.inline-metrics dt { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.inline-metrics dd { margin: 4px 0 0; font-size: 18px; font-weight: 750; }
.release-ready { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid #a8cdbb; background: var(--green-soft); }
.release-ready strong, .release-ready span { display: block; }
.release-ready strong { color: #175f41; }
.release-ready span { margin-top: 3px; color: #476757; font-size: 12px; }

/* Evidence and assessment stay adjacent; dataset targets never imply model quality. */
.master-filters { display: flex; align-items: end; gap: 12px; margin: 20px 0; }
.master-filters label { display: grid; gap: 5px; min-width: 0; flex: 1; }
.master-target { padding: 16px 20px; border-bottom: 1px solid var(--line); color: #35454d; line-height: 1.6; }
.master-target span { display: block; font-size: 12px; color: var(--muted); }
.master-field { padding: 24px 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.master-field > header, .master-field-body { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.master-field > header > div { min-width: 0; }
.master-field h3 { font-size: 18px; overflow-wrap: anywhere; margin: 4px 0 14px; }
.master-field .status { white-space: normal; flex-shrink: 0; max-width: 130px; }
.master-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; flex: 1; min-width: 0; }
.master-balance p { grid-column: 1 / -1; font-size: 12px; margin: 0; }
.master-field-actions { display: grid; gap: 8px; max-width: 160px; }
.master-field-actions form { margin: 0; }
.master-export { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.master-case-list { margin-top: 18px; }
.master-case-list ul { padding: 0; list-style: none; }
.master-case-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px; gap: 12px; align-items: start; border-top: 1px solid var(--line); padding: 12px 0; font-size: 12px; overflow-wrap: anywhere; }
.master-case-list small { display: block; color: var(--muted); }
.master-warning { padding: 12px 16px; background: #fff5dc; border-left: 3px solid #a26a00; color: #684707; line-height: 1.5; overflow-wrap: anywhere; }
.master-warning ul { padding-left: 20px; }
.review-browser progress, .master-balance progress { display: block; width: 100%; height: 6px; margin-top: 9px; appearance: none; border: none; border-radius: 3px; overflow: hidden; background: #e5eaed; }
progress::-webkit-progress-bar { background: #e5eaed; }
.review-browser progress::-webkit-progress-value, .master-balance progress::-webkit-progress-value { background: #298566; }
.review-browser progress::-moz-progress-bar, .master-balance progress::-moz-progress-bar { background: #298566; }
.reject-progress progress::-webkit-progress-value { background: #bd4651; }
.reject-progress progress::-moz-progress-bar { background: #bd4651; }
.case-source-bar { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 13px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.case-source-bar details { width: 100%; }
.review-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 28px; align-items: start; }
.review-evidence { min-width: 0; }
.criterion-band { border-left: 3px solid #237a9b; padding: 6px 0 6px 16px; margin-bottom: 24px; }
.criterion-band h2 { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; margin: 8px 0; }
.evidence-section { padding: 18px 0; border-top: 1px solid var(--line); }
.evidence-section > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.evidence-section h2, .assessment-panel h2 { font-size: 18px; margin: 0; }
.evidence-section > header > span { color: var(--muted); font-size: 12px; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; align-items: start; }
.evidence-item { margin: 0; min-width: 0; }
.evidence-item img, .evidence-item video, .evidence-item object { display: block; width: 100%; height: 390px; object-fit: contain; background: #e9edef; border: 1px solid var(--line); }
.evidence-item img { cursor: zoom-in; }
.evidence-item figcaption { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; padding: 10px 0; }
.evidence-item figcaption strong { min-width: 0; overflow-wrap: anywhere; }
.evidence-item figcaption a { flex-shrink: 0; }
.evidence-item details { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.hash-value { font-family: monospace; word-break: break-all; }
.context-values { margin: 0; }
.context-values > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.context-values dt, .context-values dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.context-values small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.context-missing { color: #9b3e35; }
.assessment-panel { border-left: 1px solid var(--line); padding-left: 24px; min-width: 0; position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.assessment-panel form { display: grid; gap: 16px; }
.assessment-panel label:not(.assessment-choices label):not(.context-confirm) { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.assessment-panel input, .assessment-panel select, .assessment-panel textarea { min-width: 0; font-weight: 400; }
.assessment-panel .muted { font-size: 12px; margin: 0; line-height: 1.5; }
.assessment-choices { padding: 0; border: none; display: grid; gap: 8px; margin: 0; min-width: 0; }
.assessment-choices legend { font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.assessment-choices label { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #ccd5d9; border-radius: 5px; cursor: pointer; background: #fff; }
.assessment-choices label:has(:checked) { border-color: #267658; background: #e8f5ef; }
.assessment-choices .reject-choice:has(:checked) { border-color: #b24a51; background: #fff0ef; }
.assessment-choices .defer-choice:has(:checked) { border-color: #a77819; background: #fff7e2; }
.assessment-choices input, .context-confirm input { width: 17px; height: 17px; min-height: 17px; flex: 0 0 17px; margin: 0; accent-color: #267658; }
.assessment-panel [data-rejection-fields], .assessment-panel [data-defer-fields] { display: grid; gap: 14px; }
.assessment-panel [hidden] { display: none !important; }
.historical-outcome { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.historical-outcome summary { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.historical-outcome blockquote { margin: 12px 0; padding: 0 0 0 12px; border-left: 3px solid #becbd0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.context-confirm { display: flex; align-items: start; gap: 10px; font-size: 12px; line-height: 1.5; font-weight: 400; }
.context-confirm input { margin-top: 2px; }
.assessment-submit { display: grid; gap: 8px; }
.assessment-saved { margin: 0; color: #246849; font-size: 12px; }
.review-workbench button, .master-field button, .master-field a.primary-button, .master-field a.secondary-button { white-space: normal; }
.evidence-viewer { width: min(1400px, 96vw); height: 92dvh; max-height: 92dvh; padding: 0; border: 1px solid #acb7be; border-radius: 6px; }
.evidence-viewer::backdrop { background: #101a20b8; }
.evidence-viewer[open] { display: flex; flex-direction: column; }
.evidence-viewer header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.evidence-viewer header strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.viewer-tools { display: flex; gap: 5px; flex-shrink: 0; }
.viewer-tools button { min-width: 36px; height: 36px; padding: 4px; background: #f2f5f6; border: 1px solid #c4cfd4; border-radius: 4px; cursor: pointer; font-size: 18px; }
.viewer-tools [data-viewer-action="fit"] { font-size: 12px; }
.viewer-stage { flex: 1; min-height: 0; overflow: auto; background: #e4e9ec; display: grid; place-items: safe center; padding: 16px; }
.viewer-stage img { max-width: none; object-fit: contain; }
:is(.review-workbench, .master-filters, .review-browser, .evidence-viewer) :focus-visible { outline: 3px solid #2787b0; outline-offset: 3px; }
@media (max-width: 1250px) {
  .review-workbench { grid-template-columns: minmax(0, 1fr) 305px; gap: 18px; }
  .assessment-panel { padding-left: 18px; }
  .master-field-body { flex-direction: column; }
  .master-balance { width: 100%; }
  .master-field-actions { display: flex; flex-wrap: wrap; max-width: none; }
}
@media (max-width: 780px) {
  .review-group-list { max-height: 340px; overflow-y: auto; }
  .review-workbench { grid-template-columns: minmax(0, 1fr); }
  .assessment-panel { padding: 20px 0 0; border-left: none; border-top: 2px solid var(--line); position: static; max-height: none; overflow: visible; }
  .master-filters { flex-wrap: wrap; }
  .master-filters label { flex-basis: 100%; }
  .context-values > div { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .master-case-list li { grid-template-columns: minmax(0, 1fr) 110px; }
  .master-case-list li > span:nth-child(2) { grid-row: 2; }
  .evidence-viewer header { flex-wrap: wrap; }
  .evidence-viewer header strong { width: 100%; }
}
.auth-shell { display: grid; place-items: center; background: #eef2f4; }
.auth-main { width: min(430px, calc(100vw - 30px)); }
.auth-panel { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; border-radius: 6px; }
.auth-panel h1 { font-size: 24px; margin: 24px 0 7px; }
.auth-panel p { color: var(--muted); margin: 0 0 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.stack-form { display: grid; gap: 13px; }

.workflow-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.workflow-map article { display: flex; gap: 11px; padding: 18px; border-right: 1px solid var(--line); }
.workflow-map article:last-child { border-right: 0; }
.workflow-map article > span { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
.workflow-map h2 { margin: 1px 0 4px; font-size: 15px; }
.workflow-map p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 28px; }
.example-sheet { border-left: 4px solid var(--green); background: var(--green-soft); padding: 15px 17px; }
.example-sheet dl { margin: 0; display: grid; gap: 9px; }
.example-sheet dl div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.example-sheet dt { color: #426052; }
.example-sheet dd { margin: 0; font-weight: 650; }
.checklist-panel { padding: 16px 18px; border: 1px solid var(--line); background: #fff; }
.checklist-panel h2 { margin: 0 0 13px; font-size: 17px; }
.checklist-panel label { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; color: #42515e; line-height: 1.4; }
.checklist-panel input { width: 16px; min-height: 16px; margin-top: 2px; }
.glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.glossary-grid article { padding: 16px 0; border-top: 1px solid var(--line); }
.glossary-grid code { color: var(--blue); font-size: 11px; }
.glossary-grid h3 { margin: 5px 0 4px; font-size: 15px; }
.glossary-grid p { margin: 0; color: var(--muted); line-height: 1.5; }
.compact-definitions div { grid-template-columns: 240px 1fr; }
.compact-definitions code { display: block; margin-top: 4px; color: var(--blue); font-weight: 400; }
.metric-help { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-help article { padding: 15px; border-right: 1px solid var(--line); }
.metric-help article:last-child { border-right: 0; }
.metric-help p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 1300px) {
  .editor-section { grid-template-columns: 1fr; }
  .editor-section > .form-grid, .subsection-heading, .repeat-list, .editor-help, .rule-builder { grid-column: 1; }
  .repeat-row, .repeat-row.fact-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1050px) {
  .sidebar { position: static; width: auto; min-height: auto; flex-direction: row; align-items: center; padding: 12px 16px; }
  .brand { border: 0; padding: 0; }
  .primary-nav { display: flex; margin: 0 0 0 auto; }
  .safety-state { display: none; }
  .user-block { padding: 0 0 0 15px; }
  .main-shell { margin: 0; padding: 24px 20px 50px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .workflow-map, .metric-help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-map article:nth-child(2), .metric-help article:nth-child(2) { border-right: 0; }
  .workflow-map article:nth-child(-n+2), .metric-help article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .help-layout { grid-template-columns: 1fr; }
  .qualification-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qualification-flow article:nth-child(3) { border-right: 0; }
  .qualification-flow article:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .agent-start-layout, .agent-definition-complete { grid-template-columns: 1fr; }
  .review-browser { grid-template-columns: 235px minmax(0, 1fr); }
  .review-brief { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); }
}

@media (max-width: 700px) {
  .sidebar { display: block; position: relative; }
  .primary-nav { margin: 12px 0 0; flex-wrap: wrap; }
  .user-block { position: static; padding: 12px 5px 0; display: flex; align-items: center; gap: 12px; }
  .user-block form { margin: 0; }
  .page-header { display: grid; }
  .draft-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .draft-nav a { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .next-step { align-items: flex-start; flex-wrap: wrap; }
  .next-step strong { white-space: normal; }
  .next-step a { margin-left: 0; width: 100%; }
  .ai-define-heading, .ai-define-form { align-items: stretch; flex-direction: column; }
  .source-badge { width: fit-content; }
  .ai-define-flow, .ai-define-source { grid-template-columns: 1fr; }
  .ai-define-flow li { border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-define-flow li:last-child { border-bottom: 0; }
  .ai-define-source > div + div { border-left: 0; border-top: 1px solid #d6e0e7; }
  .ai-define-form label, .ai-define-form label.grow { flex-basis: auto; }
  .ai-define-form .primary-button { width: 100%; min-width: 0; }
  .form-grid, .summary-strip, .detail-columns, .live-run-form, .inline-upload, .inline-import, .case-input-summary { grid-template-columns: 1fr; }
  .summary-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-strip div:last-child { border-bottom: 0; }
  .summary-strip.four { grid-template-columns: 1fr; }
  .summary-strip.five { grid-template-columns: 1fr; }
  .directional-gate ol { grid-template-columns: 1fr; }
  .directional-gate li, .directional-gate li:nth-child(2) { border-right: 0; border-bottom: 1px solid #d4e0e8; }
  .directional-gate li:last-child { border-bottom: 0; }
  .workflow-browser, .chapter-browser { grid-template-columns: 1fr; min-height: 0; overflow: visible; }
  .workflow-family-list, .chapter-sequence { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-pane-header dl { grid-template-columns: 1fr; }
  .workflow-pane-header dl div { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-pane-header dl div:last-child { border-bottom: 0; }
  .chapter-sequence ol { max-height: 340px; }
  .chapter-checkpoints { padding: 12px; }
  .section-heading { display: grid; align-items: start; }
  .compact-search, .compact-search input { width: 100%; }
  .workflow-group-row td { padding-right: 12px; }
  .workflow-group-row td > div { display: grid; gap: 3px; }
  .workflow-group-row td > span { display: none; }
  .craft-reference-topbar { align-items: flex-start; flex-wrap: wrap; }
  .craft-reference-body { grid-template-columns: 1fr; }
  .craft-reference-body aside { border-right: 0; border-bottom: 1px solid #d6dee4; }
  .craft-reference > footer { grid-template-columns: 1fr; gap: 3px; }
  .preset-execution-summary > header { align-items: flex-start; flex-direction: column; }
  .preset-execution-summary dl { grid-template-columns: 1fr; }
  .preset-execution-summary dl > div { border-right: 0; }
  .editor-actions { position: static; padding: 15px 18px; }
  .repeat-row, .repeat-row.fact-row { grid-template-columns: 1fr; }
  .rule-template-panel, .rule-map-row { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-map, .metric-help, .glossary-grid { grid-template-columns: 1fr; }
  .workflow-map article, .workflow-map article:nth-child(2), .metric-help article, .metric-help article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-map article:last-child, .metric-help article:last-child { border-bottom: 0; }
  .compact-definitions div, .example-sheet dl div { grid-template-columns: 1fr; gap: 3px; }
  .editor-section { padding: 18px; }
  .qualification-flow, .qualification-profiles, .inline-metrics { grid-template-columns: 1fr; }
  .qualification-flow article, .qualification-flow article:nth-child(3), .inline-metrics div { border-right: 0; border-bottom: 1px solid var(--line); }
  .qualification-flow article:last-child, .inline-metrics div:last-child { border-bottom: 0; }
  .release-ready { align-items: flex-start; flex-direction: column; }
  .agent-start-steps, .agent-definition-complete dl { grid-template-columns: 1fr; }
  .agent-start-steps > div, .agent-definition-complete dl > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .agent-start-steps > div:last-child, .agent-definition-complete dl > div:last-child { border-bottom: 0; }
  .agent-start-form .primary-button { width: 100%; }
  .review-safety-band { align-items: flex-start; flex-direction: column; gap: 3px; }
  .review-browser, .review-brief, .historical-reference { grid-template-columns: 1fr; }
  .review-group-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .review-group-pane > header { grid-template-columns: 1fr; }
  .review-group-progress { text-align: left; }
  .review-sequence-note { align-items: flex-start; flex-direction: column; }
  .review-sequence-note > i { width: 1px; min-height: 12px; margin-left: 10px; flex: 0 0 12px; }
  .review-field-row { grid-template-columns: 30px minmax(0, 1fr); }
  .review-field-count, .review-field-row > .status, .review-field-row > .primary-button { grid-column: 2; justify-self: start; text-align: left; }
  .review-brief > aside { border-left: 0; border-top: 1px solid #cedae2; }
  .target-review-media, .decision-choice, .rejection-fields { grid-template-columns: 1fr; }
  .historical-reference > small { grid-column: 1; }
  .review-submit-row { align-items: stretch; flex-direction: column-reverse; }
  .review-submit-row button { width: 100%; }
}

.history-source-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.history-source-form label { min-width: 0; }
.history-source-form select, .history-source-form input { width: 100%; min-width: 0; }
.history-job { margin-top: 24px; padding-top: 20px; border-top: 1px solid #cedae2; }
.history-job > form, .history-job > a { display: inline-block; margin: 8px 8px 8px 0; }
.history-job > form button { white-space: normal; }
.history-table-scroll { max-width: 100%; max-height: 360px; overflow: auto; margin: 12px 0; }
.history-table-scroll table { min-width: 700px; table-layout: fixed; }
.history-table-scroll td { overflow-wrap: anywhere; vertical-align: top; }
.history-preview summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.customer-reference { padding: 18px 0; border-bottom: 1px solid #cedae2; }
.customer-reference header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.customer-reference h2 { font-size: 18px; margin: 0; }
.customer-reference dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.customer-reference dt { font-size: 12px; color: #58666e; }
.customer-reference dd { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.customer-reference details summary { font-size: 13px; cursor: pointer; }
@media (max-width: 800px) {
  .customer-reference dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-lifecycle.summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-source-form { grid-template-columns: 1fr; }
  #history-import .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-job > form, .history-job > a { max-width: 100%; }
}
