/* ===========================================================
   Financial Confidence — Design System
   =========================================================== */

:root {
  --navy-900: #0a1f3d;
  --navy-800: #0f2a52;
  --navy-700: #163a6b;
  --navy-600: #1d4b87;
  --ink: #101828;
  --ink-soft: #3c4658;
  --muted: #667085;
  --line: #e3e8f0;
  --paper: #ffffff;
  --paper-tint: #f6f8fc;
  --paper-tint-2: #eef2f9;
  --green-600: #0f9d58;
  --green-100: #e5f7ed;
  --green-700: #0b7a44;
  --amber-600: #b6790a;
  --amber-100: #fdf1dc;
  --red-600: #c23b3b;
  --red-100: #fbe9e9;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 45px rgba(10, 31, 61, 0.16);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; color: var(--navy-900); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; color: var(--ink-soft); }
li { margin-bottom: .4em; }
strong { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-navy { background: transparent; border-color: var(--navy-700); color: var(--navy-800); }
.btn-outline-navy:hover { background: var(--paper-tint-2); }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--navy-900); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-700), var(--green-600));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: .95rem;
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--navy-800); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-900); margin: 5px 0; }

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline-navy { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1100px 500px at 15% -10%, #16407a 0%, transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: #fff;
  padding: 88px 0 96px;
}
.hero .eyebrow { color: #9fd8c0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
.hero h1 { color: #fff; max-width: 780px; }
.hero p.lead { color: #d7e3f2; font-size: 1.15rem; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .stat-num { font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stats .stat-label { color: #a9bdd8; font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--paper-tint); }
.section-head { max-width: 680px; margin: 0 auto 46px; text-align: center; }
.section-head .eyebrow { color: var(--green-700); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; font-size: .78rem; margin-bottom: 10px; }

/* ---------- School cards ---------- */
.school-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.school-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column; height: 100%;
}
.school-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); text-decoration: none; }
.school-card .tag {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--green-700); background: var(--green-100); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; width: fit-content;
}
.school-card h3 { margin-bottom: 8px; }
.school-card p { flex: 1; font-size: .95rem; }
.school-card .meta { font-size: .85rem; color: var(--muted); font-weight: 600; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }

