/* Graphite / silver palette. Child-theme overrides load after Sumaji and homepage styles. */
html[data-sumaji-theme="dark"] {
    --sumaji-theme-bg:#0c0d10;
    --sumaji-theme-surface:#141519;
    --sumaji-theme-surface-2:#1c1d23;
    --sumaji-theme-text:#f5f5f7;
    --sumaji-theme-muted:#a7a9b4;
    --sumaji-theme-border:#34363f;
    --sumaji-theme-border-soft:#282a32;
    --sumaji-theme-link:#b4bef5;
    --sumaji-theme-link-hover:#d6dcff;
    --sumaji-theme-input-bg:#1c1d23;
    --sumaji-theme-input-text:#f5f5f7;
    --sumaji-theme-code-bg:#1c1d23;
    --sumaji-theme-selection-bg:#414973;
    --sumaji-theme-selection-text:#ffffff;
    --sumaji-theme-scrollbar-bg:#141519;
    --sumaji-theme-scrollbar-thumb:#34363f;
    --sumaji-theme-scrollbar-thumb-hover:#555966;
    --global-palette1:#b4bef5;
    --global-palette2:#d6dcff;
    --global-palette3:#f5f5f7;
    --global-palette4:#d1d2da;
    --global-palette5:#a7a9b4;
    --global-palette6:#a7a9b4;
    --global-palette7:#34363f;
    --global-palette8:#141519;
    --global-palette9:#0c0d10;
}
html[data-sumaji-theme="dark"] .entry-hero-container-inner {
    background:linear-gradient(120deg,#17181e,#101115) !important;
    border-bottom:1px solid #282a32;
}
html[data-sumaji-theme="dark"] .hero-section-overlay {background:transparent !important}
html[data-sumaji-theme="dark"] .entry-title a,
html[data-sumaji-theme="dark"] .site-title a,
html[data-sumaji-theme="dark"] .navigation a {color:#f5f5f7 !important}
html[data-sumaji-theme="dark"] .entry-title a:hover {color:#b4bef5 !important}
html[data-sumaji-theme="dark"] .entry-meta,
html[data-sumaji-theme="dark"] .entry-meta a,
html[data-sumaji-theme="dark"] .entry-meta span {color:#a7a9b4 !important}
html[data-sumaji-theme="dark"] .entry-summary p {color:#c2c4ce !important}
/* Stretch archive cards to their grid row and keep reading links at the bottom. */
:is(.archive,.blog,.search-results) .kadence-posts-list .entry-list-item > .loop-entry {
    display:flex;
    flex-direction:column;
    flex:1;
    min-width:0;
}
:is(.archive,.blog,.search-results) .kadence-posts-list .loop-entry > .post-thumbnail {
    flex-shrink:0;
}
:is(.archive,.blog,.search-results) .kadence-posts-list .loop-entry > .entry-content-wrap {
    display:flex;
    flex-direction:column;
    flex:1;
    min-width:0;
}
:is(.archive,.blog,.search-results) .kadence-posts-list .loop-entry > .entry-content-wrap > .entry-footer {
    margin-top:auto;
}
html[data-sumaji-theme="dark"] .loop-entry {border:1px solid #282a32 !important;border-radius:16px;overflow:hidden}
html[data-sumaji-theme="dark"] .entry-taxonomies a,
html[data-sumaji-theme="dark"] .post-more-link {color:#b4bef5 !important}
html[data-sumaji-theme="dark"] .primary-menu-container .sub-menu {
    background:#1c1d23 !important;border:1px solid #34363f;
    border-radius:12px;padding:8px;box-shadow:0 18px 48px #00000055;
}
html[data-sumaji-theme="dark"] .primary-menu-container .sub-menu a {
    background:transparent !important;color:#d1d2da !important;border-radius:6px;
}
html[data-sumaji-theme="dark"] .primary-menu-container > ul > li:last-child > .sub-menu {right:0;left:auto}
html[data-sumaji-theme="dark"] .primary-menu-container .sub-menu a:hover,
html[data-sumaji-theme="dark"] .primary-menu-container .sub-menu a:focus {background:#2a2c36 !important;color:#ffffff !important}
html[data-sumaji-theme="dark"] .popup-drawer .drawer-inner {background:#141519 !important}
html[data-sumaji-theme="dark"] .mobile-navigation a {color:#d1d2da !important}
/* Brighter mobile drawer with explicit text/icon contrast in the dark palette. */
html[data-sumaji-theme="dark"] #mobile-drawer .drawer-inner {
    background:#242834 !important;
    color:#f4f6fc !important;
    color-scheme:dark;
}
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation a {
    color:#f4f6fc !important;
    opacity:1;
}
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation ul li {
    border-color:#454d60 !important;
}
html[data-sumaji-theme="dark"] #mobile-drawer .drawer-sub-toggle,
html[data-sumaji-theme="dark"] #mobile-drawer .drawer-header .drawer-toggle {
    background:#353d50 !important;
    border-color:#59647c !important;
    color:#f4f6fc !important;
    border-radius:8px;
}
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation a:hover,
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation a:focus-visible,
html[data-sumaji-theme="dark"] #mobile-drawer .drawer-sub-toggle:hover,
html[data-sumaji-theme="dark"] #mobile-drawer .drawer-header .drawer-toggle:hover {
    background:#414d66 !important;
    color:#ffffff !important;
}
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation .current-menu-item > a,
html[data-sumaji-theme="dark"] #mobile-drawer .mobile-navigation .current-menu-item > .drawer-nav-drop-wrap > a {
    color:#c6d8ff !important;
}
html[data-sumaji-theme="dark"] a:focus-visible,
html[data-sumaji-theme="dark"] button:focus-visible {outline:2px solid #b4bef5;outline-offset:4px}
html[data-sumaji-theme="dark"] .sumaji-article-reader .sumaji-article-reader__play {
    background:#b4bef5 !important;color:#101115 !important;border-color:#b4bef5 !important;
}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) {
    --ink:#f5f5f7;--muted:#a7a9b4;--line:#282a32;--paper:#0c0d10;--accent:#b4bef5;
}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-card-inner {
    background:#141519;border-color:#282a32;border-radius:16px;
}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-card-inner:hover {border-color:#555966;box-shadow:0 12px 32px #00000030}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-card-foot {border-color:#282a32}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-cover,
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-feature-image {background:#1c1d23;border-radius:12px}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-cover {border-radius:0}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-art {
    color:#e2e4ef;background:radial-gradient(ellipse at 90% 100%,#30364c 0%,transparent 65%),linear-gradient(125deg,#202229,#17181e);
}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-art small,
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-art span {color:#a7a9b4}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-art:after {
    border-color:#929bbe;box-shadow:0 0 0 22px #b4bef509,0 0 0 44px #b4bef507,0 0 0 66px #b4bef505;opacity:.3;
}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-categories .bh-tag {color:#b4bef5 !important}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-categories .bh-tag--format {color:#a7a9b4 !important}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-filter:hover {background:#1c1d23 !important;border-color:#555966 !important}
html[data-sumaji-theme="dark"] :is(#bosian-home, .bosian-article-list) .bh-filter[aria-current=page]:hover {background:var(--ink) !important}

/* Static comment labels stay above inputs in every state, including autofill. */
#commentform .comment-input-wrap {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    margin:0 0 24px;
}
#commentform p.comment-form-comment,
#commentform .comment-input-wrap p {
    display:block;
    min-width:0;
    margin:0 0 24px;
}
#commentform .comment-input-wrap p {margin:0}
#commentform label,
#commentform input:placeholder-shown + label,
#commentform input:not(:placeholder-shown) + label,
#commentform input:focus + label,
#commentform textarea:placeholder-shown + label,
#commentform textarea:not(:placeholder-shown) + label,
#commentform textarea:focus + label {
    display:block;
    position:static;
    transform:none;
    max-width:none;
    padding:0;
    margin:0 0 8px;
    font-size:16px;
    line-height:1.5;
    white-space:normal;
    cursor:default;
}
#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
    display:block;
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0;
    padding:12px 14px;
    border-radius:8px;
    font-size:16px;
    line-height:1.6;
}
#commentform textarea {min-height:180px;resize:vertical}
#commentform input:focus-visible,
#commentform textarea:focus-visible {outline:2px solid #b4bef5;outline-offset:2px}
#commentform p.comment-form-cookies-consent {
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:0 0 24px;
}
#commentform .comment-form-cookies-consent input[type="checkbox"] {
    flex:0 0 18px;
    width:18px;
    height:18px;
    margin:3px 0 0;
}
#commentform .comment-form-cookies-consent label {
    flex:1;
    min-width:0;
    padding:0;
    margin:0;
    font-size:15px;
    line-height:1.6;
}
#commentform .comment-notes {font-style:normal;line-height:1.7;margin:0 0 24px}
@media (max-width:766px) {
    #commentform .comment-input-wrap {grid-template-columns:minmax(0,1fr)}
}
/* Shared footer rhythm: one centered copyright line and consistent breathing room. */
#colophon .site-bottom-footer-inner-wrap {min-height:88px;padding:24px 0;align-items:center}
#colophon .footer-html {margin:0;text-align:center;font-size:14px;line-height:24px}
#colophon .footer-html p {margin:0}

/* Shared floating navigation controls: transparent outlined buttons. */
:is(#kt-scroll-up, #kt-scroll-up-reader, #bosian-comment-jump) {
    width:44px;height:44px;padding:0;box-sizing:border-box;
    border:2px solid currentColor;border-color:currentColor !important;border-radius:50%;
    background:transparent !important;color:#bfc7d3 !important;
    font-size:20px;line-height:1;box-shadow:none;
    transition:color .15s ease;
}
:is(#kt-scroll-up, #kt-scroll-up-reader, #bosian-comment-jump) svg {width:28px;height:28px;flex:none}
:is(#kt-scroll-up, #kt-scroll-up-reader) .kadence-svg-iconset {display:flex;width:100%;height:100%;align-items:center;justify-content:center}
:is(#kt-scroll-up, #kt-scroll-up-reader, #bosian-comment-jump):hover {background:transparent !important;color:#f5f5f7 !important}
:is(#kt-scroll-up, #kt-scroll-up-reader, #bosian-comment-jump):focus-visible {outline:2px solid #b4bef5;outline-offset:4px}
@media (prefers-reduced-motion:reduce) {
    :is(#kt-scroll-up, #kt-scroll-up-reader, #bosian-comment-jump) {transition:none}
}
