.af-appearance {
    --af-button-bg: #f8fbfa;
    --af-button-ink: #244b4a;
    --af-button-line: #cbddda;
    position: fixed;
    z-index: 1000;
    right: calc(max(5px, env(safe-area-inset-right)) - 2px);
    bottom: calc(max(4px, env(safe-area-inset-bottom)) + 50px);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--af-button-line);
    border-radius: 50%;
    background: var(--af-button-bg);
    color: var(--af-button-ink);
    box-shadow: 0 3px 12px #14232324;
    cursor: pointer;
    transition: box-shadow 150ms ease;
}
.af-appearance[hidden] { display: none; }
.af-appearance:hover { box-shadow: 0 5px 16px #14232336; }
.af-appearance:focus-visible { outline: 2px solid #459993; outline-offset: 4px; }
.af-appearance-icon::before { content: "☾"; display: block; font: 29px/1 system-ui, sans-serif; }
[data-arkeofili-theme="dark"] .af-appearance {
    --af-button-bg: #263434;
    --af-button-ink: #c4e7e2;
    --af-button-line: #4c6664;
}
[data-arkeofili-theme="dark"] .af-appearance-icon::before { content: "☀"; font-size: 21px; }
@media (prefers-reduced-motion: reduce) {
    .af-appearance { transition: none; }
}

html[data-arkeofili-theme="dark"] {
    --af-bg: #171b1c;
    --af-panel: #202526;
    --af-raised: #292f30;
    --af-text: #eef0ed;
    --af-muted: #adbab8;
    --af-accent: #90d2ca;
    --af-line: #3b4545;
    background: var(--af-bg);
    color-scheme: dark;
}
[data-arkeofili-theme="dark"] :is(body, #td-outer-wrap, .td-container-wrap, .td-main-content-wrap, .td-post-template-default, .td-main-page-wrap, .td-pb-row, .tdb-content-horiz-left, .td-pb-span8, .td-pb-span4) {
    background-color: var(--af-bg) !important;
    color: var(--af-text);
}
[data-arkeofili-theme="dark"] :is(.td-header-wrap, .td-header-menu-wrap, .td-header-menu-wrap-full, .td-header-main-menu, .td-header-mob, .tdb-header-template-wrap, .tdb_header_menu .tdb-menu, .tdb_header_menu .sub-menu, .tdb_header_menu .tdb-sub-menu, .td-drop-down-search, .tdb-drop-down-search, .tdb-drop-down-search-inner, .td-footer-wrapper, .td-sub-footer-container, .td-search-box-wrap, .tdb_mobile_horiz_menu, #td-mobile-nav, .td-menu-background, .td-login-panel, .white-popup-block) {
    background-color: var(--af-panel) !important;
    color: var(--af-text);
}
[data-arkeofili-theme="dark"] :is(.td_block_wrap, .tdb-block-inner, .td_block_inner, .tdb_module_loop, .td_module_wrap, .td-module-container, .tdb-author-box, .td-post-next-prev-content, .td-post-sharing-bottom, .tdb_single_content, .td-post-content, .td-page-content, .comments, .comment-body, .comment-respond, .widget, .tdb_header_search, .tdb-search-form, .td-pulldown-filter-list, .td-next-prev-wrap a, .page-nav a, .page-nav span, .tdb-block-inner .tdb-menu-items-dropdown) {
    background-color: transparent;
    color: var(--af-text);
    border-color: var(--af-line);
}
[data-arkeofili-theme="dark"] :is(.entry-title, .entry-title a, .td-module-title a, .td-block-title, .td-block-title a, .tdb-title-text, .tdb-title-text a, .tdb-menu a, .tdb-sub-menu a, .sf-menu a, .td-mobile-content a, .tdb-mobile-menu a, .tdb-head-search-btn i, .tdb-header-search-icon, .tdb-mobile-menu-button, .tdb-breadcrumbs a, .tdb-breadcrumbs span, .tdb-category-title, .tdb-author-name, .tdb-author-name a, .td-post-content, .tdb_single_content, .td-post-content p, .tdb_single_content p, .td-page-content, .comment-text, .td-next-prev-wrap a, .page-nav a, .page-nav span, .td-footer-wrapper a) {
    color: var(--af-text) !important;
}
[data-arkeofili-theme="dark"] :is(.td-post-date, .td-post-date time, .td-module-date, .td-module-date time, .td-module-meta-info, .td-editor-date, .td-excerpt, .tdb-excerpt, .td-post-author-name a, .tdb-author-name, .wp-element-caption, .wp-caption-text, .td-post-views, .td-post-views span) {
    color: var(--af-muted) !important;
}
[data-arkeofili-theme="dark"] :is(.td-post-content, .tdb_single_content, .td-page-content, .comment-text) a {
    color: var(--af-accent) !important;
}
[data-arkeofili-theme="dark"] :is(.tdb-menu a, .sf-menu a, .td-module-title a, .td-mobile-content a, .tdb-mobile-menu a):hover {
    color: var(--af-accent) !important;
}
[data-arkeofili-theme="dark"] :is(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, select) {
    background: var(--af-raised) !important;
    color: var(--af-text) !important;
    border-color: var(--af-line) !important;
}
[data-arkeofili-theme="dark"] :is(input, textarea)::placeholder { color: var(--af-muted); }
[data-arkeofili-theme="dark"] :is(.tdb_single_content, .td-post-content, .td-page-content) :is(hr, blockquote, table, th, td) {
    border-color: var(--af-line);
}
[data-arkeofili-theme="dark"] :is(.tdb_single_content, .td-post-content, .td-page-content) :is(h1, h2, h3, h4, h5, h6) {
    color: var(--af-text);
}
[data-arkeofili-theme="dark"] :is(.tdb_single_content, .td-post-content, .td-page-content) :is(pre, code, mark, blockquote) {
    background-color: var(--af-raised);
    color: var(--af-text);
}


html[data-arkeofili-theme="dark"] :is(.td-post-template-default article.post, .td-main-content-wrap article.page, .td-full-width-content) {
    background-color: var(--af-bg) !important;
    color: var(--af-text);
}
html[data-arkeofili-theme="dark"] body :is(.td_module_wrap .entry-title a, .td-module-container .entry-title a, .td-icon-search, .td_social_button a, .td-post-header .td-author-by, .td-post-header .td-post-comments a) {
    color: var(--af-text) !important;
}
html[data-arkeofili-theme="dark"] body .td-full-width-content p {
    color: var(--af-text);
}
html[data-arkeofili-theme="dark"] body .td-full-width-content :is(.wp-block-heading, h3.wp-block-heading) {
    color: var(--af-text);
    border-color: var(--af-line);
}


.td-scroll-up[data-style="style1"] {
    right: max(5px, env(safe-area-inset-right));
    bottom: max(4px, env(safe-area-inset-bottom));
}

:is(.td-main-logo img, .td-main-menu-logo img, .td-logo-in-header img, .tdb_header_logo img, .footer-logo-wrap img) {
    object-fit: contain;
}

html[data-arkeofili-theme="light"] {
    color-scheme: light;
    --af-light-surface: #f4f7f6;
    --af-light-line: #dae4e1;
    --af-light-ink: #263b39;
}
html[data-arkeofili-theme="light"] :is(.td-header-top-menu-full, .td-footer-wrapper, .td-sub-footer-container, .td-footer-template-wrap, .td-menu-background, #td-mobile-nav, .td-header-mob) {
    background-color: var(--af-light-surface) !important;
    background-image: none !important;
    color: var(--af-light-ink) !important;
    border-color: var(--af-light-line);
}
html[data-arkeofili-theme="light"] :is(.td-header-top-menu, .td-footer-wrapper, .td-sub-footer-container, .td-footer-template-wrap, .td-mobile-content, #td-mobile-nav) :is(a, p, h2, h3, h4, time, .td-mobile-close a, .td-icon-close-mobile) {
    color: var(--af-light-ink) !important;
}
html[data-arkeofili-theme="light"] :is(.td-footer-wrapper, .td-sub-footer-container, .td-footer-template-wrap) {
    border-top: 1px solid var(--af-light-line);
}
html[data-arkeofili-theme="dark"] .td-banner-wrap-full .td-header-sp-logo {
    background-color: transparent !important;
}


@media (max-width: 767px) {
    html[data-arkeofili-theme="light"] :is(.td-header-menu-wrap-full, .td-header-menu-wrap, .td-header-main-menu, .td-mobile-container) {
        background-color: var(--af-light-surface) !important;
        background-image: none !important;
    }
    html[data-arkeofili-theme="light"] :is(.td-header-main-menu, .td-header-mob) :is(.td-icon-mobile, .td-icon-search, .tdb-mobile-menu-button) {
        color: var(--af-light-ink) !important;
    }
}

html[data-arkeofili-theme="light"] body :is(.td-footer-wrapper, .td-sub-footer-container, .td-footer-template-wrap) :is(.block-title, .td-block-title, .block-title span, .td-block-title span) {
    color: var(--af-light-ink) !important;
    background-color: transparent !important;
}

.af-sidebar {
    --af-sidebar-text: #263b39;
    --af-sidebar-bg: #f4f7f6;
    --af-sidebar-line: #dce6e2;
    --af-sidebar-accent: #286b65;
    color: var(--af-sidebar-text);
    margin: 0 0 32px;
}
[data-arkeofili-theme="dark"] .af-sidebar {
    --af-sidebar-text: #eef0ed;
    --af-sidebar-bg: #202526;
    --af-sidebar-line: #3b4545;
    --af-sidebar-accent: #90d2ca;
}
.af-sidebar-panel {
    padding: 18px;
    margin-bottom: 16px;
    background: var(--af-sidebar-bg);
    border: 1px solid var(--af-sidebar-line);
    border-radius: 8px;
}
.af-sidebar-panel h2 {
    color: var(--af-sidebar-text);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 15px;
}
.af-sidebar-panel ul { margin: 0; padding: 0; list-style: none; }
.af-sidebar-panel li { margin: 0; }
.af-sidebar-panel li + li { border-top: 1px solid var(--af-sidebar-line); }
.af-sidebar-panel a { color: var(--af-sidebar-text); }
.af-sidebar-panel a:hover, .af-sidebar-panel a:focus-visible { color: var(--af-sidebar-accent); }
.af-sidebar-stories a { display: flex; gap: 10px; align-items: center; padding: 9px 0; font-weight: 600; line-height: 1.35; }
.af-sidebar-stories img { width: 62px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.af-sidebar-topics a { display: block; padding: 6px 0; }

html[data-arkeofili-theme="dark"] body :is(.td-logo, .td-main-logo, .td-main-logo img, .td-logo-in-header, .td-banner-wrap-full, .td-header-sp-logo) {
    background: transparent !important;
    box-shadow: none !important;
}
html[data-arkeofili-theme="dark"] body :is(.sf-menu .sub-menu, .tdb-menu .sub-menu, .tdb-sub-menu) {
    background: var(--af-panel) !important;
    border-color: var(--af-line) !important;
}
html[data-arkeofili-theme="dark"] body :is(.sf-menu .sub-menu li, .sf-menu .sub-menu li a, .tdb-menu .sub-menu li, .tdb-menu .sub-menu a) {
    background: transparent !important;
    color: var(--af-text) !important;
}
html[data-arkeofili-theme="dark"] body :is(.sf-menu .sub-menu a, .tdb-menu .sub-menu a):is(:hover, :focus-visible) {
    background: var(--af-raised) !important;
    color: var(--af-accent) !important;
}
html[data-arkeofili-theme="dark"] body .td-tags :is(a, span) {
    background: var(--af-panel) !important;
    border-color: var(--af-line) !important;
    color: var(--af-text) !important;
}
html[data-arkeofili-theme="dark"] body :is(.td-post-next-prev-content a, .author-box-wrap .td-author-name a, .author-box-wrap .desc) {
    color: var(--af-text) !important;
}
html[data-arkeofili-theme="dark"] body .td-post-next-prev-content span {
    color: var(--af-muted) !important;
}
html[data-arkeofili-theme="dark"] body :is(.td-post-next-prev-content a, .author-box-wrap .td-author-name a, .td-tags a):is(:hover, :focus-visible) {
    color: var(--af-accent) !important;
}
html[data-arkeofili-theme="dark"] body :is(.author-box-wrap, .td-next-prev-separator, .td-post-sharing-bottom) {
    border-color: var(--af-line) !important;
}
html[data-arkeofili-theme="dark"] .td-post-sharing-classic {
    display: none !important;
}

html[data-arkeofili-theme="dark"] body :is(.td-page-content, .td-full-width-content) :is(p, li, dt, dd, td, th, caption, figcaption, label, strong, b, em, i, span, h1, h2, h3, h4, h5, h6) {
    color: var(--af-text) !important;
}
html[data-arkeofili-theme="dark"] body :is(.td-page-content, .td-full-width-content) a,
html[data-arkeofili-theme="dark"] body :is(.td-page-content, .td-full-width-content) a :is(span, strong, em) {
    color: var(--af-accent) !important;
}

html[data-arkeofili-theme="dark"] body .td-page-content .td-read-more a {
    background: var(--af-panel) !important;
    color: var(--af-accent) !important;
    border: 1px solid var(--af-line);
}
.td_block_related_posts :is(.td-related-right, .td-next-prev-wrap),
.td_block_related_posts_mob :is(.td-related-right, .td-next-prev-wrap) {
    display: none !important;
}
.td_block_related_posts .td-related-left,
.td_block_related_posts_mob .td-related-left {
    pointer-events: none;
}

html[data-arkeofili-theme="light"] body :is(#login-form-mobile, #login-form) :is(.td-login-title, .td-login-panel-title, .td-login-panel-descr, .td-login-info-text, .td-login-input, label, a, i) {
    color: #263b39 !important;
}
html[data-arkeofili-theme="light"] body :is(#login-form-mobile, #login-form) .td-login-input::placeholder {
    color: #556966 !important;
    opacity: 1;
}
html[data-arkeofili-theme="light"] body :is(#login-form-mobile, #login-form) .td-login-input {
    background: #fff !important;
    border-color: #7a9590 !important;
}

.td-header-top-menu .td_ul_login,
#td-mobile-nav .td-menu-login-section {
    display: none !important;
}

@media (min-width: 768px) {
    .td-header-style-1 .td-header-header .td-header-sp-logo {
        width: 235.4px;
    }
    .td-header-style-1 .td-header-header .td-main-logo img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}
@media (min-width: 1019px) {
    .td-header-style-1 .td-header-header .td-header-sp-logo {
        width: 246.4px;
    }
}
@media (min-width: 1141px) {
    .td-header-style-1 .td-header-header .td-header-sp-logo {
        width: 312.4px;
    }
}

@media (max-width: 767px) {
    .td-header-wrap .td-logo-in-header .td-main-logo img {
        width: min(213.4px, 58.3vw);
        max-width: none;
        height: auto;
    }
}

@media (min-width: 768px) {
    .td-header-style-1 .td-header-header .td-header-sp-logo {
        margin-top: 6px;
    }
}

@media (max-width: 767px) {
    body.single-post :is(.td_block_related_posts, .td_block_related_posts_mob) {
        display: none !important;
    }
}
@media (min-width: 768px) {
    .af-sidebar .af-related-mobile-only {
        display: none;
    }
}

/* Keep the three information widgets out of the editorial links column. */
.td-footer-wrapper .af-footer-information {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: min(1068px, calc(100% - 40px));
    margin: 28px auto 36px;
    align-items: start;
}
.td-footer-wrapper .af-footer-information .widget {
    margin: 0;
    min-width: 0;
}
.td-footer-wrapper .af-footer-information .textwidget img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0;
}
:is(.td-footer-wrapper, #td-mobile-nav) .td-social-icon-wrap[hidden] {
    display: none !important;
}
@media (max-width: 767px) {
    .td-footer-wrapper .af-footer-information {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
}
html[data-arkeofili-theme="light"] .td-footer-wrapper.td-footer-container .af-footer-information > .widget :is(.block-title, .block-title span, .textwidget, .textwidget a) {
    color: #263b39 !important;
}
html[data-arkeofili-theme="dark"] .td-footer-wrapper.td-footer-container .af-footer-information > .widget :is(.block-title, .block-title span, .textwidget, .textwidget a) {
    color: #eef0ed !important;
}

html[data-arkeofili-theme="light"] body #td-mobile-nav :is(.td-menu-socials i, .td-element-after, .td-icon-close-mobile) {
    color: #263b39 !important;
}
html[data-arkeofili-theme="dark"] body #td-mobile-nav :is(.td-menu-socials i, .td-element-after, .td-icon-close-mobile),
html[data-arkeofili-theme="dark"] body .vc_wp_recentcomments .recentcomments a {
    color: #eef0ed !important;
}
html[data-arkeofili-theme="dark"] body .vc_wp_recentcomments .recentcomments a:hover,
html[data-arkeofili-theme="dark"] body .vc_wp_recentcomments .recentcomments a:focus-visible {
    text-decoration: underline;
}
