/* =============================================================================
   components.css — hero, cards, grids, rails, detail panels, page chrome.
   "Warm dark editorial." Solid surfaces, hairlines, restrained color, no
   gradient text, no animated decoration on content blocks.
   ========================================================================== */

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 80vh, 760px);
  display: grid;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, transparent 30%, rgba(26,23,20,0.55) 75%, var(--bg) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: var(--sp-9) clamp(1.25rem, 4vw, 3rem) var(--sp-7);
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 1rem 0 1.2rem;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero .subtitle {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-18);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 1.4rem;
  line-height: 1.55;
}
.hero .lead-text {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--ink-mute);
  font-size: var(--fs-16);
  line-height: 1.6;
}
.hero .scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, var(--ink-mute), transparent);
}

/* Mobile-only hero touch-ups: tighter top padding (the desktop 7rem reads as
   excessive on a phone) and full-width stacked CTAs (more substantial / easier
   to tap). Layout is otherwise unchanged. */
@media (max-width: 720px) {
  .hero-content { padding-top: var(--sp-7); }
  .hero .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }
  .hero .btn-row .btn {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.2rem;
    font-size: var(--fs-16);
  }
}

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: var(--sp-4) 0;
}
.stat-strip > div {
  background: var(--surface);
  padding: var(--sp-4) var(--sp-4);
}
.stat .num {
  font-family: var(--serif);
  font-size: var(--fs-40);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}
.stat .lbl {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
@media (max-width: 720px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
}

/* ---------- "Ways in" cards ---------- */
.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.ways-grid.five {
  grid-template-columns: repeat(6, 1fr);
}
.ways-grid.five > .way:nth-child(1),
.ways-grid.five > .way:nth-child(2),
.ways-grid.five > .way:nth-child(3) { grid-column: span 2; }
.ways-grid.five > .way:nth-child(4),
.ways-grid.five > .way:nth-child(5) { grid-column: span 3; }
@media (max-width: 1080px) {
  .ways-grid.five { grid-template-columns: repeat(2, 1fr); }
  .ways-grid.five > .way { grid-column: span 1 !important; }
}
@media (max-width: 720px) {
  .ways-grid, .ways-grid.five { grid-template-columns: 1fr; }
}

.way {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  text-decoration: none;
  color: inherit;
}
.way:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  color: inherit;
}
.way-num {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: auto;
}
.way-glyph {
  width: 40px; height: 40px;
  margin: 1.8rem 0 1.2rem;
  color: var(--gold);
}
.way h3 {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--ink);
  line-height: 1.25;
}
.way p {
  color: var(--ink-mute);
  font-size: var(--fs-14);
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: none;
}
.way-arrow {
  font-family: var(--sans);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--gold);
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: gap var(--d-fast) var(--ease);
}
.way:hover .way-arrow { gap: 0.7rem; color: var(--gold-hover); }

/* ---------- Bento grid (traditions / featured) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  grid-auto-flow: dense;
}
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  grid-column: span var(--c, 2);
  grid-row: span var(--r, 1);
  min-height: 220px;
  text-decoration: none;
  color: inherit;
}
/* Layout: family tag → title → tagline → blurb cluster at the top.
   The era meta gets margin-top: auto (set with the .b-meta rule below),
   so it sits at the bottom — keeping big cards from feeling hollow. */
.bento-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.bento-glyph {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  width: 28px; height: 28px;
  color: var(--ink-mute);
  transition: color var(--d-fast) var(--ease), opacity var(--d-fast) var(--ease);
}
.bento-card:hover .bento-glyph { color: var(--gold); }

/* Larger, slightly faded glyph on big cards — gives them visual anchor. */
.bento-card.size-lg .bento-glyph,
.bento-card.size-tall .bento-glyph,
.bento-card.size-md .bento-glyph {
  width: 42px; height: 42px;
}

