/* ============================================
   SEOSchoolPro — Editorial-grade stylesheet
   Built for clarity and craft.
   ============================================ */

:root {
  /* Editorial color system — restrained, deliberate */
  --ink: #0a0a0a;
  --ink-2: #1f2024;
  --ink-3: #3d4047;
  --ink-4: #6b6f76;
  --ink-5: #9a9ea6;
  --paper: #ffffff;
  --paper-2: #fafaf8;
  --paper-3: #f3f3ef;
  --rule: #e8e8e3;
  --rule-strong: #d4d4cd;

  /* Single distinctive accent — not the typical SaaS blue */
  --accent: #d24b1f;
  --accent-soft: #fef0e9;
  --accent-deep: #a93812;

  /* Functional colors — muted, editorial */
  --positive: #1f7a3e;
  --positive-soft: #ebf5ee;
  --caution: #b8761e;
  --caution-soft: #fbf3e3;
  --negative: #b8341e;
  --negative-soft: #fbeae6;

  /* Typography — serif headings + clean sans */
  --serif: 'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;

  --container: 1180px;
  --container-narrow: 720px;

  --r-sm: 4px;
  --r: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow: 0 2px 8px rgba(10, 10, 10, 0.05), 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(10, 10, 10, 0.12);

  --t: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --ink: #f5f5f0;
  --ink-2: #e2e2dc;
  --ink-3: #b5b5af;
  --ink-4: #8a8a85;
  --ink-5: #6a6a65;
  --paper: #0e0e10;
  --paper-2: #161618;
  --paper-3: #1d1d20;
  --rule: #2a2a2d;
  --rule-strong: #3a3a3e;
  --accent: #ff6b3d;
  --accent-soft: #2a1810;
  --accent-deep: #ffa37a;
  --positive-soft: #0d2018;
  --caution-soft: #251c0d;
  --negative-soft: #2a120c;
}

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

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

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  font-feature-settings: "kern", "liga", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-slow), color var(--t-slow);
}

::selection { background: var(--accent); color: var(--paper); }

img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

code, pre {
  font-family: var(--mono);
  font-size: 0.9em;
  font-feature-settings: "calt" 0;
}

/* Typography — editorial scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1.15;
  font-feature-settings: "ss01", "ss02";
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500; }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.18rem; font-weight: 600; font-family: var(--sans); letter-spacing: -0.01em; }
h5 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--sans); color: var(--ink-4); }

p { color: var(--ink-3); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.75rem; }

/* ============================================
   NAVIGATION — clean, editorial
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}
[data-theme="dark"] .nav { background: rgba(14, 14, 16, 0.8); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
}
[data-theme="dark"] .logo-mark { background: var(--paper); color: var(--ink); }

.nav-links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.nav-link {
  color: var(--ink-3);
  font-size: 0.94rem;
  font-weight: 450;
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--ink);
  font-weight: 500;
}
/* Active underline removed — was conflicting with mega-menu dropdown arrow.
   Active state now indicated by text color + weight only. */

.nav-actions { display: flex; gap: 0.4rem; align-items: center; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: color var(--t), background var(--t);
}
.theme-toggle:hover { background: var(--paper-3); color: var(--ink); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  align-items: center;
  justify-content: center;
}

