/* Wilayat Waves — editorial landing site.
   Pitch black, warm cream type, emerald + store green, gold accents. */

:root {
    --bg: #05110C;
    --bg-raised: #0B1A14;
    --bg-soft: #10241C;
    --rule: rgba(232, 226, 200, 0.11);
    --rule-strong: rgba(232, 226, 200, 0.2);
    --ink: #F5EFE0;
    --ink-2: #B7BCAB;
    --ink-3: #8C9488;
    --emerald: #4CB17A;
    --mint: #52DF81;
    --gold: #E0BC6A;
    --gold-soft: #F0DBA2;
    --danger: #FF7A6E;
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --container: 1240px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { overflow-x: hidden; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--mint); color: #05110C; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 0.4em;
    font-variation-settings: 'opsz' 144;
}

h1 em, h2 em, h3 em {
    font-style: italic;
    color: var(--gold-soft);
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Small type ---------- */

.label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 22px;
}

.label .star { width: 12px; height: 12px; flex-shrink: 0; }
.label.is-dark { color: #05110C; }

.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--ink-2); max-width: 560px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    padding: 0 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-mint { background: var(--mint); color: #05110C; }
.btn-mint:hover { background: #6BEA97; }
.btn-line { border-color: var(--rule-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-dark { background: #05110C; color: var(--ink); }
.btn-dark:hover { background: #0E2018; }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 4px;
    transition: border-color 0.2s ease;
}

.link-arrow:hover { border-color: var(--mint); }

/* Store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

.store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 22px 0 18px;
    border-radius: 14px;
    background: #05110C;
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    transition: transform 0.25s var(--ease), border-color 0.2s ease;
}

.store:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.store small { display: block; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); line-height: 1.2; }
.store strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
.store.is-soon { cursor: default; opacity: 0.7; }
.store.is-soon:hover { transform: none; border-color: var(--rule-strong); }

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: -0.01em;
    font-variation-settings: 'opsz' 72;
}

.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
    display: block;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 1px;
    background: var(--gold);
}

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (min-width: 981px) {
    .nav-menu { display: flex; align-items: center; gap: 30px; }
}

@media (max-width: 980px) {
    .nav-toggle { display: inline-flex; }
    .nav-menu {
        position: fixed;
        inset: 80px 0 0;
        background: var(--bg);
        padding: 20px 24px 40px;
        display: flex;
        flex-direction: column;
        gap: 30px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        overflow-y: auto;
    }
    .nav-open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
    .nav-open .site-header { background: var(--bg); border-bottom-color: var(--rule); }
    .nav-links { flex-direction: column; gap: 0; }
    .nav-links a {
        font-family: var(--serif);
        font-size: 34px;
        font-weight: 400;
        padding: 12px 0;
        border-bottom: 1px solid var(--rule);
        color: var(--ink);
    }
    .nav-links a.is-active { color: var(--gold-soft); }
    .nav-links a.is-active::after { display: none; }
    .nav-cta { flex-direction: column; align-items: stretch; }
}

/* ---------- Hero ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* 3D ring of live covers */

/* Soft floor light under the ring */

/* GSAP drives the ring when it is available */

.glass-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(16, 36, 28, 0.96), rgba(11, 26, 20, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}

.glass-chip small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.glass-chip > img { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; }
.chip-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(217, 180, 90, 0.16); color: var(--gold); }

.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; margin-left: 4px; }
.eq i { width: 3px; border-radius: 2px; background: var(--mint); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.eq i:nth-child(2) { height: 90%; animation-delay: -0.5s; }
.eq i:nth-child(3) { height: 60%; animation-delay: -0.8s; }
.eq i:nth-child(4) { height: 75%; animation-delay: -0.35s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.eq i { transform-origin: bottom; }

/* ---------- Book covers ---------- */

.cover {
    width: 100%;
    height: auto;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Phone frame ---------- */

.phone {
    border-radius: 44px;
    padding: 8px;
    background: #1C1C1E;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px rgba(0, 0, 0, 0.6);
}

.phone img { border-radius: 37px; width: 100%; height: auto; }

.tablet {
    border-radius: 30px;
    padding: 11px;
    background: #1C1C1E;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px rgba(0, 0, 0, 0.6);
}

.tablet img { border-radius: 20px; width: 100%; height: auto; }

/* ---------- Ledger (stats) ---------- */

.ledger {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.ledger div { padding: 38px 28px 34px; border-left: 1px solid var(--rule); }
.ledger div:first-child { border-left: 0; padding-left: 0; }

.ledger strong {
    display: block;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(44px, 5.4vw, 76px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    font-variation-settings: 'opsz' 144;
}

.ledger span { font-size: 14px; color: var(--ink-3); }

/* ---------- Sections ---------- */

.section { padding: 130px 0; position: relative; }
.section-sm { padding: 80px 0; }

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: end;
    margin-bottom: 64px;
}

.section-head h2 { font-size: clamp(40px, 5vw, 72px); margin: 0; }
.section-head p { margin: 0; font-size: 18px; max-width: 480px; }
.section-head.is-stacked { grid-template-columns: 1fr; max-width: 820px; gap: 20px; }

/* ---------- Top 10 shelf ---------- */

.shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 230px;
    gap: 34px;
    overflow-x: auto;
    padding: 10px 24px 30px;
    margin: 0 -24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.shelf::-webkit-scrollbar { display: none; }

.shelf-item { position: relative; scroll-snap-align: start; }
.shelf-art { position: relative; padding-left: 64px; }
.shelf-item h4,
.shelf-item p { padding-left: 64px; }

.shelf-rank {
    position: absolute;
    left: -6px;
    bottom: -12px;
    font-family: var(--serif);
    font-size: 150px;
    line-height: 0.8;
    font-weight: 700;
    color: var(--bg);
    -webkit-text-stroke: 1.5px var(--gold);
    letter-spacing: -0.06em;
    z-index: 0;
    font-variation-settings: 'opsz' 144;
}

.shelf-item .cover { position: relative; z-index: 1; transition: transform 0.35s var(--ease); }
.shelf-item:hover .cover { transform: translateY(-6px); }
.shelf-item h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 16px 0 4px; letter-spacing: 0; }
.shelf-item p { font-size: 13px; color: var(--ink-3); margin: 0; }

.shelf-controls { display: flex; gap: 10px; }

.round-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.round-btn:hover { border-color: var(--ink); }

/* ---------- Mint block (matches the store screenshots) ---------- */

.mint {
    background: var(--mint);
    color: #05110C;
    position: relative;
    overflow: hidden;
}

.mint h2,
.mint h3 { color: #05110C; }
.mint h2 em { color: #05110C; }
.mint p { color: rgba(5, 17, 12, 0.75); }

.mint-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 60px;
    align-items: center;
}

.mint-phones { position: relative; display: flex; justify-content: center; gap: 22px; padding: 30px 0 90px; }
.mint-phones .phone { width: 250px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35); }
.mint-phones .phone + .phone { transform: translateY(60px); }

.badge-burst {
    position: absolute;
    top: 0;
    right: 4%;
    width: 132px;
    height: 132px;
    z-index: 2;
    display: grid;
    place-items: center;
    text-align: center;
    color: #05110C;
    font-family: var(--sans);
    font-weight: 800;
    line-height: 1;
}

.badge-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
.badge-burst span { position: relative; font-size: 13px; letter-spacing: 0.04em; }
.badge-burst span b { display: block; font-size: 30px; letter-spacing: -0.02em; margin-bottom: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.mint-list { list-style: none; padding: 0; margin: 34px 0 0; }
.mint-list li {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    border-top: 1px solid rgba(5, 17, 12, 0.18);
    font-size: 17px;
    color: rgba(5, 17, 12, 0.8);
}
.mint-list li:last-child { border-bottom: 1px solid rgba(5, 17, 12, 0.18); }
.mint-list strong { color: #05110C; font-weight: 700; }
.mint-list .n { font-family: var(--serif); font-size: 15px; color: #05110C; min-width: 26px; }

/* ---------- Feature chapters ---------- */

.chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
    padding: 90px 0;
    border-top: 1px solid var(--rule);
}

.chapter.is-flipped .chapter-media { order: 2; }

.chapter h3 { font-size: clamp(36px, 4vw, 58px); margin-bottom: 22px; }
.chapter .lede { margin-bottom: 30px; }

.chapter-media { display: flex; justify-content: center; align-items: center; gap: 24px; position: relative; }
.chapter-media .phone { width: 270px; }
.chapter-media .phone.is-small { width: 220px; margin-top: 90px; opacity: 0.9; }

.points { list-style: none; padding: 0; margin: 0; }
.points li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 14px;
    padding: 15px 0;
    border-top: 1px solid var(--rule);
    color: var(--ink-2);
}
.points li:last-child { border-bottom: 1px solid var(--rule); }
.points strong { color: var(--ink); font-weight: 700; }
.points svg { color: var(--mint); margin-top: 4px; }

/* ---------- Category index ---------- */

.index-list { border-top: 1px solid var(--rule); }

.index-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--rule);
}

.index-row .num { font-family: var(--serif); color: var(--ink-3); font-size: 18px; }
.index-row h3 { font-size: clamp(32px, 4vw, 56px); margin: 0; transition: color 0.25s ease; }
.index-row:hover h3 { color: var(--gold-soft); }
.index-row .count { font-size: 14px; color: var(--ink-3); white-space: nowrap; }

.index-covers { display: flex; padding-left: 14px; }
.index-covers img {
    width: 46px;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 4px;
    margin-left: -14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.6);
}

/* ---------- Bento of small features ---------- */

.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.bento div {
    padding: 34px 30px 38px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.bento svg { color: var(--gold); margin-bottom: 26px; }
.bento h4 { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: 0; color: var(--ink); margin-bottom: 8px; }
.bento p { font-size: 15px; margin: 0; color: var(--ink-3); }

/* ---------- Devices ---------- */

.devices { position: relative; max-width: 1000px; margin: 0 auto; }
.devices .phone { position: absolute; width: 230px; right: -30px; bottom: -40px; }

/* ---------- Quotes ---------- */

.quotes { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--rule); }

.quote {
    margin: 0;
    padding: 50px 50px 46px 0;
    border-bottom: 1px solid var(--rule);
}

.quote:nth-child(even) { padding-left: 50px; padding-right: 0; border-left: 1px solid var(--rule); }

.quote blockquote {
    margin: 0 0 28px;
    font-family: var(--serif);
    font-size: clamp(21px, 1.9vw, 26px);
    line-height: 1.4;
    color: var(--ink);
    font-variation-settings: 'opsz' 48;
}

.quote figcaption { font-size: 14px; color: var(--ink-3); }
.quote figcaption strong { color: var(--ink); font-weight: 700; margin-right: 8px; }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 60px; }
.faq-grid h2 { font-size: clamp(40px, 5vw, 72px); }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 26px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-family: var(--serif);
    font-size: 23px;
    color: var(--ink);
    font-variation-settings: 'opsz' 36;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex-shrink: 0; transition: transform 0.3s var(--ease); color: var(--gold); }
.faq details[open] .plus { transform: rotate(45deg); }
.faq .answer { margin: 0; padding: 0 60px 28px 0; color: var(--ink-2); }

/* ---------- Closing CTA ---------- */

.closing {
    background: var(--mint);
    color: #05110C;
    border-radius: 36px;
    padding: 90px 70px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    overflow: hidden;
    position: relative;
}

.closing h2 { color: #05110C; font-size: clamp(42px, 5.4vw, 80px); }
.closing h2 em { color: #05110C; }
.closing p { color: rgba(5, 17, 12, 0.75); font-size: 19px; max-width: 480px; margin-bottom: 34px; }
.closing .content { padding-bottom: 90px; }
.closing .store { background: #05110C; border-color: #05110C; }
.closing .store small { color: rgba(242, 237, 228, 0.6); }
.closing-phone { align-self: end; justify-self: center; width: 300px; margin-bottom: -120px; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: 180px 0 80px; border-bottom: 1px solid var(--rule); }
.page-hero h1 { font-size: clamp(48px, 7vw, 100px); line-height: 0.98; letter-spacing: -0.035em; max-width: 1000px; margin-bottom: 26px; }
.page-hero .lede { max-width: 640px; }
.page-hero .meta { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* ---------- Library page ---------- */

.toolbar {
    position: sticky;
    top: 80px;
    z-index: 20;
    background: rgba(5, 17, 12, 0.92);
    border-bottom: 1px solid var(--rule);
    padding: 18px 0;
    margin-bottom: 50px;
}

.toolbar .container { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.tab {
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab:hover { color: var(--ink); border-color: var(--ink-3); }
.tab.is-active { background: var(--ink); color: #05110C; border-color: var(--ink); }
.tab .c { opacity: 0.55; margin-left: 4px; font-weight: 500; }

.search { position: relative; flex: 0 1 300px; }

.search input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    background: var(--bg-raised);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}

.search input:focus { outline: none; border-color: var(--mint); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }

.books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 46px 28px;
}

.book { display: block; }
.book .cover { transition: transform 0.35s var(--ease), box-shadow 0.35s ease; }
.book:hover .cover { transform: translateY(-6px); box-shadow: 0 30px 50px rgba(0, 0, 0, 0.6); }
.book h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--ink); line-height: 1.35; margin: 16px 0 4px; }
.book .by { font-size: 13.5px; color: var(--ink-2); margin: 0 0 8px; }
.book .facts { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.book .lang { color: var(--gold); }

.empty { text-align: center; padding: 60px 0; color: var(--ink-3); }

/* ---------- Prose & forms ---------- */

.prose-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 80px; }
.toc { position: sticky; top: 120px; align-self: start; font-size: 14px; }
.toc a { display: block; padding: 8px 0; color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.toc a:hover { color: var(--ink); }

.prose { max-width: 720px; font-size: 17.5px; }
.prose h2 { font-size: 32px; margin: 56px 0 16px; scroll-margin-top: 110px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--mint); border-bottom: 1px solid rgba(82, 223, 129, 0.35); }

.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--rule-strong);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 18px;
    transition: border-color 0.2s ease;
}

.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(242, 237, 228, 0.28); }

.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--mint); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 30px; }
.form-grid .full { grid-column: 1 / -1; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--danger); flex-shrink: 0; }

.alert { padding: 14px 18px; border-radius: 12px; font-size: 15px; margin-bottom: 24px; }
.alert-error { background: rgba(255, 122, 110, 0.08); border: 1px solid rgba(255, 122, 110, 0.35); color: var(--danger); }

.panel {
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    border-radius: 28px;
    padding: 48px;
}

.panel.is-danger { border-color: rgba(255, 122, 110, 0.3); }

.hidden { display: none !important; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; }
.contact-lines { list-style: none; padding: 0; margin: 0; }
.contact-lines li { padding: 22px 0; border-top: 1px solid var(--rule); }
.contact-lines li:last-child { border-bottom: 1px solid var(--rule); }
.contact-lines small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.contact-lines a,
.contact-lines span { font-family: var(--serif); font-size: 26px; color: var(--ink); font-variation-settings: 'opsz' 48; overflow-wrap: anywhere; }
.contact-lines a:hover { color: var(--gold-soft); }

