/* ═══════════════════════════════════════════════════════════════════════════
   2014P_ — universal stylesheet (cream editorial)
   v2 · May 2026 · single source of truth
   Used by every page: index, codex, codex-alt, deck, all essay pages.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Melodrama';
  src: url('../fonts/melodrama/Melodrama-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

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

:root {
  /* light-cream tokens */
  --cream:       #F4EFE2;
  --cream-soft:  #ECE5D0;
  --cream-deep:  #E1D7BC;
  --ink:         #1F1B14;
  --mid:         #6B5F4F;
  --faint:       #9A8C77;
  --rule:        rgba(31,27,20,0.12);
  --rule-strong: rgba(31,27,20,0.22);
  --saffron:     #C97322;
  --gold:        #B8862E;

  /* tile palette — per-essay color identity */
  --tile-saffron: #C97322;
  --tile-ochre:   #B8862E;
  --tile-coral:   #C56544;
  --tile-mauve:   #8C6A85;
  --tile-slate:   #5E7A9C;
  --tile-forest:  #4F6B53;
  --tile-olive:   #7A8559;
  --tile-brown:   #6B4F38;

  /* back-compat aliases (some inline styles still reference these names) */
  --bg:       var(--cream);
  --bg-soft:  var(--cream-soft);

  /* Devanagari falls back to Noto Serif Devanagari for proper Sanskrit glyph rendering */
  --serif: 'Melodrama', 'Noto Serif Devanagari', 'Georgia', serif;
  --sans:  'Outfit', 'Noto Sans Devanagari', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;
}

/* Visible focus rings — accessibility baseline */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
  border-radius: 2px;
}

html { color-scheme: light; scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper-noise overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 320 320' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 320px 320px;
}

a { color: inherit; text-decoration: none; }

.w        { max-width: 1280px; margin: 0 auto; padding: 0 2.5rem; }
.w-narrow { max-width: 780px;  margin: 0 auto; padding: 0 2.5rem; }
.w-mid    { max-width: 1040px; margin: 0 auto; padding: 0 2.5rem; }

.label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
  padding-left: 0.85rem;
  border-left: 2px solid var(--saffron);
  display: inline-block;
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ═══════════ MARQUEE ═══════════ */
.marquee {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}
.marquee-track {
  display: flex; width: max-content;
  padding: 11px 0;
  animation: marquee-scroll 42s linear infinite;
  will-change: transform;
}
.marquee-item {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 2.2rem;
  white-space: nowrap;
  color: var(--cream);
}
.marquee-item .dot { color: var(--saffron); margin-right: 2rem; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ═══════════ HEADER ═══════════ */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,239,226,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem 0;
}
.site-logo {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 500; letter-spacing: 0.005em;
  color: var(--ink);
}
.site-logo small {
  font-family: var(--mono);
  font-size: 0.65rem; font-weight: 400;
  color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase;
  margin-left: 0.55rem;
}
.site-nav { display: flex; align-items: center; gap: 1.85rem; }
.site-nav a {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--saffron); }
.site-nav-soon {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  color: var(--faint);
  font: inherit;
  text-decoration: none;
  cursor: default;
  user-select: none;
}
.site-nav-soon small {
  font-size: 0.72em;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* ── Dropdown menus (nested nav) ─────────────────────────── */
.site-nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.site-nav-menu-trigger {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  transition: color 0.2s;
}
.site-nav-menu-trigger:hover,
.site-nav-menu:hover .site-nav-menu-trigger,
.site-nav-menu:focus-within .site-nav-menu-trigger { color: var(--ink); }
.site-nav-menu-trigger.active { color: var(--saffron); }
.site-nav-menu.is-soon .site-nav-menu-trigger { color: var(--faint); cursor: default; }
.site-nav-menu.is-soon:hover .site-nav-menu-trigger,
.site-nav-menu.is-soon:focus-within .site-nav-menu-trigger { color: var(--mid); }
.site-nav-menu-trigger small {
  font-size: 0.72em; letter-spacing: 0.04em; opacity: 0.7;
  text-transform: none;
}
.site-nav-menu-trigger .chev {
  font-size: 0.8em; line-height: 1;
  transition: transform 0.2s ease;
}
.site-nav-menu:hover .site-nav-menu-trigger .chev,
.site-nav-menu:focus-within .site-nav-menu-trigger .chev { transform: rotate(180deg); }

.site-nav-menu-panel {
  position: absolute;
  top: 100%; left: 0;
  min-width: 200px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.5rem 0;
  margin-top: 0.4rem;
  box-shadow: 0 6px 22px rgba(31,27,20,0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 120;
}
.site-nav-menu:hover .site-nav-menu-panel,
.site-nav-menu:focus-within .site-nav-menu-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav-menu-item {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
a.site-nav-menu-item:hover { background: rgba(201,115,34,0.08); color: var(--saffron); }
.site-nav-menu-item.is-soon {
  color: var(--faint); cursor: default; user-select: none;
}
.site-nav-menu-item.is-soon-link {
  color: var(--mid);
}
a.site-nav-menu-item.is-soon-link:hover {
  background: rgba(201,115,34,0.06);
  color: var(--saffron);
}
.site-nav-menu-item.is-soon small,
.site-nav-menu-item.is-soon-link small {
  font-size: 0.78em; opacity: 0.7; margin-left: 0.3em;
  text-transform: none; letter-spacing: 0.04em;
}

.site-nav .cta {
  color: var(--saffron);
  border: 1px solid rgba(201,115,34,0.5);
  padding: 7px 14px; border-radius: 3px;
  font-size: 0.66rem; letter-spacing: 0.1em;
  transition: background 0.2s;
}
.site-nav .cta:hover { background: rgba(201,115,34,0.1); }

/* ═══════════ ESSAY HERO ═══════════ */
.essay-hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.essay-hero.with-art { padding-bottom: 0; }

.essay-breadcrumb {
  display: flex; gap: 0.55rem; align-items: baseline;
  font-family: var(--mono);
  font-size: 0.7rem; color: var(--faint);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 2rem;
}
.essay-breadcrumb a {
  color: var(--mid); border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.essay-breadcrumb a:hover { color: var(--saffron); border-color: var(--saffron); }
.essay-breadcrumb span.sep { color: var(--rule-strong); }

.essay-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.0;
  margin-bottom: 1.6rem;
  max-width: 18ch;
  color: var(--ink);
}
.essay-title em { color: var(--saffron); font-style: normal; }
.essay-title .sanskrit {
  display: block; font-size: 0.5em;
  color: var(--mid); letter-spacing: 0;
  margin-top: 0.6rem; font-weight: 400;
}

.essay-dek {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 400; font-style: italic;
  color: var(--mid);
  line-height: 1.5;
  max-width: 46ch;
}

.essay-meta {
  display: flex; gap: 0.9rem; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.7rem; color: var(--faint);
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-top: 2rem;
}
.essay-meta span { display: inline-block; }
.essay-meta .dot { color: var(--rule-strong); }

/* essay-hero-art is now a <figure> with a real <img> inside — slide content fully visible */
figure.essay-hero-art {
  margin: 3rem auto 0;
  max-width: 1040px;
  padding: 0 2.5rem;
}
figure.essay-hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--rule-strong);
  background: var(--cream-soft);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
figure.essay-hero-art img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31,27,20,0.1);
}
@media (max-width: 600px) {
  figure.essay-hero-art { padding: 0 1.25rem; }
}

