:root {
  --navy: #2e3192;
  --navy-deep: #14163f;
  --navy-mid: #1c1f6b;
  --green: #97c967;
  --green-deep: #6fa043;
  --ink: #1a1a2e;
  --muted: #5c5c86;
  --paper: #f4f6fb;
  --card: #ffffff;
  --act-red: #e31c24;
  --unfpa-blue: #3571a4;
  --unfpa-orange: #e38a15;
  --ring: rgba(151, 201, 103, 0.55);
  --shadow: 0 18px 50px rgba(10, 12, 50, 0.28);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Lato, system-ui, sans-serif;
  color: var(--ink);
  background: var(--navy-deep);
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Ambient motion */
.blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  animation: drift 18s ease-in-out infinite;
}
.blobs span:nth-child(1) {
  width: 420px; height: 420px;
  background: #2e3192;
  top: -80px; left: -60px;
}
.blobs span:nth-child(2) {
  width: 360px; height: 360px;
  background: #3571a4;
  right: -80px; top: 20%;
  animation-delay: -6s;
}
.blobs span:nth-child(3) {
  width: 300px; height: 300px;
  background: #97c967;
  bottom: -40px; left: 30%;
  opacity: 0.22;
  animation-delay: -11s;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}

.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 20%), rgba(255,255,255,0.08), transparent 42%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 64px;
}

/* Partner bar */
.partner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  animation: rise 0.7s ease both;
}
.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
}
.logo-act {
  background: #000;
  padding: 6px 10px;
}
.logo-act img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 180px;
}
.logo-unfpa {
  background: #fff;
  border: 1px solid #e8ecf4;
  padding: 4px 10px;
}
.logo-unfpa img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 160px;
}
.partner-mid {
  text-align: center;
  min-width: 0;
}
.partner-mid p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.partner-mid strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.x-mark {
  display: inline-block;
  margin: 0 6px;
  color: var(--unfpa-orange);
  font-weight: 800;
}

/* Hero */
.hero {
  margin: 28px 0 22px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 22px;
  align-items: center;
  animation: rise 0.8s 0.08s ease both;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.78;
}
.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.12;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}
.hero .lede {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.55;
  opacity: 0.9;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn-primary {
  background: var(--green);
  color: #16300a;
  box-shadow: 0 10px 24px rgba(151, 201, 103, 0.28);
}
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 16px 14px;
  backdrop-filter: blur(10px);
}
.stat b {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
}
.stat span {
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.progress-wrap {
  grid-column: 1 / -1;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
  opacity: 0.85;
}
.bar {
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), #c8f08a);
  border-radius: inherit;
  transition: width 0.6s ease;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 8px 0 16px;
  animation: rise 0.8s 0.16s ease both;
}
.search {
  flex: 1 1 240px;
  position: relative;
}
.search input {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px 14px 42px;
  font: inherit;
  font-size: 15px;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.search input:focus {
  outline: 3px solid var(--ring);
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: #fff;
  color: var(--navy);
}
.chip:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Unit grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  perspective: 900px;
}
.card {
  --accent: var(--green);
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border-radius: 18px;
  padding: 16px 16px 16px 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transform: translateY(12px);
  opacity: 0;
  animation: rise 0.55s ease forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }

.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--accent);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%);
  transform: translateX(-120%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 22px 40px rgba(10, 12, 50, 0.32);
}
.card:hover::after {
  transform: translateX(120%);
  transition: transform 0.7s ease;
}
.card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.card.is-started {
  background: linear-gradient(180deg, #fff, #f3fbef);
}
.num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  position: relative;
}
.card.is-started .num {
  background: var(--green-deep);
}
.card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}
.card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.go {
  background: var(--accent);
  color: #16300a;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.accent-6 .go,
.accent-7 .go,
.accent-11 .go { color: #fff; }
.badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-deep);
  opacity: 0;
}
.card.is-started .badge { opacity: 1; }

.empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  color: #fff;
  padding: 36px 12px;
  opacity: 0.85;
}
.grid.is-empty .empty { display: block; }
.grid.is-empty .card { display: none; }
.card.is-hidden { display: none; }
.accent-1 { --accent: #97c967; }
.accent-2 { --accent: #5b9bd5; }
.accent-3 { --accent: #f4c430; }
.accent-4 { --accent: #ff7b9c; }
.accent-5 { --accent: #7ec8e3; }
.accent-6 { --accent: #8e7cc3; }
.accent-7 { --accent: #e06666; }
.accent-8 { --accent: #6fa8dc; }
.accent-9 { --accent: #e38a15; }
.accent-10 { --accent: #76a5af; }
.accent-11 { --accent: #2e3192; }

footer {
  margin-top: 36px;
  color: rgba(255,255,255,0.72);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  animation: rise 0.8s 0.2s ease both;
}
footer a { color: #fff; }
.reset {
  appearance: none;
  background: none;
  border: 0;
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .partner-bar { flex-wrap: wrap; justify-content: center; }
  .partner-mid { order: -1; width: 100%; }
  .logo-act img, .logo-unfpa img { height: 44px; }
}
@media (max-width: 520px) {
  .card { grid-template-columns: 48px 1fr; }
  .go { display: none; }
  .page { padding: 14px 14px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blobs span, .card, .partner-bar, .hero, .toolbar, footer { animation: none !important; }
  .card { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .card::after { display: none; }
}