/* Buttons — sharper, more editorial */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--r);
  font-weight: 500;
  font-size: 0.94rem;
  transition: all var(--t);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--ink-2);
  color: var(--paper);
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-primary { background: var(--paper); color: var(--ink); }
[data-theme="dark"] .btn-primary:hover { background: var(--paper-2); color: var(--ink); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.btn-secondary:hover {
  background: var(--paper-3);
  border-color: var(--ink-4);
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: var(--paper);
}
.btn-accent:hover {
  background: var(--accent-deep);
  color: var(--paper);
}

.btn-ghost {
  color: var(--ink-2);
  font-weight: 500;
}
.btn-ghost:hover { color: var(--accent); }

.btn-large { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* ============================================
   HERO — editorial, confident
   ============================================ */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 5rem;
  align-items: start;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin-bottom: 1.5rem;
  letter-spacing: -0.028em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 2.25rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-tags {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--ink-4);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.hero-tags span { display: flex; align-items: center; gap: 0.4rem; }
.hero-tags strong { color: var(--ink); font-weight: 600; }

/* SERP mock — refined */
.hero-visual { position: relative; }

.serp-mock {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.5rem 1.5rem 0.5rem;
  box-shadow: var(--shadow-lg);
  font-family: arial, sans-serif;
}
.serp-mock-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.25rem;
}
.serp-mock-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rule);
}
.serp-mock-dot:first-child { background: #ff5f57; }
.serp-mock-dot:nth-child(2) { background: #febc2e; }
.serp-mock-dot:nth-child(3) { background: #28c840; }
.serp-mock-url {
  flex: 1;
  margin-left: 0.75rem;
  background: var(--paper-3);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-4);
  font-family: var(--sans);
}

.serp-result {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.serp-result:last-child { border: none; }
.serp-result-meta {
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-bottom: 0.3rem;
  font-family: var(--sans);
}
.serp-result-title {
  color: #1a0dab;
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
[data-theme="dark"] .serp-result-title { color: #8ab4f8; }
.serp-result-desc {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.serp-result.featured .serp-result-title { font-weight: 500; }

.position-badge {
  position: absolute;
  top: -14px;
  left: -16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
[data-theme="dark"] .position-badge { background: var(--paper); color: var(--ink); }

/* ============================================
   SECTIONS
   ============================================ */
section { padding: 5.5rem 0; }
section.tight { padding: 4rem 0; }

.section-head {
  margin-bottom: 3.5rem;
  max-width: 720px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-head.center .section-eyebrow { justify-content: center; }
.section-eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  margin-bottom: 1rem;
  letter-spacing: -0.022em;
}
.section-title em { font-style: italic; color: var(--ink-3); font-weight: 400; }

.section-sub {
  font-size: 1.13rem;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 580px;
}
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* ============================================
   CURRICULUM (homepage paths)
   ============================================ */
.curriculum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.curriculum-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 2.25rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background var(--t), transform var(--t);
}
.curriculum-card:hover { background: var(--paper-2); }
.curriculum-card[href]:hover { color: inherit; }

.curriculum-num {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}
.curriculum-tag {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin-bottom: 0.75rem;
}
.curriculum-card h3 {
  margin-bottom: 0.85rem;
  letter-spacing: -0.018em;
  font-weight: 500;
}
.curriculum-card p {
  color: var(--ink-3);
  margin-bottom: 1.5rem;
  flex: 1;
}
.curriculum-meta {
  font-size: 0.85rem;
  color: var(--ink-4);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.curriculum-link {
  font-size: 0.93rem;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--t);
}
.curriculum-card:hover .curriculum-link { gap: 0.65rem; color: var(--accent); }

/* ============================================
   FEATURE LIST (replaces emoji feature grid)
   ============================================ */
.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
}
.principle {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 2.5rem;
}
.principle-num {
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--accent);
}
.principle h4 {
  margin-bottom: 0.55rem;
  letter-spacing: -0.012em;
}
.principle p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}

/* ============================================
   TOOLS LIST
   ============================================ */
.tool-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.tool-list-card {
  padding: 1.75rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: background var(--t);
  background: var(--paper);
}
.tool-list-card:nth-child(3n) { border-right: none; }
.tool-list-card:hover { background: var(--paper-2); color: inherit; }

.tool-list-label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-list-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.tool-list-card h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.012em;
}
.tool-list-card p {
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 1.25rem;
  flex: 1;
}
.tool-list-arrow {
  color: var(--ink-3);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tool-list-card:hover .tool-list-arrow { color: var(--accent); }

/* ============================================
   QUOTE / CALLOUT BLOCK
   ============================================ */
.editorial-quote {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 4rem 0;
  margin: 0;
}
.editorial-quote-text {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 1.5rem;
  max-width: 920px;
}
.editorial-quote-text em {
  color: var(--accent);
  font-style: italic;
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .cta-band {
  background: var(--paper-3);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cta-band h2 {
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.022em;
  margin-bottom: 1rem;
  max-width: 800px;
}
[data-theme="dark"] .cta-band h2 { color: var(--ink); }
.cta-band h2 em { font-style: italic; color: var(--accent); }
.cta-band p {
  color: rgba(245, 245, 240, 0.75);
  font-size: 1.13rem;
  margin-bottom: 2rem;
  max-width: 580px;
}
[data-theme="dark"] .cta-band p { color: var(--ink-3); }

.cta-band .btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.cta-band .btn-primary:hover {
  background: var(--paper-2);
  color: var(--ink);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--rule);
  padding: 4rem 0 2rem;
  background: var(--paper);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-4);
  max-width: 320px;
  line-height: 1.6;
}
.footer-col h5 { margin-bottom: 1.1rem; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col a {
  color: var(--ink-3);
  font-size: 0.93rem;
  transition: color var(--t);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.86rem;
  color: var(--ink-4);
}

/* ============================================
   LESSON LAYOUT
   ============================================ */
.lesson-layout {
  display: grid;
  grid-template-columns: 250px 1fr 220px;
  gap: 3rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 5rem;
}

.sidebar {
  position: sticky;
  top: 88px;
  height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 2px; }

.sidebar h5 { margin: 1.75rem 0 0.85rem; }
.sidebar h5:first-child { margin-top: 0; }
.sidebar ul li { margin-bottom: 0.05rem; }
.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem 0.45rem 0.7rem;
  color: var(--ink-3);
  font-size: 0.92rem;
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all var(--t);
}
.sidebar a:hover { color: var(--ink); }
.sidebar a.current {
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 500;
}
.sidebar a .check {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 9px;
  color: transparent;
}
.sidebar a.completed .check {
  background: var(--positive);
  border-color: var(--positive);
  color: var(--paper);
}

/* Lesson main */
.lesson-main { min-width: 0; }

.lesson-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.breadcrumb {
  display: flex;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: var(--ink-4);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--rule-strong); }

.lesson-title h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  font-weight: 400;
  line-height: 1.1;
}
.lesson-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-4);
  font-family: var(--mono);
  font-feature-settings: "calt" 0;
}
.lesson-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lesson-meta-item::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--ink-5);
  border-radius: 50%;
}
.lesson-meta-item:first-child::before { display: none; }

/* Prose — beautiful editorial reading */
.prose {
  font-size: 1.07rem;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 680px;
}
.prose > * + * { margin-top: 1.4rem; }

.prose .lead {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.012em;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.prose h2 {
  font-size: 1.85rem;
  margin-top: 3.5rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 88px;
  font-weight: 500;
}
.prose h3 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  letter-spacing: -0.012em;
  scroll-margin-top: 88px;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--ink);
}
.prose h4 {
  font-size: 1.05rem;
  margin-top: 2rem;
  font-weight: 600;
  color: var(--ink);
}

.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: var(--ink-2); }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  list-style: revert;
}
.prose ul li, .prose ol li {
  margin-bottom: 0.55rem;
  color: var(--ink-2);
  padding-left: 0.4rem;
}
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--ink-4); font-family: var(--serif); font-style: italic; }

.prose code {
  background: var(--paper-3);
  padding: 0.12rem 0.4rem;
  border-radius: var(--r-sm);
  font-size: 0.88em;
  color: var(--accent-deep);
  border: 1px solid var(--rule);
}
.prose pre {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  padding: 1.2rem;
  border-radius: var(--r);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}
.prose pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--ink-2);
}

.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.prose a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-soft);
  transition: text-decoration-color var(--t);
}
.prose a:hover { text-decoration-color: var(--accent); }

