/* ─────────────────────────────────────────────────────────────────────────
   Theta Notes — Shared Stylesheet
   Brand: Navy #042C53 · Royal #185FA5 · Sky #85B7EB · Cream #F1EFE8
   ───────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ════════════════════════════════════════════════════
   ANIMATIONS & KEYFRAMES
════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

/* ── Page entrance (body fades in on load) ── */
body { opacity: 0; transition: opacity .25s ease; }
body.loaded { opacity: 1; }

/* ── Hero entrance stagger ── */
.hero-phase   { animation: fadeUp .5s .05s ease both; }
.hero-badge   { animation: fadeUp .5s .12s ease both; }
.hero h1      { animation: fadeUp .55s .2s ease both; }
.hero .hook   { animation: fadeUp .5s .32s ease both; }
.hero-meta    { animation: fadeUp .5s .42s ease both; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s cubic-bezier(.4,0,.2,1),
              transform .55s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card stagger (set via JS --i custom property) ── */
.cards-grid .concept-card {
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ── Topnav shadow on scroll ── */
.topnav {
  transition: box-shadow .25s ease, background .25s ease;
}
.topnav.scrolled {
  box-shadow: 0 2px 12px rgba(4,44,83,.1);
  background: rgba(247,245,238,.98);
}

/* ── Sidebar item ── */
.sb-item {
  transition: background var(--ease), color var(--ease),
              padding-left var(--ease);
}
.sb-item:hover { padding-left: 26px; }
.sb-item.active { padding-left: 24px; }

/* ── Concept card — lift + stripe ── */
.concept-card {
  transition: border-color var(--ease), box-shadow var(--ease),
              transform .25s cubic-bezier(.34,1.56,.64,1);
}

/* ── Detail header icon spin hint ── */
.detail-header:hover .dh-icon {
  transform: scale(1.06);
  transition: transform .2s ease;
}

/* ── Quiz card ── */
.quiz-card {
  transition: border-color var(--ease), box-shadow var(--ease),
              transform .2s ease;
}
.quiz-card:hover { transform: translateY(-1px); }

/* ── Next banner button bounce ── */
.next-btn {
  transition: background var(--ease), box-shadow var(--ease),
              transform .2s cubic-bezier(.34,1.56,.64,1);
}
.next-btn:hover { transform: translateX(3px); }

/* ── Cheat sheet row ── */
.cs-row { transition: background var(--ease), padding-left .2s ease; }
.cs-row:hover { padding-left: 26px; }

/* ── Index card ── */
.idx-card {
  transition: border-color var(--ease), box-shadow var(--ease),
              transform .25s cubic-bezier(.34,1.56,.64,1);
}

/* ── Page-exit fade (applied by JS before navigation) ── */
body.exiting { opacity: 0 !important; transition: opacity .18s ease !important; }

/* respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  body { opacity: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Brand tokens ── */
:root {
  --navy:     #042C53;
  --royal:    #185FA5;
  --sky:      #85B7EB;
  --cream:    #F1EFE8;
  --charcoal: #2C2C2A;

  --navy-90:  #0a3664;
  --navy-80:  #0e3f72;
  --royal-10: #e8f0f9;
  --sky-20:   #daeaf7;
  --cream-80: #e8e6df;

  --text:   var(--charcoal);
  --muted:  #6b6b69;
  --border: #e2e0d9;
  --bg:     #f7f5ee;
  --white:  #ffffff;

  --green:    #1a7a4a;  --green-bg:  #eaf6f0;
  --amber:    #b45309;  --amber-bg:  #fef3e2;
  --teal:     #0e7490;  --teal-bg:   #e0f2f9;

  --sb-hov:  #072f5a;
  --sb-text: #a8c4e0;
  --sb-muted:#5a8ab0;

  --radius:    10px;
  --radius-sm:  6px;
  --shadow:    0 1px 3px rgba(4,44,83,.08), 0 4px 12px rgba(4,44,83,.06);
  --shadow-md: 0 4px 16px rgba(4,44,83,.12), 0 1px 4px rgba(4,44,83,.08);
  --ease: .2s cubic-bezier(.4,0,.2,1);

  /* ── Typography ── */
  --font-sans:    'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif:   Georgia, 'Times New Roman', serif;
}

/* ── Base ── */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Global heading font ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -.02em;
}

/* ── Progress bar ── */
#progress {
  position: fixed; top: 0; left: 272px; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--royal), var(--sky));
  transform-origin: left; transform: scaleX(0);
  z-index: 300; transition: transform .06s linear;
}

