:root {
  color-scheme: dark;
  --canvas: #08131c;
  --surface: #0e1e2a;
  --line: #29414e;
  --text: #eff5f8;
  --muted: #b1c3ca;
  --cyan: #79d8e4;
  --orange: #f4a66a;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 85px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.65 system-ui, "Segoe UI", sans-serif;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 9px 13px;
  transform: translateY(calc(-100% - 12px));
  background: var(--text);
  color: var(--canvas);
}
.skip-link:focus { transform: none; }
.top { border-bottom: 1px solid var(--line); }
.top-inner, .report { width: min(100% - 36px, 1120px); margin-inline: auto; }
.top-inner, .brand { display: flex; gap: 10px; align-items: center; }
.top-inner { justify-content: space-between; min-height: 68px; padding-block: 8px; }
.brand { font-size: 14px; line-height: 1.25; }
.brand img { flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { border-color: var(--cyan); }
.button-primary { border-color: var(--orange); background: var(--orange); color: #23160e; }
.button-primary:hover { background: #ffbb87; }
.top-inner > .button { flex-shrink: 0; }

.case-header { padding: clamp(24px, 5vw, 62px) 0 28px; }
.case-label { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.case-label span { margin-inline: 5px; color: var(--orange); }
h1 {
  max-width: 20ch;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(32px, 6vw, 65px);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.case-status, .footer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.case-status { margin-top: 16px; }
.badge {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  text-decoration-thickness: 1px;
}
.badge-priority { border-color: #714f37; background: #271e1a; color: #ffc393; }
.badge-review { color: var(--cyan); }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
  border: 1px solid var(--line);
}
.metrics > div { padding: 12px clamp(9px, 2vw, 19px); }
.metrics > div + div { border-inline-start: 1px solid var(--line); }
.metrics dt { color: var(--muted); font-size: 12px; }
.metrics dd { margin: 2px 0 0; font-size: 24px; font-weight: 650; line-height: 1.2; }

.report-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 24px;
  border-block: 1px solid var(--line);
  background: var(--canvas);
}
.report-nav a {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  padding-inline: 2px;
  font-size: 13px;
  font-weight: 650;
}
.report-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
  gap: clamp(16px, 4vw, 54px);
  padding-top: 25px;
}
.report-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.report-section h2, .report-details h2, .report-footer h2 {
  margin: 0 0 13px;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 650;
  line-height: 1.2;
}
.report-section p { margin: 0; overflow-wrap: anywhere; }
.assessment {
  padding: clamp(15px, 3vw, 24px);
  border: 1px solid var(--line);
  border-inline-start: 2px solid var(--cyan);
  background: var(--surface);
}
.assessment .section-type { margin-bottom: 5px; color: var(--cyan); font-size: 12px; }
.muted { color: var(--muted); }
.timeline, .evidence-list, .decision-list { margin: 0; padding: 0; list-style: none; }
.timeline { display: grid; gap: 9px; }
.alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 7px;
}
.alert + .alert { border-top: 1px solid var(--line); }
.alert:target {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  background: var(--surface);
}
.alert-marker {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}
.alert-content h3, .decision h3 { margin: 5px 0 2px; font-size: 16px; line-height: 1.35; }
.alert-meta, .decision-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.alert-meta span { color: var(--cyan); }
.alert-content > p:last-child, .evidence-item p, .decision-note { color: var(--muted); }
.evidence-list, .decision-list { display: grid; gap: 8px; }
.evidence-item, .decision { padding: 13px 15px; border: 1px solid var(--line); }
.evidence-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 12px; }
.evidence-header h3 { margin: 0; color: var(--text); font-size: 14px; }
.evidence-link { display: inline-flex; min-height: 32px; align-items: center; gap: 4px; font-size: 13px; }
.evidence-item p, .decision .decision-note { margin-top: 5px; }
.report-details { padding: 17px; border: 1px solid var(--line); background: var(--surface); }
.report-details h2 { font-size: 17px; }
.report-details dl, .report-details dd, .report-details p { margin: 0; }
.report-details dl > div { padding: 10px 0; border-top: 1px solid var(--line); }
.report-details dl > div:last-child { padding-bottom: 0; }
.report-details dt { color: var(--muted); font-size: 12px; }
.report-details dd { overflow-wrap: anywhere; font-size: 14px; }
.report-details dd p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.report-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 38px;
}
.report-footer section { padding: clamp(14px, 3vw, 22px); border: 1px solid var(--line); background: var(--surface); }
.report-footer h2 { margin-bottom: 5px; font-size: 17px; }
.report-footer p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

@media (max-width: 750px) {
  .report-body, .report-footer { grid-template-columns: minmax(0, 1fr); }
  .report-details { grid-row: 2; }
}
@media (max-width: 450px) {
  html { scroll-padding-top: 98px; }
  .top-inner, .report { width: calc(100% - 26px); }
  .report-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .report-nav a { min-height: 40px; }
}
