/* =====================================================
   Raiwtid AI Academy — /guides/ article stylesheet
   Light reading surface for long-form parent content.
   Shared by every /guides/ and /es/guias/ page only —
   does NOT touch privacy.html / terms.html / dpa.html /
   educator-guide.html, which keep their own inline dark
   styles untouched.

   Brand continuity kept from the existing dark article
   pages: Nunito typeface/weights, same header block, same
   CTA gradient. Accent blue is DARKENED from the site's
   usual #4DB8FF (see notes) so link/heading text clears
   WCAG AA (4.5:1) on a light background — #4DB8FF only
   hits ~2.2:1 on white and would fail.
   ===================================================== */

:root {
  /* Light theme (default) */
  --bg:          #FAFBFF;
  --bg-card:     #FFFFFF;
  --bg-callout:  rgba(11,111,176,0.06);
  --bg-callout-green:  rgba(15,157,88,0.07);
  --bg-callout-amber:  rgba(180,83,9,0.08);
  --border:      rgba(11,111,176,0.16);
  --text:        #1A2440;
  --text-muted:  #5B6B87;
  --heading:     #0F1830;
  --accent:      #0B6FB0;      /* darkened from brand #4DB8FF for AA on light */
  --accent-border: #0B6FB0;
  --green:       #0F9D58;
  --amber:       #B45309;
  --cta-start:   #04569D;      /* darkened from brand #1A8FE3 — see contrast note below */
  --cta-end:     #0B6FB0;      /* darkened from brand #4DB8FF: white CTA text was ~2.18:1 on light gradient stop, fails AA; now ~5.4:1 */
  --cta-text:    #FFFFFF;
  --card-border: rgba(15,24,48,0.08);
  --footer-bg:   #F0F3FB;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0A1628;
    --bg-card:     #101E38;
    --bg-callout:  rgba(77,184,255,0.08);
    --bg-callout-green:  rgba(16,185,129,0.08);
    --bg-callout-amber:  rgba(252,211,77,0.07);
    --border:      rgba(77,184,255,0.25);
    --text:        #c7d5e8;
    --text-muted:  #7d92ad;
    --heading:     #ffffff;
    --accent:      #4DB8FF;    /* full brand blue is fine again on dark */
    --accent-border: #4DB8FF;
    --green:       #10b981;
    --amber:       #FCD34D;
    --cta-start:   #04569D;    /* same darkened pair as light mode — button text/fill contrast doesn't depend on page background */
    --cta-end:     #0B6FB0;
    --cta-text:    #FFFFFF;
    --card-border: rgba(255,255,255,0.1);
    --footer-bg:   #0F1D38;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
}

@media (min-width: 480px) {
  body { font-size: 18px; }
}

.wrap { max-width: 780px; margin: 0 auto; padding: 32px 20px 0; }
.prose { max-width: 72ch; }

/* ── Header (same block used on the existing article pages) ── */
.header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.header img { width: 52px; height: 52px; border-radius: 14px; }
.header .brand { font-size: 19px; font-weight: 900; color: var(--heading); }
.header .brand a { color: inherit; text-decoration: none; }

/* ── Breadcrumbs ── */
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--accent); text-decoration: none; font-weight: 700; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; opacity: .6; }

/* ── Typography ── */
h1 {
  color: var(--heading);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
  max-width: 22ch;
}
@media (min-width: 480px) { h1 { font-size: 36px; } }

.lede {
  font-size: 19px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 68ch;
}

h2 {
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
  margin: 40px 0 14px;
  max-width: 68ch;
}
h3 {
  color: var(--heading);
  font-size: 17px;
  font-weight: 800;
  margin: 22px 0 8px;
  max-width: 68ch;
}
p, li { font-size: 1em; margin-bottom: 14px; max-width: 68ch; }
ul, ol { padding-left: 24px; margin-bottom: 16px; }
li { margin-bottom: 8px; }
strong { color: var(--heading); }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

/* ── Callouts ── */
.callout {
  background: var(--bg-callout);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  max-width: 68ch;
}
.callout--green { background: var(--bg-callout-green); border-color: rgba(15,157,88,.3); border-left-color: var(--green); }
.callout--amber  { background: var(--bg-callout-amber); border-color: rgba(180,83,9,.3);  border-left-color: var(--amber); }

/* ── FAQ ── */
.faq-item { border-top: 1px solid var(--card-border); padding: 18px 0; max-width: 68ch; }
.faq-item:last-child { border-bottom: 1px solid var(--card-border); }
.faq-q { font-size: 16px; font-weight: 800; color: var(--heading); margin-bottom: 8px; }
.faq-a { color: var(--text); }
.faq-a p:last-child { margin-bottom: 0; }

/* ── Related guides ── */
.related { margin: 40px 0; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; margin-top: 14px; }
.related-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.related-card:hover { border-color: var(--accent); }
.related-card-title { font-size: 14.5px; font-weight: 800; color: var(--heading); margin-bottom: 4px; }
.related-card-sub { font-size: 13px; color: var(--text-muted); }

/* ── "Coming soon" state: guide not yet published, not a link ── */
.related-card.is-soon { opacity: .6; cursor: default; }
.related-card.is-soon:hover { border-color: var(--card-border); }
.related-card-badge {
  display: inline-block; margin-top: 10px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--card-border); border-radius: 20px; padding: 2px 9px;
}

/* ── Footer link not yet published, not a link ── */
.guide-footer-col .is-soon { display: block; font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; opacity: .65; cursor: default; }

/* ── Language switch ── */
.lang-switch { font-size: 14px; margin: 24px 0; }
.lang-switch a { font-weight: 700; text-decoration: none; }
.lang-switch a:hover { text-decoration: underline; }

/* ── CTA (kept as specified: existing brand gradient) ── */
.guide-cta {
  margin: 44px 0 8px;
  background: linear-gradient(135deg, rgba(26,143,227,0.08), rgba(77,184,255,0.08));
  border: 1.5px solid rgba(11,111,176,0.25);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  max-width: 68ch;
}
.guide-cta p { max-width: none; color: var(--text); margin-bottom: 18px; font-size: 15.5px; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-text);
  font-weight: 800;
  font-size: 15px;
  padding: 13px 30px;
  border-radius: 30px;
  text-decoration: none;
}

/* ── Video slot ── */
.video-slot {
  max-width: 68ch;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 24px 0;
}

/* ── Footer (real, functional — see Correction 3) ── */
.guide-footer {
  margin-top: 56px;
  background: var(--footer-bg);
  border-top: 1px solid var(--card-border);
}
.guide-footer-inner { max-width: 780px; margin: 0 auto; padding: 32px 20px 40px; }
.guide-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 24px; margin-bottom: 20px; }
.guide-footer-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.guide-footer-col a { display: block; font-size: 13.5px; color: var(--text); text-decoration: none; margin-bottom: 8px; font-weight: 600; }
.guide-footer-col a:hover { color: var(--accent); }
.guide-footer-copy { font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--card-border); padding-top: 16px; }

/* ── Review date (claims about platform policy / tooling go stale) ── */
.reviewed-note { font-size: 12.5px; color: var(--text-muted); margin: 28px 0 0; }

/* ── Back pill (kept above the footer, per Correction 3) ── */
.back-btn {
  display: inline-block;
  margin: 8px 0 0;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: 30px;
  text-decoration: none;
}
