/* ============================================================
   EcoEducation — дизайн-система
   Палитра вдохновлена шкалой pH-индикатора и полевым дневником:
   чернильный тил, речной синий, охра ташкентской земли,
   плюс цвета результатов измерений (хорошо / средне / плохо).
   ============================================================ */

:root {
  --ink-teal: #143d38;
  --deep-teal: #1c5147;
  --river-blue: #2e6f95;
  --paper: #f5f2ea;
  --paper-warm: #eee8d9;
  --ochre: #c9954f;
  --ochre-dark: #a97638;
  --text-main: #17231f;
  --text-muted: #4d5c56;
  --line: rgba(20, 61, 56, 0.14);

  --good: #4f8f5b;
  --good-bg: #e7f0e3;
  --medium: #c98a2c;
  --medium-bg: #f6ecd8;
  --bad: #c4552f;
  --bad-bg: #f7e4dc;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;

  --shadow-card: 0 6px 24px rgba(20, 40, 35, 0.08);
  --shadow-hover: 0 12px 32px rgba(20, 40, 35, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* fallback for older browsers */
  overflow-x: clip;   /* modern browsers: same effect, doesn't break position:sticky */
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink-teal);
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--river-blue);
  margin-bottom: 14px;
}

/* pH scale motif — reused as a signature accent bar */
.ph-scale {
  display: flex;
  height: 6px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
}
.ph-scale span { flex: 1; }
.ph-scale .c1 { background: #c4552f; }
.ph-scale .c2 { background: #d98a3d; }
.ph-scale .c3 { background: #e8c34a; }
.ph-scale .c4 { background: #9fb84f; }
.ph-scale .c5 { background: #4f8f5b; }
.ph-scale .c6 { background: #2e6f95; }
.ph-scale .c7 { background: #274c8f; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--ink-teal);
  color: var(--paper);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline {
  background: transparent;
  border-color: var(--ink-teal);
  color: var(--ink-teal);
}
.btn-outline:hover { background: var(--ink-teal); color: var(--paper); }
.btn-ochre { background: var(--ochre); color: var(--ink-teal); }
.btn-ochre:hover { background: var(--ochre-dark); transform: translateY(-2px); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 242, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  z-index: 2;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-teal);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--river-blue), var(--ink-teal));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 19px; height: 19px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding: 4px 0;
}
.nav-links a.active,
.nav-links a:hover { color: var(--river-blue); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--good), var(--medium), var(--bad));
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink-teal);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- hero ---------- */
.hero {
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy p.lead {
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* Signature: field-sample readout card */
.sample-card {
  background: var(--ink-teal);
  color: white;
  border-radius: var(--radius-l);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.sample-card .sample-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
}
.sample-card h3 { color: var(--paper); margin-bottom: 4px; }
.sample-readouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.readout {
  background: rgba(245,242,234,0.08);
  border: 1px solid rgba(245,242,234,0.16);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}
.readout .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}
.readout .value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
}
.sample-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}
.sample-status.good { background: var(--good-bg); color: var(--good); }
.sample-status.bad { background: var(--bad-bg); color: var(--bad); }
.sample-status.medium { background: var(--medium-bg); color: var(--medium); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- partners ---------- */
.partners {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.partners-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.partner-chip {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-teal);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
}

/* ---------- section cards (3 main sections) ---------- */
.sections {
  padding: 72px 0;
}
.section-intro { max-width: 60ch; margin-bottom: 42px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.section-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.section-card .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--river-blue);
  margin-bottom: 16px;
}
.section-card p { flex-grow: 1; }
.section-card .btn { margin-top: 18px; align-self: flex-start; }

/* ---------- generic page header (inner pages) ---------- */
.page-hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-hero p.lead { max-width: 62ch; }

/* ---------- Eco Sessions ---------- */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  padding: 48px 0 72px;
}
.session-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.session-photo { height: 210px; overflow: hidden; }
.session-photo img { width: 100%; height: 100%; object-fit: cover; }
.session-body { padding: 22px 24px 24px; }
.session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.session-meta span { display: inline-flex; align-items: center; gap: 6px; }
.session-participants {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-teal);
  background: var(--paper-warm);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- Water map page ---------- */
.map-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 36px 0;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px 20px;
}
.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink-teal);
}
.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card.good .stat-value { color: var(--good); }
.stat-card.bad .stat-value { color: var(--bad); }

#map {
  height: 560px;
  width: 100%;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  margin-bottom: 60px;
  z-index: 1;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-m);
  font-family: var(--font-body);
}
.popup-title { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; color: var(--ink-teal); }
.popup-district { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.popup-link { color: var(--river-blue); font-weight: 600; font-size: 0.85rem; }

/* point detail panel */
.point-panel {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 34px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-card);
}
.point-panel.open { display: block; }
.point-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.point-panel-close {
  background: var(--paper-warm);
  border: none;
  border-radius: 999px;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-teal);
}
.readouts-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.readouts-row .readout { background: var(--paper-warm); border-color: var(--line); }
.readouts-row .readout .value { color: var(--ink-teal); }
.point-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.point-photos img { border-radius: var(--radius-m); height: 180px; width: 100%; object-fit: cover; }
.point-analysis {
  background: var(--paper-warm);
  border-radius: var(--radius-m);
  padding: 18px 20px;
  margin-bottom: 26px;
}
.point-analysis h4 { margin-bottom: 8px; }

.comments-list { margin-bottom: 18px; }
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.comment:last-child { border-bottom: none; }
.comment .author { font-weight: 600; color: var(--ink-teal); font-size: 0.9rem; }
.comment .text { margin: 4px 0 0; }
.comment-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-form input,
.comment-form textarea {
  font-family: var(--font-body);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  font-size: 0.92rem;
  background: var(--paper);
}
.comment-form input { flex: 1 1 180px; }
.comment-form textarea { flex: 1 1 100%; resize: vertical; min-height: 70px; }

