:root {
  --royal: #1e5be0;
  --navy: #16357f;
  --navy-deep: #0d2257;
  --gold: #f5b82e;
  --gold-deep: #c98a12;
  --ivory: #f6ebd2;
  --paper: #fffaf0;
  --ink: #1f2a44;
  --muted: #5a6582;
  --green: #20a820;
  --red: #e02018;
  --line: #e6dcc3;
  --radius: 22px;
  --shadow: 0 10px 0 rgba(13, 34, 87, 0.12), 0 18px 40px rgba(13, 34, 87, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}

h1, h2, h3, .display {
  font-family: "Lilita One", "Nunito", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--navy);
  line-height: 1.2;
}

a { color: var(--royal); font-weight: 700; }
a:hover { color: var(--navy); }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--royal) url("assets/hero.webp") center 30% / cover no-repeat;
  color: #fff;
  padding: 28px 16px 170px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 34, 87, 0.15) 0%, rgba(13, 34, 87, 0.55) 55%, rgba(13, 34, 87, 0.92) 100%);
}
.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.hero-logo {
  width: min(340px, 58vw);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  animation: swing 5s ease-in-out infinite;
  transform-origin: 50% 8%;
}
.hero h1 {
  color: #fff;
  font-size: clamp(30px, 6vw, 52px);
  margin: 6px 0 0;
  text-shadow: 0 4px 0 var(--navy-deep), 0 8px 20px rgba(0, 0, 0, 0.35);
}
.hero p {
  margin: 0;
  max-width: 640px;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.95);
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  border: 3px solid var(--navy);
}
.pill img { width: 22px; height: 22px; border-radius: 6px; }

.balls {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(6px, 2vw, 12px);
  z-index: 1;
}
.balls img {
  width: clamp(28px, 8vw, 40px);
  height: clamp(28px, 8vw, 40px);
  animation: bob 1.6s ease-in-out infinite;
}
.balls img:nth-child(2) { animation-delay: 0.12s; }
.balls img:nth-child(3) { animation-delay: 0.24s; }
.balls img:nth-child(4) { animation-delay: 0.36s; }
.balls img:nth-child(5) { animation-delay: 0.48s; }
.balls img:nth-child(6) { animation-delay: 0.6s; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes swing { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

/* ---------- Layout ---------- */
.page {
  max-width: 1100px;
  margin: -70px auto 0;
  padding: 0 16px 40px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 960px) {
  .page { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
}

.toc {
  background: var(--paper);
  border: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
}
@media (min-width: 960px) {
  .toc { position: sticky; top: 16px; }
}
.toc h2 { font-size: 22px; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; }
.toc a:hover { color: var(--royal); }

main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }

.card {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: clamp(24px, 4vw, 30px);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card h2 .num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  border: 3px solid var(--navy);
  font-size: 20px;
}
.card h3 { font-size: 20px; margin: 18px 0 6px; }
.card p { margin: 8px 0; }
.card ul { margin: 8px 0; padding-left: 22px; }
.card li { margin: 4px 0; }

.with-guide { padding-right: 24px; }
@media (min-width: 720px) {
  .with-guide { padding-right: 190px; }
}
.guide {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 165px;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(13, 34, 87, 0.25));
}
@media (min-width: 720px) { .guide { display: block; } }

/* At a glance */
.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.glance div {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
}
.glance strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  color: var(--navy);
  font-size: 18px;
}
.glance img { width: 26px; height: 26px; }
.glance span { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 10px 0; border-radius: 14px; border: 3px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; vertical-align: top; border-bottom: 2px solid var(--line); }
th { background: var(--navy); color: #fff; font-weight: 800; }
tr:last-child td { border-bottom: none; }

.note {
  background: #fff6d8;
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 12px 0;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  font-size: 19px;
  border: 4px solid #0f6a10;
  box-shadow: 0 5px 0 #0f6a10;
}
.button:hover { color: #fff; transform: translateY(1px); box-shadow: 0 4px 0 #0f6a10; }

.contact-list { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: flex-start; min-width: 0; }
.contact-list li > a, .contact-list li > span { min-width: 0; overflow-wrap: anywhere; }
.contact-list b { min-width: 92px; color: var(--navy); }

/* Footer */
footer {
  background: var(--navy);
  color: #dfe6ff;
  text-align: center;
  padding: 30px 16px 36px;
  font-size: 15px;
}
footer img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 10px; border: 3px solid var(--gold); }
footer a { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .hero-logo, .balls img { animation: none; }
}

@media print {
  .hero { background: none; color: var(--ink); padding: 10px; }
  .hero::before, .balls, .guide, .toc { display: none; }
  .page { margin-top: 0; }
  .card { box-shadow: none; }
}

code { overflow-wrap: anywhere; }