/* ═══════════ TL;DR ═══════════ */
.tldr {
  background: var(--cream-soft);
  border-left: 3px solid var(--saffron);
  padding: 1.5rem 1.7rem;
  margin: 3rem 0 3.5rem;
  border-radius: 0 3px 3px 0;
}
.tldr-label {
  font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--saffron); margin-bottom: 0.6rem; display: block;
  font-weight: 500;
}
.tldr-body {
  font-family: var(--serif);
  font-size: 1.08rem; line-height: 1.6; color: var(--ink);
  font-weight: 400;
}
.tldr-body strong { font-weight: 500; color: var(--saffron); }
.tldr-body em { font-style: italic; color: var(--mid); }
.tldr-body a {
  color: var(--saffron); border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 1px;
}

/* ── authored definition callout (for coined terms) ── */
.defn {
  margin: 2.4rem 0 3rem;
  padding: 1.8rem 2rem 1.6rem;
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--saffron);
  background: #fff;
  border-radius: 2px;
}
.defn-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.defn-body {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 0.9rem;
  font-weight: 400;
}
.defn-body em { color: var(--ink); font-style: italic; }
.defn-attrib {
  font-family: var(--mono);
  font-size: 0.72rem; line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--mid);
  margin: 0;
}

/* ═══════════ ESSAY BODY ═══════════ */
.essay-body { padding: 0 0 5rem; }
.essay-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.18;
  margin: 3rem 0 1.2rem;
  color: var(--ink);
}
.essay-body h2 em, .essay-body h3 em { color: var(--saffron); font-style: normal; }
.essay-body h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 2.2rem 0 0.8rem;
  color: var(--ink);
}
.essay-body h2 + p, .essay-body h3 + p { margin-top: 0; }
.essay-body p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--mid);
  margin-bottom: 1.2rem;
}
.essay-body p strong { color: var(--ink); font-weight: 500; }
.essay-body p em { color: var(--ink); font-style: italic; }
.essay-body p code {
  font-family: var(--mono);
  font-size: 0.9em; color: var(--gold);
  background: rgba(184,134,46,0.1);
  padding: 0.05em 0.45em; border-radius: 2px;
}
.essay-body a {
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.essay-body a:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.essay-body blockquote {
  border-left: 2px solid var(--saffron);
  padding: 0.4rem 0 0.4rem 1.5rem;
  margin: 1.8rem 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.essay-body blockquote cite {
  display: block; margin-top: 0.6rem;
  font-family: var(--mono); font-size: 0.74rem; font-style: normal;
  color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase;
}
.essay-body ul, .essay-body ol {
  margin: 0 0 1.3rem 0; padding: 0; list-style: none;
}
.essay-body li {
  font-size: 1rem; line-height: 1.78; color: var(--mid);
  padding-left: 1.5rem; position: relative;
  margin-bottom: 0.55rem;
}
.essay-body li strong { color: var(--ink); font-weight: 500; }
.essay-body ul > li::before {
  content: '·'; color: var(--saffron);
  position: absolute; left: 0.5rem; top: -0.05em;
  font-size: 1.5em; font-weight: 600;
}
.essay-body ol { counter-reset: olc; }
.essay-body ol > li { counter-increment: olc; }
.essay-body ol > li::before {
  content: counter(olc) '.';
  color: var(--saffron); font-family: var(--serif);
  position: absolute; left: 0; top: 0; font-size: 0.95em;
}
.essay-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.6rem 0 2rem; font-size: 0.92rem;
  background: var(--cream-soft);
}
.essay-body th, .essay-body td {
  text-align: left; padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
.essay-body th {
  color: var(--ink); font-weight: 500;
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--cream-deep);
}
.essay-body td { color: var(--mid); line-height: 1.6; }
.essay-body td strong { color: var(--ink); font-weight: 500; }

.essay-body figure { margin: 2.4rem 0; }
.essay-body figure img {
  width: 100%; height: auto; display: block;
  border-radius: 3px; border: 1px solid var(--rule-strong);
  background: var(--cream-soft);
}
.essay-body figcaption {
  font-family: var(--mono);
  font-size: 0.72rem; color: var(--faint);
  letter-spacing: 0.08em; margin-top: 0.7rem;
  line-height: 1.6; text-align: center;
}

/* ═══════════ PULL QUOTE ═══════════ */
.pull {
  margin: 3rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  letter-spacing: -0.008em;
}
.pull em { color: var(--saffron); font-style: normal; }

/* ═══════════ FAQ (AEO) ═══════════ */
.faq {
  padding: 3.5rem 0 1rem;
  border-top: 1px solid var(--rule);
}
.faq-head { margin-bottom: 2.2rem; }
.faq-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 500; letter-spacing: -0.012em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.faq-item {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-q {
  font-family: var(--serif);
  font-size: 1.18rem; font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.7rem;
  line-height: 1.35;
}
.faq-a {
  font-size: 0.98rem; line-height: 1.78; color: var(--mid);
}
.faq-a strong { color: var(--ink); font-weight: 500; }
.faq-a a { color: var(--saffron); border-bottom: 1px solid rgba(201,115,34,0.4); padding-bottom: 1px; }

/* ═══════════ RELATED GRID (essay sibling-cards) ═══════════ */
.related {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--rule);
}
.related-head { margin-bottom: 1.8rem; }
.related-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.related-head p {
  font-size: 0.88rem; color: var(--faint); max-width: 50ch; line-height: 1.6;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.related-item {
  background: var(--cream);
  padding: 1.4rem 1.4rem 1.5rem;
  display: block;
  transition: background 0.2s;
  border: none;
}
.related-item:hover { background: var(--cream-soft); }
.related-item .ri-label {
  font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--saffron);
  margin-bottom: 0.55rem;
}
.related-item .ri-name {
  font-family: var(--serif);
  font-size: 1.05rem; font-weight: 500;
  margin-bottom: 0.4rem; color: var(--ink);
  letter-spacing: -0.005em;
}
.related-item .ri-line {
  font-size: 0.82rem; color: var(--mid); line-height: 1.65;
}
/* if related-item is a link, override the global a styling */
.essay-body a.related-item, a.related-item {
  border-bottom: none;
}

/* ═══════════ ENGAGE BAND (dark counter-rhythm) ═══════════ */
.engage-band {
  padding: 5rem 0;
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid var(--ink);
}
.engage-band-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}
.engage-band h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: var(--cream);
}
.engage-band h2 em { color: var(--saffron); font-style: normal; }
.engage-band p {
  font-size: 0.96rem;
  color: rgba(244,239,226,0.72);
  line-height: 1.75; max-width: 42ch;
}
.engage-band p.fine {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: rgba(244,239,226,0.46);
  line-height: 1.65;
  max-width: 52ch;
}
.engage-band .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.3rem; }
.engage-band .cta-pri {
  background: var(--saffron); color: #fff;
  padding: 12px 22px; border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.engage-band .cta-pri:hover { opacity: 0.88; }
.engage-band .cta-sec {
  color: var(--cream); padding: 12px 22px; border-radius: 3px;
  border: 1px solid rgba(244,239,226,0.3);
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.engage-band .cta-sec:hover { border-color: var(--saffron); color: var(--saffron); }

/* ═══════════ FOOTER ═══════════ */
footer.site-footer {
  padding: 2.2rem 0;
  background: var(--cream-soft);
  border-top: 1px solid var(--rule);
}
footer.site-footer > .w {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 0.66rem; color: var(--faint);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.66rem; color: var(--mid);
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--saffron); }

/* ═══════════ SITEMAP (rich footer) ═══════════ */
.site-sitemap {
  padding: 4rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  background: var(--cream-soft);
}
.site-sitemap-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2.4rem;
}
.site-sitemap-head h3 {
  font-family: var(--serif);
  font-size: 1.6rem; font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.site-sitemap-head h3 em { color: var(--saffron); font-style: normal; }
.site-sitemap-head a {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.site-sitemap-head a:hover { color: var(--gold); }
.site-sitemap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
}
.sitemap-col h4 {
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.95rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}
.sitemap-col h4:not(:first-child) { margin-top: 1.6rem; }
.sitemap-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--mid);
  padding: 0.32rem 0;
  line-height: 1.45;
  transition: color 0.2s, padding-left 0.2s;
}
.sitemap-col a:hover {
  color: var(--saffron);
  padding-left: 4px;
}
.sitemap-col a.is-active {
  color: var(--ink); font-weight: 500;
  border-left: 2px solid var(--saffron);
  padding-left: 8px;
}
.site-sitemap-foot {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr auto;
  gap: 1.5rem; align-items: center;
}
.site-sitemap-foot p {
  font-size: 0.82rem;
  color: var(--faint);
  line-height: 1.7;
  max-width: 60ch;
  font-style: italic;
}
.site-sitemap-foot p a {
  color: var(--mid);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.site-sitemap-foot p a:hover { color: var(--saffron); border-color: var(--saffron); }
.site-sitemap-foot-cta a {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  border: 1px solid rgba(201,115,34,0.5);
  padding: 9px 16px; border-radius: 3px;
  transition: background 0.2s;
  white-space: nowrap;
}
.site-sitemap-foot-cta a:hover { background: rgba(201,115,34,0.1); }

/* ═══════════ CODEX (legacy two-col card grid) ═══════════ */
.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 3rem;
}
.codex-card {
  background: var(--cream);
  padding: 2rem 2rem 2.2rem;
  display: block; position: relative;
  transition: background 0.2s;
  border: none;
}
.codex-card:hover { background: var(--cream-soft); }
.codex-card-label {
  font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--saffron);
  margin-bottom: 0.9rem;
}
.codex-card-name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 500; line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink); margin-bottom: 0.55rem;
}
.codex-card-name .sanskrit {
  display: block; font-size: 0.5em;
  color: var(--mid); margin-top: 0.3rem; letter-spacing: 0;
}
.codex-card-dek {
  font-family: var(--serif);
  font-style: italic; color: var(--mid);
  font-size: 1rem; line-height: 1.5; margin-bottom: 1rem;
  max-width: 36ch;
}
.codex-card-line {
  font-size: 0.85rem; line-height: 1.65; color: var(--mid);
}
.codex-card-cta {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
}