.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics label { cursor: pointer; position: relative; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topics span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.topics input:checked + span { background: var(--ink); color: #05110C; border-color: var(--ink); }
.topics input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Free plan */
.plan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border: 1px solid var(--rule);
    border-radius: 32px;
    overflow: hidden;
}

.plan-price { background: var(--mint); color: #05110C; padding: 56px; display: flex; flex-direction: column; }
.plan-price h3 { color: #05110C; font-size: 30px; }
.plan-price .price { font-family: var(--serif); font-size: clamp(90px, 10vw, 150px); line-height: 0.9; letter-spacing: -0.05em; margin: 20px 0; font-variation-settings: 'opsz' 144; }
.plan-price p { color: rgba(5, 17, 12, 0.75); }
.plan-price .btn { margin-top: auto; align-self: flex-start; }
.plan-list { padding: 56px; background: var(--bg-raised); }

/* Dedication */
.dedications { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.dedications article { padding: 50px 50px 50px 0; border-bottom: 1px solid var(--rule); }
.dedications article + article { padding: 50px 0 50px 50px; border-left: 1px solid var(--rule); }
.dedications h3 { font-size: clamp(28px, 2.8vw, 38px); }

.names { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 60px; }
.names li {
    break-inside: avoid;
    padding: 18px 0;
    border-top: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: 22px;
    color: var(--ink);
    font-variation-settings: 'opsz' 36;
}

.arabic {
    font-family: 'Amiri', serif;
    font-size: clamp(34px, 4vw, 52px);
    color: var(--gold);
    line-height: 1.6;
    direction: rtl;
    display: block;
}

.signature { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--gold-soft); }

/* ---------- Modal ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
}

.modal.is-open { display: flex; }

.modal-box {
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    overflow: hidden;
    position: relative;
    animation: modal-in 0.35s var(--ease);
}

.modal-top { background: var(--mint); color: #05110C; padding: 34px 30px 28px; }
.modal-top img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 18px; }
.modal-top h3 { color: #05110C; font-size: 32px; margin-bottom: 6px; }
.modal-top p { margin: 0; color: rgba(5, 17, 12, 0.75); font-size: 15px; }
.modal-body { padding: 24px 30px 30px; display: grid; gap: 10px; }
.modal-body .store { width: 100%; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(5, 17, 12, 0.2);
    background: transparent;
    color: #05110C;
    cursor: pointer;
    display: grid;
    place-items: center;
}

@keyframes modal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */

.site-footer { padding: 110px 0 40px; }

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
    gap: 40px;
    padding-bottom: 70px;
}

.footer-top h5 { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 20px; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-top a { color: var(--ink-2); transition: color 0.2s ease; }
.footer-top a:hover { color: var(--ink); }
.footer-top .about p { max-width: 380px; margin: 20px 0 26px; }

.wordmark {
    font-family: var(--serif);
    font-size: clamp(54px, 14.5vw, 220px);
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: var(--ink);
    border-top: 1px solid var(--rule);
    padding-top: 40px;
    white-space: nowrap;
    font-variation-settings: 'opsz' 144;
}

.wordmark em { font-style: italic; color: var(--gold-soft); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    padding-top: 36px;
    font-size: 14px;
    color: var(--ink-3);
}

.footer-bottom p { margin: 0; }
.footer-bottom .dedication-line { max-width: 640px; font-style: italic; margin-top: 6px; }
.footer-bottom ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 24px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: 0.1s; }
.js .reveal-d2 { transition-delay: 0.2s; }
.js .reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track,
.eq i,
.badge-burst svg { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr 1fr; }
    .footer-top .about { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
    .section { padding: 90px 0; }
    .mint-grid,
    .chapter,
    .chapter.is-flipped,
    .faq-grid,
    .contact-grid,
    .closing,
    .plan,
    .prose-wrap,
    .section-head { grid-template-columns: 1fr; }
    .chapter { gap: 40px; padding: 70px 0; }
    .chapter.is-flipped .chapter-media { order: 0; }
    .ledger { grid-template-columns: 1fr 1fr; }
    .ledger div:nth-child(3) { border-left: 0; padding-left: 0; }
    .ledger div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
    .quotes,
    .dedications { grid-template-columns: 1fr; }
    .quote,
    .quote:nth-child(even),
    .dedications article,
    .dedications article + article { padding: 40px 0; border-left: 0; }
    .closing { padding: 60px 40px 0; }
    .closing .content { padding-bottom: 0; }
    .closing-phone { margin-bottom: -160px; width: 260px; }
    .toc { display: none; }
    .index-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .index-row .count { display: none; }
    .devices .phone { width: 170px; right: 0; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .container { padding: 0 16px; }
    .section { padding: 72px 0; }
    .section-sm { padding: 56px 0; }
    .section-head { margin-bottom: 40px; }
    .btn { height: 50px; padding: 0 22px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .ledger div { padding: 26px 16px 24px; }
    .ledger div:nth-child(odd) { padding-left: 0; }
    .shelf { grid-auto-columns: 170px; gap: 24px; padding: 10px 16px 20px; margin: 0 -16px; }
    .shelf-art,
    .shelf-item h4,
    .shelf-item p { padding-left: 46px; }
    .shelf-rank { font-size: 110px; bottom: -8px; }
    .mint-phones .phone { width: 160px; }
    .mint-phones .phone + .phone { transform: translateY(40px); }
    .badge-burst { width: 100px; height: 100px; right: 0; }
    .badge-burst span b { font-size: 22px; }
    .badge-burst span { font-size: 11px; }
    .chapter-media .phone { width: 210px; }
    .chapter-media .phone.is-small { display: none; }
    .index-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; padding: 20px 0; }
    .index-covers img { width: 34px; margin-left: -18px; }
    .bento { grid-template-columns: 1fr; }
    .bento div { padding: 28px 22px; }
    .faq summary { font-size: 20px; }
    .faq .answer { padding-right: 0; }
    .closing { padding: 50px 22px 0; border-radius: 26px; }
    .closing-phone { width: 210px; margin-bottom: -150px; }
    .page-hero { padding: 130px 0 56px; }
    .books { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
    .search { flex: 1 1 100%; }
    .toolbar { padding: 12px 0; }
    .toolbar .container { gap: 12px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { flex-shrink: 0; height: 36px; }
    .search input { height: 40px; }
    .panel,
    .plan-price,
    .plan-list { padding: 30px 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .names { columns: 1; }
    .devices .phone { width: 110px; bottom: -20px; border-radius: 24px; padding: 5px; }
    .devices .phone img { border-radius: 20px; }
    .tablet { padding: 6px; border-radius: 18px; }
    .tablet img { border-radius: 13px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .stores { flex-direction: column; align-items: stretch; }
}

/* =========================================================
   Motion & 3D layer
   ========================================================= */

/* Film grain over everything for a printed, premium feel */

/* Elements that GSAP animates start hidden only once JS has taken over.
   If animations never start, .anim-fallback (set after a timeout) shows them. */
.js [data-split],
.js [data-anim],
.js [data-stagger] { visibility: hidden; }
.anim-ready [data-split],
.anim-ready [data-anim],
.anim-ready [data-stagger],
.anim-fallback [data-split],
.anim-fallback [data-anim],
.anim-fallback [data-stagger] { visibility: visible; }

[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.06em 0.04em 0.12em; margin: -0.06em -0.04em -0.12em; }
[data-split] .wi { display: inline-block; }

/* Header hides on scroll down, returns on scroll up */
.site-header { transition: transform 0.45s var(--ease), background 0.3s ease, border-color 0.3s ease; }
.site-header.is-hidden { transform: translateY(-100%); }
.nav-open .site-header.is-hidden { transform: none; }

.head-side { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.flip { transform: rotate(180deg); display: grid; }

/* Cover with 3D tilt, glare and a play button */
.cover-wrap {
    display: block;
    position: relative;
    border-radius: 6px;
    transform-style: preserve-3d;
    transition: box-shadow 0.5s ease;
}

.cover-wrap .cover { transition: none; }
.cover-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.28), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cover-wrap:hover::after { opacity: 1; }

.shelf-item:hover .cover { transform: none; }

/* Scholars marquee (photos come from the API) */
.scholars { padding: 30px 0 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; }
.marquee { overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee-x 80s linear infinite; will-change: transform; }
.marquee[data-marquee="-1"] .marquee-track { animation-direction: reverse; animation-duration: 95s; }
.scholars:hover .marquee-track { animation-play-state: paused; }

.scholar {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding-right: 34px;
    font-family: var(--serif);
    font-size: clamp(24px, 2.6vw, 36px);
    color: var(--ink);
    white-space: nowrap;
    font-variation-settings: 'opsz' 72;
}

.scholar img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    background: var(--bg-soft);
    filter: grayscale(1) contrast(1.05);
    transition: filter 0.3s ease, transform 0.3s var(--ease);
    border: 1px solid var(--rule-strong);
}

.scholar:hover img { filter: none; transform: scale(1.08); }
.scholar .star { color: var(--gold); width: 14px; height: 14px; margin-left: 16px; }

@keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Story: sticky phone that swaps screens while the chapters scroll */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 80px; }
.story-step {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    opacity: 0.28;
    transition: opacity 0.5s ease;
}
.story-step.is-active { opacity: 1; }
.story-step h3 { font-size: clamp(36px, 4.2vw, 62px); margin-bottom: 22px; }
.story-step .lede { margin-bottom: 30px; }
.story-inline { display: none; }

.story-device { position: relative; }
.story-sticky {
    position: sticky;
    top: calc(50vh - 330px);
    height: 660px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-halo {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(82, 223, 129, 0.25), transparent 65%);
}

.story-dots { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.story-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); transition: all 0.4s var(--ease); }
.story-dots i.is-active { background: var(--mint); height: 26px; border-radius: 6px; }

/* Category index with a cover preview that follows the cursor */
.index-row { grid-template-columns: 60px minmax(0, 1fr) auto 40px; position: relative; }
.index-row .blurb { font-size: 15px; color: var(--ink-3); }
.row-arrow { color: var(--ink-3); transition: transform 0.4s var(--ease), color 0.3s ease; }
.index-row:hover .row-arrow { color: var(--gold); transform: translateX(6px) rotate(-45deg); }
.index-row::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease);
}
.index-row:hover::before { transform: scaleX(1); }

.index-preview {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    width: 170px;
    height: 240px;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.index-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s var(--ease);
}

.index-preview img:nth-child(1) { transform: rotate(-12deg) translateX(-50px); }
.index-preview img:nth-child(2) { transform: rotate(10deg) translateX(50px); }
.index-preview img:nth-child(3) { transform: none; }

/* Bento cells with a spotlight that follows the cursor */
.bento-cell { position: relative; overflow: hidden; transition: background 0.3s ease; }
.bento-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(82, 223, 129, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.bento-cell:hover::before { opacity: 1; }
.bento-cell svg { transition: transform 0.5s var(--ease); }
.bento-cell:hover svg { transform: translateY(-4px) rotate(-6deg); }

/* Devices flatten from a 3D angle as you scroll */
.devices-3d { perspective: 1600px; padding-bottom: 40px; }
.devices { transform-style: preserve-3d; transform-origin: 50% 100%; }

/* Magnetic buttons */

/* Mobile app bar */
.app-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    border-radius: 20px;
    background: rgba(11, 26, 20, 0.82);
    border: 1px solid var(--rule-strong);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(140%);
    transition: transform 0.5s var(--ease);
}

.app-bar.is-shown { transform: none; }
.app-bar img { width: 40px; height: 40px; border-radius: 10px; }
.app-bar span { flex: 1; font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.app-bar strong { display: block; color: var(--ink); font-size: 15px; }
.app-bar .btn { height: 42px; padding: 0 18px; font-size: 14px; }

@media (max-width: 980px) {
    .story-grid { grid-template-columns: 1fr; gap: 0; }
    .story-device { display: none; }
    .story-step { min-height: 0; opacity: 1; padding: 50px 0; border-top: 1px solid var(--rule); }
    .story-inline { display: block; width: 240px; margin: 0 auto 36px; }
    .index-preview { display: none; }
    .index-row { grid-template-columns: 40px minmax(0, 1fr) 30px; }
    .app-bar { display: flex; }
}

@media (max-width: 640px) {
    .hero-actions .btn { flex: 1 1 100%; }
    .glass-chip { font-size: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; }
    .glass-chip > img { width: 30px; height: 42px; }
    .chip-ico { width: 30px; height: 30px; border-radius: 9px; }
    .scholar { font-size: 22px; gap: 12px; padding-right: 22px; }
    .scholar img { width: 40px; height: 40px; }
    .index-row { grid-template-columns: 30px minmax(0, 1fr) 24px; }
    .index-row .blurb { display: none; }
    .site-footer { padding-bottom: 110px; }
}

/* =========================================================
   Intro, page transitions, cursor, band
   ========================================================= */

/* First-visit intro: light writes the Bismillah, becomes a voice, folds into the mark, and the
   panel lifts away through a row of arches. assets/js/intro.js runs it. */
.intro {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: radial-gradient(60% 50% at 50% 46%, #0F3324 0%, #071812 55%, #030B07 100%);
    transition: transform 1.05s cubic-bezier(0.76, 0, 0.18, 1);
}
.intro::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 74px;
    margin-top: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='74'%3E%3Cpath fill='%23030B07' d='M0 0H128V74C128 40 90 33 64 6C38 33 0 40 0 74Z'/%3E%3C/svg%3E") repeat-x center top / 128px 74px;
    transform: scaleY(-1);
}
.show-intro .intro { display: block; animation: intro-out 0.6s 7s forwards; }
.intro.is-leaving { transform: translate3d(0, calc(-100% - 80px), 0); }
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-en {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(47% + clamp(56px, 7vw, 92px));
    margin: 0;
    text-align: center;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(15px, 1.6vw, 21px);
    letter-spacing: 0.01em;
    color: var(--gold-soft);
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    filter: blur(6px);
    transition: opacity 0.8s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}
.intro-en.is-on { opacity: 0.85; transform: none; filter: none; }
.intro-en.is-off { opacity: 0; transform: translate3d(0, -10px, 0); filter: blur(6px); transition-duration: 0.45s; }
.intro-mark {
    position: absolute;
    left: 50%;
    top: 47%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro-mark img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.35), 0 0 60px rgba(224, 188, 106, 0.35); }
.intro-mark span { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.intro-mark em { font-style: italic; color: var(--gold-soft); }
.intro-mark.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

/* Curtain that covers the screen between pages */
.curtain {
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: var(--mint);
    transform: scaleY(0);
    transform-origin: bottom;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.curtain img { width: 56px; height: 56px; border-radius: 14px; opacity: 0; }
.from-nav .curtain { transform: scaleY(1); transform-origin: top; animation: curtain-out 0.6s 0.9s forwards; }
.motion-on.from-nav .curtain { animation: none; }
@keyframes curtain-out { to { transform: scaleY(0); } }

/* Scroll progress line */
.progress {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    z-index: 150;
    background: linear-gradient(90deg, var(--mint), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* Cursor follower (mouse only) */
.cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1500;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 1px solid rgba(242, 237, 228, 0.35);
    pointer-events: none;
    display: none;
    place-items: center;
}

.has-cursor .cursor { display: grid; }
.cursor-label { font-size: 13px; font-weight: 800; color: #05110C; letter-spacing: 0.04em; opacity: 0; transition: opacity 0.2s ease; }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-hidden { opacity: 0; }

/* Slowly breathing glow behind the hero */

/* Big outlined word band that slides with scroll */
.band { overflow: hidden; padding: 70px 0 50px; }
.band-track {
    display: flex;
    align-items: center;
    gap: 40px;
    width: max-content;
    font-family: var(--serif);
    font-size: clamp(64px, 11vw, 170px);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
    white-space: nowrap;
    font-variation-settings: 'opsz' 144;
    will-change: transform;
}
.band-track .o { color: transparent; -webkit-text-stroke: 1.5px var(--gold); font-style: italic; }
.band-track .star { width: 0.22em; height: 0.22em; color: var(--mint); flex-shrink: 0; }

/* Footer wordmark letters rise in */
.wordmark .ch { display: inline-block; }
.wordmark { overflow: hidden; padding-bottom: 0.14em; }

/* =========================================================
   Round 4: details panel, library tools, polish
   ========================================================= */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Book tiles are buttons that open the details panel */
.book,
.shelf-item { cursor: pointer; outline: none; }
.book:focus-visible .cover-wrap,
.shelf-item:focus-visible .cover-wrap { box-shadow: 0 0 0 3px var(--mint); }
.book h4 { transition: color 0.25s ease; }
.book:hover h4 { color: var(--gold-soft); }

/* Subject rows show their covers */
.index-row { grid-template-columns: 60px minmax(0, 1fr) auto auto 40px; }
.index-row .index-covers { display: flex; padding-left: 16px; }
.index-row .index-covers img {
    width: 62px;
    height: auto;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 5px;
    margin-left: -20px;
    background: var(--bg-soft);
    border: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s var(--ease);
}
.index-row .index-covers img:nth-child(1) { transform: rotate(-6deg); }
.index-row .index-covers img:nth-child(3) { transform: rotate(6deg); }

/* Details panel */
.sheet { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); opacity: 0; transition: opacity 0.4s ease; }
.sheet.is-open .sheet-backdrop { opacity: 1; }

.sheet-panel {
    position: relative;
    width: 100%;
    max-width: 1040px;
    max-height: calc(100vh - 48px);
    border-radius: 32px;
    background: #0B1A14;
    border: 1px solid var(--rule-strong);
    overflow: hidden;
    box-shadow: 0 60px 140px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.45s ease, transform 0.6s var(--ease);
}
.sheet.is-open .sheet-panel { opacity: 1; transform: none; }

.sheet-bg {
    position: absolute;
    inset: -20%;
    width: 140%;
    height: 140%;
    object-fit: cover;
    filter: blur(60px) saturate(1.4);
    opacity: 0.32;
    pointer-events: none;
}

.sheet-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 26, 20, 0.2), rgba(11, 26, 20, 0.92) 45%);
    pointer-events: none;
}

.sheet-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    background: rgba(5, 17, 12, 0.6);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.3s var(--ease), border-color 0.2s ease;
}
.sheet-close:hover { transform: rotate(90deg); border-color: var(--ink); }

.sheet-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 50px;
    padding: 50px;
    max-height: calc(100vh - 48px);
}

.sheet-art { perspective: 1200px; align-self: center; }
.sheet-cover { box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6); border-radius: 10px; }
.sheet-info { display: flex; flex-direction: column; min-height: 0; }
.sheet-title { font-size: clamp(32px, 3.6vw, 52px); margin-bottom: 10px; padding-right: 40px; }
.sheet-author { font-size: 17px; color: var(--ink-2); margin-bottom: 26px; }

.sheet-facts { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 26px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sheet-facts div { padding: 14px 26px 14px 0; margin-right: 26px; border-right: 1px solid var(--rule); }
.sheet-facts div:last-child { border-right: 0; margin-right: 0; }
.sheet-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.sheet-facts dd { margin: 0; font-family: var(--serif); font-size: 24px; color: var(--ink); }

.sheet-desc {
    overflow-y: auto;
    min-height: 60px;
    max-height: 34vh;
    padding-right: 12px;
    margin-bottom: 26px;
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.7;
    mask-image: linear-gradient(180deg, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
    overscroll-behavior: contain;
}
.sheet-desc::-webkit-scrollbar { width: 4px; }
.sheet-desc::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 4px; }
.sheet-cta { margin-top: auto; }

/* Library tools */
.toolbar .container { gap: 14px 20px; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tools .search { flex: 0 1 260px; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--bg-raised); }
.seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.25s ease, color 0.25s ease; }
.seg button.is-active { background: var(--ink); color: #05110C; }

.select { position: relative; display: inline-flex; align-items: center; }
.select select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    padding: 0 40px 0 18px;
    border-radius: 999px;
    border: 1px solid var(--rule-strong);
    background: var(--bg-raised);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.select select:focus { outline: none; border-color: var(--mint); }
.select select option { background: #0B1A14; }
.select svg { position: absolute; right: 16px; pointer-events: none; color: var(--ink-3); }

.result-count { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: -20px 0 26px; }
.empty-title { font-family: var(--serif); font-size: 32px; color: var(--ink); margin-bottom: 16px; }

/* Buttons: a soft light sweep on hover */
.btn-mint { position: relative; overflow: hidden; isolation: isolate; }
.btn-mint::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    z-index: -1;
    transition: left 0.7s var(--ease);
}
.btn-mint:hover::after { left: 120%; }

/* Back to top */
.to-top { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; transition: color 0.2s ease; }
.to-top span { display: grid; transform: rotate(-90deg); transition: transform 0.4s var(--ease); }
.to-top:hover { color: var(--ink); }
.to-top:hover span { transform: rotate(-90deg) translateX(4px); }

/* Legal contents: the section you're reading */
.toc a { position: relative; transition: color 0.25s ease, padding 0.35s var(--ease); }
.toc a.is-active { color: var(--ink); padding-left: 16px; }
.toc a::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--mint); transform: scale(0); transition: transform 0.35s var(--ease); }
.toc a.is-active::before { transform: scale(1); }

/* Copy button */
.copy-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; vertical-align: middle; transition: all 0.2s ease; }
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn .done { display: none; }
.copy-btn.is-copied { background: var(--mint); border-color: var(--mint); color: #05110C; }
.copy-btn.is-copied .idle { display: none; }
.copy-btn.is-copied .done { display: inline; }

@media (max-width: 980px) {
    .index-row { grid-template-columns: 40px minmax(0, 1fr) auto 30px; }
    .sheet { padding: 0; align-items: flex-end; }
    .sheet-panel { border-radius: 28px 28px 0 0; max-height: 92vh; transform: translateY(100%); }
    .sheet.is-open .sheet-panel { transform: none; }
    .sheet-grid { grid-template-columns: 1fr; gap: 24px; padding: 28px 22px 26px; max-height: 92vh; overflow-y: auto; }
    .sheet-art { width: 150px; }
    .sheet-desc { max-height: none; overflow: visible; mask-image: none; -webkit-mask-image: none; }
    .sheet-panel::after { background: linear-gradient(180deg, rgba(11, 26, 20, 0.4), rgba(11, 26, 20, 0.95) 35%); }
    .tools { width: 100%; }
}

@media (max-width: 640px) {
    .index-row { grid-template-columns: 30px minmax(0, 1fr) auto 24px; }
    .index-row .index-covers img { width: 30px; margin-left: -14px; }
    .sheet-facts div { padding-right: 16px; margin-right: 16px; }
    .sheet-facts dd { font-size: 20px; }
    .tools .search { flex: 1 1 100%; }
    .result-count { margin-top: -26px; }
    .copy-btn { margin: 8px 0 0; }
}

/* Free Forever: rotating seal */
.plan-price { position: relative; }
.seal { position: absolute; top: 28px; right: 28px; width: 150px; height: 150px; display: grid; place-items: center; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; }
.seal text { font-family: var(--sans); font-size: 13.5px; font-weight: 800; letter-spacing: 0.18em; fill: #05110C; }
.seal-core { width: 70px; height: 70px; border-radius: 50%; background: #05110C; display: grid; place-items: center; color: var(--mint); }
.seal-core .star { width: 30px; height: 30px; }
@media (max-width: 640px) { .seal { width: 104px; height: 104px; top: 18px; right: 14px; } .seal text { font-size: 15px; } .seal-core { width: 48px; height: 48px; } .seal-core .star { width: 20px; height: 20px; } }
@media (prefers-reduced-motion: reduce) { .seal svg { animation: none; } }
.topic-hint { min-height: 1.6em; margin: 14px 0 0; font-size: 14px; color: var(--gold-soft); }
.topics span { transition: all 0.25s var(--ease); }
.topics label:hover span { border-color: var(--ink-3); transform: translateY(-2px); }

/* 404 */
.not-found { position: relative; overflow: hidden; }
.nf-number {
    font-family: var(--serif);
    font-size: clamp(140px, 26vw, 360px);
    line-height: 0.8;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--gold);
    display: flex;
    align-items: center;
    gap: 0.05em;
    margin-bottom: 40px;
    font-variation-settings: 'opsz' 144;
}
.nf-number span { display: grid; place-items: center; width: 0.7em; height: 0.7em; color: var(--mint); animation: spin 18s linear infinite; }
.nf-number .star { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .nf-number span { animation: none; } }
@media (min-width: 1101px) {
    .tools { flex-wrap: nowrap; }
    .tools .search { flex: 0 1 230px; }
}

@media (max-width: 640px) {
    .toolbar { position: static; margin-bottom: 40px; }
    .tools { gap: 8px; }
    .tools .seg { flex: 1 1 auto; }
    .tools .seg button { flex: 1; }
    .tools .select { flex: 0 0 auto; }
}

/* =========================================================
   Round 5: Scholars page, patterns, light, 3D polish
   ========================================================= */

/* Eight-pointed star lattice behind page headers */
.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
    content: "";
    position: absolute;
    inset: -40% -10% -40% 40%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23D9B45A' stroke-width='0.35' d='M12 2.5l2.8 2.8H18.7V9.2L21.5 12l-2.8 2.8V18.7H14.8L12 21.5l-2.8-2.8H5.3V14.8L2.5 12l2.8-2.8V5.3H9.2z'/%3E%3C/svg%3E");
    background-size: 72px 72px;
    opacity: 0.16;
    mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 65%);
    pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
@keyframes pattern-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-72px, 72px, 0); } }

/* Ambient light that follows the cursor */
.ambient {
    position: fixed;
    left: 0;
    top: 0;
    width: 700px;
    height: 700px;
    margin: -350px 0 0 -350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(82, 223, 129, 0.07), rgba(217, 180, 90, 0.035) 35%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    display: none;
}
.has-cursor .ambient { display: block; }
main, .site-footer { position: relative; z-index: 1; }

/* Nav: a gold line glides to the hovered link */
.nav-links { position: relative; }
.nav-line {
    position: absolute;
    bottom: 2px;
    height: 1px;
    background: var(--gold);
    left: 0;
    width: 0;
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.3s ease;
    transform-origin: 0 50%;
    pointer-events: none;
}
.has-nav-line .nav-links a.is-active::after { display: none; }

