/* ==========================================================================
   First-Time Homebuyer Education Hub — Stylesheet
   Palette: soft blues/greens, high contrast text, generous white space.
   Mobile-first, accessible, no external UI framework.
   ========================================================================== */

:root {
  /* Color system */
  --color-bg: #fbfcfb;
  --color-surface: #ffffff;
  --color-surface-alt: #f2f7f5;
  --color-border: #dbe6e2;

  --color-primary: #1f5f5b;      /* deep teal-green: headings, links */
  --color-primary-dark: #163f3d;
  --color-primary-light: #e4f0ee;

  --color-accent: #2f6690;       /* soft blue: secondary accents */
  --color-accent-light: #e7eff5;

  --color-text: #24302d;
  --color-text-muted: #55625e;
  --color-text-on-dark: #f4f8f7;

  --color-success-bg: #eef6ee;
  --color-warning-bg: #fbf5e6;
  --color-warning-border: #e8d8ab;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-soft: 0 2px 10px rgba(31, 95, 91, 0.08);
  --shadow-med: 0 6px 24px rgba(31, 95, 91, 0.12);

  --max-width: 1120px;
  --max-width-text: 720px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--color-primary-dark); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); margin-top: 1.6em; }
p { margin: 0 0 1.1em; }
a { color: var(--color-accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--color-primary); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }
strong { color: var(--color-primary-dark); }
hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

.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;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary-dark);
  color: #fff; padding: 0.75em 1.2em; z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 0.75em 1.4em; border-radius: var(--radius-md); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: var(--color-accent); color: #fff; }
.btn-secondary:hover { background: #244f6f; color: #fff; }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary-dark); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-ghost:hover { background: var(--color-surface-alt); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,252,251,0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: var(--color-primary-dark); }
.brand-mark { color: var(--color-primary); flex-shrink: 0; }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text.small { font-size: 1.05rem; }
.brand-tagline { font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: var(--color-surface); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--color-primary-dark); position: relative;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

.site-nav ul { list-style: none; display: flex; gap: 1.1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--color-text); font-weight: 600; font-size: 0.92rem; text-decoration: none; padding: 0.4em 0.1em; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { color: var(--color-primary-dark); border-bottom-color: var(--color-primary); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface);
    border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-med);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 460px; }
  .site-nav ul { flex-direction: column; padding: 0.75rem 1.25rem 1.25rem; gap: 0.2rem; }
  .site-nav a { display: block; padding: 0.7em 0.2em; }
}
@media (min-width: 901px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; max-height: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding: 3.2rem 0 3rem; background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-bg) 100%); }
.hero-inner { display: grid; gap: 2.2rem; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr 0.9fr; } }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary); background: var(--color-primary-light); padding: 0.35em 0.9em; border-radius: 999px; margin-bottom: 1em; }
.hero p.lead { font-size: 1.15rem; color: var(--color-text-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; margin-top: 1.6rem; font-size: 0.88rem; color: var(--color-text-muted); }
.hero-badges span { display: flex; align-items: center; gap: 0.4em; }
.hero-visual {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-soft);
}
.hero-visual h2 { margin-top: 0; font-size: 1.1rem; }
.hero-visual ol { margin: 0; }
.hero-visual li { margin-bottom: 0.8em; }

/* ---------- Sections & cards ---------- */
section.section { padding: 3rem 0; }
section.section.alt { background: var(--color-surface-alt); }
.section-head { max-width: 640px; margin: 0 auto 2rem; text-align: left; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.card-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-soft); display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; font-size: 1.15rem; }
.card p { color: var(--color-text-muted); flex-grow: 1; }
.card .card-link { margin-top: 0.6rem; font-weight: 600; }
.card-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--color-primary-light); color: var(--color-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.4rem; }
.pill { background: var(--color-accent-light); color: var(--color-accent); font-size: 0.82rem; font-weight: 600; padding: 0.3em 0.85em; border-radius: 999px; }

