/*
  app.voykind.com: the sign-up request form and the private review page.
  Phone first: one column until the window is wide. Colors are the voykind.com tokens.
  Pairs used for text: ink on sand 15.9:1, muted on sand 6.6:1, white on cta 6.6:1,
  white on navy 15.2:1, ocean-dark on ocean-tint 6.0:1.
  No inline styles anywhere: the Content-Security-Policy allows only this file.
*/
:root {
  --ink: #101426;
  --muted: #515d73;
  --navy: #182149;
  --sand: #f0f8fa;
  --white: #ffffff;
  --line: #c3d0dc;
  --ocean-dark: #05636d;
  --ocean-tint: #e4f3f2;
  --mango-tint: #fff4cc;
  --mango-ink: #6b4b00;
  --cta: #b61350;
  --cta-press: #9a0f43;
  --ok: #1f6b3a;
  --ok-tint: #e3f4e8;
  --bad: #9c1c1c;
  --bad-tint: #fde8e8;
  --radius: 14px;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--font-body);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.9rem, 7vw, 2.8rem);
}

h2 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--ocean-dark);
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap-wide {
  max-width: 980px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
}

.skip:focus {
  top: 10px;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

/* ---------- header and footer ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}

.brand img {
  width: 150px;
  height: auto;
}

.header-tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  margin-top: 56px;
  padding: 28px 0 40px;
  background: var(--navy);
  color: #dfe6f7;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer p {
  margin: 0 0 0.4em;
}

/* ---------- hero ---------- */
.hero {
  padding: 40px 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--ocean-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.lede {
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- form ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.req {
  color: var(--cta);
}

.opt {
  color: var(--muted);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #8b9bb0;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--bad);
  background: #fffafa;
}

.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-error {
  margin: 6px 0 0;
  color: var(--bad);
  font-size: 0.95rem;
  font-weight: 600;
}

.form-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  accent-color: var(--cta);
}

.check label {
  margin: 0;
  font-weight: 400;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-slot {
  margin: 4px 0 18px;
  min-height: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary {
  background: var(--cta);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--cta-press);
}

.btn-quiet {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn-quiet:hover:not(:disabled) {
  background: var(--ocean-tint);
}

.btn-small {
  min-height: 40px;
  padding: 6px 16px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

/* ---------- messages ---------- */
.form-alert,
.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--bad);
  background: var(--bad-tint);
  color: var(--bad);
  font-weight: 600;
}

.notice {
  border-color: var(--ocean-dark);
  background: var(--ocean-tint);
  color: var(--navy);
  font-weight: 400;
}

.form-success {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--ok-tint);
  border: 1.5px solid var(--ok);
}

.form-success h2 {
  color: var(--ok);
}

[hidden] {
  display: none !important;
}

/* ---------- review page ---------- */
.review-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 28px 0 10px;
}

.review-top h1 {
  margin: 0;
  font-size: 1.8rem;
}

.who {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.tab {
  min-height: 42px;
  padding: 6px 16px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--navy);
  color: var(--white);
}

.req-card {
  margin-bottom: 16px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.req-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.req-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-pending {
  background: var(--mango-tint);
  color: var(--mango-ink);
}

.badge-approved {
  background: var(--ok-tint);
  color: var(--ok);
}

.badge-declined {
  background: var(--bad-tint);
  color: var(--bad);
}

.req-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 20px;
  margin: 0 0 12px;
}

.facts div {
  min-width: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.notes {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--sand);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.history li {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.actions .field {
  flex: 1 1 100%;
  margin: 0;
}

.empty,
.loading {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

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

  .card {
    padding: 28px 28px;
  }
}
