/* Shared light/dark preference, with the original TERRA palette. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:9px 12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--paper);color:var(--ink);font:700 12px var(--sans);white-space:nowrap;cursor:pointer;flex-shrink:0}
.theme-toggle-floating{position:fixed;right:20px;top:16px;z-index:1100;box-shadow:var(--shadow)}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] body{
 --bg:#101710!important;--bg-2:#1c281b!important;--paper:#1b251a!important;--glass:rgba(27,37,26,.97)!important;
 --ink:#f0f2e9!important;--ink-2:#d1d9c9!important;--muted:#afbaa5!important;--accent:#a2d354!important;--accent-2:#8fc935!important;
 --mint:#293923!important;--sand:#d7d3c5!important;--line:#364332!important;--line-strong:#53644a!important;
 --terra-admin-bg:#101710!important;--terra-admin-paper:#1b251a!important;--terra-admin-green:#f0f2e9!important;
 --terra-admin-muted:#afbaa5!important;--terra-admin-border:#364332!important;--terra-admin-lime-soft:#293923!important;
 --shadow:0 8px 28px #0003!important;--shadow-lg:0 18px 56px #0005!important;
 background:var(--bg)!important;color:var(--ink)!important
}
html[data-theme=dark] body :is(h1,h2,h3,h4,label,legend){color:var(--ink)!important}
html[data-theme=dark] body :is(.eyebrow,.text-link,.password-recovery-link){color:#a2d354!important}
html[data-theme=dark] body :is(.public-nav,.admin-topbar,.portal-header,.portal-footer,.auth-form-section,.auth-form,.panel,.card,.metric-card,.stat-card,.property-card,.project-card,.project-quote,.project-plan-wrap,.search-panel,.home-search,.contact-form,.cookie-banner,.suggestions-panel,.suggestion-panel,.legal-card,.legal-heading,.complaint-form,.modal-panel,.modal-dialog,.modal-content,.dropdown-menu,.notification-panel,.home-map-card,.home-map-preview-card){background:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(.public-links a:not(.btn),.portal-nav a,.topbar-user,.user-chip,.user-menu,.admin-footer,.public-intro,.legal-content,.referral-body){color:var(--ink)!important}
html[data-theme=dark] body :is(input,select,textarea){background:#121c12!important;color:var(--ink)!important;border-color:var(--line-strong)!important}
html[data-theme=dark] body ::placeholder{color:#9daa94!important;opacity:1}
html[data-theme=dark] body :is(.btn-outline,.btn-ghost,.icon-button,.theme-toggle,.nav-toggle,.password-visibility){background:#263322!important;color:var(--ink)!important;border-color:var(--line-strong)!important}
html[data-theme=dark] body :is(.btn-primary,.btn-dark){background:#8fc935!important;color:#152112!important;border-color:#8fc935!important}
html[data-theme=dark] body :is(.btn-primary,.btn-dark):hover{background:#a2d354!important}
html[data-theme=dark] body :is(.empty-state,.empty-inline,.settings-nav a,.topbar-avatar,.user-avatar,.avatar,.info-card,.detail-card,.summary-card,.security-check,.portal-list article,.portal-payments article){background:#253121!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(table,thead,tbody,tr,td,th){border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme=dark] body :is(th,thead,tr:nth-child(even)){background:#253121!important}
html[data-theme=dark] body :is(.alert-success,.badge-success,.status-success){background:#203d2c!important;color:#b6ecc9!important}
html[data-theme=dark] body :is(.alert-warning,.badge-warning,.status-warning){background:#47391d!important;color:#f4d89b!important}
html[data-theme=dark] body :is(.alert-danger,.badge-danger,.status-danger){background:#472624!important;color:#ffc5bd!important}
html[data-theme=dark] body :is(.alert-info,.badge-info){background:#213a43!important;color:#b6deee!important}
html[data-theme=dark] body :is(.brand-caption,small,.help-text){color:var(--muted)}
html[data-theme=dark] .leaflet-popup-content-wrapper,html[data-theme=dark] .leaflet-popup-tip,html[data-theme=dark] .leaflet-control-zoom a{background:#1b251a!important;color:#f0f2e9!important}
html[data-theme=dark] .leaflet-control-attribution{background:#1b251ae8!important;color:#d1d9c9!important}
html[data-theme=dark] .leaflet-control-attribution a{color:#b8dd8b!important}
@media(max-width:700px){.theme-toggle{min-height:40px;padding:8px;font-size:11px}.theme-toggle-floating{right:12px;top:12px}.topbar-actions{gap:6px!important;flex-wrap:wrap}.public-links .theme-toggle{align-self:flex-start}}
html[data-theme=dark] body .sidebar{background:#152112!important}
html[data-theme=dark] body :is(.lead-form,.home-map-card,.home-map-preview,.suggestion-dialog,.location-card,.reservation-card,.project-lot-row,.floating-property,.box){background:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(.process-section,.detail-body,.projects-intro,.terra-catalog-empty,.terra-property-placeholder,.project-plan-empty,.public-links,.people-facts div,.plan-grid article,.alert-list article,.installment-preview,.security-checks article,.ai-assistant,.ai-response,.geo-admin-inventory,.geo-admin-segment,.geo-admin-guide-tools,.geo-admin-guide-notice,.geo-admin-editor-tabs button,.portal-summary>a,.portal-jump-nav a){background:#253121!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(.home-map-heading p,.lead-form p,.suggestion-dialog p,.process-section p,.terra-catalog-empty p,.public-intro p,.panel p,.panel small,.metric-card p,.stat-card p){color:var(--muted)!important}
html[data-theme=dark] body :is(.panel a:not(.btn),.responsive-table a:not(.btn),.text-button,.people-facts a){color:#b8dd8b!important}
html[data-theme=dark] body .funnel i,html[data-theme=dark] body .report-bars i{background:#364332!important}
html[data-theme=dark] body .nav-item.active{background:#8fc935!important;color:#152112!important}
html[data-theme=dark] body .theme-toggle{background:#263322!important;color:#f0f2e9!important;border-color:#53644a!important}
html[data-theme=dark] body .topbar-user :is(strong,span){color:var(--ink)!important}
html[data-theme=dark] body .hero-public em{color:#8fc935!important}
html[data-theme=dark] body :is(.metric-strip,.client-header,.property-overview,.report-value-banner,.forum-hero,.deployment-card,.copy-output){background:#22331d!important;color:#f0f2e9!important}
html[data-theme=dark] body :is(.segmented a.is-active,.forum-categories a.is-active){background:#8fc935!important;color:#152112!important}
html[data-theme=dark] body :is(.terra-member-main,.terra-member-heading,.terra-home-members){color:var(--ink)!important;--terra-ink:#f0f2e9}
html[data-theme=dark] body :is(.kpi-card,.metric-card) :is(strong,span){color:var(--ink)!important}
html[data-theme=dark] body .home-map-heading h2{color:var(--ink)!important}
html[data-theme=dark] body .home-map-link{color:#152112!important}

.theme-toggle-icon{display:block;flex:none;width:18px;height:18px;align-self:center}
html[data-theme=dark] body.geo-public-body .geo-explorer{--geo-bg:#152112;--geo-text:#f0f2e9;--geo-muted:#bcc7b0;--geo-card:#23341f;--geo-line:#44533a;--geo-green:#8fc935;--geo-soft:#2e4127}
html[data-theme=dark] body :is(.onboarding-card,.onboarding-header,.people-facts>div,.people-events-form,.people-empty,.people-kpis>a,.geo-agency,.geo-phase,.geo-detail-info,.geo-detail,.geo-info-block){background:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(.people-facts span,.people-facts small,.onboarding-card p,.onboarding-footer,.geo-muted,.geo-kicker,.geo-phase small,.geo-agency small){color:var(--muted)!important}
html[data-theme=dark] body :is(.geo-detail h1,.geo-detail h2,.geo-detail h3,.geo-agency strong,.geo-phase strong,.people-facts strong){color:var(--ink)!important}
@media(max-width:700px){body.geo-public-body .theme-toggle-floating{display:flex;align-items:center;justify-content:center;line-height:1}body.geo-public-body .theme-toggle-floating .theme-toggle-label{display:none}body.geo-public-body .theme-toggle-floating .theme-toggle-icon{width:20px;height:20px;margin:0}body.geo-public-body .theme-toggle-floating::after{content:none!important;display:none}}

/* Keep text and surface tokens paired when switching themes. */
html[data-theme=dark] body[class*="public-season--"]{--season-paper:#1b251a!important;--season-ink:#f0f2e9!important;--season-tint:#253121!important;--season-muted:#b9c5af!important;--season-field:#121c12!important;--season-border:#46543d!important;--season-link:#b8dd8b!important;--season-soft:#f0f2e9!important;--season-bg:#101710!important}
html[data-theme=dark] body .terra-company{--company-green:#152112;--company-sand:#dce3d5;--company-lime:#a2d354;background:#101710!important;color:#f0f2e9!important}
html[data-theme=dark] body :is(.company-purpose,.company-values article,.company-accompaniment,.complaint-card,.complaint-receipt pre,.complaint-admin-detail pre,.legal-content,.legal-sidebar,.legal-table th,.reservation-form-wrap,.geo-shape-dimensions,.people-events-form,.onboarding-contract section){background:#1b251a!important;color:#f0f2e9!important;border-color:#46543d!important}
html[data-theme=dark] body .terra-company :is(.company-purpose-grid article,.company-steps li,.company-accompaniment){border-color:#46543d!important}
html[data-theme=dark] body :is(.company-text,.company-purpose-grid,.company-values,.company-steps,.company-accompaniment) p{color:#c4cfbb!important}
html[data-theme=dark] body .company-purpose-grid article>span{color:#b9c5af!important}
html[data-theme=dark] body .company-values article>span{background:#a2d354!important;color:#152112!important}
html[data-theme=dark] body .company-brand-card{background:#dce3d5!important;color:#152112!important}
html[data-theme=dark] body .company-brand-card :is(h1,h2,h3,span,small){color:#152112!important}
html[data-theme=dark] body :is(.complaint-heading>p:not(.eyebrow),.complaint-information p,.complaint-note,.complaint-card small,.legal-content p,.legal-content li,.geo-shape-dimensions p){color:#c4cfbb!important}
html[data-theme=dark] body :is(.complaint-pill,.complaint-provider,.complaint-event,.complaint-table th){background:#253121!important;color:#f0f2e9!important;border-color:#46543d!important}
html:not([data-theme=dark]) body .terra-company :is(.company-intro,.company-purpose,.company-section:not(.company-contact)) :is(h2,h3){color:#152112}
html:not([data-theme=dark]) body .terra-company :is(.company-intro,.company-purpose,.company-section:not(.company-contact)) .eyebrow{color:#476c22}
