/* EconollamaAI V8.2 — corrective light surfaces and dark readable text. Loaded last. */
:root{color-scheme:light;--v82-ink:#14291c;--v82-muted:#304535;--v82-paper:#f8fbf7;--v82-border:#d3e3d3}
html body,html body.heritage-unified,html body.v5-unified{background:#fff!important;color:var(--v82-ink)!important}
body main,body .shell,body .auth-shell,body .consultation-v123,body .workspace,body .readonly{background-color:#fff!important;color:var(--v82-ink)!important}
/* Target real legacy dark panels rather than repainting map tiles, charts or illustrations. */
body :is(.heritage-page-hero,.heritage-section,.heritage-card,.heritage-panel,.heritage-grid>*,.intro,.workspace,.readonly,.auth-card,.auth-shell section,.admin-panel,.dictionary,.consult-panel,.answer-zone,.entry-card,.dictionary-results>*,.dictionary-entry,.dictionary-result,.v4-panel,.v5-card,.v4-card,.v6-note,.v7-section,.v7-bio-panel,.quiz-card,.question,.answer,.question-card,.quiz-question,.quiz-result,.timeline article,.timeline-item,.event,.chronology-event,.chronologie-event,.atlas-panel,.atlas-card,.atlas-section,.atlas-legend,.atlas-stats,.atlas-result,.result-card,.result-item,.results>*,#results>*,#v4-notices>*,.cards>*,.v5-grid>*,.v4-cards>*,.panel,.card,.box,.notice,.info,.callout,.definition,.tabs,.filters,.v4-toolbar,.v5-toolbar,.section-heading){background:#f8fbf7!important;background-image:none!important;color:#182e20!important;border-color:#d3e3d3!important;box-shadow:0 3px 14px #153c1c0c!important}
body :is(.consult-panel,.answer-zone,.entry-card,.auth-card,.heritage-section,.heritage-page-hero,.quiz-card,.question-card,.atlas-panel,.atlas-card,.atlas-section,.v4-panel,.v5-card,.v6-note,.timeline-item,.event,.card,.panel){border:1px solid #d3e3d3!important;border-radius:12px!important}
body :is(.consult-panel,.answer-zone,.entry-card,.auth-card,.heritage-section,.heritage-page-hero,.quiz-card,.question-card,.atlas-panel,.atlas-card,.atlas-section,.v4-panel,.v5-card,.v6-note,.timeline-item,.event,.card,.panel) :is(h1,h2,h3,h4){color:#0c4025!important}
body main :is(p,li,dt,dd,summary,blockquote,small,label,span,strong,td,th),body .auth-shell :is(p,label,small,span,strong),body .consult-panel :is(p,label,small,span,strong),body .entry-card :is(p,label,small,span,strong){color:#22382a!important;text-shadow:none!important;opacity:1!important}
body main :is(h1,h2,h3,h4,h5),body .auth-shell :is(h1,h2,h3){color:#0d3b22!important;text-shadow:none!important;opacity:1!important}
body main :is(.muted,.lead,.eyebrow,.v4-source,.section-heading p,.entry-card small,.actions,.pagination){color:#334d3b!important}
body :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:#fff!important;color:#162c1e!important;border:1px solid #a7c5ad!important}
body :is(input,textarea)::placeholder{color:#526958!important;opacity:1!important}
body :is(.tabs button:not(.selected):not([aria-selected=true]),.filters,.dictionary-filters,.pagination,.atlas-legend){background:#eef6ed!important;color:#183b25!important;border-color:#c9ddcb!important}
body :is(.tabs button.selected,.tabs button[aria-selected=true]){background:#0a6136!important;color:#fff!important}
body :is(button,.btn,.primary,input[type=submit]){background:#0a6035!important;color:#fff!important;border-color:#0a6035!important}
body :is(button,.btn,.primary,input[type=submit]) :is(span,strong){color:#fff!important}
body a:not(.btn){color:#07572e!important}
body .v6-header,body .v6-header nav{background:#fff!important}
body .v6-header nav a{color:#0b4828!important}
body .v6-header nav .v82-auth-actions{display:inline-flex!important;gap:7px;align-items:center;margin-left:auto}
body .v6-header nav .v82-auth-actions>a,body .v6-header nav .v82-auth-actions>button{display:inline-flex!important;align-items:center;justify-content:center;font:600 13px Arial,sans-serif!important;line-height:1.2!important;border-radius:8px!important;padding:9px 12px!important;min-width:96px;text-decoration:none!important}
body .v6-header nav .v82-auth-actions .v82-login{background:#eaf4e9!important;color:#07502b!important;border:1px solid #b8d4bb!important}
body .v6-header nav .v82-auth-actions .v82-logout{background:#0a6035!important;color:#fff!important;border:1px solid #0a6035!important}
body .v6-header nav .v82-auth-actions .v82-logout:disabled{opacity:.55!important;cursor:not-allowed!important}
body .v81-auth-actions{display:none!important}
/* Special-case deep navy backgrounds from consultation-v123.css */
body .consultation-v123 .consult-panel,body .consultation-v123 .answer-zone,body .consultation-v123 .entry-card,body .consultation-v123 .tabs,body .consultation-v123 .section-heading{background:#f8fbf7!important;color:#172e20!important;border-color:#d3e3d3!important}
body .consultation-v123 .section-heading p,body .consultation-v123 .dictionary-filters label{color:#283e2e!important}
/* Do not affect Leaflet maps or SVG/Canvas charts */
body :is(.leaflet-container,.leaflet-pane,.leaflet-map-pane,.leaflet-tile-pane,.leaflet-layer,.leaflet-tile,svg,canvas){background-image:initial}
@media(max-width:950px){body .v6-header nav .v82-auth-actions{margin-left:0;flex-wrap:wrap}}
