/* Site menu (☰) and Explore-by pages (30 Nov 2026). */
.menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 10px;margin-left:4px;border:1px solid #8094b080;border-radius:6px;background:transparent;color:inherit;font-size:1.35rem;line-height:1;cursor:pointer;flex:0 0 auto;touch-action:manipulation}
.menu-toggle:hover,.menu-toggle:focus-visible{border-color:#e6c37e;color:#e6c37e}
.site-header .header-tools{flex-wrap:nowrap}
/* Narrow screens: the main links live in the menu (not hidden away); the header keeps brand, theme, EN/ES and ☰. */
@media (max-width:1100px){.site-header>nav[aria-label]{display:none!important}}
@media (max-width:520px){.site-header .mobile-library,.site-header .header-search{display:none!important}.menu-toggle{min-width:40px;padding:0 8px}}
.site-menu{position:fixed;inset:0;z-index:2000}
.site-menu[hidden]{display:none}
.site-menu-backdrop{position:absolute;inset:0;background:#020a18b3;opacity:0;transition:opacity .2s}
.site-menu-panel{position:absolute;top:0;right:0;height:100%;height:100dvh;width:min(360px,88vw);overflow-y:auto;-webkit-overflow-scrolling:touch;background:#0a1c34;color:#f4f0e6;border-left:1px solid #2a3d5c;box-shadow:-12px 0 32px #0008;padding:14px 18px 28px;box-sizing:border-box;transform:translateX(100%);transition:transform .2s ease}
.site-menu.is-open .site-menu-backdrop{opacity:1}
.site-menu.is-open .site-menu-panel{transform:none}
@media (prefers-reduced-motion:reduce){.site-menu-panel,.site-menu-backdrop{transition:none}}
.site-menu-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.site-menu-head strong{font:600 1.15rem/1.2 var(--serif,Georgia,serif);color:#e6c37e}
.site-menu-close{min-width:44px;min-height:44px;border:1px solid #8094b080;border-radius:6px;background:transparent;color:inherit;font-size:1.1rem;cursor:pointer}
.site-menu ul{list-style:none;margin:0;padding:0}
.site-menu-main a,.site-menu-cats a{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px;padding:8px 6px;border-bottom:1px solid #22344c;color:inherit;text-decoration:none;font-size:1rem}
.site-menu a:hover,.site-menu a:focus-visible,.site-menu a[aria-current=page]{color:#e6c37e}
.site-menu-cats small{color:#9fb0c8;font-size:.8rem}
.site-menu-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}
.site-menu-theme,.site-menu-explore,.site-menu-lang a{min-height:44px;display:inline-flex;align-items:center;padding:0 12px;border:1px solid #8094b0;border-radius:6px;background:#0f2442;color:inherit;font:inherit;font-size:.9rem;text-decoration:none;cursor:pointer}
.site-menu-lang{display:inline-flex;gap:6px}
.site-menu-lang span:not(:has(a)){display:none}
.site-menu-sub{margin:18px 0 4px;font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#9fb0c8}
.site-menu-sub a{color:inherit;text-decoration:none}
html.menu-open,html.menu-open body{overflow:hidden}
[data-theme=light] .site-menu-panel{background:#fbf7ee;color:#192a39;border-left-color:#d8cdb6}
[data-theme=light] .site-menu-main a,[data-theme=light] .site-menu-cats a{border-bottom-color:#e6dcc6}
[data-theme=light] .site-menu-theme,[data-theme=light] .site-menu-explore,[data-theme=light] .site-menu-lang a{background:#fff;border-color:#b9ad95}
/* Explore pages */
.explore-page{max-width:900px;margin:auto;padding:28px 20px 60px}
.explore-hub{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.explore-hub a{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid #2a3d5c;border-radius:6px;text-decoration:none;color:inherit;min-height:44px}
.explore-hub a span{color:#9fb0c8;font-size:.9rem}
.explore-cats,.explore-letters{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.explore-cats a,.explore-letters a{min-height:36px;min-width:36px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;border:1px solid #2a3d5c;border-radius:4px;text-decoration:none;color:inherit}
.explore-cats a[aria-current=page]{border-color:#e6c37e;color:#e6c37e}
.explore-terms{list-style:none;padding:0}
.explore-terms>li{border-bottom:1px solid #22344c;scroll-margin-top:90px}
.explore-terms summary{display:flex;justify-content:space-between;gap:12px;padding:12px 4px;min-height:44px;cursor:pointer;align-items:center}
.explore-terms summary span{color:#9fb0c8;font-size:.88rem;white-space:nowrap}
.explore-terms details ul{padding:0 0 12px 18px}
.explore-terms details li{margin:6px 0}
.explore-terms details small{color:#9fb0c8}
/* Terra Realm "Text on this page" (30 Nov 2026). */
.terra-page-text{margin:14px auto 28px;max-width:860px;border:1px solid #23385a;background:#0b1d39;color:#f4f0e6;padding:4px 16px 14px;border-radius:4px;text-align:left}
.terra-page-text>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font:600 1.05rem/1.3 var(--serif,Georgia,serif);color:#e6c37e}
.terra-page-text h4{margin:16px 0 4px;font:600 .95rem/1.3 var(--serif,Georgia,serif);color:#e6c37e}
.terra-text-block{display:grid;grid-template-columns:14px 1fr;gap:10px;margin:10px 0}
.terra-ink{width:12px;height:12px;border-radius:2px;margin-top:6px;border:1px solid #ffffff55}
.terra-ink-label{display:block;font-size:.75rem;color:#9fb0c8}
.terra-text-block p{margin:2px 0;line-height:1.55}
.terra-translation{color:#c9d3e2;font-style:italic}
.terra-translation span{font-style:normal;font-size:.75rem;color:#9fb0c8;margin-right:4px}
.terra-text-note{font-size:.85rem;color:#aab8cc}
.terra-page-text dt{font-weight:600;color:#e6c37e;margin-top:6px}.terra-page-text dd{margin:2px 0 0}
.terra-page-text .sic{font-size:.8em;color:#9fb0c8;font-style:normal}
.terra-video-note{border-left:3px solid #e6c37e;padding:6px 10px;margin:8px 0;font-size:.9rem;background:#0c2142;color:#f4f0e6}
[data-theme=light] .terra-page-text{background:#fbf7ee;color:#192a39;border-color:#d8cdb6}
[data-theme=light] .terra-page-text>summary,[data-theme=light] .terra-page-text h4,[data-theme=light] .terra-page-text dt{color:#7a5a1e}
[data-theme=light] .terra-ink-label,[data-theme=light] .terra-text-note,[data-theme=light] .terra-page-text .sic,[data-theme=light] .terra-translation span{color:#5b6b80}
[data-theme=light] .terra-translation{color:#3b4a5c}
[data-theme=light] .terra-video-note{background:#f3ead8;color:#192a39}
.terra-ink.ink-black{background:#222}.terra-ink.ink-navy{background:#1c2a8a}.terra-ink.ink-red{background:#e02a2a}.terra-ink.ink-pink{background:#e0409a}
.terra-ink.ink-purple{background:#7a3fb0}.terra-ink.ink-green{background:#2fae3a}.terra-ink.ink-lightblue{background:#2a9be0}.terra-ink.ink-orange{background:#f07a20}
.terra-ink.ink-bluered{background:linear-gradient(90deg,#2a9be0 50%,#e02a2a 50%)}.terra-ink.ink-key4{background:linear-gradient(90deg,#222 25%,#6a2fb0 25% 50%,#f07a20 50% 75%,#e02a2a 75%)}
.terra-page-text p.terra-text-note{line-height:1.45;font-size:.85rem}
.terra-page-text .terra-text-block p{line-height:1.5}
/* Menu search */
.site-menu-search{margin:4px 0 10px}
.site-menu-search input{width:100%;box-sizing:border-box;min-height:44px;padding:8px 12px;border:1px solid #8094b0;border-radius:6px;background:#06142a;color:#f4f0e6;font:inherit;font-size:16px}
.site-menu-search input:focus{outline:2px solid #e6c37e;outline-offset:1px}
.site-menu-search-status{margin:6px 2px;font-size:.8rem;color:#9fb0c8;min-height:1em}
.site-menu-results{list-style:none;margin:0 0 8px;padding:0;max-height:min(55vh,460px);overflow-y:auto}
.site-menu-results a{display:block;padding:8px 6px;border-bottom:1px solid #22344c;color:inherit;text-decoration:none;min-height:44px;box-sizing:border-box}
.site-menu-results a:hover,.site-menu-results a:focus{background:#13294a;color:#e6c37e;outline:none}
.site-menu-results .r-title{display:block;font-size:.95rem}
.site-menu-results small{display:block;color:#9fb0c8;font-size:.75rem;margin-top:2px}
[data-theme=light] .site-menu-search input{background:#fff;color:#192a39;border-color:#b9ad95}
[data-theme=light] .site-menu-results a{border-bottom-color:#e6dcc6}
[data-theme=light] .site-menu-results a:hover,[data-theme=light] .site-menu-results a:focus{background:#f3ead8;color:#7a5a1e}
[data-theme=light] .site-menu-results small,[data-theme=light] .site-menu-search-status{color:#5b6b80}
.terra-ink.ink-bgyr{background:linear-gradient(90deg,#2a9be0 25%,#2fae3a 25% 50%,#f0c020 50% 75%,#e02a2a 75%)}
/* 1 Dec 2026 quality pass: full-width cinematic hub hero (Gallery, Library), like the home page. */
.hub-hero{position:relative;width:100vw;margin:0 0 clamp(40px,7vw,88px) calc(50% - 50vw);max-width:none}
.hub-hero .hub-hero-frame{position:relative;height:min(84vh,820px);min-height:520px;overflow:hidden;background:#06101f;max-width:none;margin:0;border:0;border-radius:0}
.hub-hero .cinematic-background{position:absolute;inset:0;max-width:none;height:auto;margin:0}
.hub-hero .cinematic-background img,.hub-hero .cinematic-background video{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;margin:0;border:0;border-radius:0;opacity:1}
.hub-hero-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(5,12,26,.55) 0%,rgba(5,12,26,.08) 30%,rgba(5,12,26,.25) 55%,rgba(5,12,26,.92) 100%),linear-gradient(90deg,rgba(5,12,26,.6) 0%,rgba(5,12,26,0) 60%)}
.hub-hero-copy{position:absolute;left:0;right:0;bottom:0;padding:0 clamp(22px,6vw,104px) clamp(48px,9vh,104px);max-width:1180px;color:#f6f1e4;opacity:0;transform:translateY(18px);animation:hubHeroIn .9s .15s cubic-bezier(.2,.7,.2,1) forwards}
.hub-hero-copy .eyebrow{color:#e5c06e;letter-spacing:.22em;font-size:.82rem;margin:0 0 14px}
.hub-hero-copy h1{font-size:clamp(2.7rem,6.6vw,6rem);line-height:1.02;letter-spacing:-.01em;margin:0 0 18px;color:#fff;text-shadow:0 2px 30px rgba(0,0,0,.45);text-wrap:balance}
.hub-hero-line{font-size:clamp(1.08rem,1.55vw,1.4rem);line-height:1.5;max-width:52ch;text-wrap:pretty;margin:0 0 30px;color:rgba(246,241,228,.92)}
.hub-hero-cta{display:inline-flex;align-items:center;min-height:54px;padding:0 30px;font-size:1.06rem;border-radius:999px}
.hub-hero-toggle{position:absolute;right:clamp(14px,3vw,32px);bottom:clamp(14px,3vw,28px);min-height:44px;padding:0 18px;border-radius:999px;font-size:.88rem;background:rgba(5,12,26,.55);color:#f6f1e4;border:1px solid rgba(246,241,228,.35);backdrop-filter:blur(6px)}
@keyframes hubHeroIn{to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hub-hero-copy{animation:none;opacity:1;transform:none}}
@media (max-width:800px){.hub-hero .hub-hero-frame{height:88svh;min-height:560px}.hub-hero-copy{padding-bottom:96px}.hub-hero-toggle{bottom:20px;right:16px}}
/* 1 Dec 2026 quality pass: "Why I write this book" — respectful, premium author page. */
.why-page{max-width:none;padding-top:0}
.why-hero{position:relative;width:100vw;margin:0 0 0 calc(50% - 50vw);min-height:min(86vh,860px);display:flex;align-items:center;overflow:hidden;background:#050c1a;isolation:isolate}
.why-hero-media{position:absolute;inset:0;z-index:-2}
.why-hero-media video{width:100%;height:100%;object-fit:cover;filter:blur(3px) saturate(.85) brightness(.55);transform:scale(1.06)}
.why-hero::after{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse at 30% 50%,rgba(5,12,26,.15) 0%,rgba(5,12,26,.75) 62%,rgba(5,12,26,.95) 100%),linear-gradient(180deg,rgba(5,12,26,.2),rgba(5,12,26,.9))}
.why-hero-inner{width:min(1240px,100%);margin:0 auto;padding:clamp(48px,8vh,96px) clamp(22px,5vw,64px);display:grid;grid-template-columns:minmax(220px,420px) 1fr;gap:clamp(28px,5vw,72px);align-items:center}
.why-portrait{width:100%;height:auto;border-radius:50%;filter:drop-shadow(0 30px 60px rgba(0,0,0,.6));opacity:0;transform:scale(.96);animation:whyIn 1.1s .1s cubic-bezier(.2,.7,.2,1) forwards}
.why-hero-copy{border:0!important;margin:0!important;padding:0!important;opacity:0;transform:translateY(16px);animation:whyIn 1s .35s cubic-bezier(.2,.7,.2,1) forwards}
.why-hero-copy .eyebrow{color:#e5c06e;letter-spacing:.2em;font-size:.82rem}
.why-hero-copy h1{font-size:clamp(2.8rem,6.2vw,5.8rem);line-height:1.02;margin:.15em 0 .3em;color:#fff;text-wrap:balance}
.why-signature{display:block;width:min(360px,80%);height:auto;opacity:.9;margin-top:10px}
@keyframes whyIn{to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.why-portrait,.why-hero-copy{animation:none;opacity:1;transform:none}}
.why-audio{max-width:760px;margin:40px auto 0;padding:0 22px}
.why-prose{max-width:760px;margin:clamp(40px,7vw,80px) auto 0;padding:0 22px;font-size:clamp(1.12rem,1.35vw,1.26rem);line-height:1.8}
.why-prose p{margin:0 0 1.35em}
.why-prose .why-lead::first-letter{float:left;font-family:var(--display,'Cormorant Garamond',Georgia,serif);font-size:5.4em;line-height:.82;padding:.06em .1em 0 0;color:#e5c06e}
.why-prose .why-lead{font-size:1.12em}
.why-prose h2{font-size:clamp(1.9rem,3.2vw,2.6rem);margin:2.2em 0 .7em;line-height:1.15}
.why-figure{margin:clamp(40px,6vw,72px) 0;width:auto}
.why-figure img{display:block;width:100%;height:auto;border-radius:16px;box-shadow:0 30px 70px -30px rgba(0,0,0,.7)}
.why-figure figcaption{font-size:.92rem;opacity:.75;margin-top:14px;text-align:center}
.why-pullquote{margin:1.2em 0 2.4em;padding:clamp(28px,4vw,44px) clamp(24px,4vw,48px);border-left:4px solid #e5c06e;background:linear-gradient(90deg,rgba(229,192,110,.12),rgba(229,192,110,0));border-radius:0 18px 18px 0}
.why-pullquote p{font-family:var(--display,'Cormorant Garamond',Georgia,serif);font-size:clamp(1.6rem,2.8vw,2.3rem);line-height:1.3;margin:0;color:#f6f1e4}
@media (min-width:1100px){.why-figure{margin-left:-120px;margin-right:-120px}}
@media (max-width:800px){.why-hero{min-height:auto}.why-hero-inner{grid-template-columns:1fr;text-align:center;justify-items:center;padding-top:40px}.why-portrait{width:min(260px,70vw)}.why-signature{margin:10px auto 0}}
.why-figure img{max-height:76vh;width:auto;max-width:100%;margin:0 auto}
/* iPhone: never show Safari's native start-playback glyph over an animated image (autoplay is muted+playsinline). */
.motion-preview-frame video::-webkit-media-controls-start-playback-button,.motion-preview-frame video::-webkit-media-controls,.hub-hero video::-webkit-media-controls-start-playback-button,.why-hero video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none;opacity:0!important}
.motion-preview-frame video::-webkit-media-controls-overlay-play-button{display:none!important}
/* Gallery cards: equal, comfortable action buttons (no tiny or wrapped labels). */
.animation-grid .image-action-tools{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%!important;max-width:none!important;margin-top:12px}
.animation-grid .image-action-tools button{min-height:48px;padding:6px 10px;font-size:.95rem;line-height:1.2;border-radius:12px;white-space:normal}
.animation-grid .image-action-tools .motion-still-toggle{grid-column:1/-1}
.animation-card h2,.animation-card h3{font-size:clamp(1.35rem,1.8vw,1.7rem);line-height:1.2}
@media (max-width:540px){.animation-grid .image-action-tools button{font-size:.9rem;padding:6px 6px}}
/* Smooth reveal as cards enter (no layout shift; disabled for reduced motion). */
@supports (animation-timeline:view()){@media (prefers-reduced-motion:no-preference){.animation-card,.volume-card,.reading-card{animation:cardReveal linear both;animation-timeline:view();animation-range:entry 0% entry 35%}}}
@keyframes cardReveal{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
/* Book cards (library, home): comfortable, readable action buttons. */
.volume-card .image-action-tools{gap:6px;margin-top:10px}
.volume-card .image-action-tools button{min-height:44px;font-size:.88rem;line-height:1.15;padding:6px 6px;border-radius:10px;white-space:normal}
/* 2 Dec 2026: "Text on this page" as plain book text; one key at the top of the Terra Realm page. */
.terra-page-text .terra-page-prose{max-width:68ch;margin:0 auto;font-size:1.08rem;line-height:1.75}
.terra-page-text .terra-page-prose p{margin:0 0 1em}
.terra-page-text .terra-translation{opacity:.85;font-style:italic;margin-top:-.6em!important}
.terra-page-notes{max-width:68ch;margin:.5em auto 0;font-size:.9rem;opacity:.85}
.terra-page-notes summary{cursor:pointer;font-weight:600;min-height:40px;display:flex;align-items:center}
.terra-page-notes dt{font-weight:600;margin-top:.5em}.terra-page-notes dd{margin:0}
.terra-text-key{max-width:68ch;margin:24px auto 40px;padding:20px 24px;border:1px solid rgba(229,192,110,.45);border-radius:14px;font-size:.95rem;line-height:1.55}
.terra-text-key h3{margin:0 0 .6em;font-size:1.15rem}
.terra-text-key dl{display:grid;grid-template-columns:max-content 1fr;gap:.35em 1em;margin:0}
.terra-text-key dt{font-weight:600}.terra-text-key dd{margin:0}
@media(max-width:640px){.terra-text-key dl{grid-template-columns:1fr}.terra-text-key dd{margin-bottom:.4em}}
/* 2 Dec 2026: author page (book page 3) — 18px/17px body, wide three-column sections that fill large screens. */
.author-page .why-hero-copy h1{font-size:clamp(2.4rem,4.6vw,4.4rem)}
.author-hero-line{font-size:1.15rem;margin:.2em 0 1em;color:rgba(246,241,228,.9)}
.author-hero-nav{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 14px}
.author-hero-nav a{min-height:44px;display:inline-flex;align-items:center;padding:0 16px;border:1px solid rgba(229,192,110,.55);border-radius:999px;color:#f6f1e4;text-decoration:none;font-size:.95rem}
.why-prose.author-prose{max-width:none;width:94vw;margin:48px 0 0 calc(50% - 47vw);padding:0;font-size:18px;line-height:1.7}
.author-section{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2.6fr) minmax(220px,1.4fr);gap:clamp(24px,3vw,56px);padding:clamp(36px,4vw,64px) 0;border-top:1px solid rgba(229,192,110,.25);align-items:start}
.author-section h2{margin:0!important;font-size:clamp(1.5rem,2vw,2.1rem)!important;line-height:1.2;position:sticky;top:96px}
.author-text p{margin:0 0 1.1em;max-width:none}
.author-text .why-lead::first-letter{font-size:3.4em}
.author-aside .why-figure{margin:0!important}
.author-aside .why-figure img{max-height:none;width:100%;height:auto}
.author-books{list-style:none;padding:0;margin:1.2em 0 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.author-books a{display:block;height:100%;padding:16px 18px;border:1px solid rgba(229,192,110,.3);border-radius:14px;text-decoration:none;color:inherit;font-size:.95rem;line-height:1.4}
.author-books a:hover{border-color:#e5c06e}
.author-books strong{display:block;font-size:1.05rem;margin-bottom:4px;color:#e5c06e}
@media(max-width:900px){.author-section{grid-template-columns:1fr}.author-section h2{position:static}.why-prose.author-prose{font-size:17px;width:auto;margin-left:0;padding:0 20px}}
/* Library: clean intro and folded readings. */
.library-intro{margin:0 0 28px}.library-intro h2{margin:0 0 .3em;font-size:clamp(1.8rem,3vw,2.6rem)}.library-intro p{font-size:18px;margin:0}
.library-readings-fold{margin:48px 0}.library-readings-fold>summary{cursor:pointer;min-height:56px;display:flex;align-items:center;padding:0 22px;border:1px solid rgba(229,192,110,.4);border-radius:14px;font-size:1.1rem;font-weight:600}
.book-web-page.book-complete-index{padding-top:0}.book-complete-index>.hub-hero{margin-top:0}
.book-complete-index .hub-hero-shade{background:linear-gradient(180deg,rgba(5,12,26,.55) 0%,rgba(5,12,26,.45) 35%,rgba(5,12,26,.8) 65%,rgba(5,12,26,.96) 100%)}
@media(max-width:900px){#about .author-aside{display:none}}
.author-link a{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid rgba(229,192,110,.55);border-radius:999px;text-decoration:none;color:#e5c06e}
/* 2 Dec 2026 (user): author page quote at body-text size, italic; Basel sky print animation in a portrait frame
   matching the video (834x1112) so the whole frame and the ZeusC mark stay visible; the still is contained, not cropped. */
.author-section .why-pullquote{margin:0 0 1.4em;padding:14px 20px;border-radius:0 12px 12px 0}
.author-section .why-pullquote p{font-family:inherit;font-size:1em;line-height:1.7;font-style:italic;color:inherit}
.author-aside .why-motion .motion-preview-frame.why-motion-frame{aspect-ratio:834/1112;background:#0a1630;border-radius:16px;box-shadow:0 30px 70px -30px rgba(0,0,0,.7)}
.author-aside .why-motion .why-motion-frame>img{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;border-radius:0;box-shadow:none}
.author-aside .why-motion .motion-preview-toggle{margin-top:10px}
/* 2 Dec 2026 (user): Terra Realm hero fills the full width with a blurred, darkened copy of the cover, and shows the
   WHOLE cover large in the centre, so the title and signature are always visible (EN+ES). */
body[data-chapter="terra"] .cinematic-reader-head .cinematic-frame .cinematic-background{isolation:isolate;background:#06101f}
body[data-chapter="terra"] .cinematic-reader-head .cinematic-frame:not(.cinematic-large) .cinematic-background{height:clamp(380px,74svh,860px)}
body[data-chapter="terra"] .cinematic-reader-head .cinematic-frame .cinematic-background::before{content:"";position:absolute;inset:-60px;z-index:0;background:url(/assets/terra-cover.png) center/cover no-repeat;filter:blur(34px) brightness(.42) saturate(1.1);pointer-events:none}
body[data-chapter="terra"] .cinematic-reader-head .cinematic-frame .cinematic-background img,
body[data-chapter="terra"] .cinematic-reader-head .cinematic-frame .cinematic-background video{z-index:1;object-fit:contain;object-position:center;padding:clamp(10px,2vw,24px) 0;filter:drop-shadow(0 24px 48px rgba(0,0,0,.6))}
/* 2 Dec 2026: the gallery and library heroes are the user's own 16:9 videos. On phones a full-height cover crop kept only
   ~23% of the width and cut the ZeusC mark on the centre picture; show the middle ~42% across the top instead (content unchanged). */
@media (max-width:800px){
 .hub-hero-gallery .cinematic-background img,.hub-hero-gallery .cinematic-background video,
 .hub-hero-library .cinematic-background img,.hub-hero-library .cinematic-background video{bottom:auto;height:134vw;object-fit:cover;object-position:center}
 .hub-hero-gallery .hub-hero-frame,.hub-hero-library .hub-hero-frame{height:auto;min-height:calc(134vw + 300px)}
}
/* 2 Dec 2026 (user): /signatures/ and /es/firmas/: no empty navy band under the menu (the book-ending spacing and divider
   stay on the book endings only). */
main.signatures-page{margin-top:0!important;padding-top:0!important}
main.signatures-page>.signature-collection{margin-top:0!important;padding-top:clamp(20px,3vw,36px)!important;border-top:0!important}
main.signatures-page>.signature-collection::before{display:none!important}
main.signatures-page>.signature-collection>.eyebrow:first-child{margin-top:0!important}
main.signatures-page{padding-bottom:0!important;margin-bottom:0!important;min-height:0!important}main.signatures-page>.signature-collection{margin-bottom:0!important;padding-bottom:clamp(28px,4vw,48px)!important}
/* 2 Dec 2026: hero slots (/book/2/, /signatures/, the 18 Explore categories). Phones show the middle of the 16:9 frame
   across the top, like the library hero, so a centred picture and its ZeusC are not cropped. Still heroes have no toggle. */
@media (max-width:800px){
 .hub-hero-slot .cinematic-background img,.hub-hero-slot .cinematic-background video{bottom:auto;height:134vw;object-fit:cover;object-position:center}
 .hub-hero-slot .hub-hero-frame{height:auto;min-height:calc(134vw + 300px)}
}
main.explore-with-hero{margin-top:0!important;padding-top:clamp(8px,2vw,24px)!important}
main.signatures-page>#signature-collection{scroll-margin-top:90px}
/* /book/3/#book: the original cover, animated, across the full width of the section. */
#book.author-section .author-aside{grid-column:1/-1}
#book .why-cover-motion{margin:8px 0 0!important}
#book .why-cover-motion .motion-preview-frame{aspect-ratio:16/9;border-radius:16px;background:#06101f;box-shadow:0 30px 70px -30px rgba(0,0,0,.7)}
#book .why-cover-motion .motion-preview-frame>img{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;border-radius:0;box-shadow:none}
/* Phones: slot heroes put the title, line and button below the picture (readable over bright manuscript pages). */
@media (max-width:800px){
 .hub-hero-slot .hub-hero-frame{height:auto!important;min-height:0!important;display:flex;flex-direction:column}
 .hub-hero-slot .cinematic-background{position:relative!important;inset:auto!important;width:100%;height:134vw!important;flex:none}
 .hub-hero-slot .cinematic-background img,.hub-hero-slot .cinematic-background video{position:absolute;inset:0;height:100%!important}
 .hub-hero-slot .hub-hero-shade{background:linear-gradient(180deg,rgba(5,12,26,.35) 0%,rgba(5,12,26,0) 25%,rgba(5,12,26,0) 70%,rgba(5,12,26,.9) calc(134vw - 10px),#050c1a calc(134vw + 1px))}
 .hub-hero-slot .hub-hero-copy{position:relative;padding:20px 22px 84px}
}
/* Desktop: slot heroes move the picture right so the title sits on a dark left side (nothing is cropped off the picture). */
@media (min-width:801px){
 .hub-hero-slot .cinematic-background{background:#050c1a}
 .hub-hero-slot .cinematic-background img,.hub-hero-slot .cinematic-background video{transform:translateX(21%);object-fit:contain}
 .hub-hero-slot .hub-hero-shade{background:linear-gradient(90deg,rgba(5,12,26,.97) 0%,rgba(5,12,26,.9) 30%,rgba(5,12,26,.25) 52%,rgba(5,12,26,0) 65%),linear-gradient(180deg,rgba(5,12,26,.35) 0%,rgba(5,12,26,0) 25%,rgba(5,12,26,0) 75%,rgba(5,12,26,.55) 100%)}
 .hub-hero-slot .hub-hero-copy{max-width:min(560px,46vw)}
}
@media (min-width:801px){.hub-hero-slot .hub-hero-toggle{right:auto;left:clamp(22px,6vw,104px);bottom:clamp(14px,3vw,24px)}.hub-hero-slot .hub-hero-copy{padding-bottom:clamp(80px,12vh,120px)}}
/* 2 Dec 2026 (user): /explore/ category list text was faint grey. Brighter, larger counts and clearer cards,
   in dark and light mode (EN+ES). */
.explore-hub a{border-color:#4a6187;background:rgba(15,36,66,.45);font-size:1.08rem;font-weight:600;color:#f4f0e6}
.explore-hub a:hover,.explore-hub a:focus-visible{border-color:#e6c37e}
.explore-hub a span,.explore-terms summary span,.explore-terms details small{color:#dbe4f0;font-size:1rem;font-weight:400}
.explore-cats a,.explore-letters a{border-color:#4a6187;color:#eef2f8}
.explore-page>p,.explore-page .eyebrow a{color:#e3e9f2}
[data-theme=light] .explore-hub a{background:#fff;border-color:#b9ad95;color:#14233a}
[data-theme=light] .explore-hub a span,[data-theme=light] .explore-terms summary span,[data-theme=light] .explore-terms details small{color:#33445c}
[data-theme=light] .explore-cats a,[data-theme=light] .explore-letters a{border-color:#b9ad95;color:#14233a}
[data-theme=light] .explore-page>p,[data-theme=light] .explore-page .eyebrow a{color:#22324a}
/* 2 Dec 2026 (Job 4): "Listen to this page" player at the top of long pages, and the paragraph being read. */
.page-listen{max-width:900px;margin:18px auto 28px;padding:18px 20px;border:1px solid rgba(229,192,110,.45);border-radius:14px;background:rgba(10,26,52,.75);color:#f4f0e6}
.page-listen .pl-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 16px;margin-bottom:12px}
.page-listen .pl-title{font-family:var(--display,'Cormorant Garamond',Georgia,serif);font-size:1.45rem;font-weight:600;color:#fff}
.page-listen .pl-total{color:#e6c37e;font-size:1.02rem}
.page-listen .pl-buttons,.page-listen .pl-controls{display:flex;flex-wrap:wrap;gap:8px}
.page-listen button{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid rgba(246,241,228,.45);background:transparent;color:#f4f0e6;font:inherit;font-size:.98rem;cursor:pointer}
.page-listen .pl-main,.page-listen button[aria-pressed=true]{background:#e6c37e;color:#0b1a33;border-color:#e6c37e;font-weight:600}
.page-listen .pl-controls{margin-top:10px}
.page-listen .pl-link{min-height:36px;padding:0 4px;border:0;text-decoration:underline;color:#e6c37e}
.page-listen .pl-resume,.page-listen .pl-status{margin:10px 0 0;font-size:.98rem;color:#dbe4f0}
.page-listen .pl-status:empty{display:none}
.page-listen .pl-settings{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:12px;font-size:.92rem;color:#dbe4f0}
.page-listen select{min-height:40px;max-width:100%;margin-left:6px;border-radius:8px;border:1px solid #4a6187;background:#0f2442;color:#f4f0e6;font:inherit}
.pl-current{background:rgba(230,195,126,.16);box-shadow:-8px 0 0 #e6c37e;border-radius:4px;transition:background .3s}
@media (max-width:640px){.page-listen{margin:14px 12px 22px;padding:16px}.page-listen .pl-buttons button{flex:1 1 30%}.page-listen .pl-settings label{display:flex;flex-direction:column;gap:4px;width:100%}.page-listen select{margin-left:0;width:100%}}
[data-theme=light] .page-listen{background:#fff;border-color:#b9ad95;color:#14233a}
[data-theme=light] .page-listen .pl-title{color:#14233a}[data-theme=light] .page-listen .pl-total,[data-theme=light] .page-listen .pl-link{color:#8a5a00}
[data-theme=light] .page-listen button{color:#14233a;border-color:#8094b0}[data-theme=light] .page-listen .pl-main,[data-theme=light] .page-listen button[aria-pressed=true]{background:#14233a;color:#fff;border-color:#14233a}
[data-theme=light] .page-listen .pl-resume,[data-theme=light] .page-listen .pl-status,[data-theme=light] .page-listen .pl-settings{color:#33445c}
[data-theme=light] .page-listen select{background:#fff;color:#14233a;border-color:#b9ad95}
[data-theme=light] .pl-current{background:rgba(230,195,126,.3);box-shadow:-8px 0 0 #b07d1a}
.pl-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;max-width:min(760px,calc(100vw - 24px));padding:10px 14px;border-radius:14px;border:1px solid rgba(229,192,110,.55);background:rgba(8,20,40,.96);color:#f4f0e6;box-shadow:0 12px 40px -12px rgba(0,0,0,.7)}
.pl-bar[hidden]{display:none}
.pl-bar .pl-bar-status{margin:0;flex:1 1 220px;font-size:.92rem;color:#dbe4f0}
.pl-bar .pl-controls{display:flex;gap:8px}
.pl-bar button{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid rgba(246,241,228,.45);background:transparent;color:#f4f0e6;font:inherit;cursor:pointer}
.pl-bar [data-pl-pause]{background:#e6c37e;color:#0b1a33;border-color:#e6c37e;font-weight:600}
[data-theme=light] .pl-bar{background:#fff;color:#14233a;border-color:#b9ad95}[data-theme=light] .pl-bar .pl-bar-status{color:#33445c}[data-theme=light] .pl-bar button{color:#14233a;border-color:#8094b0}[data-theme=light] .pl-bar [data-pl-pause]{background:#14233a;color:#fff;border-color:#14233a}
@media (max-width:640px){
 .pl-bar{left:10px;right:10px;transform:none;max-width:none;padding:8px 10px;gap:6px 10px;flex-wrap:nowrap}
 .pl-bar .pl-bar-status{flex:1 1 auto;min-width:0;font-size:.8rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .pl-bar button{min-height:40px;padding:0 12px;font-size:.9rem}
}
/* /book/3/#book: the title must not slide over the full-width cover below it. */
#book.author-section h2{position:static!important}
/* Job 5: floating calculator (public/page-calculator.js). */
.pc-fab{position:fixed;right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:55;min-height:48px;padding:0 18px;border-radius:999px;border:1px solid rgba(229,192,110,.7);background:#0b1a33;color:#f4f0e6;font:600 1rem/1 var(--sans,system-ui);cursor:pointer;box-shadow:0 8px 28px -8px rgba(0,0,0,.65)}
.pc-fab:focus-visible{outline:3px solid #e6c37e;outline-offset:2px}
body:has(.pl-bar:not([hidden])) .pc-fab{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
.pc-dialog{width:min(440px,calc(100vw - 24px));max-height:min(86vh,720px);padding:0;border:1px solid rgba(229,192,110,.6);border-radius:16px;background:#0b1a33;color:#f4f0e6;box-shadow:0 20px 60px -10px rgba(0,0,0,.8);margin:auto 14px 14px auto;overflow:auto}
.pc-dialog::backdrop{background:rgba(0,0,0,.45)}
.pc-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;position:sticky;top:0;background:#0b1a33;border-bottom:1px solid rgba(246,241,228,.2)}
.pc-head h2{margin:0;font:600 1.3rem/1.2 var(--serif,serif)}
.pc-close{width:44px;height:44px;border-radius:50%;border:1px solid rgba(246,241,228,.5);background:transparent;color:inherit;font-size:1.6rem;line-height:1;cursor:pointer}
.pc-note{margin:10px 16px 0;font-size:.85rem;color:#dbe4f0}
.pc-body{padding:4px 16px 16px}
.pc-body .unit-converter{border:0;color:inherit}
.pc-body label{display:block;margin:10px 0}
.pc-body select,.pc-body input{width:100%;min-height:44px;box-sizing:border-box}
.pc-body output{display:block;margin:12px 0;font-weight:600}
[data-theme=light] .pc-fab,[data-theme=light] .pc-dialog,[data-theme=light] .pc-head{background:#fff;color:#14233a}
[data-theme=light] .pc-fab{border-color:#8094b0}[data-theme=light] .pc-note{color:#33445c}[data-theme=light] .pc-close{border-color:#8094b0}
@media (max-width:640px){.pc-dialog{width:100vw;max-width:none;margin:auto 0 0;border-radius:16px 16px 0 0;max-height:82vh}}
.pc-dialog{position:fixed;inset:auto 14px 14px auto;margin:0}
.pc-body .unit-converter{padding:0!important;background:none!important}
.pc-body .calculator-fields{display:grid;gap:8px!important;margin:6px 0!important}
.pc-body label{margin:0!important;font-size:.9rem}
.pc-body summary{padding:8px 0!important;min-height:0!important}
.pc-body p{margin:8px 0!important;font-size:.8rem}
@media (max-width:640px){.pc-dialog{inset:auto 0 0 0;width:100vw;max-height:80vh}.pc-body .calculator-fields{grid-template-columns:1fr 1fr}.pc-body .calculator-fields label:first-child{grid-column:1/-1}}
/* Explore thumbnails (public/explore-thumbs.js) */
.explore-terms .ex-line{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}
.ex-thumb{flex:0 0 48px;width:48px;height:48px;border-radius:6px;overflow:hidden;background:#0b1a33;border:1px solid #2a3d5c;display:inline-flex;-webkit-touch-callout:none;user-select:none}
.ex-thumb img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.ex-line a{flex:1 1 180px;min-width:0}
.ex-preview{position:fixed;z-index:80;background:#0b1a33;border:1px solid rgba(229,192,110,.7);border-radius:10px;padding:6px;box-shadow:0 18px 50px -10px rgba(0,0,0,.8);pointer-events:none}
.ex-preview[hidden]{display:none}
.ex-preview img{display:block;width:100%;max-height:60vh;object-fit:contain;border-radius:6px}
[data-theme=light] .ex-thumb,[data-theme=light] .ex-preview{background:#fff;border-color:#b9ad95}
/* Explore: sentence under each link, and the highlight on the destination page (public/explore-jump.js) */
.ex-line .ex-text{flex:1 1 200px;min-width:0}
.ex-line .ex-text a{flex:none}
.ex-sentence{margin:4px 0 0;font-size:.86rem;line-height:1.5;color:#c4d0e2}
[data-theme=light] .ex-sentence{color:#33445c}
::highlight(ex-sentence){background-color:rgba(229,192,110,.28)}
::highlight(ex-word){background-color:#e6c37e;color:#0b1a33}
mark.ex-mark{background:#e6c37e;color:#0b1a33}
/* Explore preview video (2 Dec 2026): the image is the poster; the video covers it once it is really playing. */
.ex-preview{position:fixed}.ex-preview video{display:none;width:100%;max-height:60vh;object-fit:contain;border-radius:6px;background:#0b1a33}
.ex-preview.is-playing video{display:block;position:absolute;left:6px;top:6px;width:calc(100% - 12px);height:calc(100% - 12px)}
/* Job 6 phase 1: tailored calculators in the pop-up (2 Dec 2026) */
.pc-tabs{display:flex;gap:6px;padding:8px 16px 0;border-bottom:1px solid rgba(246,241,228,.2)}
.pc-tabs button{flex:1;min-height:44px;border:1px solid rgba(246,241,228,.35);border-bottom:0;border-radius:10px 10px 0 0;background:transparent;color:inherit;font:600 .85rem/1.2 inherit;cursor:pointer;padding:6px 8px}
.pc-tabs button[aria-selected=true]{background:rgba(229,192,110,.18);border-color:rgba(229,192,110,.7)}
.pc-tabs button:focus-visible,.ct-btn:focus-visible{outline:3px solid #e6c37e;outline-offset:2px}
.pc-tailored{padding:8px 16px 16px;font-size:.9rem}
.pc-tailored[hidden],.pc-body[hidden]{display:none}
.ct-field{display:block;margin:8px 0}.ct-lab{display:block;margin-bottom:3px;font-size:.85rem}
.pc-tailored select,.pc-tailored input[type=text]{width:100%;min-height:44px;box-sizing:border-box;font-size:1rem}
.ct-row{margin:10px 0}.ct-row>label{display:block;font-size:.85rem;margin-bottom:3px}
.ct-in{display:flex;align-items:center;gap:8px}.ct-in input{flex:1;min-width:0}.ct-unit{flex:0 0 auto;min-width:3.2em;font-weight:600;font-size:.85rem;color:#e6c37e}
.ct-slider{width:100%;min-height:32px;margin:4px 0 0;accent-color:#e5c06e}
.ct-hint{margin:6px 0;font-size:.8rem;opacity:.9}.ct-hint:empty{display:none}
.ct-sources{margin:10px 0;padding:8px 10px;border:1px solid rgba(246,241,228,.25);border-radius:10px;font-size:.8rem}.ct-sources ul{margin:6px 0 0;padding-left:18px}.ct-sources li{margin:6px 0}.ct-sources q{display:block;font-style:italic}.ct-sources a{color:#e6c37e}.ct-src-h{margin:0;font-weight:600}
.ct-result{margin:10px 0;padding:10px 12px;border-radius:10px;background:rgba(229,192,110,.12);border:1px solid rgba(229,192,110,.5)}
.ct-res{margin:0 0 6px;font-size:1rem}.ct-result dl{margin:0;display:grid;grid-template-columns:1fr;gap:2px}.ct-result dt{font-size:.8rem;opacity:.9;margin-top:6px}.ct-result dd{margin:0;font-size:1.05rem}.ct-result dd.strong{font-weight:700;font-size:1.2rem}
.ct-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ct-col h4{margin:0 0 4px;font-size:.85rem;border-bottom:1px solid rgba(246,241,228,.3)}
.ct-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.ct-btn{min-height:44px;padding:0 14px;border-radius:10px;border:1px solid rgba(229,192,110,.7);background:transparent;color:inherit;cursor:pointer;font:600 .85rem/1 inherit}.ct-btn:disabled{opacity:.5;cursor:default}.ct-msg{font-size:.8rem}
.ct-note{margin:10px 0 0;font-size:.8rem;opacity:.95}.ct-na{padding:10px;border:1px dashed rgba(246,241,228,.5);border-radius:10px}
.ct-food{margin:10px 0;padding:8px 10px;border:1px solid rgba(246,241,228,.25);border-radius:10px}.ct-food legend{padding:0 6px;font-size:.85rem}.ct-food a{color:#e6c37e}
[data-theme=light] .pc-tabs button[aria-selected=true]{background:#efe3c4}[data-theme=light] .ct-unit,[data-theme=light] .ct-sources a,[data-theme=light] .ct-food a{color:#7a5410}[data-theme=light] .ct-result{background:#fbf4de}
@media (max-width:640px){.pc-tailored{padding:8px 14px 18px}.ct-two{grid-template-columns:1fr}}
@media print{body.ct-printing>*:not(.pc-dialog){display:none!important}body.ct-printing .pc-dialog{position:static!important;max-height:none!important;box-shadow:none;border:0;color:#000;background:#fff;width:auto}body.ct-printing .pc-head,body.ct-printing .pc-tabs,body.ct-printing .ct-tools,body.ct-printing .ct-slider,body.ct-printing .pc-body{display:none!important}body.ct-printing .ct-result,body.ct-printing .ct-sources{color:#000;background:#fff;border-color:#000}}
/* Job 6 phase 1 layout fix: header and tabs stay pinned, only the panel scrolls */
.pc-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.pc-head,.pc-tabs,.pc-note{flex:0 0 auto}.pc-head{position:relative;z-index:2}
.pc-body,.pc-tailored{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.pc-body[hidden],.pc-tailored[hidden],.pc-note[hidden]{display:none!important}
.pc-tailored .ct-result{position:sticky;bottom:0;z-index:1;max-height:42%;overflow-y:auto;background:#10294a;box-shadow:0 -8px 14px -8px rgba(0,0,0,.6)}
[data-theme=light] .pc-tailored .ct-result{background:#fbf4de}
.pc-tailored .ct-result dl{grid-template-columns:1fr auto;column-gap:10px;align-items:baseline}
.pc-tailored .ct-result dt{margin-top:0;font-size:.78rem}.pc-tailored .ct-result dd{text-align:right;font-size:.95rem}.pc-tailored .ct-result dd.strong{font-size:1.05rem}
.pc-tailored .ct-res{font-size:.9rem;margin-bottom:4px}.pc-tailored .ct-result{padding:8px 10px}
@media (max-width:640px){.pc-tailored .ct-result{max-height:34%}.pc-tabs button{font-size:.8rem}}

/* ===== 2 Dec 2026 (Jobs D and E): live author portrait and animated book-card thumbnails on /book/3/ ===== */
.portrait-live{display:block;width:100%;margin:0;max-width:none}
.portrait-live .motion-preview-frame{position:relative;aspect-ratio:1/1;height:auto!important;width:100%;background:transparent!important;overflow:visible;border-radius:0;box-shadow:none}
.portrait-live .motion-preview-frame>img{display:block;position:static!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain;border-radius:50%;filter:none}
.portrait-live .motion-preview-frame>video{position:absolute!important;left:13%!important;top:7.4%!important;right:auto!important;bottom:auto!important;width:74%!important;height:74%!important;transform:none;object-fit:cover!important;border-radius:0;z-index:2;
 -webkit-mask-image:radial-gradient(ellipse 40.5% 51.7% at 50% 50.5%,#000 95%,transparent 100%);mask-image:radial-gradient(ellipse 40.5% 51.7% at 50% 50.5%,#000 95%,transparent 100%);pointer-events:none}
/* while the video plays, a navy oval hides the engraved face underneath (same place and size as the video person), so only ONE gold frame shows: the engraved ring, laurels and plinth */
.portrait-live .motion-preview-frame::before{content:"";display:none;position:absolute;left:20%;top:6.2%;width:60%;height:77%;border-radius:50%;background:#0c1a35;z-index:1}
.portrait-live.is-playing .motion-preview-frame::before{display:block}
.portrait-live.why-portrait{width:100%;height:auto;border-radius:0;opacity:0;transform:scale(.96);animation:whyIn 1.1s .1s cubic-bezier(.2,.7,.2,1) forwards;filter:drop-shadow(0 30px 60px rgba(0,0,0,.6))}
@media (max-width:800px){.portrait-live.why-portrait{width:min(260px,70vw)}}
@media (prefers-reduced-motion:reduce){.portrait-live.why-portrait{animation:none;opacity:1;transform:none}}
.why-portrait-motion .portrait-live{max-width:420px;margin-inline:auto}
.portrait-live .motion-preview-toggle{margin-top:8px}
.why-hero .portrait-live .motion-preview-toggle{display:flex;margin-inline:auto}
/* book cards: animated thumbnail on the left */
.author-books{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.author-books a{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:center;padding:14px 16px}
.ab-thumb{position:relative;display:block;width:112px;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#0a1630;box-shadow:0 8px 22px -10px rgba(0,0,0,.6)}
.ab-thumb>img,.ab-thumb>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.ab-thumb>video{opacity:0;transition:opacity .35s}
.ab-thumb.is-playing>video{opacity:1}
.ab-copy{display:block;min-width:0}
.ab-copy strong{display:block}
@media (max-width:520px){.author-books{grid-template-columns:1fr}.author-books a{grid-template-columns:96px minmax(0,1fr);gap:14px}.ab-thumb{width:96px}}
@media (prefers-reduced-motion:reduce){.ab-thumb>video{display:none}}
.portrait-live.is-playing .motion-preview-frame>img,.portrait-live .motion-preview-frame>img{opacity:1!important}

/* ===== 2 Dec 2026: chapters page, Next/Previous cards with thumbnails, continuous reading, end buttons, 404 contrast ===== */
.chapters-hero{position:relative;min-height:min(46vh,380px);display:grid;align-items:end;overflow:hidden;background:#0a1630;color:#f4efe2}
.chapters-hero video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
.chapters-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,14,32,.1),rgba(6,14,32,.88))}
.chapters-hero-copy{position:relative;z-index:1;padding:48px max(5vw,20px) 34px;max-width:900px}
.chapters-hero-copy .eyebrow{color:#e5c06e}.chapters-hero-copy h1{font:600 clamp(2.4rem,6vw,4.4rem)/1.05 var(--serif);margin:.1em 0 .25em;color:#fff}.chapters-hero-copy p:last-child{font-size:1.05rem;color:#e8e2d2;max-width:60ch}
.chapters-list{padding-block:36px 70px}
.chapters-group{margin:0 0 34px}.chapters-group>h2{font:600 1.5rem/1.2 var(--serif);margin:0 0 14px;color:var(--ink)}
.chapters-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}
.chapter-card-row{display:grid;grid-template-columns:128px minmax(0,1fr);gap:16px;align-items:start;height:100%;padding:12px;border:1px solid var(--edge,rgba(229,192,110,.3));border-radius:14px;background:var(--surface,#0e1f3d);color:var(--ink);text-decoration:none}
.chapter-card-row:hover,.chapter-card-row:focus-visible{border-color:#e5c06e;background:var(--surface-2,#132a52)}
.chapter-thumb{width:128px;height:96px;object-fit:cover;border-radius:9px;background:#0a1630}
.chapter-card-copy{display:grid;gap:4px;min-width:0}.chapter-card-copy strong{font:600 1.1rem/1.25 var(--serif);color:var(--ink)}
.chapter-card-num{font:700 .72rem/1 var(--sans);letter-spacing:.12em;color:#e5c06e}.chapter-card-sum{font-size:.88rem;line-height:1.45;color:var(--soft)}.chapter-card-min{font-size:.78rem;color:var(--soft)}
@media(max-width:520px){.chapters-cards{grid-template-columns:1fr}.chapter-card-row{grid-template-columns:96px minmax(0,1fr)}.chapter-thumb{width:96px;height:72px}}
/* Next / Previous cards */
.chapter-end-nav>a.next-chapter,.chapter-end-nav>a.previous-chapter{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:14px;align-items:center}
.chapter-end-nav>a.previous-chapter{grid-template-columns:72px minmax(0,1fr)}
.cn-thumb{width:72px;height:54px;object-fit:cover;border-radius:8px;background:#0a1630}.cn-copy{display:grid;gap:2px;min-width:0}.cn-copy>span{font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;opacity:.8}.cn-copy>strong{font-weight:600}
/* end buttons: Subject index / A-Z library / Feeling lucky */
.end-destinations{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;grid-column:1/-1}
.end-destinations a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid #e5c06e;border-radius:999px;background:transparent;color:var(--ink,#f4efe2);font:600 .9rem/1.1 var(--sans);text-decoration:none}
.end-destinations a:hover,.end-destinations a:focus-visible{background:#e5c06e;color:#0b214e}
.end-destinations a.lucky-link{background:#e5c06e;color:#0b214e}.end-destinations a.lucky-link:hover{background:transparent;color:var(--ink,#f4efe2)}
.end-destinations svg{width:1em;height:1em}
/* continuous reading */
[data-continuous][aria-pressed="true"]{background:#e5c06e;color:#0b214e;border-color:#e5c06e}
.flow-chapter{border-top:1px solid var(--edge,rgba(229,192,110,.3));margin-top:46px;padding-top:30px}.flow-head{padding-bottom:12px}.flow-head h2{font:600 clamp(1.8rem,4vw,2.8rem)/1.1 var(--serif);margin:.1em 0}
.flow-status{text-align:center;padding:12px;color:var(--soft)}
/* 404 and simple pages: readable text in both themes */
.simple-page .eyebrow{color:var(--eyebrow-ink,#e5c06e)}.simple-page>p:not(.eyebrow){color:var(--ink);opacity:1}
html[data-theme="light"] .simple-page .eyebrow,body.light .simple-page .eyebrow{color:#7a5a12}
html[data-theme="light"] .simple-page>p:not(.eyebrow),body.light .simple-page>p:not(.eyebrow){color:#19334a}
@media(max-width:900px){#about .author-aside{display:block!important;margin-top:20px}}
/* Chapters page, 2 Dec 2026: one even grid, cards in the gallery / library style (serif titles, gold accents) */
.chapters-list{padding-block:44px 80px}.chapters-intro{max-width:760px;margin:0 0 28px;color:var(--soft,#b9c3d6);font-size:1rem;line-height:1.6}
.chapters-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}
.chapters-grid>li{display:flex;min-width:0}
.chapter-tile{display:flex;flex-direction:column;width:100%;overflow:hidden;border:1px solid var(--edge,rgba(229,192,110,.28));border-radius:16px;background:var(--surface,#0e1f3d);color:var(--ink,#f4efe2);text-decoration:none;transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease}
.tile-media{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;border-radius:14px 14px 0 0;background:#0a1630}
.tile-media img,.tile-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.tile-media video{opacity:0;transition:opacity .3s ease,transform .5s ease}.chapter-tile.is-playing .tile-media video{opacity:1}
.tile-copy{display:flex;flex-direction:column;gap:8px;flex:1;padding:18px 20px 20px}
.tile-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font:700 .72rem/1.3 var(--sans);letter-spacing:.13em;text-transform:uppercase;color:#e5c06e}.tile-meta b{font-weight:700}.tile-meta span{color:var(--soft,#b9c3d6);font-weight:600}
.tile-title{font:600 1.5rem/1.15 var(--serif);color:var(--ink,#f4efe2);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tile-sum{font-size:.93rem;line-height:1.5;color:var(--soft,#b9c3d6);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tile-min{margin-top:auto;padding-top:6px;font-size:.8rem;color:var(--soft,#b9c3d6)}
.chapter-tile:focus-visible{outline:2px solid #e5c06e;outline-offset:3px}
@media(hover:hover) and (pointer:fine){.chapter-tile:hover,.chapter-tile:focus-visible{transform:translateY(-5px);border-color:#e5c06e;box-shadow:0 14px 34px rgba(0,0,0,.35)}.chapter-tile:hover .tile-media img,.chapter-tile:focus-visible .tile-media img,.chapter-tile:hover .tile-media video,.chapter-tile:focus-visible .tile-media video{transform:scale(1.06)}}
@media(prefers-reduced-motion:reduce){.chapter-tile,.tile-media img,.tile-media video{transition:none}.chapter-tile:hover,.chapter-tile:focus-visible{transform:none}.chapter-tile:hover .tile-media img{transform:none}}
@media(max-width:1000px){.chapters-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}}
@media(max-width:620px){.chapters-grid{grid-template-columns:1fr;gap:18px}.tile-title{font-size:1.35rem}.chapters-list{padding-block:30px 60px}}
.hub-hero-chapters .hub-hero-shade{background:linear-gradient(90deg,rgba(6,14,32,.82) 0%,rgba(6,14,32,.55) 45%,rgba(6,14,32,.12) 100%),linear-gradient(0deg,rgba(6,14,32,.6),rgba(6,14,32,0) 40%)}
@media(max-width:800px){.hub-hero-chapters .hub-hero-shade{background:linear-gradient(0deg,rgba(6,14,32,.85),rgba(6,14,32,.1) 70%)}}
/* top bar: Chapters only where it fits on one line (1440px and wider); at laptop and tablet widths it stays in the side menu */
@media(max-width:1439px){.site-header nav a.nav-chapters{display:none}}
/* 2 Dec 2026: framed covers for white diagrams, sort controls */
.tile-media.is-framed{background:radial-gradient(120% 120% at 50% 0%,#16305c 0%,#081530 70%);box-shadow:inset 0 0 0 1px rgba(229,192,110,.22)}
.tile-media.is-framed img,.tile-media.is-framed video{inset:12px;width:calc(100% - 24px);height:calc(100% - 24px);object-fit:contain;border-radius:6px;box-shadow:0 0 0 1px rgba(229,192,110,.45),0 10px 24px rgba(0,0,0,.5)}
.tile-media.is-framed img{filter:brightness(.86) contrast(1.04)}
.sort-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:0 0 22px}.sort-bar p{margin:0;color:var(--soft,#b9c3d6);font-size:.9rem}
.sort-bar label,.sort-select{display:inline-flex;align-items:center;gap:10px;font:600 .9rem/1.2 var(--sans);color:var(--ink,#f4efe2)}
.sort-bar select,.sort-select select{min-height:44px;padding:8px 38px 8px 14px;border:1px solid rgba(229,192,110,.5);border-radius:999px;background:var(--surface,#0e1f3d);color:var(--ink,#f4efe2);font:600 .9rem var(--sans);cursor:pointer}
.sort-bar select:focus-visible,.sort-select select:focus-visible{outline:2px solid #e5c06e;outline-offset:2px}
.gallery-search{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 20px}.gallery-search .sort-select{margin-left:auto}.gallery-search .loved-note{flex-basis:100%;margin:0;color:var(--soft,#b9c3d6);font-size:.9rem}
.gallery-search [data-gallery-count]{margin:0}
@media(max-width:620px){.gallery-search .sort-select{margin-left:0}}
/* Spanish top bar (3 Dec 2026): "Por qué escribo" lives in the side menu at laptop widths so the bar never spills past the screen edge. English keeps every link. */
@media(min-width:1101px) and (max-width:1279px){html[lang|=es] .site-header nav a.nav-why{display:none}}
