/* Public site styles (spec 033; theme reviewed by spec 900). Mobile first. Colors, type and
   spacing come only from tokens.css (scripts/check-design-tokens.sh). */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-400.woff2?v=8909904ab6c8") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-600.woff2?v=f9a06e79cd3a") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("/static/fonts/source-serif-4-600.woff2?v=f2b7e1cf1d27") format("woff2"); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--s5); }
body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: var(--lh-head); color: var(--ink); margin: 0 0 var(--s4); }
h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h1, h2 { text-wrap: balance; }
.lead, .story-card p { text-wrap: pretty; }
p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: var(--s5); margin: 0 0 var(--s4); }
li + li { margin-top: var(--s2); }
a { color: var(--green-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-900); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--sand-100); border: var(--border); padding: var(--s0) var(--s1); border-radius: var(--radius-xs); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow > * { max-width: var(--wrap-narrow); } /* full-width wrap keeps the header/footer left edge; children keep a readable measure */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--green-800); color: var(--white); padding: var(--s3) var(--s4); border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s4); color: var(--white); }
main:focus { outline: none; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: var(--s2) var(--s5);
  border: 2px solid var(--green-700); border-radius: var(--radius-pill);
  background: var(--white); color: var(--green-700);
  font: 600 var(--fs-sm) / 1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--green-50); color: var(--green-800); }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.btn-large { min-height: 3.25rem; padding: var(--s3) var(--s6); font-size: var(--fs-body); }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 4.25rem; padding-top: var(--s2); padding-bottom: var(--s2); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); min-height: var(--tap); color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--green-800); }
.brand-mark { flex: none; width: 2.25rem; height: 2.25rem; }
.brand-mark rect { fill: var(--green-700); }
.brand-mark circle { fill: none; stroke: var(--white); stroke-width: 7; }
.brand-mark path { stroke: var(--white); stroke-width: 7; stroke-linecap: round; fill: none; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-brand); line-height: 1.1; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1); }
.site-nav li + li { margin-top: 0; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s3);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); border-radius: var(--radius-sm);
}
.site-nav a:not(.btn):hover { background: var(--green-50); color: var(--green-800); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--green-800); text-decoration: underline; text-decoration-color: var(--green-700); text-decoration-thickness: 3px; text-underline-offset: 0.45em; }
.site-nav { display: flex; align-items: center; gap: var(--s4); }

.nav-toggle {
  display: none; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4);
  border: 2px solid var(--green-700); border-radius: var(--radius-pill); background: var(--white); color: var(--green-800);
  font: 600 var(--fs-sm) / 1 var(--font-body); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.125rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after { position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* Small screens with JavaScript: the menu collapses behind the toggle. Without JavaScript the
   two links and the call to action stay visible and wrap. */
@media (min-width: 48rem) { .site-nav a:not(.btn), .nav-cta { font-size: var(--fs-body); } }
@media (max-width: 39.99rem) {
  .js .site-nav a:not(.btn), .js .nav-cta { font-size: var(--fs-body); }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand-name { text-wrap: balance; }
  .header-inner { flex-wrap: wrap; gap: var(--s2); }
  .brand { gap: var(--s2); }
  .brand-mark { width: 2rem; height: 2rem; }
  .brand-name { font-size: var(--fs-brand-sm); }
  .nav-toggle { padding: 0 var(--s3); }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: var(--s3); padding: var(--s2) 0 var(--s4); }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a:not(.btn) { width: 100%; padding: 0 var(--s3); border-bottom: var(--border); border-radius: 0; }
  .js .site-nav a[aria-current="page"]:not(.btn) { box-shadow: inset 4px 0 0 var(--green-700); }
  .js .site-nav .btn { width: 100%; }
  .no-js .site-nav { width: 100%; flex-wrap: wrap; gap: var(--s2); }
}

/* ---------- Page sections ---------- */
.page-head { padding: var(--s7) 0 var(--s5); }
.page-head .lead, .lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 38em; }
.section { padding: var(--s7) 0; }
.section-tight { padding-top: 0; }
.section-tint { background: var(--sand-100); }
main > .section:last-child { padding-bottom: 0; }