/* Editorial callouts — no emoji, refined */
.note {
  display: flex;
  flex-direction: column;
  margin: 2rem 0;
  padding: 1.4rem 1.6rem;
  border-left: 2px solid var(--ink-4);
  background: var(--paper-2);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 0.98rem;
}
.note-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin-bottom: 0.5rem;
}
.note p { margin: 0; color: var(--ink-2); }
.note p + p { margin-top: 0.6rem; }
.note ul, .note ol {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: revert;
}
.note ul li, .note ol li { margin-bottom: 0.3rem; color: var(--ink-2); }

.note.accent { border-left-color: var(--accent); background: var(--accent-soft); }
.note.accent .note-label { color: var(--accent); }
.note.positive { border-left-color: var(--positive); background: var(--positive-soft); }
.note.positive .note-label { color: var(--positive); }
.note.caution { border-left-color: var(--caution); background: var(--caution-soft); }
.note.caution .note-label { color: var(--caution); }
.note.negative { border-left-color: var(--negative); background: var(--negative-soft); }
.note.negative .note-label { color: var(--negative); }

/* Compare blocks */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  margin: 2rem 0;
  overflow: hidden;
}
.compare-cell {
  padding: 1.5rem;
  background: var(--paper);
}
.compare-cell .compare-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.compare-cell .compare-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.compare-cell.bad .compare-tag { color: var(--negative); }
.compare-cell.bad .compare-tag::before { background: var(--negative); }
.compare-cell.good .compare-tag { color: var(--positive); }
.compare-cell.good .compare-tag::before { background: var(--positive); }
.compare-cell p { margin: 0; font-size: 0.95rem; color: var(--ink-2); line-height: 1.55; }
.compare-cell strong { color: var(--ink); }

/* Definition box */
.definition {
  margin: 2rem 0;
  padding: 1.75rem 2rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  position: relative;
  background: var(--paper);
}
.definition::before {
  content: 'def.';
  position: absolute;
  top: -10px; left: 1.5rem;
  background: var(--paper);
  padding: 0 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-4);
}
.definition .term {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.definition p { font-size: 0.97rem; margin: 0; }

/* Quiz — refined */
.quiz {
  margin: 3rem 0;
  padding: 2rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: var(--r);
}
.quiz-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.quiz-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.quiz-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.quiz-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-4);
}

.quiz-question {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.014em;
  font-weight: 500;
}

.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t);
  text-align: left;
  width: 100%;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.45;
}
.quiz-option:hover {
  border-color: var(--ink-4);
  background: var(--paper);
}
.quiz-option.correct {
  border-color: var(--positive);
  background: var(--positive-soft);
}
.quiz-option.incorrect {
  border-color: var(--negative);
  background: var(--negative-soft);
}
.quiz-option.disabled { pointer-events: none; }
.quiz-option .letter {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 0.78rem;
  flex-shrink: 0;
  font-family: var(--mono);
}
.quiz-option.correct .letter { background: var(--positive); color: var(--paper); border-color: var(--positive); }
.quiz-option.incorrect .letter { background: var(--negative); color: var(--paper); border-color: var(--negative); }

.quiz-explain {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-sm);
  display: none;
  font-size: 0.95rem;
  line-height: 1.55;
}
.quiz-explain.show { display: block; }
.quiz-explain.correct { background: var(--positive-soft); color: var(--ink-2); border-left: 2px solid var(--positive); }
.quiz-explain.incorrect { background: var(--negative-soft); color: var(--ink-2); border-left: 2px solid var(--negative); }
.quiz-explain strong { color: var(--ink); }

/* Lesson nav */
.lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 4rem;
  border-radius: var(--r);
  overflow: hidden;
}
.lesson-nav-link {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem;
  background: var(--paper);
  transition: background var(--t);
  color: var(--ink);
}
.lesson-nav-link:hover { background: var(--paper-2); color: var(--ink); }
.lesson-nav-link.next { text-align: right; align-items: flex-end; }
.lesson-nav-link span {
  font-size: 0.74rem;
  color: var(--ink-4);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.lesson-nav-link strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.012em;
}

/* TOC right side */
.toc-side {
  position: sticky;
  top: 88px;
  height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.88rem;
}
.toc-side h5 { margin-bottom: 0.85rem; }
.toc-side ul li { margin-bottom: 0.4rem; }
.toc-side a {
  color: var(--ink-4);
  display: block;
  padding: 0.25rem 0;
  border-left: 1.5px solid var(--rule);
  padding-left: 0.85rem;
  transition: all var(--t);
  line-height: 1.45;
}
.toc-side a:hover, .toc-side a.active {
  color: var(--ink);
  border-left-color: var(--accent);
}
.toc-side ul ul { padding-left: 0.85rem; margin-top: 0.4rem; }
.toc-side ul ul a { font-size: 0.84rem; color: var(--ink-5); }

/* Reading progress */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 200;
}
.progress-bar-inner {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 100ms linear;
}

/* ============================================
   TOOL PAGES
   ============================================ */
.tool-page { padding: 3rem 0; min-height: 70vh; }
.tool-section {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.tool-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  font-size: 0.96rem;
  color: var(--ink);
  transition: border-color var(--t);
  font-family: inherit;
}
.tool-input:focus {
  outline: none;
  border-color: var(--ink);
}
.tool-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}
.tool-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.tool-helper {
  font-size: 0.83rem;
  color: var(--ink-4);
  margin-top: 0.4rem;
}
.char-count {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-top: 0.3rem;
  font-family: var(--mono);
}
.char-count.ok { color: var(--positive); }
.char-count.warn { color: var(--caution); }
.char-count.bad { color: var(--negative); }

/* Mark complete button */
#markComplete {
  margin: 2.5rem 0;
}
#markComplete.completed {
  background: var(--positive);
  color: var(--paper);
}