/* ═══════════ CARDS (codex-alt tile system) ═══════════ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.7rem 1.5rem 1.5rem;
  border-radius: 4px;
  overflow: hidden;
  min-height: 280px;
  background: var(--tile-color, var(--tile-saffron));
  color: #FAF6E8;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
  border: none;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n2'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n2)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  z-index: 0;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(31,27,20,0.14);
}
.card > * { position: relative; z-index: 1; }
.card-eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 0.8rem;
}
.card-title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.008em;
  margin-bottom: 0.55rem;
}
.card-title .sanskrit {
  display: block;
  font-size: 0.62em;
  opacity: 0.78;
  margin-top: 0.3rem;
  letter-spacing: 0;
}
.card-dek {
  font-size: 0.86rem;
  line-height: 1.55;
  opacity: 0.92;
  margin-bottom: 0.8rem;
}
.card-line {
  font-size: 0.76rem;
  line-height: 1.55;
  opacity: 0.74;
  margin-bottom: auto;
}
.card-cta {
  font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(250,246,232,0.28);
  transition: letter-spacing 0.2s;
}
.card:hover .card-cta { letter-spacing: 0.18em; }

.card.with-art { padding-bottom: 0; min-height: 360px; }
.card-art {
  position: relative;
  margin: 1rem -1.5rem 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(31,27,20,0.18);
  transition: transform 0.4s ease;
}
.card-art img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0.95;
}
.card.with-art:hover .card-art { transform: scale(1.04); }

.t-saffron { --tile-color: var(--tile-saffron); }
.t-ochre   { --tile-color: var(--tile-ochre); }
.t-coral   { --tile-color: var(--tile-coral); }
.t-mauve   { --tile-color: var(--tile-mauve); }
.t-slate   { --tile-color: var(--tile-slate); }
.t-forest  { --tile-color: var(--tile-forest); }
.t-olive   { --tile-color: var(--tile-olive); }
.t-brown   { --tile-color: var(--tile-brown); }

/* ═══════════ SECTION HEAD ═══════════ */
.section-band {
  padding: 5.5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 3rem; align-items: end;
  margin-bottom: 3rem;
}
.section-head.solo { grid-template-columns: 1fr; }
.section-head-num {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.9rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.section-head h2 em { color: var(--saffron); font-style: normal; }
.section-head h2 .h2-sub {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--mid);
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.section-head .h2-link {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-head .h2-link a {
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.section-head .h2-link a:hover { color: var(--ink); }
.section-head p {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 50ch;
}

/* ── Adventures / studio card grid (shared with index) ── */
.adventures {
  padding: 6rem 0;
  border-bottom: 1px solid var(--rule);
}
.adventures-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2.75rem;
}
.adventures-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.1;
  color: var(--ink);
}
.adventures-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  max-width: 40ch;
  line-height: 1.6;
  letter-spacing: 0.03em;
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.adv {
  background: var(--cream);
  padding: 1.6rem 1.5rem;
  transition: background 0.2s;
}
.adv:hover { background: var(--cream-soft); }
.adv-name {
  font-family: var(--serif);
  font-size: 1.1rem; font-weight: 500;
  margin-bottom: 0.45rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.adv-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--saffron);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.adv-line {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.7;
}
.adv-arch {
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.08em;
  display: flex; gap: 0.6rem; align-items: center;
}
.adv-arch a {
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.adv-arch a:hover { color: var(--gold, var(--saffron)); }

@media (max-width: 900px) {
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .adv-grid { grid-template-columns: 1fr; }
}

/* ═══════════ DESK LIST (flat typography, no card chrome) ═══════════ */
.desk-set {
  margin-top: 2rem;
}
.desk-set + .desk-set { margin-top: 3rem; }
.desk-set-head {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 0.7rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.desk-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.6rem 3.5rem;
}
.desk-row-wide { grid-column: 1 / -1; }
.desk-name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 0.55rem;
  line-height: 1.25;
}
.desk-line {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .desk-list { grid-template-columns: 1fr; gap: 1.8rem; }
  .desk-row-wide { grid-column: auto; }
}

/* ═══════════ LADDER (price / engagement) ═══════════ */
.ladder {
  border-top: 1px solid var(--rule);
  margin-top: 0.5rem;
}
.ladder-row {
  display: grid;
  grid-template-columns: 12rem 13rem 1fr 5.5rem;
  gap: 2rem;
  padding: 1.8rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  transition: background 0.2s;
}
.ladder-row:hover { background: var(--cream-soft); }
.ladder-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  white-space: nowrap;
}
.ladder-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--ink);
  line-height: 1.2;
}
.ladder-line {
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.65;
}
.ladder-cta { text-align: right; }
.ladder-cta a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  white-space: nowrap;
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.ladder-cta a:hover { color: var(--ink); }
.ladder-note {
  margin-top: 2.2rem;
  font-size: 0.88rem;
  color: var(--faint);
  line-height: 1.75;
  max-width: 65ch;
  font-style: italic;
}
.lede-body {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.8;
  max-width: 68ch;
}

