/* Reader theme: monochrome surfaces, consistent controls and explicit contrast. */
.fpp-theme-toggle {
    appearance:none; display:inline-flex; align-items:center; justify-content:center;
    flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px;
    padding:0; margin:0; border:0; border-radius:0; background:transparent;
    color:#222; box-shadow:none; cursor:pointer;
}
.fpp-theme-toggle svg { display:block; width:20px; height:20px; flex:none; pointer-events:none; }
.fpp-theme-toggle:hover { color:#111; background:#f1f1f1; }
.fpp-theme-toggle:focus-visible { outline:2px solid currentColor; outline-offset:-4px; }
html[data-fpp-theme="dark"] .fpp-theme-symbol { transform:rotate(180deg); }

/* Two controls occupy two targets; neither can wrap or stretch the search button. */
body #masthead .header-right {
    position:relative; box-sizing:border-box; display:flex; flex-flow:row nowrap;
    align-items:center; justify-content:center; align-self:stretch;
    flex:0 0 104px; width:104px; min-width:104px; height:auto; gap:0; padding:0;
}
body #masthead .header-right .fpp-header-search {
    position:static; flex:0 0 44px; width:44px; height:44px; min-width:44px; max-height:44px;
}
body #masthead .header-right .fpp-header-search > summary {
    display:flex; align-items:center; justify-content:center; box-sizing:border-box;
    width:44px; height:44px; min-width:44px; min-height:44px; padding:0; margin:0;
    border:0; border-radius:0; background:transparent; color:#222;
}
body #masthead .header-right .fpp-header-search > summary svg { width:20px; height:20px; display:block; }
body #masthead .header-right .fpp-header-search > summary:hover { background:#f1f1f1; color:#111; }
body #masthead .header-right .fpp-header-search > summary:focus-visible { outline:2px solid currentColor; outline-offset:-4px; }
body #masthead .header-right .fpp-header-search-panel { top:calc(100% + 1px); right:0; }
@media (min-width:1280px) {
    body #masthead .top-header > .container { grid-template-columns:minmax(240px,290px) minmax(0,1fr) 104px; }
}
@media (max-width:1279px) {
    body #mblheader .mbl-header-utilities { display:flex; align-items:center; flex:0 0 92px; width:92px; min-width:92px; gap:4px; }
    body #mblheader .mbl-header-utilities > .toggle-button { flex:0 0 44px; min-width:44px; width:44px; }
    body #mblheader .fpp-site-branding { min-width:0; flex:1 1 auto; }
    body #mblheader .fpp-site-branding .custom-logo { max-width:100%; height:auto; }
    body #mblheader > .container { gap:12px; }
}
html[data-fpp-theme="dark"] {
    color-scheme:dark;
    --fpp-dark-bg:#151515; --fpp-dark-panel:#222; --fpp-dark-text:#e6e6e6;
    --fpp-dark-heading:#f5f5f5; --fpp-dark-muted:#bdbdbd; --fpp-dark-line:#737373;
    --st-body-color:#e6e6e6; --st-heading-color:#f5f5f5; --st-primary-color:#e0e0e0;
    --st-primary-color-rgb:224,224,224; --st-white-color:#151515; --st-white-color-rgb:21,21,21;
    --st-black-color:#f5f5f5; --st-black-color-rgb:245,245,245;
    --st-about-section-bg:#222; --st-insta-bg:#222;
}
html[data-fpp-theme="dark"] body { background:var(--fpp-dark-bg); color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] :is(#page,.site-content,.site-header,.mobile-header,.top-header,.bottom-header,
.fpp-footer,.fpp-header-search-panel,.mbl-primary-menu-list,.primary-menu-list,.mobile-menu) {
    background-color:var(--fpp-dark-bg); color:var(--fpp-dark-text);
}
html[data-fpp-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.entry-title,.page-title) { color:var(--fpp-dark-heading); }
html[data-fpp-theme="dark"] :is(.custom-logo,.fpp-footer-logo img,.fpp-social img) { filter:invert(1); mix-blend-mode:screen; }
html[data-fpp-theme="dark"] :is(.entry-content,.fpp-article-body,.fpp-editorial-home,.fpp-home-intro p,.fpp-home-about > p,
.fpp-author-box p,.fpp-footer-tagline,.fpp-footer-owner p,.fpp-footer-bottom,.fpp404-description) { color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] :is(.site-description,.fpp-story-date,.fpp-story-categories,.fpp-story-categories a,
.fpp-section-heading > a,.entry-meta,.entry-meta a,#crumbs,#crumbs a,.fpp-author-eyebrow,.fpp-author-label,
.fpp-about-eyebrow,.fpp404-eyebrow,.fpp404-card-category,.fpp404-author-link,.fpp404-card time) { color:var(--fpp-dark-muted); }
html[data-fpp-theme="dark"] :is(.fpp-footer a,.fpp-editorial-link,.fpp-theme-toggle,
#masthead .main-navigation ul.menu > li > a,.mobile-menu ul li > a,.fpp404-card-link) { color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] :is(.fpp-footer a:hover,.fpp-editorial-link:hover,.mobile-menu a:hover) { color:#fff; }
html[data-fpp-theme="dark"] body #masthead .header-right .fpp-header-search > summary { color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] body #masthead .header-right .fpp-header-search > summary:hover,
html[data-fpp-theme="dark"] .fpp-theme-toggle:hover { background:#303030; color:#fff; }
html[data-fpp-theme="dark"] :is(.toggle-bar,.mobile-header .toggle-button .toggle-bar) { background-color:#eee !important; }
html[data-fpp-theme="dark"] :is(.mbl-primary-menu-list .close,.primary-menu-list .close) { color:#eee; background-color:#303030; }
html[data-fpp-theme="dark"] :is(#masthead .top-header > .container,#masthead .header-left,#masthead .header-right,
.fpp-footer,.fpp-footer-bottom,.fpp-section-heading,.fpp-author-box,.fpp-toc,.fpp-editorial-link,.nav-links,
.fpp404-latest,#crumbs,.fpp-header-search-panel) { border-color:var(--fpp-dark-line); }
html[data-fpp-theme="dark"] :is(input[type="search"],input[type="text"],input[type="email"],input[type="url"],textarea,select) {
    background:#222; color:#f5f5f5; border-color:var(--fpp-dark-line);
}
html[data-fpp-theme="dark"] :is(input,textarea)::placeholder { color:#bdbdbd; opacity:1; }
html[data-fpp-theme="dark"] body .fpp-search-form .search-field {
    background:#222; color:#f5f5f5; border-color:var(--fpp-dark-line);
}
html[data-fpp-theme="dark"] body .fpp-search-form .search-submit,
html[data-fpp-theme="dark"] body button.goto-top.fpp-back-to-top {
    background:#eee; color:#151515; border-color:#eee;
}
html[data-fpp-theme="dark"] body .fpp-search-form .search-submit:hover,
html[data-fpp-theme="dark"] body button.goto-top.fpp-back-to-top:hover { background:#ccc; color:#111; }
html[data-fpp-theme="dark"] body #mblheader .mbl-primary-menu-list .fpp-search-form .search-field {
    background:#222; color:#f5f5f5; border-color:var(--fpp-dark-line);
}
html[data-fpp-theme="dark"] body #mblheader .mbl-primary-menu-list .fpp-search-form .search-submit {
    background:#eee; color:#151515; border-color:#eee;
}
html[data-fpp-theme="dark"] body #mblheader .mbl-primary-menu-list .mobile-menu a { color:#e6e6e6; }
html[data-fpp-theme="dark"] #page :focus-visible { outline-color:#e6e6e6; }

/* Editorial text and quotes need the same specificity as the light reading rules. */
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content { color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content :is(h2,h3,h4,h5,h6) { color:var(--fpp-dark-heading); }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content a { color:#eee; }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content a:visited { color:#ccc; }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content figcaption { color:var(--fpp-dark-muted); }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content blockquote:not(.instagram-media):not(.tiktok-embed) {
    background:#252525; color:#f0f0f0; border-color:#aaa;
}
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content blockquote:not(.instagram-media):not(.tiktok-embed) :is(p,cite,strong,em) {
    color:inherit;
}
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content blockquote:not(.instagram-media):not(.tiktok-embed)::before {
    color:#f0f0f0; background-color:#252525;
}
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content :is(th,pre,code) { background:#252525; color:#e6e6e6; }
html[data-fpp-theme="dark"] body.single-post .site-main article .entry-content :is(th,td) { border-color:#737373; }
html[data-fpp-theme="dark"] body.single-post .related-posts { background:#1c1c1c; color:#e6e6e6; }
html[data-fpp-theme="dark"] body .fpp-author-box { background:transparent; color:var(--fpp-dark-text); }
html[data-fpp-theme="dark"] body .fpp-author-box #fpp-author-name { color:var(--fpp-dark-heading); }
html[data-fpp-theme="dark"] body .fpp-author-box .fpp-author-label { color:var(--fpp-dark-muted); }
html[data-fpp-theme="dark"] body .fpp-toc {
    --fpp-toc-ink:#f5f5f5; --fpp-toc-muted:#bdbdbd; --fpp-toc-line:#737373;
}
html[data-fpp-theme="dark"] body .fpp-toc :is(.fpp-toc-topic,.fpp-toc-number,.fpp-toc-count,.fpp-toc-toggle) { color:#bdbdbd; }
html[data-fpp-theme="dark"] body .fpp-toc :is(.fpp-toc-topic[aria-current="location"],.fpp-toc-topic:hover,.fpp-toc-toggle:hover) { color:#fff; }
html[data-fpp-theme="dark"] body.single-post .site-main nav.navigation.pagination .nav-links :is(.nav-title,.nav-text) { color:#e6e6e6; }
html[data-fpp-theme="dark"] .entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { background:#151515; color:#bdbdbd; }
html[data-fpp-theme="dark"] :is(.fpp-home-hero-photo figcaption,.fpp-category-name,.fpp-category-description) { color:#fff; }
html[data-fpp-theme="dark"] .fpp-home-about { background:transparent; color:var(--fpp-dark-text); }

/* About: keep the approved structure, replacing only its hard-coded light surfaces. */
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content {
    --black:#f5f5f5; --white:#151515; --gray:#bdbdbd; --soft:#222; --line:#737373;
    background:#151515; color:#e6e6e6;
}
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .author { background:#151515; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content :is(.breadcrumb,.breadcrumb a,figcaption,
.categories > a > span:nth-child(2),.author-role,.story-category,.invitation p) { color:#bdbdbd; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .author-photo { background:#151515; border-color:#aaa; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .button { background:#151515; color:#eee; border-color:#aaa; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .button-dark { background:#eee; color:#151515; border-color:#eee; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .button:hover { background:#303030; color:#fff; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .button-dark:hover { background:#ccc; color:#111; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .social-links img { filter:invert(1); }

/* Author: headings, credential panels, source links and local brand images. */
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile { background:#151515; color:#e6e6e6; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(h1,h2,h3,.fpp-award-rank,.fpp-course-name) { color:#f5f5f5; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-breadcrumb,.fpp-profile-eyebrow,
.fpp-profile-role,.fpp-profile-section-heading > p:not(.fpp-profile-eyebrow),.fpp-credential-kind,.fpp-credential-school,
.fpp-credential-year,.fpp-course-school,.fpp-course-year,.fpp-publication-date,.fpp-publication-card > p:not(.fpp-publication-date),
.fpp-award-year,.fpp-award-category,.fpp-profile-posts-heading > span,.fpp-profile-post-categories,.fpp-profile-post time) { color:#bdbdbd; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .site-main :is(article.fpp-credential-card,.fpp-course-group,.fpp-profile-awards) {
    background:#151515; color:#e6e6e6; border-color:#aaa;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .site-main :is(article.fpp-publication-card,.fpp-award-grid > article + article) { border-color:#737373; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-photo,.fpp-profile-icon) {
    background:transparent; border-color:#aaa;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile .fpp-line-icon { filter:invert(1); }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-shortcuts a,.fpp-profile-contents a,.fpp-social a) {
    background:transparent; color:#eee; border-color:#aaa;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile .fpp-profile-shortcuts a[href^="#"] {
    background:#eee; color:#151515; border-color:#eee;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-shortcuts a:hover,.fpp-profile-contents a:hover,.fpp-social a:hover) {
    background:#eee; color:#151515; border-color:#eee;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-contents a:hover .fpp-line-icon,.fpp-social a:hover img) {
    filter:none; mix-blend-mode:normal;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-source-links a,.fpp-award-source) { color:#eee; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile :is(.fpp-profile-source-links a:hover,.fpp-award-source:hover) { color:#fff; }
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile .fpp-brand-raster {
    background:#fff; outline:2px solid #fff; mix-blend-mode:normal; filter:none;
}
html[data-fpp-theme="dark"] body.fpp-author-profile-page .fpp-author-profile .fpp-award-brand-sindijor { background:#fff; outline:2px solid #fff; }
html[data-fpp-theme="dark"] body .fpp-social a { border-color:#aaa; }
html[data-fpp-theme="dark"] body .fpp-social a:hover { background:#eee; color:#151515; }
html[data-fpp-theme="dark"] body .fpp-social a:hover img { filter:none; mix-blend-mode:normal; }

/* Native archives, pagination and the existing not-found page. */
html[data-fpp-theme="dark"] :is(.site-main .entry-summary,.archive-description,.site-main .entry-footer,.site-main .page-header .post-count) { color:#bdbdbd; }
html[data-fpp-theme="dark"] .pagination .page-numbers { color:#eee; border-color:#737373; }
html[data-fpp-theme="dark"] .pagination .page-numbers.current { background:#eee; color:#151515; border-color:#eee; }
html[data-fpp-theme="dark"] .fpp404-button { background:#151515; color:#eee; border-color:#aaa; }
html[data-fpp-theme="dark"] .fpp404-button-primary { background:#eee; color:#151515; }
html[data-fpp-theme="dark"] :is(.fpp404-art,.fpp404-number) { color:#eee; }
html[data-fpp-theme="dark"] .fpp404-brush { fill:#eee; }
@media print {
    html[data-fpp-theme="dark"] body,html[data-fpp-theme="dark"] #page,html[data-fpp-theme="dark"] .site-content { background:#fff !important; color:#111 !important; }
    .fpp-theme-toggle { display:none !important; }
}

/* Override the light-only accessibility declarations that intentionally use !important. */
html[data-fpp-theme="dark"] body :is(.entry-meta,.entry-meta .byline,.entry-meta a,.entry-meta time,.entry-header .category a) { color:#bdbdbd !important; }
html[data-fpp-theme="dark"] body.fpp-about-page :is(.breadcrumb a,.categories a span,.author-copy .eyebrow,.author-role) { color:#bdbdbd !important; }
html[data-fpp-theme="dark"] body #page :focus-visible { outline-color:#ddd !important; }

html[data-fpp-theme="dark"] body #crumbs :is(a,span) { color:#bdbdbd; }
html[data-fpp-theme="dark"] body.fpp-about-page .fpp-about-content .breadcrumb :is(a,span) { color:#bdbdbd !important; }
html[data-fpp-theme="dark"] body .error-num { color:#bdbdbd !important; }

html[data-fpp-theme="dark"] body .page-header :is(.sub-title,.post-count) { color:#bdbdbd; }
