/* HTNG V13: one scoped visual layer, design token fixes only (no legacy CSS). */
:root{--danger:#c52d42;--danger-soft:#fff0f2;--success:#197353;--success-soft:#e7f8f0}
html,body{scrollbar-width:none}*::-webkit-scrollbar{width:0;height:0;display:none}
/* Consistent status: semantic colors remain red/green regardless of theme. */
.htng-v12-site .status,.htng-php-page .status{background:var(--success-soft);color:var(--success);border:1px solid #a9e7cb}
.htng-v12-site .status.closed,.htng-php-page .status.closed{background:var(--danger-soft);color:#b5253e;border:1px solid #f3bcc5}
.htng-v12-site .status.closed .dot{background:#c52d42;box-shadow:0 0 0 4px rgba(197,45,66,.12)}
/* The image is the image selected in Admin / Media; preserve CSS machine only for missing file. */
.hero-picture.managed-hero{background:#d7e5ef;isolation:isolate}
.hero-uploaded-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;position:absolute;inset:0;z-index:4}
.hero-picture.managed-hero:not(.missing-upload) :is(.hero-cloud,.machine-display){display:none}
.hero-picture.managed-hero:after{z-index:5;pointer-events:none}
.hero-uploaded-image[hidden]{display:none}
/* Hero counters must be readable in both themes. */
.stats-float{color:#15243a;background:#fff;border-color:#dbe4ee}
.stats-float strong{color:inherit;letter-spacing:-.02em;font-weight:850}
.stats-float small{color:#5c6982;opacity:1}
/* Original layout, reversed content ordering: tiles left / explanation right. */
.about-reverse .about-copy{order:2;min-width:0}
.about-reverse .about-tiles{order:1;min-width:0}
/* Blog: cover images are tied to the admin blog's image attribute. */
.post-card{padding:0!important;overflow:hidden;display:flex;flex-direction:column}
.post-card-content{padding:25px 27px 29px;flex:1}
.post-thumb{display:block;position:relative;height:198px;min-height:198px;width:100%;overflow:hidden;background:linear-gradient(135deg,#deecf8,#b5d1ec);border-radius:22px 22px 0 0}
.post-thumb img{width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .45s var(--easing)}
.post-card:hover .post-thumb img{transform:scale(1.04)}
.post-thumb-empty{background:linear-gradient(130deg,#193754,#6b99c5)}
.post-placeholder-symbol{width:100%;height:100%;display:grid;place-items:center;color:#eaf5ff}
.post-placeholder-symbol svg{width:68px;height:68px;stroke-width:1.25}
.blog-row{grid-template-columns:minmax(115px,1.1fr) minmax(145px,1.45fr) minmax(0,5fr) 20px;align-items:center;gap:22px}
.blog-row .post-thumb{height:125px;min-height:125px;border-radius:15px;border:1px solid var(--line)}
.blog-row .post-thumb-empty svg{width:35px;height:35px}
.blog-row-content{min-width:0}.blog-row-content h3{font-size:clamp(1.05rem,1.5vw,1.4rem);margin:0 0 10px}.blog-row-content p{margin-bottom:10px}
.blog-row .blog-meta{align-self:start;display:flex;flex-direction:column;gap:8px}
/* no theme switch should turn a light pill into white-on-white text */
.service-tabs a{color:#243853;background:#fff;border-color:#d1deeb}
.service-tabs a.active{background:#142742;color:#fff;border-color:#395e86}
.area-chip,.chip-cloud .area-chip,.chip-cloud button.area-chip{color:#1e324e;background:#fff;border-color:#cddbea}
/* The site shell and account pages use the same tokens and no off-screen overflow */
.htng-account,.htng-php-page{overflow-x:clip}
.htng-account .portal-card{min-width:0}
.htng-php-page :is(input,select,textarea){accent-color:#2873d3}
/* Explicit dark-mode values — no inheritance ambiguity for inputs, chips or stats. */
:root[data-theme="dark"]{--danger-soft:#492330;--success-soft:#143e32}
:root[data-theme="dark"] .stats-float{background:#17263e;color:#f5f9ff;border-color:#3b506c;box-shadow:0 22px 55px -20px #030912}
:root[data-theme="dark"] .stats-float>div{border-color:#3b506c}
:root[data-theme="dark"] .stats-float strong{color:#f8fbff}
:root[data-theme="dark"] .stats-float small{color:#c1cee0}
:root[data-theme="dark"] .htng-v12-site .status,:root[data-theme="dark"] .htng-php-page .status{color:#9cf0c2;background:#143e32;border-color:#2d8260}
:root[data-theme="dark"] .htng-v12-site .status.closed,:root[data-theme="dark"] .htng-php-page .status.closed{color:#ffacba;background:#492330;border-color:#b45569}
:root[data-theme="dark"] .service-tabs a:not(.active){background:#182a43!important;color:#e3edfc!important;border-color:#3b526f}
:root[data-theme="dark"] .service-tabs a.active{background:#2a76d6!important;color:#fff!important;border-color:#418adb}
:root[data-theme="dark"] .chip-cloud button.area-chip,:root[data-theme="dark"] .area-chip{background:#192b44!important;color:#e9f3ff!important;border:1px solid #385472!important}
:root[data-theme="dark"] .chip-cloud button.area-chip:hover{background:#23415e!important;border-color:#75aaff!important}
:root[data-theme="dark"] .filter-pill{background:#1b304b;color:#d0dded;border-color:#3a526c}
:root[data-theme="dark"] .filter-pill.active{background:#327add;color:#fff;border-color:#327add}
:root[data-theme="dark"] .post-thumb{border-color:#40556e}
:root[data-theme="dark"] .htng-v12-site :is(.searchwrap,.blog-search,.area-input,input:not([type=checkbox]):not([type=radio]),select,textarea),
:root[data-theme="dark"] .htng-php-page :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#14233a!important;color:#f2f7ff!important;border-color:#3b536f!important;box-shadow:none}
:root[data-theme="dark"] :is(input,textarea)::placeholder{color:#a9bcd3;opacity:1}
:root[data-theme="dark"] :is(input,textarea,select):focus{border-color:#74adff!important;outline:2px solid #498be8;outline-offset:1px}
:root[data-theme="dark"] .htng-php-page .portal-sidebar{background:#172338;color:#f4f8ff;border-color:#334a66}
:root[data-theme="dark"] .htng-php-page .portal-sidebar a{color:#d0dded}
:root[data-theme="dark"] .htng-php-page .portal-sidebar a.active{background:#1d3a5e;color:#b9d8ff}
:root[data-theme="dark"] .btn.white{background:#e8f1ff;color:#102542}
:root[data-theme="dark"] .btn.white:hover{background:#fff;color:#102542}
:root[data-theme="dark"] .btn.ink{background:#254572;color:#fff}
:root[data-theme="dark"] .btn.ink:hover{background:#3163a4}
:root[data-theme="dark"] .btn.outline{background:#1c304a;color:#f3f7ff;border-color:#455d7c}
:root[data-theme="dark"] .btn.outline:hover{background:#294565;border-color:#7396ba}
:root[data-theme="dark"] .header .btn.outline{background:transparent;color:#eff6ff;border-color:#45617d}
:root[data-theme="dark"] .tag{background:#1b304a;color:#d6e5f8;border-color:#3e566e}
:root[data-theme="dark"] .post-card-content{background:var(--card)}
/* Responsive reversal is only for desktop. */
@media(max-width:850px){.about-reverse .about-copy,.about-reverse .about-tiles{order:initial}.about-reverse .about-tiles{order:1}.about-reverse .about-copy{order:2}.blog-row{grid-template-columns:110px minmax(0,1fr) 16px;gap:16px}.blog-row .blog-meta{grid-column:1/-1;flex-direction:row!important;gap:12px!important}.blog-row .post-thumb{height:100px;min-height:100px}.blog-row .blog-row-content{grid-column:2}}
@media(max-width:580px){.stats-float{width:min(420px,92%)}.blog-row{grid-template-columns:90px minmax(0,1fr);padding:19px 0;gap:10px}.blog-row .post-thumb{height:90px;min-height:90px}.blog-row .blog-row-content{grid-column:2}.blog-row>.app-icon:last-child{display:none}.post-thumb{height:165px;min-height:165px}.post-card-content{padding:20px}.htng-account .portal-content{width:100%}}

/* V14 – Custom area autocomplete inherits current theme, not the original demo's white popup. */
.htng-v12-site .searchbox{position:relative;isolation:isolate}
.htng-v12-site .searchbox .search-results:not([hidden]){display:flex;flex-direction:column;gap:4px;position:absolute;top:calc(100% + 9px);left:0;right:0;z-index:80;width:100%;max-height:300px;min-height:0;margin:0;padding:7px;background:var(--card);color:var(--fg);border:1px solid var(--line);border-radius:15px;box-shadow:0 20px 45px -18px rgba(2,15,34,.45);overflow-y:auto}
.htng-v12-site .searchbox .search-results[hidden]{display:none!important}
.htng-v12-site .searchbox .area-result{display:flex;align-items:center;gap:11px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--fg);font-size:14px;font-weight:680;text-align:left}
.htng-v12-site .searchbox .area-result svg{width:19px;height:19px;color:var(--blue)}
.htng-v12-site .searchbox .area-result:hover,.htng-v12-site .searchbox .area-result.focused{background:var(--soft);color:var(--fg)}
:root[data-theme="dark"] .htng-v12-site .searchbox .search-results:not([hidden]){background:#17283f!important;color:#f3f7ff!important;border-color:#3e5977!important;box-shadow:0 20px 45px -16px rgba(0,5,15,.72)!important}
:root[data-theme="dark"] .htng-v12-site .searchbox .area-result{color:#f0f5ff!important;background:transparent!important}
:root[data-theme="dark"] .htng-v12-site .searchbox .area-result:is(:hover,.focused){background:#25486d!important;color:#fff!important}
:root[data-theme="dark"] .htng-v12-site .searchbox .area-result svg{color:#8bbcff!important}
/* User-uploaded image should fit its own canvas; no forced cropping of logo-like illustrations. */
.htng-v12-site .hero-picture.managed-hero{background:radial-gradient(circle at 65% 25%,#daeafa,#b9d0e4 72%,#b0c6d8);overflow:hidden}
.htng-v12-site .hero-picture.managed-hero>.hero-uploaded-image{object-fit:contain;object-position:center;max-width:100%;max-height:100%;padding:0;border-radius:inherit}

/* V15 – special notice uses the V6.3 UI, visible above hero after admin toggles it on. */
.htng-special-notice{background:#fff1e4;color:#663d17;border-bottom:1px solid #f2cb9a;padding:15px 0}
.htng-special-notice-inner{display:grid;grid-template-columns:40px minmax(0,1.7fr) minmax(180px,.85fr);gap:18px;align-items:center}
.htng-special-notice-icon{width:39px;height:39px;display:grid;place-items:center;background:#f7d9ab;color:#70401b;border-radius:13px;font-size:24px;font-weight:900}
.htng-special-notice-message strong{display:block;font-size:1rem;margin-bottom:4px}.htng-special-notice-message p{margin:0;font-size:.86rem;line-height:1.55}
.htng-special-notice-hours{display:flex;flex-direction:column;gap:4px;border-left:1px solid #e4bd87;padding-left:20px;font-size:.86rem}
.htng-special-notice-hours b{font-size:1rem}.htng-special-notice-hours span{font-size:.78rem}
:root[data-theme=dark] .htng-special-notice{background:#432d25;color:#ffe6cb;border-color:#9e6144}
:root[data-theme=dark] .htng-special-notice-icon{background:#6b442c;color:#ffe2b8}
:root[data-theme=dark] .htng-special-notice-hours{border-color:#86543f}
@media(max-width:700px){.htng-special-notice-inner{grid-template-columns:35px minmax(0,1fr);gap:11px}.htng-special-notice-icon{width:35px;height:35px}.htng-special-notice-hours{grid-column:2;border-left:0;padding:8px 0 0;border-top:1px solid currentColor;opacity:.9}}