/* Hero: text-only by default; with an owner photo it becomes a two-column split. */
.hero { position: relative; overflow: hidden; background: var(--green-50); border-bottom: var(--border); }
.hero-inner { position: relative; display: grid; gap: var(--s6); padding-top: var(--s8); padding-bottom: var(--s8); }
.hero h1 { max-width: 14em; }
.hero .lead { color: var(--ink); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-art { display: none; position: absolute; right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); top: 50%; transform: translateY(-50%); width: 17rem; height: auto; aspect-ratio: 53 / 54; color: var(--green-100); pointer-events: none; }
.hero-art circle, .hero-art path { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; }
@media (min-width: 72rem) { .hero-art { display: block; } .hero.has-photo .hero-art { display: none; } }
.hero-text { position: relative; }
.hero-photo { position: relative; margin: 0; }
.hero-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 4 / 3; }
@media (min-width: 56rem) {
  .hero-inner { padding-top: var(--s9); padding-bottom: var(--s9); }
  .hero.has-photo .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; }
}

/* Story blocks on the home page. */
.story { display: grid; gap: var(--s5); }
.story-card { background: var(--white); border: var(--border); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); }
.story-card h2 { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-h2-card); margin-bottom: var(--s3); }
.story-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--clay-100); color: var(--clay-700); display: inline-flex; align-items: center; justify-content: center; }
.story-icon svg { width: 1.375rem; height: 1.375rem; }
.story-icon svg * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 48rem) { .story-card { padding: var(--s6); } }
@media (min-width: 56rem) { .story { grid-template-columns: 1fr 1fr; } }

/* Owner photos (added later as a content change, 000 §7). */
.photo-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.photo-grid li + li { margin-top: 0; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; border-radius: var(--radius); object-fit: cover; aspect-ratio: 3 / 2; }
@media (min-width: 36rem) { .photo-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }

/* Call-to-action band. */
.cta-band { background: var(--green-800); color: var(--white); border-radius: var(--radius); padding: var(--s6) var(--s5); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band .btn { margin-top: var(--s2); background: var(--white); border-color: var(--white); color: var(--green-800); }
.cta-band .btn:hover { background: var(--green-50); border-color: var(--green-50); color: var(--green-900); }
@media (min-width: 48rem) {
  .cta-band { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); text-align: left; padding: var(--s6) var(--s7); }
  .cta-band h2 { margin: 0; }
  .cta-band .btn { margin-top: 0; flex: none; }
}

/* ---------- Prose (privacy, terms, accessibility) ---------- */
.prose h2 { margin-top: var(--s6); font-size: var(--fs-h2-prose); }
.prose h2:first-child { margin-top: 0; }
.updated { color: var(--ink-soft); font-size: var(--fs-sm); }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: var(--border); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); }
.form-card:focus { outline: none; }
@media (min-width: 40rem) { .form-card { padding: var(--s6); } }
.form-note { color: var(--ink-soft); font-size: var(--fs-sm); }
.field { margin-bottom: var(--s5); }
.field label { display: block; font-weight: 600; margin-bottom: var(--s2); }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field .hint { margin: calc(-1 * var(--s1)) 0 var(--s2); color: var(--ink-soft); font-size: var(--fs-sm); }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: var(--tap); padding: var(--s3) var(--s4);
  border: 2px solid var(--ink-soft); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  font: inherit; font-size: var(--fs-body); line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 10rem; }
