/* One reading system across the Atlas. Loaded after component styles.
   Page titles and prose deliberately own their size here; diagrams, navigation
   and the logo retain their own scales. Reader A/A+ controls still scale text. */
:root{
 --type-body:1.125rem;--type-title:2.5rem;--type-section:1.625rem;
 --type-subheading:1.25rem;--type-interface:1rem;--type-caption:.875rem;
 --type-leading:1.75;--type-measure:68ch;
 --type-sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body[data-atlas-room]{--ink:var(--a-ink);--muted:var(--a-muted);--paper:var(--a-paper);--gold:var(--a-accent)}
body[data-atlas-room] main{
 --content-size:var(--type-body);
 font-family:var(--type-sans);font-size:var(--type-body);line-height:var(--type-leading);
}
body[data-atlas-room] :is(.site-main,.resource-main,.sangha-main,.index-main,.account-main){
 max-width:1280px;margin-inline:auto;padding:32px 32px 64px;
}
/* All page titles, including dynamically rendered titles, use the same scale. */
body[data-atlas-room] main h1{
 font-family:var(--a-display,Georgia,serif)!important;
 font-size:calc(var(--type-title) * var(--reading-scale,1))!important;
 font-weight:500!important;line-height:1.15!important;letter-spacing:-.02em!important;
 margin:0 0 16px;max-width:32ch;text-wrap:balance;overflow-wrap:break-word;
}
body[data-atlas-room] main :is(h2,h3,h4){line-height:1.3!important;text-wrap:balance;overflow-wrap:break-word}
body[data-atlas-room] main h2{
 font-family:var(--a-display,Georgia,serif)!important;font-weight:500!important;
 font-size:calc(var(--type-section) * var(--reading-scale,1))!important;letter-spacing:0;
}
/* Video sections keep the shared section size and serif, with clearer weight. */
body[data-atlas-room] main[data-resource-page=youtube] .shelf-heading h2{font-weight:600!important}
body[data-atlas-room] main h3{
 font-family:var(--type-sans)!important;font-weight:600!important;
 font-size:calc(var(--type-subheading) * var(--reading-scale,1))!important;letter-spacing:0;
}
body[data-atlas-room] main h4{
 font-family:var(--type-sans)!important;font-weight:600!important;
 font-size:calc(var(--content-size) * var(--reading-scale,1))!important;
}
body[data-atlas-room] main :is(h1,h2,h3,h4) :is(a,em,strong,span):not([class]){font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}
body[data-atlas-room] main :is(p,li,dt,dd,blockquote){
 font-size:calc(var(--content-size) * var(--reading-scale,1))!important;
 line-height:var(--type-leading)!important;font-family:inherit;
}
body[data-atlas-room] main p{max-width:var(--type-measure);text-wrap:pretty;overflow-wrap:break-word}
body[data-atlas-room] main :is(p,li,dd) :is(a,strong,em,b,i,span):not([class]){font-size:inherit!important;line-height:inherit!important}
body[data-atlas-room] main :is(.iq-section,.comparison-page,.about-main,.text-section)>p{margin-block:0 1.25em}
body[data-atlas-room] main :is(.iq-section,.comparison-page,.about-main,.text-section)>:is(h2,h3){margin-block:1.4em .65em}
body[data-atlas-room] main :is(.iq-section,.text-section)>:is(h2,h3):first-child{margin-top:0}

/* A title followed by an ordinary-size introduction, without a second label. */
body[data-atlas-room] :is(.page-heading,.iq-intro,.study-heading,.foundation-heading,.gv-intro,.index-heading,.sangha-heading,.library-heading,.account-heading,.bat-head){
 margin-block:0 32px;text-align:left;
}
body[data-atlas-room] :is(.page-heading,.iq-intro,.study-heading,.foundation-heading,.gv-intro,.index-heading){max-width:none;padding-block:0;border:0}
body[data-atlas-room] :is(.page-heading,.iq-intro,.study-heading,.foundation-heading,.gv-intro,.index-heading,.sangha-heading,.library-heading,.bat-head) p{
 --content-size:var(--type-body);font-style:normal;margin-block:0;max-width:var(--type-measure);
}
body[data-atlas-room] :is(.page-heading,.iq-intro,.study-heading,.foundation-heading,.gv-intro,.index-heading,.sangha-heading,.library-heading,.reading-heading) :is(.eyebrow,.sangha-eyebrow),
body[data-atlas-room] .bat-head .bat-kicker,
body[data-atlas-room] main>.page-breadcrumb,
body[data-atlas-room] main>.teaching-home,
body[data-atlas-room] main>.iq-guide-back,
body[data-atlas-room] .reading-heading>.back-index,
body[data-atlas-room] .comparison-page>h1+.eyebrow{display:none}
body[data-atlas-room] .index-heading{display:block}
body[data-atlas-room] .index-heading>div{flex-shrink:1}
body[data-atlas-room] .index-heading>p{margin:0;max-width:var(--type-measure)}
body[data-atlas-room] .scenic-heading{padding:32px!important}
body[data-atlas-room] .scenic-heading h1{margin-top:0}

/* Cards, form panels and navigation within a page are distinct working areas.
   Use one compact body size within them, rather than a size for each sentence. */
body[data-atlas-room] main :is(.iq-card,.iq-callout,.resource-card,.catalog-entry,.sangha-card,.gv-card,.dharma-talk,.people-card,.study-route,.foundation-reading,.av-explorer,.bat-card,.bat-detail,.library-controls,.library-shelves,.library-evidence,.reading-related,.account-card,.account-panel,.account-row){--content-size:var(--type-interface)}
body[data-atlas-room] main :is(.iq-card,.resource-card,.catalog-entry,.sangha-card,.gv-card,.dharma-talk,.study-route) :is(h2,h3){font-size:var(--type-subheading)!important}
body[data-atlas-room] main :is(input,select,textarea,button,label){font-family:var(--type-sans);font-size:calc(var(--type-interface) * var(--reading-scale,1));line-height:1.5}
body[data-atlas-room] main :is(small,figcaption){font-size:calc(var(--type-caption) * var(--reading-scale,1))!important;line-height:1.6!important}
body[data-atlas-room] main :is(.iq-links,.av-links,.resource-action-row,.catalog-actions,.sangha-actions,.gv-actions){font-size:var(--type-interface);line-height:1.5}
body[data-atlas-room] main :is(.iq-links,.av-links,.resource-action-row,.catalog-actions,.sangha-actions,.gv-actions)>a{font-size:inherit!important}
/* Card titles have the same reading weight, regardless of heading level.
   Display serif is reserved for page/section headings and original text. */
body[data-atlas-room] main :is(.iq-card,.resource-card,.catalog-entry,.sangha-card,.gv-card,.dharma-talk,.study-route,.foundation-reading,.study-companions,.study-traditions,.study-frameworks,.people-card) :is(h2,h3,h4,h5){font-family:var(--type-sans)!important;font-weight:600!important}
body[data-atlas-room] main :is(.iq-card,.resource-card,.catalog-entry,.sangha-card,.gv-card,.dharma-talk,.study-route) :is(h2,h3){text-wrap:pretty}
/* Editorial cards use the active room's colors in both appearances. */
html body[data-atlas-room] main :is(.iq-card,.iq-hero-card){background:var(--a-card);color:var(--a-ink);border-color:var(--a-line)}
html body[data-atlas-room] main .iq-callout{background:var(--a-surface);color:var(--a-ink);border-color:var(--a-accent)}

/* Shared working surfaces inherit their room, including legacy components.
   Semantic status badges, maps and illustrations retain their meaning. */
html body[data-atlas-room] main :is(.resource-filter-panel,.resource-check span,.site-linkbar,.reading-related,.reading-original,#resource-reading-bridge,.resource-curation,.resource-editorial,.source-comparison-card aside,.jhana-map thead,.account-empty,.talk-text-links,.talk-related-label,.talk-connection-note){background:var(--a-surface);color:var(--a-ink);border-color:var(--a-line)}
html body[data-atlas-room] main .resource-curation{padding:1.25rem 1.5rem;border:1px solid var(--a-line);border-radius:8px}
html body[data-atlas-room] main .resource-curation>:first-child{margin-top:0}
html body[data-atlas-room] main .resource-curation>:last-child{margin-bottom:0}
html body[data-atlas-room] main :is(.source-comparison-card,.jhana-map,.jhana-start,.account-panel,.talk-player,.resource-preview>a,.resource-teacher .resource-preview>a){background:var(--a-card);color:var(--a-ink);border-color:var(--a-line)}
html body[data-atlas-room] :is(.resource-branches a,.resource-branches span,.talk-tags button,.teacher-support-option .dana-button,.subject-resource-link,.resource-starts button,fieldset.resource-scope span,.account-main button,.atlas-dialog button,.account-reading-tools button){background:var(--a-card);color:var(--a-ink);border-color:var(--a-line)}
html body[data-atlas-room] :is(.resource-branches a,.talk-tags button,.teacher-support-option .dana-button,.subject-resource-link,.resource-starts button,.account-main button,.atlas-dialog button,.account-reading-tools button):hover{background:var(--a-surface);border-color:var(--a-accent)}
html body[data-atlas-room] :is(.reading-options button[aria-pressed=true],.resource-save[aria-pressed=true],.talk-tags button[aria-pressed=true],fieldset.resource-scope input:checked+span,.account-tabs [aria-current=page],.subject-picker a[aria-current=page]){background:var(--a-selected);color:var(--a-ink);border-color:var(--a-accent)}
html body[data-atlas-room] .teacher-guide-heading button{background:var(--a-accent);color:var(--a-paper);border-color:var(--a-accent)}
html body[data-atlas-room] :is(.reading-connections-jump,.reading-connections-jump:hover){background:var(--a-accent);color:var(--a-paper);border-color:var(--a-accent)}

/* The reading room uses the same title and prose sizes; original translations
   keep their serif face. A+ increases introductions, headings and text together. */
body[data-atlas-room] #reading-main{--content-size:var(--type-body)}
body[data-atlas-room] #reading-main .reading-heading{max-width:1150px;padding:32px 40px!important;margin:0 auto;text-align:left}
body[data-atlas-room] #reading-main .reading-heading h1{margin:0 0 16px}
body[data-atlas-room] #reading-main .reading-heading p{margin:0 0 12px;max-width:var(--type-measure)}
body[data-atlas-room] #reading-main .reading-subtitle{font-family:var(--type-sans);font-style:normal}
body[data-atlas-room] #reading-main :is(.translated-text,.study-prose){font-size:calc(var(--type-body) * var(--reading-scale,1));line-height:var(--type-leading)}
body[data-atlas-room] #reading-main .reading-heading .reading-options{justify-content:flex-start}
body[data-atlas-room] #reading-main .reading-heading .reading-connections-jump{margin-inline:0}
body[data-atlas-room] #reading-main .reading-heading :is(.translation-credit,.editorial-note,.source-link){font-size:calc(var(--type-interface) * var(--reading-scale,1))!important}

/* Texts Through Time belongs to its blue room, with no nested olive canvas. */
html body[data-atlas-page=collections] #library-workspace{background:transparent;border:0;border-radius:0;padding:0;color:var(--a-ink)}
html body[data-atlas-page=collections] .library-controls{background:var(--a-surface);border:1px solid var(--a-line);color:var(--a-ink);border-radius:8px}
html body[data-atlas-page=collections] :is(.library-shelves details,#library-detail){background:var(--a-card);border-color:var(--a-line);color:var(--a-ink)}
html body[data-atlas-page=collections] :is(.library-shelves button,.era-presets button,#library-reset){background:var(--a-surface);border-color:var(--a-line);color:var(--a-ink)}
html body[data-atlas-page=collections] .library-shelves button[aria-pressed=true]{background:var(--a-accent);color:var(--a-paper)}
html body[data-atlas-page=collections] :is(.library-caveat,.library-small,.library-shelves small,.library-shelves summary span){color:var(--a-muted)}
html body[data-atlas-page=collections] #library-detail .library-intro{font-family:inherit;border-color:var(--a-line)}
html body[data-atlas-page=collections] :is(.library-read){background:var(--a-accent);color:var(--a-paper)}
body[data-atlas-page=history] main>h1{margin:0 0 28px}
body[data-atlas-page=history] main{padding-top:32px}

/* One lightweight nature backdrop per room. Only the matching room and
   viewport image is requested; the scene fades before long-form reading. */
body[data-atlas-room=learn],body[data-atlas-room=listen]{--room-scene:url("/_assets/rooms/0c6506f19947008eaa53.webp")}
body[data-atlas-room=atlas]{--room-scene:url("/_assets/rooms/55b6eceaa9fdeb55f23f.webp")}
body[data-atlas-room=library]{--room-scene:url("/_assets/rooms/5016c1c93749315f47d6.webp")}
body[data-atlas-room=practice]{--room-scene:url("/_assets/rooms/006ce87eae009bf1c6f8.webp")}
body[data-atlas-room=sit]{--room-scene:url("/assets/sit/temple.webp")}
:root[data-theme] body[data-atlas-room]:not([data-atlas-page=index]),:root:not([data-theme]) body[data-atlas-room]:not([data-atlas-page=index]){
 background-color:var(--a-paper);
 background-image:linear-gradient(to bottom,transparent 160px,var(--a-paper) 760px),linear-gradient(90deg,color-mix(in srgb,var(--a-paper) 96%,transparent),color-mix(in srgb,var(--a-paper) 78%,transparent)),var(--room-scene);
 background-size:auto,auto,max(100%,1200px) auto;
 background-position:center top;background-repeat:no-repeat;background-attachment:scroll;
}
html body[data-atlas-room=practice] main .scenic-heading{background:none;min-height:0;padding:0!important;isolation:auto;overflow:visible}
html body[data-atlas-room=practice] main .scenic-heading:after,
html body[data-atlas-room=practice] main .scenic-heading .nature-photo{display:none}
html body[data-atlas-room=practice] main .scenic-heading :is(h1,p){color:var(--a-ink)}
html body[data-atlas-room=practice] main .scenic-heading a{color:var(--a-accent)}
@media(max-width:700px){
 body[data-atlas-room=learn],body[data-atlas-room=listen]{--room-scene:url("/_assets/rooms/85a44ae63993767fe0bd.webp")}
 body[data-atlas-room=atlas]{--room-scene:url("/_assets/rooms/f3c73d30e9fce1d88b2a.webp")}
 body[data-atlas-room=library]{--room-scene:url("/_assets/rooms/75e35e20f68e31ce0ee7.webp")}
 body[data-atlas-room=practice]{--room-scene:url("/_assets/rooms/ba83433914cbff69b7db.webp")}
 body[data-atlas-room=sit]{--room-scene:url("/assets/sit/temple-small.webp")}
 :root[data-theme] body[data-atlas-room]:not([data-atlas-page=index]),:root:not([data-theme]) body[data-atlas-room]:not([data-atlas-page=index]){background-image:linear-gradient(to bottom,transparent 120px,var(--a-paper) 620px),linear-gradient(90deg,color-mix(in srgb,var(--a-paper) 96%,transparent),color-mix(in srgb,var(--a-paper) 82%,transparent)),var(--room-scene);background-size:auto,auto,auto 660px}
}
@media print,(prefers-reduced-data:reduce){:root[data-theme] body[data-atlas-room]:not([data-atlas-page=index]),:root:not([data-theme]) body[data-atlas-room]:not([data-atlas-page=index]){background-image:none}}

@media(max-width:700px){
 :root{--type-title:2rem}
 body[data-atlas-room] :is(.site-main,.resource-main,.sangha-main,.index-main,.account-main){padding:24px 20px 48px}
 body[data-atlas-room] .scenic-heading{padding:24px 20px!important}
 body[data-atlas-room] #reading-main .reading-heading{padding:24px 20px!important}
 body[data-atlas-room] :is(.library-heading,.account-heading){flex-wrap:wrap;gap:12px}
 body[data-atlas-room] .library-heading>a{margin:0 0 12px}
}

/* Start Here is an illustrated introduction: its display heading has its own
   scale. The scene scrolls with the document and dissolves into the room. */
html body[data-atlas-page=index] main.learn-main{max-width:none;padding:0 0 70px;margin:0}
body[data-atlas-page=index] main .nature-hero.page-heading{
 min-height:600px;margin:0;padding:64px max(32px,calc((100% - 1168px)/2)) 144px!important;
 background:var(--a-paper);justify-content:center;
}
body[data-atlas-page=index] main .nature-hero .nature-photo,
body[data-atlas-page=index] main .nature-hero:after{
 -webkit-mask-image:linear-gradient(to bottom,#000 64%,transparent 100%);
 mask-image:linear-gradient(to bottom,#000 64%,transparent 100%);
}
body[data-atlas-page=index] main .nature-hero:after{
 background:linear-gradient(90deg,#0b201bed 0%,#112e23c9 30%,#102c2155 62%,#122b1710 100%);
}
body[data-atlas-page=index] main .nature-hero h1{
 font-size:4rem!important;font-weight:400!important;line-height:1.02!important;
 max-width:12ch;margin:0 0 24px;letter-spacing:-.025em!important;
}
body[data-atlas-page=index] main .nature-hero h1 em{display:block;font-weight:400}
body[data-atlas-page=index] main .nature-hero.page-heading p{max-width:40ch;margin:0;color:#fffbea}
@media(max-width:700px){
 body[data-atlas-page=index] main .nature-hero.page-heading{
  min-height:520px;padding:44px 24px 136px!important;justify-content:center;
 }
 body[data-atlas-page=index] main .nature-hero .nature-photo,
 body[data-atlas-page=index] main .nature-hero:after{
  -webkit-mask-image:linear-gradient(to bottom,#000 68%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 68%,transparent 100%);
 }
 body[data-atlas-page=index] main .nature-hero:after{background:linear-gradient(90deg,#0b201be6,#112e2380)}
 body[data-atlas-page=index] main .nature-hero h1{font-size:3rem!important}
 body[data-atlas-page=index] main .nature-hero.page-heading p{max-width:32ch}
}
@media print{
 body[data-atlas-page=index] main .nature-hero.page-heading{min-height:0;padding:0!important}
}

/* The tree uses the Atlas display face; its secondary divider is a quiet label. */
body[data-atlas-room] main .bat-context-title{font-family:var(--type-sans)!important;font-size:var(--type-interface)!important;font-weight:600!important;line-height:1.5!important;text-transform:none;letter-spacing:0}
