/* ============================================================
   Ritik Sir Notes — site stylesheet
   No external frameworks. Mobile-first, print friendly.
   ============================================================ */

:root {
  --navy: #0f2a4a;
  --navy-800: #14345c;
  --navy-700: #1b4373;
  --blue: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --sky: #38bdf8;
  --amber: #f59e0b;
  --amber-100: #fef3c7;
  --green: #047857;
  --green-100: #d1fae5;
  --red: #b91c1c;
  --red-100: #fee2e2;
  --ink: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --line: #dbe3ef;
  --line-soft: #eaf0f8;
  --bg: #f5f8fc;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 74, .06), 0 2px 8px rgba(15, 42, 74, .05);
  --shadow: 0 10px 30px -18px rgba(15, 42, 74, .45);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --wrap-narrow: 820px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
p, li, td, th { overflow-wrap: break-word; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }
strong { color: var(--navy); }
small { font-size: .86rem; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--amber); color: #1f2937; padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.15rem; }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 1.15rem; }
.section { padding: 3rem 0; }
.section-sm { padding: 2rem 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hide { display: none !important; }

.eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 .55rem;
}
.eyebrow.light { color: #fcd34d; }

.lead { font-size: 1.08rem; color: var(--muted); }
.measure { max-width: 68ch; }

/* ---------------- Header / navigation ---------------- */
.site-header {
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--navy); font-weight: 800; letter-spacing: -.02em;
}
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand span small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); line-height: 1.2; }
.brand span b { font-size: 1.05rem; line-height: 1.2; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .5rem .8rem; font: inherit; font-size: .92rem; font-weight: 700; color: var(--navy);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .2rem;
}
.site-nav a {
  display: block;
  padding: .55rem .8rem;
  border-radius: 999px;
  color: #334155;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: #eff6ff; color: var(--blue); }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(15, 42, 74, .6);
    padding: .75rem 1.15rem 1.1rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; }
  .site-nav a { border-radius: 10px; padding: .7rem .8rem; font-size: 1rem; }
}
@media (min-width: 961px) { .nav-toggle { display: none; } }

/* ---------------- Buttons / chips ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .72rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -12px rgba(29, 78, 216, .9); }
.btn-primary:hover { background: #1e40af; color: #fff; }
.btn-amber { background: var(--amber); color: #1f2937; }
.btn-amber:hover { background: #d97706; color: #1f2937; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: #b6c8e3; color: var(--navy); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .38); }
.btn-light:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-sm { padding: .5rem .9rem; font-size: .87rem; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #eef5ff; color: #153e75;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  padding: .32rem .72rem;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
a.chip:hover { background: #dbeafe; color: var(--navy); }
.chip-amber { background: var(--amber-100); border-color: #fcd34d; color: #78350f; }
.chip-green { background: var(--green-100); border-color: #a7f3d0; color: #065f46; }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }

.badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 6px;
  background: #eef5ff;
  color: #1e40af;
  white-space: nowrap;
}
.badge-amber { background: var(--amber-100); color: #92400e; }
.badge-green { background: var(--green-100); color: #065f46; }

/* ---------------- Cards & grids ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c5d6ee; }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, #2f6fc4 0%, rgba(47, 111, 196, 0) 60%), linear-gradient(140deg, #0b2447 0%, #123a6b 55%, #1d4ed8 140%);
}
.hero::after {
  content: "∑  π  √  θ  ∞  ∫";
  position: absolute;
  right: -1.5rem;
  bottom: -2.2rem;
  font-size: clamp(2rem, 7vw, 4.6rem);
  letter-spacing: .7rem;
  color: rgba(255, 255, 255, .06);
  pointer-events: none;
  white-space: nowrap;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr .9fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 3.2rem;
}
.hero h1 { color: #fff; margin-bottom: .6rem; }
.hero h1 .accent { color: #fcd34d; display: block; font-size: .62em; margin-top: .18rem; }
.hero p { color: #dbeafe; font-size: 1.06rem; max-width: 46ch; }
.hero .eyebrow { color: #fcd34d; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.hero-photo {
  justify-self: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: .55rem;
  border-radius: 24px;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6);
}
.hero-photo img { width: 225px; height: 225px; object-fit: cover; border-radius: 18px; }
.hero-photo figcaption { color: #dbeafe; font-size: .76rem; text-align: center; padding-top: .45rem; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; padding: 2.2rem 0 2.4rem; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero .chip-row { justify-content: center; }
  .hero-photo { order: -1; }
  .hero-photo img { width: 150px; height: 150px; }
}
.page-hero {
  background: linear-gradient(135deg, #0b2447 0%, #123a6b 60%, #1e4e8c 100%);
  color: #fff;
  padding: 2.6rem 0 2.4rem;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: #dbeafe; max-width: 62ch; margin-bottom: 0; }
.page-hero .chip { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------------- Trust strip ---------------- */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-strip ul {
  list-style: none; margin: 0; padding: .9rem 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.9rem;
  font-size: .86rem; color: var(--muted); font-weight: 600;
}
.trust-strip li { display: flex; align-items: center; gap: .4rem; margin: 0; }
.trust-strip svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* ---------------- Feature / chapter cards ---------------- */
.feature { display: flex; flex-direction: column; gap: .35rem; }
.feature .icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: #eaf2ff; color: var(--blue);
  font-size: 1.25rem; margin-bottom: .35rem;
}
.feature h3 { margin: 0; font-size: 1.08rem; }
.feature p { margin: 0; font-size: .93rem; color: var(--muted); }
.feature a.stretch { font-weight: 700; font-size: .9rem; text-decoration: none; margin-top: .35rem; }

