:root {
  --navy: #183448;
  --navy-deep: #102b3c;
  --teal: #146d69;
  --teal-hover: #0c5552;
  --ink: #243744;
  --muted: #526572;
  --canvas: #f3f5f5;
  --border: #d5dfe2;
  --control-border: #71838f;
  --soft: #eaf2f1;
  --error: #952e26;
  --error-soft: #fff3f1;
  --focus: #b15b00;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--navy-deep); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled, fieldset:disabled button { cursor: wait; opacity: .65; }
input, select, textarea { width: 100%; border: 1px solid var(--control-border); border-radius: .35rem; background: white; color: var(--ink); padding: .65rem .8rem; min-height: 2.9rem; }
input:disabled, select:disabled, textarea:disabled { background: #edf0f2; }
textarea { resize: vertical; }
select { padding-right: 2rem; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
label { display: block; font-weight: 650; margin-bottom: .4rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: 3px solid var(--focus); outline-offset: 4px; }
#main:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); letter-spacing: -.035em; margin-bottom: .6rem; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: .7rem; }
h3 { font-size: 1.05rem; margin-bottom: .65rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .6rem; left: .6rem; background: white; padding: .8rem 1rem; z-index: 20; }
/* Clipped, not moved off-screen: a shifted fixed link showed as a sliver in full-page screenshots and printed over the text on every page. */
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { color: white; background: var(--navy-deep); }
.header-inner, .nav-inner { max-width: 80rem; margin: 0 auto; padding: 1.1rem 2.5rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.brand { color: white; display: flex; align-items: center; gap: .8rem; text-decoration: none; font-size: 1.08rem; font-weight: 700; line-height: 1.3; letter-spacing: .02em; }
.brand:hover { color: white; }
.brand-mark { font-size: .8rem; display: grid; place-items: center; border: 1px solid #8aa3ae; border-radius: .4rem; width: 2.9rem; height: 2.9rem; color: #c3e7e2; letter-spacing: .02em; }
.brand-subtitle { display: block; font-size: .72rem; font-weight: 400; color: #cedbe1; margin-top: .2rem; letter-spacing: .05em; }
.session-info { display: flex; align-items: center; gap: 1.2rem; font-size: .875rem; }
.session-name { max-width: 20rem; overflow-wrap: anywhere; }
.site-nav { background: white; border-bottom: 1px solid var(--border); }
.nav-inner { padding-top: 0; padding-bottom: 0; }
.nav-inner > a { padding: .85rem .1rem; color: var(--navy); text-decoration: none; border-bottom: 3px solid var(--teal); font-weight: 650; }
.nav-context { color: var(--muted); font-size: .85rem; }
.main-container { max-width: 80rem; padding: 2.6rem 2.5rem 4rem; margin: 0 auto; min-height: calc(100vh - 13rem); }
.site-footer { max-width: 80rem; margin: 0 auto; padding: 1.2rem 2.5rem; color: var(--muted); font-size: .75rem; border-top: 1px solid var(--border); }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 750; color: var(--teal); margin-bottom: .65rem; }
.lead { font-size: 1.06rem; color: var(--muted); line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.page-heading p { margin-bottom: 0; }
.page-heading .eyebrow { margin-bottom: .6rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .65rem; border: 1px solid transparent; border-radius: .4rem; padding: .65rem 1rem; min-height: 2.8rem; text-decoration: none; font-weight: 650; font-size: .88rem; white-space: normal; text-align: center; line-height: 1.45; }
.button-primary { background: var(--teal); border-color: var(--teal); color: white; }
.button-primary:hover { background: var(--teal-hover); color: white; }
.button-secondary { background: white; border-color: var(--control-border); color: var(--navy); }
.button-secondary:hover { background: var(--soft); }
.button-quiet { background: transparent; color: var(--teal); }
.button-quiet:hover { background: var(--soft); }
.button-header { background: transparent; border-color: #7b98a7; color: white; padding: .4rem .8rem; min-height: 2.6rem; }
.button-header:hover { background: #23485c; }
.full-width { width: 100%; }
.panel { border: 1px solid var(--border); background: white; border-radius: .65rem; padding: 1.7rem; box-shadow: 0 2px 4px #102b3c03; min-width: 0; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.section-heading > *, .page-heading > * { min-width: 0; }
.section-heading h2, .section-heading h3, .page-heading h1 { overflow-wrap: anywhere; }
.section-heading h2 { margin-bottom: .55rem; }
.form-panel { margin-bottom: 1.5rem; border-top: 3px solid var(--teal); }
.form-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.2rem; }
.field { margin: 0 0 1.15rem; }
.paired-field { margin-top: 1.15rem; }
.required { color: var(--muted); font-size: .8rem; font-weight: 400; }
.field-hint { margin: .4rem 0 0; color: var(--muted); font-size: .8rem; }
.field-error { margin: .4rem 0 0; color: var(--error); font-weight: 600; font-size: .85rem; }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.form-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.error-summary { border: 1px solid #ba7771; border-left: 4px solid var(--error); background: var(--error-soft); color: var(--error); border-radius: .35rem; padding: 1rem 1.2rem; margin-bottom: 1.4rem; overflow-wrap: anywhere; }
/* A link styled as a button keeps the button's own colours: the error colour on a primary button's blue fill measured 1.46:1. */
.error-summary h2, .error-summary h3, .error-summary a:not(.button) { color: var(--error); }
.error-summary .button { min-height: 3rem; }
.error-summary p, .error-summary ul { margin-bottom: .5rem; }
.error-summary ul:empty { display: none; }
.notice { border: 1px solid #94b7af; border-left: 4px solid var(--teal); border-radius: .35rem; background: var(--soft); padding: 1rem 1.2rem; margin-bottom: 1.4rem; }
.recovery { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 1.2rem; }
.recovery .button { margin: 0 .5rem .5rem 0; }
.cases-panel { padding: 0; overflow: hidden; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 1.7rem; border-bottom: 1px solid var(--border); }
.list-toolbar h2 { margin-bottom: .3rem; }
.list-toolbar p { margin: 0; }
.toolbar-controls { display: flex; align-items: center; gap: .7rem; }
.inline-field { margin: 0; display: flex; align-items: center; gap: .5rem; }
.inline-field label { margin: 0; font-size: .8rem; }
.inline-field select { font-size: .85rem; max-width: 14rem; }
.case-row { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 12rem 3rem; align-items: center; gap: 1rem; padding: 1.25rem 1.7rem; border-bottom: 1px solid var(--border); }
.case-row:last-child { border-bottom: 0; }
.case-row:hover { background: #f8faf9; }
.case-name { font-size: 1rem; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.case-name:hover { text-decoration: underline; }
.case-caption { font-size: .75rem; color: var(--muted); margin: .3rem 0 0; }
.case-time { color: var(--muted); font-size: .8rem; }
.case-arrow { font-size: 1.3rem; color: var(--teal); text-align: right; }
.badge { display: inline-block; max-width: 100%; border: 1px solid #a9c9c3; border-radius: .25rem; background: var(--soft); color: #17524e; padding: .2rem .5rem; font-weight: 650; font-size: .72rem; line-height: 1.5; overflow-wrap: anywhere; }
.badge-neutral { color: var(--muted); background: #f0f3f4; border-color: var(--border); }
.pagination { padding: 1.2rem 1.7rem; border-top: 1px solid var(--border); text-align: center; }
.empty-state { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.empty-state h3 { font-size: 1.2rem; }
.scope-note { margin: 1rem 0; font-size: .8rem; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 1.4rem; text-decoration: none; font-size: .85rem; font-weight: 650; }
.section-nav { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.7rem; }
.section-nav a { padding: .5rem 0 .75rem; text-decoration: none; font-size: .85rem; font-weight: 650; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.5rem; }
.workspace-main, .workspace-aside { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.workspace-main > section { scroll-margin-top: 1rem; }
.context-panel { border-top: 3px solid var(--teal); }
.feature-panel { background: #f9fafb; }
.feature-panel .badge { margin-bottom: 1rem; }
.value-list { margin: 0; }
.value-item { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 1.4fr); gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.value-item dt { color: var(--muted); font-size: .85rem; }
.value-item dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.value-source { margin-top: .4rem; color: var(--muted); font-size: .75rem; }
.current-value { padding: 1rem; background: #f4f7f7; border: 1px solid var(--border); border-radius: .35rem; margin: .4rem 0 1.3rem; overflow-wrap: anywhere; }
.current-value > p { margin-bottom: .4rem; }
.rename-details { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 1.5rem; }
.rename-details summary { color: var(--teal); font-size: .9rem; font-weight: 650; padding: .3rem 0; }
.rename-details form { margin-top: 1rem; }
.history-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.history-item { position: relative; padding: 0 0 1.5rem 1.4rem; border-left: 2px solid var(--border); }
.history-item::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--teal); position: absolute; top: .45rem; left: -.36rem; }
.history-item:last-child { padding-bottom: 0; }
.history-title { font-size: .93rem; font-weight: 650; color: var(--navy); margin-bottom: .25rem; }
.history-meta { font-size: .75rem; color: var(--muted); margin-bottom: .65rem; }
.history-changes { list-style: none; padding: 0; font-size: .85rem; }
.history-changes li { margin-bottom: .5rem; overflow-wrap: anywhere; }
.history-reason { font-size: .85rem; background: #f4f7f7; padding: .75rem; margin: .65rem 0 0; overflow-wrap: anywhere; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem); align-items: center; max-width: 65rem; margin: 3rem auto; gap: 5rem; }
.login-intro h1 { max-width: 26rem; font-size: clamp(2.1rem, 4vw, 3.25rem); }
.login-intro .lead { max-width: 29rem; margin-top: 1.3rem; }
.intro-rule { width: 3rem; height: 3px; background: var(--teal); margin: 1.8rem 0; }
.login-panel { padding: 2rem; }
.login-panel h2 { font-size: 1.5rem; }
.stacked-form { margin-top: 1.8rem; }
.login-help { margin-top: 1.5rem; }
.unavailable-panel { max-width: 42rem; margin: 4rem auto; }
.acceptance-panel { max-width: 36rem; margin: 1.5rem auto; padding: 2rem; }
.acceptance-panel h1 { font-size: 2rem; }
.acceptance-footer { border-top: 1px solid var(--border); margin-top: 1.7rem; padding-top: 1rem; }
.acceptance-footer .button { margin-left: -.5rem; margin-bottom: .7rem; }
/* Older clients set this up while on the phone with staff: large type and targets. */
.setup-panel { max-width: 38rem; margin: 1.5rem auto; padding: 2rem; font-size: 1.2rem; line-height: 1.6; }
.setup-panel h1 { font-size: 2.2rem; }
.setup-panel label { font-size: 1.2rem; font-weight: 650; }
.setup-panel input { font-size: 1.3rem; min-height: 3.4rem; }
.setup-panel .button { font-size: 1.15rem; min-height: 3.5rem; margin-top: .8rem; }
.setup-panel .field-hint, .setup-panel .setup-help { font-size: 1rem; }
.setup-panel h2 { font-size: 1.5rem; margin: 0 0 .5rem; }
.setup-panel .setup-confirmed { font-size: 1.05rem; font-weight: 600; background: var(--soft); border-left: 4px solid var(--teal); border-radius: .35rem; padding: .8rem 1rem; margin-bottom: 1.6rem; }
.setup-panel .text-consent { font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--canvas); border: 1px solid var(--border); border-radius: .4rem; padding: .9rem 1rem; margin: 0 0 .4rem; }
.setup-panel .setup-help { border-top: 1px solid var(--border); margin-top: 1.6rem; padding-top: 1.1rem; }
.legal-page { max-width: 44rem; margin: 2rem auto; padding: 2.4rem 2.6rem; font-size: 1.1rem; line-height: 1.65; }
.legal-page h1 { margin-bottom: 1rem; }
.legal-page h2 { font-size: 1.3rem; margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.legal-page ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal-page li { margin-bottom: .5rem; }
.legal-page li::marker { color: var(--teal); }
.legal-page .legal-draft { margin-bottom: 1.8rem; }
.legal-page .legal-contact { background: var(--soft); border-radius: .4rem; padding: 1rem 1.2rem; }
@media (max-width: 650px) { .legal-page { margin: 1rem 0; padding: 1.4rem 1.1rem; } }
/* The legal pages get printed and saved as PDF for SFAA and for the texts registration: a plain document, no app chrome. */
@media print {
  @page { margin: 15mm 16mm; }
  :root, body { background: white; }
  .skip-link, .site-footer { display: none; }
  .site-header { background: none; border-bottom: 2px solid var(--navy); margin-bottom: 1rem; }
  .site-header .header-inner { padding: 0 0 .6rem; }
  .site-header .brand, .site-header .brand-subtitle { color: var(--navy); }
  .site-header .brand-mark { color: var(--navy); border-color: var(--navy); }
  .main-container { min-height: 0; padding: 0; max-width: none; }
  .legal-page { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; font-size: 10.5pt; line-height: 1.5; }
  .legal-page h1 { font-size: 20pt; margin-bottom: .6rem; }
  .legal-page h2 { break-after: avoid; font-size: 13pt; margin: .8rem 0 .4rem; padding-top: .6rem; }
  .legal-page li { margin-bottom: .2rem; }
  .legal-page .legal-draft { margin-bottom: 1.1rem; padding: .6rem 1rem; }
  .legal-page .legal-contact { padding: 0; }
  .legal-page li, .legal-page .legal-contact { break-inside: avoid; }
  .legal-page a { color: inherit; }
}
@media (max-width: 650px) { .setup-panel { margin: 1rem 0; padding: 1.2rem 1rem; } .setup-panel h1 { font-size: 1.8rem; } }
.code-reveal { border: 2px solid var(--teal); border-radius: .5rem; background: var(--soft); padding: 1rem 1.2rem; margin: 1rem 0; }
.code-reveal .code-value { font-size: 1.8rem; font-weight: 750; letter-spacing: .12em; color: var(--navy); font-variant-numeric: tabular-nums; }
.identity-label { color: var(--navy); font-size: 1.2rem; font-weight: 650; overflow-wrap: anywhere; }
.intake-cards { display: grid; gap: .8rem; margin-top: 1rem; }
.intake-card, .invitation-card { border: 1px solid var(--border); border-radius: .4rem; padding: 1rem; overflow-wrap: anywhere; }
.intake-card > p { margin: .4rem 0; }
.intake-overview { border-top: 3px solid var(--teal); }
.intake-next-step { margin: .7rem 0 1rem; }
.workflow-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.workflow-links a { display: inline-flex; align-items: center; min-height: 2.8rem; padding: .5rem .75rem; border: 1px solid var(--control-border); border-radius: .35rem; text-decoration: none; font-size: .85rem; font-weight: 650; }
.workflow-links a:hover { background: var(--soft); }
.intake-version-details { margin-top: 1.2rem; }
.intake-version-details summary { color: var(--teal); font-size: .85rem; padding: .5rem 0; }
.intake-version-details dd { overflow-wrap: anywhere; }
.workspace-main [tabindex="-1"] { scroll-margin-top: 1.25rem; }
.empty-intakes { padding: 1.1rem; background: #f4f7f7; color: var(--muted); border-radius: .35rem; }
.allocation-panel { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 1.5rem; }
.search-row { display: flex; align-items: end; gap: .6rem; margin-bottom: 1.2rem; }
.search-row .field { flex: 1; margin: 0; min-width: 0; }
.invitation-list { display: grid; gap: 1rem; margin: 1.2rem 0; }
.invitation-card > p { margin-bottom: .5rem; }
.invitation-card .form-actions { margin-top: 1rem; }
.feature-notice { margin: 1.4rem 0 0; }
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-aside { display: grid; grid-template-columns: 1fr 1fr; }
  .login-layout { gap: 2rem; }
  .case-row { grid-template-columns: minmax(0, 1fr) 6rem 9rem; }
  .case-arrow { display: none; }
}
@media (max-width: 650px) {
  .header-inner, .nav-inner { padding-left: 1rem; padding-right: 1rem; }
  .header-inner { align-items: start; }
  .brand-mark { display: none; }
  .brand { font-size: .95rem; }
  .session-info { gap: .4rem; flex-direction: column; align-items: flex-end; max-width: 50%; }
  .session-name { font-size: .75rem; }
  .main-container { padding: 1.75rem 1rem 3rem; }
  .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .nav-context { max-width: 60%; text-align: right; font-size: .75rem; }
  .intake-overview > .section-heading, #invitation-management > .section-heading, #intake-files > .section-heading { flex-direction: column; }
  .workflow-links a { flex: 1 1 45%; }
  .search-row { align-items: stretch; flex-direction: column; }
  .page-heading { align-items: start; gap: 1rem; flex-direction: column; }
  .panel { padding: 1.25rem; }
  .cases-panel { padding: 0; }
  .list-toolbar { padding: 1.25rem; align-items: stretch; flex-direction: column; }
  .toolbar-controls { flex-wrap: wrap; }
  .inline-field { flex: 1; }
  .inline-field select { max-width: none; }
  .case-row { grid-template-columns: minmax(0, 1fr) auto; padding: 1.1rem 1.25rem; gap: .6rem; }
  .case-time { grid-column: 1 / -1; }
  .case-name { font-size: .95rem; }
  .form-grid, .workspace-aside { grid-template-columns: minmax(0, 1fr); }
  .value-item { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .section-nav { gap: 1rem; flex-wrap: wrap; }
  .section-nav a { font-size: .8rem; }
  .login-layout { grid-template-columns: minmax(0, 1fr); margin: 1rem auto; gap: 1.5rem; }
  .login-intro h1 { font-size: 2rem; }
  .login-intro .lead, .intro-rule, .login-intro > .muted { display: none; }
  .login-panel { padding: 1.5rem; }
  .unavailable-panel { margin: 1.5rem auto; }
}
@media (prefers-reduced-motion: no-preference) { .button { transition: background-color .12s ease; } }
/* Shared intake draft. Sections keep a stable reading order on narrow screens. */
.save-status { color: var(--teal); font-size: .85rem; font-weight: 650; text-align: right; max-width: 16rem; }
.draft-progress { font-size: .9rem; font-weight: 650; margin: 1.2rem 0 .65rem; }
.draft-navigation { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.draft-section-link { color: var(--teal); background: white; border: 1px solid var(--border); border-radius: .35rem; padding: .55rem .7rem; font-size: .8rem; min-height: 2.6rem; }
.draft-section-link[aria-current="step"] { background: var(--soft); border-color: var(--teal); font-weight: 700; }
.draft-section { border-bottom: 1px solid var(--border); padding: .7rem 0 1.4rem; margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.draft-section > h3 { font-size: 1.2rem; margin: .3rem 0 1.2rem; }
.draft-question { margin-bottom: 1.7rem; }
.draft-question > label { font-size: .95rem; }
.answer-mode { margin-top: .5rem; }
.answer-mode select { font-size: .8rem; min-height: 2.6rem; padding: .4rem .65rem; background: #f8faf9; max-width: 17rem; }
.answer-author { font-size: .75rem; }
.draft-row { padding: 1.2rem; background: #f8faf9; border: 1px solid var(--border); border-radius: .45rem; margin-bottom: 1.2rem; }
.draft-row h3 { font-size: 1rem; }
.draft-row .draft-question { margin-bottom: 1.2rem; }
.draft-save-actions { border-top: 1px solid var(--border); padding-top: 1.2rem; }
.removed-rows { margin: 1.2rem 0 0; border-top: 1px solid var(--border); padding-top: 1rem; }
.removed-rows summary { color: var(--teal); font-weight: 650; }
.removed-rows .form-actions { justify-content: space-between; margin-top: .6rem; }
.draft-comparison { padding: 1.2rem; margin-top: 1rem; border: 2px solid var(--teal); border-radius: .35rem; }
.draft-difference { border-top: 1px solid var(--border); padding: 1rem 0; overflow-wrap: anywhere; }
.draft-difference h4 { margin: 0 0 .5rem; }
.draft-difference p { margin: 0 0 .4rem; }
.draft-difference input[type="checkbox"] { width: 1.3rem; min-height: 1.3rem; height: 1.3rem; vertical-align: middle; margin-right: .5rem; }
.draft-difference label { display: inline; font-size: .85rem; }
@media (max-width: 650px) {
  .draft-editor .section-heading { flex-direction: column; gap: .5rem; }
  .save-status { text-align: left; max-width: none; }
  .draft-save-actions .button { flex: 1 1 42%; }
  .draft-row { padding: 1rem; }
  .draft-row .form-actions .button { flex: 1 1 42%; }
}
.file-list { display: grid; gap: 1rem; margin: 1.2rem 0; }
.file-card { padding: 1.1rem; border: 1px solid var(--border); border-radius: .4rem; overflow-wrap: anywhere; }
.file-card h3 { margin-bottom: .6rem; }
.file-card p { margin-bottom: .5rem; }
.file-card .form-actions { margin-top: 1rem; }
.file-status { text-align: left; max-width: none; }
.file-progress { border: 1px solid #94b7af; border-radius: .4rem; padding: 1.1rem; background: var(--soft); margin-top: 1rem; }
.file-progress ol { padding-left: 1.3rem; font-size: .9rem; }
#file-upload-form { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 1.2rem; }
#file-picker { padding: .7rem; background: #f8faf9; }
#file-picker::file-selector-button { border: 1px solid var(--control-border); border-radius: .3rem; background: white; color: var(--navy); font: inherit; padding: .4rem .7rem; margin-right: .8rem; }
@media (max-width: 650px) { .file-card .form-actions .button { flex: 1 1 42%; } }
/* Submission confirmation and immutable, scoped receipts. */
.submission-confirmation { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 2px solid var(--teal); }
.submission-answer-summary > section { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.submission-answer-summary .section-heading { margin-bottom: .5rem; }
.submission-answer-summary h4 { margin: .8rem 0; }
.submission-answer-summary .value-list { margin-bottom: .5rem; }
.submission-answer-summary dd, .submission-receipt { overflow-wrap: anywhere; white-space: normal; }
.submission-answer-summary .answer-text { white-space: pre-wrap; }
.submission-consent { display: flex; align-items: start; gap: .7rem; margin: 1.5rem 0; padding: 1rem; background: var(--soft); border-radius: .35rem; }
.submission-consent input { flex: 0 0 1.2rem; width: 1.2rem; min-height: 1.2rem; height: 1.2rem; margin: .15rem 0 0; }
.submission-consent label { margin: 0; font-size: .9rem; line-height: 1.5; }
.submission-receipt { margin-top: 1.5rem; border: 1px solid #94b7af; border-radius: .4rem; padding: 1.2rem; }
.submission-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0; }
.submission-counts > div { padding: .8rem; background: var(--soft); border-radius: .3rem; }
.submission-counts dt { font-size: .8rem; color: var(--muted); }
.submission-counts dd { font-size: 1.6rem; font-weight: 700; margin: .15rem 0 0; }
.submission-outcomes { padding-left: 1.3rem; }
.submission-outcomes li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.submission-history { padding-top: 1.2rem; margin-top: 1.5rem; border-top: 1px solid var(--border); }
.submission-history-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.submission-history-card p { margin: .25rem 0; }
@media (max-width: 650px) {
  .submission-panel > .section-heading { align-items: start; flex-direction: column; gap: .5rem; }
  .submission-receipt { padding: 1rem; }
  .submission-confirmation .form-actions .button { flex: 1 1 42%; }
}
/* Staff comparisons always label the current and immutable incoming sides. */
.review-queue-list { display: grid; gap: .9rem; margin-top: 1rem; }
.review-queue-card { padding: 1.2rem; border: 1px solid var(--border); border-radius: .4rem; }
.review-queue-card h3 { margin-bottom: .5rem; }
.review-queue-card p { margin-bottom: .5rem; }
.review-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.review-comparison-side { border: 1px solid var(--border); border-radius: .4rem; padding: 1.2rem; overflow-wrap: anywhere; }
.review-incoming { background: var(--soft); }
.review-comparison-side .value-item { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.review-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-provenance { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.review-incoming-answer + .review-incoming-answer { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.review-observed { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1.2rem; }
.review-observed summary { color: var(--teal); font-weight: 650; }
.review-action-choices { margin: 1.3rem 0 .7rem; }
.review-action-choices legend { font-weight: 650; margin-bottom: .75rem; }
.review-action-option { display: flex; align-items: start; gap: .7rem; margin: .7rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: .35rem; }
.review-action-option input { flex: 0 0 1.2rem; width: 1.2rem; min-height: 1.2rem; height: 1.2rem; margin: .15rem 0 0; }
.review-action-option label { margin: 0; }
.review-action-option .field-hint { margin: .3rem 0 0; }
#review-record-comparison, #review-candidate-comparison { margin-top: .8rem; }
@media (max-width: 800px) { .review-comparison-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 650px) { .review-comparison-side { padding: 1rem; } .review-queue-card { padding: 1rem; } .review-queue-heading { flex-direction: column; align-items: stretch; } }
.draft-progress-bar { display: block; width: 100%; height: .9rem; margin: 0 0 .5rem; accent-color: var(--teal); }
.draft-progress-bar[hidden] { display: none; }
.draft-guided .draft-progress { font-size: 1rem; margin-bottom: .45rem; }
.draft-guided .draft-section > h3 { font-size: .95rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .8rem; }
.draft-guided .draft-question > label { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin-bottom: .7rem; }
.draft-guided .draft-question > .field-hint:first-child { font-size: 1.05rem; color: var(--ink); background: var(--soft); border-left: 4px solid var(--teal); padding: .7rem .9rem; margin: 0 0 1rem; }
.draft-guided input, .draft-guided select, .draft-guided textarea { font-size: 1.15rem; min-height: 3.2rem; }
.draft-guided .button { min-height: 3rem; font-size: 1.05rem; }
.draft-guided #draft-instructions, .draft-guided #draft-instructions + .field-hint { display: none; }
.draft-guided .draft-progress { margin-top: .6rem; }
.draft-missing { border: 1px solid var(--border); border-left: 4px solid var(--focus); border-radius: .35rem; padding: .8rem 1rem; margin: .8rem 0 1rem; background: white; }
.draft-missing h3 { font-size: 1rem; margin: 0 0 .4rem; }
.draft-missing-list { margin: .4rem 0 0; padding-left: 1.2rem; }
.draft-missing-list li { margin: .25rem 0; }

.yes-no { border: 0; padding: 0; margin: 0; min-width: 0; }
.yes-no legend { padding: 0; font-size: .95rem; margin-bottom: .5rem; }
.draft-guided .yes-no legend { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin-bottom: .7rem; }
.yes-no-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 28rem; }
.yes-no-choice { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; padding: .75rem 1rem; border: 2px solid var(--control-border); border-radius: 10px; background: #fff; font-size: 1.25rem; font-weight: 600; cursor: pointer; }
/* The general input rules would stretch the radio itself; the label is the target. */
.yes-no-choice input, .draft-guided .yes-no-choice input { width: 1.5rem; height: 1.5rem; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--teal); }
.yes-no-choice:has(input:checked) { border-color: var(--teal); background: var(--soft); }
.yes-no-choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.yes-no-choice input:focus-visible { outline: none; }
.yes-no:disabled .yes-no-choice { opacity: .6; cursor: not-allowed; }
.followup-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.followup-table th, .followup-table td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
.followup-table th { font-size: .8rem; color: var(--muted); }
.followup-table tr.is-stalled td:first-child { box-shadow: inset 4px 0 0 var(--error); }
.followup-who { display: flex; flex-direction: column; gap: .15rem; }
.followup-stall { color: var(--error); font-weight: 600; }
@media (max-width: 650px) {
  .followup-heading { flex-direction: column; align-items: stretch; }
  .followup-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .followup-table, .followup-table tbody, .followup-table tr, .followup-table td { display: block; width: 100%; }
  .followup-table tr { border: 1px solid var(--border); border-radius: 6px; padding: .5rem .75rem; margin-bottom: .75rem; }
  .followup-table tr.is-stalled { border-left: 4px solid var(--error); }
  .followup-table tr.is-stalled td:first-child { box-shadow: none; }
  .followup-table td { border: 0; padding: .25rem 0; display: flex; gap: .75rem; justify-content: space-between; overflow-wrap: anywhere; }
  .followup-table td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; flex: 0 0 7rem; }
}
