/* ==========================================================================
   THE UNBROKEN THREAD — Design System
   Palette: obsidian #0B0C10 · slate #12151E/#171B26 · gold #D4AF37 · glow #F3E5AB
            cyan #45A29E · teal #66FCF1 · ivory #EAEAEA · muted #9CA3AF
   ========================================================================== */
:root {
  --obsidian: #0B0C10; --slate: #12151E; --card: #171B26; --line: rgba(212,175,55,.22);
  --gold: #D4AF37; --glow: #F3E5AB; --cyan: #45A29E; --teal: #66FCF1; --ivory: #EAEAEA;
  --muted: #A3AAB6; --crimson: #EF4444; --papyrus: #E9DCB8; --ink: #2A1F12;
  --serif: "Cinzel", Georgia, serif; --book: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 18px; --wrap: 1180px; --shadow-gold: 0 0 30px -6px rgba(212,175,55,.35);
}
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--obsidian); color: var(--ivory); font: 400 17px/1.7 var(--sans);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(212,175,55,.08), transparent 55%),
    radial-gradient(circle at 90% 70%, rgba(69,162,158,.06), transparent 50%),
    linear-gradient(to right, rgba(212,175,55,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212,175,55,.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px; background-attachment: fixed;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--glow); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ivory); margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; }
