
:root {
  color-scheme: light;
  --ink: #16282b;
  --muted: #4f6668;
  --teal: #125a52;
  --teal-dark: #0b453f;
  --teal-light: #e7f3ef;
  --line: #d7e3e0;
  --paper: #fff;
  --surface: #f4f7f6;
  --error: #942e25;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #237f73; outline-offset: 3px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -.052em; text-wrap: balance; }
h2 { margin-bottom: .875rem; font-size: 1.35rem; letter-spacing: -.025em; }
h3 { margin-bottom: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
p:last-child, dl:last-child { margin-bottom: 0; }

.skip { position: absolute; top: .75rem; left: .75rem; z-index: 1; transform: translateY(-160%); padding: .6rem 1rem; background: white; }
.skip:focus { transform: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 72rem; min-height: 4.25rem; margin: 0 auto; padding: .65rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .625rem; color: var(--ink); font-size: .9375rem; font-weight: 720; text-decoration: none; }
.brand-icon, .landing-icon { display: inline-grid; place-items: center; flex: none; color: var(--teal); background: var(--teal-light); border-radius: .625rem; }
.brand-icon { width: 2rem; height: 2rem; }
.landing-icon { width: 3.125rem; height: 3.125rem; margin-bottom: 1.375rem; }
.document-icon { position: relative; display: block; width: .875rem; height: 1.05rem; border: .1rem solid currentColor; border-radius: .16rem; }
.document-icon::after { content: ''; position: absolute; top: .22rem; left: .18rem; width: .28rem; height: .435rem; transform: rotate(45deg); border: solid currentColor; border-width: 0 .09rem .09rem 0; }
.landing-icon .document-icon { transform: scale(1.35); }
main { width: 100%; max-width: 72rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 3.25rem) clamp(1rem, 4vw, 2rem) 3rem; outline: none; }
.site-footer { width: 100%; max-width: 72rem; margin: auto auto 0; padding: 0 clamp(1rem, 4vw, 2rem) 1.5rem; }
.policy { max-width: 48rem; margin: 0 auto; padding: clamp(1.25rem, 5vw, 2.75rem); }
.policy .effective-date { margin: .55rem 0 1.75rem; color: var(--muted); }
.policy h2 { margin: 1.3rem 0 .35rem; }
.page-heading { margin-bottom: clamp(1.35rem, 3vw, 2rem); }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); box-shadow: 0 8px 30px #173a3510; }
.landing { max-width: 39rem; margin: clamp(1rem, 7vw, 5rem) auto 0; padding: clamp(1.4rem, 6vw, 3.25rem); }
.landing h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.landing p { margin: 1rem 0 1.375rem; color: var(--muted); max-width: 30rem; }
.quiet-link { font-size: .9375rem; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.noscript { padding: 1rem; text-align: center; }

.project-layout, .admin-layout { display: grid; gap: 1.25rem; align-items: start; }
.project-layout { grid-template-columns: minmax(16rem, .7fr) minmax(0, 1.35fr); }
.admin-layout { grid-template-columns: minmax(18rem, .9fr) minmax(0, 1.2fr); }
.project-summary, .receipt, .admin-card { padding: clamp(1rem, 3vw, 1.75rem); }
.project-summary h2 { margin-bottom: 1.1rem; }
dl { display: grid; gap: .875rem; margin: 0; }
.summary-line dt { margin-bottom: .1rem; color: var(--muted); font-weight: 650; font-size: .875rem; }
.summary-line dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.form-section { padding: 1.375rem clamp(1rem, 3vw, 1.75rem) clamp(1.2rem, 3vw, 1.75rem); border-top: 1px solid var(--line); }
.form-section.first { border: 0; }
.form-section h2, .receipt h2 { margin-bottom: .5rem; }
.intro { margin-bottom: 1rem; color: var(--muted); }
.question-list { margin-bottom: 1.25rem; border-top: 1px solid var(--line); }
.question { min-width: 0; margin: 0; padding: .875rem 0; border: 0; border-bottom: 1px solid var(--line); }
.question legend { width: 100%; float: left; padding: 0; margin-bottom: .5rem; font-weight: 620; }
.choices { clear: both; display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.65rem; min-width: 4.75rem; margin: 0; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: .5rem; font-size: .9375rem; font-weight: 650; cursor: pointer; }
.choice:hover, .choice:has(:focus-visible) { border-color: var(--teal); }
.choice:has(:checked) { color: var(--teal-dark); border-color: var(--teal); background: var(--teal-light); }
input[type='radio'], input[type='checkbox'] { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--teal); }