/* Glossary specific */
.glossary-search {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
  margin-bottom: 2rem;
}
.glossary-search:focus { outline: none; border-color: var(--ink); }
.glossary-letters {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
}
.glossary-letter {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-4);
  transition: all var(--t);
  cursor: pointer;
}
.glossary-letter:hover { background: var(--paper-3); color: var(--ink); }
.glossary-letter.disabled { opacity: 0.3; cursor: not-allowed; }
.glossary-section { margin-bottom: 3rem; scroll-margin-top: 88px; }
.glossary-section h2 {
  font-family: var(--serif);
  font-size: 3rem;
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}
.glossary-term {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.glossary-term h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.014em;
}
.glossary-term p { font-size: 0.96rem; line-height: 1.65; color: var(--ink-3); margin: 0; }

/* Responsive */
@media (max-width: 1100px) {
  .lesson-layout { grid-template-columns: 220px 1fr; gap: 2rem; }
  .toc-side { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; width: 44px; height: 44px; }
  .theme-toggle { width: 44px; height: 44px; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.06);
  }
  .nav-links.open .nav-link {
    padding: 1rem 1.25rem;
    border-radius: var(--r-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links.open .nav-link:hover { background: var(--paper-2); }

  /* Hide mega-menu dropdown on mobile — tapping Articles navigates to /blog/ instead */
  .mega-trigger > .nav-link::after,
  .mega-trigger > .nav-link.active::after { display: none; }
  .mega-panel { display: none !important; }

  /* Larger nav touch targets */
  .nav-inner { height: 60px; }
  .logo-mark { width: 32px; height: 32px; }

  .hero { padding: 4rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .lesson-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 1rem; background: var(--paper-2); border-radius: var(--r); margin-bottom: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-nav-link.next { text-align: left; align-items: flex-start; }
  .curriculum, .tool-list, .principles { grid-template-columns: 1fr; }
  .tool-list-card { border-right: none; }

  /* Larger touch targets for buttons */
  .btn { min-height: 44px; padding: 0.75rem 1.25rem; }
  .btn-large { min-height: 48px; }

  /* Bigger tap targets for tabs / filters */
  .blog-filter, .tot-mode-btn, .schema-type-btn, .kd-tab {
    min-height: 40px;
    padding: 0.55rem 0.95rem;
  }

  /* Quiz options bigger on mobile */
  .quiz-option { padding: 1rem 1.1rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .principles { gap: 2rem; }
  .quiz, .tool-section { padding: 1.25rem; }
  .lesson-title h1 { font-size: 1.85rem; }

  /* Hide non-essential nav items on tiny screens */
  .nav-actions .btn-primary { display: none; }
  .nav-inner { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .container-narrow { padding: 0 1rem; }

  /* Smaller hero on phones */
  .hero { padding: 3rem 0 2rem; }
  .hero-tags { gap: 1rem; font-size: 0.8rem; }

  /* Tools — single column on small phones */
  .tot-modes, .blog-filters { gap: 0.3rem; }
  .tot-mode-btn, .blog-filter { font-size: 0.78rem; padding: 0.4rem 0.7rem; }

  /* Cards — tighter spacing */
  .curriculum-card, .tool-list-card { padding: 1.5rem; }

  /* Bulk row in title optimizer collapses cleanly */
  .bulk-row { grid-template-columns: 40px 1fr; gap: 0.75rem; }
  .bulk-row .bulk-score { grid-column: 1 / -1; text-align: left; padding-top: 0.4rem; border-top: 1px solid var(--rule); margin-top: 0.4rem; }

  /* Editorial quote — smaller */
  .editorial-quote-text { font-size: 1.4rem; }

  /* Mega menu on mobile — tighter */
  .mega-grid { gap: 1rem; padding: 0 1rem; }
  .mega-cat { padding: 0.7rem 0.75rem; }

  /* Schema generator tools row collapses */
  .tool-row { flex-direction: column; gap: 0.75rem; }

  /* Better post layout on phones */
  .post-title { font-size: 1.85rem !important; }
  .post-deck { font-size: 1.1rem !important; }

  /* Compare blocks stack */
  .compare { grid-template-columns: 1fr !important; }

  /* Ensure tables/figures don't overflow */
  .figure svg, .post-prose img { max-width: 100%; height: auto; }
  .post-prose pre { font-size: 0.78rem; }
}

/* Safety net: prevent any horizontal overflow on mobile */
@media (max-width: 700px) {
  body, html { overflow-x: hidden; }
  .post-prose { word-wrap: break-word; overflow-wrap: break-word; }
  .post-prose pre { white-space: pre-wrap; word-wrap: break-word; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 600ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.fade-up-1 { animation-delay: 80ms; }
.fade-up-2 { animation-delay: 160ms; }
.fade-up-3 { animation-delay: 240ms; }

@media print {
  .nav, .sidebar, .toc-side, .lesson-nav, footer { display: none; }
  .lesson-layout { grid-template-columns: 1fr; }
}

/* ============================================
   STREAK BADGE — REMOVED (was: .streak-badge in nav)
   The streak feature was removed in favor of intrinsic engagement.
   These rules are kept hidden for backward compatibility.
   ============================================ */
.streak-badge {
  display: none !important;
}
.streak-badge-deprecated {
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: default;
  transition: all var(--t);
}
.streak-badge:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.streak-flame {
  font-size: 1rem;
  filter: saturate(1.2);
  animation: flame-flicker 1.8s ease-in-out infinite;
}
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(2deg); }
}
.streak-count {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}
.streak-label {
  font-size: 0.78rem;
  color: var(--ink-4);
}

/* ============================================
   CONTINUE CARD (homepage, returning users)
   ============================================ */
.continue-card {
  background: linear-gradient(135deg, var(--paper-2) 0%, var(--accent-soft) 200%);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 2rem 2.25rem;
  margin: 2.5rem 0 0;
  position: relative;
  overflow: hidden;
}
.continue-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.continue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.continue-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.continue-eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
}
.continue-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.continue-streak {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r);
  border: 1px solid var(--rule);
}
.streak-flame-big {
  font-size: 1.75rem;
  animation: flame-flicker 1.8s ease-in-out infinite;
}

.continue-progress {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.continue-progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.continue-progress-bar {
  height: 6px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
}
.continue-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: 999px;
  transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.continue-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  .continue-head, .continue-next { flex-direction: column; align-items: flex-start; }
  .continue-card { padding: 1.5rem; }
}

/* ============================================
   CELEBRATION OVERLAY (lesson complete)
   ============================================ */
.celebrate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity 350ms ease;
  padding: 2rem;
}
.celebrate-overlay.show { opacity: 1; }

.celebrate-card {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 3rem 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.96);
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.celebrate-overlay.show .celebrate-card { transform: translateY(0) scale(1); }

.celebrate-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 5rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}
.celebrate-title {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.celebrate-progress-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-4);
  margin-bottom: 0.75rem;
}
.celebrate-progress-bar {
  height: 6px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.celebrate-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: 999px;
  transition: width 1200ms cubic-bezier(0.4, 0, 0.2, 1) 200ms;
  width: 0;
}
.celebrate-overlay.show .celebrate-progress-fill {
  /* width is set inline */
}
.celebrate-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: var(--ink-4);
  display: grid;
  place-items: center;
}
.celebrate-close:hover { background: var(--paper-3); color: var(--ink); }

