@font-face {
  font-family: "National Park";
  src: url("./national-park.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Federal Standard 595 palette from the Truffle brand guide */
  --dark-brown: #42332a;
  --deep-brown: #2a1610;
  --bronze: #7c503a;
  --forest-green: #39604b;
  --dark-green: #172e29;
  --amber: #ee9600;
  --red: #b44441;
  --off-white: #f2e5df;

  /* Form surfaces */
  --paper: #f7f1e9;
  --well: #fffcf8;
  --ink: #42332a;
  --ink-muted: #6e5e51;
  --rule: #e2d8cb;
  --field-border: #968574;
  --on-dark-muted: rgb(242 229 223 / 62%);

  font-family: "National Park", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: var(--bronze); text-decoration-color: rgb(124 80 58 / 40%); text-underline-offset: 4px; }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
p { margin-top: 0; }
::selection { background: rgb(238 150 0 / 30%); color: var(--ink); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }

h1 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h2 { margin: 8px 0 14px; color: var(--dark-green); font-size: 24px; font-weight: 600; line-height: 1.2; }

/* ── Request flow: brand panel + form ─────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(420px, 46fr) 54fr;
  min-height: 100svh;
}

.map {
  position: sticky;
  top: 0;
  align-self: start;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100svh;
  padding: 40px clamp(32px, 4.2vw, 72px);
  background: var(--dark-brown);
  color: var(--off-white);
}
/* Survey-map contours: calm behind the headline, dense where the trail runs. */
.map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("./terrain.svg") right bottom / cover no-repeat;
  opacity: 0.62;
  pointer-events: none;
}
.map .brand { display: inline-flex; align-self: flex-start; padding: 4px 0; }
.map .brand img { display: block; width: 232px; height: auto; }

