:root {
  color-scheme: light;
  --green: #123a32;
  --green-dark: #0e2d28;
  --gold: #e9ca84;
  --text: #192d28;
  --muted: #455e55;
  --line: #b0c2b8;
  --paper: #f2f6f3;
  font: 100%/1.45 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--paper); }
header { background: var(--green); color: #fff; border-bottom: 3px solid var(--gold); }
.brand, .hero, main, footer { max-width: 53rem; margin: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.brand { display: flex; align-items: center; gap: .8rem; padding-top: 1rem; font-weight: 750; color: var(--gold); }
.brand img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.hero { padding-block: .65rem 1.55rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); line-height: 1.12; letter-spacing: -.04em; margin-bottom: .4rem; }
.hero p { color: #e1ede6; }
main { padding-block: 1.25rem; }
.panel { background: #fff; border: 1px solid #d5e1da; border-radius: 1rem; padding: clamp(.95rem, 3vw, 1.55rem); }
.panel + .panel, form + .panel { margin-top: 1rem; }
.section-heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.section-heading { margin-bottom: .35rem; flex-wrap: wrap; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin-top: .9rem; }
h2 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1.15rem; }
.hint { color: var(--muted); font-size: .92rem; }
.count { color: var(--green); background: #e2eee6; padding: .25rem .65rem; border-radius: 1rem; font-size: .875rem; font-weight: 650; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.visit-grid { margin-top: 1rem; }
label { display: grid; gap: .3rem; font-size: .94rem; font-weight: 650; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: .5rem; background: white; color: var(--text); font: inherit; font-size: 1rem; font-weight: 400; padding: .58rem .65rem; min-height: 2.8rem; }
select { appearance: none; padding-right: 1.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23123a32' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right .65rem center; background-repeat: no-repeat; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #586e64; }
input[type=date] { display: block; }
input[name=postcode] { text-transform: uppercase; }
:focus-visible { outline: 3px solid #ad7019; outline-offset: 2px; }
.window { padding: .9rem; border: 1px solid #c9dad0; background: #f7faf8; border-radius: .7rem; margin: 1rem 0; }
.window > label, .panel > h2 + label, .check, #draft-note, #summary, #review .hint, #status { margin-top: .7rem; }
fieldset { margin: .9rem 0; padding: 0; min-width: 0; border: 0; }
legend { font-weight: 700; margin-bottom: .35rem; padding: 0; }
.readings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.check { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .9rem; }
.check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: .15rem 0; flex: 0 0 auto; accent-color: var(--green); }
button { font: inherit; font-weight: 700; cursor: pointer; border-radius: .5rem; border: 1px solid transparent; padding: .55rem .85rem; min-height: 2.75rem; }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.secondary { background: #edf4ef; border-color: #b8cfc2; color: var(--green); }
.secondary:hover { background: #dfebe2; }
.text-button { background: transparent; color: var(--green); text-decoration: underline; padding-inline: .35rem; }
footer { padding-block: .3rem 1.5rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 37rem) {
  .grid:not(.readings) { grid-template-columns: 1fr; }
  .window { padding: .7rem; }
}
.office .hint { margin-top: .75rem; }
.office-link { display: inline-block; border-radius: .5rem; border: 1px solid transparent; padding: .55rem .85rem; font-weight: 700; }
.office-link.secondary { border-color: #b8cfc2; }
.survey-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.survey-list li + li { border-top: 1px solid var(--line); }
.survey-list a { display: grid; gap: .2rem; padding: .75rem .25rem; color: var(--green); overflow-wrap: anywhere; }
.survey-list span { color: var(--muted); font-size: .92rem; }
.survey-summary { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
button:disabled { cursor: default; opacity: .62; }
