/* ════════════════════════════════════════════════════════════
   HANDWRITING PRACTICE — SHARED DESIGN SYSTEM
   hwp.css — used by landing.html, article.html, pillar.html
   ════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   GOOGLE FONTS
   Cormorant Upright  — display headings
   Alegreya Sans      — body prose
   Scope One          — labels, annotations, metadata
   IBM Plex Sans      — buttons, nav links, UI
   Dancing Script     — script flourishes
────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Upright:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Alegreya+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Lekton&family=IBM+Plex+Sans:wght@300;400;500&family=Dancing+Script:wght@400;500&display=swap');

/* ──────────────────────────────────────────
   THEME TOKENS
────────────────────────────────────────── */
[data-theme="parchment"] {
  --bg:             #ece7dd;
  --sidebar:        #f5f1ea;
  --sb-border:      #ddd6c8;
  --text:           #2e2a26;
  --text2:          #6e6458;
  --text3:          #8E7D67;
  --accent:         #B22244;
  --accent-hover:   #921a36;
  --accent-bg:      rgba(178,34,68,.08);
  --input-bg:       #fff;
  --input-border:   #d6cfc2;
  --nav-bg:         #26201a;
  --nav-text:       #9a8878;
  --nav-logo:       #ece7dd;
  --paper:          #fff;
  --paper-shadow:   rgba(60,50,40,.12);
  --toggle-off:     #ccc5b8;
  --drop-bg:        #fff;
  --drop-hover:     #f5f1ea;
  --border:         #ddd6c8;
  --border-lt:      #ccc5b5;
  --lifted:         #f5f1ea;
  --surface:        #f5f1ea;
  --red-margin:     rgba(178,34,68,.18);
  --rule-line:      #c8c0b0;
  --rule-dot:       #d8d0c0;
  --script-color:   rgba(58,53,48,.14);
  --stat-bg:        #f5f1ea;
  --gen-key-bg:     #f5f1ea;
}

[data-theme="walnut"] {
  --bg:             #1e1b18;
  --sidebar:        #28241f;
  --sb-border:      #3d3832;
  --text:           #c8c0b4;
  --text2:          #8a8278;
  --text3:          #5e5850;
  --accent:         #80b898;
  --accent-hover:   #639e80;
  --accent-bg:      rgba(128,184,152,.12);
  --input-bg:       #322e28;
  --input-border:   #4a443c;
  --nav-bg:         #131210;
  --nav-text:       #6a6358;
  --nav-logo:       #c8c0b4;
  --paper:          #fff;
  --paper-shadow:   rgba(0,0,0,.3);
  --toggle-off:     #4a443c;
  --drop-bg:        #322e28;
  --drop-hover:     #3d3832;
  --border:         #3d3832;
  --border-lt:      #4e4840;
  --lifted:         #322e28;
  --surface:        #28241f;
  --red-margin:     rgba(128,184,152,.15);
  --rule-line:      #b8b0a4;
  --rule-dot:       #c8c0b4;
  --script-color:   rgba(30,27,24,.18);
  --stat-bg:        #28241f;
  --gen-key-bg:     #322e28;
}

/* ──────────────────────────────────────────
   RESET & BASE
────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; font-size:20px}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Alegreya Sans', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  transition: background 0.35s ease, color 0.35s ease;
}
a { color: var(--accent)}
a:hover{ color:var(--accent-hover)}
/* paper grain overlay
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}*/

