/* v33: navigation stays in the document flow; reading controls are opt-in. */
:root{--reading-size:18px;--appbar-h:0px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:20px}
.masthead,.page-head{position:relative;top:auto;z-index:5}
.menu-toggle{display:none;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid rgba(217,185,108,.4);border-radius:8px;background:rgba(1,17,12,.25);color:#e4d1a3;font:400 14px/1.3 var(--sans)}
.menu-bars{font:400 20px/1 var(--sans)}
.reader-masthead .menu-toggle{display:flex;background:#fbf3dc;border-color:rgba(123,95,46,.35);color:#705a31}
.masthead.reader-masthead{grid-template-columns:minmax(0,1fr) auto;min-height:78px;padding-block:12px}
.reader-masthead .mast-actions{grid-column:2}
.reader-masthead .desktop-nav.ornamental-nav{display:none!important;grid-column:1/-1;grid-row:2;max-width:820px}
.reader-masthead.nav-open .desktop-nav.ornamental-nav{display:grid!important}
.reader-masthead .ornamental-nav .desktop-nav-item{flex-direction:row;height:auto;min-height:56px;gap:8px}
.reader-masthead .ornamental-nav .desktop-nav-item img{width:38px;height:38px}
.reader-masthead .ornamental-nav .desktop-nav-item span{font-size:15px}
.lang-trigger,.round-action{min-height:44px}
.round-action{width:44px;height:44px}
.detail-visual{top:20px;max-height:none;overflow:visible}
@media(min-width:960px){.specimen-main{height:clamp(320px,calc(100dvh - 300px),640px)}}
.detail-paper{max-width:1040px;margin-inline:auto}
.detail-heading h1{font-size:clamp(38px,3.8vw,62px);line-height:1.12;overflow-wrap:anywhere}
.latin{font-size:18px;line-height:1.55;margin:10px 0 18px}
.restored-book .lead,.restored-book .keeper-voice p{font-size:var(--reading-size);line-height:1.65}
.restored-book .grimoire-opening{font-size:var(--reading-size)!important;line-height:1.7!important}
.restored-book :is(.folio-section p,.folio-section li,.pantheon-card p,.pairing-list p){font-size:var(--reading-size);line-height:1.7}
.restored-book :is(.chapter-copy>p,.chapter-copy>ul,.chapter-copy dd,.use-copy p,.closure-columns p,.force-script p,.craft-safety li,.archaic-rite-body,.archaic-rite-goal){font-size:var(--reading-size)!important;line-height:1.7!important}
.restored-book :is(.folio-section h2,.pantheon-head h2,.grimoire-heading h2){font-size:clamp(25px,2.2vw,32px);line-height:1.25}
.restored-book :is(.use-copy h3,.archaic-rite-card h4){font-size:24px;line-height:1.3}
.restored-book .correspondence strong,.restored-book .pantheon-meta-row strong{font-size:calc(var(--reading-size) + 1px);line-height:1.55}
.reader-toolbar{position:static;flex-wrap:wrap;gap:10px;padding-bottom:16px;margin-bottom:20px}
.reader-toolbar button,.species-control select{min-width:44px;min-height:44px;height:44px}
.species-control select{font-size:16px}
.reader-back,.species-arrows,.reader-type{align-self:flex-end}
.reader-type{display:flex;align-items:center;gap:3px;flex:none}
.reader-type button{min-width:44px;padding:7px;font:500 16px/1.3 var(--sans)}
.reader-type output{min-width:24px;text-align:center;color:#756441;font:400 12px/1.4 var(--sans)}
.reader-back span{display:inline}
.reader-toolbar .species-control{max-width:280px}
/* The contents expand the page instead of covering it. */
.chapter-contents{position:static;min-width:0;margin:24px 0;border:1px solid rgba(116,88,42,.28);border-radius:9px;background:rgba(255,249,226,.35)}
.chapter-contents summary{display:flex;align-items:center;gap:10px;min-height:50px;padding:12px 16px;color:#594a2f;cursor:pointer;list-style:none;font:400 15px/1.5 var(--sans);touch-action:manipulation}
.chapter-contents summary::-webkit-details-marker{display:none}
.chapter-contents summary>.glyph{width:20px;height:20px;flex:none}
.chapter-contents summary>.glyph:last-child{margin-left:auto;transition:transform .15s ease}
.chapter-contents[open] summary>.glyph:last-child{transform:rotate(90deg)}
.chapter-contents summary:focus-visible{outline:2px solid #285641;outline-offset:3px}
.chapter-contents nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:0 12px 12px}
.chapter-contents nav button{display:flex;align-items:center;gap:10px;min-width:0;min-height:44px;padding:10px;border:1px solid transparent;border-radius:6px;background:rgba(255,250,231,.45);color:#594a2f;text-align:left;font:400 14px/1.45 var(--sans)}
.chapter-contents nav button span{font-size:11px;color:#8b784e;flex:none}
.chapter-contents nav button b{font-weight:400;overflow-wrap:anywhere}
.chapter-contents nav button:hover,.chapter-contents nav button[aria-current]{border-color:rgba(116,88,42,.3);background:rgba(159,141,80,.13)}
.reading-position{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 16px 14px;border-top:1px solid rgba(116,88,42,.15);color:#7b6c4b;font:400 12px/1.4 var(--sans)}
.reading-track{grid-column:1/-1;height:3px;overflow:hidden;background:rgba(116,88,42,.15);border-radius:3px}
.reading-track i{display:block;width:0;height:100%;background:#788452}
.reader-return{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
.reader-return button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:46px;padding:10px;border:1px solid rgba(116,88,42,.25);border-radius:7px;background:rgba(255,248,224,.45);color:#594a2f;font:400 14px/1.5 var(--sans)}
.reader-return .glyph{width:18px;height:18px}
.folio-jump{position:static;top:auto}
.detail-paper [id],.restored-book :is(#plant-overview,#plant-botany,#plant-pantheon,#plant-essence,#ritual-practice,#plant-safety,#plant-liminal,#plant-bonds,#plant-closure,#plant-accords){scroll-margin-top:20px}
.restored-book [tabindex="-1"]:focus{outline:none}
.result-card{scroll-margin-top:20px}
@media(max-width:1099px){
 .reader-toolbar .reader-back{margin-right:0}
 .reader-toolbar .species-control{max-width:none}
 .reader-toolbar .reader-type{margin-left:auto}
}
@media(max-width:959px){
 .masthead,.page-head{grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;min-height:72px;padding:12px max(14px,env(safe-area-inset-left)) 12px max(14px,env(safe-area-inset-right))}
 .mast-actions{grid-column:2;gap:7px;padding:0}
 .brand,.page-identity{padding:0}
 .menu-toggle{display:flex}
 .desktop-nav.ornamental-nav{display:none!important;grid-column:1/-1;grid-row:2;width:100%;margin:0;max-width:none}
 .nav-open .desktop-nav.ornamental-nav{display:grid!important}
 .ornamental-nav .desktop-nav-item,.reader-masthead .ornamental-nav .desktop-nav-item{flex-direction:column;gap:2px;min-height:62px;height:auto;padding:5px 2px}
 .ornamental-nav .desktop-nav-item img,.reader-masthead .ornamental-nav .desktop-nav-item img{width:34px;height:34px}
 .ornamental-nav .desktop-nav-item span,.reader-masthead .ornamental-nav .desktop-nav-item span{font-size:12px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
 .detail-visual{top:auto}
 .detail-visual .detail-stage,.detail-visual .specimen-atlas{width:100%;min-width:0;margin-inline:0;justify-self:stretch}
 .detail-visual .specimen-main{width:100%}
}
@media(max-width:699px){
 :root{--reading-size:16px;--page-pad:16px}
 .masthead,.page-head,.masthead.reader-masthead{min-height:68px;padding-top:calc(10px + var(--safe-t));padding-bottom:10px}
 .brand-copy strong,.page-identity h1{font-size:21px;line-height:1.2}
 .brand-copy small,.page-identity p{font-size:7px;line-height:1.5}
 .masthead .seal,.page-emblem{width:30px;height:30px}
 .brand,.page-identity{gap:7px}
 .lang-trigger{height:44px;min-width:60px;padding-inline:6px}
 .lang-code{font-size:11px}.language-flag{width:22px;height:16px}
 .menu-toggle{min-width:44px;padding:8px}
 .menu-label{display:none}
 .mast-actions{gap:5px}
 .desktop-nav.ornamental-nav{grid-template-columns:repeat(2,minmax(0,1fr));padding:5px;gap:4px}
 .ornamental-nav .desktop-nav-item,.reader-masthead .ornamental-nav .desktop-nav-item{flex-direction:row;justify-content:flex-start;gap:8px;min-height:48px;padding:7px 10px}
 .ornamental-nav .desktop-nav-item:last-child{grid-column:1/-1;justify-content:center}
 .ornamental-nav .desktop-nav-item img,.reader-masthead .ornamental-nav .desktop-nav-item img{width:29px;height:29px}
 .ornamental-nav .desktop-nav-item span,.reader-masthead .ornamental-nav .desktop-nav-item span{font-size:14px;white-space:nowrap}
 .detail-paper>.reader-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px 8px;margin-top:16px;margin-bottom:18px;padding-bottom:14px}
 .reader-toolbar .reader-back{grid-column:1;grid-row:1;margin:0}
 .reader-toolbar .reader-back span{display:none}
 .reader-toolbar .species-control{grid-column:2;grid-row:1;align-self:end}
 .species-control label{font-size:10px;line-height:1.4;letter-spacing:0}
 .reader-toolbar .species-arrows{grid-column:3;grid-row:1;gap:4px}
 .reader-toolbar .reader-type{grid-column:1/-1;grid-row:2;justify-self:end;margin:0}
 .reader-toolbar button{padding:8px}
 .detail-paper>*{width:calc(100% - 32px);margin-inline:16px}
 .detail-paper>.detail-heading h1{font-size:clamp(30px,8.2vw,39px);line-height:1.16}
 .latin{font-size:16px;line-height:1.55;margin-block:8px 14px}
 .metadata{gap:6px;margin-bottom:0}.meta{font-size:11px;padding:5px 8px;line-height:1.4}
 .detail-visual{padding:18px 16px 20px;gap:16px}
 .specimen-main{height:clamp(260px,76vw,330px)}
 .specimen-main figcaption{font-size:9px}.specimen-main figcaption b{font-size:10px}
 .specimen-atlas h2{font-size:20px}
 .specimen-crop{height:72px}.specimen-fragment figcaption{font-size:10px;min-height:44px;padding:7px 4px}
 .detail-paper>.lead{margin-top:0;line-height:1.65}
 .detail-paper>.keeper-voice{margin-block:18px 0;padding:15px 12px;gap:9px;grid-template-columns:26px minmax(0,1fr)}
 .keeper-voice-mark{width:26px;height:26px}.keeper-voice small{font-size:9px;letter-spacing:.04em}.keeper-voice::before{left:47px}
 .detail-paper>.chapter-contents{order:7;margin-block:20px}
 .chapter-contents nav{grid-template-columns:minmax(0,1fr)}
 .chapter-contents summary{font-size:14px;padding-inline:12px}
 .detail-grid{gap:18px}
 .folio-section{grid-template-columns:minmax(0,1fr);padding:18px 14px;gap:10px}
 .folio-icon{width:26px;height:26px}
 .restored-book :is(.folio-section h2,.pantheon-head h2,.grimoire-heading h2){font-size:24px;line-height:1.25}
 .archaic-pantheon-panel{padding:18px 14px}
 .pantheon-head{gap:9px}.pantheon-seal{width:28px;height:28px}
 .pantheon-card{padding:16px 12px}
 .grimoire-treatise{--chapter-pad:14px}
 .grimoire-heading{gap:9px}.grimoire-heading img{width:34px;height:34px}
 .grimoire-section{padding-block:20px;gap:10px}.chapter-label{font-size:11px;line-height:1.55;margin-bottom:14px;letter-spacing:.035em}
 .archaic-rite-card{padding:16px 12px}
 .restored-book :is(.use-copy h3,.archaic-rite-card h4){font-size:22px}
 .use-entry{grid-template-columns:minmax(0,1fr);gap:8px}
 .use-entry .use-index{grid-column:1;grid-row:1;text-align:left;padding:0}
 .use-entry .use-emblem{display:none}.use-entry .use-copy{grid-column:1;grid-row:2}
 .hazard-banner{font-size:14px;line-height:1.6}
 .detail-actions-row .primary,.detail-actions-row .secondary{font-size:14px;min-height:50px;padding:12px}
 .species-next b{font-size:19px}.species-next button{padding:14px 10px}
 .detail-paper>.reader-return{order:12;margin-top:18px}
 .reader-return{gap:8px}.reader-return button{font-size:13px;padding:10px 8px}
 /* Compact catalog and supporting pages at the same phone breakpoint. */
 .home-hero{padding:26px 16px}
 .home-hero h1{font-size:clamp(30px,8.7vw,39px);line-height:1.18}
 .home-hero p:last-child{font-size:16px;line-height:1.65;margin-top:16px}
 .catalog{padding-inline:14px}
 .chip{font-size:13px}
 .card-copy,.card-copy:has(.hazard-badge){padding:16px 13px}
 .card-copy h3{font-size:22px;line-height:1.2}
 .card-latin{font-size:13px!important;margin-bottom:9px!important}
 .card-epithet{font-size:16px!important;margin-bottom:12px!important}
 .card-copy .plant-tag{font-size:14px;line-height:1.6;padding-top:10px}
 .card-art{min-height:200px}
 .result-card p,.result-card li,.result-card .ritual-section>p,.foundation-brief p,.cauldron-law-grid p,.cauldron-law-grid li span,.result-card .incantation-grid blockquote p{font-size:16px;line-height:1.7}
 .result-card .result-focus{font-size:17px!important}
 .result-card h2{font-size:29px}.result-card h3{font-size:24px}
 .cauldron-guide p:last-child,.presets-head p,.preset-copy em{font-size:16px;line-height:1.65}
 .foundation-pill strong{font-size:18px}.foundation-pill small{font-size:12px}
 .presets-head h3,.cauldron-guide h2{font-size:26px}
 .support-manifest-copy>p:last-child,.support-purpose p,.support-thanks p,.support-bank-copy>p:not(.tbc-verify),.support-wish-intro p,.footer-about p{font-size:16px;line-height:1.7}
 .support-manifest h2{font-size:29px}.support-heading h2{font-size:25px}
 .site-footer{padding-bottom:calc(28px + var(--safe-b))}
 .toast{bottom:calc(16px + var(--safe-b))}
}
@media(prefers-reduced-motion:reduce){.chapter-contents summary>.glyph:last-child{transition:none}}
