:root {
  --color-bg: #f4f3f4;
  --color-surface: #ffffff;
  --color-border: #e6e6e6;
  --color-text: #1c1f24;
  --color-text-muted: #5c6370;
  /* primary/pacific-blue, transcribed literally from the Delivery Acceptance Framework Figma
     (kE3uZHEiQd2VzywM0LTauP, node 38:2) — the source of truth for this dashboard's styling.
     danger/warning are left as tuned, WCAG-AA-safe values rather than brighter equivalents
     that fail 4.5:1 text contrast on white. */
  --color-primary: #0572e6;
  --color-primary-hover: #045bb8;
  --color-danger: #c0362c;
  --color-success: #1a7f4e;
  --color-warning: #b5750a;
  --radius: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.45;
}

a { color: var(--color-primary); }

button, input, select, textarea { font: inherit; }

button {
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
}

button.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
button.primary:hover { background: var(--color-primary-hover); }
.cta-large {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  min-width: 120px;
  max-height: 56px;
}
.submit-button {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: var(--space-4);
}
button.danger { color: var(--color-danger); border-color: var(--color-danger); background: transparent; }
.button-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.button-outline:hover { background: #eef6ff; }
.icon-text-button { display: inline-flex; align-items: center; gap: 6px; }
.chevron-icon { width: 10px; height: 6px; flex-shrink: 0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="file"], textarea, select {
  width: 100%;
  padding: var(--space-2);
  border: 1px solid #666;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15.0023 8.59033'%3E%3Cpath d='M7.50116 6.46467L1.06282 0L0 1.05849L7.50116 8.59033L15.0023 1.05849L13.9395 0L7.50116 6.46467Z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 7px;
  padding-right: 40px;
}

label { display: block; font-weight: 600; margin-bottom: var(--space-1); }
.field { margin-bottom: var(--space-3); }
.hint { color: var(--color-text-muted); font-size: 0.875rem; margin-top: var(--space-1); }

.field-stack { display: flex; flex-direction: column; gap: var(--space-5); }
.field-stack .field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: 0; }
.field-stack .field label { margin: 0; font-size: 16px; font-weight: 400; color: #2b2b2b; }
.field-stack .field .hint { margin: 0; font-size: 14px; color: #6f6f6f; }

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-4);
}

.container-narrow {
  max-width: 688px;
  margin: 0 auto;
  padding: var(--space-4);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.container-wide > .section { margin-top: 0; }
.container-wide > .stat-tile-row { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: var(--space-2); border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
th { color: var(--color-text-muted); font-weight: 600; }

.tests-table, .data-table { table-layout: fixed; }
.tests-table th, .tests-table td, .data-table th, .data-table td { font-size: 13px; color: var(--color-text); }
.tests-table th, .data-table th { font-size: 12px; color: #2b2b2b; font-weight: 500; }
.tests-table th:nth-child(1) { width: 28%; }
.tests-table th:nth-child(2) { width: 8%; }
.tests-table th:nth-child(3) { width: 10%; }
.tests-table th:nth-child(4) { width: 8%; }
.tests-table th:nth-child(5) { width: 9%; }
.tests-table th:nth-child(6) { width: 10%; }
.tests-table th:nth-child(7) { width: 12%; }
.tests-table th:nth-child(8) { width: 15%; }
.tests-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tests-table td:last-child, .data-table td:last-child { overflow: visible; }
.tests-table tbody tr:nth-child(even), .data-table tbody tr:nth-child(even) { background: #f9f9f9; }

.risk-assessments-table th:nth-child(1) { width: 12%; }
.risk-assessments-table th:nth-child(2) { width: 10%; }
.risk-assessments-table th:nth-child(3) { width: 12%; }
.risk-assessments-table th:nth-child(4) { width: 14%; }
.risk-assessments-table th:nth-child(5) { width: 12%; }
.risk-assessments-table th:nth-child(6) { width: auto; }
.table-actions-row { position: static; }
.table-actions-row.menu-open { position: relative; z-index: 10; }
.score-cell.reassess { color: var(--color-danger); }
.score-cell.monitor { color: var(--color-warning); }
.score-cell.ship { color: var(--color-success); }

.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 40px; }
.copy-link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-primary);
  cursor: pointer;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}
.icon-button:hover { background: var(--color-bg); }
.icon-18 { width: 18px; height: 18px; display: block; }
.icon-20 { width: 20px; height: 20px; display: block; }
.icon-24 { width: 24px; height: 24px; display: block; }

/* Hidden via opacity + pointer-events, not display:none or clip-based tricks —
   both proved unreliable in Chrome specifically for input.click()-triggered
   file pickers: display:none blocks the picker outright in some engines, and
   the clip-rect/negative-margin version left the absolutely-positioned input
   with no explicit top/left, falling back to its "static position" — which
   Chrome and Safari resolve differently — apparently letting it sit over the
   real controls and swallow clicks in Chrome. Explicit top/left plus
   pointer-events:none removes that ambiguity entirely: the input can never
   intercept a real click (only the programmatic .click() call opens it), and
   it can't be pushed to some other position two browsers disagree on. */
.visually-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border: 0;
}