/* ---------- Article layout ---------- */
.page-header { padding: 2.6rem 0 1.8rem; background: var(--color-primary-light); border-bottom: 1px solid var(--color-border); }
.page-header .wrap { max-width: 860px; }
.breadcrumbs { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.9rem; }
.breadcrumbs a { color: var(--color-text-muted); }
.page-header p.lead { color: var(--color-text-muted); font-size: 1.08rem; max-width: 60ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; font-size: 0.85rem; color: var(--color-text-muted); }

.article-layout { display: grid; gap: 2.5rem; padding: 2.6rem 0 4rem; max-width: var(--max-width); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 960px) { .article-layout { grid-template-columns: minmax(0,720px) 300px; align-items: start; } }
.article-body { max-width: 720px; }
.article-body > *:first-child { margin-top: 0; }
.callout {
  background: var(--color-surface-alt); border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.callout h3 { margin-top: 0; font-size: 1rem; }
.callout.warning { background: var(--color-warning-bg); border-left-color: #b8902a; }
.callout ul { margin-bottom: 0; }
.takeaways { background: var(--color-primary-light); border-radius: var(--radius-md); padding: 1.3rem 1.5rem; margin-bottom: 2rem; }
.takeaways h2 { margin-top: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; }
.takeaways ul { margin-bottom: 0; }
.data-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; padding: 0.65em 0.8em; border-bottom: 1px solid var(--color-border); }
.data-table th { background: var(--color-surface-alt); font-family: var(--font-head); }
.data-table caption { text-align: left; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.4em; }

.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 1.9em; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.15em; width: 1.1em; height: 1.1em;
  border: 2px solid var(--color-primary); border-radius: 4px; background: var(--color-surface);
}

.sidebar { display: flex; flex-direction: column; gap: 1.4rem; }
.sidebar .card { padding: 1.3rem; }
.sidebar h2, .sidebar h3 { font-size: 1rem; }
.toc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.2rem 1.3rem; }
.toc h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0; }
.toc ol { margin: 0; padding-left: 1.1em; font-size: 0.92rem; }
.toc li { margin-bottom: 0.5em; }

.related-guides { list-style: none; padding: 0; margin: 0; }
.related-guides li { border-bottom: 1px solid var(--color-border); padding: 0.7em 0; }
.related-guides li:last-child { border-bottom: none; }
.related-guides a { font-weight: 600; }

/* ---------- Ad slots ---------- */
.ad-slot { margin: 2.4rem 0; }
.ad-slot-label { display: block; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 0.4rem; text-align: center; }
.ad-slot-box {
  border: 1px dashed var(--color-border); background: var(--color-surface-alt); border-radius: var(--radius-md);
  min-height: 100px; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted);
  font-size: 0.85rem;
}
.ad-slot.sidebar-ad .ad-slot-box { min-height: 250px; }
.ad-slot.leaderboard .ad-slot-box { min-height: 90px; }
.ad-slot.footer-ad .ad-slot-box { min-height: 90px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 2rem 0; padding-left: 2.2rem; border-left: 3px solid var(--color-primary-light); }
.timeline-step { position: relative; margin-bottom: 2.4rem; }
.timeline-step::before {
  content: attr(data-step); position: absolute; left: -2.95rem; top: -0.1rem; width: 2.2rem; height: 2.2rem;
  background: var(--color-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; font-family: var(--font-head);
}
.timeline-step h3 { margin-top: 0; }
.timeline-step .duration { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--color-accent); background: var(--color-accent-light); padding: 0.2em 0.7em; border-radius: 999px; margin-bottom: 0.6em; }

/* ---------- Glossary ---------- */
.glossary-search { margin-bottom: 2rem; }
.glossary-search input {
  width: 100%; padding: 0.85em 1.1em; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 1rem; font-family: var(--font-body);
}
.glossary-jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.glossary-jump a {
  text-decoration: none; font-weight: 700; width: 2.1rem; height: 2.1rem; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--color-surface-alt); color: var(--color-primary-dark); font-size: 0.9rem;
}
.glossary-jump a:hover { background: var(--color-primary-light); }
dl.glossary-list dt { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--color-primary-dark); margin-top: 1.6em; scroll-margin-top: 90px; }
dl.glossary-list dd { margin: 0.35em 0 0; color: var(--color-text); }
.glossary-letter { font-size: 1.6rem; color: var(--color-accent); border-bottom: 2px solid var(--color-border); padding-bottom: 0.3em; margin-top: 2.4em; scroll-margin-top: 90px; }