/* ════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════ */
.sidebar {
  width: 272px; min-width: 272px;
  background: var(--navy);
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-80) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--navy-80); border-radius: 2px; }

.sb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px;
  background: linear-gradient(135deg, var(--navy-90), var(--navy));
  text-decoration: none;
  border-bottom: 1px solid rgba(133,183,235,.12);
  transition: var(--ease);
}
.sb-brand:hover { background: var(--navy-80); }
.sb-theta {
  font-family: var(--font-serif);
  font-size: 28px; color: var(--sky); line-height: 1;
  background: rgba(133,183,235,.12);
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sb-wordmark .name {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--white); line-height: 1; margin-bottom: 4px;
}
.sb-wordmark .tagline {
  font-family: var(--font-sans);
  font-size: 10px; color: var(--sb-muted);
  letter-spacing: .3px; font-style: italic;
}

.sb-home {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  color: var(--sb-muted); font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: var(--ease);
}
.sb-home:hover { color: var(--sky); background: rgba(133,183,235,.06); }

.sb-phase {
  padding: 16px 18px 5px;
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.8px;
  color: var(--sb-muted);
  display: flex; align-items: center; gap: 6px;
}
.sb-phase .ph-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.sb-item {
  display: flex; align-items: center;
  padding: 7px 18px 7px 22px;
  color: var(--sb-text); font-size: 12px;
  font-family: var(--font-sans);
  text-decoration: none;
  transition: var(--ease); position: relative;
}
.sb-item:hover { background: var(--sb-hov); color: var(--white); }
.sb-item.active { background: var(--royal); color: var(--white); font-weight: 600; }
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--sky); border-radius: 0 2px 2px 0;
}
.sb-item .wnum {
  font-size: 10px; opacity: .55; min-width: 22px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.sb-item.active .wnum { opacity: .7; }
.sb-item .wtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-divider { height: 1px; background: rgba(255,255,255,.05); margin: 4px 0; }

/* ════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════ */
.main {
  margin-left: 272px; flex: 1;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* Topnav */
.topnav {
  background: rgba(247,245,238,.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px; height: 48px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
  position: sticky; top: 0; z-index: 50;
}
.topnav a { color: var(--royal); text-decoration: none; font-weight: 500; transition: var(--ease); }
.topnav a:hover { color: var(--navy); text-decoration: underline; }
.topnav .sep { color: var(--border); font-size: 16px; }
.topnav .current { color: var(--charcoal); font-weight: 600; }

/* Hero */
.hero {
  background: var(--navy);
  padding: 56px 40px 52px;
  color: var(--white); position: relative; overflow: hidden;
}
.hero::after {
  content: "θ"; position: absolute; right: -10px; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  font-family: var(--font-serif); font-size: 220px; line-height: 1;
  color: var(--royal); opacity: .12; pointer-events: none; user-select: none;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 0% 50%, rgba(24,95,165,.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 90% 20%, rgba(133,183,235,.10) 0%, transparent 60%);
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; }
.hero-phase {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--sky); margin-bottom: 14px;
}
.hero-phase .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sky); flex-shrink: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(133,183,235,.15); border: 1px solid rgba(133,183,235,.25);
  border-radius: 4px; padding: 4px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--sky); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 800; line-height: 1.1;
  color: var(--white); margin-bottom: 16px; letter-spacing: -.04em;
}
.hero h1 .accent { color: var(--sky); }
.hero .hook {
  font-family: var(--font-serif);
  font-size: 16px; color: rgba(255,255,255,.72); line-height: 1.65; margin-bottom: 28px;
  font-style: italic;
  border-left: 3px solid var(--royal); padding-left: 16px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px; padding: 5px 12px; font-size: 12px; color: rgba(255,255,255,.75);
  transition: var(--ease);
}
.chip:hover { background: rgba(255,255,255,.12); }

/* Page body grid */
.page-body { flex: 1; display: grid; grid-template-columns: 1fr 220px; align-items: start; }
.content { padding: 40px; min-width: 0; }

