:root {
  color-scheme: light;
  --red: #ba071d;
  --red-dark: #910517;
  --red-soft: #fbe9ec;
  --cyan: #059bbd;
  --cyan-dark: #047991;
  --cyan-soft: #e5f6fa;
  --black: #000000;
  --ink: #161616;
  --muted: #606971;
  --line: #d9e0e3;
  --surface: #ffffff;
  --page: #ffffff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body { min-height: 100vh; margin: 0; background: var(--page); color: var(--ink); font-size: 16px; line-height: 1.4; }
button, a { font: inherit; }
button { cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--cyan-dark); outline-offset: 4px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  min-height: 78px;
  align-items: center;
  border-bottom: 3px solid var(--cyan);
  background: rgba(255, 255, 255, 0.97);
  padding: 8px max(18px, env(safe-area-inset-left));
  backdrop-filter: blur(14px);
}

.brand { display: block; width: fit-content; color: var(--black); text-decoration: none; }
.brand-logo { display: block; width: 68px; height: 52px; object-fit: contain; }
.header-title { color: var(--black); font-size: clamp(1.125rem, 3.5vw, 1.5rem); font-weight: 800; line-height: 1.15; text-align: center; text-decoration: none; letter-spacing: -0.025em; }
.menu-button { display: grid; width: 44px; height: 44px; place-items: center; justify-self: end; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); padding: 9px; }
.menu-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

