/* ─── АРТЕЛЬТЕХ · SHARED DESIGN SYSTEM ─── */
/* Mobile-first · Tile-based · Light/Dark */
@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════
   THEME TOKENS
   ══════════════════════════════════════════ */

/* ── LIGHT (default) ── */
:root {
  color-scheme: light;
  --bg:       #ffffff;
  --bg2:      #f6f8fa;
  --bg3:      #eef1f6;
  --bg4:      #dfe3ea;
  --accent:   #9a6700;
  --accent-hover: #7d5200;
  --accent-surface: #f0a500;
  --accent-surface-hover: #e09600;
  --accent-dim: rgba(245,166,35,0.08);
  --accent-border: rgba(154,103,0,0.22);
  --text:     #1f2328;
  --text2:    #596168;   /* AA ≥ 7:1 on white */
  --text3:    #6f7680;   /* AA ≥ 4.8:1 — now passes */
  --border:   rgba(0,0,0,0.12);
  --border2:  rgba(0,0,0,0.2);
  --danger:   #d1242f;
  --success:  #1a7f37;
  --info:     #0969da;
  --radius:   14px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --transition: 0.18s ease;
  --topbar-bg: rgba(255,255,255,0.92);
  --topbar-border: rgba(0,0,0,0.08);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
}

/* ── DARK ── GitHub-inspired layered surfaces, avoid pure #000 for OLED smear */
[data-theme="dark"] {
  color-scheme: dark;
  --bg:       #0d1117;
  --bg2:      #161b22;
  --bg3:      #1e242d;
  --bg4:      #2a313c;
  --accent:   #f0a500;
  --accent-hover: #ffbc2e;
  --accent-surface: #f0a500;
  --accent-surface-hover: #ffbc2e;
  --accent-dim: rgba(240,165,0,0.14);
  --accent-border: rgba(240,165,0,0.32);
  --text:     #e6edf3;
  --text2:    #9ea7b3;   /* WCAG AA ≥ 5.5:1 on --bg */
  --text3:    #8b949e;   /* WCAG AA ≥ 4.7:1 — now passes for small text */
  --border:   rgba(255,255,255,0.09);
  --border2:  rgba(255,255,255,0.16);
  --danger:   #ff6b63;
  --success:  #56d364;
  --info:     #79b8ff;
  --topbar-bg: rgba(13,17,23,0.9);
  --topbar-border: rgba(255,255,255,0.09);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.35);
  --card-shadow-hover: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
}

/* ══════════════════════════════════════════
   GLOBAL RESETS
   ══════════════════════════════════════════ */
html { scroll-behavior: smooth; }

body {
  font-family: 'Geologica', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;          /* mobile-first 16px → no iOS auto-zoom */
  line-height: 1.55;
  min-height: 100dvh;
  touch-action: manipulation;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 72px;
}