/* ---------- FAQ ---------- */
details.faq-item {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 1rem 1.3rem; margin-bottom: 0.9rem;
}
details.faq-item summary { cursor: pointer; font-weight: 700; color: var(--color-primary-dark); font-family: var(--font-head); font-size: 1.05rem; }
details.faq-item p { margin-top: 0.8em; margin-bottom: 0; color: var(--color-text-muted); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.3rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.4em; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 0.75em 0.9em; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; background: var(--color-surface);
}
.form-field .hint { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.3em; }
.form-note { background: var(--color-surface-alt); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: 0.92rem; margin-bottom: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: var(--color-text-on-dark); margin-top: 3rem; }
.footer-inner { display: grid; gap: 2rem; padding: 3rem 0 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col p { color: #cfe2de; font-size: 0.92rem; }
.footer-heading { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-body); font-weight: 700; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.6em; }
.footer-list a { color: #d8ebe7; text-decoration: none; }
.footer-list a:hover { color: #fff; text-decoration: underline; }
.small-print { font-size: 0.85rem; color: #b9d2cd; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,0.15); padding: 1.4rem 0 2rem; font-size: 0.85rem; color: #b9d2cd; }
.footer-disclaimer p { margin: 0 0 0.5em; }
.copyright { margin-top: 0.6em; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--color-primary-dark); color: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,0.2);
}
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; }
.cookie-inner p { margin: 0; font-size: 0.9rem; max-width: 60ch; color: #e6f2ef; }
.cookie-inner a { color: #fff; }
.cookie-actions { display: flex; gap: 0.7rem; flex-shrink: 0; }
.cookie-banner .btn-primary { background: #fff; color: var(--color-primary-dark); }
.cookie-banner .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }

/* ---------- Misc utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack-lg > * + * { margin-top: 1.6rem; }
.download-card {
  display: flex; align-items: center; gap: 1rem; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.download-card .icon { color: var(--color-primary); flex-shrink: 0; }
.download-card h3 { margin: 0 0 0.2em; font-size: 1rem; }
.download-card p { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); }
.download-card .btn { margin-left: auto; flex-shrink: 0; }
@media (max-width: 560px) { .download-card { flex-wrap: wrap; } .download-card .btn { margin-left: 0; } }

/* ==========================================================================
   JOURNEY TRACKER — stage pill + picker modal
   ========================================================================== */
.stage-bar {
  background: var(--color-primary-light); border-bottom: 1px solid var(--color-border);
}
.stage-bar-inner {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem 1.25rem; flex-wrap: wrap; font-size: 0.86rem;
}
.stage-bar-label { color: var(--color-text-muted); }
.stage-bar-current { font-weight: 700; color: var(--color-primary-dark); }
.stage-progress-track {
  flex-shrink: 0; width: 120px; height: 8px; border-radius: 999px; background: rgba(31,95,91,0.15); overflow: hidden;
}
.stage-progress-fill { height: 100%; background: var(--color-primary); border-radius: 999px; transition: width .3s ease; }
.stage-progress-pct { font-size: 0.78rem; color: var(--color-text-muted); flex-shrink: 0; }
.stage-change-btn {
  background: none; border: 1px solid var(--color-primary); color: var(--color-primary-dark); font-weight: 700;
  font-size: 0.82rem; padding: 0.3em 0.85em; border-radius: 999px; cursor: pointer; flex-shrink: 0; margin-left: auto;
}
.stage-change-btn:hover { background: var(--color-surface); }

.stage-modal-overlay {
  position: fixed; inset: 0; background: rgba(22,63,61,0.55); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
.stage-modal-overlay[hidden] { display: none; }
.stage-modal {
  background: var(--color-surface); border-radius: var(--radius-lg); max-width: 720px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 2rem; box-shadow: var(--shadow-med); position: relative;
}
.stage-modal h2 { margin-top: 0; }
.stage-modal .stage-modal-intro { color: var(--color-text-muted); margin-bottom: 1.4rem; }
.stage-modal-close {
  position: absolute; top: 1rem; right: 1rem; background: var(--color-surface-alt); border: none;
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; color: var(--color-text-muted);
}
.stage-card-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stage-card {
  text-align: left; background: var(--color-surface-alt); border: 2px solid transparent; border-radius: var(--radius-md);
  padding: 1rem 1.1rem; cursor: pointer; font-family: var(--font-body); color: var(--color-text);
}
.stage-card:hover, .stage-card:focus-visible { border-color: var(--color-primary); background: var(--color-primary-light); }
.stage-card.is-current { border-color: var(--color-primary); background: var(--color-primary-light); }
.stage-card strong { display: block; font-family: var(--font-head); color: var(--color-primary-dark); font-size: 1.02rem; margin-bottom: 0.25em; }
.stage-card span { font-size: 0.85rem; color: var(--color-text-muted); }
.stage-no-thanks { display: block; margin: 1.4rem auto 0; background: none; border: none; color: var(--color-text-muted); text-decoration: underline; cursor: pointer; font-size: 0.88rem; }

.stage-recs {
  background: var(--color-primary-light); border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin: 0 auto 2.4rem;
  max-width: var(--max-width);
}
.stage-recs h2 { margin-top: 0; font-size: 1.15rem; }
.stage-recs-list { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; padding: 0; margin: 1rem 0 0; }
.stage-recs-list a {
  display: block; background: var(--color-surface); border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  font-weight: 600; text-decoration: none; border: 1px solid var(--color-border);
}
.stage-recs-list a:hover { border-color: var(--color-primary); }
.stage-recs-list span { display: block; font-weight: 400; font-size: 0.82rem; color: var(--color-text-muted); margin-top: 0.2em; }

/* ==========================================================================
   INTERACTIVE CHECKLISTS
   ========================================================================== */
.checklist-section {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem; margin-bottom: 1.4rem; transition: opacity .2s ease;
}
.checklist-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.checklist-section-head h3 { margin: 0; }
.section-status { font-size: 0.8rem; font-weight: 700; padding: 0.25em 0.75em; border-radius: 999px; background: var(--color-surface-alt); color: var(--color-text-muted); }
.section-status.done { background: var(--color-success-bg); color: var(--color-primary-dark); }
.checklist-section.is-locked-hint { opacity: 0.85; }
.locked-note { font-size: 0.85rem; color: var(--color-accent); background: var(--color-accent-light); border-radius: var(--radius-sm); padding: 0.6em 0.9em; margin-top: 0.8em; }
.interactive-checklist { list-style: none; padding: 0; margin: 1rem 0 0; }
.interactive-checklist li { display: flex; align-items: flex-start; gap: 0.7em; padding: 0.5em 0; border-bottom: 1px dashed var(--color-border); }
.interactive-checklist li:last-child { border-bottom: none; }
.interactive-checklist input[type="checkbox"] { width: 1.15em; height: 1.15em; margin-top: 0.2em; accent-color: var(--color-primary); flex-shrink: 0; }
.interactive-checklist label { cursor: pointer; }
.interactive-checklist input:checked + label { color: var(--color-text-muted); text-decoration: line-through; text-decoration-color: var(--color-border); }
.kit-progress-banner {
  display: flex; align-items: center; gap: 1rem; background: var(--color-primary-light); border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem; margin: 1.6rem 0; flex-wrap: wrap;
}
.kit-progress-banner .stage-progress-track { width: 160px; }
.kit-progress-banner strong { color: var(--color-primary-dark); }
.kit-celebrate { display: none; font-weight: 700; color: var(--color-primary-dark); }
.kit-celebrate.show { display: inline; }

/* ==========================================================================
   QUIZZES
   ========================================================================== */
.quiz-block {
  background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem; margin: 2.4rem 0;
}
.quiz-block h2 { margin-top: 0; }
.quiz-progress { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.quiz-question { display: none; }
.quiz-question.active { display: block; }
.quiz-question p.quiz-q-text { font-weight: 700; color: var(--color-primary-dark); font-family: var(--font-head); font-size: 1.05rem; }
.quiz-options { list-style: none; padding: 0; margin: 0 0 1rem; }
.quiz-options li { margin-bottom: 0.6em; }
.quiz-option-btn {
  display: block; width: 100%; text-align: left; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 0.7em 1em; cursor: pointer; font-family: var(--font-body); font-size: 0.95rem;
}
.quiz-option-btn:hover { border-color: var(--color-accent); }
.quiz-option-btn.correct { background: var(--color-success-bg); border-color: var(--color-primary); }
.quiz-option-btn.incorrect { background: #fdecea; border-color: #c0564d; }
.quiz-feedback { font-size: 0.9rem; padding: 0.8em 1em; border-radius: var(--radius-sm); margin-top: 0.4em; }
.quiz-feedback.correct { background: var(--color-success-bg); }
.quiz-feedback.incorrect { background: var(--color-warning-bg); }
.quiz-feedback a { font-weight: 700; }
.quiz-result { text-align: center; }
.quiz-result .quiz-result-badge { font-size: 2.2rem; margin-bottom: 0.3em; }
.quiz-restart { margin-top: 0.8em; }

/* ==========================================================================
   TOOLS — sliders, drag-drop timeline, decoder
   ========================================================================== */
.tool-banner {
  background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem; font-size: 0.9rem; margin-bottom: 1.6rem; font-weight: 600; color: var(--color-primary-dark);
}
.slider-group { margin-bottom: 1.6rem; }
.slider-group label { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 0.5em; color: var(--color-primary-dark); }
.slider-group output { font-weight: 700; color: var(--color-accent); }
.slider-group input[type="range"] { width: 100%; accent-color: var(--color-primary); height: 1.4em; }
.tool-result {
  background: var(--color-primary-light); border-radius: var(--radius-md); padding: 1.4rem 1.6rem; margin-top: 1.6rem;
}
.tool-result h3 { margin-top: 0; }
.tool-result .big-number { font-size: 1.6rem; font-weight: 700; color: var(--color-primary-dark); font-family: var(--font-head); }

.contingency-chip-tray { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.4rem; padding: 1rem; background: var(--color-surface-alt); border-radius: var(--radius-md); }
.contingency-chip {
  background: var(--color-accent); color: #fff; padding: 0.5em 1em; border-radius: 999px; font-weight: 700;
  font-size: 0.85rem; cursor: grab; user-select: none; border: none;
}
.contingency-chip:active { cursor: grabbing; }
.contingency-chip.placed { opacity: 0.35; }
.timeline-zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .timeline-zones { grid-template-columns: 1fr; } }
.timeline-zone {
  border: 2px dashed var(--color-border); border-radius: var(--radius-md); padding: 0.9rem; min-height: 140px;
  background: var(--color-surface);
}
.timeline-zone.drag-over { border-color: var(--color-primary); background: var(--color-primary-light); }
.timeline-zone h4 { margin: 0 0 0.6em; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); }
.timeline-zone .placed-chip { background: var(--color-primary); color: #fff; border-radius: 999px; padding: 0.4em 0.9em; font-size: 0.82rem; font-weight: 700; margin-bottom: 0.4em; display: inline-block; }
.timeline-zone .typical-note { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.5em; }
.decoder-output { margin-top: 1.4rem; }

/* ==========================================================================
   TERM OF THE WEEK / SURPRISES
   ========================================================================== */
.homepage-extras-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.term-card, .surprise-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.5rem 1.7rem;
}
.term-card .eyebrow, .surprise-card .eyebrow { margin-bottom: 0.6em; }
.term-card h3, .surprise-card h3 { margin-top: 0; }
.term-card a.card-link, .surprise-card a.card-link { font-weight: 700; }
