:root {
  --brand: #2872C5;
  --ink: #000000;
  --surface: #FFFFFF;
  --section: #E8E8E8;
  --divider: #C4C4C4;
  --tier-3: #AAAAAA;
  --strong: #123F6E;
  --capture-tag: #B4C7E7;
  --error-existing: #B3261E;
  --blue: var(--brand);
  --light: var(--section);
  --smoke: var(--divider);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--strong); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button { white-space: normal; }
:focus-visible { outline: 2px solid var(--strong); outline-offset: 3px; box-shadow: 0 0 0 2px var(--surface); }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
h1 { font-size: 32px; line-height: 40px; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 24px; line-height: 32px; margin: 0 0 16px; }
h3 { font-size: 20px; line-height: 28px; margin: 0 0 12px; }
h4 { font-size: 18px; margin: 16px 0 8px; }
p { margin: 0 0 12px; }
ul { padding-left: 24px; }
.small, .muted { color: var(--ink); font-size: 13px; line-height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -100px; left: 16px; padding: 12px; background: var(--surface); z-index: 100; }
.skip:focus { top: 8px; }
.top { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 8px 24px; border-bottom: 3px solid var(--brand); }
.brand { color: var(--brand); text-decoration: none; font-weight: 700; font-size: 24px; display: flex; align-items: center; gap: 16px; }
.brand span { font-size: 16px; color: var(--ink); font-weight: 400; border-left: 1px solid var(--divider); padding-left: 16px; }
.top nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.top nav a, .top .link { min-height: 40px; display: inline-flex; align-items: center; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 24px 64px; min-width: 0; }
.crumbs { font-size: 13px; margin: 0 0 24px; overflow-wrap: anywhere; }
.title-band { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--divider); }
.title-band > div:first-child { min-width: 0; }
.title-band > button { flex-shrink: 0; }
.title-band p:last-child { margin-bottom: 0; }
.eyebrow { color: var(--strong); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.identity-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; flex-shrink: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 16px; }
.section-heading h2, .section-heading h3 { margin-bottom: 0; }
.section-heading p { margin: 4px 0 0; }
.count { display: inline-block; font-size: 13px; font-weight: 400; vertical-align: middle; padding: 2px 8px; background: var(--section); border-radius: 4px; }
.list-toolbar { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.list-toolbar label { font-weight: 700; }
.list-toolbar input { width: min(440px, 100%); }
.list-toolbar [role="status"] { font-size: 13px; }
.panel { border-top: 1px solid var(--divider); padding: 20px 0; margin: 24px 0; }
.panel > summary { font-size: 20px; line-height: 28px; }
summary { min-height: 40px; color: var(--strong); font-weight: 700; padding: 4px 0; }
.inline-section { border-top: 1px solid var(--divider); padding-top: 12px; margin-top: 16px; }
.inline-section > summary { font-size: 16px; }
.asset-card { border: 1px solid var(--divider); border-left: 4px solid var(--brand); border-radius: 6px; padding: 24px; margin: 0 0 24px; }
.access-note { background: var(--section); padding: 12px 16px; margin: 16px 0; }
.access-note strong { margin-right: 8px; }
.grid { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 20px; }
.grid th { background: var(--section); text-align: left; font-weight: 700; }
.grid th, .grid td { padding: 12px; border-bottom: 1px solid var(--divider); vertical-align: top; overflow-wrap: anywhere; }
.grid .row { margin: 0; }
.grid td a { display: inline-block; }
.grid td .btn { font-size: 14px; }
.grid th:first-child, .grid td:first-child { padding-left: 16px; }
.project-list td:first-child { width: 30%; }
.empty { padding: 24px 16px; font-size: 16px; text-align: left; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--brand); border-radius: 6px; background: var(--brand); color: var(--surface); font-weight: 700; text-decoration: none; cursor: pointer; line-height: 22px; }
.btn:hover { background: var(--strong); color: var(--surface); border-color: var(--strong); }
.btn-secondary { color: var(--brand); background: var(--surface); font-weight: 400; }
.btn-secondary:hover, .btn-secondary[aria-pressed="true"] { color: var(--strong); background: var(--section); border-color: var(--strong); }
.btn-small { min-height: 40px; font-size: 14px; }
button:disabled, input:disabled, select:disabled, textarea:disabled { background: var(--section); color: var(--ink); cursor: not-allowed; opacity: 1; border-color: var(--strong); }
.link { border: none; background: transparent; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 8px 0; }
.link:hover { color: var(--strong); }
.inline { display: inline; }
input, select, textarea { min-height: 44px; padding: 8px 10px; border: 1px solid var(--strong); border-radius: 4px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--strong); flex-shrink: 0; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 20px; }
fieldset { min-width: 0; border: 1px solid var(--divider); padding: 12px 16px 16px; border-radius: 4px; margin: 0; }
legend { padding: 0 4px; font-size: 14px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.wide { grid-column: 1 / -1; }
.form-fields { border: none; padding: 0; margin: 0; }
.form-actions, .row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.row { margin: 12px 0; }
.form-actions { margin-top: 8px; }
.save-status { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.error, .danger { color: var(--error-existing); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.checks label, .choice { display: flex; flex-direction: row; gap: 10px; align-items: center; min-height: 40px; padding: 6px 0; }
.suggestion-list [data-suggestions], #review-suggestions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 24px; }
.model-status p { font-size: 13px; }
.tag { display: inline-block; padding: 4px 8px; background: var(--section); color: var(--ink); border-radius: 4px; font-size: 12px; line-height: 18px; font-weight: 700; vertical-align: middle; }
.tag-issued { background: var(--strong); color: var(--surface); }
.tag-capture { background: var(--capture-tag); }
.notice { padding: 16px; border-left: 4px solid var(--strong); background: var(--section); margin: 16px 0; }
.notice a, .notice .link { color: var(--strong); }
.notice.error { border-left-color: var(--error-existing); }
.review-facts { display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 13px; margin: -12px 0 24px; }
#unsaved-status { font-weight: 700; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--strong); margin-bottom: 24px; padding: 4px 4px 0; overflow-x: auto; }
.tabs button { border: none; border-bottom: 4px solid transparent; background: var(--surface); padding: 12px 20px; font-size: 16px; min-height: 48px; color: var(--ink); }
.tabs button[aria-selected="true"] { border-bottom-color: var(--brand); font-weight: 700; color: var(--strong); }
.tabs button:hover { background: var(--section); }
.coverage-heading { border-left: 4px solid var(--brand); padding: 0 0 0 16px; margin-bottom: 24px; }
.coverage-heading strong { font-size: 20px; }
.coverage-heading p { margin: 4px 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.coverage-table { margin-bottom: 32px; }
.gap-list { list-style: none; padding: 0; margin: 0; }
.gap-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--divider); }
.gap-list li button { flex-shrink: 0; }
.workspace { display: grid; grid-template-columns: 248px minmax(0,1fr) 336px; align-items: start; gap: 16px; }
.area-rail { border-right: 1px solid var(--divider); padding-right: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.area-rail h3 { font-size: 16px; }
.area-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface); border: 1px solid transparent; border-bottom-color: var(--divider); padding: 12px; width: 100%; margin: 0 0 4px; color: var(--ink); }
.area-choice span { font-size: 13px; line-height: 18px; }
.area-choice[aria-current="true"] { border-color: var(--strong); border-left: 4px solid var(--brand); background: var(--section); }
.area-choice:hover { background: var(--section); }
.area-rail > .btn { margin-top: 16px; }
.evidence-panel, .record-editor { min-width: 0; }
.evidence-panel > .section-heading { align-items: flex-start; flex-wrap: wrap; }
.evidence-panel .area-outcome { margin: 16px 0 24px; border-bottom: 1px solid var(--divider); padding-bottom: 16px; }
.area-outcome .form-grid { grid-template-columns: minmax(0,1fr); }
.element-outcome label { margin-top: 12px; }
.observation-list { list-style: none; margin: 0 0 24px; padding: 0; }
.observation-choice { width: 100%; display: flex; flex-direction: column; text-align: left; border: none; border-bottom: 1px solid var(--divider); border-left: 3px solid var(--divider); background: var(--surface); padding: 12px; gap: 4px; color: var(--ink); }
.observation-choice:hover { border-left-color: var(--brand); background: var(--section); }
.photos { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(160px,100%),1fr)); gap: 16px; margin: 16px 0; }
.photo { margin: 0; border: 1px solid var(--divider); border-radius: 4px; min-width: 0; overflow: hidden; background: var(--surface); opacity: 1; }
.photo-open { display: block; width: 100%; border: 0; padding: 0; background: var(--section); min-height: 40px; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { padding: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.photo figcaption p { width: 100%; margin: 0; }
.photo .tag { font-weight: 400; }
.record-editor { border-left: 1px solid var(--divider); padding-left: 16px; max-height: calc(100vh - 32px); overflow-y: auto; position: sticky; top: 16px; padding-bottom: 8px; }
.record-editor .form-grid, #drawer-editor .form-grid { grid-template-columns: minmax(0,1fr); }
.record-editor h3:focus, #drawer-editor h3:focus { outline-offset: -2px; }
.viewer-button { border: 1px solid var(--strong); padding: 0; background: var(--section); width: 100%; cursor: zoom-in; }
.contained-photo { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.record-editor .form-actions .btn, #drawer-editor .form-actions .btn { flex: 1 1 120px; }
.code-picker { padding: 12px; }
.codes { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.codes .choice { padding: 8px; border: 1px solid var(--divider); border-radius: 4px; }
.codes .choice:has(input:checked) { background: var(--section); border-color: var(--strong); }
.link-options { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px; }
.linked-photo { display: grid; grid-template-columns: 20px 56px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 0; }
.linked-photo img { width: 56px; height: 48px; object-fit: cover; }
.linked-photo span { font-size: 12px; line-height: 18px; }
dl { font-size: 13px; margin: 12px 0; }
dt { font-weight: 700; margin-top: 8px; text-transform: none; }
dd { margin-left: 0; overflow-wrap: anywhere; }
.hash { word-break: break-all; }
.summary-area { border-bottom: 1px solid var(--divider); padding: 16px 0 24px; margin-bottom: 16px; }
.summary-observation { padding-left: 16px; border-left: 2px solid var(--divider); margin-top: 16px; }
.summary-observation p { margin: 4px 0; }
#reports > .small { margin-bottom: 24px; }
dialog { width: min(680px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--strong); border-radius: 6px; padding: 24px; color: var(--ink); background: var(--surface); overflow-y: auto; }
dialog::backdrop { background: rgb(0 0 0 / 45%); }
#lightbox { width: min(1200px,calc(100vw - 32px)); }
#lightbox img { width: 100%; height: auto; max-height: calc(100dvh - 200px); object-fit: contain; display: block; background: var(--section); }
#lightbox-caption { margin-top: 12px; }
.login { display: grid; place-items: center; min-height: 100vh; background: var(--section); }
.login .card { background: var(--surface); padding: 28px 32px; border-radius: 6px; width: min(420px,92vw); border-top: 4px solid var(--brand); }
.login form { display: flex; flex-direction: column; gap: 16px; }
@media (min-width:1200px) and (max-width:1359px) {
  .workspace { grid-template-columns: 224px minmax(0,1fr) 304px; }
}
@media (max-width:1199px) {
  .workspace { grid-template-columns: 224px minmax(0,1fr); }
  .record-editor { display: none; }
  #record-dialog { width: min(560px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin-right: 12px; }
  .evidence-panel .area-outcome .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .top { padding: 12px; gap: 8px; flex-wrap: wrap; }
  .brand { font-size: 22px; gap: 12px; }
  .brand span { font-size: 14px; padding-left: 12px; }
  .top nav { gap: 8px 16px; font-size: 13px; width: 100%; }
  .who { margin-left: auto; }
  .wrap { padding: 16px 12px 48px; }
  h1 { font-size: 24px; line-height: 32px; }
  h2 { font-size: 20px; line-height: 28px; }
  h3 { font-size: 18px; line-height: 24px; }
  .title-band { flex-direction: column; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; }
  .identity-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .title-band > button { width: 100%; }
  .crumbs { margin-bottom: 16px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .list-toolbar { gap: 8px; }
  .list-toolbar input { width: 100%; }
  .list-toolbar label { width: 100%; }
  .asset-card { padding: 16px 12px; }
  .form-grid, .evidence-panel .area-outcome .form-grid { grid-template-columns: minmax(0,1fr); }
  .suggestion-list [data-suggestions], #review-suggestions { grid-template-columns: minmax(0,1fr); }
  .btn, .link { min-height: 44px; }
  input,select,textarea { font-size: 16px; }
  .tabs { margin-inline: -4px; gap: 0; }
  .tabs button { padding: 12px; flex-shrink: 0; }
  .review-facts { margin-top: 0; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .area-rail { position: static; border-right: none; border-bottom: 1px solid var(--divider); padding: 0 0 16px; max-height: 240px; }
  .area-choice { padding: 12px; }
  .grid { display: block; }
  .grid thead { display: none; }
  .grid tbody { display: block; }
  .grid tr { display: block; border-bottom: 1px solid var(--divider); padding: 12px 0; }
  .grid td { display: block; padding: 6px 8px; border: none; width: 100% !important; }
  .grid td[data-label]::before { content: attr(data-label); font-weight: 700; display: block; margin-bottom: 4px; font-size: 12px; }
  .grid td:first-child { padding-left: 8px; }
  .gap-list li { padding: 12px 0; align-items: flex-start; }
  .gap-list li > div { min-width: 0; }
  .coverage-heading strong { font-size: 18px; }
  .filters .btn { flex: 1 1 130px; }
  dialog { padding: 16px; width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  #record-dialog { margin: 12px; }
  .sticky-actions { position: sticky; bottom: -16px; background: var(--surface); border-top: 1px solid var(--divider); padding: 12px 0 max(12px,env(safe-area-inset-bottom)); z-index: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
