:root {
  color-scheme: light;
  /* Generic no-pack defaults: neutral slate, deliberately NOT the Bible School
     green/gold (that identity lives only in its visual pack in packs.js).
     Property names are historical slot names that packs override. */
  --brand-green: #35424e;
  --brand-green-deep: #28323c;
  --brand-green-muted: #5a6875;
  --brand-green-border: #93a1ad;
  --brand-green-faint: rgb(53 66 78 / 12%);
  --brand-gold: #7d8da0;
  --surface: #f6f8f9;
  --invalid: #b42318;
  --invalid-faint: rgb(180 35 24 / 14%);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--brand-green);
  background: var(--surface);
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
select,
summary,
input[type="checkbox"] {
  cursor: pointer;
}

button,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

:where(button, input, select, summary):focus-visible {
  outline: 3px solid var(--brand-green);
  outline-offset: 2px;
}

::selection {
  color: var(--brand-green-deep);
  background: color-mix(in srgb, var(--brand-gold) 38%, transparent);
}

.page-shell::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 5px;
  background: var(--brand-gold);
}

.page-shell {
  position: relative;
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  scroll-padding-block: 88px;
  align-items: stretch;
  justify-content: center;
  padding-block-start: max(74px, calc(env(safe-area-inset-top) + 66px));
  padding-block-end: max(10px, env(safe-area-inset-bottom));
  padding-inline: clamp(12px, 4vw, 20px);
}

.language-picker {
  position: absolute;
  z-index: 1;
  inset-block-start: max(10px, env(safe-area-inset-top));
  inset-inline-end: max(12px, env(safe-area-inset-right));
}

html[dir="rtl"] .language-picker {
  inset-inline-end: max(12px, env(safe-area-inset-left));
}

#language-select {
  max-width: min(188px, calc(100vw - 32px));
  min-height: 44px;
  border: 1px solid var(--brand-green-border);
  border-radius: 12px;
  padding: 8px 11px;
  color: var(--brand-green);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  transition: border-color 160ms ease, background-color 160ms ease;
}

#language-select:hover {
  border-color: var(--brand-gold);
  background: var(--brand-green-faint);
}

#language-select option {
  color: var(--brand-green);
  background: var(--surface);
}

.content-stack {
  display: grid;
  width: min(100%, 520px);
  height: 100%;
  min-width: 0;
  grid-template-rows: auto auto minmax(24px, 1fr);
  align-items: center;
  align-content: stretch;
  row-gap: clamp(8px, 1.1dvh, 14px);
}

.content-stack::after {
  content: "";
  grid-row: 3;
}

.hero-zone {
  display: grid;
  grid-row: 1;
  width: 100%;
  align-self: center;
  justify-items: center;
  gap: clamp(4px, .7dvh, 7px);
}

.brand-header {
  display: grid;
  width: 100%;
  min-height: clamp(60px, 14.9vw, 94px);
  place-items: center;
}

.brand-header > * {
  grid-area: 1 / 1;
}

.brand-logo {
  display: block;
  width: min(560px, 89vw);
  max-width: 100%;
  height: clamp(60px, 14.9vw, 94px);
  justify-self: center;
  object-fit: contain;
}

.brand-title {
  /* Same slot as .brand-logo so packless forms keep the logo's footprint;
     the fit-to-width routine in app.js scales the text to fill it. */
  width: min(560px, 89vw);
  max-width: 100%;
  justify-self: center;
  margin: 0;
  color: var(--brand-green);
  font-size: clamp(1.65rem, 1.3rem + 1.6vw, 2.25rem);
  font-weight: 820;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-align: center;
  text-wrap: balance;
}

