/* =========================================================================
   YouthIncome — global stylesheet
   One file, no build step. Mobile-first. Light mode default.
   Sections: tokens / reset / layout / header / footer / components /
             article / tools / forms / cookie banner / utilities / responsive
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Brand palette: a credible teal-green (trust + fresh) with a warm coral
     accent for calls to action. Deliberately not "make money online" gold. */
  --brand: #0d7d6b;
  --brand-dark: #0a5e51;
  --brand-tint: #e6f4f1;
  --accent: #ff6a3d;
  --accent-dark: #e8521f;

  /* Neutrals */
  --ink: #14181f;
  --ink-soft: #3a424e;
  --muted: #5a6472;
  --line: #e4e7ec;
  --surface: #f6f7f9;
  --surface-2: #eef0f3;
  --bg: #ffffff;
  --white: #ffffff;

  /* Feedback colors for callouts */
  --warn-bg: #fff7e6;
  --warn-line: #f0c36d;
  --warn-ink: #7a5500;
  --note-bg: #eef4ff;
  --note-line: #9cc0ff;
  --note-ink: #1d4ea8;

  /* Typography scale (fluid where useful) */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --h1: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --h2: clamp(1.45rem, 1.2rem + 1.1vw, 1.9rem);
  --h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);

  /* Spacing + shape */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .06), 0 6px 20px rgba(20, 24, 31, .06);
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, .08);
  --maxw: 1120px;
  --readw: 720px;
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); font-weight: 750; }
h1 { font-size: var(--h1); margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: var(--h2); margin: 2em 0 .6em; letter-spacing: -.01em; }
h3 { font-size: var(--h3); margin: 1.6em 0 .4em; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin: .3em 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

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

/* ---- Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.read { max-width: var(--readw); margin-left: auto; margin-right: auto; }
.section { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0; }
.section--tint { background: var(--surface); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .logo { width: 28px; height: 28px; flex: none; }
.brand b { color: var(--brand); }

.nav-links {
  display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block; padding: .5rem .7rem; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { background: var(--surface); color: var(--ink); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.15rem; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .04s ease, background .15s ease;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); }
.btn--block { width: 100%; justify-content: center; }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) 0 clamp(2rem, 1rem + 3vw, 3.5rem); }
.hero .eyebrow {
  display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-dark); background: var(--brand-tint);
  padding: .35rem .7rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }

/* ---- Cards / grids ---------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .5rem;
}
.card h3 { margin: 0; font-size: 1.2rem; }
.card p { margin: 0; color: var(--ink-soft); }
a.card { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .card-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--brand-tint);
  display: grid; place-items: center; margin-bottom: .35rem;
}
.card .card-icon svg { width: 24px; height: 24px; color: var(--brand-dark); }
.card .card-more { margin-top: auto; font-weight: 700; color: var(--brand-dark); font-size: .95rem; }

/* Pillar / article list cards */
.post-card { padding: 1.35rem 1.5rem; }
.post-card .kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-dark);
}
.post-card h3 { font-size: 1.18rem; margin: .25rem 0; }
.post-card .meta { font-size: .85rem; color: var(--muted); }