.file-field-info { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; }
.file-field-clip-badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e3f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-field-clip { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-primary); }
.file-field-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-field-size { color: var(--color-text-muted); font-size: 0.85em; flex-shrink: 0; }

.image-dropzone {
  border: 1px dashed #b8bcc2;
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: var(--space-3);
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  /* min-height is set inline by JS while dragging, frozen to whatever height
     the box measured just before the drag started (empty or loaded) — a
     hardcoded guess here always drifted a couple of px off real font metrics
     and, worse, force-stretched the naturally-compact loaded state. */
}
.image-dropzone-empty { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; }
.dropzone-icon { width: 24px; height: 24px; color: var(--color-text-muted); flex-shrink: 0; margin-top: 2px; }
.image-dropzone-title { font-weight: 600; color: var(--color-text); }
.image-dropzone-subtitle { color: var(--color-text-muted); font-size: 0.875rem; font-weight: 400; margin: 2px 0 6px; }
.image-dropzone-upload-link {
  border: none;
  background: none;
  padding: 0;
  font-weight: 400;
  color: var(--color-primary);
  cursor: pointer;
}

.image-dropzone-dragging { border-style: dashed; border-color: var(--color-primary); background: #e2f0ff; }
.image-dropzone-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
  width: 100%;
}
.dropzone-icon-active { width: 24px; height: 24px; color: var(--color-primary); }

.image-dropzone-loaded { border-style: solid; border-color: var(--color-border); cursor: default; }
.image-dropzone-loaded-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; }
.image-dropzone-remove-link {
  border: none;
  background: none;
  padding: 0;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--color-primary);
  cursor: pointer;
}

