.site-header .title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
html[data-readrobe-theme="dark"] {
    color-scheme: dark;
    --rr-aurora-surface: #202833;
    --rr-aurora-row: #253140;
    --rr-aurora-hover: #30445d;
    --rr-aurora-edge: #52647b;
}

html[data-readrobe-theme="dark"] body {
    background: #131820 !important;
    color: #edf1f6 !important;
}
html[data-readrobe-theme="dark"] body :is(.site-header,.site-footer,.site-inner,.menu-toggle,.nav-primary,.sub-menu,.sub-menu a,
.entry,.entry-content,.entry-header,.entry-footer,.post-item,.page-header,.genre-container,.genre-sidebar,.dropdown-content,
.sidebar,.widget,.page-container,.subcategory-section,.book-list,.book,.breadcrumb,.filter-form,.entry-content form,.entry-content table) {
    background-color: #202833 !important;
    color: #edf1f6 !important;
    border-color: #465568 !important;
}
html[data-readrobe-theme="dark"] body :is(.site-inner,.content,.content-sidebar-wrap) { background: #171e27 !important; }
html[data-readrobe-theme="dark"] body :is(h1,h2,h3,h4,h5,h6,.line1,.line2,.post-info,.post-details p,.entry-content p,.entry-content li,.entry-content label,.post-count,.site-title a,.book-title) { color: #edf1f6 !important; }
html[data-readrobe-theme="dark"] body :is(.entry-content,.post-title,.site-footer,.nav-primary,.pagination,.title,.sidebar) a { color: #a7d0ff !important; }
html[data-readrobe-theme="dark"] body .entry-content :is(span,strong)[style*="color"] { color: #e0eaf6 !important; }
html[data-readrobe-theme="dark"] body :is(input:not([type=submit]):not([type=checkbox]):not([type=radio]),textarea,select) {
    background: #17202c !important;
    color: #f2f5fb !important;
    border-color: #8293a8 !important;
}
html[data-readrobe-theme="dark"] body input::placeholder { color: #bbc7d6 !important; opacity: 1; }
html[data-readrobe-theme="dark"] .HomepageBottomli a { background: #245c99; color: white; }
html[data-readrobe-theme="dark"] body :is(.is-ajax-search-result,.is-ajax-search-items,.is-ajax-search-post,.is-show-more-results) {
    background: #202833 !important;
    color: #edf1f6 !important;
}
html[data-readrobe-theme="dark"] body .is-ajax-search-result :is(a,span,div) { color: #edf1f6 !important; }
html[data-readrobe-theme="dark"] body .is-ajax-search-result .is-ajax-search-post:hover { background: #33465d !important; }
html[data-readrobe-theme="dark"] body .breadcrumb { background: #f6f4ed !important; }

html[data-readrobe-theme="dark"] body .is-search-form input.is-search-input::placeholder,
html[data-readrobe-theme="dark"] body #is-search-input-2335::placeholder,
html[data-readrobe-theme="dark"] body #is-search-input-1906::placeholder {
    color: #bbc7d6 !important;
    opacity: 1;
}
body #donation-banner { background: linear-gradient(135deg, #855757, #35628b); padding-inline: 32px; }
body #donation-banner-close { top: 0; right: 0; min-width: 28px; min-height: 28px; text-align: center; }
body #donation-banner-close:focus-visible { outline: 2px solid white; outline-offset: -3px; }

/* Keep the original palette and give the existing controls a shallow edge. */
.page-template-Homepage-php .site-main .HomepageBottomli a {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 3px 0 #125296, 0 5px 9px rgb(12 36 62 / .18);
    transition: transform .16s ease-out, box-shadow .16s ease-out, background-color .16s ease-out;
}

:is(.recent-posts,.post-grid) .post-thumbnail img {
    border-radius: 3px;
    box-shadow: 2px 2px 0 #d2cfc9, 3px 3px 0 #8f8b83, 4px 6px 12px rgb(15 23 34 / .2);
    transition: transform .18s ease-out, box-shadow .18s ease-out;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .page-template-Homepage-php .site-main .HomepageBottomli a:hover { transform: translateY(-1px); }
    :is(.recent-posts,.post-grid) .post-thumbnail a:is(:hover,:focus-visible) img {
        transform: perspective(640px) rotateY(-4deg) translateY(-2px);
        box-shadow: 2px 2px 0 #d2cfc9, 3px 3px 0 #8f8b83, 6px 10px 16px rgb(15 23 34 / .24);
    }
}
@media (prefers-reduced-motion: no-preference) {
    .page-template-Homepage-php .site-main .HomepageBottomli a:active {
        transform: translateY(2px);
        box-shadow: 0 1px 0 #125296, 0 2px 4px rgb(12 36 62 / .16);
    }
}
@media (prefers-reduced-motion: reduce) {
    .page-template-Homepage-php .site-main .HomepageBottomli a,
    :is(.recent-posts,.post-grid) .post-thumbnail img { transition: none; }
}

/* The catalogue export has its own zoom. Keep the card still and move only its cover. */
.post-grid article.post-item:hover { transform: none; }
@media (prefers-reduced-motion: reduce), (hover: none) {
    .post-grid article.post-item, .post-grid .post-thumbnail img,
    .recent-posts .post-thumbnail img { transform: none !important; transition: none !important; }
}
#donation-banner p:has(img.emoji) img.emoji { display: none !important; }
#donation-banner p:has(img.emoji)::before { content: "♥ "; color: #ffbcc0; }

/* Complete dark surfaces for catalogue rows, controls, and keyboard navigation. */
html[data-readrobe-theme="dark"] body .genre-list li {
    background: #253140 !important;
    border: 1px solid #415268;
    box-shadow: none;
}
html[data-readrobe-theme="dark"] body .genre-list li:is(:hover,:focus-within) {
    background: #30445d !important;
    border-color: #779dcd;
}
html[data-readrobe-theme="dark"] body .genre-list a {
    color: #b9d9ff !important;
}
html[data-readrobe-theme="dark"] body :is(.total-subcategories,.post-count,.post-info,time,.entry-meta) {
    color: #bac8db !important;
}
html[data-readrobe-theme="dark"] body .dropdown-content label {
    color: #edf1f6 !important;
    background: #202833 !important;
    border-color: #465568 !important;
}
html[data-readrobe-theme="dark"] body .dropdown-content label:is(:hover,:focus-within) {
    background: #30445d !important;
}
html[data-readrobe-theme="dark"] body :is(input[type="checkbox"],input[type="radio"]) {
    accent-color: #91bfff;
}
html[data-readrobe-theme="dark"] body :is(input[type="submit"],.entry-content button,.filter-form button,
.pagination a,.pagination .current,.archive-pagination a,.archive-pagination .active a,
.is-search-form button.is-search-submit,.is-search-form .is-search-icon) {
    background: #24578f !important;
    color: #fff !important;
    border-color: #648bb8 !important;
}
html[data-readrobe-theme="dark"] body :is(input[type="submit"],.entry-content button,.pagination a,
.archive-pagination a,.is-search-submit):hover {
    background: #326ba9 !important;
}
html[data-readrobe-theme="dark"] body :is(.pagination,.archive-pagination) :is(.current,.active a) {
    background: #b9d9ff !important;
    color: #14263d !important;
}
html[data-readrobe-theme="dark"] body .is-search-icon svg path { fill: #fff !important; }
html[data-readrobe-theme="dark"] body :is(a,button,input,textarea,select,[tabindex]):focus-visible {
    outline: 3px solid #b8d9ff !important;
    outline-offset: 3px;
}
html[data-readrobe-theme="dark"] body :is(.is-ajax-search-post,.is-show-more-results):focus-within {
    background: #30445d !important;
}
html[data-readrobe-theme="dark"] body a.screen-reader-shortcut:focus {
    color: #14263d;
    background: #e4efff;
}
html[data-readrobe-theme="dark"] body .entry-content :is(th,td) {
    background: #202833 !important;
    color: #edf1f6 !important;
    border-color: #52647b !important;
}
html[data-readrobe-theme="dark"] body .entry-content :is(blockquote,pre,code) {
    background: #17202c;
    color: #dbe7f7;
    border-color: #648bb8;
}
html[data-readrobe-theme="dark"] body .breadcrumb {
    background: #202833 !important;
    border: 1px solid #52647b !important;
}
html[data-readrobe-theme="dark"] body .site-header {
    border-bottom: 1px solid #3e4d61;
    box-shadow: 0 2px 10px rgb(0 0 0 / .16);
}
html[data-readrobe-theme="dark"] body .site-footer {
    border-top: 1px solid #3e4d61;
}
html[data-readrobe-theme="dark"] body .is-search-form input.is-search-input {
    border-color: #8293a8 !important;
}
html[data-readrobe-theme="dark"] body .genre-list a {
    background: #253140 !important;
    color: #b9d9ff !important;
}
html[data-readrobe-theme="dark"] body .genre-list a:is(:hover,:focus-visible) {
    background: #30445d !important;
    color: #e8f2ff !important;
}
html[data-readrobe-theme="dark"] body .genre-list .post-count {
    color: #c0cee0 !important;
}
html[data-readrobe-theme="dark"] body .share-buttons-container .share-image {
    filter: brightness(0) invert(.94);
}

/* The header offers light, dark and three Aurora backgrounds. */
.site-header .rr-theme-controls { position: relative; flex: 0 0 auto; }
.rr-theme-controls[hidden], .rr-aurora-panel[hidden] { display: none !important; }
.rr-mode-group {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid #8c9bb0;
    border-radius: 24px;
    background: #e8edf3;
}
.site-header button.rr-mode-button {
    display: grid;
    place-items: center;
    width: 34px;
    min-width: 34px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: #34465e;
    font: 24px/1 Arial, sans-serif;
}
.site-header button.rr-mode-button[aria-pressed="true"] {
    background: #fff;
    color: #205d88;
    box-shadow: 0 1px 4px rgb(13 28 48 / .22);
}
.rr-theme-controls .rr-aurora-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1000001;
    width: 244px;
    max-width: calc(100vw - 32px);
    padding: 18px;
    border: 1px solid #8193ae;
    border-radius: 12px;
    background: #f7f9fc;
    color: #263c57;
    box-shadow: 0 12px 32px rgb(0 0 0 / .25);
}
.rr-aurora-panel p {
    margin: 0 0 16px;
    font: 600 15px/1.3 "Source Sans Pro", system-ui, sans-serif;
}
.rr-shades { display: flex; justify-content: space-between; gap: 12px; }
.rr-theme-controls button.rr-shade {
    display: block;
    width: 56px;
    height: 56px;
    min-width: 44px;
    padding: 0;
    border: 1px solid #a5b1c2;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / .07);
}
.rr-theme-controls button.rr-shade[aria-pressed="true"] {
    outline: 3px solid #6dcbec;
    outline-offset: 3px;
}
.rr-theme-controls .rr-shade-ocean {
    background: radial-gradient(at 20% 20%, #1e6c7c, transparent 70%), linear-gradient(135deg, #0c2332, #423263);
}
.rr-theme-controls .rr-shade-violet {
    background: radial-gradient(at 20% 20%, #3c588f, transparent 65%), linear-gradient(135deg, #152331, #572665);
}
.rr-theme-controls .rr-shade-ember {
    background: radial-gradient(at 20% 20%, #754b36, transparent 65%), linear-gradient(135deg, #222d3c, #563149);
}
.rr-theme-controls button:focus-visible { outline: 3px solid #3b6fa7; outline-offset: 3px; }
html[data-readrobe-theme="dark"] .rr-mode-group { background: #202d40; border-color: #72869e; }
html[data-readrobe-theme="dark"] .site-header .rr-mode-button { color: #dbe5f3; }
html[data-readrobe-theme="dark"] .site-header .rr-mode-button[aria-pressed="true"] { background: #6bc5e4; color: #102736; }
html[data-readrobe-theme="dark"] .rr-theme-controls .rr-aurora-panel { background: #253248; color: #ecf3fc; }
@media (max-width: 420px) {
    .site-header { padding-inline: 16px; }
    .site-header .title-area { gap: 8px; }
    .site-header button.rr-mode-button { width: 29px; min-width: 29px; }
}

/* Static gradients keep the page calm while reading. */
html[data-readrobe-aurora] {
    --rr-aurora-background: radial-gradient(ellipse at 10% 5%, #174652 0%, transparent 58%),
        radial-gradient(ellipse at 95% 95%, #403057 0%, transparent 65%), linear-gradient(125deg, #0b202c, #162b40 60%, #25243e);
    --rr-aurora-surface: rgb(21 34 50 / .82);
    --rr-aurora-row: rgb(33 50 71 / .85);
    --rr-aurora-hover: #314b65;
    --rr-aurora-edge: #586e89;
}
html[data-readrobe-aurora="violet"] {
    --rr-aurora-background: radial-gradient(ellipse at 10% 8%, #244869 0%, transparent 58%),
        radial-gradient(ellipse at 95% 85%, #492850 0%, transparent 65%), linear-gradient(125deg, #112333, #282a4b 65%, #31203e);
    --rr-aurora-surface: rgb(27 31 52 / .84);
    --rr-aurora-row: rgb(43 43 71 / .88);
    --rr-aurora-hover: #434367;
    --rr-aurora-edge: #766b96;
}
html[data-readrobe-aurora="ember"] {
    --rr-aurora-background: radial-gradient(ellipse at 5% 5%, #583c34 0%, transparent 58%),
        radial-gradient(ellipse at 95% 80%, #482d4d 0%, transparent 65%), linear-gradient(125deg, #252831, #322b39 65%, #302238);
    --rr-aurora-surface: rgb(38 32 43 / .87);
    --rr-aurora-row: rgb(57 43 56 / .9);
    --rr-aurora-hover: #59445e;
    --rr-aurora-edge: #93798e;
}
html[data-readrobe-theme="dark"][data-readrobe-aurora] body.custom-background {
    background-color: #142437 !important;
    background-image: var(--rr-aurora-background) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
}
html:root[data-readrobe-theme="dark"] body :is(.site-inner,.content,.content-sidebar-wrap,.entry-content,.entry-header,.entry-footer,.nav-primary,.genre-container,.book-list) {
    background: transparent !important;
}
html:root[data-readrobe-theme="dark"] body :is(.site-header,.site-footer,.entry,.post-item,.genre-sidebar,.page-container,.subcategory-section,.book,.dropdown-content,.entry-content form) {
    background: var(--rr-aurora-surface) !important;
    border-color: var(--rr-aurora-edge) !important;
}
html:root[data-readrobe-theme="dark"] body :is(.entry,.post-item,.genre-sidebar) {
    border-radius: 10px;
}
html:root[data-readrobe-theme="dark"] body :is(.genre-list li,.genre-list a,.dropdown-content label,
.is-ajax-search-items,.is-ajax-search-post,.is-show-more-results,.breadcrumb) {
    background: var(--rr-aurora-row) !important;
    border-color: var(--rr-aurora-edge) !important;
}
html:root[data-readrobe-theme="dark"] body :is(.genre-list a,.dropdown-content label,.is-ajax-search-post):is(:hover,:focus-within) {
    background: var(--rr-aurora-hover) !important;
}
html:root[data-readrobe-theme="dark"] body .entry-content :is(th,td) { background: var(--rr-aurora-row) !important; }
html:root[data-readrobe-theme="dark"] body .menu-toggle { background: transparent !important; }
html:root[data-readrobe-theme="dark"] body .rr-aurora-panel { background: #253248 !important; }

@media (max-width: 420px) { .rr-theme-controls .rr-aurora-panel { right: auto; left: max(-105px, calc(16px - 30vw)); } }

/* Let page headings sit directly on the selected Aurora background. */
html:root[data-readrobe-theme="dark"] body .page-header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none;
}

/* Dark and Aurora pages share the same layout rules and readable card surfaces. */
html:root[data-readrobe-theme="dark"] body.page:is(.page-id-37644,.page-id-9354,.page-id-251076,.page-id-17658,.page-id-161551,.page-id-185532,.page-id-129009) main.content > article.type-page.entry,
html:root[data-readrobe-theme="dark"] body.page .site-inner :is(.genre-container,.genre-sidebar,.page-container,.subcategory-section) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none;
}
html:root[data-readrobe-theme="dark"] body.page:is(.page-id-37644,.page-id-9354,.page-id-251076,.page-id-17658,.page-id-161551,.page-id-185532,.page-id-129009) main.content > article.type-page.entry {
    padding-block: 0;
}
html:root[data-readrobe-theme="dark"] body.page :is(.entry-header,.entry-content,.page-header) {
    background: transparent !important;
}
html:root[data-readrobe-theme="dark"] body.page .entry-header {
    padding-block: 0;
}
html:root[data-readrobe-theme="dark"] body .post-grid {
    background: transparent !important;
}
html:root[data-readrobe-theme="dark"] body .entry-content hr {
    border-color: var(--rr-aurora-edge);
}

html[data-readrobe-theme="dark"] body .rr-date-page :is(.tag-container,.tag-sidebar) {
    background: #202833;
    color: #edf1f6;
}
html[data-readrobe-theme="dark"] body .rr-date-page .tag-list a {
    background: var(--rr-aurora-row, #253140);
    color: #b9d9ff;
}
html[data-readrobe-theme="dark"] body .rr-date-page .tag-list a:hover {
    background: var(--rr-aurora-hover, #30445d);
}
html[data-readrobe-theme="dark"] body .rr-date-page .total-tags { color: #bac8db; }
html[data-readrobe-theme="dark"] body .rr-date-page input[type="submit"] {
    background: #24578f;
    color: white;
}
html:root[data-readrobe-theme="dark"] body .rr-date-page :is(.tag-container,.tag-sidebar),
html:root[data-readrobe-theme="dark"] body .archive-description {
    background: transparent !important;
    border: 0;
    box-shadow: none;
}
html[data-readrobe-theme="dark"] body.page-id-314998 .entry-content div[style*="background:#fafafa"] {
    background: var(--rr-aurora-surface, #202833) !important;
    border-color: var(--rr-aurora-edge, #52647b) !important;
    color: #edf1f6;
}
html[data-readrobe-theme="dark"] body.page .site-inner .entry-content :is(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),textarea,select) {
    background: #17202c !important;
    color: #f2f5fb !important;
    border-color: #8293a8 !important;
}

/* Reading panels follow the original theme dimensions. */
html:root[data-readrobe-theme="dark"] body.page:not(:is(.page-id-37644,.page-id-9354,.page-id-251076,.page-id-17658,.page-id-161551,.page-id-185532,.page-id-129009)) main.content > article.type-page.entry {
    background: var(--rr-aurora-surface) !important;
    border: 0 !important;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--rr-aurora-edge), 0 8px 24px rgb(0 0 0 / .12);
}

/* Dark and Aurora pagination use the same spaced controls. */
html:root[data-readrobe-theme="dark"] body :is(.pagination,.archive-pagination) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 28px auto;
    padding: 4px;
    background: transparent;
}
html:root[data-readrobe-theme="dark"] body .archive-pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
html:root[data-readrobe-theme="dark"] body .archive-pagination li { margin: 0; }
html:root[data-readrobe-theme="dark"] body :is(.pagination .page-numbers,.archive-pagination a) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--rr-aurora-edge) !important;
    border-radius: 7px;
    background: var(--rr-aurora-row) !important;
    color: #e3efff !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
}
html:root[data-readrobe-theme="dark"] body :is(.pagination a,.archive-pagination a):hover {
    background: var(--rr-aurora-hover) !important;
    border-color: #a9c9ed !important;
}
html:root[data-readrobe-theme="dark"] body :is(.pagination .current,.archive-pagination .active a) {
    background: #a8d9ed !important;
    color: #102839 !important;
    border-color: #a8d9ed !important;
    box-shadow: 0 2px 5px rgb(0 0 0 / .18);
}
html:root[data-readrobe-theme="dark"] body .pagination .dots {
    min-width: 24px;
    padding-inline: 0;
    background: transparent !important;
    border-color: transparent !important;
    color: #d0ddec !important;
}

/* Homepage shortcuts follow the selected appearance palette. */
body.page-template-Homepage-php {
    --rr-home-background: #f3f7fc;
    --rr-home-text: #233e5e;
    --rr-home-border: #879ab2;
    --rr-home-depth: #9aabbd;
    --rr-home-hover: #e2edfa;
}
html[data-readrobe-theme="dark"] body.page-template-Homepage-php {
    --rr-home-background: #243247;
    --rr-home-text: #edf4ff;
    --rr-home-border: #70849e;
    --rr-home-depth: #101b2b;
    --rr-home-hover: #344962;
}
html:root[data-readrobe-theme="dark"] body.page-template-Homepage-php {
    --rr-home-background: var(--rr-aurora-row);
    --rr-home-border: var(--rr-aurora-edge);
    --rr-home-depth: var(--rr-aurora-surface);
    --rr-home-hover: var(--rr-aurora-hover);
}
html .page-template-Homepage-php .site-main .HomepageBottomli a {
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--rr-home-border);
    border-radius: 8px;
    background: var(--rr-home-background);
    color: var(--rr-home-text);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .09), 0 3px 0 var(--rr-home-depth), 0 5px 10px rgb(0 0 0 / .13);
}
html .page-template-Homepage-php .site-main .HomepageBottomli a:hover {
    background: var(--rr-home-hover);
    color: var(--rr-home-text);
}
@media (prefers-reduced-motion: no-preference) {
    html .page-template-Homepage-php .site-main .HomepageBottomli a:active {
        transform: translateY(2px);
        box-shadow: inset 0 1px 0 rgb(255 255 255 / .09), 0 1px 0 var(--rr-home-depth);
    }
}
@media (max-width: 540px) {
    html .page-template-Homepage-php .site-main .HomepageBottomli a { padding-inline: 8px; }
}

html:root[data-readrobe-theme="dark"] body :is(.recent-posts,.post-grid) article.post-item {
    border-radius: 10px !important;
}

/* White header navigation in Aurora mode. */
html[data-readrobe-theme="dark"][data-readrobe-aurora] body .site-header .nav-primary a {
    color: #f7faff !important;
}
html[data-readrobe-theme="dark"][data-readrobe-aurora] body .site-header .nav-primary a:is(:hover,:focus-visible,[aria-current="page"]) {
    text-decoration: underline;
    text-underline-offset: 4px;
}