.view-container {
  position: relative;
  display: grid;
  grid-row: 2;
  width: min(100%, 440px);
  min-width: 0;
  justify-self: center;
  padding-block: clamp(12px, 1.6dvh, 18px);
  padding-inline: clamp(13px, 3.5vw, 22px);
  border: 1px solid color-mix(in srgb, var(--brand-green-border) 52%, transparent);
  border-radius: clamp(18px, 5vw, 24px);
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--surface) 96%, var(--brand-gold)),
    color-mix(in srgb, var(--surface) 98%, var(--brand-green-faint))
  );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--surface) 82%, transparent),
    0 22px 50px -30px color-mix(in srgb, var(--brand-green-deep) 24%, transparent),
    0 8px 22px -16px color-mix(in srgb, var(--brand-green) 14%, transparent);
}

.view-container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block-start: 0;
  inset-inline: 0;
  width: clamp(54px, 17vw, 76px);
  height: 4px;
  margin-inline: auto;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--brand-gold) 88%, var(--surface)),
    color-mix(in srgb, var(--brand-green) 70%, var(--brand-gold))
  );
  box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-gold) 18%, transparent);
  pointer-events: none;
}

/* All views share one cell: the container holds the tallest view's height
   permanently, so switching views never shifts the page. Inactive views are
   kept in layout but invisible and inert. */
.view-container > [data-view] {
  grid-area: 1 / 1;
}

.view-container > .state[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.view-container > form[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

/* The CTA under the logo keeps its space when the form view is away. */
.context-line[hidden] {
  display: block !important;
  visibility: hidden;
}

/* Animations must not run while a view is invisible; applying them only when
   visible also restarts them the moment the view appears. */
.view-container > [hidden] .spinner,
.view-container > [hidden] .success-mark--animated,
.view-container > [hidden] .success-mark--animated .success-mark__tick {
  animation: none;
}

.attestation-form {
  /* Flex column so the submit button can pin to the sheet's bottom edge
     with margin-block-start auto when the sheet is taller than the form. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(7px, 1dvh, 10px);
  width: 100%;
}

.attestation-form #submit-button {
  margin-block-start: auto;
}

.palette-fields {
  display: grid;
  gap: clamp(7px, 1dvh, 10px);
}

.palette-fields:empty {
  display: none;
}

.context-line {
  /* Bottom margin replaces the spacing the removed divider used to provide. */
  margin: clamp(10px, 1.8dvh, 18px) 0 clamp(16px, 3dvh, 34px);
  max-width: 48ch;
  color: var(--brand-green);
  font-size: clamp(1.35rem, 1.14rem + 1.1dvh, 1.7rem);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  text-wrap: balance;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 1.05rem;
  font-size: clamp(1.05rem, 1.01rem + .15dvh, 1.1rem);
  font-weight: 780;
  line-height: 1.3;
}

.label-optional {
  margin-inline-start: .38em;
  color: var(--brand-green-muted);
  font-size: .86em;
  font-weight: 620;
  white-space: nowrap;
}

input:is([type="text"], [type="email"], [type="tel"]) {
  width: 100%;
  min-height: 53px;
  border: 1px solid var(--brand-green-border);
  border-radius: 13px;
  padding: 10px 13px;
  color: var(--brand-green-deep);
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  font-size: 17px;
  line-height: 1.3;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:is([type="text"], [type="email"], [type="tel"]):hover {
  border-color: var(--brand-green-muted);
}

input:is([type="text"], [type="email"], [type="tel"]):focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-gold) 32%, transparent);
}

input:is([type="text"], [type="email"], [type="tel"]).is-invalid {
  border-color: var(--invalid);
  background: linear-gradient(var(--invalid-faint), var(--invalid-faint)), var(--surface);
}

input:is([type="text"], [type="email"], [type="tel"]).is-invalid:is(:hover, :focus) {
  border-color: var(--invalid);
}

input:is([type="text"], [type="email"], [type="tel"]).is-invalid:focus {
  box-shadow: 0 0 0 3px var(--invalid-faint);
}

input:is([type="text"], [type="email"], [type="tel"]).is-invalid:focus-visible {
  outline-color: var(--invalid);
}

input:is([type="email"], [type="tel"]) {
  direction: ltr;
}

