:root {
  --navy: #123b5d;
  --navy-dark: #0c2a43;
  --blue: #1677b8;
  --blue-dark: #0f5f96;
  --blue-light: #eaf5fb;
  --canvas: #f5f8fb;
  --surface: #fff;
  --ink: #17212b;
  --muted: #5c6b78;
  --border: #d8e2ea;
  --amber: #b85c00;
  --amber-light: #fff4e5;
  --red: #b42318;
  --red-light: #fff0ef;
  --teal: #147d73;
  --teal-light: #e8f7f4;
  --grey: #667085;
  --shadow: 0 10px 30px rgba(25, 54, 78, .07);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid rgba(22,119,184,.35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.fine-print { color: var(--muted); font-size: 12px; }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow-light { color: #9fdcff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--navy); font-size: clamp(30px, 3vw, 42px); line-height: 1.1; letter-spacing: -.025em; }
h2 { margin-bottom: 5px; color: var(--navy); font-size: 20px; line-height: 1.25; }
h3 { color: var(--navy); font-size: 15px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 248px; flex-direction: column; padding: 26px 18px 20px; color: #d7e8f4; background: linear-gradient(180deg, var(--navy-dark), #103653 65%, #0d2d46); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-size: 26px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.sidebar .brand { margin: 0 10px 36px; color: white; }
.brand-mark { display: inline-grid; width: 36px; height: 36px; place-items: center; border-radius: 10px 10px 14px 10px; color: white; background: var(--blue); font-size: 19px; box-shadow: inset 0 -4px 10px rgba(0,0,0,.12); }
.nav-list { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; color: #bcd1df; font-weight: 650; text-decoration: none; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.1); }
.nav-link > span[aria-hidden="true"] { width: 20px; flex: 0 0 auto; font-size: 18px; text-align: center; }
.nav-link-text { flex: 1; }
.nav-link-planned { gap: 9px; font-size: 13px; }
.nav-link-planned small { padding: 2px 5px; color: #89a7ba; border: 1px solid rgba(169,217,244,.2); border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.nav-link-planned:hover small, .nav-link-planned.active small { color: #d6f2ff; border-color: rgba(169,217,244,.45); }
.sidebar-bottom { display: grid; gap: 14px; margin-top: auto; }
.demo-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border: 1px solid #a9d9f4; border-radius: 999px; color: var(--blue-dark); background: var(--blue-light); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.sidebar .demo-badge { color: #c5ecff; border-color: rgba(159,220,255,.45); background: rgba(48,155,212,.14); }
.user-card { display: flex; align-items: center; gap: 10px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.14); }
.user-card strong, .user-card small { display: block; }
.user-card small { color: #98b5c8; font-size: 11px; }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--navy); background: #cfeeff; font-weight: 800; }
.text-button { padding: 0; color: #a9c2d2; border: 0; background: none; font-size: 12px; }
.text-button:hover { color: white; }
.main-content { min-height: 100vh; margin-left: 248px; padding: 34px clamp(24px, 4vw, 56px) 20px; }
.app-footer { margin-top: 30px; padding: 18px 0 4px; color: var(--muted); border-top: 1px solid var(--border); font-size: 12px; text-align: center; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page-header p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.header-actions { display: flex; gap: 10px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; text-decoration: none; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--navy); border-color: var(--border); background: white; }
.button-secondary:hover:not(:disabled) { border-color: #aac9dc; background: #fafdff; }
.button-secondary:disabled { color: #7b8792; background: #f5f7f9; opacity: .8; }
.button-attention { color: white; background: var(--red); white-space: nowrap; }
.button-full { width: 100%; }
.planned { padding: 2px 6px; border-radius: 999px; color: var(--grey); background: #e9edf1; font-size: 9px; text-transform: uppercase; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 132px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 14px rgba(25,54,78,.04); }
.metric-card > span { display: block; color: var(--muted); font-weight: 650; }
.metric-card strong { display: block; margin: 6px 0 3px; color: var(--navy); font-size: 32px; line-height: 1.1; }
.metric-card small { color: var(--muted); }
.metric-attention { border-top: 3px solid var(--red); }
.trend-up { color: var(--red); font-weight: 800; }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 18px rgba(25,54,78,.045); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-header p, .panel-header h2 { margin-bottom: 0; }
.caseload-panel { overflow: hidden; margin-bottom: 18px; }
.caseload-panel > .panel-header { padding: 22px 22px 14px; }
.panel-header > div > p:not(.eyebrow) { color: var(--muted); }
.filter-bar { display: flex; align-items: center; gap: 9px; padding: 0 22px 18px; }
.filter-bar input, .filter-bar select, .stack-form input, .dialog input, .dialog select, .dialog textarea { width: 100%; min-height: 42px; padding: 9px 12px; color: var(--ink); border: 1px solid #cbd8e1; border-radius: 8px; background: white; }
.filter-bar select { min-width: 170px; }
.search-field { position: relative; display: flex; flex: 1; align-items: center; }
.search-field > span:not(.sr-only) { position: absolute; left: 12px; color: var(--muted); font-size: 20px; }
.search-field input { padding-left: 40px; }
.text-link { color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 13px; color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f8fafc; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 13px; border-bottom: 1px solid #e8eef2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.caseload-table tbody tr:hover { background: #f9fcfe; }
.caseload-table td { min-width: 100px; }
.caseload-table td:nth-child(2) { min-width: 260px; }
.caseload-table td:nth-child(3) { min-width: 230px; }
.caseload-table td:nth-child(6) { min-width: 170px; }
.rank { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--navy); background: #edf3f7; font-weight: 800; }
.worker-link { display: grid; color: inherit; text-decoration: none; }
.worker-link strong { color: var(--navy); font-size: 15px; }
.worker-link span, td small { display: block; color: var(--muted); font-size: 11px; }
.worker-link small { overflow: hidden; max-width: 310px; color: #687988; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mini-progress { display: block; width: 105px; height: 5px; margin: 6px 0 3px; overflow: hidden; border-radius: 99px; background: #e3e9ee; }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.risk-number { display: flex; align-items: center; gap: 8px; }
.risk-number > strong { color: var(--navy); font-size: 20px; }
.risk-badge, .quality, .stage-badge { display: inline-flex; width: fit-content; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.risk-needs_attention { color: var(--red); background: var(--red-light); }
.risk-watch { color: var(--amber); background: var(--amber-light); }
.risk-on_track { color: var(--teal); background: var(--teal-light); }
.risk-insufficient { color: var(--grey); background: #eef1f3; }
.change { display: inline-flex; font-size: 11px; font-weight: 800; }
.change.worse { color: var(--red); }
.change.better { color: var(--teal); }
.quality { color: var(--teal); border: 1px solid #a8d8d1; background: var(--teal-light); }
.quality-limited { color: var(--amber); border-color: #edc390; background: var(--amber-light); }
.review-state { color: var(--muted); font-size: 12px; font-weight: 700; }
.row-arrow { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-light); font-size: 17px; text-decoration: none; }
.empty-state { padding: 50px; text-align: center; }
.lower-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.lower-grid > .panel, .status-grid > .panel { padding: 22px; }
.mock-pill { padding: 4px 8px; border-radius: 999px; color: #755310; background: #fff2c7; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.recovery-summary-grid { display: grid; grid-template-columns: minmax(190px, .75fr) minmax(0, 1.25fr); gap: 18px; margin-top: 20px; }
.recovery-summary-grid > section { min-width: 0; padding: 16px; border: 1px solid #e5ebef; border-radius: 11px; background: #fbfdfe; }
.section-label { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.schedule-summary { display: flex; align-items: center; gap: 16px; margin-top: 15px; }
.schedule-summary > p { display: grid; gap: 4px; margin: 0; color: var(--navy); font-size: 13px; }
.schedule-summary > p span { color: var(--muted); font-size: 11px; }
.schedule-donut { position: relative; display: grid; width: 106px; height: 106px; flex: 0 0 auto; place-items: center; }
.schedule-donut svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.schedule-donut circle { fill: none; stroke-width: 5; }
.donut-track { stroke: #e3eaef; }
.donut-progress { stroke: var(--teal); stroke-linecap: round; }
.schedule-donut > div { position: relative; display: grid; text-align: center; }
.schedule-donut strong { color: var(--navy); font-size: 17px; line-height: 1.1; }
.schedule-donut span { color: var(--muted); font-size: 11px; font-weight: 750; }
.comparison-definition { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.benchmark-bars { display: grid; gap: 12px; margin: 14px 0 12px; }
.benchmark-bars > div { display: grid; grid-template-columns: 100px 1fr 45px; align-items: center; gap: 12px; }
.benchmark-bars i { height: 10px; overflow: hidden; border-radius: 99px; background: #e5ebf0; }
.benchmark-bars b { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.benchmark-bars .reference b { background: #74a8c7; }
.comparison-donuts { display: flex; align-items: flex-start; justify-content: space-evenly; gap: 16px; margin: 14px 0; }
.comparison-donut-card { display: grid; min-width: 115px; justify-items: center; gap: 7px; color: var(--navy); font-size: 11px; text-align: center; }
.comparison-donut { width: 88px; height: 88px; }
.comparison-donut strong { font-size: 19px; }
.benchmark-donut .donut-progress { stroke: #74a8c7; }
.outperformance { margin: 0; padding: 8px 10px; color: var(--teal); border-radius: 8px; background: var(--teal-light); font-size: 11px; }
.outperformance strong { display: block; }
.benchmark-note { margin: 14px 0 0; }
.status-online { color: var(--teal); font-size: 12px; font-weight: 800; }
.status-list { margin: 18px 0; }
.status-list div, .integration-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; font-weight: 750; }
.integration-row strong { font-size: 12px; line-height: 1.35; text-align: right; }

/* Planned workflows */
.workflow-header { align-items: center; }
.workflow-status { padding: 7px 11px; color: var(--blue-dark); border: 1px solid #b8d9eb; border-radius: 999px; background: var(--blue-light); font-size: 11px; font-weight: 800; white-space: nowrap; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.workflow-steps li { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 13px 15px; color: var(--muted); border: 1px solid var(--border); border-radius: 11px; background: #f9fbfc; }
.workflow-steps li > span { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; color: var(--grey); border-radius: 50%; background: #e8edf1; font-size: 12px; font-weight: 850; }
.workflow-steps li.current { color: #365164; border-color: #add3e8; background: var(--blue-light); }
.workflow-steps li.current > span { color: white; background: var(--blue); }
.workflow-steps strong, .workflow-steps small { display: block; }
.workflow-steps strong { color: var(--navy); font-size: 13px; }
.workflow-steps small { margin-top: 2px; font-size: 10px; }
.workflow-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); align-items: start; gap: 16px; }
.workflow-side { display: grid; gap: 16px; }
.workflow-panel { padding: 22px; }
.preview-form { display: grid; gap: 17px; margin-top: 20px; }
.preview-form label { display: grid; gap: 7px; color: var(--navy); font-size: 12px; font-weight: 750; }
.preview-form input, .preview-form select, .preview-form textarea { width: 100%; min-height: 42px; padding: 9px 12px; color: #566875; border: 1px solid #cbd8e1; border-radius: 8px; background: #f7f9fa; cursor: not-allowed; opacity: 1; }
.preview-form textarea { resize: none; }
.preview-form ::placeholder { color: #8a98a2; opacity: 1; }
.compact-form { gap: 12px; margin-top: 16px; }
.upload-dropzone { display: grid; min-height: 235px; place-items: center; align-content: center; padding: 28px; color: var(--muted); border: 2px dashed #b9ccd9; border-radius: 12px; background: #f9fbfc; text-align: center; }
.upload-dropzone strong { margin-top: 8px; color: var(--navy); }
.upload-dropzone p { margin: 3px 0 15px; font-size: 11px; }
.upload-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--blue); border-radius: 12px; background: var(--blue-light); font-size: 25px; font-weight: 800; }
.processing-preview { background: linear-gradient(145deg, white, #f4fafe); }
.preview-checklist { display: grid; gap: 12px; margin: 18px 0 22px; padding: 0; list-style: none; }
.preview-checklist li { display: flex; align-items: center; gap: 10px; color: #3f5564; font-size: 12px; }
.preview-checklist span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; color: var(--blue-dark); border-radius: 50%; background: var(--blue-light); font-size: 10px; font-weight: 850; }
.button-primary:disabled { color: #e6f3fa; background: #79afd0; cursor: not-allowed; }
.preview-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.connection-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 17px 20px; }
.connection-summary > div { display: flex; align-items: center; gap: 13px; }
.connection-summary strong { color: var(--navy); }
.connection-summary p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.connection-summary-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; color: var(--blue); border-radius: 10px; background: var(--blue-light); font-size: 20px; }
.connector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.connector-card { display: flex; min-height: 335px; flex-direction: column; padding: 20px; }
.connector-card.featured-connector { border-top: 3px solid var(--blue); }
.connector-title { display: flex; align-items: flex-start; gap: 11px; }
.connector-title > div { min-width: 0; flex: 1; }
.connector-title h2 { font-size: 17px; }
.connector-logo { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; color: white; border-radius: 10px; background: var(--navy); font-size: 12px; font-weight: 850; }
.connector-logo.fhir-logo { color: #9d3028; background: #fff0ef; font-size: 9px; }
.connector-logo.benchmark-logo { color: #76530f; background: #fff2c7; }
.connector-card > p { margin: 17px 0 8px; color: var(--muted); font-size: 12px; }
.connector-card ul { margin: 4px 0 22px; padding-left: 19px; color: #3f5564; font-size: 11px; }
.connector-card li + li { margin-top: 6px; }
.connector-card .button { margin-top: auto; }
.connection-config { margin-top: 0; }
.connection-form { grid-template-columns: 1fr 1fr; }
.form-span-2 { grid-column: 1 / -1; }
.connection-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 15px; color: #4c6070; border: 1px solid var(--border); border-radius: 9px; }
.connection-form legend { padding: 0 6px; color: var(--navy); font-size: 12px; font-weight: 750; }
.connection-form fieldset label { display: flex; align-items: center; gap: 8px; color: #566875; font-weight: 600; }
.connection-form fieldset input { width: 15px; min-height: auto; }
.connection-actions { display: flex; justify-content: flex-end; gap: 9px; }

/* Login */
.login-page { background: white; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(430px, .95fr) minmax(470px, 1.05fr); }
.login-intro { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: clamp(36px, 6vw, 78px); color: white; background: radial-gradient(circle at 85% 15%, rgba(64,169,225,.28), transparent 33%), linear-gradient(145deg, #0a2b46, #124e75); }
.brand-light { color: white; }
.brand-mark-light { background: #31a0da; }
.login-message { position: relative; z-index: 2; max-width: 570px; margin: auto 0; }
.login-message h1 { color: white; font-size: clamp(38px, 5vw, 66px); line-height: 1.03; }
.login-message > p:last-of-type { max-width: 520px; color: #c1d8e7; font-size: 18px; }
.path-motif { position: absolute; right: -170px; bottom: -150px; width: 520px; height: 520px; transform: rotate(15deg); }
.path-motif span { position: absolute; inset: calc(var(--i, 0) * 40px); border: 1px solid rgba(135,211,250,.19); border-radius: 45% 55% 55% 45%; }
.path-motif span:nth-child(1) { --i: 0; }.path-motif span:nth-child(2) { --i: 1; }.path-motif span:nth-child(3) { --i: 2; }.path-motif span:nth-child(4) { --i: 3; }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #fbfdff; }
.login-form-wrap { width: min(100%, 430px); }
.login-form-wrap h2 { margin-bottom: 6px; font-size: 30px; }
.stack-form { display: grid; gap: 18px; margin: 28px 0 22px; }
.stack-form label, .dialog label { display: grid; gap: 7px; color: var(--navy); font-weight: 750; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 60px; }
.password-toggle { position: absolute; right: 10px; top: 10px; color: var(--blue); border: 0; background: transparent; font-weight: 750; }
.demo-notice { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: var(--blue-dark); border-radius: 8px; background: var(--blue-light); font-size: 12px; font-weight: 700; }
.demo-notice span { color: var(--teal); font-size: 9px; }
.alert { margin-top: 18px; padding: 12px 14px; border-radius: 8px; }
.alert-error { color: var(--red); border: 1px solid #f0b2ad; background: var(--red-light); }
.mobile-brand { display: none; }

/* Worker detail */
.back-link { display: inline-block; margin-bottom: 18px; color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.worker-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.worker-identity { display: flex; align-items: center; gap: 16px; }
.large-avatar { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; border-radius: 16px; color: var(--navy); background: var(--blue-light); font-size: 20px; font-weight: 850; }
.title-line { display: flex; align-items: center; gap: 12px; }
.title-line h1 { margin: 0; font-size: 34px; }
.worker-identity p { margin: 4px 0; color: var(--muted); }
.worker-identity > div > strong { color: #334655; }
.worker-meta { display: flex; gap: 28px; padding: 13px 18px; border: 1px solid var(--border); border-radius: 11px; background: white; }
.worker-meta div { display: grid; }
.worker-meta dt { color: var(--muted); font-size: 11px; }
.worker-meta dd { margin: 1px 0 0; color: var(--navy); font-weight: 800; }
.decision-grid { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(410px, 1.5fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 16px; }
.decision-grid > .panel { min-height: 410px; padding: 20px; }
.risk-card { border-top: 4px solid var(--grey); }
.risk-card-needs_attention { border-top-color: var(--red); }.risk-card-watch { border-top-color: var(--amber); }.risk-card-on_track { border-top-color: var(--teal); }
.risk-hero { display: flex; align-items: baseline; gap: 12px; margin-top: 24px; }
.risk-hero > strong { color: var(--navy); font-size: 56px; line-height: 1; letter-spacing: -.04em; }
.probability-scale { position: relative; height: 8px; margin: 14px 0 23px; border-radius: 99px; background: linear-gradient(90deg, #7bc8b9 0 40%, #efb36c 40% 70%, #e77c74 70%); }
.probability-scale > span { position: absolute; top: -3px; height: 14px; border-right: 3px solid var(--navy); }
.milestone-box { display: grid; gap: 3px; padding: 13px; border-radius: 9px; background: #f5f8fa; }
.milestone-box > span, .milestone-box small { color: var(--muted); font-size: 11px; }
.risk-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 15px 0 8px; color: var(--muted); font-size: 11px; }
.prototype-note { color: var(--muted); font-size: 10px; text-align: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.chart-legend span::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 5px; vertical-align: middle; background: var(--blue); }
.chart-legend .legend-capacity::before { background: #8aa4b6; }.chart-legend .legend-interference::before { background: var(--red); }.chart-legend .legend-stress::before { background: var(--amber); }
.chart-wrap { height: 250px; margin-top: 18px; }
.chart-wrap svg { display: block; width: 100%; height: 215px; overflow: visible; }
.grid-lines line { stroke: #e7edf1; stroke-width: 1; }
.chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hours-line { stroke: var(--blue); }.capacity-line { stroke: #8aa4b6; stroke-dasharray: 6 5; }.interference-line { stroke: var(--red); }.stress-line { stroke: var(--amber); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.trajectory-callout { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 10px 12px; border-radius: 9px; background: var(--blue-light); }
.trajectory-callout > span { color: var(--blue); font-size: 22px; }.trajectory-callout p { display: grid; margin: 0; color: #335161; font-size: 12px; }.trajectory-callout strong { color: var(--navy); }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; color: var(--blue); border: 0; border-radius: 8px; background: var(--blue-light); }
.factor-list { display: grid; gap: 10px; margin: 20px 0; }
.factor-item { display: flex; gap: 10px; padding: 10px; border-radius: 9px; background: #f7f9fb; }
.factor-item > span { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-weight: 900; }
.factor-item p { margin: 0; color: var(--muted); font-size: 11px; }.factor-item strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: 12px; }
.risk-factor > span { color: var(--red); background: var(--red-light); }.protective-factor > span { color: var(--teal); background: var(--teal-light); }
.button-link { padding: 0; border: 0; background: none; }
.attention-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 16px; padding: 15px 18px; color: #6d251f; border: 1px solid #efb5b0; border-radius: 12px; background: var(--red-light); }
.attention-banner div { flex: 1; }.attention-banner p { margin: 1px 0 0; color: #7d4641; }.attention-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: var(--red); font-weight: 900; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .8fr); gap: 16px; }
.main-column, .side-column { display: grid; align-content: start; gap: 16px; }
.main-column > .panel, .side-column > .panel, .review-history { padding: 22px; }
.domain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.domain-card { position: relative; padding: 17px 17px 12px 48px; border: 1px solid #e3eaf0; border-radius: 10px; background: #fbfcfd; }
.domain-icon { position: absolute; left: 15px; top: 15px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; color: var(--blue); background: var(--blue-light); font-weight: 800; }
.domain-card h3 { margin-bottom: 9px; }.domain-card dl { margin: 0; }.domain-card dl div { margin-bottom: 6px; }.domain-card dt { color: var(--muted); font-size: 10px; }.domain-card dd { margin: 0; color: #334655; font-size: 12px; font-weight: 650; }
.signal-chart { height: 225px; }.signal-chart svg { height: 190px; }
.timeline { position: relative; display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.timeline li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 12px; padding-bottom: 20px; }
.timeline-dot { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 2px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #9dbfd4; }
.event-flare .timeline-dot { background: var(--red); box-shadow: 0 0 0 1px #e5a19b; }.event-signal .timeline-dot { background: var(--amber); }.event-intervention .timeline-dot { background: var(--teal); }
.timeline small, .timeline p { color: var(--muted); font-size: 11px; }.timeline strong { display: block; margin: 2px 0; color: var(--navy); font-size: 13px; }.timeline p { margin: 0; }.timeline em { display: inline-block; margin-top: 5px; padding: 2px 6px; color: var(--red); border-radius: 99px; background: var(--red-light); font-size: 9px; font-style: normal; font-weight: 800; }
.duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 18px 0 12px; }
.duration-grid div { display: grid; padding: 10px 5px; border-radius: 8px; background: #f5f8fa; text-align: center; }.duration-grid strong { color: var(--navy); font-size: 22px; }.duration-grid span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.review-history { margin-top: 16px; }.review-list { margin-top: 14px; }.review-list article { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }.review-list p { margin: 2px 0; }.review-list small { color: var(--muted); }.review-check { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-light); font-weight: 900; }

/* Dialogs */
.dialog { width: min(92vw, 560px); max-height: 88vh; padding: 24px; overflow-y: auto; border: 0; border-radius: 15px; box-shadow: 0 30px 90px rgba(10,35,54,.28); }
.dialog::backdrop { background: rgba(10,35,54,.55); backdrop-filter: blur(2px); }
.dialog form { display: grid; gap: 17px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }.dialog-close { color: var(--muted); border: 0; background: transparent; font-size: 26px; line-height: 1; }.dialog textarea { resize: vertical; }.optional { color: var(--muted); font-size: 10px; font-weight: 500; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.explanation-dialog { width: min(92vw, 690px); }.lead-text { color: #334655; font-size: 16px; }.source-list { display: grid; gap: 8px; margin: 10px 0 22px; }.source-list article { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; }.source-list p { margin: 2px 0; color: var(--muted); }.source-list small { color: var(--blue-dark); }.source-direction { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-weight: 900; }.risk-direction { color: var(--red); background: var(--red-light); }.protective-direction { color: var(--teal); background: var(--teal-light); }.limitation-box { padding: 14px; border-radius: 9px; color: #5f5b4b; background: #fff8df; }.limitation-box p { margin: 3px 0; }

/* Model status */
.large-status { padding: 8px 12px; border-radius: 999px; background: var(--teal-light); }
.stack-panel { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin-bottom: 16px; padding: 20px; }
.stack-stage { position: relative; min-height: 260px; padding: 20px; border: 1px solid var(--border); border-radius: 11px; background: #fbfdfe; }.active-stage { border-top: 3px solid var(--blue); }.shadow-stage { border-top: 3px solid #9aabbb; background: #f7f8f9; }.stage-number { display: grid; width: 30px; height: 30px; margin-bottom: 16px; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-light); font-weight: 850; }.shadow-stage .stage-number { color: var(--grey); background: #e9edf0; }.stack-stage p:not(.eyebrow) { color: var(--muted); font-size: 13px; }.stack-stage dl { margin: 16px 0 30px; }.stack-stage dl div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #e5ebef; font-size: 11px; }.stack-stage dd { margin: 0; font-weight: 750; }.stage-badge { position: absolute; right: 15px; bottom: 15px; }.stage-badge.active { color: var(--teal); background: var(--teal-light); }.stage-badge.shadow { color: var(--grey); background: #e9edf0; }.stage-badge.caution { position: static; color: var(--amber); background: var(--amber-light); }.stack-arrow { align-self: center; color: #90a4b2; font-size: 24px; }
.shadow-stage { background: #fbfdfe; }
.stage-number, .shadow-stage .stage-number { color: white; border-radius: 7px; background: var(--blue); box-shadow: 0 2px 5px rgba(15,95,150,.18); }
.method-info-button { position: absolute; right: 16px; top: 16px; display: grid; width: 28px; height: 28px; place-items: center; padding: 0; color: var(--blue-dark); border: 1px solid #8fc4e1; border-radius: 50%; background: white; font-family: Georgia, serif; font-size: 16px; font-style: italic; font-weight: 700; line-height: 1; box-shadow: 0 2px 6px rgba(25,54,78,.08); }
.method-info-button:hover { color: white; border-color: var(--blue); background: var(--blue); }
.method-dialog { width: min(92vw, 760px); }
.method-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; margin: 20px 0; }
.method-flow span { padding: 10px 8px; color: var(--navy); border: 1px solid #cfe1ec; border-radius: 8px; background: var(--blue-light); font-size: 12px; font-weight: 750; text-align: center; }
.method-flow b { color: #87a5b8; font-size: 18px; }
.method-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.method-columns section { padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd; }
.method-columns h3 { margin-bottom: 9px; }
.method-columns ul { margin: 0; padding-left: 18px; color: #465b6a; font-size: 13px; }
.method-columns li + li { margin-top: 6px; }
.method-dialog > h3 { margin: 0 0 6px; }
.method-dialog > p:not(.lead-text) { color: #465b6a; }
.method-note { display: grid; gap: 3px; margin-top: 18px; padding: 14px; color: #31576b; border-radius: 9px; background: var(--blue-light); }
.method-note strong { color: var(--navy); }
.method-note span { font-size: 13px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }.ring-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; }.progress-ring { display: grid; width: 82px; height: 82px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #e6edf2 0); }.progress-ring::before { content: ""; position: absolute; width: 62px; height: 62px; border-radius: 50%; background: white; }.progress-ring span { position: relative; color: var(--navy); font-weight: 850; }.readiness-list { display: grid; gap: 11px; margin: 19px 0 0; padding: 0; list-style: none; }.readiness-list span { display: inline-block; width: 22px; color: var(--blue); font-weight: 900; }.integration-row { margin-top: 18px; }.registry-panel { overflow: hidden; }.registry-panel > .panel-header { padding: 22px; }.registry-panel .stage-badge { position: static; }

@media (max-width: 1220px) {
  .decision-grid { grid-template-columns: minmax(230px, .7fr) 1.3fr; }
  .why-card { grid-column: 1 / -1; min-height: auto !important; }
  .why-card .factor-list { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .status-grid > :last-child { grid-column: 1 / -1; }
  .connector-grid { grid-template-columns: 1fr 1fr; }
  .connector-grid > :last-child { grid-column: 1 / -1; min-height: auto; }
}

@media (min-width: 761px) and (max-width: 1400px) {
  .caseload-table th, .caseload-table td { padding-right: 9px; padding-left: 9px; }
  .caseload-table th:nth-child(1), .caseload-table td:nth-child(1),
  .caseload-table th:nth-child(7), .caseload-table td:nth-child(7),
  .caseload-table th:nth-child(9), .caseload-table td:nth-child(9) { display: none; }
  .caseload-table td { min-width: 82px; }
  .caseload-table td:nth-child(2) { min-width: 210px; }
  .caseload-table td:nth-child(3) { min-width: 190px; }
  .caseload-table td:nth-child(6) { min-width: 145px; }
}

@media (max-width: 980px) {
  .sidebar { width: 208px; }.main-content { margin-left: 208px; padding: 25px 20px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.lower-grid, .content-grid { grid-template-columns: 1fr; }
  .worker-header { align-items: flex-start; flex-direction: column; }.worker-meta { width: 100%; justify-content: space-between; }
  .stack-panel { grid-template-columns: 1fr; }.stack-arrow { transform: rotate(90deg); justify-self: center; }.status-grid { grid-template-columns: 1fr; }.status-grid > :last-child { grid-column: auto; }
  .workflow-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { position: static; width: auto; min-height: auto; padding: 14px 16px; flex-flow: row wrap; align-items: center; }.sidebar .brand { margin: 0 auto 0 0; }.nav-list { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; }.nav-link { min-width: 0; justify-content: center; padding: 8px 7px; font-size: 12px; white-space: nowrap; }.nav-link > span[aria-hidden="true"], .nav-link-planned small { display: none; }.nav-link-text { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }.sidebar-bottom { display: none; }.main-content { margin-left: 0; padding: 22px 15px; }
  .page-header, .header-actions { flex-direction: column; }.header-actions { width: 100%; }.header-actions .button { width: 100%; }
  .filter-bar { align-items: stretch; flex-direction: column; }.filter-bar select { width: 100%; }.decision-grid { grid-template-columns: 1fr; }.why-card { grid-column: auto; }.why-card .factor-list, .domain-grid { grid-template-columns: 1fr; }.worker-meta { flex-wrap: wrap; }.metric-grid { gap: 10px; }.metric-card { min-height: 110px; padding: 16px; }
  .login-shell { grid-template-columns: 1fr; }.login-intro { display: none; }.login-form-panel { min-height: 100vh; padding: 24px; }.mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 50px; color: var(--navy); font-size: 24px; }
  .caseload-panel { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .caseload-panel > .panel-header, .filter-bar { padding-right: 0; padding-left: 0; }
  .caseload-panel .table-scroll { overflow: visible; }
  .caseload-table, .caseload-table tbody { display: block; }
  .caseload-table thead { display: none; }
  .caseload-table tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 14px rgba(25,54,78,.04); }
  .caseload-table td { display: block; min-width: 0 !important; padding: 7px 0; border: 0; }
  .caseload-table td:nth-child(1) { position: absolute; left: 15px; top: 16px; padding: 0; }
  .caseload-table td:nth-child(2) { grid-column: 1 / -1; padding: 0 38px 10px 42px; border-bottom: 1px solid #e8eef2; }
  .caseload-table td:nth-child(3), .caseload-table td:nth-child(6) { grid-column: 1 / -1; }
  .caseload-table td:nth-child(3)::before, .caseload-table td:nth-child(4)::before,
  .caseload-table td:nth-child(5)::before, .caseload-table td:nth-child(6)::before,
  .caseload-table td:nth-child(7)::before, .caseload-table td:nth-child(8)::before { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .caseload-table td:nth-child(3)::before { content: "Next milestone"; }
  .caseload-table td:nth-child(4)::before { content: "Work hours"; }
  .caseload-table td:nth-child(5)::before { content: "Risk"; }
  .caseload-table td:nth-child(6)::before { content: "Leading factor"; }
  .caseload-table td:nth-child(7)::before { content: "Evidence"; }
  .caseload-table td:nth-child(8)::before { content: "Review"; }
  .caseload-table td:nth-child(9) { position: absolute; right: 14px; top: 14px; padding: 0; }
  .worker-link small { max-width: none; white-space: normal; }
  .recovery-summary-grid { grid-template-columns: 1fr; }
  .schedule-summary { align-items: flex-start; flex-direction: column; }
  .comparison-donuts { justify-content: space-around; }
  .method-flow { grid-template-columns: 1fr; }
  .method-flow b { transform: rotate(90deg); justify-self: center; }
  .method-columns { grid-template-columns: 1fr; gap: 10px; }
  .workflow-header { align-items: flex-start; }
  .workflow-status { margin-top: -15px; }
  .workflow-steps, .connector-grid, .connection-form { grid-template-columns: 1fr; }
  .workflow-steps li { min-height: 62px; }
  .connector-grid > :last-child, .form-span-2 { grid-column: auto; }
  .connector-card { min-height: auto; }
  .connection-form fieldset { grid-template-columns: 1fr; }
  .connection-actions { flex-direction: column; }
  .connection-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
