/*
Theme Name: 21st District Theme
Description: Green-and-gold website and member portal shell. Existing WordPress pages, navigation, widgets and page-builder content remain native.
Version: 0.9.0
Requires at least: 6.4
Requires PHP: 8.1
Author: Schill Solutions
Author URI: https://schillsolutions.com/
License: GPL-2.0-or-later
Text Domain: district21-theme
Update URI: https://schillsolutions.com/schill-updates.php?product=21st-district-theme
*/

:root {
    --d21-site-bg:#edf3e8; --d21-site-paper:#fff; --d21-site-text:#123d2b;
    --d21-site-muted:#405c4b; --d21-site-line:#d5e2d7; --d21-site-soft:#e7f1e8;
    --d21-site-link:#17643e; --d21-site-gold:#f5c742; --d21-site-on:#103d2b;
    --d21-site-shadow:0 18px 45px rgba(18,61,43,.12),0 3px 10px rgba(18,61,43,.08);
    --d21-site-plane:rgba(74,119,78,.055); --d21-site-pattern:rgba(55,104,66,.16);
    color-scheme:light;
    font:400 16px/1.65 "Segoe UI",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
    color:var(--d21-site-text); background:var(--d21-site-bg);
}
:root[data-d21-theme=dark] {
    --d21-site-bg:#08251a; --d21-site-paper:#113c2c; --d21-site-text:#f7f4e9;
    --d21-site-muted:#afccba; --d21-site-line:#315b46; --d21-site-soft:#1a4b36;
    --d21-site-link:#93d6aa; --d21-site-gold:#f5cf62; --d21-site-on:#08251a;
    --d21-site-shadow:0 18px 45px #0004,0 3px 10px #0003;
    --d21-site-plane:rgba(157,204,164,.025); --d21-site-pattern:rgba(157,204,164,.12);
    color-scheme:dark;
}
*{box-sizing:border-box}body{margin:0;color:var(--d21-site-text);background:var(--d21-site-bg)}
.d21-theme-public{isolation:isolate;background-image:linear-gradient(145deg,transparent 0 48%,var(--d21-site-plane) 48% 64%,transparent 64%),linear-gradient(35deg,transparent 0 38%,var(--d21-site-plane) 38% 58%,transparent 58%);background-size:100% 1100px;background-position:center top}
.d21-theme-public:before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:repeating-linear-gradient(135deg,transparent 0 18px,var(--d21-site-pattern) 18px 19px,transparent 19px 35px);mask-image:linear-gradient(90deg,#000,transparent 22%,transparent 78%,#000);opacity:.65}
a{color:var(--d21-site-link);text-underline-offset:3px}a:hover{text-decoration-thickness:2px}
:where(a,button,input,textarea,select):focus-visible{outline:3px solid var(--d21-site-gold);outline-offset:3px}
img,video,iframe{max-width:100%}img{height:auto}figure{max-width:100%;margin-inline:0}
input,button,select,textarea{font:inherit}input,textarea,select{max-width:100%;background:var(--d21-site-paper);color:var(--d21-site-text);border:1px solid var(--d21-site-line);border-radius:7px;padding:10px 12px}
button,input[type=submit],.d21-theme-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--d21-site-line);border-radius:8px;background:var(--d21-site-paper);color:var(--d21-site-text);text-decoration:none;font-size:14px;font-weight:500;cursor:pointer}
.d21-theme-primary,input[type=submit]{background:var(--d21-site-gold);border-color:var(--d21-site-gold);color:var(--d21-site-on)}
.d21-theme-wrap{width:min(1230px,calc(100% - 64px));margin-inline:auto;min-width:0}
.d21-theme-skip{position:absolute;left:16px;top:0;z-index:100;transform:translateY(-150%);padding:10px 14px;background:var(--d21-site-paper)}
.d21-theme-skip:focus{transform:none}
.d21-theme-header{background:var(--d21-site-paper);border-bottom:1px solid var(--d21-site-line);box-shadow:0 5px 22px rgba(18,61,43,.07)}
.d21-theme-masthead{display:flex;justify-content:space-between;align-items:center;gap:24px;padding-block:12px}
.d21-theme-identity{display:flex;align-items:center;gap:28px;min-width:0}
.d21-theme-brand{display:inline-block;font-size:24px;line-height:1.2;font-weight:600;text-decoration:none;color:var(--d21-site-text)}
.d21-theme-logo{flex:none;line-height:0}.d21-theme-logo img{display:block;width:300px;height:100px;object-fit:contain}
.d21-theme-logo-dark{display:none!important}:root[data-d21-theme=dark] .d21-theme-logo-light{display:none}:root[data-d21-theme=dark] .d21-theme-logo-dark{display:block!important}
.d21-theme-identity .custom-logo{width:190px;max-height:129px;object-fit:contain}
.d21-theme-tagline{max-width:420px;margin:0;color:var(--d21-site-muted);font-size:14px;line-height:1.5}
.d21-theme-header-actions{display:flex;align-items:center;gap:10px;flex:none}.d21-theme-mode{width:44px;padding:8px;font-size:22px}
.d21-theme-nav-bar{border-top:1px solid var(--d21-site-line);background:var(--d21-site-paper)}
.d21-theme-nav ul{margin:0;padding:0;list-style:none}.d21-theme-nav>ul{display:flex;align-items:center;flex-wrap:wrap;gap:0}
.d21-theme-nav li{position:relative}.d21-theme-nav a{display:block;padding:14px 15px;color:var(--d21-site-muted);font-size:14px;line-height:1.4;text-decoration:none}
.d21-theme-nav .current-menu-item>a,.d21-theme-nav .current_page_item>a{color:var(--d21-site-text);box-shadow:inset 0 -3px var(--d21-site-gold);font-weight:600}
.d21-theme-nav a:hover,.d21-theme-nav li:focus-within>a{color:var(--d21-site-text);background:var(--d21-site-soft)}
.d21-theme-nav ul ul{position:absolute;left:0;top:100%;z-index:30;display:none;min-width:240px;max-width:min(320px,85vw);padding:7px;background:var(--d21-site-paper);border:1px solid var(--d21-site-line);border-radius:10px;box-shadow:var(--d21-site-shadow)}
.d21-theme-nav ul ul ul{left:100%;top:0}.d21-theme-nav li:hover>ul,.d21-theme-nav li:focus-within>ul,.d21-theme-nav .d21-submenu-open>ul{display:block}
.d21-theme-nav ul ul a{padding:10px 36px 10px 12px;overflow-wrap:anywhere}.d21-theme-nav .menu-item-has-children>a,.d21-theme-nav .page_item_has_children>a{padding-right:34px}
.d21-submenu-toggle{position:absolute;right:3px;top:7px;z-index:2;width:30px;min-height:32px;padding:3px;border:0;background:transparent;color:var(--d21-site-link);border-radius:50%}
.d21-submenu-toggle svg{fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round}
.d21-submenu-toggle:hover{background:var(--d21-site-soft)}
.d21-submenu-vertical{transform-origin:center;transition:transform .18s ease,opacity .18s ease}
.d21-submenu-toggle[aria-expanded=true] .d21-submenu-vertical{transform:rotate(90deg);opacity:0}
.d21-theme-nav .d21-theme-donate{margin-left:auto;padding:5px 0 5px 18px}
.d21-theme-nav .d21-theme-donate>a{padding:9px 18px;border:1px solid var(--d21-site-gold);border-radius:9px;background:var(--d21-site-gold);color:var(--d21-site-on);font-weight:600;box-shadow:0 3px 8px rgba(18,61,43,.09)}
.d21-theme-nav .d21-theme-donate>a:hover{filter:brightness(.97)}
.d21-theme-menu-toggle{display:none}
/* Center desktop destinations while reserving the same space on both sides
   of the menu when the separate Donate action is present. */
