:root {
  --mint-50:  #effaf6;
  --mint-100: #ddf4eb;
  --mint-200: #bbe7d7;
  --mint-300: #8fd6bc;
  --mint-400: #59c09a;
  --mint-500: #307e61;
  --mint-600: #24664e;
  --mint-700: #1b503d;
  --jade-100: #d3e7ee;
  --jade-300: #8bbfd0;
  --jade-500: #306a7e;
  --jade-700: #204c5b;
  --jade-900: #16323b;
  --deep-800: #2b504d;
  --deep-900: #1f3d3a;
  --ink-900:  #20322d;
  --ink-700:  #3f5a53;
  --ink-500:  #67837c;
  --ink-300:  #b0bfbb;
  --paper-0:  #ffffff;
  --paper-50: #f6fbf9;
  --paper-100:#edf5f2;
  --border:   #dbe9e4;
  --danger:   #c0453f;
  --danger-bg:#fdeeec;
  --warn:     #a8791a;
  --warn-bg:  #fdf3e2;
  --focus:    #204c5b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 6px rgba(31, 61, 58, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 61, 58, 0.10);
  --shadow-lg: 0 16px 40px rgba(31, 61, 58, 0.16);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Segoe UI", Inter, var(--font-body);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--mint-700); }
a:hover { color: var(--mint-600); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 0.5em; color: var(--ink-900); font-weight: 750; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 780; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--ink-700); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--deep-900); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mint-500); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--mint-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; border-color: var(--jade-500); color: var(--jade-700); }
.btn-secondary:hover { background: var(--jade-100); }
.btn-ghost { background: transparent; color: var(--ink-900); border-color: transparent; padding: 10px 14px; }
.btn-ghost:hover { background: var(--paper-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; min-height: 36px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; min-width: 40px; min-height: 40px; border-radius: 12px; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-900); font-weight: 800; font-size: 1.15rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(150deg, var(--mint-400), var(--jade-500));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; flex: none;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-700); text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: 999px; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink-900); background: var(--paper-100); }
.nav-links a[aria-current="page"] { color: var(--mint-700); background: var(--mint-50); }
.nav-external { display: flex; align-items: center; gap: 6px; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-link {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 12px; color: var(--ink-700); text-decoration: none;
}
.icon-link:hover { background: var(--jade-100); color: var(--jade-700); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 12px;
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink-900); position: relative; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: #fff; }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 8px 20px 16px; }
.mobile-menu a { display: block; padding: 12px 4px; text-decoration: none; color: var(--ink-900); font-weight: 600; border-bottom: 1px solid var(--paper-100); }

@media (max-width: 880px) {
  .nav-links, .nav-external { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; background: radial-gradient(1200px 520px at 82% -12%, var(--mint-50), transparent), radial-gradient(900px 480px at -10% 30%, var(--jade-100), transparent), var(--paper-0); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--mint-700);
  background: var(--mint-50); border: 1px solid var(--mint-200); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-visual {
  aspect-ratio: 4/5; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--deep-900), var(--jade-900));
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--jade-700);
  background: var(--jade-100); border: 1px solid var(--jade-300); padding: 7px 14px; border-radius: 999px;
}

/* ---------- Generic sections ---------- */
.eyebrow-center { text-align: center; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-step {
  display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius-lg);
  background: var(--paper-50); border: 1px solid var(--border); position: relative;
}
.step-num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--jade-500); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 14px; background: var(--mint-50); color: var(--mint-700);
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px; flex: none;
}

.cta-band {
  background: linear-gradient(135deg, var(--deep-900), var(--jade-900));
  color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center; margin: 0 auto;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--mint-100); }

/* ---------- Ads ---------- */
.ad-slot-wrap {
  border-radius: var(--radius-md); overflow: hidden;
  min-height: 100px; padding: 6px 0;
}
.ad-slot-wrap::before {
  content: "Advertisement"; display: block; text-align: center; color: var(--ink-300);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
}
.ad-slot-wrap .adsbygoogle { margin: 0 auto; }
.ad-slot-wrap[data-shape="banner"] { min-height: 90px; }
.ad-slot-wrap[data-shape="rect"] { min-height: 250px; max-width: 336px; margin: 0 auto; }
.ad-slot-wrap[data-shape="leaderboard"] { min-height: 90px; max-width: 728px; margin: 0 auto; }

/* ---------- New ad-slot renderer (js/ad-slots.js) ---------- */
.site-ad-slot {
  border-radius: var(--radius-md); overflow: hidden; min-height: 90px; max-width: 728px; margin: 0 auto; padding: 6px 0;
}
.ad-slot-label {
  text-align: center; color: var(--ink-300); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
}
.ad-slot-body { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot-placeholder {
  width: 100%; min-height: 90px; border: 1px dashed var(--border); background: var(--paper-50);
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  color: var(--ink-500); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; padding: 12px;
}

.sponsor-line {
  text-align: center; color: var(--ink-300); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.sponsor-logo { display: block; max-height: 32px; width: auto; margin: 0 auto 8px; border-radius: var(--radius-sm); }
.sponsor-name { text-align: center; font-weight: 700; color: var(--ink-900); }
.sponsor-name a { color: var(--jade-700); text-decoration: none; }
.sponsor-name a:hover { text-decoration: underline; }

/* Legacy placeholder kept for any static mockups that still reference it */
.ad-slot {
  border: 1px dashed var(--border); background: var(--paper-50); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; color: var(--ink-500);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  min-height: 100px; padding: 12px;
}
.ad-slot[data-shape="leaderboard"] { min-height: 90px; max-width: 728px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-900); color: #d7ece5; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 56px 0 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #b7d9d0; text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand-mark { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14); padding: 20px 0; display: flex; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: 0.85rem; color: #a3c4bb;
}
.footer-disclaimer { font-size: 0.8rem; color: #8babA1; max-width: 720px; margin-top: 10px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 18px 4px; font-weight: 700; color: var(--ink-900); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--jade-500); flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 18px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.legal h2 { margin-top: 2em; }
.legal .updated { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 2em; }
.legal .placeholder { background: var(--warn-bg); border: 1px solid #f0d9a8; color: #6b4a0d; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }

/* ---------- 404 ---------- */
.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }

/* ---------- misc ---------- */
.pill-list { display: flex; gap: 10px; flex-wrap: wrap; }
.text-center { text-align: center; }
.muted { color: var(--ink-500); }
