:root {
  color-scheme: light;
  --ink: #1c3540;
  --muted: #566a73;
  --teal: #17695f;
  --teal-dark: #134f49;
  --navy: #123746;
  --paper: #fff;
  --background: #f3f6f7;
  --line: #dfe8eb;
  --rail: 225px;
  --shadow: 0 2px 6px #14394606;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: default; opacity: .65; }
a { color: var(--teal); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #6fb5a2; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip { position: fixed; z-index: 100; top: -80px; left: 15px; padding: 9px 15px; color: #fff; background: var(--navy); }
.skip:focus { top: 15px; }
.icon { display: inline-block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); display: flex; flex-direction: column; padding: 27px 17px 21px; background: #fcfdfd; border-right: 1px solid var(--line); z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; margin: 0 4px; }
.brand-symbol { display: grid; place-items: center; width: 43px; height: 43px; background: var(--navy); color: #b7ead6; border-radius: 12px; flex: 0 0 auto; }
.brand-symbol .icon { width: 25px; height: 25px; }
.brand strong { display: block; font-size: 23px; letter-spacing: -.8px; line-height: 1.1; }
.brand small { display: block; font-size: 8px; letter-spacing: 1.5px; font-weight: 700; margin-top: 5px; }
.rail-label { margin: 44px 11px 12px; font-size: 9px; letter-spacing: 1.45px; color: #61757d; font-weight: 750; }
.main-nav { display: grid; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 8px; text-decoration: none; color: #536a73; font-size: 13px; font-weight: 600; min-width: 0; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--teal-dark); background: #e6f1ed; }
.main-nav a[aria-current] { font-weight: 750; }
.main-nav b { margin-left: auto; padding: 1px 7px; background: #d7ebe3; border-radius: 6px; font-size: 10px; }
.rail-foot { margin-top: auto; }
.rail-safe { display: flex; align-items: center; gap: 9px; padding: 11px; border-radius: 9px; background: #edf5f2; color: var(--teal-dark); font-size: 11px; font-weight: 700; }
.rail-safe small { display: block; margin-top: 2px; font-size: 10px; font-weight: 450; }
.rail-foot > p { margin: 18px 5px 0; font-size: 8px; letter-spacing: 1.4px; color: #627980; display: flex; justify-content: space-between; }
.content-shell { margin-left: var(--rail); min-height: 100dvh; }
.topbar { min-height: 66px; padding: 11px 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #fcfdfd; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumb i { color: #9db0b6; font-style: normal; }
.breadcrumb strong { color: var(--ink); }
.mode-picker { display: flex; padding: 4px; border: 1px solid #dbe7e9; background: #f1f5f6; border-radius: 8px; }
.mode-picker button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.mode-picker button[aria-pressed="true"] { color: var(--teal-dark); background: white; box-shadow: 0 1px 4px #12374615; }
main { width: min(100%, 1440px); padding: 25px 36px 32px; margin: 0 auto; outline: none; }
.footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1368px; margin: 0 36px; padding: 18px 0 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 9px 13px; min-height: 38px; text-decoration: none; font-size: 12px; font-weight: 680; line-height: 1.3; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.primary { background: var(--teal); color: white; }
.primary:hover { background: var(--teal-dark); }
.primary.light { background: #bee7d5; color: #123c3d; }
.primary.light:hover { background: #d4f1e2; }
.secondary { border-color: #d6e3e6; background: white; color: #2e5660; }
.secondary:hover { background: #f2f8f7; }
.text { color: var(--teal-dark); background: transparent; padding: 5px 6px; min-height: 29px; }
.text:hover { text-decoration: underline; }
.hero-secondary { border-color: #659599; color: #e3f4ee; background: #32616b70; }
.hero-secondary:hover { background: #32616b; }
.danger { background: #9d403a; color: white; }
.danger:hover { background: #87342f; }
.mode-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; padding: 10px 13px; color: #3b625c; background: #eaf5ef; border: 1px solid #d3e9de; border-radius: 8px; font-size: 12px; }
.mode-banner.local { color: #405e71; background: #edf4fa; border-color: #d9e7f0; }
.mode-banner > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mode-banner > .button { margin-left: auto; flex: 0 0 auto; font-size: 11px; }
.mode-banner > .icon { width: 17px; }
.hero { min-height: 278px; position: relative; overflow: hidden; display: flex; align-items: center; background: linear-gradient(110deg, #123746 12%, #215462 72%, #2b616b); color: #edf9f5; padding: 31px 34px; border-radius: 14px; }
.hero-copy { z-index: 1; max-width: 510px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; background: #a8e2d020; border: 1px solid #9cd5c23d; border-radius: 20px; color: #c6e7dd; font-size: 9px; font-weight: 740; letter-spacing: 1.1px; }
.hero-kicker i, .pill i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hero h1 { margin: 12px 0; font-size: clamp(39px, 5vw, 63px); line-height: .99; letter-spacing: -.05em; font-weight: 720; }
.hero p { max-width: 400px; color: #cce2e2; font-size: 13px; margin: 14px 0 20px; }
.hero-graphic { width: min(45%, 470px); position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat, .panel { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.stat { padding: 16px 17px 15px; }
.stat-top { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); font-weight: 650; }
.stat-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; flex: 0 0 auto; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.teal { background: #e2f2ea; color: #287565; }
.stat-icon.blue { background: #e9f1fa; color: #39698c; }
.stat-icon.amber { background: #fbefd9; color: #895d22; }
.stat > strong { display: block; font-size: 33px; letter-spacing: -.04em; font-weight: 730; margin: 7px 0 1px; font-variant-numeric: tabular-nums; }
.stat small, .panel-head p, .arm-row small, .recent-code small { display: block; color: var(--muted); font-size: 11px; }
.overview-grid, .analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 17px; margin-bottom: 17px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 17px 19px 14px; }
h1, h2, h3, p { margin-top: 0; }
.panel-head h2 { font-size: 16px; margin: 0; letter-spacing: -.015em; }
.panel-head p { margin: 4px 0 0; line-height: 1.5; }
.arm-row { display: grid; grid-template-columns: 37px 1fr auto; gap: 10px; align-items: start; margin: 0 19px; padding: 14px 0; border-bottom: 1px solid #eef3f5; }
.arm-row:last-of-type { border: 0; }
.arm-row strong, .recent-code { display: block; font-size: 13px; }
.arm-row b { font-size: 18px; padding: 0 3px; }
.arm-letter { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-weight: 750; font-size: 13px; }
.arm-a { background: #eaf1f9; color: #315b7a; }
.arm-b { background: #e4f4eb; color: #286656; }
.arm-chip { display: inline-block; border-radius: 5px; padding: 3px 7px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.track { height: 5px; border-radius: 8px; overflow: hidden; background: #ecf2f3; margin-top: 8px; }
.track span { display: block; height: 100%; background: #56a991; border-radius: inherit; }
.panel-foot { display: flex; align-items: center; gap: 8px; padding: 12px 19px; border-top: 1px solid #edf2f4; background: #fbfcfc; color: var(--muted); font-size: 11px; line-height: 1.6; border-radius: 0 0 11px 11px; }
.panel-foot .icon { width: 15px; height: 15px; }
.recent-row { display: grid; grid-template-columns: 1fr auto 17px; align-items: center; gap: 9px; padding: 9px 19px; border-top: 1px solid #edf2f4; color: var(--ink); text-decoration: none; }
.recent-row:hover { background: #f5faf8; }
.recent-code { font-weight: 700; }
.recent-row > .icon { width: 15px; color: #5f9189; }
.pill { display: inline-flex; align-items: center; justify-content: center; width: max-content; gap: 6px; border-radius: 14px; padding: 4px 8px; font-size: 10px; font-weight: 670; white-space: nowrap; }
.pill.slate { background: #edf1f3; color: #52666e; }
.pill.green, .pill.teal { background: #e4f3eb; color: #286b58; }
.pill.blue { background: #e8f1f9; color: #386780; }
.pill.amber { background: #fcf0db; color: #805820; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 22px 0 18px; }
.kicker { color: #4b7e73; font-weight: 750; font-size: 10px; letter-spacing: 1.4px; }
.page-heading h1 { font-size: clamp(29px, 4vw, 41px); line-height: 1.14; margin: 6px 0 6px; letter-spacing: -.035em; }
.page-heading p { color: var(--muted); margin-bottom: 0; font-size: 13px; }
.heading-actions { justify-content: flex-end; }
.table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 15px; }
.table-actions { margin-left: auto; }
.table-toolbar select, .search input { padding: 8px 10px; min-height: 38px; }
.search { position: relative; min-width: 150px; }
.search .icon { position: absolute; top: 11px; left: 10px; width: 15px; color: var(--muted); }
.search input { width: 100%; padding-left: 33px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; white-space: nowrap; }
th, td { padding: 12px 13px; border-bottom: 1px solid #e9f0f2; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
thead th { background: #f4f8f9; color: #45616c; font-size: 11px; font-weight: 680; }
tbody th { font-weight: 630; }
tbody tr:last-child > * { border-bottom: none; }
tbody tr:hover { background: #fafcfc; }
td { color: #3c5863; font-variant-numeric: tabular-nums; }
td small, th small { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); font-weight: 450; }
.code-link { text-decoration: none; font-weight: 740; }
.code-link:hover { text-decoration: underline; }
.row-link { display: inline-grid; place-items: center; min-height: 29px; min-width: 29px; border-radius: 6px; background: #edf5f2; }
.row-link .icon { width: 15px; }
.empty { text-align: center; padding: 45px 18px; white-space: normal; }
.empty.compact { padding: 24px; }
.empty h3 { font-size: 17px; margin: 12px 0 4px; }
.empty p { color: var(--muted); margin: 0 0 12px; }
.empty-icon { display: inline-grid; place-items: center; color: var(--teal); background: #eaf4f0; width: 43px; height: 43px; border-radius: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 12px; font-weight: 650; }
.back-link .icon { width: 15px; }
.case-heading .page-heading { margin-top: 13px; }
.case-tabs { display: flex; gap: 5px; border-bottom: 1px solid #d8e5e8; margin: 12px 0 17px; overflow-x: auto; }
.case-tabs a { color: var(--muted); padding: 9px 13px; border-bottom: 2px solid transparent; text-decoration: none; font-size: 12px; font-weight: 650; white-space: nowrap; }
.case-tabs a.active { color: var(--teal-dark); border-color: var(--teal); }
.form-panel { max-width: 1000px; }
.form-body, .inside { padding: 0 19px 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; }
.field > span { color: #3b5863; font-size: 12px; font-weight: 640; }
input:not([type="checkbox"]), select { min-width: 0; border: 1px solid #d7e4e7; background: #fff; color: var(--ink); border-radius: 7px; padding: 9px 10px; font-size: 13px; }
input:read-only:not([type="checkbox"]) { background: #f3f7f8; }
.field input, .field select { min-height: 40px; width: 100%; }
.field input:hover, .field select:hover { border-color: #8eb8b2; }
.check-field { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #3a5962; margin: 10px 0 0; }
.check-field input { width: 16px; height: 16px; accent-color: var(--teal); flex-shrink: 0; margin: 1px 0 0; }
.check-grid { display: grid; gap: 0 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section { margin-top: 17px; border-top: 1px solid #e7eef0; padding-top: 16px; }
.form-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.form-section h3, .subhead h3 { font-size: 14px; margin-bottom: 8px; }
.form-section p, .subhead p { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.form-fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
.form-actions { justify-content: flex-end; margin-top: 16px; }
.form-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 7px; background: #fcebe8; color: #8c3028; font-size: 12px; }
.notice, .guard { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; margin: 14px 0; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.notice > .icon, .guard > .icon { width: 17px; height: 17px; margin-top: 1px; }
.notice p, .guard p { margin: 3px 0 0; }
.notice.neutral { background: #eef4f7; color: #416373; }
.notice.amber, .guard.amber { background: #fcf1dd; color: #755018; }
.notice.teal, .guard.teal { background: #e7f3ee; color: #285b4d; }
.guard ul { margin: 4px 0 0; padding-left: 18px; }
.small { font-size: 11px; }
.muted { color: var(--muted); }
.form-body > p.small { margin: 11px 0 0; }
.subhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.subhead h3, .subhead p { margin-bottom: 3px; }
.image-box { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border: 1px dashed #a4c8c2; border-radius: 8px; background: #f7fbfa; }
.image-box > div { flex: 1; }
.image-box strong { font-size: 12px; }
.image-box p { font-size: 11px; margin: 2px 0; }
.file-label { position: relative; overflow: hidden; cursor: pointer; }
.file-label:focus-within { outline: 3px solid #6fb5a2; outline-offset: 2px; }
.file-label:has(input:disabled) { opacity: .55; cursor: default; }
.file-label input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: inherit; }
#image-message { margin: 6px 0; }
#image-preview img { display: block; width: auto; max-width: min(100%, 420px); max-height: 250px; border-radius: 8px; object-fit: contain; }
.evaluation-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: end; margin-top: 17px; color: var(--muted); font-size: 12px; }
.evaluation-toolbar > span { padding-bottom: 8px; }
.evaluation-toolbar .form-grid { min-width: min(100%, 330px); }
.evaluation-panel, .protocol-panel { margin-bottom: 17px; }
.analysis-grid .protocol-panel { margin-bottom: 0; }
.analysis-table td, .analysis-table tbody th { white-space: normal; }
.analysis-table td b { color: var(--teal-dark); }
.matrix { margin-top: 13px; }
.matrix td, .matrix thead th:not(:first-child) { text-align: center; }
.matrix .matrix-cell { background: rgb(61 109 145 / var(--intensity)); font-weight: 650; }
.matrix .diagonal { background: rgb(51 153 121 / var(--intensity)); }
.timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 1px 19px 19px; gap: 12px; }
.timeline > div { padding: 13px; background: #f3f8f7; border-radius: 8px; border: 1px solid #e1ede9; }
.timeline span { display: inline-block; color: var(--teal); background: #ddf0e8; border-radius: 6px; padding: 3px 6px; font-size: 10px; font-weight: 750; }
.timeline h3 { margin: 8px 0 4px; font-size: 13px; }
.timeline p, .prose p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.prose p + p, .prose .actions { margin-top: 11px; }
dialog { width: min(430px, calc(100% - 32px)); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 23px; box-shadow: 0 10px 60px #12374638; }
dialog::backdrop { background: #12374666; }
dialog h2 { margin-bottom: 6px; font-size: 19px; }
dialog p { color: var(--muted); }
.toast { position: fixed; bottom: 18px; right: 21px; z-index: 4; background: var(--navy); color: #fff; border-radius: 8px; box-shadow: 0 6px 24px #1237462b; max-width: min(450px, calc(100vw - 42px)); padding: 11px 15px; font-size: 13px; }
.toast.error { background: #9d403a; }
@media (max-width: 1100px) {
  :root { --rail: 185px; }
  .rail { padding-inline: 12px; }
  .brand strong { font-size: 21px; }
  .main-nav a { font-size: 12px; }
  main, .topbar { padding-inline: 23px; }
  .footer { margin-inline: 23px; }
  .stat { padding: 13px; }
  .stat-top { font-size: 11px; gap: 6px; }
  .hero-graphic { right: 14px; }
}
@media (max-width: 850px) {
  :root { --rail: 65px; }
  .rail { padding: 16px 8px; align-items: center; }
  .brand > span:last-child, .rail-label, .main-nav a > span:nth-child(2), .main-nav b, .rail-foot { display: none; }
  .brand-symbol { width: 39px; height: 39px; }
  .main-nav { margin-top: 27px; width: 100%; }
  .main-nav a { justify-content: center; height: 44px; }
  .hero-graphic { opacity: .8; }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat > strong { font-size: 28px; }
}
@media (max-width: 670px) {
  :root { --rail: 0px; }
  .rail { position: static; padding: 10px 12px 7px; align-items: stretch; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-left: 0; }
  .brand > span:last-child { display: block; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 7px; }
  .main-nav { display: flex; justify-content: space-between; margin-top: 8px; gap: 3px; }
  .main-nav a { flex: 1; padding: 5px 4px; height: 35px; gap: 4px; white-space: nowrap; font-size: 10px; }
  .main-nav .icon { width: 14px; height: 14px; }
  .main-nav a > span:nth-child(2) { display: block; }
  .topbar { min-height: 47px; padding: 6px 12px; }
  .breadcrumb span, .breadcrumb i { display: none; }
  main { padding: 12px 12px 21px; }
  .footer { margin-inline: 12px; font-size: 9px; }
  .mode-banner { margin-bottom: 11px; padding: 8px; gap: 6px; font-size: 10px; }
  .mode-banner > div { gap: 2px; }
  .mode-banner > .button { font-size: 9px; }
  .mode-banner .button .icon { display: none; }
  .hero { padding: 19px; min-height: 238px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 12px; max-width: 330px; }
  .hero-graphic { right: -28px; opacity: .35; width: 55%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
  .stat-icon { width: 27px; height: 27px; }
  .stat > strong { font-size: 27px; }
  .stat small { font-size: 10px; }
  .overview-grid, .analysis-grid { grid-template-columns: 1fr; gap: 11px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; margin-top: 15px; }
  .heading-actions { justify-content: flex-start; }
  .table-actions { margin-left: 0; }
  .form-grid { gap: 10px; }
  .check-grid { grid-template-columns: 1fr; }
  .evaluation-toolbar { flex-wrap: wrap; }
  .evaluation-toolbar > span { padding-bottom: 0; }
  .evaluation-toolbar .form-grid { flex: 1; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .main-nav .icon { display: none; }
  .hero .button { font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .evaluation-toolbar .form-grid { grid-template-columns: 1fr 1fr; }
  .image-box { flex-wrap: wrap; }
  .image-box .file-label { margin-left: 37px; }
  .case-tabs a { padding-inline: 7px; font-size: 11px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; }
  .rail, .topbar, .footer, .button, .skip, .toast { display: none !important; }
  .content-shell { margin: 0; }
  main { padding: 0; width: 100%; }
  .panel, .stat, .timeline > div { break-inside: avoid; box-shadow: none; }
  .table-scroll { overflow: visible; }
  table { white-space: normal; }
  td, th { padding: 5px 6px; font-size: 8pt; }
  .stats, .analysis-grid { gap: 7px; }
  .stat { padding: 8px; }
  .stat-top, .stat small, .panel-foot, .mode-banner { font-size: 8pt; }
}