/* smooth transitions on themed elements */
nav, footer, .section-sidebar, .article-margin,
.pillar-hero-margin, .pillar-intro-sidebar, .pillar-section-sidebar,
.related-sidebar, .gen-sidebar, .gen-left, .gen-right, .gen-key,
.feature-card, .audience-card, .sample-card, .article-card,
.child-card, .related-card, .concept-card,
.hero-strip-cell, .footer-cell,
.demo-sheet, .demo-tag, .toc-cta,
.pullquote, .callout, .sheet-cta, .phil-pull,
.page-cta-sidebar, .cta-sidebar {
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* ──────────────────────────────────────────
   TYPOGRAPHY SCALE
────────────────────────────────────────── */

/* Display headings — Cormorant Upright */
h1, h2, h3,
.display,
.pillar-h1,
.article-h1,
.hero-title,
.section-h2,
.intro-heading,
.gen-title,
.phil-heading,
.cta-title,
.page-cta-title,
.features-title,
.samples-title,
.articles-title {
  font-family: 'Cormorant Upright', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

/* Body prose — Alegreya Sans (inherits from body) */
p, li, td, th { font-family: 'Alegreya Sans', sans-serif; }

/* Labels, metadata, annotations — Lekton */
.label, .mono, .mono-accent,
.section-label, .nav-links a,
.margin-cat, .margin-meta,
.demo-label, .demo-tag,
.strip-label, .index-label,
.toc-label, .toc-list a,
.breadcrumb a, .breadcrumb-current, .breadcrumb-sep,
.article-eyebrow, .article-cat, .related-cat,
.pillar-eyebrow, .pillar-meta-label, .pillar-meta-val,
.sidebar-title, .child-num, .child-tag,
.feature-tag, .feature-link,
.aud-label, .section-more, .section-marker-label,
.footer-col-label, .footer-copy,
.article-footer-label, .callout-label, .sheet-cta-label,
.toc-cta-label, .phil-pull-attr, .gen-eyebrow,
.hero-index, .hero-margin-note, .index-num,
.sample-name, .footer-tagline {
  font-family: 'Lekton', serif;font-size: 1.2em;
}

/* Buttons, nav CTA, interactive UI — IBM Plex Sans */
.btn-primary, .btn-ghost, .nav-cta,
.theme-toggle, .nav-right a {
  font-family: 'IBM Plex Sans', sans-serif;
}

/* Script flourishes — Dancing Script */
.script, .hero-script, .cta-script,
.page-cta-script, .footer-script,
.hero-title .script-word,
.pillar-h1 .script-accent {
  font-family: 'Dancing Script', cursive;
}

/* ──────────────────────────────────────────
   THEME TOGGLE
────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: var(--nav-text);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  transition: border-color 0.2s, color 0.2s;
}
.theme-toggle:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--nav-logo);
}
.toggle-track {
  width: 28px;
  height: 15px;
  border-radius: 8px;
  background: var(--toggle-off);
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-track.on { background: var(--accent); }
.toggle-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}
.toggle-track.on .toggle-thumb { transform: translateX(13px); }

/* ──────────────────────────────────────────
   NAV
────────────────────────────────────────── */
nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 2.5rem;
  height: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.35s;
}

.nav-logo {
  font-family: 'Cormorant Upright', serif;
  font-size: clamp(10px,1.2rem,1.5rem);
  font-weight: 500;
  color: var(--nav-logo);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space:nowrap;
}
.nav-logo-mark {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow:hidden;
  border-radius:4px;
}
.nav-logo-mark svg {
  width: 13px;
  height: 13px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--nav-text);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover {
  color: var(--nav-logo);
  border-color: rgba(255,255,255,0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-cta {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 1.1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-cta:hover {color:#FFF; background: var(--accent-hover); }

/* ──────────────────────────────────────────
   BREADCRUMB
────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.5rem 0.9rem 10rem;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
  transition: background 0.35s, border-color 0.35s;
}
.breadcrumb a {
  font-size: 0.65rem;
  color: var(--text3);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { font-size: 0.65rem; color: var(--border-lt); }
.breadcrumb-current { font-size: 0.65rem; color: var(--text2); letter-spacing: 0.06em; }

/* ──────────────────────────────────────────
   SECTION LAYOUT SHELL
────────────────────────────────────────── */
.section {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.section-sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background 0.35s, border-color 0.35s;
}
.sidebar-num {
  font-family: 'Cormorant Upright', serif;
  font-size: 2.2rem;
  color: var(--text3);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.sidebar-title {
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.1em;
  line-height: 1.7;
  text-transform: uppercase;
}
.section-content {
  padding: 3.5rem 3.5rem 3.5rem 3rem;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  transition: border-color 0.35s;
}
.section-h2 { font-size: 1.5rem; }
.section-more {
  font-size: 0.9rem;
  color: var(--text3);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}
.section-more:hover { color: var(--accent); }

/* ──────────────────────────────────────────
   BUTTONS
────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {color:#FFF; background: var(--accent-hover); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--border-lt);
  color: var(--text2);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  cursor: pointer;
}
.btn-ghost:hover {
  border-color: var(--text2);
  color: var(--text);
}

/* ──────────────────────────────────────────
   HERO (landing page)
────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-rows: 1fr auto;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero-ruled-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-ruled-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent, transparent 47px,
    var(--border) 47px, var(--border) 48px
  );
  opacity: 0.3;
}
.hero-ruled-bg::after {
  content: '';
  position: absolute;
  left: 10rem;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--red-margin);
}
.hero-main {
  display: grid;
  grid-template-columns: 10rem 1fr 1fr;
  position: relative;
  z-index: 1;
}
.hero-margin {
  border-right: 1px solid var(--red-margin);
  padding: 3rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--sidebar);
  transition: background 0.35s;
}
.hero-margin-note {
  font-size: 0.5rem;
  color: var(--text3);
  writing-mode: vertical-rl;
  letter-spacing: 0.12em;
  align-self: flex-start;
  margin-top: auto;
  opacity: 0.5;
  transform: rotate(180deg);
}
.hero-content {
  padding: 5rem 3.5rem 5rem 2.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.35s;
}
.hero-index {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: bold;
  animation: fadeUp 0.5s ease both;
}
.hero-index::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border-lt);
}
.hero-title {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  margin-bottom: 1.4rem;
  animation: fadeUp 0.5s 0.08s ease both;
}
.hero-title .script-word {
  font-size: 1.1em;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.1em;
}
.hero-body {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.85;
  max-width: 42ch;
  margin-bottom: 2.8rem;
  animation: fadeUp 0.5s 0.16s ease both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeUp 0.5s 0.24s ease both;
}
.hero-demo {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
  animation: fadeUp 0.5s 0.12s ease both;
}
.demo-label {
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.12em;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  transition: border-color 0.35s;
}
.demo-live { color: var(--accent); }
.hero-strip {
  display: grid;
  grid-template-columns: 10rem repeat(4, 1fr);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  transition: border-color 0.35s;
}
.hero-strip-cell {
  padding: 1.1rem 1.4rem;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--stat-bg);
  transition: background 0.35s, border-color 0.35s;
}
.hero-strip-cell:last-child { border-right: none; }
.hero-strip-cell:first-child { background: var(--sidebar); }
.strip-num {
  font-family: 'Cormorant Upright', serif;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.strip-label {
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  line-height: 1.6;
}

/* ──────────────────────────────────────────
   PHILOSOPHY / INTRO
────────────────────────────────────────── */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.phil-heading { font-size: 2rem; margin-bottom: 1.5rem; }
.phil-heading em { font-style: italic; color: var(--accent); }
.phil-body { font-size: 0.95rem; color: var(--text2); line-height: 1.9; }
.phil-body p + p { margin-top: 1rem; }
.phil-pull {
  border-left: 2px solid var(--accent);
  padding: 1.2rem 1.8rem;
  margin-top: 2.5rem;
  background: var(--accent-bg);
}
.phil-pull-text {
  font-family: 'Cormorant Upright', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.phil-pull-attr { font-size: 0.6rem; color: var(--text3); letter-spacing: 0.08em; }

/* ──────────────────────────────────────────
   FEATURE CARDS
────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.feature-card {
  background: var(--bg);
  padding: 2.2rem;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover { background: var(--sidebar); }
.feature-card::before {
  content: attr(data-num);
  font-family: 'Cormorant Upright', serif;
  font-size: 5rem;
  color: var(--border);
  position: absolute;
  right: 1.2rem;
  top: 0.3rem;
  line-height: 1;
  pointer-events: none;
  transition: color 0.2s;
}
.feature-card:hover::before { color: var(--border-lt); }
.feature-tag {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
}
.feature-name {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.7rem;
}
.feature-desc {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.75;
  max-width: 38ch;
  margin-bottom: 1.3rem;
}
.feature-link {
  font-size: 0.65rem;
  color: var(--text3);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.feature-link::after { content: '→'; }
.feature-link:hover { color: var(--accent); }

/* ──────────────────────────────────────────
   AUDIENCE CARDS
────────────────────────────────────────── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.audience-card {
  background: var(--bg);
  padding: 1.8rem;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  border-bottom: 2px solid transparent;
}
.audience-card:hover {
  background: var(--sidebar);
  border-bottom-color: var(--accent);
}
.aud-label {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.6rem;
}
.aud-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.aud-desc { font-size: 0.88rem; color: var(--text2); line-height: 1.7; }

/* ──────────────────────────────────────────
   GENERATOR SPOTLIGHT
────────────────────────────────────────── */
.gen-section {
  display: grid;
  grid-template-columns: 10rem 1fr 1fr;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
  transition: background 0.35s, border-color 0.35s;
}
.gen-sidebar {
  border-right: 1px solid var(--border);
  padding: 3rem 1.2rem;
  background: var(--surface);
  transition: background 0.35s, border-color 0.35s;
}
.gen-left {
  padding: 4rem 3rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.35s;
}
.gen-eyebrow {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: bold;
}
.gen-eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--accent); }
.gen-title { font-size: 1.9rem; margin-bottom: 1rem; }
.gen-title em { font-style: italic; color: var(--accent); }
.gen-body {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.85;
  max-width: 40ch;
  margin-bottom: 2.2rem;
}
.gen-right {
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-bottom: none;
  transition: border-color 0.35s;
}
.gen-row:last-child { border-bottom: 1px solid var(--border); }
.gen-key {
  padding: 0.85rem 1.1rem;
  font-size: 0.6rem;
  color: var(--text3);
  letter-spacing: 0.08em;
  border-right: 1px solid var(--border);
  background: var(--gen-key-bg);
  transition: background 0.35s, border-color 0.35s;
}
.gen-val {
  padding: 0.85rem 1.1rem;
  font-family: 'Cormorant Upright', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
}

/* ──────────────────────────────────────────
   SAMPLE SHEETS
────────────────────────────────────────── */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.sample-card { background: var(--bg); transition: background 0.2s; }
.sample-card:hover { background: var(--sidebar); }
.sample-thumb {
  height: 120px;
  background: var(--paper);
  padding: 0.9rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.42rem;
}
.sample-thumb::before {
  content: '';
  position: absolute;
  left: 1.3rem;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(178,34,68,.15);
}
.s-line { height: 1px; background: #c8c0b0; }
.s-dot  { height: 0; border-top: 1px dashed #d8d0c0; }
.s-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.25rem;
  color: rgba(30,27,24,.18);
  padding-left: 1.5rem;
  line-height: 1;
}
.sample-info { padding: 1rem 1.1rem; }
.sample-name {
  font-size: 0.8rem;
  color: var(--text2);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
  font-weight: bold;
}
.sample-desc { font-size: 0.82rem; color: var(--text3); }

/* ──────────────────────────────────────────
   ARTICLE CARDS (landing page grid)
────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.article-card {
  background: var(--bg);
  padding: 2rem;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  position: relative;
}
.article-card:hover { background: var(--sidebar); }
.article-cat {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.9rem;
}
.article-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 0.7rem;
}
.article-excerpt { font-size: 0.88rem; color: var(--text2); line-height: 1.75; }
.article-arrow {
  position: absolute;
  bottom: 1.8rem;
  right: 1.8rem;
  font-size: 0.65rem;
  color: var(--border-lt);
  transition: color 0.2s;
}
.article-card:hover .article-arrow { color: var(--accent); }

/* ──────────────────────────────────────────
   PAGE / FINAL CTA
────────────────────────────────────────── */
.page-cta, .cta-section {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.page-cta-sidebar, .cta-sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  transition: background 0.35s, border-color 0.35s;
}
.page-cta-content, .cta-content {
  padding: 4rem 4rem 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-content {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.page-cta-script, .cta-script {
  font-size: 2.4rem;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.page-cta-title, .cta-title { font-size: 1.6rem; margin-bottom: 0.5rem; }
.cta-title { font-size: 2rem; max-width: 22ch; }
.page-cta-body, .cta-body {
  font-size: 0.95rem;
  color: var(--text2);
  max-width: 48ch;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.page-cta-actions, .cta-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ──────────────────────────────────────────
   PULLQUOTE / CALLOUT (shared prose elements)
────────────────────────────────────────── */
.pullquote {
  border-left: 2px solid var(--accent);
  padding: 1.2rem 1.8rem;
  margin: 2rem 0;
  background: var(--accent-bg);
  max-width: 68ch;
}
.pullquote p {
  font-family: 'Cormorant Upright', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}
.pullquote cite {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.6rem;
  color: var(--text3);
  letter-spacing: 0.08em;
  font-style: normal;
}
.callout {
  border: 1px solid var(--border);
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
  background: var(--sidebar);
  transition: background 0.35s, border-color 0.35s;
  max-width: 68ch;
}
.callout-label {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.7rem;
}
.callout p { font-size: 0.92rem; color: var(--text2); margin: 0; line-height: 1.75; }
.key-points {
  list-style: none;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.key-points li {
  line-height: 1.7;
  padding-left: 1.4rem;
  position: relative;
}
.key-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* ──────────────────────────────────────────
   CHILD / RELATED CARDS (pillar page)
────────────────────────────────────────── */
.child-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.child-grid-2 { grid-template-columns: repeat(2, 1fr); }
.child-card {
  background: var(--bg);
  padding: 2rem;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  position: relative;
}
.child-card:hover { background: var(--sidebar); }
.child-num {
  font-size: 0.55rem;
  color: var(--border-lt);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.6rem;
}
.child-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}
.child-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.7; margin-bottom: 1rem; }
.child-tag { font-size: 0.7rem; color: var(--accent); letter-spacing: 0.08em; }
.child-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 0.65rem;
  color: var(--border-lt);
  transition: color 0.2s;
}
.child-card:hover .child-arrow { color: var(--accent); }
.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}
.concept-card { background: var(--bg); padding: 1.5rem; transition: background 0.35s; }
.concept-title {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}
.concept-body { font-size: 0.88rem; color: var(--text2); line-height: 1.7; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.related-grid-2col { grid-template-columns: repeat(2, 1fr); }
.related-card {
  background: var(--bg);
  padding: 1.8rem;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  position: relative;
}
.related-card:hover { background: var(--sidebar); }
.related-cat {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.6rem;
}
.related-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.related-excerpt { font-size: 0.85rem; color: var(--text2); line-height: 1.7; }
.related-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 0.65rem;
  color: var(--border-lt);
  transition: color 0.2s;
}
.related-card:hover .related-arrow { color: var(--accent); }

/* ──────────────────────────────────────────
   ARTICLE PAGE — PROSE
────────────────────────────────────────── */
.article-shell {
  display: grid;
  grid-template-columns: 10rem 1fr 14rem;
  min-height: calc(100vh - 60px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.article-margin {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.35s, border-color 0.35s;
}
.margin-cat {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}
.margin-divider { width: 20px; height: 1px; background: var(--border); margin: 0.8rem 0; }
.margin-meta {
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  line-height: 1.8;
}
.margin-reading {
  margin-top: auto;
  font-size: 0.52rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  align-self: flex-start;
  transform: rotate(180deg);
  opacity: 0.5;
}
.article-main {
  padding: 4rem 3.5rem;
  border-right: 1px solid var(--border);
  min-width: 0;
  transition: border-color 0.35s;
}
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.article-eyebrow {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.article-eyebrow::before { content: '§'; color: var(--border-lt); font-family: Lekton, monospace }
.article-h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 1.2rem; }
.article-lede {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.85;
  font-style: italic;
  max-width: 60ch;
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
}
.prose { max-width: 68ch; }

/* When prose content is rendered directly into .article-main (PHP renderer),
   constrain reading elements to the same measure without a wrapper class */
.article-main > h1,
.article-main > h2,
.article-main > h3,
.article-main > h4,
.article-main > p,
.article-main > ul,
.article-main > ol,
.article-main > pre {
  max-width: 68ch;
}
.article-main > h3{font-size:1.2em}


.prose h2 {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  margin: 3rem 0 1rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
  transition: border-color 0.35s;
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin: 2rem 0 0.7rem;
  scroll-margin-top: 80px;
}
.prose p { font-size: 1rem; color: var(--text2); line-height: 1.9; margin-bottom: 1.2rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s; }
.prose a:hover { color: var(--accent-hover); }
.sheet-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  padding: 1.4rem 1.8rem;
  margin: 2.5rem 0;
  background: var(--sidebar);
  gap: 1.5rem;
  transition: background 0.35s, border-color 0.35s;
}
.sheet-cta-label {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.3rem;
}
.sheet-cta-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.05rem;
  color: var(--text);
}
.section-marker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
}
.section-marker-line { flex: 1; height: 1px; background: var(--border); }
.section-marker-label {
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.article-footer {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  transition: border-color 0.35s;
}
.article-footer-label {
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1.5rem;
}

/* ──────────────────────────────────────────
   TABLE OF CONTENTS
────────────────────────────────────────── */
.toc-column { padding: 3rem 1.5rem; }
.toc-sticky { position: sticky; top: 80px; }
.toc-label {
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.toc-list a {
  font-size: 0.7rem;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1.5;
  padding: 0.35rem 0.6rem;
  display: block;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.toc-list a:hover,
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); }
.toc-list li.sub a { padding-left: 1.2rem; font-size: 0.7rem; }
.toc-divider { height: 1px; background: var(--border); margin: 1.2rem 0; transition: background 0.35s; }
.toc-cta {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  padding: 1rem;
  margin-top: 1.5rem;
}
.toc-cta-label {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
}
.toc-cta-text { font-size: 0.82rem; color: var(--text2); line-height: 1.6; margin-bottom: 0.8rem; }
.toc-cta a {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}
.toc-cta a:hover { color: var(--accent-hover); }

/* ──────────────────────────────────────────
   PILLAR PAGE
────────────────────────────────────────── */
.pillar-hero {
  display: grid;
  grid-template-columns: 10rem 1fr 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 52vh;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s;
}
.pillar-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent, transparent 47px,
    var(--border) 47px, var(--border) 48px
  );
  opacity: 0.2;
  pointer-events: none;
}
.pillar-hero-margin {
  border-right: 1px solid var(--red-margin);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
  transition: background 0.35s, border-color 0.35s;
}
.pillar-hero-content {
  padding: 4rem 3.5rem 4rem 2.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.35s;
}
.pillar-eyebrow {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.pillar-eyebrow::before { content: '§'; color: var(--border-lt); font-family: Lekton, monospace }
.pillar-h1 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: 1.5rem; }
.pillar-h1 .script-accent {
  font-size: 1em;
  color: var(--accent);
  display: block;
  line-height: 1.1;
  margin-bottom: 0.1em;
}
.pillar-lede { font-size: 0.95rem; color: var(--text2); line-height: 1.85; max-width: 50ch; margin-bottom: 2rem; }
.pillar-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.pillar-meta-item { display: flex; flex-direction: column; gap: 0.15rem; }
.pillar-meta-label { font-size: 0.55rem; color: var(--text3); letter-spacing: 0.1em; }
.pillar-meta-val { font-size: 0.7rem; color: var(--accent); letter-spacing: 0.06em; }
.pillar-hero-index {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.index-label {
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
  transition: border-color 0.35s;
}
.index-list { list-style: none; display: flex; flex-direction: column; }
.index-list li { border-bottom: 1px solid var(--border); transition: border-color 0.35s; }
.index-list li:last-child { border-bottom: none; }
.index-list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  text-decoration: none;
}
.index-num {
  font-size: 0.55rem;
  color: var(--border-lt);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  width: 2.5rem;
}
.index-item-title {
  font-family: 'Cormorant Upright', serif;
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.3;
  transition: color 0.15s;
}
.index-arrow {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--border-lt);
  flex-shrink: 0;
  transition: color 0.15s;
}
.index-list a:hover .index-item-title,
.index-list a:hover .index-arrow { color: var(--accent); }
.pillar-intro {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.pillar-intro-sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  transition: background 0.35s, border-color 0.35s;
}
.pillar-intro-content { padding: 3.5rem 3.5rem 3.5rem 3rem; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.intro-heading { font-size: 1.8rem; margin-bottom: 1rem; }
.intro-heading em { font-style: italic; color: var(--accent); }
.intro-body { font-size: 0.95rem; color: var(--text2); line-height: 1.9; }
.intro-body p + p { margin-top: 1rem; }
.pillar-section {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.pillar-section-sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  transition: background 0.35s, border-color 0.35s;
}
.pillar-section-content { padding: 3rem 3.5rem 3rem 3rem; }
.pillar-prose { max-width: 68ch; padding-bottom: 1.5rem; }
.pillar-prose p { font-size: 0.95rem; color: var(--text2); line-height: 1.9; margin-bottom: 1.1rem; }
.pillar-prose p:last-child { margin-bottom: 0; }
.pillar-prose strong { color: var(--text); }
.related-section {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s;
}
.related-sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 3rem 1.2rem;
  transition: background 0.35s, border-color 0.35s;
}
.related-content { padding: 3rem 3.5rem 3rem 3rem; }

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: background 0.35s;
}
.footer-main { display: grid; grid-template-columns: 10rem 2fr 1fr 1fr 1fr; }
.footer-cell {
  padding: 2.5rem 1.8rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.35s;
}
.footer-cell:last-child { border-right: none; }
.footer-brand {
  font-family: 'Cormorant Upright', serif;
  font-size: 1.05rem;
  color: var(--nav-logo);
  display: block;
  margin-bottom: 0.7rem;
}
.footer-tagline { font-size: 0.85rem; color: var(--nav-text); line-height: 1.7; }
.footer-col-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.1rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { font-size: 0.88rem; color: var(--nav-text); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--nav-logo); }
.footer-bottom {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-bottom-cell {
  padding: 0.9rem 1.8rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
}
.footer-bottom-cell:last-child { border-right: none; justify-content: flex-end; }
.footer-copy { font-size: 0.7rem; color: rgba(255,255,255,0.2); letter-spacing: 0.06em; }
.footer-script { font-size: 1.05rem; color: var(--accent); opacity: 0.55; }

/* ──────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────
   UTILITY
────────────────────────────────────────── */
.mono { font-size: 0.65rem; letter-spacing: 0.08em; color: var(--text3); }
.mono-accent { font-size: 0.65rem; letter-spacing: 0.08em; color: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE
   768px — tablet
   480px — mobile
══════════════════════════════════════════ */

/* ──────────────────────────────────────────
   HAMBURGER BUTTON
────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  padding: 0 8px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--nav-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ──────────────────────────────────────────
   NAV DRAWER
────────────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 99;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav-drawer-links {
  list-style: none;
}
.nav-drawer-links li {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-drawer-links a {
  display: block;
  padding: 1rem 1.5rem;
  font-family: Lekton, monospace
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--nav-text);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-drawer-links a:hover,
.nav-drawer-links a:focus {
  color: var(--nav-logo);
  background: rgba(255,255,255,0.04);
}
.nav-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  gap: 1rem;
}
/* Drawer top border */
.nav-drawer-links:first-child {
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ──────────────────────────────────────────
   768px — Tablet
────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav — hide links, show hamburger */
  nav {
    grid-template-columns: 1fr auto;
    padding: 0 1.5rem;
  }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: block; }
  /* theme toggle moves into drawer on tablet/mobile */
  .nav-right .theme-toggle { display: none; }

  /* Breadcrumb */
  .breadcrumb { padding: 0.8rem 1.5rem; }

  /* Hero — drop the margin column, keep content + demo */
  .hero-main {
    grid-template-columns: 1fr 1fr;
  }
  .hero-margin { display: none; }
  .hero-content { padding: 3.5rem 2.5rem; }
  .hero-demo    { padding: 2.5rem 2rem; }

  /* Hero strip — drop empty first cell */
  .hero-strip {
    grid-template-columns: repeat(4, 1fr);
  }
  .hero-strip-cell:first-child { display: none; }

  /* All sidebar+content section layouts → single column */
  .section,
  .pillar-intro,
  .pillar-section,
  .related-section,
  .page-cta,
  .cta-section {
    grid-template-columns: 1fr;
  }
  .section-sidebar,
  .pillar-intro-sidebar,
  .pillar-section-sidebar,
  .related-sidebar,
  .page-cta-sidebar,
  .cta-sidebar {
    display: none;
  }
  .section-content    { padding: 2.5rem 2rem; }
  .pillar-intro-content,
  .pillar-section-content,
  .related-content    { padding: 2.5rem 2rem; }
  .page-cta-content,
  .cta-content        { padding: 3rem 2rem; }

  /* Generator section — drop sidebar, stack left+right */
  .gen-section {
    grid-template-columns: 1fr;
  }
  .gen-sidebar { display: none; }
  .gen-left    { padding: 2.5rem 2rem; border-right: none; border-bottom: 1px solid var(--border); }
  .gen-right   { padding: 2rem; }

  /* Philosophy — stack */
  .philosophy-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Intro grid — stack */
  .intro-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Features — 2-col stays, fine at tablet */

  /* Audience — 3→2 */
  .audience-grid { grid-template-columns: repeat(2, 1fr); }

  /* Samples — 4→2 */
  .samples-grid { grid-template-columns: repeat(2, 1fr); }

  /* Articles — 3→2 */
  .articles-grid { grid-template-columns: repeat(2, 1fr); }

  /* Child pages — 3→2 */
  .child-grid { grid-template-columns: repeat(2, 1fr); }

  /* Related — 3→2 */
  .related-grid { grid-template-columns: repeat(2, 1fr); }

  /* Article shell — drop TOC column */
  .article-shell {
    grid-template-columns: 1fr;
  }
  .article-margin { display: none; }
  .article-main   { padding: 2.5rem 2rem; border-right: none; }
  .toc-column     { display: none; }

  /* Pillar hero — drop margin column */
  .pillar-hero {
    grid-template-columns: 1fr 1fr;
  }
  .pillar-hero-margin { display: none; }
  .pillar-hero-content { padding: 3rem 2rem; }
  .pillar-hero-index   { padding: 2.5rem 2rem; }

  /* Footer — collapse to 2-col */
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    grid-template-columns: 1fr auto;
  }
  .footer-bottom-cell:first-child { display: none; }
}

/* ──────────────────────────────────────────
   480px — Mobile
────────────────────────────────────────── */
@media (max-width: 480px) {

  /* Nav */
  nav { padding: 0 1rem; height: 54px; }
  .nav-drawer { top: 54px; }
  .nav-right .nav-cta { display: none; }

  /* Breadcrumb */
  .breadcrumb { padding: 0.7rem 1rem; }

  /* Hero — fully stacked */
  .hero-main {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 3rem 1.25rem 2rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .hero-demo { padding: 2rem 1.25rem; }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }

  /* Hero strip — 2-col */
  .hero-strip { grid-template-columns: repeat(2, 1fr); }

  /* Sections */
  .section-content    { padding: 2rem 1.25rem; }
  .gen-left           { padding: 2rem 1.25rem; }
  .gen-right          { padding: 1.5rem 1.25rem; }
  .pillar-intro-content,
  .pillar-section-content,
  .related-content    { padding: 2rem 1.25rem; }
  .page-cta-content,
  .cta-content        { padding: 2rem 1.25rem; }
  .article-main       { padding: 2rem 1.25rem; }

  /* Features — 2→1 */
  .features-grid { grid-template-columns: 1fr; }

  /* Audience — 2→1 */
  .audience-grid { grid-template-columns: 1fr; }

  /* Samples — 2→1 */
  .samples-grid { grid-template-columns: 1fr; }
  .sample-thumb { height: 100px; }

  /* Articles — 2→1 */
  .articles-grid { grid-template-columns: 1fr; }

  /* Child — 2→1 */
  .child-grid,
  .child-grid-2 { grid-template-columns: 1fr; }

  /* Concept — 2→1 */
  .concept-grid { grid-template-columns: 1fr; }

  /* Related — 2→1 */
  .related-grid,
  .related-grid-2col { grid-template-columns: 1fr; }

  /* Pillar hero — fully stacked */
  .pillar-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .pillar-hero-content {
    padding: 2.5rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pillar-hero-index { padding: 2rem 1.25rem; }

  /* Page CTA — stack text + buttons */
  .page-cta-content,
  .cta-content {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Sheet CTA — stack */
  .sheet-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Footer — 1-col */
  .footer-main {
    grid-template-columns: 1fr;
  }
  .footer-cell { border-right: none; }
  .footer-bottom {
    grid-template-columns: 1fr;
  }
  .footer-bottom-cell:last-child {
    justify-content: flex-start;
    border-right: none;
  }

  /* Typography tightening */
  .hero-body    { font-size: 0.95rem; }
  .prose p      { font-size: 0.95rem; }
  .pillar-lede  { font-size: 0.9rem; }
  .gen-body     { font-size: 0.9rem; }
}