/* TOC */
.toc {
  position: sticky; top: 56px; padding: 28px 28px 28px 0;
  height: fit-content; max-height: calc(100vh - 56px); overflow-y: auto;
}
.toc-inner {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.toc-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.toc a {
  display: block; font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 5px 0 5px 10px; border-left: 2px solid transparent; transition: var(--ease); line-height: 1.4;
}
.toc a:hover { color: var(--royal); border-left-color: var(--sky); }
.toc a.toc-active { color: var(--royal); border-left-color: var(--royal); font-weight: 600; }
.toc-sub { padding-left: 20px !important; font-size: 11px !important; }

/* Section titles */
.sec-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--navy);
  margin: 52px 0 8px; display: flex; align-items: center; gap: 10px;
  letter-spacing: -.03em;
}
.sec-title:first-child { margin-top: 0; }
.sec-icon {
  font-size: 18px; background: var(--royal-10);
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sec-rule {
  height: 2px; background: linear-gradient(90deg, var(--royal), var(--sky) 60%, transparent);
  border-radius: 2px; margin: 4px 0 20px;
}
.sec-desc {
  font-family: var(--font-sans);
  color: var(--muted); font-size: 14px; margin-bottom: 28px;
  line-height: 1.7; font-weight: 400;
}

/* ════════════════════════════════════════════════════
   CONCEPT CARDS
════════════════════════════════════════════════════ */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 48px;
}
.concept-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  text-decoration: none; color: inherit; display: block;
  transition: var(--ease); position: relative; overflow: hidden;
}
.concept-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--royal), var(--sky)); opacity: 0; transition: var(--ease);
}
.concept-card:hover { border-color: var(--sky); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.concept-card:hover::after { opacity: 1; }
.card-icon {
  width: 52px; height: 52px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px;
  background: var(--royal-10); border: 1px solid rgba(24,95,165,.10);
}
.card-icon.navy-tint  { background: rgba(4,44,83,.06);  border-color: rgba(4,44,83,.10); }
.card-icon.sky-tint   { background: var(--sky-20);       border-color: rgba(133,183,235,.25); }
.card-icon.cream-tint { background: var(--cream);         border-color: var(--cream-80); }
.card-icon.green-tint { background: var(--green-bg);      border-color: rgba(26,122,74,.15); }
.card-icon.amber-tint { background: var(--amber-bg);      border-color: rgba(180,83,9,.15); }
.concept-card h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--navy);
  margin-bottom: 8px; line-height: 1.25; letter-spacing: -.02em;
}
.concept-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; letter-spacing: .2px; }
.tag-royal { background: var(--royal-10); color: var(--royal); }
.tag-navy  { background: rgba(4,44,83,.07); color: var(--navy); }
.tag-sky   { background: var(--sky-20); color: #0e5fa5; }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-teal  { background: var(--teal-bg);  color: var(--teal); }

/* ════════════════════════════════════════════════════
   DETAIL ACCORDION BLOCKS
════════════════════════════════════════════════════ */
.detail-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px;
  overflow: hidden; box-shadow: var(--shadow);
}
.detail-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; background: var(--navy);
  cursor: pointer; user-select: none; transition: var(--ease);
}
.detail-header:hover { background: var(--navy-90); }
.dh-icon {
  font-size: 26px; background: rgba(133,183,235,.15);
  width: 48px; height: 48px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dh-text { flex: 1; }
.dh-text h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; color: var(--white);
  margin-bottom: 3px; letter-spacing: -.02em;
}
.dh-text .dh-sub {
  font-family: var(--font-sans);
  font-size: 12px; color: var(--sky); opacity: .85; line-height: 1.4;
}
.dh-toggle { color: var(--sky); font-size: 18px; transition: transform var(--ease); flex-shrink: 0; }
.detail-block.open .dh-toggle { transform: rotate(180deg); }

.detail-body {
  padding: 0; max-height: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .3s ease;
}
.detail-block.open .detail-body { max-height: 2400px; padding: 24px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.dg-block {
  border-radius: var(--radius-sm); padding: 14px 16px;
  border: 1px solid var(--border); background: var(--bg);
}
.dg-block h4 {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 8px; color: var(--muted);
}
.dg-block p, .dg-block li {
  font-family: var(--font-sans);
  font-size: 13px; line-height: 1.65; color: var(--text);
}
.dg-block ul { padding-left: 16px; }
.dg-block li { margin-bottom: 4px; }
.dg-block.type-when { border-left: 3px solid var(--royal); }
.dg-block.type-real  { border-left: 3px solid var(--sky); }
.dg-block.type-pro   { border-left: 3px solid var(--green); }
.dg-block.type-con   { border-left: 3px solid var(--amber); }

.diagram {
  background: var(--navy); color: #a8c8e8;
  font-family: var(--font-mono);
  font-size: 12.5px; padding: 20px 22px; border-radius: var(--radius-sm);
  overflow-x: auto; line-height: 1.85; white-space: pre;
  border: 1px solid rgba(133,183,235,.12);
  font-feature-settings: 'liga' 1, 'calt' 1;
}

/* ════════════════════════════════════════════════════
   INFO BOXES
════════════════════════════════════════════════════ */
.info-box {
  border-radius: var(--radius-sm); padding: 15px 18px;
  margin: 20px 0; display: flex; gap: 12px; align-items: flex-start;
}
.info-box .ib-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.info-box h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.info-box p, .info-box li { font-size: 13px; line-height: 1.6; }
.info-box ul { padding-left: 16px; }
.info-box li { margin-bottom: 3px; }
.ib-note   { background: var(--royal-10);             border-left: 4px solid var(--royal); }
.ib-tip    { background: var(--green-bg);              border-left: 4px solid var(--green); }
.ib-warn   { background: var(--amber-bg);              border-left: 4px solid var(--amber); }
.ib-key    { background: rgba(4,44,83,.05);            border-left: 4px solid var(--navy);  }

/* ════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════ */
.table-wrap {
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); margin: 16px 0 32px; box-shadow: var(--shadow);
}
table.brand-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--white); }
.brand-table thead tr { background: var(--navy); }
.brand-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--sky);
}
.brand-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.brand-table tbody tr:last-child td { border-bottom: none; }
.brand-table tbody tr:hover { background: rgba(133,183,235,.05); }
.brand-table td:first-child { font-weight: 600; color: var(--navy); }

