:root {
  font-family: "Aptos", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #192638;
  background: #f1f4f8;
  font-synthesis: none;
  --navy: #142940;
  --muted: #526276;
  --line: #dce4ed;
  --blue: #225d9f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #357fd4; outline-offset: 3px; }
.frame { width: min(1360px, calc(100% - 4.5rem)); margin-inline: auto; }
.masthead { background: #fff; border-bottom: 1px solid #d6e1ec; }
.masthead-inner { min-height: 66px; display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 7px; background: #183957;
  display: grid; place-content: center; gap: 3px;
}
.brand-mark i { display: block; width: 13px; height: 2px; border-radius: 1px; background: #a6c9eb; }
.brand-mark i:last-child { width: 8px; }
.app-name { font-size: 1rem; font-weight: 680; letter-spacing: -.02em; }
.environment {
  margin-left: auto; white-space: nowrap; font-size: .875rem; font-weight: 600;
  border-left: 1px solid var(--line); padding-left: 15px; color: var(--muted);
}
main { padding-block: 26px 50px; }
.intro {
  background: radial-gradient(ellipse at 95% 2%, #234e77, transparent 58%), var(--navy);
  color: #fff; padding: 30px 32px; min-height: 140px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.intro h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); letter-spacing: -.046em; line-height: 1.12; margin: 0; }
.intro p { color: #d7e5f1; margin: 10px 0 0; }
.button { border: 1px solid transparent; border-radius: 7px; min-height: 40px; padding: 8px 14px; font-size: .875rem; font-weight: 700; }
.button:disabled { opacity: .55; cursor: wait; }
.light { background: #f2f8ff; color: #19364f; flex: 0 0 auto; }
.light:hover { background: #dcecff; }
.primary { color: #fff; background: #1d5593; }
.primary:hover { background: #15457d; }
.secondary { color: #23476b; background: #fff; border-color: var(--line); }
.secondary:hover { background: #edf5ff; }
.sources, .unmatched { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 13px; }
summary { font-size: .9rem; font-weight: 680; padding: 11px 15px; }
form { padding: 0 16px 15px; }
form p { margin: 0 0 12px; color: var(--muted); }
.files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.files label { min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px; font-size: .875rem; font-weight: 650; }
.files input { display: block; font-size: .9rem; width: 100%; margin: 6px 0; font-weight: 400; }
.files a { font-weight: 500; }
.run-error { background: #fff0ed; border: 1px solid #efbeba; padding: 12px; border-radius: 8px; color: #8d2e28; }
.batch-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 20px 0 10px; }
.batch-line p { font-size: .9rem; margin: 0; color: var(--muted); }
.batch-line strong { color: #253c56; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px 16px; }
.metric span { display: block; color: var(--muted); font-size: .875rem; }
.metric strong { display: block; margin-top: 1px; font-size: 1.9rem; line-height: 1.18; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric.review strong { color: #a33028; }
.metric.needs_evidence strong { color: #88601b; }
.metric.clear strong { color: #16614d; }
.unmatched { background: #fff9ec; border-color: #e7d5af; color: #624311; }
.unmatched ul { margin: 0 0 12px; padding-left: 30px; font-size: .875rem; }
.workbench { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; }
.panel h2 { margin: 0; font-size: 1.13rem; letter-spacing: -.02em; }
.filter { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.filter select { color: #21374d; font-size: .875rem; margin-left: 5px; background: #fff; border: 1px solid #cdd8e4; border-radius: 6px; padding: 4px 7px; }
.table-scroll { max-height: min(70vh, 640px); overflow: auto; border-radius: 0 0 10px 10px; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; font-weight: 650; color: var(--muted); background: #f5f8fb; white-space: nowrap; position: sticky; top: 0; }
td, th { border-top: 1px solid #e4ebf2; padding: 10px 12px; }
td:first-child, th:first-child { padding-left: 15px; }
td:first-child { min-width: 113px; }
tr.target { background: #eaf3fe; }
tr.target td:first-child { box-shadow: inset 3px 0 #3677bd; }
td small { display: block; color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.trip-link, .ref-link { background: transparent; border: none; padding: 0; color: #195892; font-weight: 700; text-align: left; }
.trip-link:hover, .ref-link:hover { text-decoration: underline; }
.pill { white-space: nowrap; display: inline-block; font-size: .8125rem; font-weight: 670; padding: 3px 8px; border-radius: 5px; }
.pill.review { background: #fbe9e7; color: #8e2c25; }
.pill.needs_evidence { background: #fbf0d9; color: #775112; }
.pill.clear { background: #e3f3ed; color: #145b47; }
.case { padding: 15px; }
.case-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.case-meta { color: var(--muted); font-size: .875rem; margin: 2px 0 0; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.findings li { border: 1px solid var(--line); border-left: 3px solid #ca695f; border-radius: 6px; padding: 8px 11px; }
.findings li.needed { border-left-color: #c59647; }
.findings h3 { margin: 0; font-size: .9rem; }
.findings p { margin: 2px 0 4px; color: #354961; font-size: .875rem; overflow-wrap: anywhere; }
.ref-link { font-size: .8125rem; border-bottom: 1px dotted #8aaed1; margin-right: 10px; overflow-wrap: anywhere; }
.case details { margin-top: 11px; border-top: 1px solid var(--line); }
.case summary { padding: 9px 0 2px; }
.source-list { margin: 8px 0 0; display: grid; gap: 7px; }
.source-row { background: #f6f8fb; padding: 7px 9px; border-radius: 5px; font-size: .875rem; overflow-wrap: anywhere; }
.source-row:focus { background: #eaf3fe; }
.source-row dt { font-weight: 680; }
.source-row dd { color: #40546c; margin: 2px 0 0; }
.empty { color: var(--muted); margin: 8px 0; }
@media (max-width: 940px) {
  .frame { width: calc(100% - 2rem); }
  .workbench { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .frame { width: calc(100% - 1.375rem); }
  .intro { align-items: flex-start; flex-direction: column; min-height: auto; padding: 20px; gap: 16px; }
  .masthead-inner { gap: 7px; }
  .app-name { font-size: .875rem; }
  .environment { padding-left: 7px; }
  .files, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .files { grid-template-columns: 1fr; }
  .metric { padding: 9px 12px; }
}
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 9px 11px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted);
}
.pagination .button { min-height: 34px; padding: 4px 9px; }
.pagination .button:disabled { cursor: default; }
.workspace-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .65rem; margin-top: .85rem; }
.workspace-tools .sources { margin: 0; }
.workspace-tools .sources[open] { flex-basis: 100%; }
.workspace-tools .sources > summary { padding: .65rem 1rem; color: #244563; }
.workspace-tools .sources[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.history-content, .signin { padding: .2rem 1rem 1rem; }
.signin { margin-top: 1rem; padding-top: 1rem; }
.history-toolbar, .report-heading, .review-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.history-toolbar h2, .review-heading h3 { font-size: 1rem; margin: 0; }
#run-list, .timeline { padding: 0; list-style: none; }
#run-list li { border-top: 1px solid var(--line); padding: .55rem 0; }
.run-button { background: none; border: none; text-align: left; color: var(--blue); font: inherit; font-weight: 650; padding: 0; }
.run-button:hover { text-decoration: underline; }
.run-item-info, .timeline small { display: block; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.notice { background: #e8f2fa; border: 1px solid #ccdfef; padding: .6rem .85rem; border-radius: 7px; color: #214f75; }
.view-switch { display: flex; gap: .25rem; border-bottom: 1px solid #cbd6e2; margin: .55rem 0 1rem; }
.view-switch button { background: none; color: var(--muted); border: 0; border-bottom: 3px solid transparent; padding: .65rem .75rem; font-weight: 620; }
.view-switch button[aria-pressed=true] { border-bottom-color: var(--blue); color: #194f83; }
.review-block { margin-top: 1rem; padding: .8rem; background: #f5f8fc; border: 1px solid var(--line); border-radius: 7px; }
.review-block form { padding: 0; }
.review-block label { display: block; color: #30465d; font-size: .875rem; font-weight: 650; margin-top: .65rem; }
.review-block select, .review-block textarea { display: block; border: 1px solid #b8cadb; border-radius: 5px; color: var(--navy); background: white; font: inherit; padding: .45rem .55rem; margin: .2rem 0 .55rem; max-width: 100%; }
.review-block textarea { width: 100%; resize: vertical; min-height: 4rem; }
.timeline li { border-top: 1px solid var(--line); padding: .5rem 0; font-size: .875rem; overflow-wrap: anywhere; }
.timeline li p { white-space: pre-wrap; margin: .2rem 0; }
.review-state { color: #3b4f62; font-size: .875rem; }
.management { padding: clamp(1rem, 3vw, 2.6rem); }
.report-heading { align-items: start; padding-bottom: 1.1rem; border-bottom: 2px solid var(--navy); }
.report-heading h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.report-heading p, .report-meta { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; overflow-wrap: anywhere; }
.report-lead { font-size: 1.15rem; max-width: 70ch; margin-block: 1.5rem; color: #22364a; }
.report-grid { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
.report-part { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 7px; }
.report-part h3 { margin: 0 0 .45rem; font-size: 1.04rem; }
.report-part p { margin: .3rem 0; }
.report-detail { margin: .6rem 0 0; }
.report-detail div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: .3rem; }
.report-detail dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 640; }
.case-meta, .batch-line p { overflow-wrap: anywhere; }
#account { min-height: 32px; padding: 4px 9px; }
@media (max-width: 690px) {
  .batch-line { flex-direction: column; align-items: start; gap: .6rem; }
  .report-grid { grid-template-columns: 1fr; }
  .masthead-inner { flex-wrap: wrap; padding-block: .45rem; }
}
@page { size: auto; margin: 16mm; }
@media print {
  html, body { background: white; color: black; }
  .frame { width: 100%; margin: 0; padding: 0; }
  .masthead, .intro, #workspace-tools, #signin, #run-error, #notice, .batch-line, .view-switch,
  #workbench-view, .management button { display: none !important; }
  #management { display: block !important; border: none; border-radius: 0; padding: 0; }
  .report-grid { display: block; }
  .report-part { border: none; border-top: 1px solid #a4acb3; padding: .5rem 0; break-inside: avoid; }
  .report-heading { break-after: avoid; }
  .report-lead { margin-block: .75rem; }
}
.files .evidence-tool { display: block; font-size: .8125rem; margin-top: .5rem; }