@media (max-width: 900px) {
  .ladder-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0.25rem;
  }
  .ladder-cta { text-align: left; margin-top: 0.4rem; }
  .ladder-meta { font-size: 0.68rem; }
  .ladder-name { font-size: 1.15rem; }
}

.subcluster-head {
  margin: 3rem 0 1.4rem;
  display: flex; align-items: baseline; gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}
.subcluster-head h3 {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.subcluster-head h3 em { color: var(--saffron); font-style: normal; }
.subcluster-head .tag {
  font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.subcluster-head p {
  font-size: 0.86rem; color: var(--mid);
  line-height: 1.6;
  flex: 1 0 100%;
  margin-top: 0.3rem;
  max-width: 60ch;
}

/* ═══════════ FILMSTRIP ═══════════ */
.filmstrip-band {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--rule);
  background: var(--cream-soft);
}
.filmstrip-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.8rem;
}
.filmstrip-head h3 {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.filmstrip-head h3 em { color: var(--saffron); font-style: normal; }
.filmstrip-head a {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
}
.filmstrip {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.filmstrip::-webkit-scrollbar { height: 6px; }
.filmstrip::-webkit-scrollbar-track { background: var(--cream-deep); }
.filmstrip::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 3px; }
.filmstrip a {
  flex: 0 0 180px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--ink);
  scroll-snap-align: start;
  transition: transform 0.2s, border-color 0.2s;
}
.filmstrip a:hover {
  transform: translateY(-2px);
  border-color: var(--saffron);
}
.filmstrip img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0.94;
}
.filmstrip-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 9px;
  background: linear-gradient(180deg, transparent, rgba(31,27,20,0.78));
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--cream);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

