:root {
    --ink: #151515;
    --paper: #f2eee6;
    --paper-2: #e7e0d5;
    --muted: #aaa49a;
    --line: rgba(21,21,21,.18);
    --dark-line: rgba(255,255,255,.16);
    --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

a { color: inherit; }
.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; background: currentColor; z-index: 1000; mix-blend-mode: difference; color: white; }

.hero {
    min-height: 100vh;
    color: #f6f2ea;
    background:
        radial-gradient(circle at 80% 10%, rgba(255,255,255,.09), transparent 30%),
        linear-gradient(135deg, #161616 0%, #28231e 48%, #111 100%);
    display: flex;
    flex-direction: column;
}

.nav { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--dark-line); }
.brand { text-decoration: none; font-weight: 800; letter-spacing: .15em; font-size: .82rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: rgba(255,255,255,.74); font-size: .92rem; }
.nav-links a:hover { color: white; }
.menu-toggle { display: none; border: 1px solid var(--dark-line); color: white; background: transparent; padding: 8px 12px; }

.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 80px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 800; color: rgba(255,255,255,.62); }
.eyebrow.dark { color: #6e675f; }
h1, h2, h3 { line-height: 1.02; margin-top: 0; }
h1 { max-width: 1000px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(4rem, 10vw, 9rem); letter-spacing: -.06em; margin-bottom: 28px; }
h1 span { color: rgba(255,255,255,.5); }
.dek { max-width: 770px; font-size: clamp(1.15rem, 2vw, 1.5rem); color: rgba(255,255,255,.72); }
.cta { display: inline-flex; gap: 12px; align-items: center; width: fit-content; margin-top: 30px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 5px; }
.hero-note { margin-bottom: 28px; padding-top: 20px; border-top: 1px solid var(--dark-line); color: rgba(255,255,255,.62); font-size: .9rem; }

.section { padding: 120px 0; }
.section-number { font-size: .76rem; font-weight: 800; letter-spacing: .18em; margin-bottom: 50px; color: #82786d; }
.section-number.light { color: rgba(255,255,255,.45); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.8rem, 5vw, 5.8rem); letter-spacing: -.045em; }
.prose { font-size: 1.06rem; color: #433f3a; }
.prose.large { font-size: 1.24rem; }
.prose p { margin-top: 0; margin-bottom: 22px; }
.prose.muted { color: rgba(255,255,255,.62); }

.quote-band { background: #c9bda9; padding: 60px 0; }
.quote-band p { margin: 0; max-width: 950px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 4.8rem); line-height: 1.1; letter-spacing: -.035em; }

.section-heading { max-width: 900px; margin-bottom: 50px; }
.section-heading > p:last-child { color: #5d5751; max-width: 720px; }
.section-heading.narrow { max-width: 700px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { padding: 34px; min-height: 330px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.08); }
.card-topline { display: flex; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #7f776d; margin-bottom: 54px; }
.card h3 { font-family: Georgia, serif; font-size: 2.25rem; letter-spacing: -.03em; }
.card .idea { font-weight: 700; }
.card .parallel { color: #5b554f; }

.dark-section { background: #171717; color: #f4f0e8; }
.story-intro { margin-bottom: 50px; }
.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--dark-line); }
.timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 24px; border-bottom: 1px solid var(--dark-line); padding: 28px 0; align-items: start; }
.timeline-index { color: rgba(255,255,255,.35); font-size: .78rem; letter-spacing: .16em; }
.timeline p { margin: 0; font-family: Georgia, serif; font-size: clamp(1.6rem, 3vw, 3.3rem); line-height: 1.12; }

.inversions { border-top: 1px solid var(--line); margin-bottom: 80px; }
.inversion { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 20px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.1rem, 2vw, 1.7rem); }
.inversion b { text-align: center; font-weight: 400; color: #82786d; }
.inversion strong { font-family: Georgia, serif; font-weight: 400; }
.closing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.closing-block { padding: 36px; background: var(--paper-2); min-height: 300px; }
.closing-block.caution { background: #ded6ca; }
.closing-block h3 { font-family: Georgia, serif; font-size: clamp(2rem, 3vw, 3.4rem); }
.closing-block p:last-child { color: #4b4742; }

footer { background: #111; color: rgba(255,255,255,.65); padding: 55px 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; font-size: .86rem; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 800px) {
    .shell { width: min(100% - 28px, var(--max)); }
    .section { padding: 82px 0; }
    .split, .cards, .closing-grid { grid-template-columns: 1fr; }
    .split { gap: 28px; }
    .cards { border-left: none; }
    .card { border-left: 1px solid var(--line); }
    .menu-toggle { display: block; }
    .nav-links { position: absolute; top: 82px; left: 14px; right: 14px; background: #171717; border: 1px solid var(--dark-line); padding: 18px; display: none; flex-direction: column; gap: 14px; z-index: 10; }
    .nav-links.open { display: flex; }
    .timeline li { grid-template-columns: 52px 1fr; }
    .inversion { grid-template-columns: 1fr; gap: 8px; }
    .inversion b { text-align: left; }
    .footer-grid { flex-direction: column; }
}

/* Multi-page / ecosystem surfaces */
.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    background: var(--paper);
    color: var(--ink);
    padding: 10px 14px;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.page-hero {
    color: #f6f2ea;
    background:
        radial-gradient(circle at 82% 15%, rgba(255,255,255,.08), transparent 28%),
        linear-gradient(135deg, #161616 0%, #27211c 52%, #111 100%);
    border-bottom: 1px solid var(--dark-line);
}
.page-hero-inner { padding: 95px 0 105px; }
.page-hero h1 { max-width: 980px; font-size: clamp(3.8rem, 8vw, 8rem); }
.breadcrumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 48px; color: rgba(255,255,255,.58); font-size: .84rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.nav-current { color: #fff !important; }

.seo-intro { border-bottom: 1px solid var(--line); }
.muted-copy { color: rgba(255,255,255,.62) !important; }
.ecosystem-directory .section-heading > p:last-child { color: rgba(255,255,255,.62); }
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--dark-line);
    border: 1px solid var(--dark-line);
}
.ecosystem-card {
    min-width: 0;
    background: #171717;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    padding: 34px;
}
.ecosystem-card-featured {
    grid-column: 1 / -1;
    background: #1d1a17;
    padding: 42px;
}
.ecosystem-card-index { color: rgba(255,255,255,.34); letter-spacing: .15em; font-size: .72rem; padding-top: 5px; }
.ecosystem-domain { color: rgba(255,255,255,.48); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; margin: 0 0 8px; }
.ecosystem-card h3 { font-family: Georgia, serif; font-size: clamp(2rem, 3vw, 3.2rem); margin-bottom: 8px; letter-spacing: -.025em; }
.ecosystem-role { font-weight: 750; color: #d8cdbb; margin-top: 0; }
.ecosystem-card-content > p:not(.ecosystem-domain):not(.ecosystem-role):not(.boundary-note) { color: rgba(255,255,255,.72); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0; padding: 0; }
.tag-list li { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 10px; font-size: .74rem; color: rgba(255,255,255,.66); }
.boundary-note { margin: 26px 0; padding: 18px 20px; border-left: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.04); color: rgba(255,255,255,.7); font-size: .93rem; }
.external-link { display: inline-flex; gap: 10px; align-items: center; margin-top: 24px; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 4px; }
.external-link:hover { border-color: #fff; }

.ecosystem-link-cluster { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 28px 0; }
.detail-link { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 18px; text-decoration: none; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.035); }
.detail-link strong { grid-column: 1; }
.detail-link span:nth-of-type(1) { grid-column: 1; color: rgba(255,255,255,.58); font-size: .82rem; }
.detail-link span:last-child { grid-column: 2; grid-row: 1; color: rgba(255,255,255,.5); }
.detail-link:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.35); }

.book-source-panel { margin-top: 36px; padding-top: 34px; border-top: 1px solid rgba(255,255,255,.16); }
.book-source-heading { max-width: 880px; margin-bottom: 24px; }
.book-source-heading h4 { font-family: Georgia, serif; font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -.025em; margin: 0 0 12px; }
.book-source-heading > p:last-child { color: rgba(255,255,255,.65); }
.book-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.book-source-card { padding: 24px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.14); }
.book-source-card h5 { font-family: Georgia, serif; font-size: 1.65rem; margin: 0 0 4px; }
.book-status { margin: 0 0 14px; color: #b9ad99; font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.book-subtitle { margin-top: 0; font-weight: 700; color: rgba(255,255,255,.78) !important; }
.book-source-card > p:not(.book-status):not(.book-subtitle) { color: rgba(255,255,255,.62) !important; }
.book-source-card a { font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 3px; }

.theme-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.theme-block { padding: 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.theme-block > span { display: block; margin-bottom: 40px; color: #81776c; text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; font-weight: 800; }
.theme-block h3 { font-family: Georgia, serif; font-size: clamp(1.8rem, 2.6vw, 3rem); }
.theme-block p { color: #5b554e; }
.network-strip { padding: 80px 0; background: #c9bda9; }
.network-strip h2 { max-width: 900px; }
.text-link { font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(21,21,21,.35); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; align-content: flex-start; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-meta { max-width: 520px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
    .page-hero-inner { padding: 66px 0 76px; }
    .ecosystem-grid, .book-source-grid, .theme-columns { grid-template-columns: 1fr; }
    .ecosystem-card, .ecosystem-card-featured { grid-template-columns: 1fr; padding: 26px; }
    .ecosystem-card-index { padding-top: 0; }
    .ecosystem-link-cluster { grid-template-columns: 1fr; }
}
