:root {
  --ink: #0d0d0f;
  --blue: #0a5bd3;
  --blue-900: #063f99;
  --blue-700: #0a5bd3;
  --blue-500: #4f8fea;
  --blue-300: #9dc4ff;
  --blue-100: #e6f0ff;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f2f4f7;
  --gray-200: #e3e8ef;
  --gray-500: #8a8f98;
  --gray-700: #4d5968;
  --shadow: 0 18px 42px rgba(13, 33, 63, 0.08);
  --line: 1px solid rgba(10, 91, 211, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: radial-gradient(circle at 18% 0%, rgba(230, 240, 255, 0.72), transparent 26%), linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  font-family: "Inter", "Segoe UI", sans-serif;
  transition: background 180ms ease, color 180ms ease;
}
body.energy-saving {
  --ink: #f7fbff;
  --blue: #69a7ff;
  --blue-900: #b9d5ff;
  --blue-700: #69a7ff;
  --blue-500: #3d78d7;
  --blue-300: #244c8f;
  --blue-100: #102541;
  --white: #0c1118;
  --gray-50: #101720;
  --gray-100: #16202c;
  --gray-200: #263446;
  --gray-500: #8fa1b8;
  --gray-700: #c8d5e7;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --line: 1px solid rgba(105, 167, 255, 0.18);
  background: linear-gradient(180deg, #080b10 0%, #0d1420 100%);
}
.cockpit-shell { width: min(1600px, 100%); margin: 0 auto; padding: 16px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; gap: 18px; align-items: center;
  padding: 0 0 12px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(16px); border-bottom: var(--line);
}
body.energy-saving .topbar { background: rgba(8, 11, 16, 0.92); }
.brand { display: grid; place-content: center; width: 86px; height: 58px; color: #fff; background: #0a5bd3; text-decoration: none; line-height: 0.98; font-size: 17px; font-weight: 600; box-shadow: var(--shadow); }
.brand strong { font-weight: 800; }
.product-title { font-size: clamp(22px, 2vw, 34px); font-weight: 850; letter-spacing: -0.045em; }
.toolbar { display: flex; gap: 10px; align-items: center; }
.tool-button { min-height: 42px; display: inline-flex; align-items: center; border: var(--line); background: var(--white); color: var(--ink); border-radius: 8px; padding: 0 14px; font-weight: 750; }
.energy-toggle { min-height: 42px; display: inline-flex; align-items: center; gap: 10px; border: var(--line); border-radius: 999px; background: var(--white); color: var(--ink); padding: 4px 6px 4px 14px; font: inherit; font-weight: 850; cursor: pointer; box-shadow: 0 10px 22px rgba(13, 33, 63, 0.05); }
.energy-toggle:focus-visible { outline: 3px solid rgba(10, 91, 211, 0.24); outline-offset: 3px; }
.toggle-copy { font-size: 13px; white-space: nowrap; }
.toggle-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 68px; height: 32px; border-radius: 999px; background: #e6f0ff; border: 1px solid rgba(10, 91, 211, 0.22); transition: background 180ms ease; }
.toggle-icon { position: relative; z-index: 2; justify-self: center; width: 15px; height: 15px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 180ms ease; }
.sun-icon circle { fill: none; }
.moon-icon { stroke: #6b7280; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; z-index: 1; width: 30px; height: 24px; border-radius: 999px; background: #ffffff; box-shadow: 0 5px 14px rgba(10, 91, 211, 0.24); transition: transform 180ms ease, background 180ms ease; }
.energy-toggle[aria-pressed="true"] .toggle-track { background: #17202c; border-color: rgba(105, 167, 255, 0.28); }
.energy-toggle[aria-pressed="true"] .toggle-thumb { transform: translateX(31px); background: #0c1118; }
.energy-toggle[aria-pressed="true"] .sun-icon { stroke: #62758f; }
.energy-toggle[aria-pressed="true"] .moon-icon { stroke: #f7fbff; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.22fr); grid-template-rows: minmax(300px, 0.95fr) minmax(330px, 1fr); gap: 12px; margin-top: 12px; min-height: calc(100vh - 98px); }
.card { border: var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 12px 28px rgba(13, 33, 63, 0.045); padding: 22px; overflow: hidden; transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
body.energy-saving .card { background: rgba(12, 17, 24, 0.96); box-shadow: var(--shadow); }
.lead-card { display: flex; flex-direction: column; min-height: 0; }
.eyebrow, .section-head p { margin: 0; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: 0.03em; text-transform: uppercase; }
h1 { margin: 10px 0 12px; max-width: 13.5ch; font-size: clamp(42px, 4.2vw, 68px); line-height: 0.98; letter-spacing: -0.055em; }
h1 span { color: var(--blue); }
.lead-text { max-width: 720px; margin: 0 0 20px; color: #1f2937; font-size: 16px; line-height: 1.48; }
body.energy-saving .lead-text { color: var(--gray-700); }
.read-link { margin-top: auto; color: var(--blue); font-weight: 850; text-decoration: none; }
.read-link:hover { text-decoration: underline; }
.section-head { margin-bottom: 14px; }
.section-head.inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head span { display: inline-block; margin-top: 4px; color: var(--gray-500); font-size: 13px; }
.source-link { color: var(--blue); font-size: 13px; font-weight: 850; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.map-card { display: flex; flex-direction: column; }
.map-layout { flex: 1; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; min-height: 0; }
.legend-scale { display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; color: var(--gray-700); font-size: 12px; font-weight: 750; }
.legend-scale i { width: 18px; height: 100%; min-height: 180px; display: block; background: linear-gradient(180deg, #052f73, #0a5bd3, #9dc4ff, #e6f0ff); border-radius: 4px; }
body.energy-saving .legend-scale i { background: linear-gradient(180deg, #69a7ff, #3d78d7, #244c8f, #102541); }
.price-map { width: 100%; height: 100%; min-height: 340px; border-radius: 8px; overflow: hidden; background: #f7faff; border: 1px solid var(--gray-200); cursor: grab; }
.price-map:active { cursor: grabbing; }
.leaflet-container { font-family: "Inter", "Segoe UI", sans-serif; background: #f7faff; }
.leaflet-control-zoom { margin: 12px !important; border: 0 !important; box-shadow: 0 8px 18px rgba(13, 33, 63, 0.12); }
.leaflet-control-zoom a { width: 30px !important; height: 30px !important; border: 0 !important; color: var(--blue) !important; background: rgba(255, 255, 255, 0.92) !important; line-height: 30px !important; font-weight: 900; }
.leaflet-control-zoom a:first-child { border-radius: 8px 8px 0 0 !important; }
.leaflet-control-zoom a:last-child { border-radius: 0 0 8px 8px !important; }
.leaflet-pane .leaflet-tile { filter: saturate(0.1) hue-rotate(178deg) brightness(1.07) contrast(0.96); }
body.energy-saving .leaflet-container { background: #0d1420; }
body.energy-saving .leaflet-pane .leaflet-tile { filter: grayscale(1) invert(1) brightness(0.72) contrast(0.92) hue-rotate(180deg); opacity: 0.42; }
body.energy-saving .leaflet-control-zoom a { color: #69a7ff !important; background: rgba(12, 17, 24, 0.92) !important; }
.leaflet-overlay-pane path { transition: fill-opacity 160ms ease; }
.country-price-label { display: grid; place-items: center; width: 58px; height: 38px; border-radius: 8px; background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(10, 91, 211, 0.16); box-shadow: 0 8px 18px rgba(13, 33, 63, 0.1); color: #0d0d0f; line-height: 1; pointer-events: none; }
body.energy-saving .country-price-label { background: rgba(9, 14, 22, 0.86); border-color: rgba(105, 167, 255, 0.24); color: #f7fbff; }
.country-price-label span { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: 0.04em; }
.country-price-label strong { margin-top: 2px; font-size: 13px; font-weight: 900; }
.news-link { color: inherit; text-decoration: none; }
.news-link:hover .item-title { color: var(--blue); }
.news-link:focus-visible { outline: 3px solid rgba(10, 91, 211, 0.24); outline-offset: 4px; border-radius: 8px; }
.flash-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--gray-200); }
.flash-item:last-child, .editorial-item:last-child { border-bottom: 0; }
.flash-topic { min-width: 78px; padding: 7px 9px; border-radius: 8px; background: var(--gray-100); color: var(--blue); font-size: 12px; font-weight: 850; text-align: center; text-transform: uppercase; }
.open-mark { color: var(--blue); font-weight: 900; }
.editorial-item { display: block; padding: 15px 0; border-bottom: 1px solid var(--gray-200); }
.item-title { margin: 0; font-weight: 850; letter-spacing: -0.02em; }
.item-copy, .meta { margin: 4px 0 0; color: var(--gray-700); font-size: 13px; line-height: 1.4; }
.meta { color: var(--gray-500); }
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
}
@media (max-width: 760px) {
  .cockpit-shell { padding: 10px; }
  .topbar { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  h1 { font-size: 42px; }
  .map-layout { grid-template-columns: 1fr; }
  .legend-scale { display: none; }
  .energy-toggle { padding-left: 10px; }
  .toggle-copy { font-size: 12px; }
}