@media(min-width:901px){
    .d21-theme-nav>ul{position:relative;justify-content:center}
    .d21-theme-nav>ul:has(>.d21-theme-donate){padding-inline:132px}
    .d21-theme-nav .d21-theme-donate{position:absolute;right:0;top:50%;transform:translateY(-50%);margin-left:0;padding:5px 0}
}
.d21-theme-main{min-height:65vh;padding-block:38px}.d21-theme-article,.d21-theme-notice{background:var(--d21-site-paper);border:1px solid var(--d21-site-line);border-top:2px solid var(--d21-site-gold);border-radius:18px;padding:clamp(22px,4vw,42px);margin-bottom:26px;box-shadow:var(--d21-site-shadow);overflow-wrap:anywhere;min-width:0}
.home .d21-theme-article{margin-top:0}.d21-theme-article:after{content:"";display:table;clear:both}
.d21-theme-article>h1,.d21-theme-notice h1,.d21-theme-archive-title{margin:0 0 28px;color:var(--d21-site-text);font-size:clamp(28px,3.2vw,40px);line-height:1.2;letter-spacing:-.035em;font-weight:600}
.d21-theme-article>h1:first-letter,.d21-theme-archive-title:first-letter,.d21-theme-notice h1:first-letter,.entry-content h1:first-letter{font-family:DistrictScript,cursive;font-size:1.3em;font-weight:400}
.entry-content{color:var(--d21-site-text);min-width:0;font-size:16px;line-height:1.7;overflow-wrap:anywhere}
.entry-content :where(h1,h2,h3,h4,h5,h6){color:var(--d21-site-text);line-height:1.3;letter-spacing:-.02em;margin:1.35em 0 .65em;font-weight:600}
.entry-content :where(h2){font-size:clamp(23px,2.4vw,30px)}.entry-content :where(h3){font-size:22px}.entry-content :where(p,ul,ol,blockquote,table,pre,figure){margin-block:0 1.2em}.entry-content :where(ul,ol){padding-left:1.4em}.entry-content li+li{margin-top:.3em}
.entry-content blockquote{padding:16px 24px;border-left:3px solid var(--d21-site-gold);background:var(--d21-site-soft);color:var(--d21-site-muted)}
.entry-content table{width:100%;max-width:100%;border-collapse:collapse}.entry-content :where(th,td){padding:12px 14px;border:1px solid var(--d21-site-line);text-align:left;overflow-wrap:anywhere}.entry-content th{background:var(--d21-site-soft)}
.entry-content pre{max-width:100%;overflow:auto;padding:18px;background:var(--d21-site-soft);border-radius:8px}.entry-content code{font-size:.9em}
.entry-content :where(.ow-button-base a,.wp-block-button__link){background:var(--d21-site-gold);border-color:var(--d21-site-gold);color:var(--d21-site-on);border-radius:8px;text-shadow:none}
.entry-content .panel-grid,.entry-content .panel-grid-cell,.entry-content .so-panel{min-width:0}.entry-content .panel-grid{max-width:100%}.entry-content .widget-title{color:var(--d21-site-text)}
/* Override saved SiteOrigin headline colors so both appearance modes stay readable. */
.entry-content .sow-headline-container :is(.sow-headline,.sow-sub-headline,.sow-headline a,.sow-sub-headline a){color:var(--d21-site-text)!important}
/* Reconcile the migrated rounded cards and generated icon colors with the site palette. */
.entry-content .panel-widget-style.so-rounded{background-color:var(--d21-site-soft)!important;border:1px solid var(--d21-site-line)!important;border-radius:12px!important;box-shadow:var(--d21-site-shadow)!important}
.entry-content .sow-features-feature .sow-icon-container{color:var(--d21-site-gold)!important}
.entry-content .sow-features-feature .sow-icon-container>[class^="sow-icon-"]:not(.sow-icon-image){color:var(--d21-site-on)!important}
.entry-content .sow-features-feature :is(.sow-features-feature-title,.sow-features-feature-title a){color:var(--d21-site-text)!important}
/* Replace the source's decorative blue backdrop; retain its content images and original file. */
.home .entry-content .panel-row-style.siteorigin-panels-stretch{background-color:var(--d21-site-bg)!important;background-image:none!important}
/* The source Staff List contact glyphs are black PNGs; keep their bytes and photos unchanged. */
:root[data-d21-theme=dark] .entry-content a.abcfslMR10 img[src*="/staff-list/images/"]{filter:invert(1) brightness(.9)}
.entry-content .wpcf7-list-item{display:block;margin:0 0 8px}.entry-content input[type=checkbox],.entry-content input[type=radio]{accent-color:var(--d21-site-link)}
.d21-theme-footer{background:var(--d21-site-paper);border-top:1px solid var(--d21-site-line);font-size:13px;color:var(--d21-site-muted)}
.d21-theme-footer>.d21-theme-wrap{padding-block:26px}.d21-theme-footer-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:26px}.d21-theme-footer-widget{min-width:0;overflow-wrap:anywhere}.d21-theme-footer-widget .widget-title{margin:0 0 14px;color:var(--d21-site-text);font-size:18px}.d21-theme-footer-widget p{margin:0 0 12px}.d21-theme-footer-widget ul{margin:0;padding-left:18px}.d21-theme-footer-fallback{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.d21-theme-footer a{color:var(--d21-site-muted)}
.d21-theme-pagination{margin-block:24px}.navigation.pagination .nav-links{display:flex;gap:12px;flex-wrap:wrap}.navigation.pagination .page-numbers{padding:7px 12px;border:1px solid var(--d21-site-line);border-radius:6px}.navigation.pagination .current{background:var(--d21-site-soft)}
.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.alignleft{float:left;margin:0 22px 18px 0}.alignright{float:right;margin:0 0 18px 22px}.aligncenter{display:block;margin-inline:auto}.alignwide{max-width:100%}.alignfull{width:100%;max-width:100%}
@media(max-width:900px){
    .d21-theme-wrap{width:calc(100% - 36px)}.d21-theme-tagline{font-size:12px;max-width:260px}.d21-theme-identity{gap:18px}.d21-theme-logo img{width:240px;height:80px}
    .d21-site-js .d21-theme-menu-toggle{display:flex;justify-content:space-between;width:100%;border:0;border-radius:0;padding-inline:0;background:transparent;color:var(--d21-site-text);text-align:left}
    .d21-theme-nav>ul{display:block;padding-block:8px}.d21-site-js .d21-theme-nav>ul{display:none}.d21-site-js.d21-main-menu-open .d21-theme-nav>ul{display:block}
    .d21-theme-nav a{padding:12px 40px 12px 12px}.d21-theme-nav ul ul,.d21-theme-nav ul ul ul{position:static;display:block;min-width:0;max-width:none;box-shadow:none;border:0;border-radius:0;margin-left:16px;padding:0;border-left:1px solid var(--d21-site-line)}
    .d21-site-js .d21-theme-nav ul ul{display:none}.d21-site-js .d21-theme-nav .d21-submenu-open>ul{display:block}.d21-submenu-toggle{right:6px;top:5px;min-height:36px;width:36px}
    .d21-theme-nav .current-menu-item>a,.d21-theme-nav .current_page_item>a{box-shadow:inset 3px 0 var(--d21-site-gold)}
    .d21-theme-nav .d21-theme-donate{padding:8px 0}.d21-theme-nav .d21-theme-donate>a{width:fit-content;min-width:130px}
}
@media(max-width:600px){
    .d21-theme-wrap{width:calc(100% - 28px)}.d21-theme-main{padding-block:24px}.d21-theme-masthead{gap:12px;padding-block:10px}.d21-theme-logo img{width:180px;height:60px}.d21-theme-tagline{display:none}.d21-theme-header-actions{gap:7px}.d21-theme-header-actions .d21-theme-button{padding:9px 11px;font-size:12px}.d21-theme-article,.d21-theme-notice{padding:22px 18px;border-radius:14px}.entry-content{font-size:15px}.alignleft,.alignright{float:none;margin:0 0 18px}.entry-content :where(th,td){padding:8px}.d21-theme-article>h1{margin-bottom:22px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*:before,*:after{animation:none!important;transition:none!important}}

/* Keep open-state announcements and viewport-edge placement aligned with native menus. */
.d21-site-js .d21-theme-nav li.d21-submenu-dismissed>ul{display:none}
@media(min-width:901px){.d21-theme-nav .d21-submenu-flip>ul{left:auto;right:0}.d21-theme-nav ul ul .d21-submenu-flip>ul{left:auto;right:100%}}
