:root {
  --red: #e31c24;
  --orange: #f58220;
  --green: #00a651;
  --blue: #009edb;
  --blue-deep: #00558a;
  --ink: #16324a;
  --paper: #f3f7fb;
  --card: #ffffff;
  --line: #d7e3ec;
  --muted: #5b6f7e;
  --danger: #e31c24;
  --danger-bg: #fdecec;
  --ok: #00a651;
  --shadow: 0 18px 50px rgba(0, 85, 138, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Outfit", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-deep); }

.topbar {
  background: linear-gradient(90deg, var(--red) 0%, var(--orange) 34%, var(--green) 67%, var(--blue) 100%);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.partner-strip {
  background: #fff;
  padding: 18px 0;
}

.brand-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--red) 0%, var(--orange) 34%, var(--green) 67%, var(--blue) 100%);
}

.hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 130, 32, 0.28), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(0, 166, 81, 0.22), transparent 26%),
    linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 58%, #17b36a 100%);
  color: #fff;
  padding: 36px 20px 56px;
}

.hero-inner, .footer-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: -28px auto 0;
  padding-bottom: 64px;
}

.logo-bar,
.footer-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.logo-card {
  background: #fff;
  border: 1px solid #e4eef4;
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  min-width: 0;
  box-shadow: 0 10px 24px rgba(0, 85, 138, 0.06);
}

.logo-card.act { border-bottom: 5px solid var(--red); }
.logo-card.pmyp { border-bottom: 5px solid var(--green); }
.logo-card.unfpa { border-bottom: 5px solid var(--orange); }

.logo-card img,
.logo-bar img {
  display: block;
  width: auto;
  height: 62px;
  max-width: 100%;
  object-fit: contain;
}

.logo-card .logo-act,
.logo-card.act img {
  height: 58px;
}

.footer-logo-strip {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.footer-logos .logo-card {
  min-height: 72px;
  padding: 10px 14px;
}

.footer-logos img {
  height: 44px;
}

.kicker {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 4.6vw, 2.75rem);
  line-height: 1.18;
  margin: 0 0 10px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.hero .lede {
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  max-width: 42rem;
  color: rgba(255,255,255,0.92);
  margin: 0;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.intro-copy p {
  margin: 0 0 12px;
  color: #314352;
}

.note {
  background: #fff6ec;
  border-left: 4px solid var(--orange);
  padding: 12px 14px;
  border-radius: 8px;
  color: #6a3d12;
  font-size: 14px;
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.section-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 42px;
}

.panel:nth-of-type(3n) .section-num { background: var(--red); }
.panel:nth-of-type(3n+1) .section-num { background: var(--green); }
.panel:nth-of-type(3n+2) .section-num { background: var(--orange); }

.section-head h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.field { margin-bottom: 18px; }

.field label, .legend {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.muted { color: var(--muted); }

.hint {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  margin-top: 4px;
}

.field-error {
  display: block;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  min-height: 0;
}

.field-error:empty { display: none; }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #c5d5e0;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

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

input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0, 158, 219, 0.22);
  border-color: var(--blue);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.choice-grid { display: grid; gap: 10px; }
.choice-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}
.choice-grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.choice-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #d3e0e9;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  min-height: 48px;
}

.choice-card:hover { border-color: var(--blue); }

.choice-card:has(input:checked) {
  border-color: var(--green);
  background: #eaf8f0;
  box-shadow: inset 0 0 0 1px var(--green);
}

.choice-card input { margin-top: 3px; flex: 0 0 auto; }

.word-meta {
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.word-meta.warn { color: var(--red); }

.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.alert-error {
  background: var(--danger-bg);
  color: #8a1218;
  border: 1px solid #f3b4b6;
}

.alert-error ul { margin: 8px 0 0; padding-left: 18px; }

.hidden-other { display: none; }
.hidden-other.is-open { display: block; }

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--blue-deep), var(--green));
  color: #fff;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--blue-deep);
  border: 1px solid var(--line);
}

.site-footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.86);
  padding: 22px 0;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  font-size: 13px;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.success-card {
  text-align: center;
  padding: 48px 28px;
}

.success-card h1 {
  font-family: "Fraunces", serif;
  margin: 12px 0 8px;
}

.app-no {
  display: inline-block;
  margin: 16px 0;
  background: #fff6ec;
  border: 1px dashed var(--orange);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 700;
  color: var(--blue-deep);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .logo-card {
    min-height: 80px;
    padding: 10px 12px;
  }
  .logo-card img,
  .logo-bar img,
  .logo-card.act img {
    height: 48px;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
  }
  .hero {
    padding: 24px 16px 44px;
  }
  .hero-inner, .footer-inner, .page {
    width: calc(100% - 24px);
  }
  .page {
    margin-top: -20px;
    padding-bottom: 40px;
  }
  .logo-bar,
  .footer-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .logo-card,
  .footer-logos .logo-card {
    min-height: 58px;
    padding: 8px 6px;
    border-radius: 12px;
  }
  .logo-card img,
  .logo-bar img,
  .logo-card.act img,
  .footer-logos img {
    height: 32px;
  }
  .panel {
    padding: 18px 16px;
    border-radius: 14px;
  }
  .section-head { gap: 10px; }
  .section-num {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }
  .choice-grid,
  .choice-grid.cols-2,
  .choice-grid.cols-3,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .actions .btn {
    width: 100%;
  }
  .success-card { padding: 28px 16px; }
}

@media (max-width: 480px) {
  .kicker { font-size: 11px; }
  .logo-bar,
  .footer-logos {
    gap: 6px;
  }
  .logo-card,
  .footer-logos .logo-card {
    min-height: 52px;
    padding: 6px 4px;
    border-bottom-width: 3px;
  }
  .logo-card img,
  .logo-bar img,
  .logo-card.act img,
  .footer-logos img {
    height: 26px;
  }
}