.protocol-tab-content { display: flex; flex-direction: column; gap: 40px; }
.protocol-okay-btn { padding-left: 40px; padding-right: 40px; }
.protocol-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}
.protocol-headline { font-size: 20px; line-height: 26px; color: #2b2b2b; margin: 0 0 var(--space-2); font-weight: 600; }
.protocol-description { font-size: 16px; color: #6f6f6f; margin: 0; line-height: 24px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e8ecf3;
  color: var(--color-text-muted);
}
.badge.existing { background: #e3f0ff; color: #004c97; }
.badge.new { background: #eee6ff; color: #6a3fc2; }
.badge.low { background: #e3f7ec; color: var(--color-success); }
.badge.medium { background: #fdf2e3; color: var(--color-warning); }
.badge.high { background: #fbe4e1; color: var(--color-danger); }

.status-indicator { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: 0.9rem; }
.status-icon { width: 16px; height: 16px; flex-shrink: 0; }

.stat-row { display: flex; gap: var(--space-5); margin-bottom: var(--space-3); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-number { font-size: 22px; font-weight: 700; line-height: 1; color: var(--color-text); }
.stat-meta-row { display: flex; align-items: center; gap: 4px; }
.stat-label { color: var(--color-text-muted); font-size: 12px; }
.stat-info-icon { color: var(--color-text-muted); font-size: 11px; cursor: default; }

.severity-none { color: var(--color-success); }
.severity-monitor { color: var(--color-warning); }
.severity-reevaluate { color: var(--color-danger); font-weight: 700; }

.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }

.scope-picker { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-2); }
.scope-group { border: none; padding: 0; min-width: 0; }
.scope-group-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }
.scope-group-heading { font-weight: 400; color: var(--color-text); margin: 0; }
.scope-options-row { display: flex; gap: var(--space-3); }
.scope-option-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 400;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0;
  cursor: pointer;
  background: var(--color-surface);
}
.scope-option-box:hover { border-color: var(--color-primary); }
.scope-option-box:has(input:checked) { border-color: var(--color-primary); background: #d2e6fa; }
.select-all-link { display: inline-block; font-size: 0.875rem; }

.choice-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice-group label {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  font-weight: 400;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 160px;
  cursor: pointer;
  background: var(--color-surface);
}
.choice-group label:hover { border-color: var(--color-primary); }
.choice-group label:has(input:checked) {
  border-color: var(--color-primary);
  background: #d2e6fa;
  font-weight: 600;
}
.choice-group input[type="radio"] { width: auto; }

.section { margin-top: var(--space-5); }
.section-title { font-size: 20px; font-weight: 500; margin-bottom: var(--space-3); }

.app-logo { width: 24px; height: 24px; display: block; }
.app-title { font-size: 40px; line-height: 48px; font-weight: 400; color: #1d164c; margin: 0; }
.app-subtitle { font-size: 18px; line-height: 26px; color: #666; max-width: 900px; margin: 0; }

.muted { color: var(--color-text-muted); }
.empty-state { color: var(--color-text-muted); padding: var(--space-4); text-align: center; }

.key-image {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #e5e8ed;
}

.participant-card { display: flex; flex-direction: column; gap: var(--space-3); padding: 0; overflow: hidden; }
.participant-header { padding: 0 40px; display: flex; flex-direction: column; gap: var(--space-2); }
.participant-header-titles { display: flex; flex-direction: column; gap: 4px; }
.participant-eyebrow { font-size: 16px; line-height: 24px; color: #666; margin: 0; }
.participant-title { font-size: 24px; line-height: 32px; font-weight: 500; color: #2b2b2b; margin: 0; }
.participant-form { display: flex; flex-direction: column; gap: var(--space-3); }
.participant-fields { padding: var(--space-4) 40px var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.participant-fields > .field, .participant-fields > .field-likert { margin-bottom: 0; }
.participant-fields > .field > label, .participant-fields > .field-likert > label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.participant-submit-bar {
  display: block;
  width: 100%;
  border: none;
  border-radius: 0 0 16px 16px;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: var(--space-4);
  cursor: pointer;
}
.participant-submit-bar:hover { background: var(--color-primary-hover); }
.participant-submit-bar:disabled { opacity: 0.6; cursor: not-allowed; }

.test-header-row { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-4); }
.test-header-left { flex: 1; min-width: 0; }
.test-header-image {
  display: block;
  width: 320px;
  max-width: 40%;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  object-fit: cover;
  cursor: pointer;
}
.test-header-image:hover { opacity: 0.9; }

.test-heading { margin-bottom: var(--space-4); }
.detail-tag-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.detail-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(0, 107, 222, 0.12);
  color: #0056b2;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.test-heading h1 { margin: 0 0 12px 0; font-size: 40px; line-height: 48px; font-weight: 400; color: #2b2b2b; }
.test-heading .test-heading-description { font-size: 18px; line-height: 26px; }
.section-description { font-size: 16px; line-height: 24px; color: #666; margin: 0; max-width: 900px; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  z-index: 100;
  overflow: hidden;
}
.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: var(--space-2) var(--space-3);
}
.dropdown-item:hover { background: var(--color-bg); }
.dropdown-item.danger { color: var(--color-danger); }

.squad-picker { position: relative; }
.squad-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid #666;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
  text-align: left;
}
.squad-picker-trigger-label.squad-picker-placeholder { color: var(--color-text-muted); }
.squad-picker-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  padding: var(--space-2) 0;
}
.squad-picker-option { display: flex; align-items: center; justify-content: space-between; padding: 2px var(--space-3); }
.squad-picker-option:hover { background: var(--color-bg); }
.squad-picker-option-name {
  flex: 1;
  text-align: left;
  border: none;
  background: transparent;
  padding: var(--space-2) 0;
  font-weight: 400;
}
.squad-picker-edit {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 0;
  margin-left: var(--space-3);
}
.squad-picker-edit:hover { color: var(--color-primary); }
.squad-picker-add-new {
  display: block;
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  width: 100%;
  text-align: left;
}
.squad-picker-add-new:hover { background: var(--color-bg); }

.impact-picker { position: relative; }
.impact-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid #666;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
  text-align: left;
}
.impact-picker-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.impact-picker-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  padding: var(--space-2) 0;
}
.impact-picker-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: none;
  background: transparent;
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.impact-picker-option:hover { background: var(--color-bg); }
.impact-picker-option-title { font-weight: 500; color: var(--color-text); }
.impact-picker-option-description { font-size: 13px; font-weight: 400; color: #6f6f6f; }

.callout {
  border-radius: var(--radius);
  padding: var(--space-3);
  font-size: 0.9rem;
}
.callout.warning { background: #fdf2e3; color: var(--color-warning); border: 1px solid #f4d9a6; }
.callout.info {
  background: #e2f6fd;
  color: var(--color-text);
  border: 1px solid var(--color-primary);
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
}
.callout-number { font-weight: 500; }
.callout-accent { color: var(--color-primary); font-weight: 400; }

.toast {
  position: fixed;
  bottom: var(--space-4);
  left: 50%;
  transform: translate(-50%, 12px);
  background: #1c1f24;
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}
.toast.toast-visible { opacity: 1; transform: translate(-50%, 0); }

.segmented-control {
  display: inline-flex;
  align-items: center;
  background: #e4e4e4;
  border-radius: 999px;
  padding: 2px;
  height: 36px;
  margin: var(--space-3) 0;
}
.segmented-control button,
.segmented-control label {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #2b2b2b;
  font-weight: 400;
  height: 100%;
  min-width: 96px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}
.segmented-control button.active,
.segmented-control label:has(input:checked) {
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 4px 4px rgba(0, 0, 0, 0.12);
  color: #006bde;
  font-weight: 500;
}
.segmented-control label input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.field .segmented-control { margin: 0; align-self: flex-start; }

.toggle-pill-group { display: inline-flex; gap: var(--space-2); align-self: flex-start; }
.toggle-pill-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}
.toggle-pill-group label:has(input:checked) {
  background: var(--color-surface);
  border-color: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
}
.toggle-pill-group input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 31, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-4);
}
.modal {
  background: var(--color-bg);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.modal-wide { max-width: 640px; }
.modal-image-preview { width: auto; max-width: 95vw; }
.modal-image-preview .modal-body { display: flex; }
.modal-image-preview img { display: block; max-width: calc(95vw - 48px); max-height: calc(90vh - 140px); width: auto; height: auto; }
.modal-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  min-height: 32px;
}
.modal-header h3 { margin: 0; font-size: 20px; font-weight: 500; color: #2b2b2b; }
.modal-back-link {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.modal-title-centered {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 var(--space-1);
  color: var(--color-text-muted);
}
.modal-body { padding: 0 var(--space-4) var(--space-4) var(--space-5); }

.score-card {
  padding: 0;
  border-radius: 16px;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.08), 0px 2px 8px 0px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  text-align: center;
}
.score-card-body { padding: var(--space-5) var(--space-4); }
.score-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: #1d164c;
  color: #fff;
  padding: var(--space-3) var(--space-3);
  font-size: 13px;
  text-align: left;
}
.score-headline-empty { color: var(--color-text-muted); text-align: center; }
.score-number {
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
}
.score-number.ship { color: var(--color-success); }
.score-number.monitor { color: var(--color-warning); }
.score-number.reassess { color: var(--color-danger); }
.score-band-label {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
}
.score-band-label.ship { color: var(--color-success); }
.score-band-label.monitor { color: var(--color-warning); }
.score-band-label.reassess { color: var(--color-danger); }

.confidence-bar {
  width: 560px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.confidence-bar-pointer-row { position: relative; height: 16px; }
.confidence-bar-pointer {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: #1d164c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.confidence-bar-track { display: flex; height: 36px; border-radius: 18px; overflow: hidden; }
.confidence-bar-legend { display: flex; font-size: 12px; font-weight: 500; margin-top: 2px; }
.confidence-bar-legend span { flex: 1; white-space: nowrap; }
.confidence-bar-legend span:first-child { text-align: left; color: #c12d23; }
.confidence-bar-legend span:nth-child(2) { text-align: center; color: #895300; }
.confidence-bar-legend span:last-child { text-align: right; color: #16725d; }

.score-basis-note {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.score-basis-note.risk-adjusted {
  color: var(--color-warning);
}

.stat-caption {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

.field-likert { margin-bottom: var(--space-5); }
.likert-group {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}
.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-1);
  border-radius: var(--radius);
  cursor: pointer;
}
.likert-option:hover { background: var(--color-bg); }
.likert-option input[type="radio"] {
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.stat-tile-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.stat-tile {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat-tile-number { font-size: 32px; font-weight: 700; line-height: 1; color: var(--color-text); }
.stat-tile-meta { display: flex; align-items: center; gap: 11px; }
.stat-tile-label { color: var(--color-text-muted); font-size: 13px; }
.stat-tile-clickable { cursor: pointer; }
.stat-tile-clickable:hover, .stat-tile-clickable:focus-visible, .stat-tile-clickable.stat-tile-active {
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0 0 0 2px var(--color-primary);
  outline: none;
}

.squad-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #eef1f5;
  color: var(--color-text);
}
