:root {
  font-family: system-ui, sans-serif;
  color: #202a28;
  background: #edf2f0;
  color-scheme: light;
  --ink: #202a28;
  --muted: #4d5c55;
  --rule: #c4cfca;
  --paper: #fff;
  --teal: #085d50;
  --teal-dark: #064338;
  --teal-pale: #e3efea;
  --amber: #764a17;
  --amber-pale: #fff0d6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select, input[type="file"] { color: inherit; }
button { cursor: pointer; }
::selection { background: #c8e4d7; color: #152320; }
:focus-visible { outline: 3px solid #137b67; outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
button, select { min-height: 44px; }
.frame { width: min(100% - 64px, 1112px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead-content { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 700; }
.mark { color: var(--teal); flex-shrink: 0; }
.environment { font-size: .875rem; color: var(--muted); }
.intro { display: grid; grid-template-columns: 1fr 272px; gap: 32px; align-items: end; margin-block: 48px 28px; }
h1 { max-width: 780px; font-size: 3rem; line-height: 1.07; letter-spacing: -.04em; font-weight: 730; }
.intro p { max-width: 58ch; font-size: 1rem; line-height: 1.5; color: var(--muted); margin-top: 14px; }
.principle { border-left: 1px solid #88a297; padding: 2px 0 2px 16px; font-size: .9375rem; }
.principle p { font-size: .875rem; margin-top: 5px; }
.worksheet { border: 1px solid var(--rule); background: var(--paper); border-radius: 12px; }
.worksheet-heading, .worksheet-actions, .results-head, .footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.worksheet-heading { padding: 14px 24px; border-bottom: 1px solid var(--rule); }
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.sources { display: grid; grid-template-columns: 1fr 1fr; }
.source { padding: 22px 24px; min-width: 0; }
.source + .source { border-left: 1px solid var(--rule); }
.source-title { display: flex; align-items: center; gap: 10px; }
.step { color: var(--teal); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.source p { color: var(--muted); margin-top: 7px; font-size: .875rem; line-height: 1.45; }
.picker { display: flex; align-items: center; gap: 10px; margin-top: 12px; border: 1px dashed #94a89c; border-radius: 8px; padding: 8px 10px; }
.picker-label { display: inline-flex; align-items: center; min-height: 40px; flex-shrink: 0; font-size: .875rem; font-weight: 650; border-radius: 5px; background: var(--teal-pale); color: var(--teal-dark); padding-inline: 12px; cursor: pointer; }
.picker-label:hover { background: #d4e7dd; }
.picker:has(input:focus-visible) .picker-label { outline: 3px solid #137b67; outline-offset: 2px; }
.source .file-info { margin-top: 0; overflow-wrap: anywhere; min-width: 0; }
.mapping { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1fr); gap: 8px 12px; align-items: center; margin-top: 16px; }
.mapping label { font-weight: 650; font-size: .875rem; }
.mapping label span { display: block; font-size: .8125rem; font-weight: 400; color: var(--muted); }
.mapping select { min-width: 0; width: 100%; background: #fff; border: 1px solid #94a89c; border-radius: 8px; padding: 6px 8px; font-size: .875rem; }
.register-scope { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 8px; }
.register-scope label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: .875rem; font-weight: 650; }
.register-scope input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.source .register-scope p { margin: 0 0 0 28px; }
.worksheet-actions { padding: 14px 24px; border-top: 1px solid var(--rule); }
.worksheet-actions p, .results-head p, .table-note, .scope-note { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.primary, .secondary, .text-action { display: inline-flex; gap: 10px; align-items: center; justify-content: center; font-weight: 650; border-radius: 8px; font-size: .875rem; }
.primary { background: var(--teal); color: #fff; border: 1px solid var(--teal); padding-inline: 16px; }
.primary:hover { background: var(--teal-dark); }
.secondary { border: 1px solid #94a89c; padding-inline: 13px; background: var(--paper); }
.secondary:hover { background: var(--teal-pale); }
.text-action { color: var(--teal-dark); border: 0; padding-inline: 8px; background: transparent; }
.text-action:hover { background: var(--teal-pale); }
.error { color: #7c2b19; font-size: .875rem; background: #fcece1; border-top: 1px solid #e1c4b7; padding: 12px 24px; overflow-wrap: anywhere; border-radius: 0 0 12px 12px; }
.results { margin-top: 36px; scroll-margin-top: 16px; }
.results-head { margin-bottom: 12px; }
.results-head p { margin-top: 4px; }
.pilot-request { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 12px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.pilot-request a { padding-block: 2px; color: var(--ink); font-weight: 650; text-underline-offset: 3px; }
.gap-hold { margin-bottom: 12px; padding: 10px 14px; border-radius: 8px; background: var(--amber-pale); color: var(--amber); font-size: .875rem; line-height: 1.5; }
.filters { border: 0; padding: 0; margin: 0 0 12px; min-inline-size: 0; }
#filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-option { display: flex; gap: 7px; align-items: center; position: relative; border-radius: 8px; border: 1px solid var(--rule); min-height: 44px; padding: 8px 10px; cursor: pointer; font-size: .875rem; }
.filter-option:has(:checked) { color: var(--teal-dark); background: var(--teal-pale); border-color: #8ba89b; font-weight: 680; }
.filter-option:has(:focus-visible) { outline: 3px solid #137b67; outline-offset: 2px; }
.filter-count { font-variant-numeric: tabular-nums; }
.table-shell { overflow: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); padding: 8px; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; min-width: 650px; text-align: left; font-size: .875rem; line-height: 1.45; }
th, td { padding: 11px 12px; vertical-align: top; overflow-wrap: anywhere; }
th { background: #edf2ef; color: var(--muted); }
th:nth-child(1) { width: 18%; }
th:nth-child(2) { width: 35%; }
th:nth-child(3) { width: 19%; }
tbody tr { border-top: 1px solid var(--rule); }
td p { color: var(--muted); margin-top: 3px; }
.status-label { display: inline-block; font-size: .8125rem; font-weight: 650; padding: 5px 10px; border-radius: 5px; background: #edf2ef; }
.status-gap { background: var(--amber-pale); color: var(--amber); }
.status-review { background: #f2eee1; color: #574a2e; }
.status-matched { background: var(--teal-pale); color: var(--teal-dark); }
.source-lines { color: var(--muted); font-variant-numeric: tabular-nums; }
.table-note, .scope-note { margin-top: 10px; }
.register-notes { margin-top: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; font-size: .875rem; line-height: 1.5; }
.register-notes summary { font-weight: 650; cursor: pointer; }
.register-notes ul { margin-bottom: 0; padding-left: 22px; }
.register-notes li { overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--rule); margin-top: 36px; padding-block: 14px 24px; font-size: .8125rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 8px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

@media (max-width: 740px) {
  .frame { width: calc(100% - 32px); }
  .intro { grid-template-columns: 1fr; gap: 13px; margin-block: 22px 16px; }
  h1 { font-size: 2.125rem; }
  .wide-break { display: none; }
  .intro p { margin-top: 8px; }
  .environment { display: none; }
  .worksheet-heading, .worksheet-actions, .source { padding-inline: 14px; }
  .worksheet-heading { flex-wrap: wrap; gap: 3px 12px; }
  .worksheet-heading, .worksheet-actions { padding-block: 10px; }
  .worksheet-heading h2 { font-size: 1.125rem; }
  .text-action { justify-content: flex-start; }
  .sources { grid-template-columns: 1fr; }
  .source { padding-block: 14px; }
  .source + .source { border-left: 0; border-top: 1px solid var(--rule); }
  .worksheet-actions, .results-head { flex-wrap: wrap; }
  .worksheet-actions .primary { width: 100%; }
  .table-shell { overflow: visible; border: 0; background: transparent; padding: 0; }
  table, tbody { display: block; min-width: 0; }
  thead { position: absolute; clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); margin-bottom: 8px; padding: 10px; }
  td { display: block; padding: 4px 0; min-width: 0; }
  td:nth-child(1) { grid-column: 1 / -1; }
  td:nth-child(2), td:nth-child(4) { grid-column: 1 / -1; }
  td:nth-child(3) { grid-column: 1 / -1; }
}