/* Outline buttons fill from the bottom */
.btn-line { position: relative; overflow: hidden; isolation: isolate; }
.btn-line::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: translateY(101%);
    border-radius: inherit;
    transition: transform 0.5s var(--ease);
    z-index: -1;
}
.btn-line:hover { color: #05110C; border-color: var(--ink); }
.btn-line:hover::before { transform: none; }

/* Lines that draw themselves in */
.draw-line { position: relative; }
.draw-line::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), rgba(217, 180, 90, 0));
    transform: scaleX(var(--draw, 0));
    transform-origin: left;
}

/* Wipe-in image reveals */
.wipe { clip-path: inset(0 0 0 0 round 44px); }

/* Generic 3D tilt surfaces */
[data-tilt-card] { transform-style: preserve-3d; }

/* Scholars: spotlight */
.spotlight { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; align-items: center; }
.spotlight-photo {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #1d2a22, #0B1A14);
    box-shadow: 0 0 0 1px rgba(217, 180, 90, 0.35), 0 50px 100px rgba(0, 0, 0, 0.6);
}
.spotlight-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.spotlight-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 17, 12, 0.85)); }
.spotlight-badge {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--mint);
    color: #05110C;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    transform: translateZ(40px);
}
.spotlight-info h2 { font-size: clamp(40px, 5vw, 72px); }
.spotlight-meta { color: var(--gold); font-weight: 700; font-size: 15px; margin-bottom: 20px; }
.spotlight-info .lede { max-width: none; margin-bottom: 34px; }
.spotlight-books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

.mini-book { cursor: pointer; outline: none; }
.mini-book .cover-wrap { display: block; }
.mini-title { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--ink-2); transition: color 0.2s ease; }
.mini-book:hover .mini-title { color: var(--gold-soft); }
.mini-book:focus-visible .cover-wrap { box-shadow: 0 0 0 3px var(--mint); }

/* Scholars: grid cards */
.scholar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px 24px; perspective: 1400px; }
.scholar-card { margin: 0; cursor: pointer; outline: none; }
.scholar-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(160deg, #1d2a22, #0B1A14);
    border: 1px solid var(--rule);
    transition: border-color 0.3s ease, box-shadow 0.4s ease;
}
.scholar-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.05) brightness(0.9); transition: filter 0.5s ease, transform 0.9s var(--ease); }
.scholar-initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 56px; color: var(--gold-soft); }
.scholar-count {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(5, 17, 12, 0.75);
    border: 1px solid rgba(217, 180, 90, 0.5);
    color: var(--gold-soft);
    font-family: var(--serif);
    font-size: 16px;
    transform: translateZ(30px);
}
.scholar-card:hover .scholar-photo { border-color: rgba(217, 180, 90, 0.5); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.scholar-card:hover .scholar-photo img { filter: none; transform: scale(1.07); }
.scholar-card:focus-visible .scholar-photo { box-shadow: 0 0 0 3px var(--mint); }
.scholar-card figcaption { padding-top: 14px; }
.scholar-card strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.2; color: var(--ink); transition: color 0.25s ease; }
.scholar-card:hover strong { color: var(--gold-soft); }
.scholar-card figcaption span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* Scholar panel */
.scholar-portrait {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(160deg, #1d2a22, #0B1A14);
    box-shadow: 0 0 0 1px rgba(217, 180, 90, 0.35), 0 40px 80px rgba(0, 0, 0, 0.6);
}
.scholar-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.scholar-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px; }
.scholar-sheet .sheet-desc { max-height: 22vh; }

@media (max-width: 980px) {
    .spotlight { grid-template-columns: 1fr; gap: 40px; }
    .spotlight-photo { max-width: 380px; }
    .spotlight-books { grid-template-columns: repeat(3, 1fr); }
    .scholar-sheet .sheet-art { width: 170px; }
}

@media (max-width: 640px) {
    .scholar-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
    .scholar-card strong { font-size: 17px; }
    .scholar-initials { font-size: 40px; }
    .page-hero::before { inset: -20% -40% -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero::before { animation: none; }
}

/* Top 10 coverflow */
.shelf { perspective: 1400px; }
.shelf-art { transform-origin: 50% 50%; will-change: transform; }
@media (pointer: fine) {
    .shelf { scroll-snap-type: none; cursor: grab; }
    .shelf.is-dragging { cursor: grabbing; user-select: none; }
    .shelf.is-dragging img { pointer-events: none; }
}

.nav-links a { white-space: nowrap; }
@media (min-width: 981px) and (max-width: 1200px) {
    .nav-cta .btn-line { display: none; }
    .nav-links a { padding: 8px 10px; }
    .nav-menu { gap: 16px; }
}

/* ==========================================================
   Layer 3: ornaments, waveform, glass cards and floating covers
   ========================================================== */

/* Rosettes are line art that inherit their colour */
.rosette { display: block; pointer-events: none; }

/* Hero: light rays, mihrab arch and rosette behind the phone */
@keyframes rosette-spin { to { rotate: 360deg; } }

/* Waveform under the numbers: bars are added by JS */

/* Ledger: numbers glow on hover */
.ledger div { position: relative; transition: background 0.4s ease; }
.ledger strong { background: linear-gradient(180deg, var(--ink) 40%, var(--gold-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ledger div::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--mint), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease);
}
.ledger div:hover::after { transform: scaleX(1); }

/* Top 10: covers stand on a glossy floor */
.shelf-item { padding-bottom: 8px; }
.shelf-item h4 { margin-top: 46px; }

/* Green block: big rosette and floating covers */
.mint-grid { position: relative; }
.mint-rosette {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 640px;
    margin: -340px 0 0 -320px;
    color: rgba(5, 17, 12, 0.12);
    animation: rosette-spin 90s linear infinite reverse;
    z-index: 0;
}
.mint-phones .phone { position: relative; z-index: 2; }
.orbit-cover {
    position: absolute;
    z-index: 3;
    width: 104px;
    border-radius: 10px;
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.orbit-0 { left: -30px; top: 70px; }
.orbit-1 { right: -26px; top: 46%; z-index: 1; }
.orbit-2 { left: 4%; bottom: 40px; width: 88px; }
.badge-burst { z-index: 4; }

/* Devices: a chip that shows progress following you between screens */
.sync-chip {
    position: absolute;
    left: -46px;
    top: 34%;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 320px;
    padding: 12px 18px 12px 12px;
    border-radius: 20px;
    background: rgba(13, 30, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
    transform: translateZ(60px);
}
.sync-chip > img { width: 48px; height: 66px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sync-chip > div { min-width: 0; flex: 1; }
.sync-chip small { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint); }
.sync-chip small i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: pulse-dot 1.6s ease-in-out infinite; }
.sync-chip strong { display: block; margin: 4px 0 10px; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-bar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.sync-bar b { display: block; height: 100%; width: 62%; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--mint)); }
@keyframes pulse-dot { 50% { opacity: 0.35; transform: scale(0.7); } }

/* Quotes: glass cards with a large gold mark */
.quotes { gap: 20px; border-top: 0; }
.quotes .quote {
    position: relative;
    overflow: hidden;
    padding: 64px 44px 36px;
    border: 1px solid var(--rule);
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
    transition: border-color 0.4s ease, background 0.4s ease;
}
.quotes .quote:hover { border-color: rgba(217, 180, 90, 0.35); }
.quotes .quote::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(82, 223, 129, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.quotes .quote:hover::before { opacity: 1; }
.q-mark {
    position: absolute;
    top: -14px;
    left: 32px;
    font-family: var(--serif);
    font-size: 150px;
    line-height: 1;
    color: var(--gold);
    opacity: 0.5;
    font-style: italic;
    pointer-events: none;
}
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.q-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-soft), var(--emerald));
    color: #05110C;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
}

/* Feature cells: icon sits in a soft glowing tile */
.bento-cell svg {
    box-sizing: content-box;
    padding: 12px;
    border-radius: 14px;
    background: rgba(217, 180, 90, 0.08);
    box-shadow: inset 0 0 0 1px rgba(217, 180, 90, 0.18);
}
.bento-cell:hover svg { background: rgba(82, 223, 129, 0.12); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(82, 223, 129, 0.3), 0 0 30px rgba(82, 223, 129, 0.25); }

/* FAQ: open answers get a side rule */
.faq details { position: relative; }
.faq details::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 26px;
    bottom: 26px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--mint), var(--gold));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s var(--ease);
}
.faq details[open]::before { transform: scaleY(1); }
.faq summary { transition: color 0.3s ease; }
.faq summary:hover { color: var(--gold-soft); }

/* Closing card: rosette and covers floating around the phone */
.closing-rosette {
    position: absolute;
    right: -180px;
    top: -200px;
    width: 760px;
    color: rgba(5, 17, 12, 0.1);
    animation: rosette-spin 140s linear infinite;
}
.closing .content { position: relative; z-index: 2; }
.closing-device { position: relative; align-self: end; justify-self: center; width: 300px; z-index: 2; }
.closing-device .closing-phone { width: 100%; position: relative; z-index: 2; }
.float-cover {
    position: absolute;
    width: 96px;
    border-radius: 10px;
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.35);
    z-index: 1;
}
.fc-0 { left: -110px; top: 40px; }
.fc-1 { right: -120px; top: 110px; z-index: 3; }
.fc-2 { left: -80px; top: 260px; width: 80px; z-index: 3; }
.fc-3 { right: -90px; top: 320px; width: 78px; }

@media (max-width: 980px) {
    .shelf-item h4 { margin-top: 30px; }
    .sync-chip { left: 10px; top: auto; bottom: 30px; width: 280px; }
    .quotes .quote,
    .quotes .quote:nth-child(even) { padding: 56px 32px 30px; border-left: 1px solid var(--rule); }
    .closing-device { width: 260px; }
    .faq details::before { left: -14px; }
}

@media (max-width: 640px) {
    .mint-rosette { width: 440px; margin: -230px 0 0 -220px; }
    .orbit-cover { width: 70px; }
    .orbit-0 { left: -6px; top: 20px; }
    .orbit-1 { right: -6px; }
    .orbit-2 { width: 60px; }
    .sync-chip { left: 6px; bottom: 10px; width: 230px; padding: 8px 12px 8px 8px; gap: 10px; border-radius: 14px; }
    .sync-chip > img { width: 34px; height: 48px; }
    .sync-chip strong { font-size: 13px; margin-bottom: 6px; }
    .quotes .quote,
    .quotes .quote:nth-child(even) { padding: 50px 22px 26px; }
    .q-mark { font-size: 120px; left: 18px; }
    .closing-device { width: 210px; }
    .float-cover { width: 64px; }
    .fc-0 { left: -64px; }
    .fc-1 { right: -70px; }
    .fc-2 { left: -50px; width: 56px; }
    .fc-3 { right: -54px; width: 54px; }
    .faq details::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mint-rosette,
.closing-rosette,
.sync-chip small i { animation: none; }
}
.faq .answer { overflow: hidden; }

/* Inner pages: a slow rosette behind the title */
.page-hero > .container { position: relative; z-index: 1; }
.page-rosette {
    position: absolute;
    right: -140px;
    top: 50%;
    width: 600px;
    margin-top: -300px;
    color: rgba(217, 180, 90, 0.1);
    animation: rosette-spin 150s linear infinite;
}
@media (max-width: 640px) { .page-rosette { width: 380px; margin-top: -190px; right: -170px; } }
@media (prefers-reduced-motion: reduce) { .page-rosette { animation: none; } }

/* Compact hero stage */

/* ---------- From printed page to podcast (pinned scroll story) ---------- */

/* 1. book */

/* 2. conversation */

/* 3 & 4. cards */

/* Without the motion layer, show the finished result only */

/* ---------- About: dedications as cards ---------- */
.dedications { gap: 20px; border-top: 0; }
.dedications article,
.dedications article + article {
    position: relative;
    overflow: hidden;
    padding: 44px 40px;
    border: 1px solid var(--rule);
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
}
.dedications article::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 180, 90, 0.18), transparent 70%);
    pointer-events: none;
}
.dedications h3 { color: var(--gold-soft); }
@media (max-width: 980px) {
    .dedications article,
    .dedications article + article { padding: 34px 26px; border-left: 1px solid var(--rule); }
}

/* Library hero: a fan of the top covers */
.cover-fan {
    position: absolute;
    right: max(40px, calc((100vw - var(--container)) / 2 + 40px));
    top: 50%;
    width: 360px;
    height: 300px;
    margin-top: -130px;
    perspective: 1400px;
    pointer-events: none;
}
.cover-fan img {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 150px;
    margin-left: -75px;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 8px;
    transform-origin: 50% 120%;
    transform: rotate(calc(var(--k) * 11deg)) translateY(calc(var(--k) * var(--k) * 6px));
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    z-index: calc(10 - var(--k) * var(--k));
}
@media (max-width: 1100px) { .cover-fan { display: none; } }

/* Scholars hero: portraits orbit a centre seal */
.face-orbit {
    --size: 380px;
    position: absolute;
    right: max(30px, calc((100vw - var(--container)) / 2 + 30px));
    top: 50%;
    width: var(--size);
    height: var(--size);
    margin-top: calc(var(--size) / -2 + 20px);
    pointer-events: none;
}
.face-orbit::before {
    content: "";
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    border: 1px dashed rgba(217, 180, 90, 0.3);
}
.face-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 35%, rgba(82, 223, 129, 0.18), rgba(11, 26, 20, 0.9) 70%);
    box-shadow: inset 0 0 0 1px rgba(217, 180, 90, 0.35), 0 0 60px rgba(82, 223, 129, 0.15);
}
.face-core .star { color: var(--gold); width: 22px; height: 22px; margin-bottom: 4px; }
.face-core strong { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; color: var(--ink); }
.face-core span { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.face-ring { position: absolute; inset: 0; animation: rosette-spin 70s linear infinite; }
.face {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(217, 180, 90, 0.5), 0 18px 36px rgba(0, 0, 0, 0.6);
    background: var(--bg-soft);
    transform: rotate(calc(var(--i) * 360deg / var(--n))) translateY(calc(var(--size) / -2 + 40px)) rotate(calc(var(--i) * -360deg / var(--n)));
}
.face img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2); animation: rosette-spin 70s linear infinite reverse; }
@media (max-width: 1100px) { .face-orbit { display: none; } }
@media (prefers-reduced-motion: reduce) { .face-ring, .face img { animation: none; } }
.sheet-desc { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* Desktop header becomes a floating glass pill once you scroll */
@media (min-width: 981px) {
    .site-header { transition: transform 0.45s var(--ease), padding 0.45s var(--ease), background 0.3s ease, border-color 0.3s ease; }
    .nav { transition: height 0.45s var(--ease), padding 0.45s var(--ease), background 0.35s ease, box-shadow 0.35s ease, border-radius 0.45s var(--ease); border-radius: 0; }
    .site-header.is-scrolled .brand img { width: 34px; height: 34px; }
    .brand img { transition: width 0.45s var(--ease), height 0.45s var(--ease); }
}

/* ==========================================================
   Layer 4: the nave. Malachite night, gold leaf, depth.
   Everything that moves here moves on the compositor.
   ========================================================== */

:root {
    --bg: #05110C;
    --bg-raised: #0B1A14;
    --bg-soft: #10241C;
    --leaf: linear-gradient(176deg, #FBEFC6 8%, #E8C877 46%, #B98D3C 82%);
}

html { background: var(--bg); }
body { background: radial-gradient(120% 60vh at 50% 0, #0A2219, transparent) no-repeat, var(--bg); }

/* Headings: the italic carries the voice, gold is kept for the hero and big moments */
h1 em, h2 em, h3 em { color: inherit; }
h1, h2 { font-weight: 340; }

.label {
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--gold-soft);
    margin-bottom: 18px;
}
.label .star { color: var(--gold); }
.label.is-dark, .label.is-dark .star { color: #05110C; }

.btn-mint { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset, 0 14px 34px rgba(82, 223, 129, 0.2); }
.btn-line { border-color: rgba(240, 219, 162, 0.3); }

.field label, .contact-lines small, .footer-top h5, .sheet-facts dt, .result-count { letter-spacing: 0.02em; text-transform: none; font-size: 13.5px; font-weight: 600; }
.store small { letter-spacing: 0.02em; text-transform: none; font-size: 11.5px; }
.glass-chip small { letter-spacing: 0; text-transform: none; font-size: 12px; }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

/* Header pill: solid enough that nothing has to be blurred behind it */
.site-header.is-scrolled { background: rgba(5, 17, 12, 0.94); border-bottom-color: var(--rule); }
@media (min-width: 981px) {
    .site-header.is-scrolled { padding-top: 12px; background: transparent; border-bottom-color: transparent; }
    .site-header.is-scrolled .nav {
        height: 62px;
        padding: 0 10px 0 18px;
        border-radius: 999px;
        background: rgba(11, 26, 20, 0.96);
        box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.16), 0 20px 50px rgba(0, 0, 0, 0.5);
    }
}
.modal { background: rgba(2, 8, 5, 0.86); }
.toolbar { background: rgba(5, 17, 12, 0.97); }
.app-bar { background: rgba(11, 26, 20, 0.97); }
.curtain { background: #0B1A14; }
.curtain img { box-shadow: 0 0 60px rgba(224, 188, 106, 0.35); }

/* ---------- Hero: the nave ---------- */

.hero { position: relative; }
.nave { height: 560vh; }
.nave-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100lvh;
    overflow: hidden;
    background:
        radial-gradient(42% 34% at 50% 56%, rgba(224, 188, 106, 0.16), transparent 72%),
        radial-gradient(90% 70% at 50% 62%, rgba(20, 96, 66, 0.34), transparent 74%);
}

.nave-canvas, .field-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.nave-canvas.is-on, .field-canvas.is-on { opacity: 1; }

.nave-scrim {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(1180px, 130vw);
    height: 76vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(5, 17, 12, 0.86), rgba(5, 17, 12, 0.6) 58%, transparent);
    pointer-events: none;
}

.nave-scene { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 56%; pointer-events: none; }
.nave-world {
    position: absolute;
    left: 50%;
    top: 56%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.nave-cover {
    position: absolute;
    left: -95px;
    top: -136px;
    width: 190px;
    height: 272px;
    max-width: none;
    object-fit: cover;
    border-radius: 7px;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.2), 0 30px 60px rgba(0, 0, 0, 0.55);
    opacity: 0;
    will-change: transform, opacity;
}

.hero-copy {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100svh;
    width: 100%;
    max-width: 1020px;
    margin-left: -510px;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 3;
    transform-origin: 50% 46%;
}
.hero-copy .label { justify-content: center; }
.hero h1 {
    font-size: clamp(50px, min(8vw, 13.5vh), 124px);
    line-height: 0.96;
    letter-spacing: -0.038em;
    margin-bottom: 26px;
}
.hero h1 em .wi, .hero h1 em:not(:has(.wi)) {
    background: var(--leaf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: 0.05em;
}
.hero .lede { margin: 0 auto 32px; max-width: 640px; color: #C6CBBA; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.nave-cue {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100lvh - 100svh + 26px);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    color: var(--ink-2);
    pointer-events: none;
}
.nave-cue span { position: relative; width: 1px; height: 30px; background: rgba(240, 219, 162, 0.25); overflow: hidden; }
.nave-cue span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gold-soft);
    animation: cue-drop 2.2s var(--ease) infinite;
}
@keyframes cue-drop { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

.nave-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22vh;
    background: linear-gradient(180deg, transparent, var(--bg));
    pointer-events: none;
    z-index: 4;
}

/* The destination: the phone and its ring, standing at the end of the walk */
.stage {
    --stage-h: min(88vh, 780px);
    --phone-w: min(290px, calc(var(--stage-h) / 2.3));
    position: absolute;
    left: -50vw;
    top: calc(var(--stage-h) / -2 - 6vh);
    width: 100vw;
    height: var(--stage-h);
    perspective: 1700px;
    perspective-origin: 50% 42%;
    transform: translateZ(var(--z-end, -3600px));
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
}
.stage.is-live { pointer-events: auto; cursor: grab; }
.stage.is-dragging { cursor: grabbing; }

.ring {
    --w: clamp(92px, 11.5vw, 158px);
    --r: calc(var(--w) * var(--n) / 5.4);
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--w);
    height: calc(var(--w) * 1.42);
    margin: calc(var(--w) * -0.71) 0 0 calc(var(--w) / -2);
    transform-style: preserve-3d;
}
.ring-rotor { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.ring-item {
    position: absolute;
    inset: 0;
    transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--r));
    backface-visibility: hidden;
}
.ring-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.16), 0 24px 44px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    -webkit-user-drag: none;
}

