/* ==========================================================================
   CPA Launchpad — non-blocking global styles
   Components, article prose, sections, forms and utilities.
   Critical above-the-fold CSS lives inline in BaseLayout.astro.
   ========================================================================== */

/* Utilities ---------------------------------------------------------------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tint { background: var(--ink-50); }
.section--teal { background: linear-gradient(160deg, var(--teal-800), var(--teal-900)); color: #fff; }
.section--teal h2, .section--teal h3 { color: #fff; }
.section--dark { background: var(--ink-900); color: #cbd5e1; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section__head { max-width: 780px; margin-inline: auto; text-align: center; margin-block-end: 48px; }
.section__eyebrow {
  display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .5px;
  color: var(--teal-600); background: var(--teal-50); padding: 6px 16px; border-radius: 50px;
  margin-block-end: 16px;
}
.section--teal .section__eyebrow, .section--dark .section__eyebrow { color: #fff; background: rgba(255,255,255,.15); }
.section__lead { font-size: 1.15rem; color: var(--ink-500); margin-block-start: 14px; }
.section--teal .section__lead, .section--dark .section__lead { color: rgba(255,255,255,.85); }

.text-center { text-align: center; }
.mt-lg { margin-block-start: 40px; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Cards -------------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-500); }
.card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--teal-50); color: var(--teal-700); margin-block-end: 18px; font-size: 26px;
}
.card h3 { margin-block-end: 10px; }
.card p { color: var(--ink-700); }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 16px; font-weight: 700; }
.card__link::after { content: '→'; }

/* Article cards ------------------------------------------------------------ */
.article-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ink-100);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card__thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--ink-100); }
.article-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card__cat {
  align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--teal-700);
  background: var(--teal-50); padding: 4px 12px; border-radius: 50px;
}
.article-card__title { font-size: 1.15rem; line-height: 1.35; }
.article-card__title a { color: var(--ink-900); }
.article-card__title a:hover { color: var(--teal-700); text-decoration: none; }
.article-card__excerpt { color: var(--ink-500); font-size: .94rem; flex: 1; }
.article-card__meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-500); margin-block-start: 6px; }

/* Stats -------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.stat { text-align: center; }
.stat__num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--teal-600); line-height: 1; }
.section--teal .stat__num, .section--dark .stat__num { color: var(--amber-500); }
.stat__label { color: var(--ink-500); margin-block-start: 8px; font-weight: 600; font-size: .95rem; }
.section--teal .stat__label, .section--dark .stat__label { color: rgba(255,255,255,.8); }

/* Numbered steps ----------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-inline-start: 64px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; inset-block-start: 0;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-700); color: #fff; font-weight: 800; font-size: 18px;
}
.step h3 { margin-block-end: 6px; }
.step p { color: var(--ink-700); }

/* FAQ accordion ------------------------------------------------------------ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.faq__item { border: 1px solid var(--ink-100); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq__item summary {
  cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 1.05rem; color: var(--ink-900);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; font-size: 1.6rem; color: var(--teal-600); font-weight: 400; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--teal-700); }
.faq__answer { padding: 0 24px 22px; color: var(--ink-700); }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--ink-900); color: #cbd5e1; padding-block: 56px 28px; margin-block-start: 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer__brand .brand__name { color: #fff; font-size: 22px; display: inline-block; margin-block-end: 12px; }
.site-footer__brand p { color: #94a3b8; margin-block-end: 18px; font-size: .93rem; }
.site-footer__title { color: #fff; font-size: 1rem; margin-block-end: 16px; }
.site-footer__col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer__col a { color: #94a3b8; font-size: .93rem; }
.site-footer__col a:hover { color: #fff; text-decoration: none; }
.site-footer__disclosure {
  margin-block-start: 40px; padding: 18px 22px; border-radius: var(--radius-sm);
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  color: #cbd5e1; font-size: .89rem; line-height: 1.7;
}
.site-footer__disclosure strong { color: var(--amber-500); }
.site-footer__disclosure a { color: var(--amber-500); text-decoration: underline; }
.site-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-block-start: 1px solid #1e293b; margin-block-start: 28px; padding-block-start: 24px;
  font-size: .88rem; color: #64748b;
}
.site-footer__contact { display: flex; gap: 10px; align-items: center; }
.site-footer__contact a { color: #94a3b8; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Breadcrumbs -------------------------------------------------------------- */
.breadcrumbs { background: var(--ink-50); border-block-end: 1px solid var(--ink-100); font-size: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding-block: 12px; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--ink-500); }
.breadcrumbs a { color: var(--ink-700); }
.breadcrumbs [aria-current='page'] { color: var(--teal-700); font-weight: 600; }
.breadcrumbs__sep { color: var(--ink-300); }

