:root {
  color-scheme: light;
  --cream: #f4f0e7;
  --paper: #fffdf8;
  --ink: #1f2922;
  --muted: #5f675f;
  --green: #2f6848;
  --green-dark: #235039;
  --green-soft: #e4eee6;
  --line: #dcd8cf;
  --danger: #9b403d;
  --danger-soft: #f7e8e5;
  --focus: #177345;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(47, 104, 72, 0.08), transparent 13rem),
    var(--cream);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 1rem;
}

.verification-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 3rem rgba(31, 41, 34, 0.09);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--green);
  color: white;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-name,
.brand-context {
  margin: 0;
}

.brand-name {
  color: var(--green-dark);
  font-size: 0.875rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.brand-context {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.screen {
  padding: 1.5rem 1.25rem 1.75rem;
}

.screen[hidden],
[hidden] {
  display: none;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  line-height: 1.13;
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.screen > p:not(.eyebrow, .request-kind, .form-error) {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.request-kind {
  display: inline-flex;
  margin: 0.8rem 0 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 750;
}

.summary-section {
  margin-top: 1.75rem;
}

dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.summary-row {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 750;
}

dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

form {
  margin-top: 2rem;
}

fieldset {
  min-width: 0;
  margin: 1.35rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

legend {
  padding: 0 0.35rem;
  color: var(--green-dark);
  font-weight: 800;
}

.field + .field {
  margin-top: 1.15rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
  font-weight: 750;
}

input,
textarea {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid #aaa99f;
  border-radius: 0.75rem;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

textarea {
  min-height: 7.25rem;
  resize: vertical;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.field-help {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-error {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.7rem;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  line-height: 1.45;
}

.actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.actions-single {
  grid-template-columns: 1fr;
}

.button {
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.8rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}

.button-primary {
  background: var(--green);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.button-secondary {
  border-color: var(--green);
  background: transparent;
  color: var(--green-dark);
}

.button-secondary:hover:not(:disabled) {
  background: var(--green-soft);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

#loading-screen {
  min-height: 17rem;
  text-align: center;
}

.loader {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 1.5rem auto 1.25rem;
  border: 0.25rem solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.result-screen {
  min-height: 19rem;
}

.result-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.8rem;
  font-weight: 850;
}

.privacy-note {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 38rem) {
  .page-shell {
    padding: 3rem 1.5rem;
  }

  .brand-header,
  .screen {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .screen {
    padding-top: 2rem;
    padding-bottom: 2.25rem;
  }

  .summary-row {
    grid-template-columns: minmax(9rem, 0.7fr) 1.3fr;
    gap: 1rem;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader {
    animation: none;
  }
}

@media (forced-colors: active) {
  .verification-card,
  input,
  textarea,
  .button,
  .result-icon {
    border: 1px solid CanvasText;
  }
}