/* ═══════════ VIDEO BAND ═══════════ */
.video-band {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rule);
  background: var(--cream-soft);
}
.video-grid {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 3rem; align-items: center;
}
.video-grid h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500; line-height: 1.1;
  letter-spacing: -0.012em;
  margin-bottom: 0.8rem;
  color: var(--ink);
}
.video-grid h2 em { color: var(--saffron); font-style: normal; }
.video-grid p {
  font-size: 0.95rem; color: var(--mid); line-height: 1.75;
  max-width: 42ch;
}
.video-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.8rem;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 8px 32px rgba(31,27,20,0.08);
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ═══════════ HOW-TO ═══════════ */
.howto {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.howto-grid {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 4rem;
}
.howto-sidekick {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron);
  padding-top: 0.5rem;
  border-top: 2px solid var(--saffron);
  align-self: start;
}
.howto-body {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}
.howto-body strong { color: var(--saffron); font-weight: 500; }
.howto-body em { font-style: italic; color: var(--mid); }
.howto-body a {
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 1px;
}

/* ═══════════ INTERLUDE ═══════════ */
.interlude {
  padding: 5rem 0;
  background: var(--cream-soft);
  border-bottom: 1px solid var(--rule);
}
.interlude-grid {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 3rem; align-items: center;
}
.interlude-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.9rem;
}
.interlude h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 500; line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.interlude h2 em { color: var(--saffron); font-style: normal; }
.interlude p {
  font-size: 0.95rem; color: var(--mid);
  line-height: 1.75; max-width: 42ch;
  margin-bottom: 1.4rem;
}
.interlude .cta {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 2px;
}
.interlude-img {
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(31,27,20,0.08);
}
.interlude-img img { width: 100%; height: auto; display: block; }