@media (min-width: 769px) {
  body { padding-bottom: 0; font-size: 14px; line-height: 1.6; }
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ── Базовая типографика (замена main.css) ── */
html { background: var(--bg); overflow-x: hidden; }
body { overflow-x: hidden; }

/* ── Legacy утилиты, ранее в main.css ── */
._hide, ._hidden, [hidden] { display: none !important; }
.cross::before, .cross::after { content: ''; }

/* ── Глобальный поиск (dropdown) ── */
.global_search_wrapper { position: relative; }
.searchbar-wrap {
  position: relative;
  transition: max-height .25s ease, opacity .2s ease, padding .2s ease;
  max-height: 80px; opacity: 1;
}
.searchbar-wrap.is-collapsed {
  max-height: 0; opacity: 0;
  padding-top: 0 !important; padding-bottom: 0 !important;
  border: 0 !important; pointer-events: none;
  overflow: hidden;
}
.searchbar { position: relative; }
.searchbar-close {
  background: transparent !important; border: 0 !important;
  padding: 0 14px !important;
  cursor: pointer; color: var(--text3);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
}
.searchbar-close:hover { color: var(--danger); }
.global_search_dropdown {
  display: none;
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: calc(100% + 6px);
  width: calc(100% - 2rem); max-width: 600px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
}
.global_search_dropdown.show { display: block; }
.global_search_dropdown_section { padding: 6px 0; }
.global_search_dropdown_section:not(:first-child) { border-top: 1px solid var(--border); }
.global_search_dropdown_title {
  padding: 6px 14px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3);
}
.global_search_dropdown_item {
  display: block; padding: 10px 14px;
  text-decoration: none; color: var(--text);
  transition: background 0.15s;
  cursor: pointer; text-align: left;
  border: 0; background: transparent;
  width: 100%; font-family: inherit; font-size: 14px;
}
.global_search_dropdown_item:hover,
.global_search_dropdown_item:focus-visible {
  background: var(--bg3); color: var(--text); outline: none;
}
.global_search_dropdown_item_title { font-weight: 600; margin-bottom: 2px; }
.global_search_dropdown_item_meta { font-size: 12px; color: var(--text3); }
.global_search_dropdown_empty {
  padding: 20px 14px; text-align: center;
  color: var(--text3); font-size: 13px;
}
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 600; line-height: 1.25; margin: 0 0 0.75em; letter-spacing: -0.3px; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 500; }
p  { margin: 0 0 0.75em; color: var(--text); font-weight: 400; }
b, strong { font-weight: 600; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 0.75em 1.25em; color: var(--text); }
ul:last-child, ol:last-child { margin-bottom: 0; }
nav ul { list-style: none; margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
button { font-family: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ── Структурные классы из старой темы ── */
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1rem; position: relative;
}
@media (min-width: 769px) { .wrap { padding: 0 1.25rem; } }

section.page, section.single, section.add_new, section.home_about, section.services,
section.services_archive, section.projects_archive {
  padding: 1.25rem 0 2rem;
}
@media (min-width: 769px) {
  section.page, section.single, section.add_new { padding: 1.5rem 0 3rem; }
}

/* ══════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-surface);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; top: -100%;
  left: 50%; transform: translateX(-50%);
  background: var(--accent-surface); color: #000;
  padding: 10px 24px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 14px; font-weight: 600;
  z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #000; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 56px;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 769px) {
  .topbar { padding: 0 1.25rem; gap: 1rem; }
}

.topbar-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0;
}
.topbar-logo-icon {
  width: 30px; height: 30px;
  background: var(--accent-surface);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-logo-icon svg { width: 16px; height: 16px; }
.topbar-logo-text { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }

.topbar-nav {
  display: none; gap: 1.25rem; align-items: center;
  margin-left: 0.5rem;
}
@media (min-width: 769px) {
  .topbar-nav { display: flex; }
}
.topbar-nav a {
  color: var(--text2); font-size: 13px; font-weight: 500;
  transition: color var(--transition);
}
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.active {
  color: var(--accent);
  position: relative;
}
.topbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -18px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-surface);
  border-radius: 2px;
}

.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-cta {
  background: var(--accent-surface); color: #000;
  font-weight: 600; font-size: 12px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition), transform 0.12s ease;
  border: none; cursor: pointer;
  min-height: 36px;
}
.btn-cta:hover { background: var(--accent-surface-hover); color: #000; }
.btn-cta:active { transform: scale(0.97); }

/* Hide CTA on mobile — bottom nav has it */
@media (max-width: 768px) {
  .topbar-actions .btn-cta { display: none; }
}

.icon-btn {
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); cursor: pointer; transition: all var(--transition);
  text-decoration: none; position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.icon-btn .badge-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--bg);
}

/* ── THEME TOGGLE ── показывает ТЕКУЩУЮ тему */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.topbar-user {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--transition); text-decoration: none; color: var(--text);
}
.topbar-user:hover { background: var(--bg3); color: var(--text); }
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-surface); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.topbar-username { font-size: 12px; font-weight: 600; }
@media (max-width: 768px) {
  .topbar-username { display: none; }
  .topbar-user { padding: 4px; border: none; }
}

/* ══════════════════════════════════════════
   BOTTOM NAVIGATION (Mobile)
   ══════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .bottom-nav {
  box-shadow: 0 -1px 8px rgba(0,0,0,0.3);
}

@media (min-width: 769px) {
  .bottom-nav { display: none; }
}

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text3);
  text-decoration: none;
  font-size: 10px; font-weight: 600;
  transition: color var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.bottom-nav-item:active { opacity: 0.7; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 25%; right: 25%;
  height: 2px;
  background: var(--accent-surface);
  border-radius: 0 0 2px 2px;
}

.bottom-nav-cta {
  position: relative;
}
.bottom-nav-cta .nav-cta-circle {
  width: 44px; height: 44px;
  background: var(--accent-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: -14px;
  box-shadow: 0 2px 8px rgba(240,165,0,0.3);
  transition: transform 0.15s ease;
}
.bottom-nav-cta .nav-cta-circle svg { color: #000; width: 20px; height: 20px; }
.bottom-nav-cta:active .nav-cta-circle { transform: scale(0.93); }

/* ══════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════ */
.searchbar-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 1rem;
}
@media (min-width: 769px) {
  .searchbar-wrap { padding: 10px 1.25rem; }
}
.searchbar {
  max-width: 600px; margin: 0 auto;
  display: flex; align-items: center;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); overflow: hidden;
}
.searchbar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 10px 14px;
  min-height: 44px;
}
@media (min-width: 769px) {
  .searchbar input { font-size: 13px; padding: 8px 12px; min-height: 0; }
}
.searchbar input::placeholder { color: var(--text3); }
.searchbar button {
  background: transparent; border: none;
  padding: 0 14px; cursor: pointer; color: var(--text2);
  display: flex; align-items: center;
  min-height: 44px;
}

/* ══════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text3); margin-bottom: 8px;
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb span { color: var(--text3); }

/* ══════════════════════════════════════════
   PAGE LAYOUT
   ══════════════════════════════════════════ */