p { margin: 0 0 1.1em; }
strong { color: var(--glow); font-weight: 600; }
em { color: inherit; }
blockquote { margin: 0; }
::selection { background: var(--gold); color: var(--obsidian); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--gold); color: var(--obsidian); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.gold-text { background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #AA820A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cyan-text { background: linear-gradient(135deg, #66FCF1, #45A29E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 600 .74rem/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8em; }
.eyebrow.teal { color: var(--teal); }
.eyebrow.red { color: #F87171; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 760px; }
.center .lede { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- Progress bar ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--teal)); box-shadow: 0 0 10px var(--gold); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(11,12,16,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); }
.brand .logo { width: 42px; height: 42px; color: var(--gold); padding: 6px; border: 1px solid rgba(212,175,55,.5); border-radius: 12px; background: var(--slate); box-shadow: var(--shadow-gold); flex: none; }
.brand strong { display: block; font: 700 1.02rem/1 var(--serif); letter-spacing: .08em; color: var(--glow); }
.brand small { display: block; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin-top: 5px; }
.site-nav { display: flex; align-items: center; gap: 14px; }
.site-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 4px; background: rgba(18,21,30,.9); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.nav-top { display: block; padding: 8px 13px; border-radius: 10px; font-size: .86rem; font-weight: 500; color: var(--ivory); text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.nav-top::-webkit-details-marker { display: none; }
summary.nav-top::after { content: "▾"; margin-left: 6px; color: var(--gold); font-size: .75em; }
.nav-top:hover, .nav-top[aria-current], .has-menu.is-active > details > summary { color: var(--gold); background: rgba(255,255,255,.05); }
.has-menu { position: relative; }
.menu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 270px; list-style: none; margin: 0; padding: 8px; background: rgba(18,21,30,.98); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.menu a { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 9px; color: var(--ivory); text-decoration: none; font-size: .9rem; }
.menu a:hover, .menu a[aria-current] { background: rgba(212,175,55,.12); color: var(--glow); }
.num { font: 600 .7rem var(--sans); letter-spacing: .12em; color: var(--gold); min-width: 30px; }
.nav-toggle { display: none; background: var(--slate); border: 1px solid rgba(212,175,55,.35); border-radius: 10px; width: 46px; height: 42px; padding: 10px; cursor: pointer; }
.nav-toggle i { display: block; height: 2px; background: var(--gold); margin: 4px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; padding: 14px 22px 22px; background: rgba(11,12,16,.98); border-bottom: 1px solid var(--line); max-height: calc(100vh - 74px); overflow: auto; }
  .site-nav.open { display: flex; }
  .site-nav > ul { flex-direction: column; }
  .menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 10px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 14px; font: 700 .86rem/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .2s, filter .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, #F3E5AB, #D4AF37 45%, #AA820A); color: var(--obsidian); box-shadow: var(--shadow-gold); }
.btn-gold:hover { color: var(--obsidian); filter: brightness(1.08); }
.btn-ghost { background: rgba(18,21,30,.8); border-color: rgba(212,175,55,.45); color: var(--glow); }
.btn-teal { background: rgba(69,162,158,.18); border-color: rgba(102,252,241,.5); color: var(--teal); }
.btn-sm { padding: 10px 16px; font-size: .74rem; }

/* ---------- Breadcrumbs ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 18px 22px 0; margin: 0; font-size: .8rem; color: var(--muted); }
.crumbs li + li::before { content: "𓏤"; content: "·"; margin-right: 8px; color: var(--gold); }
.crumbs a { color: var(--muted); }

/* ---------- Sections / Cards ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 90px); overflow: hidden; }
.hero-sm { padding: 70px 0; }
.hero .mandala { position: absolute; inset: 50% auto auto 50%; width: 820px; transform: translate(-50%, -50%); opacity: .09; color: var(--gold); pointer-events: none; animation: spin 240s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.section { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid rgba(255,255,255,.06); }
.section.alt { background: rgba(18,21,30,.45); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; }
.section-head p { max-width: 460px; color: var(--muted); margin: 0; }
.card { background: rgba(23,27,38,.74); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.card.teal { border-color: rgba(102,252,241,.25); background: rgba(18,25,36,.78); }
.card.red { border-color: rgba(239,68,68,.3); }
.card h3 { color: var(--glow); }
.card.teal h3 { color: var(--teal); }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.split { display: grid; gap: 34px; grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.prose { max-width: 760px; }
.prose p, .prose li { color: rgba(234,234,234,.9); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; color: var(--glow); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.kicker { font: 600 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); display: block; margin-bottom: 8px; }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-clean li { padding: 12px 14px; border-radius: 12px; background: rgba(11,12,16,.7); border: 1px solid rgba(255,255,255,.07); font-size: .95rem; }
.pull { font: italic 500 clamp(1.3rem, 2.6vw, 1.9rem)/1.4 var(--book); color: var(--glow); border-left: 3px solid var(--gold); padding: 6px 0 6px 22px; margin: 28px 0; }
.pull cite { display: block; font: 500 .8rem var(--sans); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-top: 10px; }
.quote-card { padding: 18px 20px; border-radius: 14px; background: rgba(11,12,16,.8); border-left: 3px solid var(--gold); font: italic 500 1.15rem/1.5 var(--book); color: var(--ivory); }
.quote-card footer { font: 500 .78rem var(--sans); font-style: normal; color: var(--gold); margin-top: 10px; }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.07); }
th { font: 700 .78rem var(--serif); letter-spacing: .08em; color: var(--gold); background: rgba(18,21,30,.9); }
tbody tr:hover { background: rgba(212,175,55,.04); }

/* Evidence tags */
.tag { display: inline-block; font: 600 .66rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1px solid; vertical-align: middle; white-space: nowrap; }
.tag-consensus { color: #6EE7B7; border-color: rgba(110,231,183,.45); background: rgba(16,185,129,.08); }
.tag-noted { color: var(--teal); border-color: rgba(102,252,241,.4); background: rgba(102,252,241,.06); }
.tag-esoteric { color: var(--glow); border-color: rgba(212,175,55,.5); background: rgba(212,175,55,.08); }
.tag-author { color: #FCA5A5; border-color: rgba(252,165,165,.45); background: rgba(239,68,68,.08); }

/* ---------- Home: hub cards ---------- */
.hub { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--radius); background: rgba(23,27,38,.75); border: 1px solid rgba(255,255,255,.09); text-decoration: none; color: var(--ivory); transition: border-color .25s, transform .25s, box-shadow .25s; overflow: hidden; }
.hub-card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(212,175,55,.14), transparent 70%); transition: .4s; }
.hub-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-gold); color: var(--ivory); }
.hub-card .glyph { font-size: 1.8rem; line-height: 1; color: var(--gold); }
.hub-card strong { font: 700 1.2rem var(--serif); color: var(--glow); }
.hub-card span.d { color: var(--muted); font-size: .93rem; }
.hub-card .go { margin-top: auto; font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.hub-card.featured { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(23,27,38,.85) 55%); border-color: rgba(212,175,55,.5); }
.hub-card.featured strong { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.journey { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.journey li { list-style: none; position: relative; padding: 22px 20px 20px; border-radius: 16px; background: rgba(11,12,16,.75); border: 1px solid rgba(255,255,255,.08); }
.journey li::before { counter-increment: step; content: "0" counter(step); font: 900 2.2rem/1 var(--serif); color: rgba(212,175,55,.28); display: block; margin-bottom: 8px; }
.journey h3 { font-size: 1.05rem; color: var(--glow); }
.journey p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Gateway overlay (home) ---------- */
.gateway { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #171B26 0%, #050608 75%); overflow: hidden; transition: opacity 1s ease .6s, visibility 0s linear 1.6s; }
.gateway[hidden] { display: none; }
.gateway.opening { opacity: 0; visibility: hidden; }
.gateway .door { position: absolute; top: 0; bottom: 0; width: 50%; background:
  repeating-linear-gradient(90deg, rgba(212,175,55,.05) 0 2px, transparent 2px 60px),
  linear-gradient(180deg, #14171F, #0B0C10); border: 1px solid rgba(212,175,55,.25); transition: transform 1.5s cubic-bezier(.7,0,.3,1); }
.gateway .door.l { left: 0; border-right: 2px solid rgba(212,175,55,.6); }
.gateway .door.r { right: 0; border-left: 2px solid rgba(212,175,55,.6); }
.gateway.opening .door.l { transform: translateX(-102%); }
.gateway.opening .door.r { transform: translateX(102%); }
.gateway .gate-inner { position: relative; z-index: 2; max-width: 760px; padding: 28px; text-align: center; transition: opacity .5s, transform .8s; }
.gateway.opening .gate-inner { opacity: 0; transform: scale(1.08); }
.gate-eye { width: 120px; height: 120px; margin: 0 auto 20px; color: var(--gold); filter: drop-shadow(0 0 20px rgba(212,175,55,.6)); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); filter: drop-shadow(0 0 34px rgba(102,252,241,.55)); } }
.gate-inner h2 { font-size: clamp(1.9rem, 5vw, 3.3rem); font-weight: 900; }
.gate-inner p { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.15rem); }
.gate-lines { font: italic 500 clamp(1.15rem, 2.2vw, 1.45rem)/1.6 var(--book); color: var(--glow); min-height: 4.8em; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
.gate-skip { margin-top: 18px; background: none; border: 0; color: var(--muted); font-size: .8rem; text-decoration: underline; cursor: pointer; }

/* ---------- Scroll (papyrus) ---------- */
.scroll-rod { height: 34px; margin: 0 auto; max-width: 960px; border-radius: 20px; background: linear-gradient(180deg, #8B6A2B, #D4AF37 40%, #6B4F1D); box-shadow: 0 10px 30px rgba(0,0,0,.6); position: relative; }
.scroll-rod::before, .scroll-rod::after { content: ""; position: absolute; top: -6px; width: 30px; height: 46px; border-radius: 10px; background: linear-gradient(180deg, #6B4F1D, #F3E5AB 50%, #6B4F1D); }
.scroll-rod::before { left: -14px; } .scroll-rod::after { right: -14px; }
.papyrus { max-width: 900px; margin: 0 auto; color: var(--ink); background: var(--papyrus) url("/assets/img/papyrus.svg"); background-size: 400px; padding: clamp(28px, 6vw, 70px) clamp(22px, 6vw, 80px); box-shadow: inset 0 0 80px rgba(120,80,20,.35), 0 30px 60px rgba(0,0,0,.6); font: 500 1.2rem/1.75 var(--book); }
.papyrus h2, .papyrus h3 { color: #3B2A12; }
.papyrus h2 { text-align: center; border-bottom: 1px solid rgba(59,42,18,.3); padding-bottom: .4em; margin-top: 1.4em; }
.papyrus strong { color: #5A3B0E; }
.papyrus a { color: #7A4A0C; font-weight: 600; }
.papyrus .epoch { font: 700 .78rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #8B5E1A; text-align: center; display: block; margin-top: 2em; }
.papyrus blockquote { border-left: 3px solid #8B5E1A; padding-left: 18px; font-style: italic; margin: 1em 0; }
.papyrus .drop::first-letter { float: left; font: 900 4.2rem/0.85 var(--serif); color: #8B5E1A; padding: 6px 10px 0 0; }
.papyrus .seal { text-align: center; font-size: 2rem; color: #8B5E1A; letter-spacing: .6em; margin: 1.4em 0; }

/* ---------- Synthesis matrix ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.chip { padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(18,21,30,.9); color: var(--ivory); font: 500 .82rem var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--obsidian); border-color: var(--gold); }
.search { flex: 1 1 260px; padding: 12px 16px; border-radius: 12px; background: var(--obsidian); border: 1px solid rgba(212,175,55,.4); color: var(--ivory); font: 400 .95rem var(--sans); }
.search:focus { outline: none; border-color: var(--teal); }
.count { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }
.parallel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(23,27,38,.7); margin-bottom: 18px; }
.parallel[hidden] { display: none; }
.parallel > header { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(11,12,16,.55); }
.parallel > header h3 { margin: 0; font-size: 1.12rem; color: var(--glow); }
.parallel .side { padding: 20px 22px; }
.parallel .side + .side { border-left: 1px solid rgba(255,255,255,.07); }
.parallel .side .kicker { color: var(--gold); }
.parallel .side.egypt .kicker { color: var(--teal); }
.parallel .side blockquote { font: italic 500 1.12rem/1.55 var(--book); color: var(--ivory); margin: 0; }
.parallel .side cite { display: block; margin-top: 10px; font: 600 .76rem var(--sans); font-style: normal; color: var(--muted); letter-spacing: .06em; }
.parallel .synth { grid-column: 1 / -1; padding: 16px 22px 20px; border-top: 1px dashed rgba(212,175,55,.25); color: rgba(234,234,234,.88); font-size: .95rem; }
.parallel .synth strong { color: var(--gold); }
@media (max-width: 760px) { .parallel { grid-template-columns: 1fr; } .parallel .side + .side { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); } }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(18,21,30,.8); color: var(--glow); text-decoration: none; font-size: .85rem; }
.toc a:hover { border-color: var(--gold); }

/* ---------- Tabs / inspectors ---------- */
.tabs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 16px; }
.tab { padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(18,21,30,.9); color: var(--ivory); font: 700 .82rem var(--serif); cursor: pointer; text-align: center; }
.tab[aria-selected="true"] { background: var(--gold); color: var(--obsidian); border-color: var(--gold); box-shadow: var(--shadow-gold); }
.panel[hidden] { display: none; }
.law-axiom { font: italic 500 1.35rem/1.5 var(--book); color: var(--glow); }

/* ---------- Mind renewal engine ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.field input, .field select { padding: 12px 14px; border-radius: 12px; background: var(--obsidian); color: var(--ivory); border: 1px solid rgba(212,175,55,.4); font: 400 .95rem var(--sans); }
input[type=range].polarity { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #991b1b, #4b5563 50%, #D4AF37 80%, #66FCF1); }
input[type=range].polarity::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--glow); border: 3px solid var(--obsidian); box-shadow: 0 0 15px rgba(212,175,55,.9); cursor: pointer; }
input[type=range].polarity::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--glow); border: 3px solid var(--obsidian); }
.step { padding: 16px 18px; border-radius: 14px; background: rgba(18,21,30,.9); border-left: 4px solid var(--gold); margin-bottom: 14px; }
.step.red { border-color: #F87171; } .step.teal { border-color: var(--teal); }
.step .kicker { color: inherit; opacity: .85; }
.orb { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), var(--teal)); color: var(--obsidian); font: 700 .9rem var(--sans); box-shadow: 0 0 25px rgba(102,252,241,.35); }
.orb.on { animation: breath 8s ease-in-out infinite; }
@keyframes breath { 0%,100% { transform: scale(.88); } 50% { transform: scale(1.14); } }

/* ---------- Timeline ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid rgba(212,175,55,.35); }
.timeline li { position: relative; padding: 0 0 26px 14px; }
.timeline li::before { content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--obsidian); border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(212,175,55,.6); }
.timeline time { font: 700 .78rem var(--sans); letter-spacing: .14em; color: var(--teal); }
.timeline h3 { margin: 4px 0 6px; font-size: 1.1rem; color: var(--glow); }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Bars */
.bar { height: 12px; border-radius: 999px; background: var(--slate); overflow: hidden; margin: 6px 0; }
.bar span { display: block; height: 100%; }

/* ---------- FAQ / Dots / Prev-next ---------- */
.faq-item { border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(23,27,38,.6); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item h3 { margin: 0; font-size: 1.02rem; color: var(--ivory); }
.faq-item p { padding: 0 20px 18px; margin: 0; color: var(--muted); }
.dot-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dot-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,.09); background: rgba(18,21,30,.8); text-decoration: none; color: var(--ivory); transition: .25s; }
.dot-card:hover { border-color: var(--teal); transform: translateY(-3px); color: var(--ivory); }
.dot-card strong { font: 700 1.05rem var(--serif); color: var(--glow); }
.dot-card span:last-child { color: var(--muted); font-size: .9rem; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; padding-top: 30px; padding-bottom: 50px; }
.pn { flex: 0 1 48%; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,21,30,.85); text-decoration: none; color: var(--ivory); }
.pn.next { text-align: right; margin-left: auto; }
.pn small { display: block; color: var(--teal); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.pn strong { font: 700 1.05rem var(--serif); }
.pn:hover { border-color: var(--gold); color: var(--ivory); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #08090C; padding: 56px 0 30px; font-size: .9rem; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr repeat(5, 1fr); }
@media (max-width: 1000px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-h { font: 700 .8rem var(--serif); letter-spacing: .12em; color: var(--gold); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--glow); }
.disclaimer { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.07); font-size: .82rem; line-height: 1.9; }
.copy { font-size: .78rem; margin: 0; }

/* ---------- Toast & reveal ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 90; padding: 12px 18px; border-radius: 12px; background: var(--slate); border: 1px solid var(--teal); color: var(--ivory); font-size: .85rem; opacity: 0; transform: translateY(10px); transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Book card library styling */
.book-card { display: flex; gap: 16px; padding: 16px; border-radius: 14px; background: rgba(11,12,16,.8); border: 1px solid rgba(255,255,255,.08); transition: transform .2s, border-color .2s; }
.book-card:hover { border-color: rgba(212,175,55,.45); transform: translateY(-2px); }
.book-thumb { width: 70px; height: 100px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.6); flex: none; display: flex; flex-direction: column; justify-content: space-between; padding: 6px; text-align: center; border: 1px solid rgba(255,255,255,.12); position: relative; overflow: hidden; }
.book-thumb::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: rgba(0,0,0,.35); box-shadow: 1px 0 2px rgba(255,255,255,.1); }
.book-thumb.gold { background: linear-gradient(135deg, #2b2310, #141108); border-color: rgba(212,175,55,.4); }
.book-thumb.teal { background: linear-gradient(135deg, #0e2928, #071515); border-color: rgba(102,252,241,.4); }
.book-thumb.red { background: linear-gradient(135deg, #381212, #180808); border-color: rgba(239,68,68,.4); }
.book-thumb.dark { background: linear-gradient(135deg, #1c1f2b, #0c0e14); border-color: rgba(255,255,255,.2); }
.book-thumb .spine-txt { font: 700 .55rem/1.1 var(--serif); letter-spacing: .02em; color: var(--ivory); }
.book-thumb .spine-icon { font-size: 1.1rem; margin: auto 0; }
.book-thumb.gold .spine-icon { color: var(--gold); }
.book-thumb.teal .spine-icon { color: var(--teal); }
.book-thumb.red .spine-icon { color: #F87171; }
.book-thumb.dark .spine-icon { color: var(--glow); }

@media (max-width: 640px) {
  .book-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .book-card .btn { width: 100%; justify-content: center; }
  .book-thumb { width: 60px; height: 86px; }
  .hero { padding-top: 42px; padding-bottom: 36px; }
  .hub-card { padding: 20px; }
  .table-wrap { font-size: .82rem; }
  .header-inner { min-height: 64px; }
}
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .progress, .gateway, .prevnext, .dots { display: none !important; }
  body { background: #fff; color: #000; }
}