.phone-composite {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 53px;
  overflow: hidden;
  border: 1px solid var(--brand-green-border);
  border-radius: 13px;
  color: var(--brand-green-deep);
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.phone-composite:hover {
  border-color: var(--brand-green-muted);
}

.phone-composite:focus-within {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-gold) 32%, transparent);
}

.phone-composite.is-invalid,
.phone-composite.is-invalid:hover {
  border-color: var(--invalid);
  background: linear-gradient(var(--invalid-faint), var(--invalid-faint)), var(--surface);
}

.phone-composite.is-invalid:focus-within {
  border-color: var(--invalid);
  box-shadow: 0 0 0 3px var(--invalid-faint);
}

.phone-composite.is-invalid .phone-country-control {
  background: linear-gradient(var(--invalid-faint), var(--invalid-faint)), var(--surface);
}

.phone-country-control {
  position: relative;
  min-width: 102px;
  flex: 0 0 auto;
  border-inline-end: 1px solid var(--brand-green-border);
  background: var(--brand-green-faint);
}

.phone-country-display {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 11px;
  direction: ltr;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.phone-country-display::after {
  content: "▾";
  color: var(--brand-green-muted);
  font-size: .78em;
}

.phone-country-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  opacity: 0;
}

.phone-country-select:focus-visible,
.phone-composite input.phone-number-input:focus-visible {
  outline: 0;
}

.phone-composite input.phone-number-input {
  width: auto;
  min-width: 0;
  min-height: 51px;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-composite input.phone-number-input:is(:hover, :focus) {
  border: 0;
  box-shadow: none;
}

.attestation-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-green-border) 58%, transparent);
  border-radius: 13px;
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--surface) 96%, var(--brand-gold)),
    color-mix(in srgb, var(--surface) 95%, var(--brand-green-faint))
  );
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 78%, transparent);
}

.agreement-card.is-invalid {
  border-color: var(--invalid);
  background:
    linear-gradient(var(--invalid-faint), var(--invalid-faint)),
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--surface) 96%, var(--brand-gold)),
      color-mix(in srgb, var(--surface) 95%, var(--brand-green-faint))
    );
}

.agreement-card.is-invalid:focus-within {
  box-shadow: 0 0 0 3px var(--invalid-faint);
}

.agreement-card.is-invalid input:focus-visible {
  outline-color: var(--invalid);
}

.attestation-copy {
  min-width: 0;
  padding: 10px 12px;
  color: var(--brand-green-muted);
  font-size: clamp(.95rem, .92rem + .12dvh, 1rem);
  line-height: 1.45;
}

.attestation-copy__frame {
  position: relative;
  min-width: 0;
}

.attestation-copy__viewport {
  max-height: min(24dvh, 160px);
  overflow: hidden;
  border-radius: 7px;
  scrollbar-color: var(--brand-green-border) transparent;
  scrollbar-width: thin;
}

.attestation-copy.is-short .attestation-copy__viewport {
  max-height: none;
  overflow: visible;
}

.attestation-copy.is-expanded .attestation-copy__viewport {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.attestation-copy__viewport:focus-visible {
  outline: 3px solid var(--brand-green);
  outline-offset: -3px;
}

.attestation-copy__frame::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 48px;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--surface) 94%, var(--brand-green-faint))
  );
  opacity: 0;
  pointer-events: none;
}

.attestation-copy.is-overflowing:not(.is-expanded) .attestation-copy__frame::after {
  opacity: 1;
}

.attestation-copy__body {
  margin: 0;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--brand-gold);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.attestation-copy__toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: 7px;
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--brand-green);
  background: var(--brand-green-faint);
  font-weight: 720;
  line-height: 1.3;
  text-align: start;
}

.attestation-copy__toggle:hover {
  background: color-mix(in srgb, var(--brand-green-faint) 72%, var(--brand-gold));
}

.agreement-card {
  /* Clear separation from the field stack above and the gate below. */
  margin-block: clamp(12px, 2.2dvh, 22px) clamp(8px, 1.4dvh, 16px);
}

