:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #172b41; background: #f3f5f8; --accent: #1754b8; --border: #d8e0e9; --muted: #52647a; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .15em; }
a, button, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid #3170d5; }
header, main, footer { max-width: 74rem; margin: auto; padding: 1.25rem 2rem; }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--border); max-width: none; padding-inline: max(2rem, calc((100vw - 92rem) / 2)); }
nav, .actions, .review-counts { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 550; }
nav form { margin: 0; }
main { padding-top: 1.75rem; }
h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.035em; margin: 0 0 .65rem; }
h2 { font-size: 1.2rem; line-height: 1.35; margin: 0 0 .8rem; }
h3 { font-size: 1.02rem; margin: 0 0 .5rem; }
p { margin: .5rem 0 1rem; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-block; padding: .55rem .85rem; border: 1px solid #b9c7d8; border-radius: .45rem; background: #fff; color: #233a55; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #edf3ff; border-color: #7b9dcc; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #104695; color: #fff; }
input:not([type=radio]):not([type=checkbox]):not([type=hidden]), select, textarea { max-width: 100%; padding: .55rem .65rem; color: #172b41; background: #fff; border: 1px solid #a8b7c9; border-radius: .4rem; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
textarea { width: 100%; min-height: 5rem; }
fieldset { margin: .75rem 0; border: 0; padding: 0; }
legend { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.field { margin: 1rem 0; }
.field > label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input:not([type=checkbox]):not([type=radio]), .field select { width: 100%; }
.muted, .small, small { color: var(--muted); }
.small, small { font-size: .83rem; }
.card, .panel, .task-card { background: #fff; border: 1px solid var(--border); border-radius: .65rem; }
.card, .task-card { padding: 1.15rem; margin-bottom: 1rem; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.panel-heading { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.panel-heading h2 { margin: 0; }
.card-heading, .page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.page-heading { align-items: start; }
.page-heading p { margin-bottom: 0; }
.breadcrumbs { font-size: .85rem; margin-bottom: 1rem; }
.badge { display: inline-block; font-size: .78rem; line-height: 1.4; padding: .25rem .55rem; border-radius: .3rem; font-weight: 650; }
.badge.agreed { color: #24539a; background: #e8efff; }
.badge.reviewed { color: #216247; background: #e6f3ec; }
.badge.pending { color: #7d4800; background: #fff0ce; }
.notice { padding: .85rem 1rem; margin: 1rem 0; border-radius: .4rem; background: #fff0ce; color: #714300; }
.notice.success, .messages .success { background: #e6f3ec; color: #216247; }
.notice.error, .messages .error, .errorlist { color: #9c2018; background: #fff0ed; }
.messages p { padding: .8rem 1rem; border-radius: .4rem; background: #e8efff; }
.error { color: #9c2018; }
.errorlist { padding: .5rem 1.5rem; border-radius: .3rem; }
.review-wide { max-width: 96rem; }
.review-counts { margin: 1rem 0; }
.review-tabs { display: flex; gap: 1.5rem; margin: 1.25rem 0; border-bottom: 1px solid var(--border); }
.review-tabs button { background: transparent; border: 0; border-radius: 0; color: var(--muted); padding: .65rem 0; border-bottom: 3px solid transparent; }
.review-tabs button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.review-grid { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); gap: 1.5rem; align-items: start; }
.source-document { align-self: start; overflow: hidden; }
.preview-controls { padding: .8rem 1.2rem; }
iframe { display: block; width: 100%; height: max(25rem, calc(100vh - 29rem)); border: 0; background: #e9edf2; }
.review-task-scroll { max-height: max(25rem, calc(100vh - 29rem)); overflow: auto; padding-right: .25rem; }
.workspace-group { margin-bottom: 1.25rem; }
.record-review { padding: 1rem; border: 1px solid var(--border); border-radius: .5rem; background: #f8fafc; margin: 1rem 0; }
.record-review .task-card { margin-bottom: .75rem; }
.model-values { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .75rem; margin: .8rem 0; }
.model-values > div { padding: .75rem; border: 1px solid var(--border); border-radius: .4rem; background: #f9fbff; min-width: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.5 ui-monospace, monospace; max-height: 25rem; overflow: auto; }
.model-values pre { font: inherit; margin: .2rem 0 0; }
.task-card fieldset > div { display: flex; gap: .5rem; flex-wrap: wrap; }
.task-card fieldset label { display: inline-flex; gap: .35rem; align-items: center; border: 1px solid var(--border); border-radius: .4rem; padding: .4rem .6rem; font-size: .85rem; cursor: pointer; }
.task-card fieldset label:has(input:checked) { background: #edf3ff; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.task-card fieldset label:has(input[value=""]:checked) { background: #fff; border-color: var(--border); box-shadow: none; }
.other-value { margin-top: .75rem; }
.other-value > label { display: block; margin-bottom: .35rem; }
.saved-choice { color: #216247; padding: .5rem; background: #e6f3ec; border-radius: .3rem; }
.record-values { margin: .25rem 0; }
.record-values dt { font-weight: 600; margin-top: .3rem; }
.record-values dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-match-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.record-match-fields .field:last-child { grid-column: 1 / -1; }
.savebar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; padding: .8rem 1rem; margin-top: .75rem; background: #fff; border: 1px solid var(--border); border-radius: .6rem; }
.review-notes, .technical-details { margin: 1rem 0; }
details > summary { cursor: pointer; color: #354e6c; }
details > :not(summary) { margin-top: .75rem; }
.result-group { margin: 1rem 0; padding-left: .75rem; border-left: 2px solid var(--border); }
.result-value { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.result-value p { margin: .15rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#result-panel { display: none; }
[data-view=result] #result-panel { display: block; }
[data-view=result] #values-panel { display: none; }
[data-view=needs] [data-pending=false], [data-view=needs] .inspection-only { display: none; }
.mobile-jump { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.reference-table { table-layout: fixed; font-size: .85rem; }
.reference-table thead th:first-child { width: 20%; }
.reference-table thead th:nth-child(2), .reference-table thead th:nth-child(3) { width: 15%; }
.reference-table thead th:last-child { width: 50%; }
.reference-table fieldset label { display: inline-flex; align-items: center; margin: 0 .4rem .3rem 0; }
.reference-table input:not([type=radio]):not([type=checkbox]), .reference-table select { width: 100%; }
.review-group, .review-record { background: #edf1f7; }
.review-decisions { max-height: calc(100vh - 2rem); overflow: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.guide { max-width: 48rem; }
.guide h2 { margin-top: 2rem; }
.guide li { margin-bottom: .75rem; }
[hidden] { display: none !important; }
@media (max-width: 850px) {
  header, main, footer { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 1.6rem; }
  .page-heading { display: block; }
  .page-heading > .actions { margin-top: 1rem; }
  .review-grid, .score-grid, .record-match-fields { grid-template-columns: minmax(0,1fr); }
  .review-task-scroll, .review-decisions { max-height: none; overflow: visible; }
  .mobile-jump { display: inline-block; margin: .75rem 0; }
  iframe { height: 55vh; min-height: 20rem; }
  .savebar { align-items: start; }
  .card-heading { align-items: start; }
  .task-card { padding: .85rem; }
  .reference-table { font-size: .75rem; }
  .reference-table th, .reference-table td { padding: .3rem; }
  nav { font-size: .9rem; }
}