.bento-card .b-tag {
  /* in-flow at top of card so it never overlaps the title */
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  /* leave room for the absolute glyph at top-right */
  padding-right: 2.5rem;
}
.bento-card h3 {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.bento-card .b-tagline {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: var(--fs-16);
  line-height: 1.5;
  margin-bottom: 0.7rem;
}

/* Blurb — short summary. Hidden on small cards;
   visible on size-md / size-lg / size-tall where the card is tall enough.
   On the very tall variants we let it expand to fill more of the card so
   they don't feel hollow. */
.bento-card .b-blurb {
  display: none;
  font-family: var(--sans);
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0 0 0.9rem;
}
.bento-card.size-md .b-blurb,
.bento-card.size-lg .b-blurb,
.bento-card.size-tall .b-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bento-card.size-lg .b-blurb,
.bento-card.size-tall .b-blurb {
  -webkit-line-clamp: 9;
  /* slightly larger on the truly large variants */
  font-size: var(--fs-16);
  line-height: 1.6;
}
.bento-card .b-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: auto;     /* push the era line to the bottom of the card */
  padding-top: 0.6rem;  /* but keep a minimum gap from content above */
  font-weight: 600;
}
.bento-card .b-arrow {
  position: absolute;
  bottom: 1.4rem; right: 1.4rem;
  width: 30px; height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.bento-card:hover .b-arrow {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* Card size variants for bento */
.bento-card.size-lg  { --c: 4; --r: 2; min-height: 360px; }
.bento-card.size-md  { --c: 3; --r: 2; min-height: 320px; }
.bento-card.size-sm  { --c: 2; --r: 1; min-height: 220px; }
.bento-card.size-tall{ --c: 2; --r: 2; min-height: 360px; }
.bento-card.size-wide{ --c: 4; --r: 1; min-height: 220px; }

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento-card.size-lg, .bento-card.size-md, .bento-card.size-wide { --c: 4; }
  .bento-card.size-tall { --c: 2; }
}
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card.size-lg, .bento-card.size-md, .bento-card.size-wide, .bento-card.size-tall { --c: 2; --r: 1; min-height: 220px; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card { --c: 1 !important; }
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}
.filter-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
  background: transparent;
  border: none;
  padding: 0.5rem 0.8rem;
}
.filter-bar input[type="search"]:focus { background: transparent; outline: none; box-shadow: none; }
.filter-bar select {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  font-size: var(--fs-14);
  color: var(--ink-soft);
}