/* ============================================
   EMAIL CAPTURE
   ============================================ */
.email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin-top: 1.25rem;
}
.email-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  font-size: 0.94rem;
  color: var(--ink);
}
.email-form input:focus {
  outline: none;
  border-color: var(--ink);
}
.cta-band .email-form input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--paper);
}
.cta-band .email-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.cta-band .email-form input:focus { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.15); }

.email-msg {
  font-size: 0.85rem;
  color: var(--ink-4);
  margin-top: 0.6rem;
  font-family: var(--mono);
}
.cta-band .email-msg { color: rgba(245, 245, 240, 0.7); }

/* ============================================
   LESSON GRID (learn page)
   ============================================ */
.lesson-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.lesson-grid-card {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  transition: background var(--t);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.lesson-grid-card:hover { background: var(--paper-2); color: inherit; }
.lesson-grid-card.done {
  background: linear-gradient(180deg, var(--positive-soft) 0%, var(--paper) 100%);
}
.lesson-grid-card.done::after {
  content: '✓';
  position: absolute;
  top: 1rem; right: 1rem;
  width: 24px; height: 24px;
  background: var(--positive);
  color: var(--paper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
}
.lesson-grid-card.next {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 100%);
}
.lesson-grid-card.next::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.lesson-grid-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}
.lesson-grid-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.014em;
}
.lesson-grid-status {
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: auto;
}

/* ============================================
   MARQUEE (recent activity / what's new ticker)
   ============================================ */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.85rem 0;
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee-scroll 40s linear infinite;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-4);
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.marquee-item::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.7rem;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   STAT NUMBERS (creative counters)
   ============================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-cell {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--rule);
  text-align: center;
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 3.2rem;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  font-weight: 600;
}
@media (max-width: 700px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: none; }
}

/* ============================================
   FLOATING HOVER TILES (creative section)
   ============================================ */
.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.tile {
  padding: 2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  transition: all var(--t);
  overflow: hidden;
}
.tile:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.tile:hover h4, .tile:hover p { color: var(--paper); }
.tile:hover .tile-num { color: var(--accent); }
.tile-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--ink-4);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  transition: color var(--t);
}
.tile h4 {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.014em;
  transition: color var(--t);
}
.tile p {
  font-size: 0.95rem;
  color: var(--ink-3);
  margin: 0;
  transition: color var(--t);
}

/* ============================================
   MICRO INTERACTIONS
   ============================================ */
.btn-primary, .btn-secondary, .btn-accent {
  position: relative;
  overflow: hidden;
}
.btn-primary svg, .btn-secondary svg { transition: transform var(--t); }
.btn-primary:hover svg, .btn-secondary:hover svg { transform: translateX(2px); }

/* Cursor accent on creative links */
.curriculum-card, .tool-list-card, .tile {
  cursor: pointer;
}

/* Underline animation on text links */
.text-link {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.text-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.text-link:hover::after { transform: scaleX(1); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   START HERE PAGE
   ============================================ */
.path-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.path-pick {
  padding: 2.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all var(--t);
  position: relative;
}
.path-pick:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.path-pick:hover .path-pick-num,
.path-pick:hover h3,
.path-pick:hover p,
.path-pick:hover .path-pick-meta { color: inherit; }
.path-pick:hover .path-pick-num { color: var(--accent); }
.path-pick-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  transition: color var(--t);
}
.path-pick-tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  margin-bottom: 0.75rem;
}
.path-pick h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.018em;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
.path-pick p {
  color: var(--ink-3);
  font-size: 0.96rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex: 1;
}
.path-pick-meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-4);
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
}
.path-pick-cta {
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.path-pick-cta::after { content: '→'; transition: transform var(--t); }
.path-pick:hover .path-pick-cta::after { transform: translateX(4px); }

@media (max-width: 900px) {
  .path-picker { grid-template-columns: 1fr; }
}

/* Path roadmap */
.roadmap {
  margin: 3rem 0;
}
.roadmap-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.roadmap-step:last-of-type { border-bottom: none; }
.roadmap-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
}
.roadmap-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.018em;
  margin-bottom: 0.75rem;
}
.roadmap-content h3 a { color: var(--ink); transition: color var(--t); }
.roadmap-content h3 a:hover { color: var(--accent); }
.roadmap-content p {
  color: var(--ink-3);
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
}
.roadmap-content .roadmap-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-4);
  margin-bottom: 1rem;
}
.roadmap-cta {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.roadmap-cta:hover { color: var(--accent); }

@media (max-width: 700px) {
  .roadmap-step { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.5rem 0; }
  .roadmap-num { font-size: 2.2rem; }
}

/* ============================================
   BLOG INDEX
   ============================================ */
.blog-hero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}
.blog-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  font-weight: 400;
}
.blog-hero h1 em { color: var(--accent); }
.blog-hero p {
  font-size: 1.18rem;
  color: var(--ink-3);
  max-width: 580px;
}

