:root {
  --ink: #252e5d;
  --ink-soft: #3a4478;
  --body: #3f4150;
  --muted: #6b6e7c;
  --line: #d9dbe3;
  --surface: #f8f8f8;
  --brand: #5dc686;
  --brand-soft: #e7f7ed;
  --dark: #252323;
  --white: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--ink); }
h1, h2, h3 { font-family: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 16px; background: var(--white); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; }
.brand-small { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; opacity: 0.8; }
.brand-large { color: var(--brand); font-weight: 900; font-size: 20px; letter-spacing: 0.02em; }
.top-link {
  color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px;
}
.top-link:hover { border-color: var(--brand); color: var(--brand); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: var(--white); padding: 40px 0 52px;
}
.eyebrow {
  margin: 0 0 8px; color: var(--brand); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.page-title { color: var(--white); font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0 0 10px; }
.lead { margin: 0 0 24px; color: rgba(255, 255, 255, 0.85); font-size: 16px; }

.search { display: block; }
.search input {
  width: 100%; padding: 15px 18px; font: inherit; font-size: 16px; color: var(--body);
  border: 0; border-radius: 12px; background: var(--white); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.search input:focus { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Home */
#home { margin-top: -28px; }

.audiences {
  display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px;
}
.audiences button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; font: inherit; cursor: pointer;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 4px 14px rgba(37, 46, 93, 0.06);
  transition: border-color 0.15s, transform 0.15s;
}
.audiences button:hover { border-color: var(--brand); transform: translateY(-2px); }
.audiences button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.audiences button[aria-selected="true"] { border-color: var(--brand); background: var(--brand-soft); }
.aud-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.aud-desc { font-size: 14px; color: var(--muted); }
.aud-count {
  margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ink);
  background: var(--surface); border-radius: 999px; padding: 3px 10px;
}

.popular { margin-bottom: 32px; }
.popular h2 { color: var(--ink); font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.popular-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.popular-list button {
  width: 100%; text-align: left; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; cursor: pointer;
}
.popular-list button::before { content: "→"; color: var(--brand); margin-right: 8px; font-weight: 800; }
.popular-list button:hover, .popular-list button:focus-visible { border-color: var(--brand); outline: none; }

.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.topics button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.topics button:hover, .topics button:focus-visible { border-color: var(--brand); outline: none; }

.status { color: var(--muted); font-size: 15px; }

.group { margin-bottom: 32px; scroll-margin-top: 16px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.group h2 { color: var(--ink); font-size: 18px; font-weight: 800; margin: 0; }
.group-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.group ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.group li { border-bottom: 1px solid var(--line); }
.group button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; background: none; border: 0; padding: 15px 4px;
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
}
.group button::after { content: "›"; color: var(--brand); font-size: 22px; line-height: 1; }
.group button:hover, .group button:focus-visible { color: var(--brand); outline: none; }

/* Answer view */
.answer-wrap { margin-top: 32px; margin-bottom: 40px; }
.answer { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 6px 20px rgba(37, 46, 93, 0.06); }
.back {
  display: inline-block; margin-bottom: 18px; padding: 0; background: none; border: 0;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.back:hover { color: var(--brand); }
.crumb {
  display: inline-block; margin: 0 0 12px; font-size: 12px; font-weight: 700; color: var(--ink);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 12px;
}
.answer h1 { color: var(--ink); font-size: 26px; font-weight: 800; line-height: 1.25; margin: 0 0 16px; }
.answer p, .answer li { font-size: 16px; }
.answer h2, .answer h3 { color: var(--ink); font-size: 18px; font-weight: 700; margin: 24px 0 8px; }
.answer a { color: var(--ink); font-weight: 600; }
.answer .author { color: var(--muted); font-size: 13px; margin-top: 24px; }

.related { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.related h2 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li + li { margin-top: 6px; }
.related button {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: none; border: 0; padding: 4px 0; text-align: left;
}
.related button:hover { color: var(--brand); }

/* Earnings calculator */
.calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; margin-bottom: 32px;
}
.calc-head h2 { color: var(--ink); font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.calc-head p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.calc-grid { display: grid; gap: 18px; }
.calc-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.calc-field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--body);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
}
.calc-field input, .calc-field select {
  width: 100%; font: inherit; font-size: 16px; color: var(--body);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
}
.calc-field input:focus, .calc-field select:focus { outline: 3px solid var(--brand); outline-offset: 1px; }
.calc-plans { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.calc-plans legend { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0; }
.calc-plans label {
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px;
}
.calc-plans label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.calc-plans input { margin: 0 6px 0 0; accent-color: var(--brand); }
.calc-out { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px 16px; }
.calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.calc-row:last-child { border-bottom: 0; }
.calc-row dt { color: var(--muted); }
.calc-row dd { margin: 0; font-weight: 600; color: var(--ink); }
.calc-total dt { color: var(--ink); font-weight: 700; }
.calc-total dd { color: var(--ink); font-size: 20px; font-weight: 800; }
.calc-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* Help band and footer */
.help-band { background: var(--surface); padding: 40px 0; }
.help-band-inner { display: grid; gap: 20px; align-items: center; }
.help-band h2 { color: var(--ink); font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.help-band p { margin: 0; color: var(--muted); font-size: 15px; }
.help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; text-decoration: none; font: inherit; font-size: 15px; font-weight: 700;
  border-radius: 999px; padding: 12px 20px; border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.foot { background: var(--white); border-top: 1px solid var(--line); color: var(--muted); padding: 32px 0; font-size: 14px; }
.foot-inner { text-align: center; }
.foot-inner p { margin: 6px 0; }
.foot-brand { color: var(--brand) !important; font-weight: 900; letter-spacing: 0.04em; }
.foot a { color: var(--ink); }

/* Tablet and up */
@media (min-width: 640px) {
  .page-title { font-size: 40px; }
  .audiences { grid-template-columns: repeat(3, 1fr); }
  .popular-list { grid-template-columns: 1fr 1fr; }
  .help-band-inner { grid-template-columns: 1fr auto; }
  .answer { padding: 36px 36px; }
  .answer h1 { font-size: 30px; }
}

.country-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 14px; color: var(--body); }
.country-pick select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