/* Hero --------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--teal-50), #fff 60%); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: clamp(44px, 7vw, 84px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
  color: var(--teal-700); background: #fff; padding: 8px 16px; border-radius: 50px; box-shadow: var(--shadow); margin-block-end: 20px;
}
.hero h1 { margin-block-end: 18px; }
.hero__lead { font-size: 1.18rem; color: var(--ink-700); margin-block-end: 28px; max-width: 62ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-end: 24px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; color: var(--ink-500); }
.hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust span::before { content: '✓'; color: var(--teal-600); font-weight: 800; }
.hero__card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px;
  border: 1px solid var(--ink-100);
}
.hero__card h2 { font-size: 1.15rem; margin-block-end: 16px; }
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; gap: 32px; } }

/* Verdict / score box ------------------------------------------------------ */
.verdict {
  background: #fff; border: 2px solid var(--teal-600); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-lg);
}
.verdict__score { display: flex; align-items: baseline; gap: 10px; margin-block-end: 6px; }
.verdict__num { font-size: 3rem; font-weight: 800; color: var(--teal-700); line-height: 1; letter-spacing: -0.03em; }
.verdict__max { font-size: 1.2rem; color: var(--ink-500); font-weight: 700; }
.verdict__stars { color: var(--amber-500); font-size: 1.15rem; letter-spacing: 2px; margin-block-end: 14px; }
.verdict__label { font-weight: 700; color: var(--ink-900); margin-block-end: 8px; }
.verdict__rows { display: grid; gap: 10px; margin-block-start: 18px; }
.verdict__row { display: grid; grid-template-columns: 1fr auto; gap: 12px; font-size: .94rem; align-items: center; }
.verdict__row span:first-child { color: var(--ink-500); }
.verdict__row span:last-child { font-weight: 700; color: var(--ink-900); }
.verdict__bar { height: 7px; border-radius: 50px; background: var(--ink-100); overflow: hidden; grid-column: 1 / -1; }
.verdict__bar i { display: block; height: 100%; background: var(--teal-600); border-radius: 50px; }

/* Pros and cons ------------------------------------------------------------ */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .proscons { grid-template-columns: 1fr; } }
.proscons__col { border-radius: var(--radius); padding: 24px 26px; border: 1px solid; }
.proscons__col--pro { background: var(--green-50); border-color: #bbf7d0; }
.proscons__col--con { background: var(--red-50); border-color: #fecaca; }
.proscons__col h3 { font-size: 1.1rem; margin-block-end: 14px; }
.proscons__col--pro h3 { color: #15803d; }
.proscons__col--con h3 { color: #b91c1c; }
.proscons__col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.proscons__col li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-700); line-height: 1.6; }
.proscons__col--pro li::before { content: '✓'; color: var(--green-600); font-weight: 800; flex-shrink: 0; }
.proscons__col--con li::before { content: '✕'; color: var(--red-600); font-weight: 800; flex-shrink: 0; }

/* Affiliate CTA block ------------------------------------------------------ */
.aff-cta {
  max-width: 760px; margin: 40px auto; padding: 28px 30px; text-align: center;
  background: linear-gradient(160deg, #fffbeb, #fff);
  border: 2px solid var(--amber-500); border-radius: var(--radius); box-shadow: var(--shadow);
}
.aff-cta--compact { padding: 22px 24px; margin-block: 32px; }
.aff-cta__heading { font-size: 1.25rem; font-weight: 800; color: var(--ink-900); margin-block-end: 10px; line-height: 1.35; }
.aff-cta--compact .aff-cta__heading { font-size: 1.1rem; }
.aff-cta__body { color: var(--ink-700); margin-block-end: 20px; font-size: .98rem; }
.aff-cta__btn { font-size: 17px; padding: 15px 32px; }
.aff-cta--compact .aff-cta__btn { font-size: 15px; padding: 12px 26px; }
.aff-cta__note { margin-block-start: 12px; font-size: .8rem; color: var(--ink-500); }
.prose .aff-cta a { text-decoration: none; }

/* Comparison / spec table -------------------------------------------------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { padding: 13px 16px; text-align: start; border-block-end: 1px solid var(--ink-100); }
.spec-table th { background: var(--ink-50); font-weight: 700; width: 40%; color: var(--ink-700); }

/* Callout bands ------------------------------------------------------------ */
.cta-band { text-align: center; }
.cta-band h2 { margin-block-end: 14px; }
.cta-band p { max-width: 660px; margin: 0 auto 26px; font-size: 1.08rem; }
.cta-band .btn { font-size: 17px; padding: 15px 34px; }

/* Article prose ------------------------------------------------------------ */
.prose { max-width: 760px; margin-inline: auto; }
.prose > * + * { margin-block-start: 1.25em; }
.prose h2 { margin-block-start: 1.9em; padding-block-end: .3em; border-block-end: 2px solid var(--teal-50); scroll-margin-top: 90px; }
.prose h3 { margin-block-start: 1.5em; color: var(--teal-800); scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--ink-700); }
.prose ul, .prose ol { padding-inline-start: 1.4em; display: grid; gap: .5em; }
.prose li { padding-inline-start: 4px; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink-900); }
.prose blockquote {
  border-inline-start: 4px solid var(--teal-600); background: var(--teal-50);
  padding: 16px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-700); font-style: normal;
}
.prose blockquote p { margin: 0; }
.prose code {
  background: var(--ink-100); padding: 2px 7px; border-radius: 6px; font-size: .9em;
  font-family: 'Consolas', 'Courier New', monospace;
}
.prose hr { border: 0; border-block-start: 1px solid var(--ink-100); margin-block: 2.5em; }