/* ═══════════ ORIGINS BAND ═══════════ */
.origins {
  padding: 5rem 0;
  border-bottom: 1px solid var(--rule);
}
.origins h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.8vw, 2.2rem);
  font-weight: 500; line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
  color: var(--ink);
}
.origins h2 em { color: var(--saffron); font-style: normal; }
.origins p {
  font-size: 0.96rem; color: var(--mid);
  line-height: 1.78; max-width: 64ch;
  margin-bottom: 1rem;
}
.origins p a, .origins ul li a {
  color: var(--saffron);
  border-bottom: 1px solid rgba(201,115,34,0.4);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.origins p a:hover, .origins ul li a:hover { color: var(--gold); }
.origins ul {
  list-style: none;
  margin: 1.2rem 0 1.8rem;
  max-width: 64ch;
}
.origins ul li {
  font-size: 0.92rem; color: var(--mid);
  line-height: 1.75;
  padding: 0.6rem 0 0.6rem 1.6rem;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.origins ul li::before {
  content: '§';
  position: absolute; left: 0; top: 0.65rem;
  font-family: var(--serif);
  color: var(--saffron);
}
.origins ul li a { color: var(--ink); }
.origins ul li a:hover { color: var(--saffron); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .cards, .cards-2, .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .engage-band-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .codex-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .howto-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .interlude-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .site-sitemap-foot { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .w, .w-narrow, .w-mid { padding: 0 1.25rem; }
  .cards, .cards-2, .cards-3 { grid-template-columns: 1fr; }
  .essay-hero { padding: 3.5rem 0 3rem; }
  .site-nav .hide-sm { display: none; }
  .site-nav { gap: 1rem; }
  .site-sitemap-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .site-sitemap { padding: 3rem 0 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card-art { transition: none; }
}

/* ═══════════ DECK THUMBNAIL GRID (shared by codex + deck) ═══════════ */
.deck-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 2.4rem 0 4rem;
}
.deck-thumb {
  display: flex; flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.deck-thumb:hover {
  border-color: var(--saffron);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(31,27,20,0.08);
}
.deck-thumb-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream-soft);
  overflow: hidden;
}
.deck-thumb-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.deck-thumb-cap {
  padding: 0.85rem 0.95rem 1rem;
  display: flex; flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.deck-thumb-eyebrow {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--saffron);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.deck-thumb-line {
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.5;
}
@media (max-width: 600px) {
  .deck-thumbs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .deck-thumb-eyebrow { font-size: 0.95rem; }
  .deck-thumb-line { font-size: 0.74rem; }
}

/* ═══════════ TABLE OF CONTENTS — smart rail (auto-generated) ═══════════ */
/* Wide screens (≥1280px): permanent right-side rail, always visible. */
/* Narrower screens: hidden by default; "Contents" fab pill opens an overlay. */
.toc-rail {
  position: fixed;
  right: 24px;
  top: 100px;
  width: 240px;
  max-height: calc(100vh - 140px);
  background: var(--cream-soft);
  border: 1px solid var(--rule);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  z-index: 60;
  box-shadow: 0 4px 20px rgba(31,27,20,0.05);
}
.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.toc-eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
  font-weight: 500;
}
.toc-close {
  display: none; /* hidden in desktop rail mode */
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.45rem; line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  margin-right: -4px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.toc-close:hover { background: var(--saffron); color: #fff; border-color: var(--saffron); }
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0.55rem 1.2rem 1rem;
  overflow-y: auto;
  flex: 1;
}
.toc-list li { padding: 0; margin: 0; border: none; }
.toc-list li::before { display: none; }
.toc-list a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.7rem;
  margin-left: -0.7rem;
  color: var(--mid);
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.45;
  border: none;
  border-left: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s, padding-left 0.18s;
}
.toc-list a:hover {
  color: var(--saffron);
  padding-left: 1rem;
}
.toc-list a.toc-active {
  color: var(--ink);
  border-left-color: var(--saffron);
  font-weight: 500;
}

/* Floating "Contents" fab pill — visible only on narrower screens via media query below */
.toc-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 70;
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 12px 18px;
  background: var(--saffron);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(31,27,20,0.18);
  transition: transform 0.2s, opacity 0.2s;
}
.toc-fab:hover { transform: translateY(-2px); }
.toc-fab-icon { font-size: 0.95rem; line-height: 1; }
.toc-fab-label { font-weight: 500; }

/* Backdrop for the overlay mode */
.toc-backdrop {
  position: fixed; inset: 0;
  background: rgba(31,27,20,0.38);
  z-index: 65;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
body.toc-open .toc-backdrop { opacity: 1; pointer-events: auto; }

/* ── Narrower screens (<1280px): bottom-sheet pattern ── */
@media (max-width: 1279px) {
  .toc-rail {
    /* Anchored to the bottom of the viewport; slides up when toc-open. */
    display: flex;
    top: auto;
    right: 0; left: 0; bottom: 0;
    width: auto;
    max-height: 75vh;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    z-index: 80;
    transform: translateY(100%);
    transition: transform 0.28s ease-out;
    pointer-events: none;
    box-shadow: 0 -8px 30px rgba(31,27,20,0.18);
  }
  body.toc-open .toc-rail {
    transform: translateY(0);
    pointer-events: auto;
  }
  .toc-head {
    padding: 1rem 1.2rem 0.9rem;
  }
  .toc-list {
    padding: 0.6rem 1.2rem 2rem;
    /* Internal scroll if the list is long */
    -webkit-overflow-scrolling: touch;
  }
  .toc-list a { font-size: 0.92rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
  .toc-fab {
    display: inline-flex;
    z-index: 90; /* above the open sheet so tapping it always closes */
  }
  .toc-close { display: flex; }
  /* When the sheet is open, the fab visually flips to a close indicator. */
  body.toc-open .toc-fab {
    background: var(--ink);
    color: #fff;
  }
}
/* Phone — icon-only fab */
@media (max-width: 640px) {
  .toc-fab-label { display: none; }
  .toc-fab { padding: 14px; }
}

/* ═══════════ LIGHTBOX (slide popup with arrow nav) ═══════════ */
.lightbox {
  position: fixed; inset: 0;
  z-index: 10000;
  background: rgba(15,12,8,0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox-stage {
  position: relative;
  max-width: 1280px;
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.5);
  background: var(--cream-soft);
}
.lightbox-meta {
  display: flex; gap: 1.2rem; align-items: baseline;
  flex-wrap: wrap; justify-content: center;
  text-align: center;
  padding: 0 4rem;
  max-width: 70ch;
}
.lightbox-eyebrow {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--saffron);
  letter-spacing: -0.01em;
}
.lightbox-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: rgba(244,239,226,0.85);
  line-height: 1.5;
}
.lightbox-counter {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,239,226,0.45);
  margin-top: 0.4rem;
}
.lightbox button {
  background: transparent;
  border: 1px solid rgba(244,239,226,0.3);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lightbox button:hover {
  background: var(--saffron);
  border-color: var(--saffron);
  color: #fff;
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* zoom-in cursor hint for clickable slide thumbnails / hero art */
.lightbox-trigger { cursor: zoom-in; }

@media (max-width: 600px) {
  .lightbox { padding: 1rem; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.1rem; }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .lightbox-meta { padding: 0 0.5rem; }
  .lightbox-eyebrow { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

/* ═══════════ MARQUEE — pause on hover, dim once scrolled past ═══════════ */
.marquee { transition: opacity 0.4s ease; }
.marquee:hover .marquee-track { animation-play-state: paused; }
body.scrolled .marquee { opacity: 0.42; }
body.scrolled .marquee:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marquee { transition: none; }
}

/* ═══════════ SHARE ROW (auto-injected on essay pages) ═══════════ */
.share-row {
  margin: 3rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* margin-based spacing for broadest mobile browser compatibility */
  gap: 0.6rem 0.6rem; /* row column */
}
.share-row-label {
  font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron);
  margin: 0 0.4rem 0 0;
  flex: 0 0 auto;
}
/* Children — explicit resets so the .essay-body a underline/colour cascade
   cannot bleed in, and margin spacing in case gap is unsupported. */
.share-row a,
.share-row button,
.essay-body .share-row a,
.essay-body .share-row button {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 10px 16px;
  margin: 0; /* gap handles spacing; this resets any UA defaults */
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  display: inline-flex; align-items: center; gap: 0.4rem;
  flex: 0 0 auto;
  white-space: nowrap;
}
.share-row a:hover,
.share-row button:hover,
.essay-body .share-row a:hover {
  color: var(--saffron);
  border-color: var(--saffron);
  background: transparent;
}
.share-row .share-copied,
.essay-body .share-row .share-copied {
  color: var(--saffron);
  border-color: var(--saffron);
  background: rgba(201,115,34,0.08);
}

/* On phones, make the row scrollable horizontally if it does not fit one row.
   Avoids three buttons squished onto one line with no breathing room, and
   gives each button a 44px-ish tap target. */
@media (max-width: 640px) {
  .share-row {
    /* allow the row to wrap properly; vertical gap from gap shorthand */
    gap: 0.55rem 0.55rem;
  }
  .share-row a,
  .share-row button,
  .essay-body .share-row a,
  .essay-body .share-row button {
    padding: 12px 16px;
    font-size: 0.72rem;
    /* explicit margin fallback in case gap isn't honoured */
    margin: 0 0.15rem 0.15rem 0;
  }
  .share-row-label {
    flex-basis: 100%; /* label gets its own line, buttons share a wrapped row */
    margin-bottom: 0.2rem;
  }
}

/* ═══════════ READING PROGRESS BAR (essays) ═══════════ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--saffron);
  z-index: 200;
  transition: width 0.08s linear;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress { transition: none; }
}

/* ═══════════ MOBILE HAMBURGER NAV ═══════════ */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule-strong);
  padding: 8px 10px;
  border-radius: 3px;
  cursor: pointer;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--saffron); }
