/* Shared reading-room palette, including every interactive state. */
:root{--muted:#5f6c7d;--accent:#eaa54e;--accent-ink:#754413;--surface:#fff;--surface-soft:#eef3f8;--focus:#275f92;--action:#213c59;--action-hover:#2f5378;--heading-font:Georgia,'Times New Roman',serif}
body{font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif}
button,input,select,textarea{font-family:inherit}
:is(.intro h1,.page-intro h1,.content-page>h1,.guide-card h2,.spotlight-panel h2,.shared-faq h2,.seo-discovery h2,.library-panel h2,.mood-header h2,.future-languages h2){font-family:var(--heading-font);letter-spacing:-.02em;line-height:1.25}
.intro h1,.page-intro h1{color:#1b3048}
:is(.guide-card,.book-list li,.detail-offers article,.shared-faq,.seo-discovery){background:var(--surface);border-color:#d1dce7;box-shadow:0 4px 16px #192c4508}
:is(.guide-card,.shared-faq,.seo-discovery){border-top:3px solid var(--accent)}
.guide-step,.eyebrow{color:var(--accent-ink)}
.site-nav{background:#edf2f7;border-bottom:1px solid #d1dce7}
.site-nav a{text-underline-offset:5px}
.site-nav a:hover,.footer-nav a:hover{color:#754413}
.brand-dot{color:#f0b661}
.page-intro{padding:22px 24px;border:1px solid #d1dce7;border-left:4px solid var(--accent);border-radius:12px;background:var(--surface-soft);margin:16px 0 24px}
.page-intro h1{margin-top:8px}.page-intro p:last-child{margin-bottom:0}
.subscription-panel{background:var(--surface-soft);border-color:#cbd8e4}
.subscription-panel>summary{color:#213c59}
.subscription-summary{font-size:14px;line-height:1.5;color:#52627a}
.settings-platform,.access-methods{background:#f5f8fb;border-color:#d1dce7}
.notification-form{background:#f6f2e9;border-color:#d9c7a6}
.notification-form .notification-privacy{color:#5e584d}
.notification-form :is(input[type=email],select){border-color:#8b97a5}
:is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta){background:var(--action);color:#fff;border:1px solid var(--action)}
:is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta):hover{background:var(--action-hover);color:#fff;border-color:var(--action-hover)}
:is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta):active{background:#172c42;transform:translateY(1px)}
.save,.shelf-remove{background:var(--surface);color:#213c59;border-color:#91a4b9}
.save:hover,.shelf-remove:hover{background:#e5eef6;border-color:#607c9b}
.save[aria-pressed=true]{background:#e4f1ca;color:#263e1b;border-color:#8da85e}
.save[aria-pressed=true]:hover{background:#d5e8b3}
.collection-buttons button{background:#fff;color:#213c59;border-color:#a5b5c7}
.collection-buttons button:hover{background:#e5eef6}
.collection-buttons button[aria-pressed=true]{background:#213c59;color:#fff;border-color:#213c59}
.criteria-panel>summary:hover{background:#e5eef6;border-color:#607c9b}
.mood-refresh:hover{background:#dcecc0;color:#263e1b}
.companion-open:hover{background:#dcecc0;color:#263e1b}
.theme-toggle:hover,.companion-close:hover{background:#344b66;color:#fff}
.analytics-actions button:hover{background:#dce7f2;color:#172334}
.tabs button[aria-selected=true]{color:#213c59;border-color:var(--accent)}
.tabs button[aria-selected=true] span:not([id$="-label"]){background:#f6ddb9;color:#4b3218}
:is(input,select,textarea){accent-color:#375c82}
:is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
button:disabled,select:disabled,input:disabled{opacity:1;background:#e7ebf0!important;color:#68717e!important;border-color:#bcc5d0!important;cursor:not-allowed;transform:none}
.notification-form button:disabled{cursor:wait}
html[data-theme=dark]{--ink:#edf2f8;--muted:#bcc9d9;--line:#4b5e75;--bg:#111c2a;--surface:#1b2a3c;--surface-soft:#23364c;--accent:#f0b661;--accent-ink:#f0c68e;--focus:#f4c57e;--action:#f0b661;--action-hover:#ffd08c}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] :is(.intro h1,.page-intro h1,.guide-card h2,.shared-faq h2,.spotlight-panel h2,.library-panel h2){color:#f7f3eb}
html[data-theme=dark] :is(.guide-card,.book-list li,.detail-offers article,.shared-faq,.seo-discovery,.spotlight-panel,.empty,.mood-card){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.guide-card,.shared-faq,.seo-discovery){border-top-color:var(--accent)}
html[data-theme=dark] :is(.page-intro,.subscription-panel,.settings-platform,.access-methods,.shelf-editor,.contact-pending){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .page-intro{border-left-color:var(--accent)}
html[data-theme=dark] :is(.eyebrow,.guide-step){color:var(--accent-ink)}
html[data-theme=dark] :is(.author,.platforms,.edition-title,.edition-note,.verification,.subscription-summary,.select-field label,.source-note,.notification-privacy){color:var(--muted)}
html[data-theme=dark] .subscription-panel>summary{color:var(--ink)}
html[data-theme=dark] .site-nav{background:#192839;border-color:var(--line)}
html[data-theme=dark] :is(.site-nav a,.footer-nav a):hover{color:#ffd08c}
html[data-theme=dark] :is(input,select,textarea,.select-field,.search-field){background:#142335;color:var(--ink);border-color:#71849b}
html[data-theme=dark] .search-field input{background:transparent}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#b2c2d5;opacity:1}
html[data-theme=dark] .notification-form{background:#23364c;color:var(--ink);border-color:#71849b}
html[data-theme=dark] .notification-form :is(input[type=email],select){background:#142335;color:var(--ink);border-color:#71849b}
html[data-theme=dark] .notification-form .notification-privacy{color:var(--muted)}
html[data-theme=dark] :is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta),html[data-theme=dark] .library-offer .storytel-link{background:var(--action);color:#182b40;border-color:var(--action)}
html[data-theme=dark] :is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta):hover,html[data-theme=dark] .library-offer .storytel-link:hover{background:var(--action-hover);color:#182b40;border-color:var(--action-hover)}
html[data-theme=dark] :is(.primary,.storytel-link,.shelf-primary,.mood-compare,.show-more,.page-cta):active{background:#df9b46;color:#182b40}
html[data-theme=dark] :is(.save,.shelf-remove,.library-offer .save){background:#23364c;color:var(--ink);border-color:#71849b}
html[data-theme=dark] :is(.save,.shelf-remove):hover{background:#304962;border-color:#9aafc8}
html[data-theme=dark] :is(.save[aria-pressed=true],.library-offer .save[aria-pressed=true]){background:#d3e9b0;color:#233b18;border-color:#d3e9b0}
html[data-theme=dark] .save[aria-pressed=true]:hover{background:#e1f2c5}
html[data-theme=dark] .collection-buttons button{background:#23364c;color:var(--ink);border-color:#71849b}
html[data-theme=dark] .collection-buttons button:hover{background:#304962}
html[data-theme=dark] .collection-buttons button[aria-pressed=true]{background:#f0b661;color:#182b40;border-color:#f0b661}
html[data-theme=dark] .tabs button[aria-selected=true]{color:#f0c68e;border-color:#f0b661}
html[data-theme=dark] .tabs button[aria-selected=true] span:not([id$="-label"]){background:#f0b661;color:#182b40}
html[data-theme=dark] .locale-switch button[aria-pressed=true]{background:#d3e9b0;color:#233b18}
html[data-theme=dark] .theme-toggle{background:#23364c;color:var(--ink);border-color:#f0b661}
html[data-theme=dark] .theme-toggle:hover{background:#304962}
html[data-theme=dark] .criteria-panel>summary:hover{background:#304962;color:var(--ink);border-color:#9aafc8}
html[data-theme=dark] .mood-refresh:hover{background:#415e84;color:#f4f7ff}
html[data-theme=dark] .companion-open:hover{background:#e1f2c5;color:#233b18}
html[data-theme=dark] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
html[data-theme=dark] :is(button,select,input):disabled{background:#263548!important;color:#afbdd0!important;border-color:#5e7189!important;opacity:1}
html[data-theme=dark] .analytics-actions button:hover{background:#3b506c;color:#fff}
html[data-theme=dark] .cascade-platform>summary{background:#23364c}
html[data-theme=dark] .edition-cascade summary{color:var(--ink)}
@media(max-width:650px){.page-intro{padding:18px}.intro h1{font-size:30px}.subscription-summary{font-size:14px}.guide-card h2,.spotlight-panel h2,.library-panel h2{font-size:23px}.subscription-panel>summary{gap:6px}}

/* Crawlable language navigation follows the existing compact switch. */
.locale-switch a{border:0;border-radius:4px;padding:7px 10px;font-size:13px;font-weight:700;background:transparent;color:#d4deed;text-decoration:none;line-height:1.4}
.locale-switch a[aria-current=true]{background:#d3e9b0;color:#233b18}
.locale-switch a:hover{background:#344b66;color:#fff}
.locale-switch a[aria-current=true]:hover{background:#e1f2c5;color:#233b18}
html[data-theme=dark] .locale-switch a{color:#d4deed}
html[data-theme=dark] .locale-switch a[aria-current=true]{color:#233b18}

.source-note .source-origin{font-size:14px;font-weight:700;color:var(--accent-ink);margin:0 0 6px}
.source-note .network-label{font-weight:500;font-size:14px;line-height:1.5}
.source-note>span{font-size:14px;line-height:1.5}
/* Access preferences stay compact until a provider is opened. */
.access-section-heading,.access-libraries h3{font-size:18px;margin:24px 0 8px}
.settings-grid{align-items:start}
.settings-platform.access-provider{padding:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0;overflow:hidden}
.access-provider>summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:16px;min-height:64px;list-style:none;font-size:16px;font-weight:700;cursor:pointer}
.access-provider>summary::-webkit-details-marker{display:none}
.access-provider>summary:after{content:'+';margin-left:auto;font-size:20px;color:var(--muted)}
.access-provider[open]>summary:after{content:'−'}
.access-provider>summary small{font-size:14px;font-weight:400;color:var(--muted);line-height:1.5}
.access-provider>summary:hover{background:var(--surface-soft)}
.access-provider-body{padding:0 16px 18px;border-top:1px solid var(--line)}
.access-provider-body>label,.access-balance>label{margin-top:16px}
.access-balance[hidden]{display:none}
.access-libraries{margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.access-libraries h3{margin-top:0}
.access-libraries>p,.access-next-step p{font-size:14px;line-height:1.6;color:var(--muted)}
.access-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.access-library-card{display:flex;align-items:start;gap:12px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;min-width:0}
.access-library-card input{width:20px;height:20px;flex-shrink:0;margin:3px 0}
.access-library-card span{min-width:0}.access-library-card strong{display:block;font-size:15px;line-height:1.5}
.access-library-card small{display:block;font-size:14px;font-weight:400;line-height:1.6;color:var(--muted);margin-top:6px}
.access-library-card:has(input:checked){border-color:#8da85e;background:#eff6e4}
.access-next-step{margin:24px 0 12px}.access-next-step button{padding:12px 18px;border-radius:8px;min-height:48px;font-size:15px;font-weight:600}
.declared-access-badge{font-size:14px;line-height:1.5;background:#e4f1ca;color:#263e1b;border:1px solid #8da85e;border-radius:8px;padding:10px}
html[data-theme=dark] .settings-platform.access-provider{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .access-provider>summary:hover{background:var(--surface-soft)}
html[data-theme=dark] .access-library-card:has(input:checked){background:#2a402c;border-color:#9bbf79}
html[data-theme=dark] .declared-access-badge{background:#2a402c;color:#e1f2c5;border-color:#9bbf79}
@media(max-width:650px){.settings-grid,.access-library-grid{grid-template-columns:1fr}.access-libraries{padding:16px}.access-next-step button{width:100%}.access-provider>summary{min-height:58px}.access-library-card{padding:14px}}