/* Figures (WebP article images) -------------------------------------------- */
.article-figure { margin-block: 2em; }
.article-figure img {
  width: 100%; height: auto; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); background: var(--ink-100);
}
.article-figure figcaption {
  margin-block-start: 10px; font-size: .86rem; color: var(--ink-500); text-align: center; line-height: 1.6;
}

/* Responsive tables -------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin-block: 1.6em; border-radius: var(--radius-sm); border: 1px solid var(--ink-100); }
.prose table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 460px; }
.prose thead { background: var(--teal-700); color: #fff; }
.prose th, .prose td { padding: 13px 16px; text-align: start; border-block-end: 1px solid var(--ink-100); }
.prose tbody tr:nth-child(even) { background: var(--ink-50); }
.prose tbody tr:hover { background: var(--teal-50); }

/* Quick-answer box (featured-snippet bait) --------------------------------- */
.answer-box {
  background: var(--teal-50); border: 1px solid var(--teal-500); border-inline-start-width: 5px;
  border-radius: var(--radius-sm); padding: 20px 24px; margin-block: 1.6em;
}
.answer-box strong { color: var(--teal-800); }

/* Table of contents -------------------------------------------------------- */
.toc { background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: var(--radius); padding: 22px 26px; margin-block: 2em; }
.toc h2 { font-size: 1.05rem; margin: 0 0 14px; border: 0; padding: 0; }
.toc ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; }
.toc a { color: var(--ink-700); text-decoration: none; font-size: .95rem; }
.toc a:hover { color: var(--teal-700); text-decoration: underline; }

/* Article header ----------------------------------------------------------- */
.article-header { max-width: 760px; margin-inline: auto; text-align: center; padding-block: 40px 8px; }
.article-header__cat { color: var(--teal-700); font-weight: 700; font-size: .92rem; }
.article-header h1 { margin-block: 14px 18px; }
.article-header__meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; align-items: center;
  color: var(--ink-500); font-size: .9rem;
}
.article-header__meta time, .article-header__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Per-article disclosure strip --------------------------------------------- */
.disclosure-strip {
  max-width: 760px; margin: 0 auto 8px; padding: 11px 18px; border-radius: var(--radius-sm);
  background: var(--amber-50); border: 1px solid #fde68a; color: #92400e;
  font-size: .84rem; line-height: 1.6; text-align: center;
}
.disclosure-strip a { color: #92400e; text-decoration: underline; font-weight: 600; }

/* Author box (E-E-A-T) ----------------------------------------------------- */
.author-box {
  display: flex; gap: 18px; align-items: center; max-width: 760px; margin: 48px auto 0;
  padding: 24px; background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: var(--radius);
}
.author-box__avatar {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800)); color: #fff; font-size: 17px; font-weight: 800;
}
.author-box__name { font-weight: 800; color: var(--ink-900); }
.author-box__title { color: var(--ink-500); font-size: .9rem; }

/* Related articles --------------------------------------------------------- */
.related { border-block-start: 1px solid var(--ink-100); margin-block-start: 48px; padding-block-start: 40px; }

/* Forms -------------------------------------------------------------------- */
.form-field { display: grid; gap: 6px; margin-block-end: 18px; }
.form-field label { font-weight: 700; font-size: .95rem; }
.form-field input, .form-field textarea, .form-field select {
  font-family: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink-900); width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}

/* Check list --------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: '✓'; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

/* Update log --------------------------------------------------------------- */
.updates { max-width: 820px; margin-inline: auto; display: grid; gap: 0; }
.updates__item { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding-block: 16px; border-block-end: 1px solid var(--ink-100); }
.updates__date { color: var(--teal-700); font-weight: 700; font-size: .88rem; }
.updates__text { color: var(--ink-700); font-size: .96rem; }
@media (max-width: 560px) { .updates__item { grid-template-columns: 1fr; gap: 4px; } }

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