:root{--focus:#176145;--action-bg:#176145;--action-fg:#fff}
[data-theme="dark"]{--focus:#e4f0ae;--action-bg:#a9dfc4;--action-fg:#142c22}
html{color-scheme:light}[data-theme="dark"]{color-scheme:dark}
:focus-visible{outline:3px solid var(--focus)!important;outline-offset:4px}
.btn-primary,button[type="submit"].btn-primary{background:var(--action-bg)!important;color:var(--action-fg)!important}
.btn-primary:hover{filter:brightness(.94)}
header.site-header:not(.brand-header){background:var(--brand-paper,#f6f7f1)!important;color:var(--text-900)!important}
[data-theme="dark"] header.site-header:not(.brand-header){background:#182e23!important;color:#edf5ed!important}
[data-theme="dark"] header.site-header:not(.brand-header) .brand,[data-theme="dark"] header.site-header:not(.brand-header) a{color:#edf5ed!important}
.theme-toggle{display:block!important;width:auto!important;height:auto!important;min-height:44px;border:1px solid currentColor;border-radius:8px;padding:.45rem .6rem;background:var(--brand-paper,#f6f7f1)!important;color:var(--brand-ink,#182e23)!important;font:inherit;max-width:110px}
.theme-control-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.footer a,.footer small,.footer #cookieSettings{color:#e5eee4!important}.footer a:hover{text-decoration:underline}
.footer .chip{border-color:#90ad9e}
.nav-links a.is-active{text-decoration:underline!important;text-underline-offset:7px}
main{min-height:45vh} main h1,main h2{overflow-wrap:anywhere}
.cookie-banner{background:var(--brand-paper,#f6f7f1);color:var(--brand-ink,#182e23);border:1px solid var(--border)}
.cookie-banner button{border:1px solid currentColor;border-radius:8px;padding:.65rem 1rem;cursor:pointer;background:var(--action-bg);color:var(--action-fg)}
.cookie-banner a{color:inherit;text-decoration:underline}
.admin-nav-bar{background:var(--paper,#f6f7f1)!important;color:var(--text-900)!important}
[data-theme="dark"] .admin-nav-bar{background:#182e23!important;color:#edf5ed!important}
.admin-nav-brand{color:inherit!important}
.admin-table-scroll{overflow-x:auto;max-width:100%;border:1px solid var(--border);border-radius:8px}
.admin-table-scroll table{min-width:650px}
.admin-page label{display:block;font-weight:600}.admin-page input,.admin-page select,.admin-page textarea{max-width:100%;color:var(--text-900);background:var(--paper,#fff)}
[data-theme="dark"] .admin-page input,[data-theme="dark"] .admin-page select,[data-theme="dark"] .admin-page textarea{background:#10271d;color:#edf5ed}
.admin-page .error{color:#9f2c1d;background:#fff0eb}[data-theme="dark"] .admin-page .error{color:#ffc7bc;background:#401c16}
.admin-page .login-container{width:calc(100% - 2rem)}
.admin-page [style*="grid-template-columns"]{min-width:0}
.admin-page .msg-unread{background:var(--paper,#f6f7f1)!important}
@media(max-width:760px){.admin-page [style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}.admin-nav-inner{align-items:flex-start}.admin-nav-links{gap:.35rem}.admin-page .container{padding-left:1rem!important;padding-right:1rem!important}.theme-toggle{max-width:90px;font-size:.85rem}.brand{max-width:55%;overflow-wrap:anywhere}.nav-community{display:none!important}}

.policy-sections{display:grid;gap:1rem}.policy-page>.panel{margin-top:1rem}.policy-page .panel{padding:1.5rem}.policy-page h2{font-size:1.4rem}
[data-theme="dark"] .admin-page th,[data-theme="dark"] .admin-page tr[style*="background"]{background:#18392c!important;color:#edf5ed!important}
.admin-page input::placeholder,textarea::placeholder{color:var(--text-600);opacity:1}

button.theme-toggle{display:inline-flex!important;align-items:center;justify-content:center;width:44px!important;height:44px!important;min-width:44px;max-width:44px;padding:10px!important;border-radius:50%;background:transparent!important;color:inherit!important;border:1px solid currentColor;cursor:pointer;transition:background .15s ease}
button.theme-toggle:hover{background:rgba(120,155,133,.16)!important}
button.theme-toggle svg{width:21px;height:21px;flex:none}
button.theme-toggle .icon-sun{display:none!important}button.theme-toggle .icon-moon{display:block!important}
[data-theme="dark"] button.theme-toggle .icon-sun{display:block!important}[data-theme="dark"] button.theme-toggle .icon-moon{display:none!important}

.site-header .mobile-panel{max-height:calc(100dvh - 100%);overflow-y:auto;overscroll-behavior:contain}

.admin-page input[type="password"]{width:100%;min-height:46px;padding:.85rem 1rem;border-radius:12px;border:1px solid rgba(20,90,67,.25);background:var(--surface);color:var(--text-900)}
[data-theme="dark"] .admin-page input[type="password"]{background:#10271d;border-color:#486052;color:#edf5ed}

/* Control states remain legible on every homepage section surface. */
:root{--control-outline:#71816e;--field-error-text:#a32e23}
[data-theme="dark"]{--control-outline:#8eaa8d;--field-error-text:#ffc7bc}
.field-error{color:var(--field-error-text)}
.brand-home .brand-connect input,.brand-home .brand-connect textarea{border-color:var(--control-outline)}
.brand-home .brand-connect input:focus,.brand-home .brand-connect textarea:focus{border-color:var(--focus)}
.footer,.brand-hero,.brand-header{--focus:#e4f0ae}

/* Shared reading layout for policy and support pages. */
.policy-page{max-width:900px;padding:3rem 1rem 4rem;overflow-wrap:anywhere}
.policy-home{display:inline-flex;align-items:center;min-height:44px;margin-bottom:1rem}
.policy-heading{margin-bottom:2rem}
.policy-heading h1{font-size:clamp(2rem,5vw,3rem);line-height:1.15;margin:0 0 1rem}
.policy-page p{line-height:1.75;max-width:72ch}
.policy-page .panel h2{line-height:1.35;margin:0 0 .7rem}
.policy-page .panel p{margin:0}
.policy-page .panel a,.policy-home{text-decoration:underline;text-underline-offset:3px}
@media(max-width:480px){.policy-page{padding-top:1.5rem}.policy-page .panel{padding:1.15rem}.policy-heading{margin-bottom:1.5rem}}

/* Small admin refinements: consistent fields and compact, wrapping navigation. */
.admin-logout { margin:0; }
.admin-nav-links .admin-logout button { padding:.4rem .8rem; font-size:.9rem; }
.admin-page #socialRows select,.admin-page #socialRows input[type="url"] { width:100%; min-width:0; min-height:44px; padding:.65rem .75rem; border:1px solid var(--control-outline); border-radius:8px; font:inherit; }
.admin-page .admin-hidden-badge { display:block; width:fit-content; margin-top:.35rem; padding:.2rem .5rem; border:1px solid var(--control-outline); border-radius:6px; font-size:.75rem; color:var(--text-700); }
.admin-page .admin-visibility-note { padding:.8rem 1rem; border-left:3px solid var(--control-outline); background:var(--surface); line-height:1.6; }
@media(max-width:760px) {
  .admin-nav-bar { padding:.5rem .75rem; }
  .admin-nav-inner { gap:.5rem; }
  .admin-nav-links { gap:.25rem; }
  .admin-nav-links > .btn,.admin-nav-links .admin-logout button { padding:.35rem .5rem!important; font-size:.8rem!important; min-height:44px; }
  .admin-page #socialRows { row-gap:.6rem!important; }
}