.page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}
@media (min-width: 769px) {
  .page-wrap { padding: 1.5rem 1.25rem 3rem; }
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 1.25rem;
}
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text);
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
  min-height: 44px;
}
@media (min-width: 769px) {
  .btn { padding: 8px 14px; font-size: 12px; min-height: 34px; }
}
.btn:hover { background: var(--bg4); border-color: var(--border2); color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary { background: var(--accent-surface); color: #000; border-color: transparent; }
.btn-primary:hover { background: var(--accent-surface-hover); color: #000; }
.btn-danger { background: rgba(248,81,73,0.12); color: var(--danger); border-color: rgba(248,81,73,0.25); }
.btn-danger:hover { background: rgba(248,81,73,0.2); }
.btn-success { background: rgba(63,185,80,0.1); color: var(--success); border-color: rgba(63,185,80,0.25); }

/* ══════════════════════════════════════════
   CARDS (base tile/card component)
   ══════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
}

/* ══════════════════════════════════════════
   STAT TILES (mobile-first grid)
   ══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); }
.stat-card .num {
  font-size: 26px; font-weight: 700;
  color: var(--accent); letter-spacing: -1px;
}
.stat-card .lbl { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ══════════════════════════════════════════
   TABLE (desktop) + CARD LIST (mobile)
   ══════════════════════════════════════════ */
.table-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

/* Mobile: convert table rows to stacked cards */
@media (max-width: 768px) {
  .table-wrap { background: transparent; border: none; box-shadow: none; overflow: visible; }
  .table-wrap .overflow-x { overflow: visible; }
  .table-wrap table { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: flex; flex-direction: column; gap: 10px; }
  .table-wrap tbody tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--card-shadow);
  }
  .table-wrap tbody tr:hover { background: var(--bg3); }
  .table-wrap tbody td {
    padding: 2px 0; font-size: 13px;
  }
  /* Title spans full width */
  .table-wrap tbody td:nth-child(3) {
    grid-column: 1 / -1;
    order: -2;
    font-size: 14px; font-weight: 600;
    padding-bottom: 6px;
  }
  /* ID + Date on same row */
  .table-wrap tbody td.td-id {
    order: -1;
    font-size: 11px;
  }
  .table-wrap tbody td.td-date {
    order: -1;
    text-align: right;
    grid-column: 2 / -1;
  }
  /* Hide less important cols on small screens */
  .table-wrap tbody td:nth-child(4) { display: none; } /* Author */
  .table-wrap tbody td:nth-child(5) { grid-column: 1 / 2; } /* Status */
  .table-wrap tbody td:nth-child(6) { grid-column: 2 / 3; text-align: right; } /* Executor */
  .table-wrap tbody td:nth-child(7) { grid-column: 3; } /* Actions */
}

/* Desktop table */
@media (min-width: 769px) {
  table { width: 100%; border-collapse: collapse; }
  thead tr { border-bottom: 1px solid var(--border); }
  thead th {
    text-align: left; padding: 10px 14px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--text3);
  }
  tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
  }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: var(--bg3); }
  tbody td { padding: 10px 14px; font-size: 13px; }
}

/* Always visible */
.td-id { color: var(--text2); font-size: 12px; font-weight: 600; }
.td-date { color: var(--text3); font-size: 12px; }
.td-link { color: var(--accent); font-weight: 600; }
.td-link:hover { color: var(--accent-hover); }
.td-muted { color: var(--text2); }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600;
}
.badge-publish { background: rgba(63,185,80,0.12); color: var(--success); }
.badge-draft   { background: var(--bg4); color: var(--text3); }
.badge-admin   { background: rgba(88,166,255,0.12); color: var(--info); }
.badge-exec    { background: var(--accent-dim); color: var(--accent); }

.action-btns { display: flex; gap: 6px; align-items: center; }
.action-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2);
  transition: all var(--transition); text-decoration: none;
}
.action-icon svg { width: 15px; height: 15px; }
.action-icon:hover { background: var(--bg4); color: var(--text); border-color: var(--border2); }
.action-icon.del:hover { background: rgba(248,81,73,0.1); color: var(--danger); border-color: rgba(248,81,73,0.25); }

/* ══════════════════════════════════════════
   SECTION DIVIDER
   ══════════════════════════════════════════ */
.section-label {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.3px; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════
   MAP BUTTON (panel)
   ══════════════════════════════════════════ */
.map-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
  text-decoration: none; margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  width: 100%;
  justify-content: center;
}
@media (min-width: 769px) {
  .map-btn { width: auto; justify-content: flex-start; }
}
.map-btn:hover { background: var(--bg3); color: var(--text); box-shadow: var(--card-shadow-hover); }
.map-btn svg { color: var(--accent); }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: space-between; align-items: center;
}
@media (max-width: 768px) {
  .site-footer { padding-bottom: 80px; } /* above bottom nav */
}
.site-footer p { font-size: 12px; color: var(--text3); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--text3); }
.footer-links a:hover { color: var(--text2); }

/* ══════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════ */
.overflow-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Hidden heading for accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