.nav-toggle-bars {
  display: inline-block;
  width: 18px; height: 14px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after,
.nav-toggle-bars span {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, top 0.2s, opacity 0.15s;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars span    { top: 50%; transform: translateY(-50%); }
.nav-toggle-bars::after  { bottom: 0; }
body.nav-open .nav-toggle-bars::before { top: 50%; transform: rotate(45deg); }
body.nav-open .nav-toggle-bars::after  { bottom: 50%; transform: rotate(-45deg); }
body.nav-open .nav-toggle-bars span    { opacity: 0; }

body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    top: 3.6rem; left: 0; right: 0;
    height: 50vh;
    background: var(--cream);
    padding: 1.2rem 1.5rem 1.6rem;
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transform: translateY(-100vh);
    transition: transform 0.28s ease;
    z-index: 99;
    box-shadow: 0 14px 28px rgba(31,27,20,0.12);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body.nav-open .site-nav { transform: translateY(0); }
  .site-nav a {
    display: block;
    width: 100%;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }
  .site-nav .hide-sm { display: block !important; }
  .site-nav .cta {
    margin-top: 0.9rem;
    width: auto;
    align-self: flex-start;
    border-bottom: 1px solid rgba(201,115,34,0.4);
    padding: 8px 14px;
  }

  /* Nested menus flatten into accordion in mobile drawer */
  .site-nav-menu {
    display: block;
    width: 100%;
  }
  .site-nav-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }
  .site-nav-menu-trigger .chev {
    transform: rotate(180deg);
    opacity: 0.4;
  }
  .site-nav-menu-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0 0 0.35rem 1.1rem;
    padding: 0.25rem 0;
    min-width: 0;
  }
  .site-nav-menu-item {
    padding: 0.42rem 0;
    border-bottom: 1px dashed rgba(31,27,20,0.08);
    font-size: 0.76rem;
  }
  .site-nav-menu-item:last-child { border-bottom: none; }
}

