:root {
  --harvest-green: #087a3e;
  --pine: #103e2b;
  --leaf: #2c6a46;
  --tangerine: #f6a11a;
  --ink: #173126;
  --muted: #60746b;
  --fog: #f2f6f1;
  --paper: #ffffff;
  --line: #d6e1d8;
  --warning: #9a5a00;
  --error: #b42318;
  --shadow: 0 18px 48px rgba(16, 62, 43, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--fog); color: var(--ink); font-family: "Aptos", "Segoe UI", sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.access-gate { width: min(100% - 32px, 620px); margin: 56px auto 80px; }
.access-card { padding: clamp(28px, 5vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.access-card h2 { margin: 8px 0 10px; font-size: clamp(1.7rem, 4vw, 2.35rem); }
.access-card p { margin: 0 0 26px; color: var(--muted); line-height: 1.6; }
.access-card form { display: grid; gap: 12px; }
.access-card label { font-weight: 750; }
.access-card input { min-height: 52px; }
.access-card button { margin-top: 6px; justify-self: start; }
.access-error { padding: 11px 13px; border-radius: 10px; background: #fff0ed; color: #8b2519; font-weight: 700; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--pine); color: white; padding: .75rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.preview-banner { display: flex; justify-content: center; gap: .65rem; padding: .55rem 1rem; background: var(--pine); color: white; font-size: .86rem; letter-spacing: .01em; }
.preview-banner strong { color: #ffd78d; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }

.site-header { max-width: 1280px; margin: 0 auto; padding: 2rem 2.25rem 1.5rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.brand-lockup { display: flex; align-items: center; gap: 1.4rem; }
.brand-lockup img { width: 245px; height: auto; }
.eyebrow { color: var(--leaf); font-family: "Arial Narrow", "Aptos Narrow", sans-serif; font-weight: 800; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.025em; line-height: 1; }
.header-help { max-width: 300px; margin: 0; color: var(--muted); font-size: .9rem; text-align: right; }

.shell { max-width: 1280px; margin: 0 auto; padding: 0 2.25rem 4rem; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2rem; align-items: start; }
.shell[hidden] { display: none; }
.progress-panel { position: sticky; top: 1.5rem; padding: 1.5rem; background: var(--pine); color: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.progress-kicker { margin-bottom: 1rem; color: #b9d7c5; font-size: .78rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li { position: relative; display: flex; gap: .85rem; padding: .75rem 0; color: #b9c9c0; }
.step-list li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 43px; bottom: -4px; width: 1px; background: rgba(255,255,255,.18); }
.step-list li > span { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-size: .78rem; font-weight: 800; }
.step-list strong, .step-list small { display: block; }
.step-list strong { color: inherit; font-size: .94rem; }
.step-list small { margin-top: .12rem; font-size: .76rem; opacity: .7; }
.step-list li.is-current { color: white; }
.step-list li.is-current > span { background: var(--tangerine); border-color: var(--tangerine); color: #3e2900; box-shadow: 0 0 0 4px rgba(246,161,26,.16); }
.step-list li.is-complete { color: #d6eadc; }
.step-list li.is-complete > span { background: var(--harvest-green); border-color: #52af78; font-size: 0; }
.step-list li.is-complete > span::before { content: "✓"; font-size: .86rem; }
.privacy-note { margin-top: 1.3rem; padding: 1rem; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.06); }
.privacy-note strong { color: #ffd78d; font-size: .82rem; }
.privacy-note p { margin: .35rem 0 0; color: #d5e1da; font-size: .8rem; }

.form-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 1rem; }
.form-step { padding: clamp(1.5rem, 4vw, 3.4rem); min-height: 610px; }
.form-step[hidden] { display: none; }
.section-heading { display: grid; grid-template-columns: auto 1fr; gap: 1.15rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.section-number { font-family: "Arial Narrow", sans-serif; font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--tangerine); letter-spacing: -.05em; }
.section-heading h2 { margin: .2rem 0 .45rem; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; font-size: clamp(1.65rem, 3.4vw, 2.45rem); line-height: 1.05; letter-spacing: -.025em; }
.section-heading p:last-child { max-width: 670px; margin: 0; color: var(--muted); }

.choice-fieldset { margin: 0 0 1.5rem; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: .65rem; font-weight: 750; }
.program-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.program-choice { position: relative; display: block; cursor: pointer; }
.program-choice input { position: absolute; opacity: 0; pointer-events: none; }
.program-choice span { display: block; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.program-choice strong, .program-choice small { display: block; }
.program-choice small { margin-top: .2rem; color: var(--muted); font-size: .77rem; }
.program-choice:hover span { transform: translateY(-1px); border-color: #8db8a0; }
.program-choice input:checked + span { border-color: var(--harvest-green); box-shadow: inset 4px 0 0 var(--harvest-green), 0 0 0 3px rgba(8,122,62,.1); background: #f6fbf7; }
.program-choice input:focus-visible + span { outline: 3px solid rgba(246,161,26,.4); outline-offset: 2px; }

.field-grid { display: grid; gap: 1rem; }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-field { margin-bottom: 1.1rem; }
.field label, .number-field label { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .88rem; font-weight: 750; }
input, select { width: 100%; min-height: 48px; border: 1px solid #b7c9be; border-radius: 9px; padding: .68rem .78rem; background: white; color: var(--ink); }
input:hover, select:hover { border-color: #789988; }
input:focus, select:focus { outline: 3px solid rgba(246,161,26,.28); border-color: var(--harvest-green); }
select:disabled, input:disabled { background: #edf2ee; color: #7b8d83; cursor: not-allowed; }
.website-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-hint { margin: .35rem 0 0; color: var(--muted); font-size: .78rem; }
.emphasis-fields .field { padding: 1.1rem; background: #f7faf7; border: 1px solid var(--line); border-radius: 12px; }
.emphasis-fields input { font-family: "Arial Narrow", sans-serif; font-size: 1.5rem; font-weight: 800; }
.emphasis-fields.is-disabled { opacity: .58; }

.zero-report-card { position: relative; display: flex; align-items: center; gap: .9rem; margin-bottom: 1.3rem; padding: 1.05rem; border: 1px solid #e6c277; border-radius: 12px; background: #fff9ed; cursor: pointer; }
.zero-report-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-visual { flex: 0 0 24px; width: 24px; height: 24px; border: 2px solid #a06a12; border-radius: 6px; background: white; }
.zero-report-card input:checked + .check-visual { background: var(--tangerine); box-shadow: inset 0 0 0 4px white; }
.zero-report-card input:focus-visible + .check-visual { outline: 3px solid rgba(246,161,26,.35); outline-offset: 2px; }
.zero-report-card strong, .zero-report-card small { display: block; }
.zero-report-card small { margin-top: .15rem; color: #6f5a34; }

.balance-ledger { display: grid; grid-template-columns: 1.35fr repeat(5, minmax(90px, 1fr)); gap: 1px; margin-bottom: 1.2rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.community-ledger { grid-template-columns: 1.35fr minmax(130px, 1fr); }
.balance-ledger > div { min-width: 90px; padding: .75rem; background: white; }
.balance-ledger span, .balance-ledger small { display: block; color: var(--muted); font-size: .7rem; }
.balance-ledger strong { display: block; margin: .15rem 0; font-family: "Arial Narrow", sans-serif; font-size: 1.25rem; }
.ledger-target { background: var(--pine) !important; color: white; }
.ledger-target span { color: #c7dbce; }
.ledger-row { box-shadow: inset 0 3px 0 #d6a550; }
.ledger-row.is-balanced { box-shadow: inset 0 3px 0 var(--harvest-green); }
.ledger-row.is-balanced small { color: var(--harvest-green); font-weight: 800; }
.ledger-row.is-off small { color: var(--warning); font-weight: 800; }

.breakdown-stack { display: grid; gap: 1rem; }
.breakdown-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.breakdown-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: #f5f8f5; border-bottom: 1px solid var(--line); }
.breakdown-heading h3 { margin: .1rem 0 0; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; font-size: 1.2rem; }
.breakdown-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.group-total { display: grid; place-items: center; min-width: 52px; height: 38px; padding: 0 .55rem; border-radius: 9px; background: var(--pine); color: white; font-family: "Arial Narrow", sans-serif; font-size: 1.15rem; font-weight: 800; }
.shared-total { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.optional-badge { flex: 0 0 auto; padding: .4rem .6rem; border-radius: 999px; background: #e9f0eb; color: var(--leaf); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.race-segment + .race-segment { border-top: 1px solid var(--line); }
.race-segment-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .9rem 1rem 0; }
.race-segment-heading h4 { margin: 0; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; font-size: 1rem; }
.race-segment-heading span { color: var(--muted); font-size: .75rem; }
.number-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; padding: 1rem; }
.number-field input { min-height: 42px; padding: .45rem .6rem; }
.city-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.other-city-name { grid-column: span 2; }

.review-identity { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-bottom: 1rem; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.review-identity > div { padding: 1rem; background: #f8faf8; }
.review-identity span, .review-identity strong, .review-identity small { display: block; }
.review-identity span { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.review-identity strong { margin: .25rem 0; font-size: 1.05rem; }
.review-identity small { color: var(--muted); }
.review-block { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.review-block h4 { margin-bottom: .65rem; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; }
.review-block dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; margin: 0; }
.review-block dl div { display: flex; justify-content: space-between; gap: .75rem; padding-bottom: .3rem; border-bottom: 1px dotted #c6d3ca; }
.review-block dt { color: var(--muted); }
.review-block dd { margin: 0; font-weight: 800; }
.certification { display: flex; align-items: flex-start; gap: .65rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.certification input { width: 20px; min-height: 20px; margin-top: .1rem; }
.turnstile-container { min-height: 68px; margin-top: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: #f7faf7; color: var(--muted); font-size: .82rem; }

.error-summary { margin: 1.3rem 1.3rem 0; padding: 1rem 1.1rem; border: 1px solid #e6a7a2; border-left: 5px solid var(--error); border-radius: 10px; background: #fff4f3; color: #7a271a; }
.error-summary ul { margin: .45rem 0 0; padding-left: 1.2rem; }
.form-actions { display: flex; align-items: center; gap: .7rem; padding: 1rem clamp(1.5rem, 4vw, 3.4rem); border-top: 1px solid var(--line); background: #f8faf8; }
.action-spacer { flex: 1; }
.button { min-height: 46px; padding: .65rem 1.1rem; border: 1px solid transparent; border-radius: 9px; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.receipt-actions a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(246,161,26,.35); outline-offset: 2px; }
.button.primary { background: var(--harvest-green); color: white; box-shadow: 0 7px 18px rgba(8,122,62,.18); }
.button.primary:hover { background: #056c36; }
.button.secondary { background: white; border-color: #a8bdb0; color: var(--pine); }
.button:disabled { transform: none; border-color: #cad5ce; background: #e8eeea; color: #728078; box-shadow: none; cursor: not-allowed; }

.receipt { padding: clamp(1.5rem, 4vw, 3.4rem); }
.receipt-header { display: flex; align-items: center; gap: 1.5rem; padding-bottom: 1.4rem; border-bottom: 3px solid var(--tangerine); }
.receipt-header img { width: 245px; }
.receipt-header p { margin: 0; color: var(--leaf); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .73rem; }
.receipt-header h2 { margin: .2rem 0 0; font-family: "Franklin Gothic Medium", "Arial Narrow", sans-serif; }
.receipt-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 1.5rem 0; }
.receipt-meta span, .receipt-meta strong { display: block; }
.receipt-meta span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.receipt-meta strong { margin-top: .2rem; }
.receipt-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 1rem; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.receipt-totals div { padding: 1rem; background: #f6faf7; }
.receipt-totals span, .receipt-totals strong { display: block; }
.receipt-totals span { color: var(--muted); font-size: .75rem; }
.receipt-totals strong { margin-top: .25rem; font-size: 1.2rem; }
.receipt-zero { padding: 1rem; border: 1px solid #e3bd6a; background: #fff9ed; border-radius: 10px; }
.receipt-delivery-note { margin: 1.25rem 0 0; padding: 1rem; border-left: 4px solid var(--harvest-green); background: #edf5ef; color: var(--leaf); font-size: .85rem; }
.receipt-footnote { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.receipt-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.5rem; }

@media (max-width: 920px) {
  .site-header { align-items: center; }
  .header-help { display: none; }
  .shell { grid-template-columns: 1fr; }
  .progress-panel { position: static; padding: 1rem; }
  .progress-kicker, .privacy-note, .step-list small { display: none; }
  .step-list { display: grid; grid-template-columns: repeat(5, 1fr); }
  .step-list li { display: grid; justify-items: center; gap: .3rem; padding: 0; text-align: center; }
  .step-list li:not(:last-child)::after { left: calc(50% + 18px); top: 15px; bottom: auto; width: calc(100% - 36px); height: 1px; }
  .step-list strong { font-size: .74rem; }
  .balance-ledger { grid-template-columns: repeat(6, minmax(100px, 1fr)); }
}

@media (max-width: 650px) {
  .preview-banner { display: block; text-align: center; }
  .preview-banner strong { margin-right: .45rem; }
  .site-header { padding: 1.25rem 1rem 1rem; }
  .brand-lockup { align-items: flex-start; gap: .75rem; }
  .brand-lockup img { width: 150px; }
  .brand-lockup .eyebrow { display: none; }
  h1 { font-size: 1.25rem; }
  .shell { padding: 0 1rem 2rem; gap: 1rem; }
  .progress-panel { overflow-x: auto; }
  .step-list { min-width: 500px; }
  .form-step { min-height: auto; padding: 1.3rem; }
  .section-heading { grid-template-columns: 1fr; gap: .4rem; }
  .section-number { font-size: 1.2rem; }
  .program-choice-grid, .two-up, .review-identity, .receipt-meta, .receipt-totals { grid-template-columns: 1fr; }
  .number-grid, .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-city-name { grid-column: span 2; }
  .review-block dl { grid-template-columns: 1fr; }
  .form-actions { padding: 1rem 1.3rem; }
  .receipt-header { display: block; }
  .receipt-header img { width: 210px; margin-bottom: 1rem; }
}

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

@media print {
  @page { margin: .55in; }
  body { background: white; color: black; font-size: 10pt; }
  .preview-banner, .site-header, .progress-panel, form, .no-print { display: none !important; }
  .shell { display: block; max-width: none; padding: 0; }
  .form-card { border: 0; box-shadow: none; }
  .receipt { display: block !important; padding: 0; }
  .receipt-header img { width: 2.75in; }
  .review-block { break-inside: avoid; }
  .receipt-footnote { display: none; }
}