/* ════════════════════════════════════════════════════
   CHEAT SHEET
════════════════════════════════════════════════════ */
.cheatsheet {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 32px;
}
.cs-header {
  background: var(--navy); padding: 16px 24px;
  display: flex; align-items: center; gap: 10px; color: var(--white);
}
.cs-header .theta { font-family: var(--font-serif); font-size: 22px; color: var(--sky); }
.cs-header .title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.cs-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 13px 24px; border-bottom: 1px solid var(--border); transition: var(--ease);
}
.cs-row:last-child { border-bottom: none; }
.cs-row:hover { background: rgba(133,183,235,.04); }
.cs-key {
  font-family: var(--font-display);
  min-width: 180px; font-weight: 600; font-size: 13px;
  color: var(--navy); flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  letter-spacing: -.01em;
}
.cs-key .bullet { width: 6px; height: 6px; border-radius: 50%; background: var(--royal); flex-shrink: 0; }
.cs-val { font-size: 13px; color: var(--muted); line-height: 1.65; }
.cs-val strong { color: var(--text); font-weight: 600; }

/* ════════════════════════════════════════════════════
   KEY POINTS
════════════════════════════════════════════════════ */
.keypoints {
  background: var(--navy); border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 32px; position: relative; overflow: hidden;
}
.keypoints::before {
  content: "θ"; position: absolute; right: -10px; bottom: -20px;
  font-family: var(--font-serif); font-size: 120px;
  color: rgba(133,183,235,.06); line-height: 1; pointer-events: none;
}
.kp-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(133,183,235,.15);
}
.kp-theta { font-family: var(--font-serif); font-size: 24px; color: var(--sky); }
.kp-header .kp-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: -.02em;
}
.kp-header .kp-sub {
  font-family: var(--font-sans);
  font-size: 11px; color: var(--sb-muted); margin-top: 2px;
}
.kp-list { list-style: none; padding: 0; }
.kp-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(133,183,235,.08);
  font-family: var(--font-sans);
  font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.7;
}
.kp-list li:last-child { border-bottom: none; padding-bottom: 0; }
.kp-bullet {
  width: 20px; height: 20px; background: rgba(133,183,235,.12);
  border: 1px solid rgba(133,183,235,.2); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; font-size: 9px; color: var(--sky); font-weight: 700;
}

/* ════════════════════════════════════════════════════
   QUIZ
════════════════════════════════════════════════════ */
.quiz-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px;
  overflow: hidden; transition: var(--ease); box-shadow: var(--shadow);
}
.quiz-card:hover { border-color: var(--sky); }
.quiz-inner { padding: 22px 24px; }
.quiz-num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.quiz-badge {
  width: 28px; height: 28px; background: var(--navy); color: var(--sky);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.quiz-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.quiz-q {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; color: var(--navy);
  margin-bottom: 14px; line-height: 1.45; letter-spacing: -.01em;
}
.quiz-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--royal-10); border: 1px solid rgba(24,95,165,.15);
  color: var(--royal); font-size: 12px; font-weight: 700;
  padding: 7px 16px; border-radius: 6px; cursor: pointer; transition: var(--ease);
}
.quiz-btn:hover { background: var(--royal); color: var(--white); }
.quiz-answer { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1); }
.quiz-answer.show { max-height: 800px; }
.quiz-answer-inner {
  padding: 16px 24px; background: rgba(133,183,235,.08);
  border-top: 1px solid rgba(24,95,165,.1);
  font-family: var(--font-sans);
  font-size: 13.5px; line-height: 1.75; color: var(--text);
}
.quiz-answer-inner strong { color: var(--navy); font-weight: 600; }