/* ═══════════ TRANSPARENT HEADER OVER DARK HERO (homepage) ═══════════ */
body.has-dark-hero header.site-header {
  background: transparent;
  border-bottom: 1px solid rgba(244,239,226,0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
body.has-dark-hero header.site-header .site-logo,
body.has-dark-hero header.site-header .site-nav a,
body.has-dark-hero header.site-header .site-nav-menu-trigger {
  color: var(--cream);
  transition: color 0.3s ease;
}
body.has-dark-hero header.site-header .site-nav a.active,
body.has-dark-hero header.site-header .site-nav-menu-trigger.active {
  color: var(--saffron);
}
body.has-dark-hero header.site-header .site-nav-soon,
body.has-dark-hero header.site-header .site-nav-menu.is-soon .site-nav-menu-trigger {
  color: rgba(244,239,226,0.55);
}
body.has-dark-hero header.site-header .site-logo small {
  color: rgba(244,239,226,0.55);
}
body.has-dark-hero header.site-header .site-nav .cta {
  color: var(--saffron);
  border-color: rgba(201,115,34,0.55);
}
body.has-dark-hero header.site-header .nav-toggle {
  border-color: rgba(244,239,226,0.3);
}
body.has-dark-hero header.site-header .nav-toggle-bars::before,
body.has-dark-hero header.site-header .nav-toggle-bars::after,
body.has-dark-hero header.site-header .nav-toggle-bars span {
  background: var(--cream);
}

/* Once scrolled past hero, header reverts to its cream/blur look */
body.has-dark-hero.scrolled-past-hero header.site-header {
  background: rgba(244,239,226,0.88);
  border-bottom-color: var(--rule);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.has-dark-hero.scrolled-past-hero header.site-header .site-logo,
body.has-dark-hero.scrolled-past-hero header.site-header .site-nav a:not(.active):not(:hover),
body.has-dark-hero.scrolled-past-hero header.site-header .site-nav-menu-trigger:not(.active):not(:hover) {
  color: var(--mid);
}
body.has-dark-hero.scrolled-past-hero header.site-header .site-logo {
  color: var(--ink);
}
body.has-dark-hero.scrolled-past-hero header.site-header .site-logo small {
  color: var(--faint);
}
body.has-dark-hero.scrolled-past-hero header.site-header .nav-toggle {
  border-color: var(--rule-strong);
}
body.has-dark-hero.scrolled-past-hero header.site-header .nav-toggle-bars::before,
body.has-dark-hero.scrolled-past-hero header.site-header .nav-toggle-bars::after,
body.has-dark-hero.scrolled-past-hero header.site-header .nav-toggle-bars span {
  background: var(--ink);
}

