/* Load after the captured Tailwind styles. No image inversion or global brightness filter. */
html{color-scheme:light}
html.dark{color-scheme:dark;--background:#0b1511;--foreground:#e7efe9;--card:#12211a;--card-foreground:#e7efe9;--popover:#12211a;--popover-foreground:#e7efe9;--primary:#69d5b3;--primary-foreground:#08251a;--secondary:#1b3026;--secondary-foreground:#dce9e0;--muted:#1b2c23;--muted-foreground:#a8bcb0;--accent:#f5ae75;--accent-foreground:#301b0d;--border:#31483b;--input:#3b5546;--ring:#69d5b3;--destructive:#ff999d;--sidebar:#0e1b15;--sidebar-foreground:#e7efe9;--sidebar-primary:#69d5b3;--sidebar-primary-foreground:#08251a;--sidebar-accent:#1b3026;--sidebar-accent-foreground:#e7efe9;--sidebar-border:#31483b;--sidebar-ring:#69d5b3;--amber:#f5ae75;--amber-foreground:#301b0d;--teal:#69d5b3;--teal-foreground:#08251a}
html,body{background-color:var(--background);color:var(--foreground)}
.zb-theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:7px;border:1px solid var(--border);border-radius:10px;background:var(--background);color:var(--foreground);cursor:pointer}
.zb-theme-toggle:hover{background:var(--muted);color:var(--primary)}
.zb-theme-toggle:focus-visible{outline:2px solid var(--ring);outline-offset:3px}
.zb-footer-theme{display:flex;justify-content:flex-start;max-width:1280px;margin:0 auto;padding:20px clamp(20px,4vw,32px);border-top:1px solid color-mix(in srgb,currentColor 18%,transparent)}
.zb-footer-theme .zb-theme-toggle{width:auto;min-height:44px;height:auto;gap:10px;padding:10px 14px;background:transparent;color:inherit;border-color:color-mix(in srgb,currentColor 35%,transparent);font-size:.875rem;line-height:1.4}
.zb-footer-theme .zb-theme-toggle:hover{background:color-mix(in srgb,currentColor 10%,transparent);color:inherit}
.zb-theme-only-footer{background:var(--background);color:var(--foreground)}
.zb-brand-header{display:flex;align-items:center;justify-content:space-between;gap:4px;flex-shrink:0;margin-bottom:24px}
.zb-brand-header>a{display:flex;align-items:center;gap:6px;min-width:0;min-height:36px;margin:0;padding:0}
.zb-brand-header>a [data-zb-label]{font-size:18px}
.zb-header-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.zb-header-actions #zb-collapse{position:static!important;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;margin:0;padding:5px;border:1px solid var(--border);border-radius:10px;background:var(--background);box-shadow:none}
.zb-header-actions #zb-collapse:hover{background:var(--muted)}
.zb-header-actions #zb-collapse:focus-visible{outline:2px solid var(--ring);outline-offset:3px}
body.zb-collapsed .zb-brand-header,body.zb-collapsed .zb-header-actions{flex-direction:column;gap:8px}
body.zb-collapsed .zb-brand-header>a{gap:0}
.dark *{scrollbar-color:#3e5b4a #0b1511}
.dark .custom-scrollbar::-webkit-scrollbar-thumb{background:#3e5b4a}
.zb-theme-sun,.dark .zb-theme-moon{display:none}
.dark .zb-theme-sun{display:block}
/* Captured pages use fixed pale utility colors for warnings and comparisons. */
.dark :is([class~="bg-white"],[class~="bg-white/80"]){background-color:#16271e}
.dark :is([class~="bg-red-50"],[class~="bg-red-50/30"],[class~="bg-red-50/50"],[class~="bg-red-100"],[class~="bg-rose-50"]){background-color:#321f25}
.dark :is([class~="bg-amber-50"],[class~="bg-amber-50/30"],[class~="bg-amber-100"],[class~="bg-orange-50"]){background-color:#30291c}
.dark :is([class~="bg-emerald-50"],[class~="bg-emerald-100"],[class~="bg-green-50"],[class~="bg-teal-50"]){background-color:#153126}
.dark :is([class~="bg-blue-50"],[class~="bg-blue-100"]){background-color:#172b3a}
.dark :is([class~="bg-purple-50"],[class~="bg-purple-100"],[class~="bg-indigo-50"],[class~="bg-indigo-100"]){background-color:#272139}
.dark :is([class~="bg-sky-50"],[class~="bg-sky-100"],[class~="bg-cyan-50"],[class~="bg-cyan-100"]){background-color:#15303a}
.dark [class~="hover:bg-white/90"]:hover{background-color:#22382c}
.dark [class~="hover:bg-red-50"]:hover{background-color:#43252e}
.dark [class~="hover:bg-emerald-100"]:hover{background-color:#1b4130}
.dark :is([class~="text-purple-500"],[class~="text-purple-600"],[class~="text-indigo-500"],[class~="text-indigo-600"]){color:#c5b5f0}
.dark :is([class~="text-sky-500"],[class~="text-sky-600"],[class~="text-cyan-500"],[class~="text-cyan-600"]){color:#93d5ec}
.dark :is([class~="text-red-500"],[class~="text-red-600"],[class~="text-red-700"],[class~="text-red-800/80"],[class~="text-red-900"],[class~="text-rose-500"],[class~="text-rose-600"]){color:#ffafb9}
.dark :is([class~="text-amber-500"],[class~="text-amber-600"],[class~="text-amber-700"],[class~="text-amber-800"],[class~="text-amber-900"],[class~="text-orange-500"]){color:#f5c586}
.dark :is([class~="text-emerald-500"],[class~="text-emerald-600"],[class~="text-emerald-700"],[class~="text-green-500"],[class~="text-teal-500"]){color:#80deba}
.dark :is([class~="text-blue-500"],[class~="text-blue-600"],[class~="text-blue-700"]){color:#9acbf4}
.dark :is([class~="border-red-100"],[class~="border-red-200"],[class~="border-red-200/50"],[class~="border-red-300"]){border-color:#72404c}
.dark :is([class~="border-amber-100"],[class~="border-amber-200"],[class~="border-amber-200/50"]){border-color:#6c5832}
.dark :is([class~="border-emerald-200"],[class~="border-emerald-200/50"]){border-color:#32624d}
.dark :is([class~="border-blue-200"],[class~="border-blue-200/50"]){border-color:#385a73}
.dark :is([class~="from-red-50"],[class~="from-red-50/50"]){--tw-gradient-from:#321f25;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from) var(--tw-gradient-from-position),var(--tw-gradient-to) var(--tw-gradient-to-position))}
.dark [class~="from-emerald-50/50"]{--tw-gradient-from:#153126;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from) var(--tw-gradient-from-position),var(--tw-gradient-to) var(--tw-gradient-to-position))}
.dark [class~="to-amber-50"]{--tw-gradient-to:#30291c}
.dark [class*="radial-gradient(circle_at_top_right,rgba(255,255,255"]{background-image:none}
.dark :is(input,textarea,select){color:var(--foreground);border-color:var(--input);background-color:var(--card)}
.dark :is(input,textarea)::placeholder{color:var(--muted-foreground);opacity:1}
.dark input:-webkit-autofill{-webkit-text-fill-color:var(--foreground);-webkit-box-shadow:0 0 0 1000px var(--card) inset;caret-color:var(--foreground)}
.dark input[type="checkbox"]{accent-color:var(--primary)}
.dark .zb-form-msg.zb-ok{color:#80deba}
.dark .zb-form-msg.zb-err{color:#ffafb9}
.dark #zb-aside,.dark .zb-drawer{background-color:var(--sidebar)}
.dark footer{background-color:#08100c;color:var(--foreground);border-top:1px solid var(--border)}
.dark footer :is([class~="text-background"],[class~="text-background/80"],[class~="text-primary-foreground/80"]){color:var(--foreground)}
.dark footer :is([class~="text-background/60"],[class~="text-background/50"],[class~="text-background/40"],[class~="text-background/30"]){color:var(--muted-foreground)}
.dark footer [class~="border-background/10"]{border-color:var(--border)}
.dark #zb-top{background-color:var(--secondary);color:var(--primary);border:1px solid var(--border)}
.dark img[src="/logo.png"]{border-radius:50%}
/* The external map owns its palette. Use a map link instead of its glaring canvas in dark mode. */
.zb-map-placeholder{display:none}
.dark .zb-map-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;min-height:240px;padding:24px;background:var(--card);color:var(--foreground);text-align:center}
.dark .zb-map-frame{display:none}
.dark iframe[src*="yandex.ru/map-widget"]{display:none}
.dark .zb-map-placeholder a{color:var(--primary);text-decoration:underline}
/* Editorial assets remain photographs/illustrations with their natural colors. */
.zb-article-figure{margin:2rem 0;overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--card);break-inside:avoid}
.zb-article-figure img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.zb-article-figure figcaption{padding:.75rem 1rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.5}
@media(max-width:639px){.zb-article-figure{margin:1.5rem 0;border-radius:12px}}
