@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #1c322b;
  background: #edf4ef;
  --ink: #152d25;
  --muted: #52685e;
  --green: #165b46;
  --active: #104d39;
  --mint: #dcefe3;
  --wash: #f1f6f2;
  --line: #d5e1d9;
  --white: #fff;
  --error: #963829;
  --radius: 1.75rem;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 50% 0, #f9fcf9, transparent 72%);
  line-height: 1.55;
}
h1, h2, p, dl, dd, fieldset { margin: 0; }
h1, h2 { color: var(--ink); }
h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.1rem);
  font-weight: 660;
  letter-spacing: -.055em;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
a { color: var(--green); }
button, input, textarea { font: inherit; }
a, button, label { touch-action: manipulation; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
h1[tabindex]:focus { outline: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip {
  position: absolute;
  inset: -6rem auto auto 1rem;
  z-index: 4;
  padding: .65rem 1rem;
  border-radius: .65rem;
  background: var(--white);
}
.skip:focus { top: .55rem; }
.frame { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.mast-inner, .identity { display: flex; align-items: center; }
.mast-inner { min-height: 5.1rem; justify-content: space-between; gap: .65rem; }
.identity {
  gap: .64rem;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 710;
  letter-spacing: -.03em;
  text-decoration: none;
}
.mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  border-radius: .77rem;
  background: #154a39;
  color: #fff;
  font-size: .8rem;
  letter-spacing: -.06em;
}
.center {
  padding: .54rem .84rem;
  border-radius: 1rem;
  color: var(--green);
  background: #e5eee7;
  font-size: .8rem;
  font-weight: 640;
  text-decoration: none;
}
.center:hover { background: var(--mint); }
.stage { padding-block: clamp(1.15rem, 3.4vw, 3rem) 3rem; }

.welcome, .survey-panel {
  min-width: 0;
  border: 1px solid #e6ede8;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1.25rem 3rem -2.25rem #19392b45;
}
.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  padding: 1rem;
}
.welcome-copy {
  padding: clamp(1.65rem, 4.1vw, 4.15rem);
  align-self: center;
}
.welcome h1 {
  max-width: 12ch;
  margin-block: .6rem .85rem;
  font-size: clamp(2.25rem, 6.1vw, 4.65rem);
  line-height: .99;
}
.welcome-meta, .section-name, .kicker {
  color: var(--green);
  font-size: .8rem;
  font-weight: 660;
}
.section-name, .kicker { margin-bottom: .54rem; }
.intro { max-width: 38ch; color: var(--muted); font-size: 1.04rem; }
.end .intro { margin-top: .85rem; }
.gate {
  max-width: 36ch;
  margin-top: 1.32rem;
  padding-inline-start: .68rem;
  border-inline-start: 2px solid #8aab98;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}
.cover-image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 23rem;
  border-radius: calc(var(--radius) - .42rem);
  background: #ccdfd5;
  object-fit: cover;
  object-position: 44% center;
}
/* Blackwater National Wildlife Refuge, Holly Keepers / USFWS (public domain).
   https://www.fws.gov/media/tidal-marsh-blackwater-national-wildlife-refuge */
.welcome-details { margin-top: .95rem; }
.welcome-details p { max-width: 48ch; }
.welcome-actions, .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}
.welcome-actions { margin-top: 1.2rem; }
.primary, .secondary {
  display: inline-flex;
  min-height: 2.85rem;
  padding: .67rem 1.16rem;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  font-size: .93rem;
  font-weight: 660;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.primary { color: white; background: var(--green); }
.primary:hover { background: var(--active); }
.secondary { color: var(--green); background: var(--wash); }
.secondary:hover { background: var(--mint); }
.actions .primary::after {
  content: '';
  width: .39rem;
  height: .39rem;
  border-block-start: 1.5px solid currentColor;
  border-inline-end: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.layout { width: min(100%, 50rem); margin-inline: auto; }
.flow-progress { margin: 0 .3rem .85rem; }
.progress-heading, .progress-tools { display: flex; align-items: center; }
.progress-heading { justify-content: space-between; gap: .45rem; }
.progress-tools { gap: .5rem; }
.stage-label { font-size: .83rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.mode {
  padding: .19rem .52rem;
  border-radius: 1rem;
  background: var(--mint);
  color: var(--green);
  font-size: .73rem;
  font-weight: 650;
}
.progress {
  display: block;
  width: 100%;
  height: .29rem;
  margin-top: .5rem;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  color: var(--green);
  background: #d3e1d7;
  accent-color: var(--green);
}
.progress::-webkit-progress-bar { background: #d3e1d7; }
.progress::-webkit-progress-value { border-radius: 1rem; background: var(--green); }
.progress::-moz-progress-bar { border-radius: 1rem; background: var(--green); }

.section-menu { position: relative; font-size: .79rem; }
.section-menu summary {
  padding: .35rem .6rem;
  border-radius: .6rem;
  color: var(--green);
  font-weight: 650;
}
.section-menu[open] summary, .section-menu summary:hover { background: var(--mint); }
.section-menu nav {
  position: absolute;
  z-index: 2;
  top: calc(100% + .4rem);
  right: 0;
  width: min(15.75rem, 78vw);
  max-height: min(31rem, 68vh);
  overflow: auto;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 .65rem 2rem #1c3c2f24;
}
.step-list { margin: 0; padding: 0; list-style: none; }
.step-list li { padding: .42rem .55rem; border-radius: .5rem; color: var(--muted); line-height: 1.32; }
.step-list li[aria-current='step'] { color: var(--green); background: var(--mint); font-weight: 690; }
.jump {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .19em;
}

.survey-panel {
  padding: clamp(1.4rem, 4vw, 2.7rem);
  container-type: inline-size;
}
.survey-header { margin-bottom: 1.35rem; }
.survey-header h1 { max-width: 28ch; }
.section-name { line-height: 1.3; }
.question-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .42rem;
  margin-top: .78rem;
}
.question-tools > details[open] { flex-basis: 100%; }
.question-tools summary {
  padding: .3rem .67rem;
  border-radius: .7rem;
  background: var(--wash);
}
.header-help, .field-help, .welcome-details, .optional-comment, .review-values, .visibility {
  color: var(--muted);
  font-size: .83rem;
}
.header-help p, .field-help p, .welcome-details p, .visibility .help {
  max-width: 60ch;
  margin-block: .48rem .25rem;
}
.header-help summary, .field-help summary, .welcome-details summary,
.optional-comment summary, .review-values summary, .visibility summary {
  width: fit-content;
  color: var(--green);
  font-weight: 630;
}
.header-help summary:hover, .field-help summary:hover, .welcome-details summary:hover,
.optional-comment summary:hover, .review-values summary:hover, .visibility summary:hover {
  text-decoration: underline;
  text-underline-offset: .18em;
}
.scale {
  display: grid;
  gap: .23rem .85rem;
  padding: .75rem .9rem;
  margin-top: .55rem;
  border-radius: .9rem;
  background: var(--wash);
}
.scale dt { color: var(--ink); font-weight: 650; }
.scale dd + dt { margin-top: .34rem; }

.fields { display: grid; gap: 1.45rem; }
.question-block, .question { min-width: 0; }
.question-block + .question-block { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.question { padding: 0; border: 0; }
.question > legend:not(.sr-only) {
  max-width: 55ch;
  padding: 0;
  margin-bottom: .38rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 680;
  line-height: 1.31;
  letter-spacing: -.022em;
  overflow-wrap: anywhere;
}
.optional {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
}
h1 > .optional { font-size: .85rem; }
.hint, .help { color: var(--muted); font-size: .85rem; margin-bottom: .55rem; }
.question .field-help { margin-bottom: .55rem; }
.optional-comment { border-radius: .95rem; background: var(--wash); padding: .6rem .78rem; }
.optional-comment fieldset { margin-top: .52rem; }

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: .42rem;
}
.choices--rating { grid-template-columns: 1fr; }
.choice {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  min-height: 2.85rem;
  padding: .6rem .85rem;
  border: 1px solid transparent;
  border-radius: .95rem;
  color: var(--ink);
  background: var(--wash);
  font-size: .95rem;
  font-weight: 515;
  line-height: 1.34;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.choice:hover { background: #e8f1ea; }
.choice:has(input:checked) {
  border-color: #4c8169;
  color: #153c2e;
  background: var(--mint);
  font-weight: 650;
}
.choice:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
input[type='radio'], input[type='checkbox'] {
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex: none;
  background: var(--white);
  border: 1.5px solid #738d7d;
  cursor: pointer;
  scroll-margin-block: 1.25rem;
}
input[type='radio'] { border-radius: 50%; }
input[type='checkbox'] { border-radius: .32rem; }
input[type='radio']:checked, input[type='checkbox']:checked { border-color: var(--green); }
input[type='radio']:checked::before {
  content: '';
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--green);
}
input[type='checkbox']:checked { background: var(--green); }
input[type='checkbox']:checked::before {
  content: '';
  width: .26rem;
  height: .46rem;
  margin-top: -.08rem;
  border-inline-end: 2px solid var(--white);
  border-block-end: 2px solid var(--white);
  transform: rotate(42deg);
}
.text-input, .receipt {
  width: 100%;
  padding: .68rem .76rem;
  border: 1px solid #82998b;
  border-radius: .86rem;
  color: var(--ink);
  background: var(--white);
}
.text-input { resize: vertical; }
.error {
  margin-top: .6rem;
  color: var(--error);
  font-size: .85rem;
  font-weight: 650;
}
.error:empty { display: none; }
.question.invalid > .choices, .question.invalid .text-input {
  border-radius: .95rem;
  outline: 2px solid var(--error);
  outline-offset: 2px;
}
.actions {
  justify-content: space-between;
  margin-top: 1.45rem;
  padding-top: 1.02rem;
  border-top: 1px solid var(--line);
}
.actions .primary { min-width: 8.35rem; }

.review-section {
  padding: .72rem .85rem;
  border-radius: .95rem;
  background: var(--wash);
}
.review-section + .review-section { margin-top: .48rem; }
.review-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}
.review-heading h2 { font-size: .97rem; font-weight: 660; letter-spacing: -.017em; line-height: 1.3; }
.review-values dl { margin-top: .25rem; }
.review-item {
  display: grid;
  gap: .15rem .7rem;
  padding: .58rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.detail-value { color: var(--ink); font-weight: 560; white-space: pre-wrap; }
.review-empty { color: var(--muted); font-size: .8rem; }
.edit {
  padding: .39rem .62rem;
  border: 0;
  border-radius: .6rem;
  color: var(--green);
  background: #e1eee5;
  font-size: .81rem;
  font-weight: 650;
}
.edit:hover { background: #cee5d6; }
.question .edit { margin-top: .42rem; }
.visibility { margin-top: 1.2rem; }
.end { width: min(100%, 44rem); margin-inline: auto; }
.end h2 { margin: 1.3rem 0 .4rem; font-size: 1.15rem; }
.end .receipt { margin-top: .8rem; }

@container (min-width: 34rem) {
  .scale { grid-template-columns: max-content minmax(0, 1fr); }
  .scale dd + dt { margin-top: 0; }
  .review-item { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

@container (min-width: 40rem) {
  .choices--rating { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .choices--rating .choice { flex-direction: column; align-items: flex-start; gap: .42rem; }
}

@media (max-width: 49rem) {
  .frame { width: calc(100% - 1.75rem); }
  .mast-inner { min-height: 4.25rem; }
  .welcome { grid-template-columns: minmax(0,1fr); padding: .55rem; }
  .welcome-copy { padding: 1.35rem; }
  .cover-image {
    grid-row: 1;
    block-size: 8rem;
    min-block-size: 0;
    border-radius: calc(var(--radius) - .58rem);
    object-position: center 54%;
  }
}

@media (max-width: 28rem) {
  :root { --radius: 1.42rem; }
  .survey-panel { padding: 1.18rem; }
  .survey-header { margin-bottom: 1.1rem; }
  .choices { grid-template-columns: 1fr; }
  .welcome h1 { max-width: 11ch; }
  .center { padding-inline: .7rem; }
}

@media (forced-colors: active) {
  input[type='radio'], input[type='checkbox'] { appearance: auto; }
  .choice:has(input:checked) { border-color: Highlight; }
}