.hero { margin-block: auto; padding-block: 32px; max-width: 600px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: none; width: 34px; height: 3px; background: currentColor; }
.hero-title {
  margin: 0;
  color: var(--off-white);
  font-size: clamp(40px, 3.9vw, 60px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero-title span { color: var(--amber); }

/* The trail: dashed legs between waypoint rings, as on the webinar creative. */
.route { display: block; flex: none; width: min(400px, 100%); height: auto; margin-left: auto; overflow: visible; }
.leg { fill: none; stroke-linecap: round; }
.leg.upcoming { stroke: rgb(242 229 223 / 38%); stroke-width: 2; stroke-dasharray: 0.5 7; }
.leg.done { stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 7 7; }
.waypoint .halo { fill: var(--amber); opacity: 0; }
.waypoint .ring { fill: var(--dark-brown); stroke: rgb(242 229 223 / 50%); stroke-width: 2; }
.waypoint .dot { fill: none; }
.waypoint .tick { fill: none; stroke: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.waypoint text {
  fill: var(--on-dark-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  /* A cartographic halo keeps labels legible over dense contours. */
  paint-order: stroke;
  stroke: var(--dark-brown);
  stroke-width: 7px;
  stroke-linejoin: round;
}
.waypoint.current .ring { stroke: var(--amber); stroke-width: 2.5; }
.waypoint.current .dot { fill: var(--amber); }
.waypoint.current .halo { transform-box: fill-box; transform-origin: center; animation: halo 2.6s ease-out infinite; }
.waypoint.current text { fill: var(--off-white); }
.waypoint.done .ring { fill: var(--amber); stroke: var(--amber); }
.waypoint.done .tick { stroke: var(--deep-brown); }
.waypoint.done text { fill: rgb(242 229 223 / 82%); }
@keyframes halo {
  from { transform: scale(0.55); opacity: 0.5; }
  to { transform: scale(1.35); opacity: 0; }
}

/* Accessible progress list; drawn as a compact row on small screens. */
.steps { margin: 0; padding: 0; list-style: none; }

.form-side { display: flex; flex-direction: column; min-width: 0; padding: 56px clamp(28px, 6vw, 104px); }
.request { width: 100%; max-width: 440px; margin: auto; }
.request.wide { max-width: 600px; }

.lede { margin: 0 0 30px; color: var(--ink-muted); font-size: 17px; line-height: 1.5; }
.lede strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.hint { margin: 10px 0 0; color: var(--ink-muted); font-size: 13.5px; line-height: 1.5; }
.fine { color: var(--ink-muted); font-size: 12.5px; line-height: 1.6; }
.form-note { margin: 16px 0 0; }
/* The server error already states the work-email rule; don't repeat it under the field. */
.error + form #work-email-help { display: none; }

.field { min-width: 0; margin: 0 0 20px; }
.field label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), textarea {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--well);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  transition: border-color 120ms ease;
}
input::placeholder, textarea::placeholder { color: #9d8d7f; opacity: 1; }
input:hover, textarea:hover { border-color: var(--bronze); }
input:focus, textarea:focus { border-color: var(--bronze); outline: 2px solid var(--bronze); outline-offset: 1px; }

/* Six-digit code: one real input, drawn as six cells. */
#code {
  --cell: 2.9ch;
  --pitch: calc(var(--cell) + 0.75ch);
  --edge: var(--field-border);
  width: calc(6 * var(--pitch) + 0.8ch + 2px);
  max-width: 100%;
  height: 62px;
  padding: 0 0 0 calc(var(--cell) / 2 - 0.5ch);
  border: 0;
  border-radius: 0;
  outline: 0;
  caret-color: var(--bronze);
  font: 600 min(28px, calc((100vw - 50px) / 13.9))/1 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: calc(var(--pitch) - 1ch);
  background:
    linear-gradient(90deg,
      transparent 0 1.5px, var(--well) 0 calc(var(--cell) - 1.5px),
      transparent 0 calc(var(--pitch) + 1.5px), var(--well) 0 calc(var(--pitch) + var(--cell) - 1.5px),
      transparent 0 calc(2 * var(--pitch) + 1.5px), var(--well) 0 calc(2 * var(--pitch) + var(--cell) - 1.5px),
      transparent 0 calc(3 * var(--pitch) + 1.5px), var(--well) 0 calc(3 * var(--pitch) + var(--cell) - 1.5px),
      transparent 0 calc(4 * var(--pitch) + 1.5px), var(--well) 0 calc(4 * var(--pitch) + var(--cell) - 1.5px),
      transparent 0 calc(5 * var(--pitch) + 1.5px), var(--well) 0 calc(5 * var(--pitch) + var(--cell) - 1.5px),
      transparent 0) 0 1.5px / 100% calc(100% - 3px) no-repeat,
    linear-gradient(90deg,
      var(--edge) 0 var(--cell), transparent 0 var(--pitch),
      var(--edge) 0 calc(var(--pitch) + var(--cell)), transparent 0 calc(2 * var(--pitch)),
      var(--edge) 0 calc(2 * var(--pitch) + var(--cell)), transparent 0 calc(3 * var(--pitch)),
      var(--edge) 0 calc(3 * var(--pitch) + var(--cell)), transparent 0 calc(4 * var(--pitch)),
      var(--edge) 0 calc(4 * var(--pitch) + var(--cell)), transparent 0 calc(5 * var(--pitch)),
      var(--edge) 0 calc(5 * var(--pitch) + var(--cell)), transparent 0) no-repeat;
}
#code::placeholder { color: #b3a495; }
#code:hover { --edge: var(--bronze); }
#code:focus { --edge: var(--bronze); outline: 0; }

button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: var(--amber);
  color: var(--deep-brown);
  font: inherit;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 120ms ease;
}
button > span[aria-hidden] { font-size: 20px; line-height: 1; font-weight: 500; transition: transform 160ms ease; }
button:hover { background: #df8c00; }
button:hover > span[aria-hidden] { transform: translateX(3px); }
button:active { background: #cc8000; }
button:focus-visible { outline-color: var(--ink); }

/* Secondary actions are posted forms, styled as quiet text links. */
button.link {
  display: inline;
  width: auto;
  height: auto;
  padding: 0;
  background: none;
  color: var(--bronze);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(124 80 58 / 40%);
  text-underline-offset: 4px;
}
button.link:hover { background: none; color: var(--ink); text-decoration-color: currentColor; }
.text-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 14px; }
.text-actions form { margin: 0; }
.after { margin-top: 20px; }

.verified {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "status change" "email change";
  align-items: center;
  gap: 1px 16px;
  margin: 18px 0 28px;
  padding: 12px 16px;
  border: 1px solid rgb(57 96 75 / 28%);
  border-radius: 8px;
  background: rgb(57 96 75 / 7%);
  font-size: 14px;
}
.verified-status { grid-area: status; position: relative; padding-left: 28px; color: var(--forest-green); font-weight: 650; }
.verified-status::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 19px;
  height: 19px;
  margin-top: -9.5px;
  border-radius: 50%;
  background: var(--forest-green);
}
.verified-status::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 5px;
  height: 9px;
  margin-top: -6px;
  border: solid var(--off-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.verified-email { grid-area: email; padding-left: 28px; color: var(--ink); overflow-wrap: anywhere; }
.verified form { grid-area: change; margin: 0; }

.group { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--rule); }
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--bronze);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.optional {
  padding: 3px 10px;
  border-radius: 999px;
  background: #ede3d6;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.integration-payload { margin: 28px 0 24px; }
.integration-payload h2 { font-size: 22px; }
.integration-payload p { font-size: 14px; }
.integration-payload pre { background: var(--well); border: 1px solid var(--rule); border-radius: 6px; padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.integration-payload code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.doc { margin: 0 0 20px; overflow: hidden; border: 1px solid var(--rule); border-radius: 10px; background: var(--well); }
.doc summary { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; cursor: pointer; list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary:hover .doc-toggle { color: var(--ink); }
.doc-thumb {
  flex: none;
  width: 46px;
  height: 58px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #fff;
}
.doc-title { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.3; }
.doc-meta { color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.doc-toggle { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--bronze); font-size: 14px; font-weight: 600; }
.doc-toggle::before { content: "Read"; }
.doc-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.doc[open] .doc-toggle::before { content: "Hide"; }
.doc[open] .doc-toggle::after { margin-top: 3px; transform: rotate(-135deg); }
.doc-body { padding: 4px 18px 18px; border-top: 1px solid var(--rule); }
.doc-download { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }
.document-pages figure { margin: 16px 0 0; }
.document-pages img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
.document-pages figcaption { margin-top: 8px; color: var(--ink-muted); font-size: 12px; text-align: center; }

.checkbox { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 28px; color: var(--ink); font-size: 14.5px; line-height: 1.55; cursor: pointer; }
.checkbox input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest-green); cursor: pointer; }
.agreement .fine { margin: -14px 0 24px; }

.receipt-mark { display: block; width: 56px; height: 56px; margin-bottom: 30px; }
.receipt-mark circle { fill: var(--amber); }
.receipt-mark path {
  fill: none;
  stroke: var(--deep-brown);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: draw 480ms 180ms ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt .lede { margin-bottom: 12px; }

.error {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid rgb(180 68 65 / 32%);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  background: #f8e8e2;
  color: var(--ink);
  font-size: 14px;
}
.error ul { margin: 0; padding-left: 18px; }
.error li + li { margin-top: 8px; }
.error ul:has(> li:only-child) { padding-left: 0; list-style: none; }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo { padding: 7px 16px; background: var(--dark-green); color: var(--off-white); font-size: 12px; text-align: center; }
.demo a { margin-left: 8px; color: var(--off-white); }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 12px 20px; border-radius: 4px; background: var(--well); }
.skip-link:focus { top: 12px; }

/* ── Standalone pages: agreement, notices, staff inbox ────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px;
}
header .brand { display: flex; padding: 6px 0; }
header .brand img { display: block; width: 260px; height: auto; }
.program-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bronze);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.program-label::before { content: ""; width: 24px; height: 2px; background: var(--amber); }
main { max-width: 1180px; margin: 0 auto 48px; padding: 0 40px; }
main.form-side { max-width: none; margin: 0; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 12px;
}
.panel { margin-bottom: 20px; padding: 32px; border: 1px solid var(--rule); border-radius: 10px; background: var(--well); }
.message { max-width: 620px; margin: 48px auto; }
.document { max-width: 860px; margin: 8px auto 0; }
.document .back { font-size: 14px; font-weight: 600; }
.document h1 { margin-top: 22px; }
.document > .doc-meta { font-size: 15px; }
.staff { max-width: 960px; margin: auto; }
.staff .eyebrow { color: var(--bronze); font-size: 10.5px; letter-spacing: 0.2em; }
.staff .eyebrow::before { display: none; }
.staff-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.staff-heading a { font-size: 14px; }
.badge { padding: 5px 12px; border-radius: 999px; background: #ede3d6; font-size: 12px; white-space: nowrap; }
.share { padding: 16px; border: 1px solid var(--rule); border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.muted { color: var(--ink-muted); }
dl { display: grid; grid-template-columns: 145px 1fr; gap: 12px; margin: 20px 0; font-size: 14px; }
dt { color: var(--ink-muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.digest { font-size: 12px; }
summary { color: var(--bronze); font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Responsive ───────────────────────────────────────────────────── */

@media (min-width: 1180px) {
  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

@media (min-width: 861px) {
  .steps { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (min-width: 861px) and (max-height: 780px) {
  .hero-title { font-size: clamp(36px, 3.4vw, 50px); }
  .route { width: min(340px, 100%); }
}
@media (min-width: 861px) and (max-height: 620px) {
  .route { display: none; }
}

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(380px, 44fr) 56fr; }
  .map { padding: 32px 36px; }
  .form-side { padding: 56px 44px; }
}

@media (max-width: 860px) {
  .split { display: block; min-height: 0; }
  /* One shared column edge for the band and the form on tablets. */
  .map { position: relative; height: auto; padding: 22px max(24px, calc((100% - 640px) / 2)) 26px; }
  .map::before { background-position: right 42%; background-size: max(100%, 620px) auto; opacity: 0.42; }
  .map .brand img { width: 200px; }
  .hero { margin: 0; padding: 30px 0 0; }
  .eyebrow { margin-bottom: 14px; font-size: 11px; }
  .eyebrow::before { width: 26px; }
  .hero-title { max-width: 560px; font-size: clamp(28px, 7.2vw, 40px); line-height: 1.08; }
  .route { display: none; }

  .steps { display: flex; gap: 8px; margin-top: 26px; }
  .steps li { position: relative; flex: 1; padding-top: 24px; color: var(--on-dark-muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
  .steps li::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    border: 2px solid rgb(242 229 223 / 50%);
    border-radius: 50%;
    background: var(--dark-brown);
  }
  .steps li::after { content: ""; position: absolute; top: 6.5px; left: 21px; right: -2px; border-top: 2px dotted rgb(242 229 223 / 35%); }
  .steps li:last-child::after { display: none; }
  .steps li.current { color: var(--off-white); }
  .steps li.current::before { border-color: var(--amber); background: var(--amber); box-shadow: inset 0 0 0 2.5px var(--dark-brown); }
  .steps li.done { color: rgb(242 229 223 / 82%); }
  .steps li.done::before { border-color: var(--amber); background: var(--amber); }
  .steps li.done::after { border-top-style: dashed; border-top-color: var(--amber); }

  .form-side { padding: 34px max(24px, calc((100% - 640px) / 2)) 48px; }
  .request, .request.wide { max-width: none; margin: 0; }
  h1 { font-size: 30px; }
  .lede { margin-bottom: 24px; font-size: 16px; }

  header { padding: 24px; }
  header .brand img { width: 220px; }
  .program-label { display: none; }
  main { padding: 0 20px; }
  footer { margin: 0 20px; flex-direction: column; gap: 6px; }
  .panel { padding: 24px; }
  .staff-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 10px; }
}

@media (max-width: 380px) {
  .map { padding: 20px 20px 24px; }
  .form-side { padding: 30px 20px 44px; }
}

.demo a { color: var(--off-white); margin-left: 8px; }

.intake-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 26px 0 22px; overflow-x: auto; }
.intake-tabs a { padding: 12px 16px; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.intake-tabs a[aria-current=page] { border-bottom-color: var(--forest-green); color: var(--dark-green); font-weight: 700; }
.tab-count { display: inline-block; margin-left: 6px; background: #fff; border-radius: 20px; padding: 0 8px; font-size: 12px; }
.badge-approved { color: var(--dark-green); background: #e4eee7; }
.badge-declined { color: var(--red); background: #f8e9e7; }
.review-actions { display: flex; gap: 12px; margin-top: 24px; }
.review-actions form { flex: 1; }
.review-actions button { justify-content: center; }
button.decline { background: #fff; color: var(--red); border: 1px solid var(--red); }
button.decline:hover { background: #f8e9e7; }
.email-status { color: var(--forest-green); font-size: 14px; margin-top: 24px; }
.email-notice { border-top: 1px solid var(--line); margin-top: 24px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  input, button, button > span[aria-hidden], .doc-toggle::after { transition: none; }
  .waypoint.current .halo { animation: none; opacity: 0.22; transform: scale(1); }
  .receipt-mark path { animation: none; stroke-dashoffset: 0; }
}

textarea { resize: vertical; height: auto; min-height: 120px; padding: 12px 16px; }
.revocation-docs { white-space: pre-wrap; }
