/* MSL registration — mobile first, no external resources.
   Brand colors follow the MSL Brand Guide 2026. #19AE6A and #1D322D were sampled from the supplied
   logo JPEG and are REFERENCE VALUES until MSL confirms official specifications.
   Rules from the guide: deep green carries text, headings and solid buttons (white text, 13.6:1);
   bright green is for accents only and never carries small text on white (2.9:1). */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --msl-green: #19AE6A;        /* reference value — accents, rules, fills behind deep-green text */
  --msl-deep: #1D322D;         /* reference value — text, headings, primary buttons */
  --ink: var(--msl-deep);
  --muted: #4A5A55;            /* 7.3:1 on white */
  --line: #D3DDD9;
  --field-border: #6E7F79;     /* 4.3:1 on white, meets 3:1 for form controls */
  --bg: #F3F6F4;
  --card: #FFFFFF;
  --tint: #E8F6EF;             /* light green panel behind deep-green text, 12.2:1 */
  --error: #B3261E;
  --error-bg: #FDECEA;
  --warn-bg: #FFF4D6;
  --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--msl-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid var(--msl-deep); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(25, 174, 106, .35);
}
h1[tabindex="-1"]:focus, .notice[tabindex="-1"]:focus { outline: none; }
.error-summary:focus { outline: 3px solid var(--msl-deep); outline-offset: 2px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1280px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Test-site warning stays visually separate from the brand on purpose */
.staging-banner { background: #7A1F1F; color: #fff; text-align: center; padding: 7px 16px; font-size: 15px; }

/* Header: the supplied logo, unaltered, on white with clear space; bright-green accent rule */
.site-header { background: #fff; border-bottom: 4px solid var(--msl-green); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--msl-deep); text-decoration: none; }
.logo { display: block; height: 64px; width: auto; }
.brand-text { font-weight: 600; font-size: .95rem; border-left: 2px solid var(--line); padding-left: 14px; }
.site-footer { color: var(--muted); font-size: 15px; padding: 24px 0 40px; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 26px 0 12px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 18px 0 8px; font-weight: 700; }
.lede { font-size: 1.05rem; }
.intro { margin-bottom: 8px; }
.deadline-card { background: var(--card); border-left: 6px solid var(--msl-green); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.deadline-card p { margin: 0 0 6px; }
.deadline-card p:last-child { margin: 0; }
.deadline { font-size: 1.08rem; }
.facts { margin: 0 0 12px; display: grid; gap: 8px; }
.facts div { background: var(--card); border-radius: 8px; padding: 10px 14px; border-top: 3px solid var(--msl-green); }
.facts dt { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 2px 0 0; }
details.dates { background: var(--card); border-radius: 8px; padding: 10px 14px; }
details.dates summary { font-weight: 600; cursor: pointer; min-height: 32px; }
details.dates p { margin: 8px 0 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 8px; margin: 16px 0; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; padding-bottom: 18px; }
/* Step markers: deep-green numerals on bright green (4.7:1) */
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--msl-green); color: var(--msl-deep); font-size: .9rem; font-weight: 700; margin-right: 8px; vertical-align: 2px; }
.req-note { color: var(--muted); font-size: .95rem; margin: 20px 0 0; }

.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .field .label { display: block; font-weight: 600; margin-bottom: 4px; }
.field legend { padding: 0; }
.optional { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: .95rem; margin: 0 0 6px; }
.privacy-hint { background: var(--tint); color: var(--ink); padding: 8px 12px; border-radius: 8px; margin-bottom: 16px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1.5px solid var(--field-border); border-radius: 8px; padding: 10px 12px; min-height: 48px;
}
input[type=date] { appearance: none; -webkit-appearance: none; }
textarea { min-height: 88px; resize: vertical; }
.static-value { margin: 0; padding: 10px 0; }
.choices { display: grid; gap: 8px; }
.inline .choices, .inline-2 { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.choice { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; cursor: pointer; border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 48px; }
.choice input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--msl-deep); }
.choice:has(input:checked) { border-color: var(--msl-deep); background: var(--tint); box-shadow: inset 4px 0 0 var(--msl-green); }
.choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.checkbox .choice { border-color: var(--field-border); }
.has-error input, .has-error select, .has-error textarea, .has-error .choice { border-color: var(--error); }
.has-error { border-left: 4px solid var(--error); padding-left: 12px; }
fieldset.has-error { padding-left: 12px; }
.error-msg { color: var(--error); font-weight: 600; margin: 0 0 6px; }
.error-summary { border: 3px solid var(--error); background: var(--error-bg); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.error-summary h2 { color: var(--error); margin-bottom: 4px; }
.error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.error-summary a { color: var(--error); font-weight: 600; }
.notice { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.notice.warn { background: var(--warn-bg); border: 1px solid #E3C25B; }
.notice.info { background: var(--tint); border: 1px solid #A9DCC3; }
.notice.attn { background: var(--warn-bg); border-left: 6px solid #C98A00; }
.notice.alert-strong { background: var(--error-bg); border-left: 6px solid var(--error); }
.pending { background: #FFF0B3; color: #5C4400; padding: 0 4px; border-radius: 4px; font-size: .9em; }

.coc-box { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; margin: 0 0 14px; background: #FAFCFB; font-size: .96rem; }
.coc-box h2 { font-size: 1.1rem; margin: 14px 0 8px; }
.coc-box h4 { font-size: 1rem; margin: 16px 0 6px; }
.coc-box ul, .coc-page ul { padding-left: 22px; margin: 6px 0; }
.coc-page h3 { margin-top: 22px; }

.row { display: grid; gap: 0 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.reveal.is-hidden { display: none; }

.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; text-decoration: none;
  min-height: 50px; padding: 11px 22px; border-radius: 10px; cursor: pointer; border: 2px solid var(--msl-deep);
}
.btn-primary { background: var(--msl-deep); color: #fff; width: 100%; margin: 6px 0 18px; }
.btn-primary:hover { background: #2A4740; }
.btn-secondary { background: #fff; color: var(--msl-deep); }
.btn-secondary:hover { background: var(--tint); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.inline-form { display: inline; }

.confirm { text-align: left; padding-bottom: 18px; }
.confirm .check { width: 54px; height: 54px; border-radius: 50%; background: var(--msl-green); color: var(--msl-deep); display: grid; place-items: center; margin: 4px 0 0; }
.receipt { display: grid; gap: 8px; margin: 18px 0; }
.receipt div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.receipt dt { color: var(--muted); font-size: .9rem; }
.receipt dd { margin: 0; font-weight: 600; }
.receipt .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem; letter-spacing: .05em; }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions .btn-primary { margin: 0; }

@media (min-width: 640px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 2fr 1.4fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .btn-primary { width: auto; }
  .actions { display: flex; flex-wrap: wrap; }
  .card { padding: 22px 24px 10px; }
  .logo { height: 76px; }
}

/* ---------------- Staff ---------------- */
body.staff { font-size: 16px; }
.staff-header .logo { height: 52px; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-weight: 600; }
.staff-nav a, .staff-nav .link-btn { color: var(--msl-deep); }
.who { color: var(--muted); font-weight: 400; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; background: #E3E9E6; color: var(--ink); border-radius: 999px; padding: 1px 8px; margin: 2px 0 0 4px; vertical-align: 1px; }
.tag.warn, .tag.attn { background: #FFE0A3; }
.tag.changed { background: var(--tint); box-shadow: inset 0 0 0 1px var(--msl-green); }
.badge { display: inline-block; font-weight: 700; border-radius: 6px; padding: 1px 10px; }
.badge.yes { background: var(--tint); color: var(--msl-deep); }
.badge.no { background: var(--error); color: #fff; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }
.exports .btn-secondary { min-height: 42px; padding: 7px 14px; font-size: .92rem; }
.count { font-size: .9rem; font-weight: 600; color: var(--muted); }
.summary-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.tile { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--msl-green); border-radius: 8px; padding: 8px 14px; color: var(--ink); text-decoration: none; }
.tile .num { font-size: 1.4rem; font-weight: 700; margin-right: 4px; }
.tile.alert { border-top-color: var(--error); }
.tile.attn { border-top-color: #C98A00; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.filters input[type=search] { max-width: 360px; }
.filters select { width: auto; }
.filters .choice { border: 0; padding: 0; min-height: 0; align-items: center; box-shadow: none; background: none; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.reg-table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.reg-table th, .reg-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.reg-table th { background: var(--tint); white-space: nowrap; color: var(--msl-deep); }
.reg-table tr.row-no td { background: #FFF6F5; }
.small { font-size: .85rem; color: var(--muted); }
.original { display: block; margin-top: 4px; font-size: .85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 8px; }
.detail-grid { display: grid; gap: 0 16px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 12px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.pre { white-space: pre-wrap; }
.note { border-top: 1px solid var(--line); padding-top: 6px; }
.note.restricted { border-left: 4px solid var(--msl-green); padding-left: 10px; }
.note p { margin: 4px 0; }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form + .inline-form::before { content: " · "; }
details.action-panel { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 12px 0 16px; background: #FAFCFB; }
details.action-panel[open] { border-color: var(--msl-deep); }
details.action-panel summary { font-weight: 700; cursor: pointer; min-height: 30px; }
details.action-panel form { margin-top: 12px; }
.follow-up { background: var(--warn-bg); border-radius: 8px; padding: 4px 14px 10px; margin: 12px 0; }

@media print {
  .staging-banner, .site-footer, .actions, .hint, .staff-nav, .exports, .filters, details.action-panel { display: none; }
  body { background: #fff; }
  .card { border: 0; }
}
/* Photo-permission alert delivery */
.alert-text { color: var(--error); font-weight: 700; }
.alert-list { margin: 6px 0 0; padding-left: 20px; }
.alert-actions .inline-form { display: block; margin: 8px 0 12px; }
.manual-form { border-top: 1px solid #F1B5AF; padding-top: 10px; }