/* ════════════════════════════════════════════════════
   NEXT WEEK BANNER
════════════════════════════════════════════════════ */
.next-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-90));
  border-radius: var(--radius); padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 40px;
  border: 1px solid rgba(133,183,235,.12); flex-wrap: wrap;
}
.next-label {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--sky); margin-bottom: 6px;
}
.next-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; color: var(--white); letter-spacing: -.02em;
}
.next-sub {
  font-family: var(--font-sans);
  font-size: 13px; color: rgba(255,255,255,.55); margin-top: 4px; font-style: italic;
}
.next-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--royal); color: var(--white);
  font-size: 13px; font-weight: 700;
  padding: 10px 20px; border-radius: 8px;
  text-decoration: none; transition: var(--ease); white-space: nowrap; flex-shrink: 0;
}
.next-btn:hover { background: #1a6bb7; box-shadow: 0 4px 12px rgba(24,95,165,.4); }

/* ════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════ */
.page-footer {
  padding: 28px 40px; border-top: 1px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-theta { font-family: var(--font-serif); font-size: 22px; color: var(--navy); }
.footer-text .fn {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--navy);
}
.footer-text .fs {
  font-family: var(--font-sans);
  font-size: 10px; color: var(--muted); font-style: italic; margin-top: 2px;
}
.footer-meta { font-size: 12px; color: var(--muted); text-align: center; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a {
  font-size: 13px; font-weight: 600; color: var(--royal);
  text-decoration: none; transition: var(--ease);
}
.footer-nav a:hover { color: var(--navy); }

/* ════════════════════════════════════════════════════
   INDEX PAGE
════════════════════════════════════════════════════ */
.idx-hero {
  background: var(--navy); padding: 64px 40px;
  color: var(--white); position: relative; overflow: hidden;
}
.idx-hero::after {
  content: "θ"; position: absolute; right: 40px; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  font-family: var(--font-serif); font-size: 260px; line-height: 1;
  color: var(--royal); opacity: .10; pointer-events: none;
}
.idx-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(24,95,165,.3) 0%, transparent 70%);
}
.idx-inner { position: relative; z-index: 1; max-width: 680px; }
.idx-theta { font-family: var(--font-serif); font-size: 52px; color: var(--sky); line-height: 1; margin-bottom: 16px; display: inline-block; }
.idx-hero h1 {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 800; line-height: 1.1;
  letter-spacing: -.04em; margin-bottom: 14px;
}
.idx-hero h1 .accent { color: var(--sky); }
.idx-hero p {
  font-family: var(--font-sans);
  font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.7;
  max-width: 520px; margin-bottom: 24px;
}
.idx-stats { display: flex; flex-wrap: wrap; gap: 8px; }

.idx-body { padding: 40px; max-width: 1100px; }
.ph-block { margin-bottom: 44px; }
.ph-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid currentColor; display: inline-block;
}
.idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.idx-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: inherit; display: block;
  transition: var(--ease); position: relative; overflow: hidden;
}
.idx-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  opacity: 0; transition: var(--ease);
}
.idx-card:hover { border-color: var(--sky); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.idx-card:hover::before { opacity: 1; }
.wk-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.wk-num {
  width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0;
}
.idx-card h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700; color: var(--navy);
  margin-bottom: 6px; line-height: 1.25; letter-spacing: -.02em;
}
.idx-card .hook-text {
  font-family: var(--font-sans);
  font-size: 12px; color: var(--muted); line-height: 1.55;
}
.idx-card .meta { font-size: 11px; color: var(--muted); margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .page-body { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-272px); transition: transform var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  #progress { left: 0; }
  .hero h1 { font-size: 28px; }
  .content { padding: 28px 20px; }
  .topnav { padding: 0 20px; }
  .mob-menu-btn { display: flex; }
}
@media (max-width: 600px) {
  .hero { padding: 36px 20px 32px; }
  .cards-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .cs-key { min-width: 130px; }
  .page-footer { padding: 20px; }
  .idx-hero { padding: 40px 20px; }
  .idx-body { padding: 24px 20px; }
}

/* Mobile menu button */
.mob-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--royal-10); border: none; cursor: pointer;
  color: var(--royal); font-size: 18px; margin-right: 8px;
  transition: var(--ease); flex-shrink: 0;
}
.mob-menu-btn:hover { background: var(--royal); color: var(--white); }
.mob-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(4,44,83,.5); z-index: 99;
}
.mob-overlay.show { display: block; }