main { width: min(780px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.intro h1, .person-heading h1, .content-view > h1 { margin: 0; color: var(--ink); font-size: clamp(1.875rem, 7vw, 2.6rem); line-height: 1.1; letter-spacing: -0.035em; }
.intro time, .eyebrow { display: block; margin: 0 0 10px; color: var(--cyan-dark); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.045em; text-transform: uppercase; }
.intro p { margin: 16px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.intro p span { font-size: 0.875rem; }
.people-view { margin-top: 32px; }
.people-view > h2 { margin: 0 0 14px; font-size: 1.0625rem; font-weight: 750; }
.people-grid, .forms-list { display: grid; gap: 12px; }

.person-card {
  display: grid;
  min-height: 86px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 15px 17px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 16px rgba(40, 27, 30, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.person-card:hover, .person-card:focus-visible { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-1px); outline: none; }
.person-avatar { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; font-size: 1.125rem; font-weight: 850; }
.person-avatar-red { background: var(--red-soft); color: var(--red-dark); }
.person-avatar-cyan { background: var(--cyan-soft); color: var(--cyan-dark); }
.person-copy { display: grid; min-width: 0; gap: 5px; }
.person-copy strong { font-size: 1.125rem; }
.person-copy small { color: var(--muted); font-size: 0.875rem; line-height: 1.5; }

.forms-view { margin-top: -4px; }
.back-button { min-height: 44px; border: 0; background: transparent; color: var(--cyan-dark); padding: 4px 0; font-weight: 800; }
.back-button[href] { display: inline-flex; align-items: center; text-decoration: none; }
.native-card-wrap { display: grid; gap: 5px; }
.legacy-form-link { justify-self: end; color: var(--cyan-dark); padding: 7px 12px; font-size: .875rem; min-height: 36px; }
.native-view { max-width: 780px; margin-inline: auto; padding-bottom: 50px; }
.native-view > h1 { margin-top: 10px; }
.native-view > .eyebrow { margin-top: 16px; }
.preview-notice, .native-session, .late-entry-note { padding: 16px 18px; border-radius: 12px; margin: 22px 0; }
.preview-notice { border: 1px solid #ecc6cd; background: #fff5f6; }
.preview-notice strong { color: var(--red-dark); }
.preview-notice p { margin: 7px 0 10px; }
.native-session { background: var(--cyan-soft); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.native-session p { margin: 0; }
.native-account { padding: 16px 12px; border-top: 1px solid var(--line); margin-top: 20px; font-size: .875rem; overflow-wrap: anywhere; }
.native-account p { margin: 0; }
.text-link { color: var(--cyan-dark); font-weight: 750; display: inline-block; padding-block: 9px; }
.native-instructions, .field-help, .form-subheading p { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.late-entry-note { background: var(--cyan-soft); color: var(--cyan-dark); font-size: .9375rem; }
.native-section { min-width: 0; }
.native-field { min-width: 0; border: 1px solid var(--line); padding: 20px; border-radius: 14px; margin: 20px 0; background: #fff; }
.native-field legend { font-weight: 750; max-width: 100%; padding: 0 5px; line-height: 1.5; }
.required-label { color: var(--red-dark); display: inline-block; font-weight: 600; font-size: .875rem; margin-left: 9px; }
.native-field input:not([type="checkbox"]):not([type="radio"]), .native-field textarea, .native-field select, .staff-login input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #b5c5ca; border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.native-field textarea { resize: vertical; }
.native-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 2 5 5 5-5' stroke='%23364e55' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.native-field :focus-visible, .staff-login :focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.native-choices, .grid-row-options { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; min-height: 46px; font-size: 1rem; line-height: 1.5; cursor: pointer; }
.choice:has(input:checked) { background: var(--cyan-soft); border-color: var(--cyan); }
.choice input { flex: 0 0 auto; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--red); }
.native-grid-row { border-bottom: 1px solid var(--line); padding: 15px 0; display: grid; gap: 10px; }
.native-grid-row:first-child { padding-top: 0; }
.native-grid-row:last-child { border: 0; padding-bottom: 0; }
.native-grid-row > label { line-height: 1.5; font-weight: 600; }
.grid-row-options { border: 0; padding: 0; margin: 0; min-width: 0; }
.grid-row-options legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.form-subheading { margin-top: 34px; }
.form-subheading h2 { font-size: 1.25rem; margin: 0 0 8px; }
.other-answer { margin-top: 14px; }
.other-answer label, .staff-login label { display: grid; gap: 8px; }
.clear-selection { background: none; border: 0; color: var(--cyan-dark); padding: 10px 2px; min-height: 44px; font: inherit; text-decoration: underline; }
.field-error { color: var(--red-dark); font-weight: 650; margin-bottom: 0; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.answer-review { margin: 26px 0 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.answer-review summary { padding: 10px 0; min-height: 44px; cursor: pointer; color: var(--cyan-dark); font-weight: 750; }
.answer-review dl > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.answer-review dt { font-weight: 700; }
.answer-review dd { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#native-message { white-space: pre-wrap; }
.save-confirmation { padding: 24px; border: 1px solid var(--cyan); border-radius: 14px; margin-top: 20px; overflow-wrap: anywhere; }
.save-confirmation .text-link { margin-left: 12px; }
.staff-login { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.staff-login::backdrop { background: rgba(18,35,41,.3); }
.staff-login label { margin-top: 18px; font-weight: 650; }
.staff-login .primary-link { border: 0; width: 100%; }
@media (min-width: 640px) {
  .native-grid-row:has(> select) { grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr); align-items: center; gap: 20px; }
  .grid-row-options { grid-template-columns: 1fr 1fr; }
  .grid-row-options legend { grid-column: 1 / -1; }
}
@media print {
  .site-header, .back-button, .preview-notice, .native-session, #native-submit, .staff-login, .legacy-form-link { display: none !important; }
  .native-field, .native-grid-row { break-inside: avoid; }
  body, main { background: #fff; max-width: none; }
}
.person-heading { display: flex; align-items: center; gap: 14px; margin: 22px 0 24px; }

.form-card {
  display: grid;
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(40, 27, 30, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.form-card:hover, .form-card:focus-visible { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-1px); outline: none; }
.form-card > strong { min-width: 0; font-size: 1rem; line-height: 1.25; }
.form-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: var(--cyan-soft); color: var(--cyan-dark); }
.form-icon svg { width: 25px; height: 25px; fill: currentColor; }
.open-label { border-radius: 999px; background: var(--red); color: #fff; padding: 8px 13px; font-size: 0.875rem; font-weight: 800; white-space: nowrap; }
.noscript { margin: 0; background: var(--red-soft); color: var(--red-dark); padding: 14px; text-align: center; }
[hidden] { display: none !important; }

.content-view { max-width: 700px; }
.page-lead { margin: 16px 0 26px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.overview-card, .admin-empty { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: #fff; box-shadow: 0 5px 22px rgba(0, 0, 0, 0.035); }
.overview-card { border-top: 4px solid var(--cyan); }
.overview-card h2, .admin-empty h2 { margin: 10px 0; font-size: 1.375rem; letter-spacing: -0.02em; }
.overview-card p, .admin-empty p { color: var(--muted); line-height: 1.6; }
.primary-link { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; margin-top: 10px; border-radius: 11px; background: var(--red); color: #fff; padding: 10px 16px; font-size: 1rem; font-weight: 750; text-decoration: none; }
.primary-link { border: 0; }
.primary-link:disabled { opacity: 0.6; cursor: progress; }
.future-section { margin-top: 30px; }
.future-section h2 { margin-bottom: 12px; font-size: 1.125rem; }
.connection-label { display: inline-block; border-radius: 999px; background: #eff2f3; color: #52606a; padding: 5px 10px; font-size: 0.875rem; font-weight: 750; }
.review-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 22px; margin: 0 0 22px; }
.review-toolbar label { display: grid; gap: 7px; font-size: 0.875rem; font-weight: 750; }
.review-toolbar input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 12px; color: var(--ink); font: inherit; font-size: 1rem; }
.review-toolbar > span { color: var(--muted); font-size: 0.875rem; padding-bottom: 10px; }
.review-start { color: var(--muted); font-size: 0.875rem; margin: -6px 0 22px; }
.review-toolbar .primary-link { margin-top: 0; }
.daily-checks { margin-top: 22px; border-top: 1px solid var(--line); }
.daily-checks > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.daily-checks > div > span:first-child { display: grid; gap: 4px; }
.daily-checks small { color: var(--muted); font-size: 0.875rem; }
.check-status { flex: 0 0 auto; color: var(--muted); font-size: 0.875rem; }
.daily-checks [data-status="received"] .check-status { color: #176a4d; font-weight: 750; }
.daily-checks [data-status="missing"] .check-status { color: var(--red-dark); font-weight: 800; }
.daily-checks .source-detail { max-width: 360px; font-size: 0.875rem; color: var(--red-dark); }
.missing-days { display: grid; gap: 8px; }
.missing-days button { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; color: var(--red-dark); text-align: left; font-weight: 700; min-height: 44px; }
.admin-empty .empty-footnote { margin: 18px 0 0; font-size: 0.875rem; }
.site-menu { position: fixed; inset: 0 0 0 auto; width: min(360px, 90vw); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-left: 1px solid var(--line); padding: 20px; color: var(--ink); background: #fff; box-shadow: -8px 0 36px rgba(0, 0, 0, 0.08); }
.site-menu::backdrop { background: rgba(18, 35, 41, 0.3); }
.site-menu[open] { display: flex; flex-direction: column; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.menu-heading h2 { margin: 0; font-size: 1.25rem; }
.site-menu nav { display: grid; gap: 7px; }
.site-menu nav a { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; border-radius: 12px; padding: 12px; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 750; }
.site-menu nav a:hover, .site-menu nav a[aria-current] { background: var(--cyan-soft); color: var(--cyan-dark); }
.site-menu nav a span { border-radius: 999px; padding: 3px 8px; color: var(--muted); background: #eff2f3; font-size: 0.875rem; font-weight: 600; }
.menu-note { margin: auto 12px 4px; padding-top: 28px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }

@media (min-width: 560px) {
  .people-grid { grid-template-columns: 1fr 1fr; }
  .person-card { min-height: 132px; }
}

@media (max-width: 420px) {
  main { width: calc(100% - 32px); padding-top: 30px; }
  .site-header { grid-template-columns: 62px minmax(0, 1fr) 62px; padding-inline: 12px; }
  .brand-logo { width: 62px; height: 48px; }
  .person-card { min-height: 104px; }
  .form-card { grid-template-columns: auto minmax(0, 1fr); }
  .open-label { grid-column: 2; width: fit-content; margin-top: -3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