.class-card { position: relative; overflow: hidden; }
.class-card .num {
  position: absolute; right: .6rem; top: -.35rem;
  font-size: 4.2rem; font-weight: 900; color: #eef4fd; line-height: 1; pointer-events: none;
}
.class-card h3 { position: relative; }
.class-card .num { z-index: 0; }
.class-card .badge { position: relative; z-index: 1; }
.class-card ul { position: relative; font-size: .92rem; color: var(--muted); }

/* ---------------- Notes layout ---------------- */
.notes-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 2rem 0 3rem;
}
.notes-side {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}
.notes-side h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 .6rem; }
.notes-side ol { list-style: none; margin: 0; padding: 0; counter-reset: ch; font-size: .88rem; }
.notes-side li { margin: 0; counter-increment: ch; }
.notes-side a {
  display: flex; gap: .55rem; align-items: baseline;
  padding: .38rem .45rem; border-radius: 8px;
  color: #334155; text-decoration: none; line-height: 1.35;
}
.notes-side a::before { content: counter(ch, decimal-leading-zero); font-variant-numeric: tabular-nums; color: #9aa9c0; font-weight: 700; font-size: .74rem; }
.notes-side a:hover { background: #f1f6fd; color: var(--blue); }
.notes-side .side-cta { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line-soft); font-size: .85rem; }
.notes-main { min-width: 0; }
@media (max-width: 900px) {
  .notes-layout { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 1.2rem; }
  .notes-side { position: static; max-height: none; }
  .notes-side ol { columns: 2; column-gap: 1rem; }
}
@media (max-width: 520px) { .notes-side ol { columns: 1; } }

.article-title { margin-bottom: .35rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; font-size: .82rem; color: var(--muted-2); margin-bottom: 1.4rem; }
.article-meta span { display: inline-flex; align-items: center; gap: .3rem; }

.chapter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 90px;
}
.chapter-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .7rem; }
.chapter-num {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--navy); color: #fcd34d;
  font-weight: 800; font-size: .95rem;
  font-variant-numeric: tabular-nums;
}
.chapter-head h2 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.45rem); flex: 1 1 auto; }
.chapter h3 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--blue); margin: 1.25rem 0 .45rem;
}
.chapter ul { margin-bottom: 0; }
.chapter li { font-size: .96rem; }
.chapter .lead { font-size: 1rem; }