.field select { appearance: none; padding-right: var(--s7); background-repeat: no-repeat; background-position: right var(--s4) center; background-size: 0.875rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2346524d' stroke-width='2'/%3E%3C/svg%3E"); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-700); outline: 3px solid var(--focus); outline-offset: 1px; }
.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--error); }
.field-error { margin: var(--s2) 0 0; color: var(--error); font-weight: 600; font-size: var(--fs-sm); }
.field-error::before { content: "! "; content: "! " / ""; }
.field input, .field select, .field textarea { scroll-margin-top: var(--s8); }
.form-actions { margin-top: var(--s5); }
.form-actions .btn { width: 100%; }
@media (min-width: 30rem) { .form-actions .btn { width: auto; } }
@media (max-width: 29.99rem) { .hero-actions .btn, .cta-band .btn { width: 100%; } }
.form-privacy { margin-top: var(--s4); color: var(--ink-soft); font-size: var(--fs-sm); }
.affiliation-note { margin-top: var(--s5); color: var(--ink-soft); font-size: var(--fs-sm); }

.alert, .error-summary { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: var(--s4); margin-bottom: var(--s5); }
.alert-error, .error-summary { background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); }
.alert:focus, .error-summary:focus { outline: 3px solid var(--focus); outline-offset: var(--s0); }
.error-summary-title { font-family: var(--font-body); font-size: var(--fs-body); color: var(--error); margin-bottom: var(--s2); }
.error-summary ul { list-style: none; padding-left: 0; margin: 0; }
.error-summary li + li { margin-top: var(--s1); }
.error-summary a { color: var(--error); font-weight: 600; }
.form-success { text-align: center; padding: var(--s4) 0; }
.form-success p { text-wrap: balance; }
.btn:disabled { cursor: progress; background: var(--green-800); border-color: var(--green-800); }
.form-success:focus { outline: none; }
.form-success-icon { margin: 0 auto var(--s4); width: 3rem; height: 3rem; color: var(--success); }
.form-success-icon circle { fill: var(--success-bg); stroke: currentColor; stroke-width: 1.5; }
.form-success-icon path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Honeypot: off-screen, not display:none (spec 021 req 2). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Flash messages (sign-out notices and the like). */
.flash { margin: var(--s5) auto 0; max-width: var(--wrap); padding: 0 var(--gutter); }
.flash p { max-width: var(--wrap-narrow); border-left: 4px solid currentColor; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: var(--s4); margin: 0; }
.flash-success p { background: var(--success-bg); color: var(--success); }
.flash-error p { background: var(--error-bg); color: var(--error); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s8); background: var(--green-900); color: var(--green-100); padding: var(--s7) 0 var(--s6); font-size: var(--fs-sm); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--green-100); }
.footer-top { display: grid; gap: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid var(--green-700); }
.footer-brand { margin: 0; display: flex; align-items: center; gap: var(--s3); color: var(--white); font-family: var(--font-head); font-size: var(--fs-brand); font-weight: 600; }
.footer-brand .brand-mark rect { fill: var(--white); }
.footer-brand .brand-mark circle, .footer-brand .brand-mark path { stroke: var(--green-900); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s4); }
.footer-nav li + li { margin-top: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: var(--tap); }
.footer-nav a[aria-current="page"] { font-weight: 600; text-decoration-thickness: 3px; }
.footer-note, .footer-copy { margin: var(--s4) 0 0; color: var(--green-100); }
@media (min-width: 48rem) { .footer-top { grid-template-columns: auto 1fr; align-items: center; } .footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s1) var(--s4); } }
.site-footer :focus-visible, .cta-band :focus-visible { outline-color: var(--focus-on-dark); }

/* Site credits (spec 040): the last block in the footer. */
.site-credits { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--green-700); font-size: var(--fs-xs); color: var(--green-100); }
.site-credits p { margin: 0; }
.site-credits p + p { margin-top: var(--s1); }
.site-credits p { line-height: 1.9; }
.site-credits a { color: var(--white); text-decoration: underline; } /* in-sentence links: WCAG 2.5.8 inline exception; the line height keeps them about 24px tall (spec 040 req 8) */

/* ---------- Error pages ---------- */
.error-page { padding: var(--s5) 0 0; }
.error-code { line-height: var(--lh-head); margin-bottom: var(--s1); }
.error-code { font-family: var(--font-head); font-size: var(--fs-brand); color: var(--clay-700); margin-bottom: var(--s2); }

@media (forced-colors: active) {
  .site-nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { forced-color-adjust: none; background: ButtonText; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
}

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