/* ---- "Start here" band ------------------------------------------------ */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; display: grid; place-items: center;
}
.step h3 { margin: .1rem 0 .25rem; font-size: 1.1rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---- Breadcrumbs ------------------------------------------------------ */
.breadcrumb { font-size: .88rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumb li::after { content: "/"; margin-left: .4rem; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---- Article body ----------------------------------------------------- */
.article-head { padding: 1rem 0 .5rem; }
.article-head .kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--brand-dark);
}
.article-meta { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.article-meta .dot { margin: 0 .5rem; }

.prose { font-size: 1.075rem; }
.prose h2 { scroll-margin-top: 84px; }
.prose h3 { scroll-margin-top: 84px; }
.prose a { color: var(--brand-dark); }
.prose ul li::marker { color: var(--brand); }
.prose ol li::marker { color: var(--brand); font-weight: 700; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; text-align: center; }

/* Quick-answer box (TL;DR for users + AI citation) */
.quick-answer {
  background: var(--brand-tint); border: 1px solid #bfe3db; border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.75rem;
}
.quick-answer p { margin: 0; }
.quick-answer .qa-label {
  display: block; font-size: .78rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--brand-dark); margin-bottom: .35rem;
}

/* Callouts */
.callout {
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5rem 0; border: 1px solid;
}
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title { font-weight: 800; margin: 0 0 .35rem; }
.callout--warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.callout--warn .callout-title { color: var(--warn-ink); }
.callout--note { background: var(--note-bg); border-color: var(--note-line); color: var(--note-ink); }
.callout--note .callout-title { color: var(--note-ink); }

/* VERIFY markers (visible to me before publishing; harmless if shipped) */
.verify {
  background: #fde2e2; color: #8a1c1c; border: 1px dashed #e88; border-radius: 6px;
  padding: 0 .35em; font-size: .9em; font-style: normal;
}

/* Comparison tables */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
table.compare {
  width: 100%; border-collapse: collapse; font-size: .98rem; min-width: 520px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
table.compare th, table.compare td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th { background: var(--surface-2); font-size: .85rem; letter-spacing: .02em; }
table.compare tbody tr:nth-child(even) { background: var(--surface); }
table.compare td:first-child { font-weight: 650; }

/* Affiliate / financial disclosure strip */
.disclosure {
  font-size: .9rem; color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .8rem 1rem; margin: 0 0 1.5rem;
}
.disclosure strong { color: var(--ink); }

/* Author / updated footer of an article */
.byline {
  display: flex; align-items: center; gap: .8rem; margin: 2rem 0 0;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.byline .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; flex: none;
}
.byline .by-name { font-weight: 700; margin: 0; }
.byline .by-sub { margin: 0; font-size: .88rem; color: var(--muted); }

/* FAQ (accordion-ish, but plain details for no-JS robustness) */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.1rem; margin: .7rem 0;
  background: var(--white);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-body { padding: 1rem 0; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* Related links + internal-link block */
.related {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin: 2rem 0;
}
.related h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.related ul { margin: 0; padding-left: 1.1rem; }
.related a { font-weight: 600; }

/* On-page table of contents */
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.toc strong { display: block; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc a { color: var(--brand-dark); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: clamp(1.6rem, 1rem + 2vw, 2.6rem);
  text-align: center;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 52ch; margin-inline: auto; }
.cta-band .btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Ad slots --------------------------------------------------------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; margin: 2rem auto; max-width: 728px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase;
}
.ad-slot::before { content: "Advertisement"; }
/* When real ad markup is pasted inside, hide the placeholder label */
.ad-slot:not(:empty)::before { content: none; }
.ad-slot:not(:empty) { background: transparent; border: 0; min-height: 0; }

/* ---- Tools (calculator / matcher) ------------------------------------ */
.tool {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); box-shadow: var(--shadow-sm); margin: 1.5rem 0;
}
.field { margin: 0 0 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .4rem; }
.field .hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.field select, .field input[type="number"], .field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; padding: .7rem .8rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
.field input[type="range"] { width: 100%; accent-color: var(--brand); }
.range-row { display: flex; align-items: center; gap: 1rem; }
.range-row output { font-weight: 800; color: var(--brand-dark); min-width: 5ch; text-align: right; }

.result {
  margin-top: 1.5rem; padding: 1.25rem 1.4rem; border-radius: var(--radius);
  background: var(--brand-tint); border: 1px solid #bfe3db;
}
.result .result-figure { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 800; color: var(--brand-dark); line-height: 1.1; }
.result .result-sub { color: var(--ink-soft); margin: .25rem 0 0; }

/* Quiz (matcher) */
.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quiz-progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.5rem; }
.quiz-progress i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s ease; }
.choice-grid { display: grid; gap: .7rem; }
.choice {
  display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  cursor: pointer; font-weight: 600; text-align: left; width: 100%; font-size: 1rem; font-family: inherit;
}
.choice:hover { border-color: var(--brand); background: var(--brand-tint); }
.choice.is-selected { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; gap: 1rem; }
.match-card { border-left: 4px solid var(--brand); }

/* ---- Forms (contact) -------------------------------------------------- */
.form-note { font-size: .9rem; color: var(--muted); }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--ink); color: #c7ccd4; margin-top: 4rem; }
.site-footer a { color: #c7ccd4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
  padding: 3rem 0 2rem;
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand b { color: #5fd3bf; }
.footer-brand p { color: #97a0ad; max-width: 34ch; font-size: .95rem; margin-top: .8rem; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; margin: 0 0 .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: .5rem 0; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid #2a313c; padding: 1.5rem 0; font-size: .85rem; color: #8b94a1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}

/* ---- Cookie consent banner ------------------------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem;
  max-width: 560px; margin: 0 auto; display: none;
}
.cookie-banner.is-visible { display: block; animation: fade .3s ease; }
.cookie-banner p { margin: 0 0 .9rem; font-size: .92rem; color: var(--ink-soft); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie-banner .btn { padding: .6rem .95rem; font-size: .92rem; }

/* ---- Utilities -------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.pill {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  background: var(--surface-2); color: var(--ink-soft); padding: .25rem .6rem; border-radius: 999px;
}
.placeholder-img {
  display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
  border-radius: var(--radius); aspect-ratio: 16 / 9; font-size: .85rem; border: 1px solid var(--line);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem 20px 1rem; display: none; box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .8rem .5rem; border-radius: 8px; }
  .nav-links .btn { margin-top: .5rem; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero .lede { font-size: 1.1rem; }
}
@media (max-width: 460px) {
  body { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