/* ---------- Tradition / concept detail panels ---------- */
.detail-panel {
  display: none;
  position: relative;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  margin: var(--sp-4) 0 var(--sp-6);
  box-shadow: var(--shadow);
}
.detail-panel.is-open { display: block; animation: panelIn .35s var(--ease-out) both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.detail-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.detail-close:hover { color: var(--ink); border-color: var(--ink-mute); }

.detail-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 1.8rem;
}
.detail-glyph {
  width: 56px; height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.detail-glyph svg { width: 28px; height: 28px; }
.detail-head .d-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.detail-head h2 {
  font-size: clamp(1.75rem, 3.4vw, var(--fs-40));
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.detail-head .d-tagline {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: var(--fs-18);
  line-height: 1.5;
  margin: 0.4rem 0 0;
}

.detail-summary {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-18);
  color: var(--ink);
  line-height: 1.65;
  max-width: 65ch;
  margin-bottom: 1.8rem;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fact {
  background: var(--surface-2);
  padding: 1.4rem 1.4rem 1.5rem;
}
.fact h4 {
  font-family: var(--sans);
  color: var(--gold);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.fact p {
  margin: 0;
  font-size: var(--fs-14);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: none;
}

.detail-section { margin-top: 2rem; }
.detail-section h4 {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* Link list */
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin-bottom: 0.4rem; color: var(--ink-soft); font-size: var(--fs-14); }
.link-list a { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.link-list a:hover { color: var(--gold); }
.link-list a::after { content: "↗"; font-size: 0.85em; opacity: 0.6; }

/* ---------- Concept perspectives ---------- */
.perspectives {
  display: grid;
  gap: 0.6rem;
}
.perspective {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.6rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
}
.perspective:first-child { border-top: none; padding-top: 0.4rem; }
.perspective .p-tradition {
  font-family: var(--serif);
  font-size: var(--fs-18);
  color: var(--ink);
  font-weight: 400;
}
.perspective .p-tradition a { color: inherit; text-decoration: none; }
.perspective .p-tradition a:hover { color: var(--gold); }
.perspective .p-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 0.3rem;
  font-weight: 600;
}
.perspective .p-text {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  max-width: 65ch;
}
@media (max-width: 720px) {
  .perspective { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Concept rail (horizontal scroll) ---------- */
.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 999px; }

.rail-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.rail-card:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.rail-card .c-num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 500;
}
.rail-card .c-icon {
  width: 32px; height: 32px;
  color: var(--gold);
  margin-bottom: 1rem;
}
.rail-card h3 {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  margin-bottom: 0.6rem;
  line-height: 1.2;
  color: var(--ink);
}
.rail-card .c-summary {
  color: var(--ink-soft);
  font-size: var(--fs-14);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  max-width: none;
}
.rail-card .c-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.rail-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.rail-controls button {
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.rail-controls button:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.rail-controls button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- Concept grid (concepts page) ---------- */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 0.8rem;
}
.concept-card {
  position: relative;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.concept-card:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.concept-card .c-icon {
  width: 32px; height: 32px;
  margin-bottom: 0.9rem;
  color: var(--gold);
}
.concept-card h3 {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  color: var(--ink);
}
.concept-card .c-summary {
  font-size: var(--fs-14);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}
.concept-card .c-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.concept-card .c-foot .ct {
  font-family: var(--sans);
  font-size: var(--fs-14);
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  font-weight: 500;
}

/* ---------- Page header ---------- */
.page-head {
  position: relative;
  padding: 6.5rem 0 var(--sp-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}
.page-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  margin: 1.2rem 0 0.8rem;
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 400;
  color: var(--ink);
}
.page-head h1 em { font-style: italic; color: var(--gold); }
.page-head .lead { max-width: 56ch; }
@media (max-width: 720px) {
  .page-head { padding: 4.5rem 0 var(--sp-4); margin-bottom: var(--sp-4); }
  .page-head h1 { margin-top: 0.6rem; }
}

/* ---------- Visualize page ---------- */
.viz-tabs {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  margin-bottom: 1.2rem;
  gap: 0.15rem;
}
.viz-tabs .tab {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: var(--ink-mute);
  font-size: var(--fs-14);
  font-weight: 500;
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
}
.viz-tabs .tab:hover { color: var(--ink); }
.viz-tabs .tab.active {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

.viz-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
}
.viz-stage svg { display: block; max-width: none; }
.viz-stage .stage-inner { width: 100%; min-height: 600px; }
.viz-legend {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-14);
  color: var(--ink-mute);
}
.viz-legend .swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 0.4rem;
  vertical-align: -1px;
}
.viz-caption {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-14);
  color: var(--ink-soft);
  line-height: 1.55;
}
.viz-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 0.8rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: var(--fs-14);
  color: var(--ink);
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  z-index: 50;
  transition: opacity var(--d-fast) var(--ease);
}
.viz-tooltip strong {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-16);
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.viz-tooltip .vt-meta {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.viz-tooltip .vt-cta {
  display: block;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* Mobile: pin the tooltip as a fixed bottom card so it never lands under
   the user's finger and doesn't overflow the small viewport. The JS still
   sets left/top inline; we override with !important for mobile. */
@media (max-width: 720px) {
  .viz-tooltip {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    bottom: 1rem !important;
    top: auto !important;
    max-width: none !important;
    z-index: 200;
  }
  /* On mobile the SVG is rendered at min 760px so labels stay legible; we
     allow horizontal scroll inside the stage rather than crushing it. */
  .viz-stage { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  /* Mode selector becomes a full-width segmented control. */
  .viz-tabs {
    display: flex;
    width: 100%;
    gap: 0.2rem;
  }
  .viz-tabs .tab {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.55rem 0.4rem;
    font-size: var(--fs-12);
  }
}

/* SVG defaults for visualization */
.node-tradition circle { stroke: var(--gold); stroke-width: 1.5px; cursor: pointer; transition: all .15s; }
.node-tradition text { fill: var(--ink); font-family: var(--serif); pointer-events: none; }
.node-concept circle { fill: rgba(208, 138, 106, 0.7); stroke: rgba(224, 181, 84, 0.55); stroke-width: 1px; cursor: pointer; }
.node-concept text { fill: var(--ink-soft); font-family: var(--sans); font-size: 11px; pointer-events: none; }
.link { stroke: rgba(242, 234, 221, 0.10); stroke-width: 1px; fill: none; transition: stroke .2s, stroke-opacity .2s; }
.link.highlight { stroke: var(--gold); stroke-opacity: 0.85; stroke-width: 1.6px; }

.cell { stroke: var(--bg); stroke-width: 1.5px; cursor: pointer; transition: opacity .15s; }
.cell-empty { stroke: var(--bg); stroke-width: 1.5px; }

/* ---------- Compare table ---------- */
.compare-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}
@media (max-width: 880px) { .compare-controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .compare-controls { grid-template-columns: 1fr; } }

.compare {
  display: grid;
  grid-template-columns: 200px repeat(var(--cols, 2), 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compare > div { background: var(--surface); padding: 1.2rem 1.3rem; font-size: var(--fs-14); color: var(--ink); }
.compare .ch {
  background: var(--surface-2);
}
.compare .ch h3 {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.compare .ch .meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.compare .rh {
  background: var(--bg);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
}
/* The compare page renders two parallel layouts (grid + cards). The grid is
   for desktop (visual side-by-side comparison); the cards are for mobile,
   where the grid would collapse into an unreadable single-column flat list.
   Each layout is hidden in the other viewport. */
.compare-cards { display: none; }
@media (max-width: 760px) {
  .compare { display: none; }
  .compare-cards {
    display: grid;
    gap: 1rem;
  }
  .compare-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .compare-card-head {
    padding: 1.1rem 1.3rem 0.9rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
  }
  .compare-card-head h3 {
    font-family: var(--serif);
    font-size: var(--fs-22);
    font-weight: 400;
    margin: 0 0 0.25rem;
    line-height: 1.15;
    color: var(--ink);
  }
  .compare-card-head .meta {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    font-weight: 600;
  }
  .compare-card-rubric {
    margin: 0;
    padding: 0.6rem 1.3rem 1.1rem;
  }
  .compare-card-rubric dt {
    font-family: var(--sans);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin: 0.95rem 0 0.3rem;
  }
  .compare-card-rubric dt:first-child { margin-top: 0.4rem; }
  .compare-card-rubric dd {
    margin: 0;
    font-size: var(--fs-14);
    color: var(--ink);
    line-height: 1.55;
  }
}

/* ---------- Glossary ---------- */
.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 0.8rem;
}
.glossary-letter {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
  margin: 1.6rem 0 0.4rem;
  letter-spacing: -0.022em;
}
.glossary-letter:first-child { margin-top: 0; }
.gloss-item {
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.gloss-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
.gloss-item .g-term {
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}
.gloss-item .g-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.gloss-item .g-meta a { color: var(--gold); text-decoration: none; }
.gloss-item .g-def {
  font-size: var(--fs-14);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
  max-width: none;
}

.alpha-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: center;
  margin: 1.6rem 0 2.4rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.alpha-jump a {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: var(--fs-16);
  color: var(--ink-soft);
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
  text-decoration: none;
}
.alpha-jump a:hover { background: var(--gold); color: var(--bg); }
.alpha-jump a.empty { color: var(--ink-disabled); pointer-events: none; }

/* ---------- About / editorial ---------- */
.editorial {
  max-width: var(--maxw-prose);
  margin: 0 auto;
}
.editorial p, .editorial li {
  font-family: var(--sans);
  font-size: var(--fs-18);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  max-width: 65ch;
}
.editorial p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 400;
  float: left;
  line-height: 0.85;
  margin: 0.1em 0.12em 0 0;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.editorial h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  margin: 3rem 0 1rem;
}
.editorial h3 { margin: 2rem 0 0.6rem; }
.editorial blockquote { margin: 2.4rem auto; max-width: 100%; }

.path-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.path-step:last-child { border-bottom: none; }
.path-step .step-num {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.path-step h3 { margin-bottom: 0.4rem; font-size: var(--fs-22); }
.path-step p { font-family: var(--sans); font-size: var(--fs-16); color: var(--ink-soft); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ink-mute);
}
.empty-state p {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-18);
  max-width: none;
  margin: 0 auto;
}

/* ---------- Teaser blocks (awakening / suppression on home) ---------- */
.awakening-teaser, .suppression-teaser {
  position: relative;
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-left: 3px solid var(--sage);
}
.suppression-teaser { border-left-color: var(--rust); }
.awakening-teaser h2, .suppression-teaser h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  margin: 0.8rem 0 1rem;
  font-weight: 400;
}
.awakening-teaser h2 em { color: var(--sage); font-style: italic; }
.suppression-teaser h2 em { color: var(--rust); font-style: italic; }
.awakening-teaser .lead, .suppression-teaser .lead {
  margin-bottom: 1.4rem;
  max-width: 65ch;
  color: var(--ink);
  font-size: var(--fs-18);
}
.awakening-teaser-eyebrow { margin-bottom: 0.4rem; }
@media (max-width: 720px) {
  .awakening-teaser, .suppression-teaser { padding: 1.8rem 1.4rem 2rem; }
}