.stage-phone { position: absolute; left: 50%; top: 50%; width: var(--phone-w); transform: translate(-50%, -50%); z-index: 5; }
.stage-phone .phone {
    border-radius: 15% / 7%;
    padding: 2.8%;
    box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.24), 0 50px 110px rgba(0, 0, 0, 0.75), 0 0 110px rgba(224, 188, 106, 0.2);
}
.stage-phone .phone img { border-radius: 13% / 6%; }

.glass-chip { background: rgba(13, 30, 23, 0.97); border-color: rgba(240, 219, 162, 0.2); opacity: 0; }
.chip-play { left: -205px; top: 20%; max-width: 300px; }
.chip-play span:not(.eq) { overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.chip-streak { right: -180px; top: 62%; padding-left: 12px; }

/* Without the motion layer the hero is an ordinary page section */
html:not(.motion-on) .nave { height: auto; }
html:not(.motion-on) .nave-sticky { position: static; height: auto; display: flex; flex-direction: column; padding: 150px 0 70px; }
html:not(.motion-on) .hero-copy { position: relative; left: auto; margin: 0 auto; height: auto; order: -1; padding-top: 0; }
html:not(.motion-on) .nave-scene { position: relative; inset: auto; height: 640px; margin-top: 40px; perspective: none; }
html:not(.motion-on) .nave-world { position: static; width: auto; height: auto; transform: none; }
html:not(.motion-on) .stage { position: relative; left: 0; top: 0; transform: none; opacity: 1; height: 640px; --stage-h: 640px; }
html:not(.motion-on) .glass-chip { opacity: 1; }
html:not(.motion-on) .nave-cover, html:not(.motion-on) .nave-scrim, html:not(.motion-on) .nave-cue, html:not(.motion-on) .nave-canvas, html:not(.motion-on) .nave-fade { display: none; }

@media (max-width: 1100px) {
    .hero-copy { margin-left: 0; left: 0; max-width: none; }
    .chip-play { left: -150px; }
    .chip-streak { right: -130px; }
}

@media (max-width: 760px) {
    .nave { height: 440vh; }
    .hero h1 { font-size: clamp(44px, 12.4vw, 66px); margin-bottom: 20px; }
    .hero .lede { font-size: 17px; margin-bottom: 24px; }
    .hero-copy { padding-top: 56px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { flex: 1 1 100%; }
    .nave-cover { left: -60px; top: -86px; width: 120px; height: 172px; }
    .stage { --stage-h: min(72vh, 600px); top: calc(var(--stage-h) / -2 - 4vh); }
    .ring { --w: 74px; }
    .glass-chip { font-size: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; }
    .glass-chip > img { width: 30px; height: 42px; }
    .chip-play { left: -56px; top: auto; bottom: -5%; max-width: 230px; }
    .chip-play span:not(.eq) { max-width: 120px; }
    .chip-streak { right: -46px; top: -5%; }
    .chip-ico { width: 30px; height: 30px; border-radius: 9px; }
    .nave-cue { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .nave-cue span::after { animation: none; }
}

/* ---------- Numbers and the waveform ---------- */

.section-sm { padding: 40px 0 70px; }
.ledger { border-top: 0; }
.ledger strong { font-weight: 300; background-image: var(--leaf); }
.wave-strip { position: relative; height: 120px; margin-top: 48px; }
.wave-strip canvas { display: block; width: 100%; height: 100%; }

/* ---------- Scholars ---------- */

.scholars { position: relative; border-color: var(--rule); }
.scholars::before, .scholars::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14vw;
    z-index: 2;
    pointer-events: none;
}
.scholars::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.scholars::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

/* ---------- Top 10: books with real thickness ---------- */

.shelf { position: relative; }
.shelf-art { transform-style: preserve-3d; }
.shelf-rank {
    background: var(--leaf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 0;
    font-weight: 600;
    bottom: -2px;
    left: -2px;
}
.cover-wrap.is-book { --thick: 22px; transform-style: preserve-3d; }
.is-book .cover { position: relative; z-index: 1; transform: translateZ(calc(var(--thick) / 2)); backface-visibility: hidden; box-shadow: none; border-radius: 3px 6px 6px 3px; }
.book-spine, .book-pages { position: absolute; top: 0; bottom: 0; width: var(--thick); display: block; }
.book-spine {
    left: 0;
    transform-origin: 0 50%;
    transform: translateZ(calc(var(--thick) / 2)) rotateY(90deg);
    background: linear-gradient(90deg, #2B2011, #6E5526 40%, #2B2011);
    border-radius: 3px 0 0 3px;
}
.book-pages {
    right: 0;
    top: 1.2%;
    bottom: 1.2%;
    transform-origin: 100% 50%;
    transform: translateZ(calc(var(--thick) / 2)) rotateY(-90deg);
    background: repeating-linear-gradient(90deg, #EDE5D0 0 1px, #C9BFA6 1px 2px);
}
.shelf-item { padding-bottom: 8px; }
.shelf-art::after {
    content: "";
    position: absolute;
    left: 64px;
    right: 0;
    bottom: -26px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent);
    z-index: -1;
}
.shelf-item h4 { margin-top: 36px; }
@media (max-width: 640px) { .shelf-art::after { left: 46px; } .cover-wrap.is-book { --thick: 16px; } .shelf-item h4 { margin-top: 26px; } }

/* ---------- Process: held by CSS sticky ---------- */

/* ---------- Green block: arcade edges and a 3D stage ---------- */

.mint {
    background: radial-gradient(70% 90% at 72% 42%, #86F4AB, #52DF81 52%, #37C56B);
    padding: 170px 0 170px;
}
.mint::before, .mint::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 74px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='74'%3E%3Cpath fill='%2305110C' d='M0 0H128V74C128 40 90 33 64 6C38 33 0 40 0 74Z'/%3E%3C/svg%3E") repeat-x center top / 128px 74px;
    z-index: 1;
    pointer-events: none;
}
.mint::before { top: -1px; }
.mint::after { bottom: -1px; transform: scaleY(-1); }
.mint h2 { font-size: clamp(42px, 5.4vw, 78px); }
.mint .lede { color: rgba(5, 17, 12, 0.75); }
.mint-list li { align-items: center; }
.mint-list .star { flex-shrink: 0; color: #05110C; }
.mint-phones { perspective: 1500px; transform-style: flat; padding: 30px 0 60px; }
.mint-phones .phone { transform-style: preserve-3d; box-shadow: 0 0 0 1px rgba(5, 17, 12, 0.25), 0 50px 90px rgba(4, 60, 30, 0.45); }
.mint-phones .phone + .phone { margin-top: 60px; transform: none; }
.mint-rosette { will-change: rotate; }
@media (max-width: 640px) {
    .mint { padding: 110px 0 120px; }
    .mint::before, .mint::after { height: 44px; background-size: 76px 44px; }
    .mint-phones .phone + .phone { margin-top: 40px; transform: none; }
}

/* ---------- Word band ---------- */

.band-track .o { -webkit-text-stroke: 1.2px var(--gold); }
.band-track .star { color: var(--gold); }

/* ---------- Story: a deck of phones in depth ---------- */

.story-sticky { height: 720px; top: calc(50vh - 360px); }
.story-halo { background: radial-gradient(circle, rgba(82, 223, 129, 0.2), rgba(224, 188, 106, 0.05) 45%, transparent 68%); width: 640px; height: 640px; }
.story-rosette { position: absolute; width: 620px; color: rgba(224, 188, 106, 0.14); animation: rosette-spin 140s linear infinite; }
.story-deck {
    position: relative;
    width: 290px;
    height: 630px;
    transform-style: preserve-3d;
    perspective: none;
}
.story-sticky { perspective: 1500px; }
.story-card {
    position: absolute;
    inset: 0;
    height: max-content;
    transition: transform 0.95s var(--ease), opacity 0.6s ease;
    backface-visibility: hidden;
}
.story-card.is-active { transform: none; opacity: 1; z-index: 4; }
.story-card.is-next { transform: translate3d(58%, 0, -240px) rotateY(-26deg); opacity: 0.62; z-index: 3; }
.story-card.is-prev { transform: translate3d(-58%, 0, -240px) rotateY(26deg); opacity: 0.62; z-index: 3; }
.story-card.is-far { transform: translate3d(0, 0, -520px); opacity: 0; z-index: 1; }
.story-dots { right: -6px; }
.story-step .label { margin-bottom: 14px; }
@media (max-width: 1200px) and (min-width: 981px) {
    .story-deck { width: 250px; height: 545px; }
    .story-card.is-next { transform: translate3d(38%, 0, -240px) rotateY(-26deg); }
    .story-card.is-prev { transform: translate3d(-38%, 0, -240px) rotateY(26deg); }
}

/* ---------- Subject index: no numbers, the type is the row ---------- */

.index-row { grid-template-columns: minmax(0, 1fr) auto auto 40px; padding: 30px 0; }
.draw-line::after { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.draw-line.is-drawn::after { transform: none; }
@media (max-width: 980px) { .index-row { grid-template-columns: minmax(0, 1fr) auto 30px; } }
@media (max-width: 640px) { .index-row { grid-template-columns: minmax(0, 1fr) auto 24px; } }

/* ---------- Features: some cells show the feature itself ---------- */

.bento { border: 0; gap: 0; }
.bento div { border: 0; }
.bento-cell {
    box-shadow: inset 0 0 0 0.5px var(--rule-strong);
    padding: 32px 30px 36px;
    background: rgba(255, 255, 255, 0.012);
}
.bento-cell.is-wide { grid-column: span 2; }
.bento-cell svg { padding: 0; background: none; box-shadow: none; border-radius: 0; margin-bottom: 22px; color: var(--gold); }
.bento-cell:hover svg { background: none; box-shadow: none; color: var(--mint); }
.bento-cell::before { background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(82, 223, 129, 0.1), transparent 62%); }

.demo { margin-top: 26px; }
.bento div.demo { border: 0; padding: 0; }
.demo-offline { display: grid; gap: 9px; max-width: 380px; }
.demo-offline span { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.demo-offline i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--mint)); transform-origin: left; animation: fill-up 5s var(--ease) infinite; }
.demo-offline span:nth-child(2) i { animation-delay: -1.4s; }
.demo-offline span:nth-child(3) i { animation-delay: -3s; }
@keyframes fill-up { 0% { transform: scaleX(0.06); } 72%, 100% { transform: scaleX(1); } }

.demo-speed { position: relative; display: inline-grid; grid-template-columns: repeat(5, 60px); height: 42px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.demo-speed span { position: relative; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.demo-speed b { position: absolute; top: 3px; left: 3px; width: 54px; height: 36px; border-radius: 999px; background: rgba(82, 223, 129, 0.24); box-shadow: inset 0 0 0 1px var(--mint); animation: speed-step 9s var(--ease) infinite; }
@keyframes speed-step {
    0%, 16% { transform: translateX(60px); }
    20%, 36% { transform: translateX(120px); }
    40%, 56% { transform: translateX(180px); }
    60%, 76% { transform: translateX(0); }
    80%, 100% { transform: translateX(60px); }
}
@media (max-width: 640px) { .demo-speed { grid-template-columns: repeat(5, 1fr); display: grid; } .demo-speed b { display: none; } }

.demo-sync { display: flex; align-items: center; gap: 12px; max-width: 420px; color: var(--gold); }
.bento-cell .demo-sync svg { margin: 0; flex-shrink: 0; color: var(--gold-soft); }
.demo-sync span { position: relative; flex: 1; height: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; border-radius: 2px; }
.demo-sync i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--mint), transparent); animation: sync-run 2.6s linear infinite; }
.demo-sync span:nth-of-type(2) i { animation-delay: -1.3s; }
@keyframes sync-run { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (max-width: 640px) { .bento-cell.is-wide { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .demo-offline i, .demo-speed b, .demo-sync i, .story-rosette { animation: none; } }

/* ---------- Devices: one tablet that fades into the floor ---------- */

.devices { max-width: 820px; }
.devices .tablet { max-height: 760px; overflow: hidden; border-radius: 30px 30px 0 0; padding-bottom: 0; }
.devices-3d { position: relative; padding-bottom: 0; }
.devices-3d::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 210px;
    background: linear-gradient(180deg, transparent, var(--bg) 92%);
    pointer-events: none;
}
.devices .phone { right: -46px; bottom: 26px; z-index: 3; }
.sync-chip { background: rgba(13, 30, 23, 0.97); border-color: rgba(240, 219, 162, 0.2); }
.sync-bar b { width: 100%; transform-origin: left; }
.devices-section { padding-bottom: 60px; }
@media (max-width: 980px) { .devices .tablet { max-height: 620px; } .devices .phone { right: 0; } }
@media (max-width: 640px) { .devices .tablet { max-height: 420px; } .devices .phone { bottom: 40px; } .sync-chip { bottom: 40px; } }

/* ---------- Listeners: cards stacking in depth ---------- */

.quotes { display: block; }
.quotes .quote,
.quotes .quote:nth-child(even) {
    position: sticky;
    top: calc(13vh + var(--i) * 20px);
    display: grid;
    align-content: space-between;
    min-height: 56vh;
    margin-bottom: 26px;
    padding: 74px clamp(26px, 6vw, 84px) 44px;
    border: 1px solid rgba(240, 219, 162, 0.17);
    border-radius: 30px;
    background: linear-gradient(150deg, #123026, #0B1A14 70%);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.38);
    transform-origin: 50% 0;
}
.quotes .quote:last-child { margin-bottom: 0; }
.quote blockquote { font-size: clamp(26px, 3.5vw, 50px); line-height: 1.2; letter-spacing: -0.018em; font-weight: 340; max-width: 22em; margin-bottom: 40px; font-variation-settings: 'opsz' 144; }
.q-mark { top: -10px; left: clamp(20px, 5.4vw, 74px); opacity: 0.75; }
.q-avatar { background: var(--leaf); }
.q-dim { position: absolute; inset: 0; border-radius: inherit; background: #05110C; opacity: 0; pointer-events: none; z-index: 2; }
.quote figcaption { font-size: 15px; }
@media (max-width: 640px) {
    .quotes .quote, .quotes .quote:nth-child(even) { min-height: 62vh; top: calc(84px + var(--i) * 12px); padding: 64px 22px 28px; border-radius: 24px; }
}

/* ---------- FAQ ---------- */

.faq-grid { align-items: start; }
.faq details[open] summary { color: var(--gold-soft); }

/* ---------- Closing: a mihrab of light ---------- */

.closing {
    border-radius: 0 0 30px 30px;
    padding-top: 190px;
    background: radial-gradient(70% 80% at 74% 34%, #8AF5AE, #52DF81 54%, #35C069);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath d='M0 1000V190C0 124 170 116 322 78C414 55 468 28 500 0C532 28 586 55 678 78C830 116 1000 124 1000 190V1000Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath d='M0 1000V190C0 124 170 116 322 78C414 55 468 28 500 0C532 28 586 55 678 78C830 116 1000 124 1000 190V1000Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.closing .store small { color: rgba(245, 239, 224, 0.62); }
.closing-rosette { right: auto; left: 50%; margin-left: -380px; top: -170px; color: rgba(5, 17, 12, 0.12); }
@media (max-width: 980px) { .closing { padding: 150px 40px 0; } }
@media (max-width: 640px) { .closing { padding: 124px 22px 0; border-radius: 0 0 22px 22px; } }

/* ---------- Footer: the sea of light returns ---------- */

.site-footer { overflow: hidden; }
.site-footer > .container { position: relative; z-index: 1; }
.field-canvas { z-index: 0; }
.site-footer .field-canvas { top: auto; bottom: 0; height: 70%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%); mask-image: linear-gradient(180deg, transparent, #000 40%); }
.wordmark { border-top: 0; }
.wordmark, .wordmark em { color: var(--gold-soft); }
.wordmark .ch { background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.03em; margin-right: -0.03em; }
.footer-bottom { color: #A3AB9E; }

/* ---------- Inner pages ---------- */

.page-hero { border-bottom-color: var(--rule); min-height: 74vh; display: flex; align-items: center; }
.page-hero > .container { position: relative; z-index: 2; }
.page-hero::before, .page-rosette { display: none; }
.page-hero .field-canvas { z-index: 0; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.cover-fan, .face-orbit { z-index: 1; }
.not-found { min-height: 0; display: block; }
@media (max-width: 760px) { .page-hero .field-canvas { opacity: 0.45; } .page-hero { min-height: 0; } }

/* Long grids: skip off-screen work and keep layers to the tile under the mouse */
.book, .scholar-card { content-visibility: auto; contain-intrinsic-size: auto 340px; }
.scholar-photo img { filter: none; }
.scholar-card:not(:hover) .scholar-photo img { opacity: 0.86; }
.book .cover-wrap:hover, .mini-book .cover-wrap:hover { will-change: transform; }
.dedications article, .dedications article + article { background: linear-gradient(150deg, #123026, #0B1A14 70%); border-color: rgba(240, 219, 162, 0.16); }
.plan { border-color: rgba(240, 219, 162, 0.18); }
.bento-cell:last-child { grid-column: span 2; }
.wordmark .ch { padding: 0.04em 0.12em 0.2em; margin: -0.04em -0.12em -0.2em; }
.site-footer { padding-top: 40px; }
@media (max-width: 640px) { .bento-cell:last-child { grid-column: auto; } }
/* The header slides away while reading down; the filter bar follows it up */
.toolbar { transition: top 0.45s var(--ease); }
.site-header.is-hidden ~ main .toolbar { top: 0; }
.sync-chip small { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.devices-3d::after { display: none; }
.devices .tablet { position: relative; }
.devices .tablet::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44%;
    background: linear-gradient(180deg, transparent, var(--bg) 94%);
    pointer-events: none;
}
.sync-chip { z-index: 6; }

/* ==========================================================
   Layer 5: From printed page to podcast, and fluid details
   ========================================================== */

/* Static by default: a list of steps beside the finished phone. press.js adds .is-live. */
.press { position: relative; padding: 110px 0; }
.press-canvas, .press-lamp, .press-band, .press-labels, .press-rail-wrap, .pb, .pb-shelf { display: none; }
.press-pin { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.press-pin .container { padding: 0; }
.press-scene { position: relative; order: 2; }
.press-world { position: relative; }
.press-head h2 { font-size: clamp(40px, 5vw, 76px); margin-bottom: 16px; }
.press-intro { font-size: 18px; max-width: 460px; margin: 0 0 30px; }
.press-steps { list-style: none; margin: 0; padding: 0; }
.press-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 16px 0; }
.press-steps h3 { font-family: var(--sans); font-size: 18px; font-weight: 700; letter-spacing: 0; margin: 9px 0 4px; line-height: 1.3; }
.press-steps p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.press-n {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 18px;
    color: #05110C;
    background: var(--leaf);
}

/* The phone, as real interface */
.pb-phone { --pw: clamp(190px, min(22vw, 36vh), 310px); width: var(--pw); }
.pr-screen {
    position: relative;
    border-radius: 34px;
    padding: 46px 14px 16px;
    background: radial-gradient(120% 60% at 50% 0, #123B2B, #0B1A14 72%);
    overflow: hidden;
}
.pr-island { position: absolute; left: 50%; top: 11px; width: 31%; height: 22px; margin-left: -15.5%; border-radius: 999px; background: #000; }
.pr-head { display: flex; gap: 12px; align-items: center; }
.pr-head img { width: 31%; aspect-ratio: 7 / 10; height: auto; object-fit: cover; border-radius: 8px; flex-shrink: 0; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5); }
.pr-head > div { min-width: 0; }
.pr-head small { display: block; font-size: 11px; font-weight: 700; color: var(--mint); }
.pr-head strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 3px 0 2px; font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.15; color: var(--ink); }
.pr-head span { display: block; font-size: 11.5px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0 12px; }
.pr-meta span { padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--ink-2); background: rgba(255, 255, 255, 0.07); }
.pr-meta .is-free { color: #05110C; background: var(--mint); }
.pr-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px 8px 8px; border-radius: 13px; background: rgba(255, 255, 255, 0.045); transition: background 0.5s ease, box-shadow 0.5s ease; }
.pr-play { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--ink-2); background: rgba(255, 255, 255, 0.08); transition: background 0.5s ease, color 0.5s ease; }
.pr-part { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; transition: color 0.5s ease; }
.pr-track { display: flex; align-items: center; justify-content: space-between; height: 24px; min-width: 0; }
.pr-track i { display: block; width: 2px; height: calc(var(--h) * 100%); border-radius: 2px; background: rgba(245, 239, 224, 0.42); }
.pr-bar { height: 3px; margin-top: 14px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.pr-bar b { display: block; height: 100%; background: var(--mint); transform: scaleX(0.3); transform-origin: left; }

/* ---------- The live story ---------- */

.press.is-live { height: 780vh; padding: 0; }
.is-live .press-pin {
    position: sticky;
    top: 0;
    display: block;
    height: 100vh;
    height: 100svh;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.is-live .press-canvas, .is-live .press-lamp, .is-live .press-band, .is-live .press-labels, .is-live .press-rail-wrap, .is-live .pb, .is-live .pb-shelf { display: block; }
.is-live .press-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.is-live .press-scene { position: absolute; inset: 0; pointer-events: none; z-index: 1; order: 0; }
.is-live .press-world { position: absolute; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }

/* A pool of warm lamp light on the book, and a band of green behind the voices */
.press-lamp {
    position: absolute;
    left: 64%;
    top: 47%;
    width: min(1100px, 130vw);
    height: min(900px, 110vh);
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(232, 200, 119, 0.2), rgba(20, 96, 66, 0.18) 46%, transparent);
    pointer-events: none;
    opacity: 0.5;
}
.press-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 42%;
    height: 54vh;
    transform: translateY(-50%);
    background: radial-gradient(60% 50% at 50% 50%, rgba(82, 223, 129, 0.15), transparent 100%);
    pointer-events: none;
    opacity: 0;
}

/* ---------- The book ---------- */

.pb, .pb-page, .pb-shadow, .pb-back, .pb-spine, .pb-edge, .pb-leaf, .pb-strip, .pb-cover, .pb-cover-f, .pb-cover-b { position: absolute; display: block; }
.is-live .pb {
    --bw: clamp(132px, min(18.5vw, 31vh), 276px);
    --bh: calc(var(--bw) * 1.42);
    --bt: calc(var(--bw) * 0.13);
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}
.pb-page { left: 0; top: calc(var(--bh) / -2); width: var(--bw); height: var(--bh); overflow: hidden; backface-visibility: hidden; }
.pb-right { transform: translateZ(calc(var(--bt) / 2 + 2px)); background: linear-gradient(90deg, #C9BC9C, #E9DFC6 9%, #F1E9D5 60%, #E6DBBF); border-radius: 0 3px 3px 0; }
.pb-left { left: calc(var(--bw) * -1); transform: translateZ(calc(var(--bt) / 2 + 2px)); background: linear-gradient(270deg, #C9BC9C, #E6DBBF 9%, #EFE6D0 60%, #E2D6B9); border-radius: 3px 0 0 3px; opacity: 0; }
.pb-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Paper that wipes down over the printed text as its points lift away */
.pb-erase { position: absolute; inset: 0; display: block; transform: scaleY(0); transform-origin: 50% 0; background: inherit; }
.pb-right .pb-erase { background: linear-gradient(90deg, #C9BC9C, #E9DFC6 9%, #F1E9D5 60%, #E6DBBF); }
.pb-left .pb-erase { background: linear-gradient(270deg, #C9BC9C, #E6DBBF 9%, #EFE6D0 60%, #E2D6B9); }
.pb-gutter { position: absolute; top: 0; bottom: 0; width: 34%; display: block; pointer-events: none; }
.pb-right .pb-gutter { left: 0; background: linear-gradient(90deg, rgba(50, 34, 10, 0.5), rgba(50, 34, 10, 0.1) 30%, transparent); }
.pb-left .pb-gutter { right: 0; background: linear-gradient(270deg, rgba(50, 34, 10, 0.5), rgba(50, 34, 10, 0.1) 30%, transparent); }

.pb-shadow {
    left: calc(var(--bw) * -1.15);
    top: calc(var(--bh) * 0.5);
    width: calc(var(--bw) * 3.3);
    height: calc(var(--bw) * 0.9);
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.72), transparent);
    transform: translateZ(calc(var(--bt) / -2 - 4px)) rotateX(90deg);
    transform-origin: 50% 0;
}
.pb-back {
    left: -2px;
    top: calc(var(--bh) / -2 - 5px);
    width: calc(var(--bw) + 8px);
    height: calc(var(--bh) + 10px);
    transform: translateZ(calc(var(--bt) / -2));
    border-radius: 2px 6px 6px 2px;
    background: linear-gradient(120deg, #13392A, #0C2219);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}
.pb-spine {
    left: calc(var(--bt) / -2);
    top: calc(var(--bh) / -2 - 5px);
    width: var(--bt);
    height: calc(var(--bh) + 10px);
    transform: rotateY(-90deg);
    background:
        linear-gradient(180deg, transparent 8%, rgba(232, 200, 119, 0.8) 8% 9%, transparent 9% 91%, rgba(232, 200, 119, 0.8) 91% 92%, transparent 92%),
        linear-gradient(90deg, #0A1E16, #1A4A37 50%, #0A1E16);
}
.pb-edge { background: repeating-linear-gradient(90deg, #EFE6CF 0 1px, #C4B897 1px 2px); }
.pb-edge.is-side {
    left: calc(var(--bw) - var(--bt) / 2);
    top: calc(var(--bh) / -2 + 2px);
    width: var(--bt);
    height: calc(var(--bh) - 4px);
    transform: rotateY(90deg);
}
.pb-edge.is-top, .pb-edge.is-bottom {
    left: 0;
    width: var(--bw);
    height: var(--bt);
    background: repeating-linear-gradient(0deg, #EFE6CF 0 1px, #C4B897 1px 2px);
}
.pb-edge.is-top { top: calc(var(--bh) / -2 + 2px - var(--bt) / 2); transform: rotateX(90deg); }
.pb-edge.is-bottom { top: calc(var(--bh) / 2 - 2px - var(--bt) / 2); transform: rotateX(90deg); }

.pb-leaf { left: 0; top: calc(var(--bh) / -2); width: var(--bw); height: var(--bh); transform-origin: 0 50%; transform-style: preserve-3d; opacity: 0; }
.pb-strip {
    left: 0;
    top: 0;
    width: 25.2%;
    height: 100%;
    transform-origin: 0 50%;
    transform-style: preserve-3d;
    background: linear-gradient(90deg, #BFB294, #DDD2B7);
    box-shadow: 0 0 1px #DDD2B7;
}
.pb-strip .pb-strip { left: 99%; width: 100%; background: linear-gradient(90deg, #DDD2B7, #ECE3CD); box-shadow: 0 0 1px #ECE3CD; }
.pb-strip .pb-strip .pb-strip { background: linear-gradient(90deg, #ECE3CD, #F1E9D5); box-shadow: 0 0 1px #F1E9D5; }
.pb-strip .pb-strip .pb-strip .pb-strip { background: linear-gradient(90deg, #F1E9D5, #E6DBBF); box-shadow: 0 0 1px #E6DBBF; }

.pb-cover { left: -2px; top: calc(var(--bh) / -2 - 5px); width: calc(var(--bw) + 8px); height: calc(var(--bh) + 10px); transform-origin: 2px 50%; transform-style: preserve-3d; }
.pb-cover-f, .pb-cover-b { inset: 0; overflow: hidden; backface-visibility: hidden; border-radius: 2px 6px 6px 2px; }
.pb-cover-f { background: #0C2219; box-shadow: inset 7px 0 12px rgba(0, 0, 0, 0.42); }
.pb-cover-f img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-cover-f::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 7%, rgba(255, 255, 255, 0.08) 8.5%, transparent 12%); }
.pb-glare { position: absolute; top: 0; bottom: 0; left: 0; width: 60%; display: block; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22) 50%, transparent); }
.pb-cover-b { transform: rotateY(180deg); background: linear-gradient(120deg, #0F2E22, #0A1E16); color: rgba(232, 200, 119, 0.34); display: grid; place-items: center; }
.pb-endpaper { width: 78%; }

.pb-tag {
    position: absolute;
    left: calc(var(--bw) * -0.1);
    top: calc(var(--bh) * 0.56);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--ink);
    background: rgba(13, 30, 23, 0.97);
    border: 1px solid rgba(240, 219, 162, 0.24);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
    transform: translateZ(calc(var(--bt) + 30px));
    opacity: 0;
}
.pb-tag .star { color: var(--gold); }

.pb-shelf { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.pb-shelf img {
    position: absolute;
    left: calc(clamp(132px, min(18.5vw, 31vh), 276px) / -2);
    top: calc(clamp(132px, min(18.5vw, 31vh), 276px) * -0.71);
    width: clamp(132px, min(18.5vw, 31vh), 276px);
    height: calc(clamp(132px, min(18.5vw, 31vh), 276px) * 1.42);
    max-width: none;
    object-fit: cover;
    border-radius: 3px 6px 6px 3px;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.14), 0 30px 60px rgba(0, 0, 0, 0.55);
    will-change: transform, opacity;
}

/* ---------- The phone inside the story ---------- */

.is-live .pb-phone {
    position: absolute;
    left: calc(var(--pw) / -2);
    top: 0;
    transform-style: preserve-3d;
    will-change: transform;
    box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.2), 0 60px 110px rgba(0, 0, 0, 0.7), 0 0 90px rgba(82, 223, 129, 0.14);
    opacity: 0;
}
.is-live .pr-track i { display: none; }
.pr-row.is-on { background: rgba(82, 223, 129, 0.1); }
.pr-row.is-on .pr-part { color: var(--ink); }
.pr-row.is-on .pr-play { color: var(--mint); }
.pr-row.is-playing { background: rgba(82, 223, 129, 0.16); box-shadow: inset 0 0 0 1px rgba(82, 223, 129, 0.42); }
.pr-row.is-playing .pr-play { color: #05110C; background: var(--mint); }

/* ---------- Copy, labels and the rail ---------- */

.is-live .press-copy { position: absolute; left: 0; right: 0; top: 0; bottom: 0; max-width: var(--container); margin: 0 auto; padding: 0 24px; z-index: 3; pointer-events: none; }
.is-live .press-head { position: absolute; left: 24px; top: clamp(92px, 13vh, 130px); max-width: min(560px, 42vw); }
.is-live .press-head h2 { font-size: clamp(40px, min(5.2vw, 9vh), 82px); line-height: 0.98; }
.is-live .press-intro { margin-bottom: 0; }
.is-live .press-steps { position: absolute; left: 24px; bottom: clamp(104px, 15vh, 140px); width: min(470px, 36vw); height: clamp(150px, 24vh, 210px); }
.is-live .press-steps li { position: absolute; left: 0; right: 0; bottom: 0; padding: 0; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s; display: block; }
.is-live .press-steps li.is-active { opacity: 1; visibility: visible; transition-delay: 0.12s; }
.is-live .press-n { width: 34px; height: 34px; font-size: 15px; margin-bottom: 14px; transform: scale(0.6); transition: transform 0.7s var(--ease); }
.is-live li.is-active .press-n { transform: none; }
.is-live .press-steps h3 {
    font-family: var(--serif);
    font-weight: 340;
    font-size: clamp(30px, min(3.5vw, 6vh), 54px);
    line-height: 1.02;
    letter-spacing: -0.024em;
    margin: 0 0 12px;
    font-variation-settings: 'opsz' 144;
    transform: translate3d(0, 24px, 0);
    transition: transform 0.85s var(--ease);
}
.is-live .press-steps p { font-size: clamp(15px, 1.25vw, 17.5px); color: var(--ink-2); transform: translate3d(0, 18px, 0); transition: transform 0.85s var(--ease) 0.04s; }
.is-live li.is-active h3, .is-live li.is-active p { transform: none; }

.is-live .press-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.press-voice, .press-check, .press-part {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: opacity 0.45s ease, transform 0.7s var(--ease);
}
.press-voice.is-on, .press-check.is-on, .press-part.is-on { opacity: 1; transform: none; }
.press-voice i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.press-voice.is-b i { background: var(--gold-soft); box-shadow: 0 0 12px var(--gold); }
.press-check { margin-left: -60px; }
.press-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #05110C; background: var(--mint); box-shadow: 0 0 16px rgba(82, 223, 129, 0.5); }
.press-part { margin-left: -24px; font-family: var(--serif); font-size: 18px; font-weight: 400; color: var(--gold-soft); }

.is-live .press-rail-wrap { position: absolute; left: 0; right: 0; bottom: clamp(20px, 3.4vh, 34px); max-width: var(--container); margin: 0 auto; z-index: 4; }
.press-rail { display: flex; gap: 6px; }
.press-chapter {
    flex: var(--share) 1 0;
    min-width: 0;
    padding: 14px 0 0;
    margin-top: -14px;
    border: 0;
    background: none;
    color: var(--ink-3);
    text-align: left;
    cursor: pointer;
    transition: color 0.4s ease;
}
.press-chapter:hover, .press-chapter.is-active { color: var(--ink); }
.press-line { display: block; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(240, 219, 162, 0.16); }
.press-line b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--mint)); transform: scaleX(0); transform-origin: left; }
.press-chapter-name { display: block; margin-top: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.press-chapter:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }

@media (max-width: 980px) {
    .press { padding: 80px 0; }
    .press-pin { grid-template-columns: 1fr; gap: 30px; }
    .press-scene { order: 0; justify-self: center; }
    .is-live .press-head { left: 16px; right: 16px; top: 74px; max-width: none; }
    .is-live .press-head h2 { font-size: clamp(32px, 9vw, 54px); margin-bottom: 8px; }
    .is-live .press-intro { font-size: 15px; }
    .is-live .press-copy, .is-live .press-rail-wrap { padding: 0 16px; }
    .is-live .press-steps { left: 16px; right: 16px; width: auto; bottom: 78px; height: 150px; }
    .is-live .press-n { display: none; }
    .is-live .press-steps h3 { font-size: clamp(26px, 7.4vw, 38px); margin-bottom: 8px; }
    .is-live .press-steps p { font-size: 15px; line-height: 1.5; }
    .press-chapter-name { display: none; }
    .press-lamp { left: 50%; top: 37%; }
    .press-band { top: 36%; }
    .pb-phone { --pw: min(46vw, 25vh, 240px); }
    .pr-screen { padding: 34px 9px 10px; border-radius: 25px; }
    .pr-island { height: 16px; top: 8px; }
    .pr-head { gap: 8px; }
    .pr-head small { font-size: 9px; }
    .pr-head strong { font-size: 12.5px; }
    .pr-head span { font-size: 9px; }
    .pr-meta { margin: 8px 0; gap: 3px; }
    .pr-meta span { font-size: 8px; padding: 2px 5px; }
    .pr-rows { gap: 4px; }
    .pr-row { grid-template-columns: 18px auto minmax(0, 1fr); gap: 5px; padding: 4px 6px 4px 4px; border-radius: 9px; }
    .pr-play { width: 18px; height: 18px; }
    .pr-play svg { width: 9px; height: 9px; }
    .pr-part { font-size: 9.5px; }
    .pr-track { height: 15px; }
    .pr-bar { margin-top: 8px; }
    .press-voice, .press-check { font-size: 12.5px; }
    .press-check { margin-left: 0; transform: translate3d(-50%, 10px, 0); }
    .press-check.is-on { opacity: 0; transform: translate3d(-50%, 10px, 0); }
    .press-check.is-on.is-latest { opacity: 1; transform: translate3d(-50%, 0, 0); }
    .press-part { font-size: 14px; margin-left: -18px; }
}
@media (max-width: 980px) and (max-height: 720px) {
    .is-live .press-intro { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .press-steps li, .press-n { transition: none; }
}

/* ---------- Fluid details everywhere ---------- */

/* Nav links roll to a second copy of the word */
.roll { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
.roll > span { display: block; transition: transform 0.55s var(--ease); }
.roll > span::after { content: attr(data-t); position: absolute; left: 0; top: 100%; color: var(--ink); }
@media (hover: hover) and (min-width: 981px) { .nav-links a:hover .roll > span { transform: translateY(-100%); } }
.nav-line { left: 0; width: 100px; }

/* Buttons: the icon answers the mouse */
.btn svg, .store svg, .store > img { transition: transform 0.5s var(--ease); }
.btn:hover svg { transform: translateY(2px); }
.btn[href*="audiobook"]:hover svg { transform: scale(1.14); }
.btn:active { filter: brightness(0.92); }
.store { transition: border-color 0.2s ease, background 0.3s ease; }
.store:hover { transform: none; }
.store:hover svg { transform: scale(1.12); }
.link-arrow svg { transition: transform 0.5s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }
.round-btn { transition: background 0.3s ease, border-color 0.2s ease, color 0.3s ease; }
.round-btn:hover { background: var(--ink); color: #05110C; }

/* Cursor: scale, not size, so it never re-lays out */
.cursor { transition: background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease; }
.cursor-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(240, 219, 162, 0.42); transition: transform 0.45s var(--ease), background 0.3s ease, border-color 0.3s ease; }
.cursor { border: 0; }
.cursor.is-link .cursor-ring { transform: scale(1.6); border-color: var(--gold); }
.cursor.is-label .cursor-ring { transform: scale(2.1); background: var(--mint); border-color: var(--mint); }
.cursor-label { position: relative; }

/* Subject rows: type slides, covers fan out, all on transforms */
.index-row > div:first-child { transition: transform 0.7s var(--ease); }
.index-row:hover > div:first-child { transform: translate3d(16px, 0, 0); }
.index-row:hover .index-covers img:nth-child(1) { transform: translate3d(-22px, -4px, 0) rotate(-3deg); }
.index-row:hover .index-covers img:nth-child(2) { transform: translate3d(0, -7px, 0); }
.index-row:hover .index-covers img:nth-child(3) { transform: translate3d(22px, -4px, 0) rotate(3deg); }
.index-preview { will-change: transform, opacity; }
.index-preview img { backface-visibility: hidden; }

/* Filters: one pill slides between the choices */
.tabs { position: relative; }
.tab-pill { position: absolute; left: 0; top: 0; height: 40px; width: 100px; border-radius: 999px; background: var(--ink); pointer-events: none; opacity: 0; transform-origin: 0 50%; z-index: 0; }
.has-pill .tab { position: relative; z-index: 1; background: transparent; transition: color 0.3s ease, border-color 0.2s ease; }
.has-pill .tab.is-active { background: transparent; color: #05110C; border-color: transparent; }
@media (max-width: 640px) { .tab-pill { height: 36px; } }

/* The flying cover between a tile and its panel */
.fly-cover { position: fixed; left: 0; top: 0; z-index: 1300; margin: 0; object-fit: cover; border-radius: 8px; pointer-events: none; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6); will-change: transform; }
.sheet-backdrop { background: rgba(2, 8, 5, 0.84); }

/* Page changes: an arch rises over the page, and the next page is revealed from under it */
.curtain {
    position: fixed;
    left: 0;
    right: 0;
    top: -25vh;
    bottom: auto;
    inset-inline: 0;
    height: 150vh;
    z-index: 1900;
    display: grid;
    place-items: center;
    pointer-events: none;
    transform: translate3d(0, 84%, 0);
    transform-origin: 50% 50%;
    background: linear-gradient(#0B1A14, #0B1A14) center / 100% calc(100% - 50vh + 2px) no-repeat;
    visibility: hidden;
    will-change: transform;
}
.curtain::before, .curtain::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 25vh;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 200' preserveAspectRatio='none'%3E%3Cpath fill='%230B1A14' stroke='%23E0BC6A' stroke-width='1.4' vector-effect='non-scaling-stroke' d='M-4 204V150C60 120 220 112 340 76C420 52 470 24 500 2C530 24 580 52 660 76C780 112 940 120 1004 150V204Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.curtain::before { top: 0; }
.curtain::after { bottom: 0; transform: scaleY(-1); }
.curtain img { opacity: 0; position: relative; z-index: 1; }
.from-nav .curtain { transform: none; visibility: visible; animation: curtain-out 0.8s 0.9s var(--ease) forwards; }
.motion-on.from-nav .curtain { animation: none; }
@keyframes curtain-out { to { transform: translate3d(0, -84%, 0); visibility: hidden; } }
.curtain img { width: 56px; height: 56px; border-radius: 14px; }

/* A phone-shaped screen, with the player resting at the bottom */
.pr-screen { display: flex; flex-direction: column; min-height: calc(var(--pw) * 1.96); }
.pr-rows { gap: 8px; }
.pr-row { padding-top: 11px; padding-bottom: 11px; }
.pr-bar { margin-top: auto; }
.press-cta { display: none; }
.is-live .press-cta { display: inline-flex; margin-top: 16px; pointer-events: auto; }
.is-live .press-steps li { pointer-events: none; }
@media (max-width: 980px) {
    .pr-rows { gap: 5px; }
    .pr-row { padding-top: 5px; padding-bottom: 5px; }
    .is-live .press-cta { margin-top: 8px; font-size: 14px; }
    .is-live .press-steps { height: 170px; }
}

.is-live .press-scene { justify-self: auto; }
.in-press .app-bar { transform: translateY(140%); }
.pr-now { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.25; opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity 0.5s ease, transform 0.7s var(--ease); }
.pr-now small { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.pr-now .eq { margin: 0; }
.pb-phone.is-playing .pr-now, .press:not(.is-live) .pr-now { opacity: 1; transform: none; }
.pr-bar { margin-top: 10px; }
@media (max-width: 980px) {
    .pr-now { font-size: 10px; gap: 6px; }
    .pr-now small { font-size: 8px; }
    .pr-now .eq { height: 12px; }
    .pr-bar { margin-top: 6px; }
}

/* ==========================================================
   Layer 6: the homepage scenes. Static layouts stay as they
   were; a section changes only once scenes.js adds .is-live.
   ========================================================== */

.live-only { display: none; }
.is-live .static-only { display: none !important; }
.is-live .live-only, .is-live.live-only { display: block; }
/* Scenes that sit beside a static twin */
.scenes-on .chart, .scenes-on .subjects, .scenes-on .arcade { display: block; }
.scenes-on .section.static-only, .scenes-on .scholars.static-only { display: none; }

/* ---------- Numbers ---------- */

.count.is-live { height: 400vh; padding: 0; }
.is-live .count-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.count-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.count-wall {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 112vw;
    height: 112vh;
    margin: -56vh 0 0 -56vw;
    overflow: hidden;
    perspective: 1500px;
    z-index: 0;
    will-change: transform, opacity;
}
.is-live .count-wall { display: grid; grid-template-columns: repeat(11, 1fr); grid-auto-rows: min-content; align-content: center; }
.count-wall img { width: 100%; height: auto; aspect-ratio: 7 / 10; object-fit: cover; backface-visibility: hidden; background: var(--bg-soft); }
.count-scrim { position: absolute; inset: 0; z-index: 1; background: radial-gradient(52% 44% at 50% 50%, rgba(5, 17, 12, 0.92), rgba(5, 17, 12, 0.62) 62%, rgba(5, 17, 12, 0.3)); pointer-events: none; }
.count-faces { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; }
.count-faces img {
    position: absolute;
    left: -30px;
    top: -30px;
    width: 60px;
    height: 60px;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 0 0 1.5px rgba(240, 219, 162, 0.65), 0 14px 28px rgba(0, 0, 0, 0.5);
    opacity: 0;
}
.is-live .count-row { position: absolute; left: 0; right: 0; bottom: clamp(30px, 8vh, 90px); margin: 0 auto; z-index: 4; }
.is-live .ledger { border: 0; }
.is-live .ledger > div { border-left: 0; padding: 0 12px; text-align: center; opacity: 0; transform-origin: 50% 50%; }
.is-live .ledger > div:first-child { padding-left: 12px; }
.is-live .ledger > div::after { display: none; }
.is-live .ledger strong { margin-bottom: 8px; }
.is-live .ledger span { color: var(--ink-2); }
.is-live .count-wall { gap: 12px; padding: 0 12px; transform-style: preserve-3d; }
.count-wall img { border-radius: 8px; box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.16), 0 18px 34px rgba(0, 0, 0, 0.5); }
.count-wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255, 244, 214, 0.14) 50%, transparent 60%); background-size: 260% 100%; animation: count-sheen 6s ease-in-out infinite; mix-blend-mode: screen; opacity: var(--sheen, 0); }
@keyframes count-sheen { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.count-scrim { background: radial-gradient(40% 36% at 50% 50%, rgba(3, 12, 8, 0.94), rgba(3, 12, 8, 0.7) 55%, rgba(3, 12, 8, 0.25) 100%); }
.is-live .ledger strong { filter: drop-shadow(0 0 28px rgba(224, 188, 106, 0.32)); }
.count-faces img { width: 68px; height: 68px; left: -34px; top: -34px; box-shadow: 0 0 0 2px rgba(240, 219, 162, 0.8), 0 0 0 6px rgba(224, 188, 106, 0.14), 0 0 26px rgba(224, 188, 106, 0.35), 0 16px 30px rgba(0, 0, 0, 0.55); }
.is-live .count-row::before { content: ""; position: absolute; left: 24px; right: 24px; top: -26px; bottom: -22px; border-radius: 30px; border: 1px solid rgba(240, 219, 162, 0.18); background: linear-gradient(180deg, rgba(10, 30, 21, 0.72), rgba(5, 17, 12, 0.5)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 246, 216, 0.08); opacity: var(--panel, 0); transform: translateY(calc((1 - var(--panel, 0)) * 24px)) scale(calc(0.96 + var(--panel, 0) * 0.04)); pointer-events: none; z-index: -1; }
.is-live .count-row .ledger > div + div { box-shadow: -1px 0 0 rgba(240, 219, 162, calc(var(--panel, 0) * 0.16)); }
.count-notes p { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.5vw, 22px); letter-spacing: -0.01em; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9); }
@media (prefers-reduced-motion: reduce) { .count-wall::after { animation: none; } }
@media (max-width: 760px) {
    .count.is-live { height: 340vh; }
    .is-live .count-wall { grid-template-columns: repeat(5, 1fr); }
    .is-live .count-wall img:nth-child(n+31) { display: none; }
    .count-faces img { width: 44px; height: 44px; left: -22px; top: -22px; }
    .is-live .ledger { grid-template-columns: 1fr 1fr; gap: 18px 0; }
    .is-live .ledger > div, .is-live .ledger > div:nth-child(-n+2), .is-live .ledger > div:nth-child(odd) { padding: 0 8px; border: 0; }
    .is-live .ledger span { font-size: 12.5px; }
    .is-live .count-row { bottom: 24px; }
}

/* ---------- Scholars: a hall of arches, one scholar in the light ---------- */

.arcade { position: relative; padding: 70px 0 30px; }
.arcade.is-live, .scenes-on .arcade { display: block; }
.arcade.is-live { height: 300vh; padding: 0; }
.arcade-pin { position: relative; overflow: hidden; }
.is-live .arcade-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 64px; }
.arcade-pin::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(46% 40% at 50% 52%, rgba(224, 188, 106, 0.11), transparent 70%), radial-gradient(1.5px 1.5px at 12% 30%, rgba(244, 223, 168, 0.6), transparent), radial-gradient(1.5px 1.5px at 78% 22%, rgba(244, 223, 168, 0.5), transparent), radial-gradient(1px 1px at 32% 70%, rgba(82, 223, 129, 0.6), transparent), radial-gradient(1.5px 1.5px at 88% 64%, rgba(244, 223, 168, 0.5), transparent), radial-gradient(1px 1px at 55% 14%, rgba(82, 223, 129, 0.5), transparent), radial-gradient(1.5px 1.5px at 6% 78%, rgba(244, 223, 168, 0.4), transparent); animation: hall-dust 14s ease-in-out infinite alternate; }
@keyframes hall-dust { from { translate: 0 10px; } to { translate: 0 -14px; } }
.arcade-head { position: relative; z-index: 3; text-align: center; }
.arcade-head h2 { font-size: clamp(40px, min(5.2vw, 8.4vh), 80px); margin-bottom: 0; }
.arcade-head .label { justify-content: center; }
.arcade-stage {
    --nw: clamp(140px, min(15vw, 25vh), 230px);
    position: relative;
    height: calc(var(--nw) * 1.62);
    margin-top: 8px;
    perspective: 1400px;
    perspective-origin: 50% 40%;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.arcade-stage::before { content: ""; position: absolute; left: 6%; right: 6%; top: calc(50% + var(--nw) * 0.56 - 30px); height: 90px; pointer-events: none; background: radial-gradient(50% 50% at 50% 50%, rgba(224, 188, 106, 0.22), rgba(82, 223, 129, 0.06) 45%, transparent 72%); filter: blur(6px); }
.arcade-stage.is-dragging { cursor: grabbing; }
.arcade-rotor { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.niche {
    --f: 0;
    position: absolute;
    left: calc(var(--nw) / -2);
    top: calc(var(--nw) * -0.84);
    width: var(--nw);
    backface-visibility: hidden;
    color: var(--ink);
    -webkit-user-drag: none;
}
/* A shaft of light falls on the scholar at the centre */
.niche::before { content: ""; position: absolute; left: -45%; right: -45%; bottom: 30%; height: 190%; pointer-events: none; background: linear-gradient(180deg, rgba(255, 244, 214, 0) 0%, rgba(255, 240, 200, 0.16) 55%, rgba(255, 236, 190, 0.05) 100%); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); opacity: var(--f); filter: blur(4px); }
/* and the arch glows around them */
.niche::after { content: ""; position: absolute; left: -7%; top: -5%; width: 114%; aspect-ratio: 5 / 7.4; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 120 160' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23F4DFA8' stroke-width='6' vector-effect='non-scaling-stroke' d='M0 140V60C0 34 26 18 50 0C74 18 100 34 100 60V140'/%3E%3C/svg%3E") center / 100% 100% no-repeat; filter: blur(9px); opacity: calc(var(--f) * 0.9); }
.niche-frame {
    position: relative;
    display: block;
    aspect-ratio: 5 / 7;
    background: linear-gradient(180deg, #123B2B, #0B1A14);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140V60C0 34 26 18 50 0C74 18 100 34 100 60V140Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140V60C0 34 26 18 50 0C74 18 100 34 100 60V140Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    transform: translate3d(0, calc(var(--f) * -14px), 0) scale(calc(0.9 + var(--f) * 0.12));
    -webkit-box-reflect: below 10px linear-gradient(transparent 72%, rgba(255, 255, 255, 0.2));
}
.niche-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; pointer-events: none; }
.niche-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #030C08; opacity: calc(0.62 - var(--f) * 0.62); pointer-events: none; }
.niche-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23E8C877' stroke-width='1.6' vector-effect='non-scaling-stroke' d='M0 140V60C0 34 26 18 50 0C74 18 100 34 100 60V140'/%3E%3C/svg%3E") center / 100% 100% no-repeat, linear-gradient(115deg, rgba(255, 255, 255, calc(var(--f) * 0.14)), transparent 36%), linear-gradient(180deg, transparent 62%, rgba(5, 17, 12, 0.85));
}
.niche-name {
    display: block;
    margin-top: 14px;
    font-family: var(--serif);
    font-size: clamp(14px, 1.3vw, 18px);
    line-height: 1.2;
    text-align: center;
    font-variation-settings: 'opsz' 36;
    opacity: calc(0.55 - var(--f) * 0.55);
    transition: color 0.25s ease;
}
.niche:hover .niche-name { color: var(--gold-soft); }

.arcade-focus { position: relative; z-index: 3; margin-top: clamp(14px, 3vh, 34px); text-align: center; min-height: 168px; }
.af-rank { display: inline-block; padding: 5px 13px; border: 1px solid rgba(240, 219, 162, 0.3); border-radius: 999px; background: rgba(224, 188, 106, 0.08); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold-soft); }
.af-name { margin: 12px 0 10px; font-family: var(--serif); font-weight: 320; font-size: clamp(30px, min(3.4vw, 5.6vh), 52px); line-height: 1.02; letter-spacing: -0.028em; font-variation-settings: 'opsz' 144; }
.af-name .sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0 0.12em; margin-bottom: -0.12em; }
.af-name .sw > span { display: inline-block; transform: translate3d(0, 110%, 0) rotate(5deg); transform-origin: 0 100%; transition: transform 0.15s linear; }
.arcade-focus.is-in .af-name .sw > span { transform: none; transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1); }
.af-bio { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 620px; margin: 0 auto 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.af-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--rule-strong); border-radius: 999px; background: rgba(5, 17, 12, 0.6); color: var(--ink); font: 700 13.5px/1 var(--sans); transition: background-color 0.25s linear, color 0.25s linear, border-color 0.25s linear; }
.af-link:hover, .af-link:focus-visible { background: var(--mint); border-color: var(--mint); color: #05110C; outline: none; }
.af-rank, .af-bio, .af-link { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity 0.12s linear, transform 0.12s linear; }
.arcade-focus.is-in .af-rank, .arcade-focus.is-in .af-bio, .arcade-focus.is-in .af-link { opacity: 1; transform: none; transition: opacity 0.5s linear, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.arcade-focus.is-in .af-bio { transition-delay: 0.18s; }
.arcade-focus.is-in .af-link { transition-delay: 0.26s; }
.arcade-hint { text-align: center; margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
@media (max-width: 760px) {
    .arcade.is-live { height: 260vh; }
    .arcade-stage { --nw: min(150px, 40vw); }
    .af-bio { font-size: 14px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .arcade-pin::before { animation: none; } }

/* ---------- Top 10: the shelf ---------- */

.chart { position: relative; }
.chart.is-live { height: 560vh; }
.chart-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.chart-glow {
    position: absolute;
    left: var(--chart-cx, 64%);
    top: var(--chart-cy, 50%);
    width: min(1100px, 130vw);
    height: min(900px, 110vh);
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(232, 200, 119, 0.15), rgba(20, 96, 66, 0.2) 50%, transparent);
    pointer-events: none;
}
.chart-ranks { position: absolute; left: var(--chart-cx, 64%); top: var(--chart-cy, 50%); width: 0; height: 0; }
.chart-rank {
    position: absolute;
    right: calc(clamp(150px, min(19vw, 33vh), 280px) * 0.62);
    top: 0;
    transform-origin: 100% 50%;
    margin-top: -0.58em;
    font-family: var(--serif);
    font-size: clamp(170px, min(30vw, 58vh), 560px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.06em;
    background: var(--leaf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variation-settings: 'opsz' 144;
    white-space: nowrap;
    opacity: 0;
    padding-right: 0.06em;
}
.chart-scene { position: absolute; inset: 0; pointer-events: none; }
.chart-world { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.chart-ledge {
    position: absolute;
    left: -150vw;
    width: 300vw;
    top: calc(clamp(150px, min(19vw, 33vh), 280px) * 0.71 + 2px);
    height: 3px;
    transform: translateZ(-210px);
    background: linear-gradient(90deg, transparent, rgba(232, 200, 119, 0.8) 30%, rgba(232, 200, 119, 0.8) 70%, transparent);
}
.cb {
    --w: clamp(150px, min(19vw, 33vh), 280px);
    --h: calc(var(--w) * 1.42);
    --t: 38px;
    position: absolute;
    left: calc(var(--w) / -2);
    top: calc(var(--h) / -2);
    width: var(--w);
    height: var(--h);
    transform-style: preserve-3d;
    cursor: pointer;
    outline: none;
    pointer-events: auto;
    will-change: transform;
}
.cb-front, .cb-back, .cb-spine, .cb-pages { position: absolute; display: block; backface-visibility: hidden; }
.cb-front, .cb-back { inset: 0; }
.cb-front { transform: translateZ(calc(var(--t) / 2)); border-radius: 2px 5px 5px 2px; overflow: hidden; background: var(--bg-soft); box-shadow: inset 6px 0 10px rgba(0, 0, 0, 0.35); }
.cb-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 6%, rgba(255, 255, 255, 0.09) 8%, transparent 12%); }
.cb-back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); background: linear-gradient(120deg, #123B2B, #0A1E16); }
.cb-spine {
    left: calc(50% - var(--t) / 2);
    top: 0;
    bottom: 0;
    width: var(--t);
    transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
    background-color: #123B2B;
    background-size: auto 100%;
    background-position: 0 50%;
    overflow: hidden;
}
.cb-spine::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16) 45%, rgba(0, 0, 0, 0.62)); }
.cb-spine span {
    position: absolute;
    left: 50%;
    top: 6%;
    bottom: 6%;
    transform: translateX(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: 14.5px;
    line-height: 1;
    color: #F5EFE0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.cb-pages { left: calc(50% - var(--t) / 2 + 1px); top: 1%; bottom: 1%; width: calc(var(--t) - 2px); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 2px)); background: repeating-linear-gradient(90deg, #EFE6CF 0 1px, #C4B897 1px 2px); }
.cb:focus-visible .cb-front { outline: 3px solid var(--mint); outline-offset: 2px; }

.chart-copy { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: 0 auto; pointer-events: none; z-index: 3; }
.chart-head { position: absolute; left: 24px; top: clamp(92px, 13vh, 130px); max-width: min(560px, 42vw); }
.chart-head h2 { font-size: clamp(38px, min(5vw, 8.6vh), 76px); line-height: 0.98; }
.chart-metas { position: absolute; left: 24px; bottom: clamp(104px, 15vh, 140px); width: min(450px, 34vw); height: clamp(170px, 26vh, 240px); }
.chart-meta { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; }
.chart-meta h3 { font-size: clamp(28px, min(3.3vw, 5.6vh), 50px); line-height: 1.02; letter-spacing: -0.024em; margin: 0 0 12px; font-weight: 340; font-variation-settings: 'opsz' 144; }
.chart-meta p { margin: 0 0 14px; font-size: 16px; color: var(--ink-2); }
.chart-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.chart-facts span { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.chart-rail { position: absolute; left: 0; right: 0; bottom: clamp(24px, 3.6vh, 36px); margin: 0 auto; display: flex; gap: 4px; z-index: 4; }
.chart-tick { flex: 1; min-width: 0; padding: 12px 0 0; margin-top: -12px; border: 0; background: none; color: var(--ink-3); cursor: pointer; text-align: left; }
.chart-tick::before { content: ""; display: block; height: 3px; border-radius: 3px; background: rgba(240, 219, 162, 0.16); transition: background 0.5s ease; }
.chart-tick.is-done::before { background: rgba(224, 188, 106, 0.6); }
.chart-tick.is-active::before { background: linear-gradient(90deg, var(--gold), var(--mint)); }
.chart-tick span { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; transition: color 0.3s ease; }
.chart-tick.is-active span, .chart-tick:hover span { color: var(--ink); }

@media (max-width: 980px) {
    .chart.is-live { height: 480vh; }
    .cb { --w: min(38vw, 25vh); --t: 26px; }
    .cb-spine span { font-size: 11px; }
    .chart-ledge { top: calc(min(38vw, 25vh) * 0.71 + 2px); }
    .chart-head { left: 16px; right: 16px; top: 74px; max-width: none; }
    .chart-head h2 { font-size: clamp(30px, 8.4vw, 50px); }
    .chart-rank { right: calc(min(38vw, 25vh) * 0.38); font-size: min(44vw, 34vh); }
    .chart-metas { left: 16px; right: 16px; width: auto; bottom: 72px; height: 150px; }
    .chart-meta h3 { font-size: clamp(25px, 7vw, 36px); margin-bottom: 6px; }
    .chart-meta p { font-size: 14.5px; margin-bottom: 10px; }
    .chart-rail { padding: 0 16px; }
    .chart-tick span { font-size: 11px; }
}

/* ---------- Why listen: a day on a dial ---------- */

.mint.day { overflow: clip; }
.mint.day.is-live { height: 360vh; padding: 0; }
.is-live .day-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.is-live .mint-grid { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 30px; align-items: center; }
.day.is-live h2 { font-size: clamp(38px, min(4.8vw, 8vh), 72px); line-height: 0.98; }
.day.is-live .lede { font-size: clamp(16px, 1.3vw, 19px); margin-bottom: 0; }
.day.is-live .mint-list { margin-top: clamp(12px, 2.4vh, 26px); }
.day.is-live .mint-list li { position: relative; padding: clamp(9px, 1.5vh, 14px) 0; font-size: 16px; opacity: 0.42; transition: opacity 0.45s ease; }
.day.is-live .mint-list li.is-active { opacity: 1; }
.day.is-live .mint-list .star { transition: transform 0.7s var(--ease); }
.day.is-live .mint-list li.is-active .star { transform: rotate(45deg) scale(1.5); }
@media (max-width: 980px) {
    .mint.day.is-live { height: 330vh; }
    .is-live .day-pin { align-items: flex-start; padding-top: 62px; }
    .is-live .mint-grid { grid-template-columns: 1fr; gap: 8px; }
    .day.is-live h2 { font-size: clamp(30px, 8.4vw, 50px); margin-bottom: 8px; }
    .day.is-live .label { margin-bottom: 8px; }
    .day.is-live .lede { display: none; }
    .day.is-live .mint-list { position: relative; min-height: 96px; margin-top: 0; }
    .day.is-live .mint-list li { position: absolute; left: 0; right: 0; top: 0; border: 0; padding: 0; opacity: 0; font-size: 15px; line-height: 1.45; }
    .day.is-live .mint-list li:last-child { border: 0; }
    .day.is-live .mint-list li.is-active { opacity: 1; }
}

/* ---------- Inside the app: the phone in layers ---------- */

.story.is-live { height: 560vh; padding: 0; }
.is-live .story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.is-live .story-pin > .container { position: relative; height: 100%; }
.story.is-live .section-head { position: absolute; left: 24px; top: clamp(90px, 12vh, 124px); display: block; max-width: 44%; margin: 0; z-index: 2; }
.story.is-live .section-head h2 { font-size: clamp(26px, min(3vw, 5.4vh), 44px); }
.story.is-live .section-head .label { margin-bottom: 8px; }
.story.is-live .section-head > p { display: none; }
.story.is-live .story-grid { display: block; height: 100%; }
.story.is-live .story-steps { position: absolute; left: 24px; bottom: clamp(50px, 9vh, 90px); width: min(490px, 40%); height: min(60vh, 500px); z-index: 2; }
.story.is-live .story-step { position: absolute; left: 0; right: 0; bottom: 0; min-height: 0; padding: 0; opacity: 0; visibility: hidden; display: block; transition: opacity 0.35s ease, visibility 0.35s; }
.story.is-live .story-step.is-active { opacity: 1; visibility: visible; transition-delay: 0.08s; }
.story.is-live .story-step h3 { font-size: clamp(32px, min(3.9vw, 6.6vh), 58px); margin-bottom: 14px; transform: translate3d(0, 22px, 0); transition: transform 0.85s var(--ease); }
.story.is-live .story-step .lede { font-size: clamp(15.5px, 1.25vw, 18px); margin-bottom: 16px; transform: translate3d(0, 16px, 0); transition: transform 0.85s var(--ease) 0.04s; }
.story.is-live .story-step.is-active h3, .story.is-live .story-step.is-active .lede { transform: none; }
.story.is-live .points li { padding: clamp(8px, 1.4vh, 13px) 0; font-size: 15.5px; opacity: 0.42; transition: opacity 0.5s ease; }
.story.is-live .points li.is-lit { opacity: 1; }
.story.is-live .story-device { position: absolute; left: 44%; right: 0; top: 0; bottom: 0; display: block; }
.story.is-live .story-sticky { position: absolute; inset: 0; top: 0; height: auto; display: flex; align-items: center; justify-content: center; perspective: 1500px; }
.xp {
    --xw: clamp(190px, min(23vw, 38vh), 320px);
    --xr: calc(var(--xw) * 0.135);
    position: relative;
    width: var(--xw);
    aspect-ratio: 660 / 1434;
    transform-style: preserve-3d;
    will-change: transform;
}
.xp-edge, .xp-frame, .xp-rear { position: absolute; inset: 0; border-radius: var(--xr); display: block; }
.xp-edge { background: #2A2C2B; transform: translateZ(calc(var(--e) * -3px)); box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.2); }
.xp-frame { background: #111; box-shadow: inset 0 0 0 1.5px rgba(240, 219, 162, 0.32), 0 50px 110px rgba(0, 0, 0, 0.55); }
.xp-rear { background: linear-gradient(150deg, #173F2F, #0A1E16); transform: translateZ(-13px) rotateY(180deg); backface-visibility: hidden; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.3); }
.xp-rear img { width: 30%; border-radius: 22%; }
.xp-screen { position: absolute; inset: 2.6% 2.8%; transform-style: preserve-3d; visibility: hidden; transform: translateZ(1px); }
.xp-screen:first-of-type { visibility: visible; }
.xp-base { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: calc(var(--xr) * 0.8); object-fit: cover; }
.xp-layer { position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; will-change: transform; }
.story.is-live .story-rosette { width: min(620px, 50vw); }

/* Inside the app: the room takes each chapter's colour, the phone stands nearer the middle */
@property --tint { syntax: '<color>'; inherits: true; initial-value: rgba(232, 150, 78, 0.3); }
.is-live .story-pin { transition: --tint 1.2s ease; }
.story.is-live .story-device { left: 38%; }
.story.is-live .xp { --xw: clamp(200px, min(24vw, 36vh), 340px); }
.story.is-live .story-halo { width: min(860px, 70vw); height: min(860px, 70vw); background: radial-gradient(circle, var(--tint), transparent 64%); animation: story-breathe 6s ease-in-out infinite; }
@keyframes story-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
.story.is-live .story-sticky::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--xw, 300px) * 1.6); height: 60px; margin: calc(var(--xw, 300px) * 1.15) 0 0 calc(var(--xw, 300px) * -0.8); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); filter: blur(6px); pointer-events: none; }
.story.is-live .story-step h3 .sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.12em 0; margin-bottom: -0.12em; }
.story.is-live .story-step h3 .sw > span { display: inline-block; transform: translate3d(0, 110%, 0) rotate(5deg); transform-origin: 0 100%; transition: transform 0.2s linear; }
.story.is-live .story-step.is-active h3 .sw > span { transform: none; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.story.is-live .story-step h3 { transform: none; }

/* The chapter rail */
.story.is-live .story-dots { right: 24px; gap: 18px; justify-items: end; }
.story-count { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.story-count b { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.02em; color: var(--gold-soft); }
.story.is-live .story-dots i { position: relative; width: 3px; height: 34px; border-radius: 3px; background: var(--rule-strong); overflow: visible; }
.story.is-live .story-dots i.is-done { background: rgba(82, 223, 129, 0.45); }
.story.is-live .story-dots i.is-active { background: var(--mint); height: 58px; box-shadow: 0 0 16px rgba(82, 223, 129, 0.6); }
.story.is-live .story-dots i::after { content: attr(data-name); position: absolute; right: 16px; top: 50%; transform: translate3d(8px, -50%, 0); white-space: nowrap; font: 600 12.5px/1 var(--sans); font-style: normal; color: var(--ink-3); opacity: 0; transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease; }
.story.is-live .story-dots i.is-active::after { opacity: 1; transform: translate3d(0, -50%, 0); color: var(--ink); }
.story.is-live .story-dots:hover i::after { opacity: 1; transform: translate3d(0, -50%, 0); }
@media (max-width: 980px) {
    .story.is-live .story-device { left: 0; }
    .story.is-live .xp { --xw: min(40vw, 22vh); }
    .story.is-live .story-halo { width: 90vw; height: 90vw; }
    .story.is-live .story-dots i::after { display: none; }
    .story-count { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story.is-live .story-halo { animation: none; } }

/* The word band: each word lights as it crosses the middle of the screen */
.band-track > span { opacity: calc(0.3 + var(--lit, 1) * 0.7); text-shadow: 0 0 calc(var(--lit, 0) * 46px) rgba(224, 188, 106, calc(var(--lit, 0) * 0.4)); }
.band-track > span.o { color: rgba(244, 223, 168, calc(var(--lit, 0) * 0.92)); }
.band-track .star { rotate: calc(var(--spin, 0) * 1deg); }
.story.is-live .story-dots { right: 18px; }
@media (max-width: 980px) {
    .story.is-live { height: 500vh; }
    .story.is-live .section-head { left: 16px; right: 16px; top: 70px; max-width: none; }
    .story.is-live .section-head h2 { font-size: clamp(22px, 6.4vw, 34px); }
    .story.is-live .story-device { left: 0; top: 118px; bottom: 46%; }
    .xp { --xw: min(40vw, 22vh); }
    .story.is-live .story-steps { left: 16px; right: 16px; width: auto; bottom: 16px; height: 44%; }
    .story.is-live .story-step h3 { font-size: clamp(26px, 7.4vw, 38px); margin-bottom: 8px; }
    .story.is-live .story-step .label { display: none; }
    .story.is-live .story-step .lede { font-size: 14.5px; margin-bottom: 8px; line-height: 1.45; }
    .story.is-live .points li { font-size: 13.5px; padding: 6px 0; gap: 8px; line-height: 1.4; }
    .story.is-live .story-dots { right: 12px; }
}

/* ---------- Subjects: words and orbits ---------- */

.subjects { position: relative; }
.subjects.is-live { height: 460vh; }
@media (max-width: 760px) {
    .subjects.is-live { height: 400vh; }
}

/* ---------- Features: working tools ---------- */

.toy-cell { display: flex; flex-direction: column; min-height: 300px; }
.toy-cell > svg { flex-shrink: 0; }
.toy-cell > p { margin-bottom: 18px; }
.bento-cell:last-child { grid-column: span 2; }
.toy { margin-top: auto; position: relative; z-index: 1; font-size: 13.5px; color: var(--ink-2); }
.bento div.toy, .bento .toy div { border: 0; padding: 0; }
.toy button { font: inherit; cursor: pointer; color: inherit; }
.bento-cell .toy svg { margin: 0; }

.toy-offline { display: grid; gap: 8px; }
.toy-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.toy-row img { width: 30px; height: 42px; object-fit: cover; border-radius: 3px; }
.toy-row-title { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toy-save { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 32px; padding: 0 12px; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 700; transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease; }
.toy-save:hover { border-color: var(--mint); }
.toy-save i { position: absolute; inset: 0; background: rgba(82, 223, 129, 0.34); transform: scaleX(0); transform-origin: left; }
.toy-save.is-saving i { transform: scaleX(1); transition: transform 1.5s cubic-bezier(0.3, 0.1, 0.3, 1); }
.toy-save span { position: relative; }
.toy-save.is-saved { background: var(--mint); border-color: var(--mint); color: #05110C; }

.toy-sleep { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.toy-sleep svg { grid-row: span 2; width: 64px; height: 64px; transform: rotate(-90deg); }
.toy-sleep circle { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 6; }
.toy-sleep .toy-sleep-arc { stroke: var(--gold-soft); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 50; transition: stroke-dashoffset 0.8s var(--ease); }
.toy-sleep-text { color: var(--ink); font-weight: 700; }
.toy-sleep-opts { display: flex; gap: 4px; }
.toy-sleep-opts button { min-width: 36px; height: 28px; border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 700; transition: background 0.25s ease, color 0.25s ease; }
.toy-sleep-opts button.is-active { background: var(--ink); color: #05110C; border-color: var(--ink); }

.toy-car { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; }
.toy-car button { height: 72px; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: 18px; background: rgba(255, 255, 255, 0.03); transition: background 0.2s ease, border-color 0.2s ease; }
.toy-car button:hover { border-color: var(--ink-3); }
.toy-car .toy-car-play { background: var(--mint); border-color: var(--mint); color: #05110C; }
.toy-car .eq { display: none; margin: 0; height: 24px; }
.toy-car .eq i { background: #05110C; width: 4px; }
.toy-car.is-playing .eq { display: inline-flex; }
.toy-car.is-playing .toy-car-play svg { display: none; }
.bento-cell .toy-car svg { color: inherit; }

.toy-input { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: rgba(0, 0, 0, 0.2); transition: border-color 0.2s ease; }
.toy-input:focus-within { border-color: var(--mint); }
.toy-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 14.5px; }
.toy-input svg { flex-shrink: 0; color: var(--ink-3) !important; }
.toy-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; min-height: 54px; }
.toy-hit { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 6px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.04); text-align: left; transition: background 0.2s ease; }
.toy-hit:hover { background: rgba(255, 255, 255, 0.09); }
.toy-hit img { width: 30px; height: 42px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.toy-hit span { min-width: 0; }
.toy-hit strong, .toy-hit small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toy-hit strong { color: var(--ink); font-size: 12.5px; }
.toy-hit small { color: var(--ink-3); font-size: 11.5px; }
.toy-none { margin: 0; grid-column: 1 / -1; align-self: center; }

.toy-alert { min-height: 66px; overflow: hidden; }
.toy-note { display: flex; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.16); opacity: 0; transform: translate3d(0, -110%, 0); transition: transform 0.7s var(--ease), opacity 0.4s ease; }
.toy-note.is-in { opacity: 1; transform: none; }
.toy-note img { width: 34px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.toy-note span { min-width: 0; }
.toy-note small { display: block; font-size: 11.5px; color: var(--mint); font-weight: 700; }
.toy-note strong { display: block; color: var(--ink); font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toy-alert-cell > svg { transform-origin: 50% 0; }
.toy-alert-cell:has(.is-ring) > svg { animation: bell-ring 0.9s var(--ease); }
@keyframes bell-ring { 0%, 100% { rotate: 0deg; } 20% { rotate: 16deg; } 45% { rotate: -12deg; } 70% { rotate: 6deg; } }

.toy-switch { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.toy-switch button { position: relative; width: 48px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: background 0.3s ease; }
.toy-switch button i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform 0.5s var(--ease); }
.toy-switch button[aria-checked="true"] { background: var(--mint); }
.toy-switch button[aria-checked="true"] i { transform: translate3d(20px, 0, 0); }
.toy-guest-note { margin: 10px 0 0 !important; font-size: 13px; color: var(--ink-2) !important; }

.toy-speed-wave { display: flex; align-items: center; gap: 4px; height: 60px; margin-bottom: 12px; }
.toy-speed-wave i { flex: 1; height: calc(var(--h) * 100%); border-radius: 3px; background: linear-gradient(180deg, var(--mint), var(--emerald)); transform-origin: 50% 50%; animation: speed-bar var(--dur, 0.9s) ease-in-out var(--d) infinite alternate; }
@keyframes speed-bar { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.toy-speed-opts { position: relative; display: flex; height: 40px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.toy-speed-opts button { position: relative; flex: 1; border: 0; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); transition: color 0.3s ease; }
.toy-speed-opts button.is-active { color: #05110C; }
.toy-speed-pill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--mint); transition: transform 0.6s var(--ease), width 0.3s ease; }

.toy-sync-devices { display: grid; gap: 6px; margin-bottom: 12px; }
.toy-device { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 9px; color: var(--gold-soft); }
.bento-cell .toy-device svg { color: var(--gold-soft); }
.toy-sync-bar { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.toy-sync-bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--mint)); transform-origin: left; transition: transform 0.45s var(--ease); }
.toy-sync input[type="range"] { width: 100%; margin: 0 0 6px; accent-color: var(--mint); cursor: pointer; }
.toy-sync-label { font-weight: 600; color: var(--ink); }

@media (max-width: 1100px) { .toy-results { grid-template-columns: 1fr; } .toy-hit:nth-child(n+3) { display: none; } }
@media (max-width: 640px) { .bento-cell.is-wide, .bento-cell:last-child { grid-column: auto; } .toy-cell { min-height: 0; } .toy { margin-top: 6px; } }
@media (prefers-reduced-motion: reduce) { .toy-speed-wave i { animation: none; } .toy-alert-cell:has(.is-ring) > svg { animation: none; } }

/* ---------- Devices: the relay ---------- */

.relay.is-live { height: 400vh; padding: 0 !important; }
.is-live .relay-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.is-live .relay-head { position: absolute; left: 0; right: 0; top: clamp(92px, 13vh, 130px); margin: 0 auto; z-index: 3; }
.is-live .relay-head .section-head { margin: 0; align-items: end; }
.is-live .relay-head h2 { font-size: clamp(30px, min(4vw, 7vh), 60px); }
.relay-caps { position: relative; min-height: 2.6em; font-size: clamp(16px, 1.5vw, 21px); }
.is-live .relay-caps { display: block; }
.relay-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; color: var(--ink); max-width: none !important; font-size: inherit !important; opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 0.4s ease, transform 0.8s var(--ease); }
.relay-cap.is-active { opacity: 1; transform: none; }
.relay-stage { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 54%; overflow: hidden; }
.relay-world { position: absolute; left: 50%; top: 60%; width: 0; height: 0; transform-style: preserve-3d; }
.relay-device { position: absolute; transform-style: preserve-3d; will-change: transform, opacity; }
.relay-phone { width: clamp(120px, min(15vw, 28vh), 220px); left: calc(clamp(120px, min(15vw, 28vh), 220px) / -2); top: calc(clamp(120px, min(15vw, 28vh), 220px) * -1.1); border-radius: 15% / 7%; padding: 2.8%; }
.relay-phone > img { border-radius: 13% / 6%; }
.relay-tablet { width: clamp(180px, min(27vw, 50vh), 400px); left: calc(clamp(180px, min(27vw, 50vh), 400px) / -2); top: calc(clamp(180px, min(27vw, 50vh), 400px) * -0.725); padding: 1.6%; border-radius: 6%; }
.relay-tablet > img { border-radius: 4.6%; }
.relay-web { width: clamp(300px, min(54vw, 92vh), 860px); left: calc(clamp(300px, min(54vw, 92vh), 860px) / -2); top: calc(clamp(300px, min(54vw, 92vh), 860px) * -0.38); border-radius: 14px; overflow: hidden; background: #0B1A14; box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.2), 0 50px 110px rgba(0, 0, 0, 0.65); }
.relay-web > img { display: block; width: 100%; height: auto; }
.relay-chrome { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #16261F; }
.relay-chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(245, 239, 224, 0.26); }
.relay-chrome span { margin-left: 10px; padding: 2px 14px; border-radius: 999px; font-size: 11px; color: var(--ink-2); background: rgba(0, 0, 0, 0.3); }
.relay-now {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 4%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 9px;
    align-items: center;
    padding: 7px 10px 8px 7px;
    border-radius: 12px;
    background: rgba(13, 30, 23, 0.97);
    box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.22), 0 14px 30px rgba(0, 0, 0, 0.5);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink);
    transform: translateZ(26px);
}
.relay-now img { grid-row: span 2; width: 24px; height: 34px; border-radius: 3px; object-fit: cover; }
.relay-now > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.relay-bar { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.relay-bar b { display: block; height: 100%; background: var(--mint); transform-origin: left; }
.relay-spark { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--mint) 45%, rgba(82, 223, 129, 0)); box-shadow: 0 0 40px 14px rgba(82, 223, 129, 0.55); opacity: 0; }
@media (max-width: 980px) {
    .relay.is-live { height: 360vh; }
    .is-live .relay-head { top: 72px; }
    .is-live .relay-head .section-head { grid-template-columns: 1fr; gap: 8px; }
    .relay-world { top: 56%; }
    .relay-phone { width: min(30vw, 22vh); left: calc(min(30vw, 22vh) / -2); top: calc(min(30vw, 22vh) * -1.1); }
    .relay-tablet { width: min(44vw, 28vh); left: calc(min(44vw, 28vh) / -2); top: calc(min(44vw, 28vh) * -0.725); }
    .relay-web { width: 86vw; left: -43vw; top: -32vw; }
    .relay-now { font-size: 9px; padding: 4px 6px 5px 4px; border-radius: 8px; gap: 2px 5px; }
    .relay-now img { width: 14px; height: 20px; }
}

/* ---------- Listeners: read aloud ---------- */

.quote.is-read blockquote { color: var(--ink); }
.qw { opacity: 0.22; transition: opacity 0.35s ease; }
.qw.is-lit { opacity: 1; }
.q-progress { position: absolute; left: clamp(26px, 6vw, 84px); right: clamp(26px, 6vw, 84px); bottom: 22px; height: 2px; border-radius: 2px; background: rgba(240, 219, 162, 0.14); overflow: hidden; display: block; }
.q-progress b { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--mint)); transform: scaleX(0); transform-origin: left; }
@media (max-width: 640px) { .q-progress { left: 22px; right: 22px; bottom: 14px; } }

/* ---------- FAQ ---------- */

@media (min-width: 981px) { .faq-grid > div:first-child { position: sticky; top: 130px; align-self: start; } }
.faq summary { transition: color 0.3s ease; }
.faq summary > span:first-child, .faq summary { will-change: auto; }
.faq details { transition: background 0.5s ease; border-radius: 4px; }
.faq details[open] { background: linear-gradient(90deg, rgba(82, 223, 129, 0.05), transparent 70%); }
.faq summary .plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.24); transition: transform 0.6s var(--ease), background 0.3s ease, color 0.3s ease; }
.faq summary:hover .plus { background: var(--gold-soft); color: #05110C; }
.faq details[open] .plus { transform: rotate(135deg); }

/* ---------- Footer ---------- */

.wordmark { cursor: default; }

/* Round 2 of the scenes */
.is-live .ledger.draw-line::after { display: none; }
.count-notes { position: absolute; left: 0; right: 0; top: 0; z-index: 4; text-align: center; pointer-events: none; }
.count-notes p { position: absolute; left: 16px; right: 16px; margin: 0; font-size: clamp(15px, 1.3vw, 18px); color: var(--gold-soft); opacity: 0; }
.count-notes p:first-child { top: 10vh; }
.count-notes p:nth-child(2) { top: 75vh; }
.chart-ranks { display: none; }
.chart-rank { pointer-events: none; }
.chart-fade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, var(--bg) 0, var(--bg) 26%, rgba(5, 17, 12, 0.72) 37%, transparent 47%); }
@media (max-width: 980px) {
    .chart-fade { background: linear-gradient(180deg, var(--bg) 0, transparent 22%, transparent 56%, var(--bg) 68%); }
}

.site-header.is-hidden .nav { box-shadow: none; }

.in-scene .app-bar { transform: translateY(140%); }


/* Inside the app without the motion layer: every chapter with its own phone */
.story:not(.is-live) .story-grid { grid-template-columns: 1fr; max-width: 640px; }
.story:not(.is-live) .story-step { opacity: 1; min-height: 0; padding: 50px 0; border-top: 1px solid var(--rule); }
.story:not(.is-live) .story-inline { display: block; width: 240px; margin: 0 0 36px; }

/* How long each scene holds the page. Lower numbers mean a quicker scene. */
.count.is-live { height: 430vh; }
.chart.is-live { height: 100vh; height: 100svh; }
.mint.day.is-live { height: 400vh; }
.story.is-live { height: 600vh; }
.subjects.is-live { height: 460vh; }
.relay.is-live { height: 400vh; }
@media (max-width: 980px) {
    .chart.is-live { height: 100vh; height: 100svh; }
    .mint.day.is-live { height: 370vh; }
    .story.is-live { height: 560vh; }
    .relay.is-live { height: 370vh; }
}
@media (max-width: 760px) {
    .count.is-live { height: 380vh; }
    .subjects.is-live { height: 420vh; }
}

/* ---------- Why listen: one phone, one screen for each reason ---------- */

.is-live .day-stage { display: grid; }
.day-stage {
    --dw: clamp(210px, min(25vw, 36vh), 380px);
    position: relative;
    place-items: center;
    height: 100vh;
    height: 100svh;
    perspective: 1500px;
}
.day-rosette { position: absolute; left: 50%; top: 50%; width: min(118%, 96vh); color: rgba(5, 17, 12, 0.13); transform: translate(-50%, -50%); will-change: transform; }
.day-cover {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--dw) * 0.54);
    height: auto;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 3px 7px 7px 3px;
    box-shadow: 0 34px 60px rgba(4, 60, 30, 0.42);
    will-change: transform;
}
.day-cover-0 { margin: calc(var(--dw) * -0.86) 0 0 calc(var(--dw) * -1.08); }
.day-cover-1 { margin: calc(var(--dw) * 0.1) 0 0 calc(var(--dw) * 0.6); }
.day-3d { position: relative; width: var(--dw); transform-style: preserve-3d; will-change: transform; }
.day-phone {
    width: 100%;
    border-radius: 15% / 7%;
    padding: 2.8%;
    transform-style: preserve-3d;
    box-shadow: 0 0 0 1px rgba(5, 17, 12, 0.3), 0 60px 110px rgba(4, 60, 30, 0.55);
}
.day-window { overflow: hidden; border-radius: 13% / 6%; aspect-ratio: 660 / 1434; background: #000; }
.day-screens { will-change: transform; }
.day-screens img { display: block; width: 100%; height: auto; border-radius: 0; }
.day-card {
    position: absolute;
    left: calc(var(--dw) * -0.42);
    bottom: 13%;
    width: calc(var(--dw) * 0.86);
    min-width: 186px;
    padding: 14px 16px;
    border-radius: 18px;
    color: var(--ink);
    background: rgba(9, 28, 20, 0.97);
    box-shadow: inset 0 0 0 1px rgba(240, 219, 162, 0.2), 0 30px 60px rgba(4, 50, 26, 0.5);
    opacity: 0;
    will-change: transform, opacity;
}
.day-card small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gold-soft); margin-bottom: 3px; }
.day-card strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.28; color: var(--ink); }
.day-card > img { float: right; width: 34px; height: 48px; margin: 0 0 2px 10px; object-fit: cover; border-radius: 4px; }
.day-parts { display: flex; gap: 4px; margin-top: 10px; }
.day-parts i { flex: 1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); }
.day-parts i:first-child { background: var(--mint); }
.day-week { display: flex; gap: 5px; margin-top: 10px; }
.day-week i { flex: 1; height: 16px; border-radius: 5px; background: var(--mint); }
.day-week i:nth-child(n+6) { background: rgba(255, 255, 255, 0.14); }

.day.is-live .mint-list li { opacity: 0.56; }
.day.is-live .mint-list li.is-active { opacity: 1; }
.day-line { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; display: block; background: #05110C; transform: scaleX(0); transform-origin: left; }
.day.is-live .mint-list .star { transition: none; }
.day.is-live .mint-list li.is-active .star { transform: none; }
.is-live .mint-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }

/* The reason being told is a dark card; its line fills as you read on */
.day.is-live .mint-list li { margin: 0 -18px; padding-left: 18px; padding-right: 18px; border-color: transparent; border-radius: 18px; transition: opacity 0.45s ease, background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease; }
.day.is-live .mint-list li:last-child { border-color: transparent; }
.day.is-live .mint-list li.is-active { background: #05110C; color: rgba(242, 237, 228, 0.78); box-shadow: 0 24px 50px rgba(4, 60, 30, 0.35); }
.day.is-live .mint-list li.is-active strong { color: var(--ink); }
.day.is-live .mint-list li.is-active .star { color: var(--gold); }
.day.is-live .mint-list li .day-line { left: 18px; right: 18px; bottom: 8px; background: linear-gradient(90deg, var(--mint), var(--gold)); border-radius: 2px; opacity: 0; transition: opacity 0.3s ease; }
.day.is-live .mint-list li.is-active .day-line { opacity: 1; }

/* The screens sit in a stack; the scene moves each one */
.day-screens.is-stacked { position: relative; height: 100%; }
.day-screens.is-stacked img { position: absolute; inset: 0; height: 100%; object-fit: cover; will-change: transform, opacity; }
.day-window { position: relative; }
.day-window::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(118deg, rgba(255, 255, 255, 0.14), transparent 30%); pointer-events: none; }

/* One word for each reason, outlined, drifting behind the phone */
.day-words { position: absolute; inset: 0; pointer-events: none; }
.day-words span { position: absolute; left: 50%; top: 42%; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(130px, min(16vw, 28vh), 270px); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; color: rgba(5, 17, 12, 0.05); -webkit-text-stroke: 2px rgba(5, 17, 12, 0.34); transform: translate3d(-50%, -50%, 0); opacity: 0; will-change: transform, opacity; }

/* The floating cards act out their reason when it comes round */
.day-card { background: linear-gradient(160deg, rgba(14, 40, 29, 0.97), rgba(6, 20, 14, 0.97)); }
.day-parts i { transition: background-color 0.4s ease; }
.day-card.is-on .day-parts i:nth-child(2) { background: var(--mint); transition-delay: 0.5s; }
.day-card.is-on .day-parts i:nth-child(3) { background: var(--mint); transition-delay: 1s; }
.day-week i { transform: scaleY(0.3); transform-origin: bottom; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.day-card.is-on .day-week i { transform: none; }
.day-card.is-on .day-week i:nth-child(2) { transition-delay: 0.08s; }
.day-card.is-on .day-week i:nth-child(3) { transition-delay: 0.16s; }
.day-card.is-on .day-week i:nth-child(4) { transition-delay: 0.24s; }
.day-card.is-on .day-week i:nth-child(5) { transition-delay: 0.32s; }
.day-card.is-on .day-week i:nth-child(6) { transition-delay: 0.4s; }
.day-card.is-on .day-week i:nth-child(7) { transition-delay: 0.48s; }
.day-card > img { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); transform: rotate(-8deg) scale(0.8); }
.day-card.is-on > img { transform: none; }

/* A soft light moves across the green */
.mint.day .day-pin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 120vh; height: 120vh; margin: -60vh 0 0 -60vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 240, 0.32), transparent 70%); pointer-events: none; animation: day-light 16s ease-in-out infinite alternate; }
@keyframes day-light { from { translate: -30vw -10vh; } to { translate: 26vw 14vh; } }
@media (max-width: 980px) {
    .day.is-live .mint-list li { margin: 0; }
    .day-words span { font-size: clamp(70px, 22vw, 140px); }
}
@media (prefers-reduced-motion: reduce) { .mint.day .day-pin::before { animation: none; } }

@media (max-width: 980px) {
    .is-live .day-pin { align-items: flex-start; }
    .day-stage { --dw: min(50vw, 25vh); height: auto; margin-top: 10px; order: 3; }
    .day-cover-0 { margin: calc(var(--dw) * -0.8) 0 0 calc(var(--dw) * -1); }
    .day-cover-1 { margin: calc(var(--dw) * 0.2) 0 0 calc(var(--dw) * 0.46); }
    .day-card { left: calc(var(--dw) * -0.3); min-width: 158px; padding: 10px 12px; border-radius: 13px; }
    .day-card strong { font-size: 13px; }
    .day-card small { font-size: 10.5px; }
    .day-line { display: none; }
    .day.is-live .mint-list li { opacity: 0; }
}

/* ---------- Inside the app: heading and chapter read as one block, beside a larger phone ---------- */

@media (min-width: 981px) {
    .is-live .story-pin > .container { display: flex; flex-direction: column; justify-content: center; padding-top: clamp(40px, 6vh, 70px); }
    .story.is-live .section-head { position: relative; left: auto; top: auto; max-width: 54%; margin: 0 0 clamp(20px, 3.8vh, 44px); }
    .story.is-live .section-head h2 { font-size: clamp(36px, min(4vw, 7vh), 68px); line-height: 1; }
    .story.is-live .story-grid { height: auto; }
    .story.is-live .story-steps { position: relative; left: auto; bottom: auto; width: min(540px, 44%); height: auto; display: grid; }
    .story.is-live .story-step { position: relative; left: auto; right: auto; bottom: auto; grid-area: 1 / 1; align-self: start; }
    .story.is-live .story-step h3 { font-size: clamp(26px, min(2.7vw, 4.6vh), 42px); margin-bottom: 10px; }
    .story.is-live .story-step .label { margin-bottom: 10px; }
    .story.is-live .story-device { left: 42%; }
    .xp { --xw: clamp(210px, min(25vw, 39vh), 400px); }
    .story.is-live .story-rosette { width: min(860px, 56vw, 92vh); }
    .story-halo { width: min(900px, 60vw); height: min(900px, 60vw); }
}

.day-cover { width: calc(var(--dw) * 0.48); }
.day-cover-0 { margin: calc(var(--dw) * -0.84) 0 0 calc(var(--dw) * -0.86); }
.day-cover-1 { margin: calc(var(--dw) * 0.12) 0 0 calc(var(--dw) * 0.42); }
.day-card { left: calc(var(--dw) * -0.26); bottom: 11%; }
.day-line { opacity: 0; transition: opacity 0.4s ease; }
.mint-list li.is-active .day-line { opacity: 1; }
@media (min-width: 981px) {
    .story.is-live .section-head { max-width: 44%; }
    .story.is-live .story-device { left: 46%; }
}
@media (max-width: 980px) {
    .day-cover-0 { margin: calc(var(--dw) * -0.8) 0 0 calc(var(--dw) * -0.84); }
    .day-cover-1 { margin: calc(var(--dw) * 0.2) 0 0 calc(var(--dw) * 0.4); }
    .day-card { left: calc(var(--dw) * -0.24); bottom: 8%; }
}
@media (max-width: 980px) {
    .is-live .mint-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .day.is-live .mint-list { min-height: 88px; }
    .day-stage { --dw: min(46vw, 24vh, 300px); justify-self: center; width: 100%; padding-top: 6px; }
    .day-rosette { width: min(120vw, 70vh); }
}
@media (max-width: 980px) { .day-stage { --dw: min(52vw, 28vh, 300px); } }
@media (min-width: 641px) and (max-width: 980px) {
    .story.is-live .story-device { bottom: 30%; }
    .story.is-live .story-steps { height: 30%; }
    .xp { --xw: min(40vw, 26vh); }
}

/* ---------- Numbers: a tray with four places, filled as each number lands ---------- */
.is-live .count-row .ledger > div + div { box-shadow: none; }
.is-live .count-row .ledger {
    background-image: linear-gradient(rgba(240, 219, 162, calc(var(--panel, 0) * 0.22)), rgba(240, 219, 162, calc(var(--panel, 0) * 0.22))), linear-gradient(rgba(240, 219, 162, calc(var(--panel, 0) * 0.22)), rgba(240, 219, 162, calc(var(--panel, 0) * 0.22))), linear-gradient(rgba(240, 219, 162, calc(var(--panel, 0) * 0.22)), rgba(240, 219, 162, calc(var(--panel, 0) * 0.22)));
    background-size: 1px 64%; background-repeat: no-repeat; background-position: 25% 50%, 50% 50%, 75% 50%;
}

.is-live .ledger span { letter-spacing: 0.01em; }
.count-faces img { box-shadow: 0 0 0 2px rgba(240, 219, 162, 0.85), 0 0 0 7px rgba(5, 17, 12, 0.9), 0 0 0 8px rgba(224, 188, 106, 0.28), 0 0 30px rgba(224, 188, 106, 0.3), 0 16px 30px rgba(0, 0, 0, 0.55); }

/* ---------- Scholars hall: refined niches ---------- */
/* A second, finer keyline inside the arch */
.niche-frame::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23E8C877' stroke-width='1.6' vector-effect='non-scaling-stroke' d='M0 140V60C0 34 26 18 50 0C74 18 100 34 100 60V140'/%3E%3Cpath fill='none' stroke='%23E8C877' stroke-opacity='.38' stroke-width='1' vector-effect='non-scaling-stroke' d='M6 140V62C6 39 29 25 50 9C71 25 94 39 94 62V140'/%3E%3C/svg%3E") center / 100% 100% no-repeat, linear-gradient(115deg, rgba(255, 255, 255, calc(var(--f) * 0.14)), transparent 36%), linear-gradient(180deg, transparent 62%, rgba(5, 17, 12, 0.85));
}
.niche-frame { overflow: visible; }

/* Names under the side arches: a clean small sans, not a tiny serif */
.niche-name { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.005em; line-height: 1.35; color: var(--ink-2); max-width: 92%; margin: 16px auto 0; font-variation-settings: normal; }

/* A scholar without a portrait: their initials in gold over a field of eight-point stars */
.niche-mono {
    background:
        radial-gradient(70% 55% at 50% 42%, rgba(224, 188, 106, 0.16), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23E0BC6A' stroke-opacity='.22' stroke-width='.8'%3E%3Cpath d='M20 9l3.2 7.8L31 20l-7.8 3.2L20 31l-3.2-7.8L9 20l7.8-3.2z'/%3E%3Cpath d='M12.2 12.2h15.6v15.6H12.2z'/%3E%3Cpath d='M0 0l4 4M40 0l-4 4M0 40l4-4M40 40l-4-4'/%3E%3C/g%3E%3C/svg%3E") center / 34px 34px,
        linear-gradient(180deg, #14402F, #0A1913);
}
.niche-initials { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 18%; font-family: var(--serif); font-weight: 300; font-size: calc(var(--nw) * 0.36); letter-spacing: -0.02em; line-height: 1; background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; font-variation-settings: 'opsz' 144; }

/* ---------- Browse by subject: a reading room ---------- */
.sb-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; background: radial-gradient(48% 60% at 70% 52%, rgba(20, 96, 66, 0.36), transparent 74%), radial-gradient(30% 40% at 18% 60%, rgba(224, 188, 106, 0.05), transparent 70%); }
.sb-ghosts { position: absolute; inset: 0; pointer-events: none; }
.sb-ghost { position: absolute; right: -2vw; top: 50%; transform: translateY(-50%); font-family: var(--serif); font-weight: 300; font-size: min(22vw, 40vh); line-height: 1; letter-spacing: -0.05em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(240, 219, 162, 0.09); font-variation-settings: 'opsz' 144; opacity: 0; margin-top: -2vh; }
.sb-grid { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.6fr; gap: clamp(24px, 4vw, 70px); align-items: center; }

.sb-side .label { margin-bottom: 10px; }
.sb-side h2 { font-size: clamp(32px, min(3.4vw, 6vh), 52px); margin: 0 0 clamp(18px, 4vh, 40px); }
.sb-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sb-item { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%; padding: clamp(10px, 1.9vh, 18px) 0; border: 0; border-bottom: 1px solid var(--rule); background: none; color: var(--ink-3); cursor: pointer; text-align: left; transition: color 0.35s ease; }
.sb-name { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, min(2.2vw, 4.2vh), 34px); letter-spacing: -0.02em; line-height: 1.1; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); font-variation-settings: 'opsz' 72; }
.sb-count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--mint)); transform: scaleX(0); transform-origin: left; }
.sb-item:hover { color: var(--ink-2); }
.sb-item.is-active { color: var(--ink); }
.sb-item.is-active .sb-name { transform: translateX(14px); background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-item:not(.is-active) .sb-bar { transform: scaleX(0) !important; }
.sb-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--gold); opacity: 0; transform: scale(0.4); transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.sb-item.is-active::before { opacity: 1; transform: none; }

.sb-stage { position: relative; height: min(68vh, 640px); perspective: 1400px; transform-style: preserve-3d; }
.sb-set { position: absolute; inset: 0; transform-style: preserve-3d; }
.sb-fan { position: absolute; left: 50%; top: 40%; width: 0; height: 0; transform-style: preserve-3d; }
.sb-cover { --cw: clamp(120px, min(12vw, 24vh), 210px); position: absolute; left: calc(var(--cw) / -2); top: calc(var(--cw) * -0.71); width: var(--cw); height: calc(var(--cw) * 1.42); max-width: none; object-fit: cover; border-radius: 3px 7px 7px 3px; background: var(--bg-soft); box-shadow: 0 0 0 1px rgba(240, 219, 162, 0.18), 0 30px 50px rgba(0, 0, 0, 0.55), inset 6px 0 10px rgba(0, 0, 0, 0.25); backface-visibility: hidden; }
.sb-card { position: absolute; left: 0; right: 0; bottom: 0; width: min(560px, 100%); margin: 0 auto; text-align: center; }
.sb-meta { margin: 0 0 6px; font-size: 14px; color: var(--ink-3); }
.sb-meta strong { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2vw, 30px); color: var(--gold-soft); margin-right: 5px; }
.sb-meta span { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--rule-strong); }
.sb-blurb { margin: 0 0 12px; font-size: clamp(15px, 1.15vw, 17px); color: var(--ink-2); }
.sb-titles { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sb-titles li { max-width: 240px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.sb-open { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #05110C; background: var(--ink); transition: background 0.3s ease, transform 0.3s ease; }
.sb-open:hover { background: var(--gold-soft); transform: translateY(-2px); }
@media (max-width: 980px) {
    .sb-grid { grid-template-columns: 1fr; gap: 10px; align-content: start; padding-top: 80px; }
    .sb-side h2 { margin-bottom: 14px; }
    .sb-list { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border: 0; gap: 4px; }
    .sb-item { width: auto; flex-shrink: 0; padding: 6px 12px; border: 0; border-radius: 999px; }
    .sb-item.is-active { box-shadow: inset 0 0 0 1px var(--rule-strong); }
    .sb-item.is-active .sb-name { transform: none; }
    .sb-item::before, .sb-bar, .sb-count { display: none; }
    .sb-name { font-size: 18px; }
    .sb-stage { height: 62vh; }
    .sb-titles { display: none; }
}

/* ---------- Numbers: each stage laid out as number, picture, then a line above the tray ---------- */
@media (min-width: 761px) {
    .count-notes p:first-child, .count-notes p:nth-child(2) { top: 78vh; }
    .is-live .count-row { bottom: clamp(20px, 3.6vh, 40px); }
    .is-live .ledger strong { font-size: clamp(34px, 3.4vw, 54px); }
}
.count-notes p { color: var(--gold-soft); font-size: clamp(16px, 1.35vw, 20px); }
.is-live .ledger strong { font-weight: 300; letter-spacing: -0.035em; }
.is-live .ledger span { font-size: 13px; letter-spacing: 0.01em; }

.count-mark { position: absolute; left: 0; top: 0; z-index: 4; display: grid; justify-items: center; gap: 2px; width: 260px; margin-left: -130px; padding-bottom: 14px; text-align: center; pointer-events: none; opacity: 0; transform: translate3d(-100vw, 0, 0); translate: 0 -100%; }
.count-mark::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 12px; background: linear-gradient(var(--gold-soft), transparent); }
.count-mark > * { display: block; }
.count-mark span { font-size: 12px; font-weight: 600; color: var(--mint); }
.count-mark strong { font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.2; color: var(--ink); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9); }
.count-mark em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }

.count-names { position: absolute; left: 16px; right: 16px; top: calc(52% + 116px); z-index: 4; margin: 0 auto; max-width: 720px; text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(16px, 1.3vw, 19px); color: var(--gold-soft); text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9); opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .count-mark, .count-names { display: none; } }