.field { margin-bottom: 1rem; }
.field label, .link-box label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .325rem; font-weight: 650; font-size: .9375rem; }
.optional { color: var(--muted); font-size: .875rem; font-weight: 450; }
.hint { margin-bottom: .5rem; color: var(--muted); font-size: .9rem; }
input:not([type='checkbox']):not([type='radio']), textarea { width: 100%; min-width: 0; min-height: 2.85rem; padding: .55rem .7rem; border: 1px solid #9eafac; border-radius: .5rem; background: var(--paper); color: var(--ink); }
textarea { vertical-align: top; resize: vertical; }
.form-section .field:last-child { margin-bottom: 0; }
.attestation { margin: 1rem 0 .75rem; padding: .9rem 1rem; border-radius: .6rem; border-left: .25rem solid var(--teal); background: var(--teal-light); color: var(--ink); }
.terms { margin-bottom: 1.15rem; }
.consent-help { margin-top: 1.125rem; margin-bottom: .7rem; }
.consent { display: flex; align-items: start; gap: .7rem; padding: .75rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .6rem; cursor: pointer; }
.consent input { flex: none; margin-top: .205rem; }
.feedback { margin: .6rem 0 .85rem; color: var(--teal-dark); font-size: .9375rem; }
.feedback.error { border-left: .2rem solid var(--error); color: var(--error); padding-left: .6rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; padding: .55rem .9rem; border: 1px solid transparent; border-radius: .55rem; font-size: .9375rem; font-weight: 690; text-align: center; line-height: 1.25; white-space: nowrap; text-decoration: none; cursor: pointer; }
.button.primary { color: var(--paper); background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { color: var(--teal-dark); background: var(--paper); border-color: #96b4ad; }
.button.secondary:hover { background: var(--teal-light); }
.button.quiet { color: var(--muted); background: var(--paper); }
.button.quiet:hover { color: var(--ink); background: var(--surface); }
.button:disabled { opacity: .65; cursor: wait; }
.receipt .pill + h2 { margin-top: .85rem; }
.receipt .button { margin-top: 1.35rem; }
.link-box { margin-bottom: 1.25rem; padding: 1rem; border: 1px solid #86b8ac; border-radius: .75rem; background: var(--teal-light); }
.link-controls { display: flex; gap: .6rem; align-items: stretch; }
.link-controls input { flex: 1 1 auto; }
.link-box .feedback { margin-bottom: 0; }
.projects-list ul { list-style: none; margin: 0; padding: 0; }
.pagination { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.1rem; }
.empty { color: var(--muted); }
.project-row { border-top: 1px solid var(--line); padding: 1rem 0; }
.project-row:last-child { padding-bottom: 0; }
.row-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .65rem; margin-bottom: .35rem; }
.address, .row-detail { margin-bottom: .2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.row-detail { color: var(--muted); font-size: .875rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.pill { display: inline-flex; align-items: center; min-height: 1.85rem; padding: .2rem .55rem; border-radius: .35rem; color: var(--ink); background: #edf1f1; font-size: .8125rem; font-weight: 680; }
.pill.positive { color: var(--teal-dark); background: var(--teal-light); }
.pill.review { color: #663e07; background: #fff1d3; }

@media (max-width: 44rem) {
  .project-layout, .admin-layout { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .page-heading { margin-bottom: 1rem; }
  .header-inner { min-height: 3.75rem; }
  .signing .primary, .admin-card form > .primary { width: 100%; }
}