.blog-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.blog-filter {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  font-size: 0.86rem;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: all var(--t);
  font-weight: 500;
}
.blog-filter:hover { background: var(--paper-3); color: var(--ink); }
.blog-filter.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
[data-theme="dark"] .blog-filter.active { background: var(--paper); color: var(--ink); }

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}

/* Cross-link block: "Related lessons" on blog posts, "See in practice" on lessons */
.related-block {
  margin: 3rem 0 1.5rem;
  padding: 1.75rem 1.85rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
}
.related-block h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.related-block p {
  color: var(--ink-3);
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}
.related-block ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: none;
}
.related-block li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
  position: relative;
  padding-left: 1.1rem;
}
.related-block li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}
.related-block li:last-child { margin-bottom: 0; }
.related-block a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--t), color var(--t);
}
.related-block a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.related-block strong { color: var(--ink); font-weight: 600; }

/* "Live now" / "Coming up next" section headings on the blog index */
.blog-section-heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
}

/* Upcoming post cards: slightly de-emphasised so live posts feel primary */
.blog-list-item.upcoming {
  opacity: 0.78;
}
.blog-list-item.upcoming:hover { opacity: 1; }
.blog-list-item.upcoming h2 a { color: var(--ink-2); }
.blog-list-item.upcoming h2 a:hover { color: var(--accent); }

/* Banner shown at the top of an article when it's a scheduled preview */
.preview-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--accent-deep);
}
.preview-banner-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 999px;
  flex: 0 0 auto;
  animation: preview-pulse 1.6s ease-in-out infinite;
}
@keyframes preview-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
[data-theme="dark"] .preview-banner { background: rgba(255, 107, 61, 0.10); }
.blog-list-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity var(--t);
}
.blog-list-item:hover { opacity: 1; }
.blog-list-item .blog-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-4);
}
.blog-list-item .blog-meta-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}
.blog-list-item .blog-meta-cat::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.blog-list-item h2 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  color: var(--ink);
}
.blog-list-item h2 a { color: inherit; transition: color var(--t); }
.blog-list-item h2 a:hover { color: var(--accent); }
.blog-list-item p {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 1rem;
  max-width: 640px;
}
.blog-list-item .blog-read-more {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-list-item .blog-read-more::after {
  content: '→';
  transition: transform var(--t);
}
.blog-list-item:hover .blog-read-more::after { transform: translateX(4px); }
.blog-list-item:hover .blog-read-more { color: var(--accent); }

@media (max-width: 700px) {
  .blog-list-item { grid-template-columns: 1fr; gap: 0.75rem; padding: 1.75rem 0; }
}

/* ============================================
   BLOG POST PAGE
   ============================================ */
.post-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 5rem;
  display: grid;
  grid-template-columns: 1fr 760px 1fr;
  gap: 0;
}
.post-layout > * { min-width: 0; }

.post-main {
  grid-column: 2;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.post-rail-left { padding-right: 1rem; }
.post-rail-right { padding-left: 1rem; }

.post-rail-share {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 6rem;
}
.post-rail-share-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  margin-bottom: 0.75rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
}
.post-rail-share button {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  transition: all var(--t);
  font-size: 0.82rem;
}
.post-rail-share button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.post-rail-toc {
  position: sticky;
  top: 100px;
  padding-top: 6rem;
  font-size: 0.86rem;
}
.post-rail-toc h5 {
  font-size: 0.7rem;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.post-rail-toc ul li { margin-bottom: 0.5rem; }
.post-rail-toc a {
  display: block;
  color: var(--ink-4);
  padding: 0.2rem 0;
  border-left: 1.5px solid var(--rule);
  padding-left: 0.85rem;
  line-height: 1.45;
  transition: all var(--t);
}
.post-rail-toc a:hover, .post-rail-toc a.active {
  color: var(--ink);
  border-left-color: var(--accent);
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.post-header .breadcrumb { margin-bottom: 1rem; }
.post-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.post-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.026em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.post-deck {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: -0.012em;
  max-width: 640px;
  margin-bottom: 2rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-4);
}
.post-meta-item { display: flex; align-items: center; gap: 0.4rem; }
.post-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.post-author-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.85rem;
}
[data-theme="dark"] .post-author-avatar { background: var(--paper); color: var(--ink); }
.post-author-name {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 500;
}

.post-prose {
  font-size: 1.13rem;
  line-height: 1.75;
  color: var(--ink-2);
  font-feature-settings: "kern", "liga", "ss01";
}
.post-prose > * + * { margin-top: 1.5rem; }
.post-prose .lead {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.post-prose h2 {
  font-family: var(--serif);
  font-size: 2rem;
  margin-top: 4rem;
  letter-spacing: -0.022em;
  font-weight: 500;
  scroll-margin-top: 88px;
  line-height: 1.2;
}
.post-prose h2 .h2-num {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: 0.65em;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}
.post-prose h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  margin-top: 2.75rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  scroll-margin-top: 88px;
}
.post-prose h4 {
  font-size: 1.08rem;
  margin-top: 2rem;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--sans);
}
.post-prose strong { color: var(--ink); font-weight: 600; }
.post-prose em { color: var(--ink-2); font-style: italic; }
.post-prose ul, .post-prose ol {
  padding-left: 1.5rem;
  list-style: revert;
}
.post-prose ul li, .post-prose ol li {
  margin-bottom: 0.6rem;
  padding-left: 0.4rem;
}
.post-prose ul li::marker { color: var(--accent); }
.post-prose ol li::marker { color: var(--ink-4); font-family: var(--serif); font-style: italic; }