/* ---------- Learning Hub ---------- */
.hub-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 36px 0 8px;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-chip.active,
.filter-chip:hover { background: var(--ink-teal); color: var(--paper); border-color: var(--ink-teal); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 30px 0 72px;
}
.hub-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hub-thumb { height: 170px; position: relative; overflow: hidden; }
.hub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hub-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(20,61,56,0.85);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
}
.hub-body { padding: 20px 22px 24px; }

/* ---------- About / Contacts ---------- */
.content-block { padding: 48px 0 72px; max-width: 74ch; }
.content-block h2 { margin-top: 1.4em; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 36px 0;
}
.value-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
}
.future-note {
  background: var(--paper-warm);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius-s);
  padding: 18px 22px;
  margin-top: 30px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 48px 0 72px;
}
.contact-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 13px 16px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  background: #fff;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: -6px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink-teal);
  color: var(--paper);
  padding: 52px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--paper); font-size: 1rem; }
.footer-grid p { color: rgba(245,242,234,0.7); }
.footer-links a {
  display: block;
  padding: 5px 0;
  color: rgba(245,242,234,0.8);
  font-size: 0.92rem;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(245,242,234,0.14);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(245,242,234,0.6);
}

/* ---------- utility ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE — tablet & mobile
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sample-card { max-width: 480px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .sessions-grid { grid-template-columns: 1fr; }
  .map-stats { grid-template-columns: repeat(2, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  #map { height: 460px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 20px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; }
  .nav-toggle { display: flex; }

  .card-grid { grid-template-columns: 1fr; }
  .map-stats { grid-template-columns: 1fr 1fr; }
  .readouts-row { grid-template-columns: repeat(2, 1fr); }
  .hub-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  #map { height: 380px; }
  .sample-readouts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .map-stats { grid-template-columns: 1fr; }
  .readouts-row { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   ТЁМНАЯ ТЕМА
   ============================================================ */
html[data-theme="dark"] {
  --paper: #10201c;
  --paper-warm: #172b25;
  --text-main: #eef2ef;
  --text-muted: #a9bab2;
  --line: rgba(238, 242, 239, 0.12);
  --ink-teal: #eef2ef;
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] .site-header { background: rgba(16, 32, 28, 0.92); }
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .session-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .point-panel,
html[data-theme="dark"] .hub-card,
html[data-theme="dark"] .value-card {
  background: #16241f;
}
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .comment-form input,
html[data-theme="dark"] .comment-form textarea,
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  background: #16241f;
  color: var(--text-main);
}
html[data-theme="dark"] .partner-chip,
html[data-theme="dark"] .session-participants,
html[data-theme="dark"] .readouts-row .readout { background: #1c3129; }
html[data-theme="dark"] .btn-primary { background: #6fa98f; color: #0d1a16; }
html[data-theme="dark"] .btn-outline { border-color: #6fa98f; color: #cfe4da; }
html[data-theme="dark"] .btn-outline:hover { background: #6fa98f; color: #0d1a16; }
html[data-theme="dark"] .logo { color: var(--text-main); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4 { color: var(--text-main); }
html[data-theme="dark"] .sample-card { background: #0c1815; border: 1px solid var(--line); }
html[data-theme="dark"] .future-note { background: #1c3129; }
html[data-theme="dark"] .site-footer { background: #0b1613; }

/* ============================================================
   ВЕРХНЯЯ ПАНЕЛЬ: язык + контакты
   ============================================================ */
.top-utility,
.topbar {
  background: var(--ink-teal);
  color: rgba(245,242,234,0.85);
}
html[data-theme="dark"] .top-utility,
html[data-theme="dark"] .topbar { background: #0b1613; }
.top-utility-inner,
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  font-size: 0.8rem;
}
.top-contacts,
.topbar-contacts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.top-contacts a,
.topbar-contacts a { color: rgba(245,242,234,0.85); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.top-contacts a:hover,
.topbar-contacts a:hover { color: #fff; }
.topbar-actions {
  display: flex;
  align-items: center;
}
.lang-switch {
  display: flex;
  gap: 4px;
  background: rgba(245,242,234,0.1);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: rgba(245,242,234,0.75);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn.active { background: var(--ochre); color: var(--ink-teal); font-weight: 700; }
.lang-btn:hover:not(.active) { color: #fff; }

/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (иконка в навбаре)
   ============================================================ */
.theme-switch { position: relative; }
.theme-toggle-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-teal);
  flex-shrink: 0;
}
.theme-toggle-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  min-width: 190px;
  z-index: 60;
}
html[data-theme="dark"] .theme-popover { background: #16241f; }
.theme-popover.open { display: block; }
.theme-popover-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--radius-s);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-main);
}
.theme-option:hover { background: var(--paper-warm); }
.theme-option.active { background: var(--paper-warm); font-weight: 600; color: var(--river-blue); }
.theme-option .dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-muted); }
.theme-option.active .dot { background: var(--river-blue); border-color: var(--river-blue); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-lang-switch { display: none; }

@media (max-width: 1024px) {
  .top-utility,
  .topbar { display: none; }
  .top-utility-inner,
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; }
  .top-contacts,
  .topbar-contacts { font-size: 0.76rem; gap: 12px; }
  .nav-lang-switch { display: flex; align-items: center; }
  .nav-right { gap: 10px; }
}

@media (max-width: 480px) {
  .nav-right { gap: 8px; }
}