.agreement-card .agreement-disclosure__toggle {
  margin-block-start: 0;
  border-radius: 0;
  padding: 13px 15px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand-green-faint));
}

.agreement-card .agreement-disclosure__toggle:hover {
  background: color-mix(in srgb, var(--brand-green-faint) 76%, var(--brand-gold));
}

.agreement-card.is-invalid .agreement-disclosure__toggle,
.agreement-card.is-invalid .agreement-disclosure__toggle:hover {
  background: linear-gradient(var(--invalid-faint), var(--invalid-faint)), var(--surface);
}

.agreement-disclosure__body {
  border-block-start: 1px solid color-mix(in srgb, var(--brand-green-border) 48%, transparent);
}

.attestation-copy__toggle::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--brand-green-muted);
  font-size: 1.1em;
  transition: transform 160ms ease;
}

.attestation-copy.is-expanded .attestation-copy__toggle::after {
  transform: rotate(.5turn);
}

.agreement-card.is-open .agreement-disclosure__toggle::after {
  transform: rotate(.5turn);
}

.attestation-copy__toggle-labels {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
}

.attestation-copy__toggle-label {
  grid-area: 1 / 1;
  overflow-wrap: anywhere;
}

.attestation-copy__toggle-label--less {
  visibility: hidden;
}

.attestation-copy.is-expanded .attestation-copy__toggle-label--read {
  visibility: hidden;
}

/* Guarded by :not([hidden]): an explicit visibility: visible would override
   the hidden form view's visibility: hidden and ghost the label into the
   success/error views (the "straggler text" bug). */
.view-container > form:not([hidden]) .attestation-copy.is-expanded .attestation-copy__toggle-label--less {
  visibility: visible;
}

.agreement-card.is-open .agreement-disclosure__toggle .attestation-copy__toggle-label--read {
  visibility: hidden;
}

.view-container > form:not([hidden]) .agreement-card.is-open .agreement-disclosure__toggle .attestation-copy__toggle-label--less {
  visibility: visible;
}

.check-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  color: var(--brand-green);
  font-size: 1rem;
  font-size: clamp(1rem, .97rem + .12dvh, 1.05rem);
  font-weight: 720;
  line-height: 1.35;
}

.agreement-card .check-row {
  border-block-start: 1px solid color-mix(in srgb, var(--brand-green-border) 48%, transparent);
  padding: 13px 15px;
}

.check-row input {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--brand-green);
}

.turnstile-box:empty {
  display: none;
}

.turnstile-box {
  display: flex;
  justify-content: center;
  margin-block: clamp(6px, 1.2dvh, 14px);
}

#submit-button,
.state-action {
  width: 100%;
  min-height: 55px;
  border: 0;
  border-block-end: 3px solid var(--brand-gold);
  border-radius: 14px;
  padding: 11px 16px;
  color: var(--surface);
  background: var(--brand-green);
  font-size: 1.15rem;
  font-size: clamp(1.15rem, 1.1rem + .18dvh, 1.2rem);
  font-weight: 800;
  line-height: 1.2;
  transition: background-color 160ms ease, transform 160ms ease;
}

#submit-button:hover,
.state-action:hover {
  background: var(--brand-green-deep);
}

#submit-button:active,
.state-action:active {
  transform: scale(.99);
}

#submit-button:disabled {
  cursor: wait;
  opacity: .75;
}