.post-prose code {
  background: var(--paper-3);
  padding: 0.12rem 0.4rem;
  border-radius: var(--r-sm);
  font-size: 0.86em;
  color: var(--accent-deep);
  border: 1px solid var(--rule);
}
.post-prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.012em;
}
.post-prose a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-soft);
}
.post-prose a:hover { text-decoration-color: var(--accent); }

/* Pull quote — magazine style */
.pull-quote {
  margin: 3rem -2rem;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: center;
}
.pull-quote-text {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.pull-quote-text em { font-style: italic; color: var(--accent); }
.pull-quote-attr {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Numbered step list — for tutorials */
.steps {
  margin: 2rem 0;
  list-style: none !important;
  padding: 0 !important;
  counter-reset: step;
}
.steps li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0 !important;
  counter-increment: step;
}
.steps li::marker { display: none !important; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
}
.steps li > * { margin: 0 !important; }
.steps li > strong:first-child {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem !important;
  letter-spacing: -0.012em;
}

/* Key takeaway box */
.takeaway {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
}
.takeaway-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.takeaway-label::before {
  content: '◆';
  font-size: 0.7rem;
}
.takeaway p:last-child { margin-bottom: 0; }
.takeaway strong { color: var(--ink); }

/* Author bio at bottom */
.post-author-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  margin-top: 4rem;
}
.post-author-card-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  flex-shrink: 0;
}
[data-theme="dark"] .post-author-card-avatar { background: var(--paper); color: var(--ink); }
.post-author-card-info p {
  font-size: 0.95rem;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.55;
}
.post-author-card-info strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: -0.014em;
}

/* Subscribe / End-of-post CTA */
.post-cta {
  margin-top: 4rem;
  padding: 3rem 2.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--paper-2) 0%, var(--accent-soft) 200%);
  position: relative;
  overflow: hidden;
}
.post-cta::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
}
.post-cta-eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}
.post-cta h3 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}
.post-cta p {
  font-size: 1rem;
  color: var(--ink-3);
  margin-bottom: 1.5rem;
  max-width: 520px;
  position: relative;
  z-index: 1;
}

/* Related posts */
.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}
.related-posts h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.related-card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  transition: all var(--t);
  display: block;
  color: inherit;
}
.related-card:hover {
  border-color: var(--ink);
  background: var(--paper-2);
  color: inherit;
  transform: translateY(-2px);
}
.related-cat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.related-card h5 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  text-transform: none;
  margin-bottom: 0.4rem;
}
.related-card p {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-main { grid-column: 1; }
  .post-rail-left, .post-rail-right { display: none; }
}
@media (max-width: 700px) {
  .pull-quote { margin: 2rem 0; }
  .related-grid { grid-template-columns: 1fr; }
  .post-cta { padding: 2rem 1.5rem; }
}

/* ============================================
   HOMEPAGE BLOG SECTION
   ============================================ */
.home-posts {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.home-post {
  padding: 2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  transition: background var(--t);
  display: flex;
  flex-direction: column;
}
.home-post:hover { background: var(--paper-2); color: inherit; }
.home-post.featured {
  grid-row: span 2;
  padding: 3rem;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.home-post.featured:hover { background: var(--ink-2); color: var(--paper); }
[data-theme="dark"] .home-post.featured { background: var(--paper-3); color: var(--ink); }
.home-post-cat {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.home-post.featured .home-post-cat { color: var(--accent-deep); }
.home-post h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.014em;
  margin-bottom: 0.75rem;
  line-height: 1.25;
  color: inherit;
}
.home-post.featured h3 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -0.022em;
  color: var(--paper);
}
[data-theme="dark"] .home-post.featured h3 { color: var(--ink); }
.home-post p {
  font-size: 0.95rem;
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}
.home-post.featured p {
  font-size: 1.08rem;
  color: rgba(245, 245, 240, 0.78);
  max-width: 460px;
}
[data-theme="dark"] .home-post.featured p { color: var(--ink-3); }
.home-post-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-4);
  display: flex;
  gap: 1rem;
  margin-top: auto;
}
.home-post.featured .home-post-meta { color: rgba(245, 245, 240, 0.5); }
[data-theme="dark"] .home-post.featured .home-post-meta { color: var(--ink-4); }

@media (max-width: 900px) {
  .home-posts { grid-template-columns: 1fr; }
  .home-post.featured { grid-row: auto; padding: 2rem; }
}

/* ============================================
   CHARTS, FIGURES, DIAGRAMS (in posts)
   ============================================ */
.figure {
  margin: 2.5rem 0;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  text-align: center;
}
.figure svg { margin: 0 auto; max-width: 100%; height: auto; display: block; }
.figure-caption {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}
.figure-caption strong {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

/* Worked example box */
.worked-example {
  margin: 2.5rem 0;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
}
.worked-example-head {
  padding: 1rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.worked-example-head::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.9rem;
}
[data-theme="dark"] .worked-example-head { background: var(--paper-3); color: var(--ink); }
.worked-example-body {
  padding: 1.5rem;
}
.worked-example-body p:last-child { margin-bottom: 0; }
.worked-example-body strong { color: var(--ink); }

/* Try this — practical exercise */
.try-this {
  margin: 3rem 0;
  padding: 2rem;
  border: 2px dashed var(--accent);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  position: relative;
}
.try-this-label {
  position: absolute;
  top: -10px;
  left: 1.5rem;
  background: var(--paper);
  padding: 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.try-this h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.014em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}
.try-this ol {
  padding-left: 1.5rem;
  list-style: revert;
}
.try-this ol li {
  margin-bottom: 0.6rem;
  color: var(--ink-2);
}
.try-this ol li::marker { color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 500; }

/* Mock SERP / screenshot */
.mock-serp {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-family: arial, sans-serif;
}
.mock-serp-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--paper-2);
  border-radius: 999px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--rule);
}
.mock-serp-search-text {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.mock-serp-result {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.mock-serp-result:last-child { border-bottom: none; }
.mock-serp-result-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-bottom: 0.3rem;
}
.mock-serp-result-title {
  color: #1a0dab;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
[data-theme="dark"] .mock-serp-result-title { color: #8ab4f8; }
.mock-serp-result-desc {
  font-size: 0.88rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.mock-serp-result.highlight {
  background: var(--accent-soft);
  margin: 0 -1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent);
}

/* Stat highlight box */
.stat-highlight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1.75rem 2rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
}
[data-theme="dark"] .stat-highlight { background: var(--paper-3); color: var(--ink); }
.stat-highlight-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-highlight-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(245, 245, 240, 0.85);
}
[data-theme="dark"] .stat-highlight-text { color: var(--ink-3); }
.stat-highlight-text strong { color: var(--paper); }
[data-theme="dark"] .stat-highlight-text strong { color: var(--ink); }

@media (max-width: 600px) {
  .stat-highlight { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.5rem; }
  .stat-highlight-num { font-size: 3rem; }
}

/* Self-test quiz inside posts */
.self-test {
  margin: 3rem 0;
  padding: 2rem;
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  background: var(--paper);
}
.self-test-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.self-test-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.self-test-label::before {
  content: '✓';
  background: var(--accent);
  color: var(--paper);
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}
.self-test h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.014em;
  color: var(--ink);
}