/* formula tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: #fff;
}
caption { caption-side: top; text-align: left; font-size: .82rem; color: var(--muted-2); padding-bottom: .4rem; }
th, td { padding: .6rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th { background: #f2f7fe; color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #cfe0f7; }
tbody tr:last-child td { border-bottom: none; }
.formula { font-family: var(--mono); font-size: .88rem; color: #0f2a4a; background: #f6f9fe; border-radius: 4px; padding: .05rem .3rem; white-space: nowrap; }
.formula-wrap { white-space: normal; }
td .formula { white-space: normal; display: inline-block; margin: .1rem 0; overflow-wrap: anywhere; }

/* callouts */
.callout {
  border-left: 4px solid var(--blue);
  background: #eef5ff;
  border-radius: 0 10px 10px 0;
  padding: .8rem 1rem;
  font-size: .94rem;
  margin: 1rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout strong { color: inherit; }
.callout-tip { border-color: var(--green); background: #ecfdf5; color: #064e3b; }
.callout-warn { border-color: var(--amber); background: #fffbeb; color: #78350f; }
.callout-mistake { border-color: var(--red); background: #fef2f2; color: #7f1d1d; }
.callout-info { border-color: var(--navy-700); background: #eff6ff; color: #1e3a8a; }

/* accordion (native details) */
.accordion { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.accordion + .accordion { margin-top: .7rem; }
.accordion summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-size: 1.35rem; font-weight: 700; color: var(--blue);
  transition: transform .2s ease;
  flex: none;
}
.accordion[open] summary::after { content: "−"; }
.accordion summary:hover { background: #f7faff; }
.accordion .acc-body { padding: 0 1.2rem 1.15rem; font-size: .96rem; color: var(--muted); }
.accordion .acc-body > :last-child { margin-bottom: 0; }
.accordion .acc-body h3 { color: var(--navy); font-size: 1rem; margin: 1rem 0 .3rem; }

/* search */
.search-box { position: relative; margin: 0 0 1.2rem; }
.search-box svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted-2); }
.search-box input {
  width: 100%;
  font: inherit;
  font-size: .97rem;
  padding: .8rem 1rem .8rem 2.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.search-box input:focus { outline: 3px solid #bfdbfe; outline-offset: 0; border-color: #93c5fd; }
.search-empty { padding: .9rem 0; color: var(--muted); font-size: .95rem; }

/* chapter list (library) */
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li {
  display: flex; align-items: center; gap: .8rem;
  padding: .62rem .3rem;
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.chapter-list li:last-child { border-bottom: none; }
.chapter-list .idx {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: #eef4fd; color: var(--blue);
  font-size: .76rem; font-weight: 800;
}
.chapter-list a { font-weight: 600; text-decoration: none; color: var(--navy); }
.chapter-list a:hover { color: var(--blue); text-decoration: underline; }
.chapter-list .marks { margin-left: auto; font-size: .76rem; color: var(--muted-2); white-space: nowrap; }

/* tag cloud / popular searches */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-cloud a {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .72rem;
  font-size: .83rem;
  color: #334155;
  text-decoration: none;
}
.tag-cloud a:hover { border-color: #93c5fd; color: var(--blue); background: #f5f9ff; }

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .1rem;
  width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--navy); color: #fcd34d;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 800;
}
.steps h3 { margin: 0 0 .15rem; font-size: 1rem; }
.steps p { margin: 0; font-size: .94rem; color: var(--muted); }

/* table of contents (in-article) */
.toc {
  background: #f8fbff;
  border: 1px solid #dbe8f8;
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 0 0 1.4rem;
  font-size: .93rem;
}
.toc h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2); margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.1rem; columns: 2; column-gap: 1.5rem; }
.toc li { margin-bottom: .25rem; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* article prose blocks */
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4rem; }
.prose ul, .prose ol { color: var(--muted); }
.prose table { font-size: .92rem; }

/* author / trust box */
.author-box {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #f8fbff;
  border: 1px solid #dbe8f8;
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  font-size: .92rem;
  color: var(--muted);
}
.author-box img, .author-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fcd34d; font-weight: 800;
}
.author-box strong { display: block; color: var(--navy); font-size: .96rem; }
.author-box p { margin: .15rem 0 0; }

/* newsletter / cta band */
.cta-band {
  background: linear-gradient(135deg, #0b2447, #1b4373 65%, #1d4ed8);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.cta-band h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.3rem; }
.cta-band p { color: #dbeafe; margin: 0; font-size: .95rem; }

/* footer */
.site-footer { background: var(--navy); color: #c7d6ea; margin-top: 3rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.8rem;
  padding: 2.6rem 0 1.6rem;
}
.site-footer h2 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .7rem; }
.site-footer p { font-size: .9rem; color: #b6c8e0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #c7d6ea; text-decoration: none; }
.site-footer a:hover { color: #fcd34d; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; color: #fff; font-weight: 800; font-size: 1.05rem; }
.footer-brand img { width: 36px; height: 36px; border-radius: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .13);
  padding: 1.1rem 0 1.5rem;
  font-size: .8rem;
  color: #9fb4cf;
  display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between; align-items: center;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }

/* cookie notice */
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 200;
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 50px -20px rgba(15, 42, 74, .5);
  padding: 1rem 1.1rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center;
  font-size: .87rem; color: var(--muted);
}
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-banner .cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie-banner.hidden { display: none; }

/* misc */
.divider { height: 1px; background: var(--line); border: 0; margin: 2rem 0; }
.list-check { list-style: none; padding: 0; }
.list-check li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.list-check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 800;
}
.list-x { list-style: none; padding: 0; }
.list-x li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.list-x li::before {
  content: "✕"; position: absolute; left: 0; top: 0;
  color: var(--red); font-weight: 800; font-size: .85rem;
}
.link-grid { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .92rem; }
.print-btn { display: inline-flex; }
.pill-note { font-size: .82rem; color: var(--muted-2); }
.nowrap { white-space: nowrap; }

/* responsive tweaks */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .class-card .num { font-size: 3.2rem; }
  .section { padding: 2.2rem 0; }
  .chapter { padding: 1.15rem; }
  .card { padding: 1.15rem; }
  .hero-photo img { width: 128px; height: 128px; }
  .cta-band { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .card-hover:hover { transform: none; }
}


/* ---------------- small utilities ---------------- */
.breadcrumb { font-size: .8rem; margin-bottom: .6rem; color: #bfdbfe; }
.breadcrumb a { color: #bfdbfe; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: #e2e8f0; }
.meta-light { color: #bfdbfe; }
.align-start { align-items: start; }
.align-center { align-items: center; }
.card-link { text-decoration: none; }
.flex-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.flex-actions-center { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.lead-lg { font-size: 1.15rem; }
.profile-photo { border-radius: 14px; margin-bottom: 1rem; max-width: 225px; }
.bg-soft { background: #f8fbff; }
.prose-narrow { max-width: 78ch; }
.form-field {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  margin-top: .3rem;
}
.form-field:focus { outline: 3px solid #bfdbfe; border-color: #93c5fd; }
label { font-size: .95rem; color: var(--navy); }

/* ---------------- print / save as PDF ---------------- */
@media print {
  body { background: #fff; font-size: 11.5pt; color: #000; }
  .site-header, .site-nav, .site-footer, .cookie-banner, .hero, .page-hero,
  .no-print, .notes-side, .cta-band, .search-box, .trust-strip { display: none !important; }
  .notes-layout { display: block; padding: 0; }
  .wrap, .wrap-narrow { max-width: none; padding: 0; }
  .chapter, .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; page-break-inside: avoid; }
  .chapter { margin-bottom: 10pt; }
  h1, h2, h3 { color: #000; break-after: avoid; }
  a { color: #000; text-decoration: none; }
  .formula { background: none; }
  thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
.print-title { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.25; margin: 0 0 1rem; }