.state {
  display: flex;
  min-height: 220px;
  min-height: clamp(220px, 34dvh, 300px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.state h2,
.state p {
  margin: 0;
}

.state h2 {
  font-size: 1.45rem;
  font-size: clamp(1.45rem, 1.25rem + .8dvh, 1.8rem);
  line-height: 1.12;
  text-wrap: balance;
}

.state p {
  max-width: 34ch;
  color: var(--brand-green-muted);
  font-size: 1rem;
  font-size: clamp(1rem, .94rem + .2dvh, 1.08rem);
  line-height: 1.45;
  text-wrap: balance;
}

.state-action {
  max-width: 300px;
  margin-top: 9px;
}

.state--busy {
  gap: 16px;
}

.state--busy p {
  color: var(--brand-green);
  font-size: clamp(1.3rem, 1.15rem + .7dvh, 1.55rem);
  font-weight: 750;
}

.state--result {
  gap: 9px;
}

.state--result h2 {
  font-size: 1.75rem;
  font-size: clamp(1.75rem, 1.5rem + 1dvh, 2.1rem);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--brand-green-faint);
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.success-mark {
  display: block;
  width: 72px;
  width: clamp(72px, 9dvh, 80px);
  height: 72px;
  height: clamp(72px, 9dvh, 80px);
  margin-bottom: 5px;
  overflow: visible;
  fill: none;
  stroke: var(--brand-gold);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-mark__circle {
  stroke-width: 2;
  opacity: .42;
}

.success-mark__tick {
  stroke-width: 4;
  stroke-dasharray: 48;
}

.success-mark--animated {
  animation: check-settle 900ms cubic-bezier(.2, .8, .2, 1) both;
}

.success-mark--animated .success-mark__tick {
  stroke-dashoffset: 48;
  animation: check-draw 700ms ease-out 100ms forwards;
}

.success-mark--static .success-mark__tick {
  stroke-dashoffset: 0;
}

.honeypot,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-settle {
  0% {
    transform: scale(.88);
  }
  72% {
    transform: scale(1.045);
  }
  100% {
    transform: scale(1);
  }
}

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

  .success-mark--animated .success-mark__tick {
    stroke-dashoffset: 0;
  }
}

@media (max-height: 680px) {
  .page-shell {
    padding-block-start: max(62px, calc(env(safe-area-inset-top) + 56px));
    padding-block-end: max(6px, env(safe-area-inset-bottom));
  }

  .agreement-card {
    margin-block: clamp(6px, 1.2dvh, 10px) clamp(4px, .9dvh, 8px);
  }

  .turnstile-box {
    margin-block: clamp(3px, .8dvh, 6px);
  }

  .content-stack {
    grid-template-rows: auto auto minmax(6px, 1fr);
    row-gap: clamp(5px, 1dvh, 7px);
  }

  .hero-zone {
    gap: clamp(2px, .6dvh, 4px);
  }

  .brand-header {
    min-height: clamp(48px, 8.5dvh, 56px);
  }

  .brand-logo {
    height: clamp(48px, 8.5dvh, 56px);
  }

  .context-line {
    margin-block-start: clamp(4px, 1dvh, 7px);
    margin-block-end: clamp(8px, 1.6dvh, 13px);
    font-size: clamp(1.08rem, 3dvh, 1.28rem);
    line-height: 1.12;
  }

  .view-container {
    padding-block: clamp(7px, 1.25dvh, 9px);
    padding-inline: clamp(11px, 3vw, 16px);
    border-radius: 18px;
  }

  .attestation-form,
  .palette-fields {
    gap: clamp(5px, 1dvh, 7px);
  }

  .form-field {
    gap: 3px;
  }

  .form-field label {
    font-size: clamp(.96rem, 2.6dvh, 1.02rem);
    line-height: 1.18;
  }

  .attestation-copy {
    padding: 7px 9px;
  }

  .attestation-copy__toggle {
    margin-block-start: 5px;
    padding-block: 6px;
  }

  .agreement-card .agreement-disclosure__toggle {
    margin-block-start: 0;
    padding-block: 7px;
  }

  .check-row {
    padding: 7px 9px;
  }

  input:is([type="text"], [type="email"], [type="tel"]),
  .phone-composite {
    min-height: 47px;
  }

  .phone-country-display,
  .phone-composite input.phone-number-input {
    min-height: 45px;
  }

  .phone-country-display,
  .phone-composite input.phone-number-input,
  input:is([type="text"], [type="email"], [type="tel"]) {
    padding-block: 7px;
  }

  #submit-button,
  .state-action {
    min-height: 49px;
    padding-block: 8px;
  }

  .state {
    min-height: clamp(164px, 27dvh, 184px);
  }
}