/* ============================================
   FAQ ITEMS (in posts)
   ============================================ */
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.faq-item:last-of-type { border-bottom: none; }
.faq-item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.014em;
  margin: 0 0 0.75rem;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  scroll-margin-top: 88px;
}
.faq-item h3::before {
  content: 'Q.';
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
  font-size: 0.95em;
}
.faq-item p {
  margin: 0;
  padding-left: 1.85rem;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ============================================
   BOOKMARK BUTTON
   ============================================ */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-3);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--t);
}
.bookmark-btn:hover { border-color: var(--ink); color: var(--ink); }
.bookmark-btn.saved {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
[data-theme="dark"] .bookmark-btn.saved { background: var(--paper); color: var(--ink); }
.bookmark-btn .bookmark-icon { font-size: 0.9rem; }

/* ============================================
   ACHIEVEMENT BADGES
   ============================================ */
.achievements-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}
.achievement {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-3);
  transition: all var(--t);
}
.achievement.earned {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 500;
}
[data-theme="dark"] .achievement.earned { background: var(--paper); color: var(--ink); }
.achievement.locked { opacity: 0.55; }
.achievement-emoji { font-size: 1rem; }

/* Achievement unlock toast */
.achievement-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 360px;
}
[data-theme="dark"] .achievement-toast { background: var(--paper); color: var(--ink); }
.achievement-toast.show { transform: translateY(0); opacity: 1; }
.achievement-toast-icon {
  font-size: 1.6rem;
  background: var(--accent);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.achievement-toast-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.achievement-toast-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ============================================
   READING LIST PANEL (saved articles)
   ============================================ */
.reading-list-link {
  position: relative;
}
.reading-list-link .count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 600;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
}

/* ============================================
   MEGA MENU (smart Articles dropdown)
   ============================================ */
.mega-trigger {
  position: relative;
}
.mega-trigger > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

/* Dropdown arrow — applies to BOTH active and non-active mega-trigger links.
   The selectors below override the generic .nav-link.active::after underline rule
   so the arrow always renders correctly. */
.mega-trigger > .nav-link::after,
.mega-trigger > .nav-link.active::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: transparent;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform var(--t), opacity var(--t);
  opacity: 0.6;
  margin: 0;
}
.mega-trigger > .nav-link.active::after {
  opacity: 1;
}
.mega-trigger:hover > .nav-link::after,
.mega-trigger.open > .nav-link::after {
  transform: rotate(225deg) translateY(-1px);
  opacity: 1;
}

/* Active state for mega-trigger links — color shift instead of underline */
.mega-trigger > .nav-link.active {
  color: var(--ink);
  font-weight: 500;
}

.mega-panel {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
  z-index: 99;
  padding: 2.5rem 0 2rem;
}
.mega-trigger:hover .mega-panel,
.mega-trigger:focus-within .mega-panel,
.mega-trigger.open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.mega-col h6 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.mega-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}
.mega-cat {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  transition: background var(--t);
  text-decoration: none;
  color: inherit;
}
.mega-cat:hover {
  background: var(--paper-2);
  color: inherit;
}
.mega-cat-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.mega-cat-desc {
  font-size: 0.82rem;
  color: var(--ink-4);
  line-height: 1.4;
}
.mega-cat:hover .mega-cat-name {
  color: var(--accent);
}

.mega-latest {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mega-latest-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: color var(--t);
}
.mega-latest-item:last-of-type { border-bottom: none; }
.mega-latest-item:hover { color: var(--accent); }
.mega-latest-cat {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.mega-latest-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1.35;
}
.mega-all {
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.mega-all::after { content: '→'; transition: transform var(--t); }
.mega-all:hover::after { transform: translateX(3px); }

@media (max-width: 900px) {
  .mega-panel {
    position: static;
    box-shadow: none;
    border-bottom: 1px solid var(--rule);
    padding: 1rem 0;
  }
  .mega-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
  .mega-categories {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CATEGORY STRIP — DEPRECATED (mega menu now handles category nav)
   Kept for backward compatibility, hidden by default.
   ============================================ */
.cat-strip { display: none; }
.cat-strip-hidden-keep {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 64px;
  z-index: 90;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.cat-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 48px;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-strip-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  font-weight: 600;
  margin-right: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cat-strip-label::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.cat-strip-link {
  font-size: 0.86rem;
  color: var(--ink-3);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: all var(--t);
  font-weight: 450;
  flex-shrink: 0;
}
.cat-strip-link:hover {
  background: var(--paper-3);
  color: var(--ink);
}
.cat-strip-link.current {
  color: var(--ink);
  font-weight: 600;
  background: var(--paper-3);
}

@media (max-width: 700px) {
  .cat-strip-inner { padding: 0 1.25rem; height: 44px; }
  .cat-strip-label { display: none; }
}