/* ---------- Lesson list (school hub) ---------- */
.school-hero { background: var(--navy-900); color: #fff; padding: 60px 0 48px; }
.school-hero .eyebrow { color: #9fd8c0; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: .78rem; }
.school-hero h1 { color: #fff; margin-bottom: 6px; }
.school-hero p { color: #cfdcee; max-width: 640px; }
.breadcrumbs { font-size: .85rem; color: #a9bdd8; margin-bottom: 14px; }
.breadcrumbs a { color: #cfdcee; }
.breadcrumbs.on-light, .breadcrumbs.on-light a { color: var(--muted); }

.lesson-search { margin: -26px auto 0; max-width: 640px; position: relative; z-index: 5; }
.lesson-search input {
  width: 100%; padding: 15px 20px; border-radius: 999px; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); font-size: .95rem; font-family: inherit;
}

.lesson-list { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lesson-row {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.lesson-row:hover { border-color: var(--navy-600); box-shadow: var(--shadow-sm); text-decoration: none; }
.lesson-row .num { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--paper-tint-2); color: var(--navy-800); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.lesson-row .info { flex: 1; min-width: 0; }
.lesson-row .code { font-size: .72rem; font-weight: 800; letter-spacing: .05em; color: var(--green-700); text-transform: uppercase; }
.lesson-row .title { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.lesson-row .arrow { color: var(--muted); flex: none; }

/* ---------- Lesson page ---------- */
.lesson-hero { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 46px 0 40px; }
.lesson-hero .code-pill { display: inline-block; background: rgba(255,255,255,.12); color: #dff3e8; font-weight: 800; font-size: .75rem; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.lesson-hero h1 { color: #fff; margin-bottom: 10px; }
.lesson-hero .subtitle { color: #cfdcee; font-size: 1.08rem; max-width: 720px; }

.lesson-body-wrap { padding: 52px 0 80px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; } .lesson-toc { display: none; } }

.lesson-toc { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--paper-tint); }
.lesson-toc .toc-label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.lesson-toc ul { list-style: none; padding: 0; margin: 0; }
.lesson-toc li { margin-bottom: 8px; }
.lesson-toc a { font-size: .87rem; color: var(--ink-soft); font-weight: 600; }
.lesson-toc a:hover { color: var(--navy-800); }

.objectives-box {
  background: var(--paper-tint-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 40px;
}
.objectives-box .label { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-700); margin-bottom: 10px; }
.objectives-box ul { margin: 0; }
.objectives-box li { color: var(--ink); }

.lesson-content section.content-block { margin-bottom: 38px; scroll-margin-top: 96px; }
.lesson-content .kicker { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green-700); margin-bottom: 6px; }
.lesson-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .93rem; }
.lesson-content th, .lesson-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.lesson-content th { background: var(--paper-tint-2); color: var(--navy-800); }
.lesson-content tr:nth-child(even) td { background: var(--paper-tint); }
p.pull-quote { font-style: italic; color: var(--navy-700); border-left: 3px solid var(--green-600); padding-left: 16px; margin: 20px 0; }

/* Myths */
.myths-heading { margin-bottom: 20px; }
.myth-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.myth-row { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; }
.myth-row.is-myth { background: var(--red-100); }
.myth-row.is-fact { background: var(--green-100); }
.myth-row .badge { flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-top: 2px; }
.myth-row.is-myth .badge { background: var(--red-600); color: #fff; }
.myth-row.is-fact .badge { background: var(--green-600); color: #fff; }
.myth-row p { margin: 0; color: var(--ink); font-size: .96rem; }
.myth-row.is-myth p { font-weight: 600; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 4px; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q:after { content: "+"; font-size: 1.4rem; color: var(--navy-600); flex: none; transition: transform .2s ease; }
.faq-item.open .faq-q:after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-inner { padding: 0 4px 18px; }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* Takeaway / Next step */
.takeaway-box {
  background: var(--amber-100); border: 1px solid #f0d9a8; border-radius: var(--radius);
  padding: 26px 28px; margin: 8px 0 38px;
}
.takeaway-box .label { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-600); margin-bottom: 10px; }
.takeaway-box p, .takeaway-box li { color: var(--ink); }

.nextstep-box {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff;
  border-radius: var(--radius); padding: 34px 34px; margin: 8px 0 38px;
}
.nextstep-box .label { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9fd8c0; margin-bottom: 12px; }
.nextstep-box p { color: #e4ecf7; }
.nextstep-box .btn { margin-top: 10px; }

.share-box { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 20px 22px; margin: 0 0 38px; background: var(--paper-tint); font-size: .93rem; }
.share-box p, .share-box li { font-size: .93rem; }

.related-box { border-top: 1px solid var(--line); padding-top: 34px; margin-top: 10px; }
.related-box h3 { margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.related-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; background: #fff; }
.related-card.linked:hover { border-color: var(--navy-600); box-shadow: var(--shadow-sm); text-decoration: none; }
.related-card .code { font-size: .68rem; font-weight: 800; color: var(--green-700); letter-spacing: .05em; text-transform: uppercase; }
.related-card .t { font-weight: 700; color: var(--ink); font-size: .95rem; margin-top: 2px; }
.related-card.plain { color: var(--muted); }
.related-card.plain .t { color: var(--muted); font-weight: 600; }

.lesson-footer-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lesson-footer-nav a { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.lesson-footer-nav a:hover { border-color: var(--navy-600); text-decoration: none; }
.lesson-footer-nav .dir { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lesson-footer-nav .t { font-weight: 700; color: var(--ink); margin-top: 4px; }
.lesson-footer-nav .next { text-align: right; margin-left: auto; }

/* ---------- Misc content components ---------- */
.callout-strip { background: var(--green-600); color: #fff; border-radius: var(--radius); padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.callout-strip h2, .callout-strip p { color: #fff; margin: 0; }
.callout-strip p { color: #e3f7ec; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.feature { padding: 4px; }
.feature .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--paper-tint-2); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.1rem; }
.feature p { font-size: .93rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.pill-row a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.pill-row a:hover { border-color: var(--navy-600); color: var(--navy-800); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c9df; padding: 56px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-grid h4 { color: #fff; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: #b9c9df; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.footer-note { font-size: .85rem; color: #8ea1bd; max-width: 320px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: #8ea1bd; }

/* ---------- Disclaimer ---------- */
.disclaimer { font-size: .82rem; color: var(--muted); background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin: 40px 0 0; }

/* ---------- Simple page (About/Blog) ---------- */
.simple-hero { background: var(--navy-900); color: #fff; padding: 64px 0 54px; }
.simple-hero h1 { color: #fff; }
.simple-hero p { color: #cfdcee; max-width: 640px; font-size: 1.08rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }

.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper-tint); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 14px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.badge-count { display: inline-flex; align-items: center; justify-content: center; background: var(--paper-tint-2); color: var(--navy-800); font-weight: 700; font-size: .8rem; padding: 4px 12px; border-radius: 999px; }
