:root {
  color-scheme: light;
  --ink: #122f42;
  --muted: #465e6a;
  --blue: #005576;
  --line: #c9d5d9;
  --paper: #fff;
  --canvas: #f3f6f7;
  --focus: #af5600;
  font: 100%/1.5 "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .15em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -5rem; background: white; padding: .6rem; }
.skip:focus { top: 0; }
.mast { background: white; border-bottom: 1px solid var(--line); }
.mast-inner, main { width: min(100% - 2rem, 55rem); margin-inline: auto; }
.mast-inner { display: flex; justify-content: space-between; align-items: center; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.8rem; }
.brand img { display: block; width: auto; height: 2.25rem; }
main { padding-block: clamp(1.45rem, 3.2vw, 2.8rem) 4rem; }
h1, h2, legend { margin: 0; color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 2.45rem); letter-spacing: -.025em; }
h2, legend { font-size: 1.26rem; font-weight: 700; }
p { margin: .5rem 0 1rem; }
.page-heading, .actions, .pagination, .report-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-heading { margin: 0 0 1.35rem; flex-wrap: wrap; }
.button, button, input, select, textarea { font: inherit; }
.button, .text-btn { min-height: 2.8rem; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .57rem 1rem; color: white; background: var(--blue); border: 1px solid var(--blue); border-radius: .45rem; font-weight: 650; text-decoration: none; }
.button:hover { background: #02425a; color: white; text-decoration: none; }
.button.secondary { color: var(--blue); background: white; border-color: #8ca4af; }
.button.secondary:hover, .report-row:hover { background: #f0f7f8; }
.text-btn { padding: .4rem .8rem; border: 0; background: none; color: var(--blue); text-decoration: underline; }
.surface, .empty, .report-list { background: white; border: 1px solid var(--line); border-radius: .75rem; }
.surface, .empty { padding: clamp(1rem, 3.4vw, 2rem); margin: 0 0 1.2rem; }
.surface > h2 { margin: 0 0 1rem; }
.empty { padding-block: 2.3rem; }
.empty p { color: var(--muted); margin: .6rem 0 0; }
.report-list, .photos { padding: 0; margin: 0; list-style: none; }
.report-list { overflow: clip; }
.report-list li + li { border-top: 1px solid var(--line); }
.report-row { padding: 1rem clamp(.8rem, 2vw, 1.5rem); color: var(--ink); text-decoration: none; }
.report-row:focus-visible { outline-offset: -4px; }
.report-row:hover { text-decoration: none; }
.row-title, .row-meta { display: block; overflow-wrap: anywhere; }
.row-title { font-weight: 670; }
.row-meta, .hint, small, .back { color: var(--muted); font-size: .92rem; }
.row-meta { margin-top: .13rem; }
.status { flex-shrink: 0; color: #12523e; background: #e4f1e9; padding: .25rem .65rem; font-size: .85rem; font-weight: 650; border-radius: 2rem; }
.status.draft { color: #724300; background: #fff0cb; }
.back { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: .35rem; }
.pagination { justify-content: center; margin-top: 1.1rem; }
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
fieldset + fieldset { margin-top: 1.5rem; }
legend { padding: 0; margin-bottom: .85rem; }
.field { min-width: 0; margin-bottom: .85rem; }
label { display: block; margin-bottom: .28rem; font-weight: 625; }
input, textarea, select { width: 100%; max-width: 100%; padding: .6rem .7rem; background: white; color: var(--ink); min-height: 2.85rem; border: 1px solid #879da8; border-radius: .38rem; }
input[type=hidden] { display: none; }
input[type=checkbox], input[type=radio] { width: auto; min-height: auto; }
textarea { resize: vertical; }
input[type=file] { min-height: 3.05rem; padding: .32rem; }
input::file-selector-button { font: inherit; cursor: pointer; padding: .35rem .7rem; background: #eef4f6; color: var(--ink); border: 1px solid #aebec4; border-radius: .3rem; }
.pod-row, .pair { display: grid; gap: .75rem 1rem; }
.pod-row { grid-template-columns: minmax(0, 1fr) max-content; align-items: end; }
.pod-row .field { margin: 0; }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hint { line-height: 1.45; }
.hint:empty { display: none; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin-top: .6rem; }
.notices, .form-errors { padding: .7rem .95rem; margin-bottom: 1rem; border-radius: .38rem; }
.notices { color: #164a3b; background: #e2f1e9; }
.notices p { margin: 0; }
.form-errors { color: #842925; background: #fff0ec; }
.errorlist { margin: .32rem 0; padding-left: 1.2rem; color: #902a24; }
.invalid input, .invalid textarea { border-color: #aa322c; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .65rem 1.2rem; margin: 0; }
.facts dt, .photos small { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.multiline { white-space: pre-line; }
.late-pod { margin-top: 1.35rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 1rem; margin-top: 1.45rem; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 11 / 8; object-fit: cover; background: var(--canvas); border-radius: .35rem; }
.photos span, .photos small { display: block; margin-top: .22rem; overflow-wrap: anywhere; }
@media (max-width: 35rem) {
  .mast-inner, main { width: calc(100% - 1.35rem); }
  .pair { grid-template-columns: 1fr; gap: 0; }
  .pod-row { grid-template-columns: 1fr; gap: .5rem; }
  .pod-row .button { justify-self: start; }
  .page-heading { gap: .7rem; }
  .report-row { gap: .6rem; align-items: flex-start; }
  .facts { grid-template-columns: 1fr; gap: .2rem; }
  .facts dd + dt { margin-top: .5rem; }
}

.reference { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; margin: -.6rem 0 1.15rem; }

.reference summary { cursor: pointer; min-height: 2rem; }
.auth-surface { max-width: 32rem; margin-inline: auto; }

.model-select { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin-bottom: 1.5rem; }
.model-select .field { flex: 1 1 16rem; margin-bottom: 0; }
.question-section { margin: .8rem 0; border-top: 1px solid var(--line); }
.question-section > summary { cursor: pointer; padding: .8rem 0; font-weight: 650; color: var(--blue); }
.question-body { padding-bottom: .45rem; }
.question-body .facts { grid-template-columns: minmax(7rem, 42%) 1fr; }
.repeat { margin: .65rem 0 1.25rem; }
.repeat h3 { font-size: 1rem; margin-block: .4rem; }
.repeat-row { margin: .55rem 0; padding: .7rem; border: 1px solid var(--line); border-radius: .4rem; }
.repeat-row legend { padding-inline: .35rem; font-size: .95rem; }
.row-buttons { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
@media (max-width: 35rem) { .question-body .facts { grid-template-columns: 1fr; } }

.camera { padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.camera h3, #foto > h3 { margin: .4rem 0 .65rem; font-size: 1.04rem; }
.quick-photos:not([hidden]) { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0; }
.list-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 1rem; }
.list-filters a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem .8rem; border-radius: .4rem; }
.list-filters [aria-current] { background: #dcebf0; color: var(--ink); text-decoration: none; font-weight: 650; }
.row-origin { display: block; color: var(--blue); font-size: .88rem; font-weight: 600; }
.assignment-brief > h2 { margin-bottom: .35rem; }
.assignment-brief h3 { font-size: 1.02rem; margin: 1.1rem 0 .35rem; }
.assignment-brief p { margin: .2rem 0 0; overflow-wrap: anywhere; }
.assignment-model { color: var(--muted); }
.assignment-materials { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.assignment-materials th, .assignment-materials td { padding: .45rem .25rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.assignment-materials thead th { color: var(--muted); font-size: .85rem; font-weight: 600; }
.assignment-materials thead th:nth-child(2) { width: 23%; }
.assignment-materials thead th:last-child { width: 18%; }
.assignment-materials tbody tr { border-top: 1px solid var(--line); }
.assignment-materials th[scope="row"] { font-weight: 600; }
.assignment-materials small { display: block; font-size: .82rem; font-weight: 400; }

.quick-photos[data-photo-guide]:not([hidden]) { display: grid; gap: .45rem; }
.camera-group { border: 1px solid var(--line); border-radius: .55rem; background: white; }
.camera-group summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: .5rem .85rem; font-weight: 650; cursor: pointer; }
.camera-group summary::after { content: "+"; color: var(--blue); }
.camera-group[open] summary::after { content: "−"; }
.camera-group summary small { margin-inline: auto .75rem; padding-left: .5rem; color: var(--muted); }
.camera-group > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(13rem,100%),1fr)); gap: .4rem; border-top: 1px solid var(--line); padding: .55rem; }
.camera-choice { display: grid; grid-template-columns: 1fr auto; justify-content: space-between; text-align: left; align-items: center; gap: .4rem; min-height: 48px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .4rem; background: #f6f9fa; color: var(--ink); font: inherit; cursor: pointer; }
.camera-choice small:not(:empty) { font-weight: 700; color: #15583b; }
.capture-status:not(:empty) { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; }
.capture-status:empty { display: none; }
#photo-upload-queue { display: grid; gap: .45rem; padding: 0; list-style: none; }
#photo-upload-queue li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; overflow-wrap: anywhere; }
#photo-upload-queue button { min-height: 44px; }
#camera-form [hidden], #photo-form [hidden], #photo-upload-queue [hidden] { display: none; }

.field-signature-pad {display:block;box-sizing:border-box;width:100%;height:clamp(10rem,30vh,16rem);border:2px solid #536c63;border-radius:.5rem;background:white;touch-action:none;}
.field .touch-choices label {display:flex;align-items:center;gap:.65rem;min-height:44px;cursor:pointer;margin:0;}
.field .touch-choices input[type=checkbox] {width:1.25rem;height:1.25rem;flex:none;}
