/* ═════════════════════════════════════════════════════════════
   KHARITATI · stylesheet
   Olive palette adapted from friend's mosaic logo
   ═════════════════════════════════════════════════════════════ */

:root {
  /* Primary palette — warm archival */
  --parchment:    #f5efdc;   /* main background */
  --parchment-2:  #fdf8e8;   /* panels, cards */
  --ivory:        #fffaef;
  --cream:        #e8dfc8;
  --stone:        #d6c89a;   /* dividers */
  --stone-light:  #e0d8b8;
  
  /* Greens — landscape and growth */
  --olive:        #8a8456;
  --olive-dark:   #6e7c4d;
  --moss:         #4a6238;
  --sage:         #a0a87a;
  
  /* Earth — text and accents */
  --ochre:        #a6936c;   /* friend's wordmark color */
  --ochre-dark:   #8a7656;
  --brown:        #5a5435;   /* primary text */
  --brown-light:  #8a8056;   /* secondary text */
  --muted:        #b4a880;
  
  /* Status accents — earthen, not alarming */
  --terracotta:   #c2553e;   /* destroyed */
  --terracotta-dk:#9a3f2a;
  --amber:        #c8821a;   /* damaged */
  --intact:       #6e7c4d;   /* intact (olive) */
  
  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--parchment);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--ochre); text-decoration: none; }
a:hover { color: var(--brown); }

/* ─── Top flag stripe — restrained ──────────────────────── */
.top-stripe {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  display: flex;
  z-index: 1000;
}
.top-stripe .ts-1 { flex: 1; background: var(--moss); }
.top-stripe .ts-2 { flex: 1; background: var(--ochre); }
.top-stripe .ts-3 { flex: 1; background: var(--olive); }

/* ─── Header ────────────────────────────────────────────── */
#header {
  position: fixed;
  top: 4px; left: 0; right: 0;
  height: 64px;
  background: rgba(245, 239, 220, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--stone);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 24px;
}

.site-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.mark-img {
  width: 36px; height: 36px;
  display: block;
}
.site-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.sn-en {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.01em;
}
.sn-sep {
  width: 1px; height: 16px;
  background: var(--stone);
}
.sn-ar {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ochre);
  direction: rtl;
}
.site-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--brown-light);
  padding-left: 18px;
  border-left: 0.5px solid var(--stone);
}
.last-updated {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav {
  display: flex;
  gap: 22px;
  margin-left: 24px;
}
.nav-link {
  color: var(--brown-light);
  font-size: 13px;
  font-weight: 400;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--brown); }
.nav-link.active {
  color: var(--brown);
  border-bottom-color: var(--ochre);
  font-weight: 500;
}

/* ─── App layout — header + map ─────────────────────────── */
#app {
  position: absolute;
  top: 68px; left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
}

/* ─── Sidebar (city sites list) ──────────────────────────── */
.sidebar {
  background: var(--parchment-2);
  border-right: 0.5px solid var(--stone);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sb-section {
  padding: 22px 24px;
  border-bottom: 0.5px solid var(--stone);
}
.sb-section h3 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 14px;
}

/* Back to Palestine link */
.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 8px;
}
.back-link:hover { color: var(--brown); }

/* Filter buttons */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 7px 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--brown);
  opacity: 0.55;
  transition: opacity 0.15s;
  text-align: left;
}
.filter-btn:hover { opacity: 0.95; }
.filter-btn.active { opacity: 1; font-weight: 500; }
.filter-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Site list items */
.site-item {
  padding: 16px 24px;
  border-bottom: 0.5px solid var(--stone-light);
  cursor: pointer;
  transition: background 0.15s, padding-left 0.15s;
}
.site-item:hover { background: var(--cream); }
.site-item.active {
  background: var(--cream);
  border-left: 2px solid var(--ochre);
  padding-left: 22px;
}
.si-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.005em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.si-sub {
  font-size: 12px;
  color: var(--brown-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Map container ──────────────────────────────────────── */
#map-container {
  position: relative;
  background: #2c2a1e;
}
#map {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
.leaflet-container {
  background: #2c2a1e;
  font-family: var(--sans);
}

/* Map overlay — bottom-left stats */
.map-overlay {
  position: absolute;
  bottom: 24px;
  left: 20px;
  background: rgba(253, 248, 232, 0.95);
  border: 0.5px solid var(--stone);
  border-radius: 10px;
  padding: 14px 18px;
  z-index: 400;
  backdrop-filter: blur(8px);
}
.mo-stats {
  display: flex;
  gap: 22px;
  align-items: flex-end;
}
.mo-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.mo-n {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: -0.01em;
}
.mo-n.g { color: var(--intact); }
.mo-n.a { color: var(--amber); }
.mo-n.r { color: var(--terracotta); }
.mo-l {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--brown-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* ─── UNOSAT toggle button ───────────────────────────────── */
#unosat-btn {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 450;
  background: rgba(253, 248, 232, 0.95);
  border: 0.5px solid var(--stone);
  color: var(--brown-light);
  font-family: var(--sans);
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
#unosat-btn:hover {
  border-color: var(--terracotta);
  color: var(--brown);
}
#unosat-btn.active {
  border-color: var(--terracotta);
  color: var(--terracotta-dk);
  background: rgba(194, 85, 62, 0.08);
}
.unosat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
#unosat-btn.active .unosat-dot { background: var(--terracotta); }

#unosat-legend {
  position: absolute;
  bottom: 70px;
  right: 16px;
  z-index: 450;
  background: rgba(253, 248, 232, 0.97);
  border: 0.5px solid var(--stone);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 11px;
  color: var(--brown-light);
  display: none;
  min-width: 220px;
  backdrop-filter: blur(8px);
}
#unosat-legend.show { display: block; }
#unosat-legend strong {
  display: block;
  color: var(--brown);
  font-weight: 500;
  font-size: 12px;
  margin-bottom: 8px;
}
.ul-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.ul-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.unosat-source {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--stone-light);
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}

/* ─── Detail panel ───────────────────────────────────────── */
#detail-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 90vw;
  background: rgba(253, 248, 232, 0.97);
  border-left: 0.5px solid var(--stone);
  z-index: 500;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: -4px 0 24px rgba(90, 84, 53, 0.08);
}
#detail-panel.open { transform: translateX(0); }

.panel-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brown-light);
  font-size: 22px;
  z-index: 10;
  line-height: 1;
}
.panel-close:hover { color: var(--brown); }

.ph {
  padding: 28px 32px 22px;
  border-bottom: 0.5px solid var(--stone-light);
  flex-shrink: 0;
}
.ph-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--brown);
  padding-right: 32px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.ph-ar {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ochre);
  direction: rtl;
  margin-bottom: 14px;
  line-height: 1.3;
}
.ph-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Status badges */
.status-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-badge.intact {
  background: rgba(110, 124, 77, 0.12);
  color: var(--olive-dark);
}
.status-badge.damaged {
  background: rgba(200, 130, 26, 0.12);
  color: var(--amber);
}
.status-badge.destroyed {
  background: rgba(194, 85, 62, 0.12);
  color: var(--terracotta-dk);
}
.heritage-badge {
  font-size: 9px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--brown-light);
  letter-spacing: 0.05em;
}

/* Action buttons */
.ph-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.action-btn {
  font-family: var(--sans);
  font-size: 12px;
  padding: 8px 16px;
  background: transparent;
  border: 0.5px solid var(--stone);
  color: var(--brown-light);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.action-btn:hover {
  border-color: var(--ochre);
  color: var(--brown);
}

/* Tabs */
.media-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--stone-light);
  padding: 0 32px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.media-tabs::-webkit-scrollbar { display: none; }
.media-tab {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  color: var(--brown-light);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  padding: 12px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  margin-right: 4px;
}
.media-tab:hover { color: var(--brown); }
.media-tab.active {
  color: var(--brown);
  font-weight: 500;
  border-bottom-color: var(--ochre);
}

.pb {
  flex: 1;
  overflow-y: auto;
}
.ps {
  padding: 24px 32px;
  border-bottom: 0.5px solid var(--stone-light);
}
.ps-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 14px;
}
.ps p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--brown);
}

/* Data grid */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.data-item {
  background: var(--parchment);
  border-radius: 6px;
  padding: 12px;
}
.data-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown-light);
  margin-bottom: 4px;
  font-weight: 500;
}
.data-val {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--brown);
  font-weight: 500;
}

/* Testimony cards */
.tcard {
  background: var(--parchment);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}
.tcard:last-child { margin-bottom: 0; }
.tcard-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--brown);
  line-height: 1.6;
  margin-bottom: 12px;
}
.tcard-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tcard-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ochre);
  color: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
}
.tcard-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--brown);
}
.tcard-role {
  font-size: 11px;
  color: var(--brown-light);
}

/* Sources list */
.source-item {
  background: var(--parchment);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--brown);
  line-height: 1.5;
}
.source-item .src-author {
  font-weight: 500;
}
.source-item .src-title {
  font-style: italic;
}

/* ─── Palestine homepage ─────────────────────────────────── */
#palestine-home {
  position: absolute;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--parchment);
  overflow: hidden;
}
#pal-map {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.pal-panel {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 360px;
  background: rgba(253, 248, 232, 0.97);
  border: 0.5px solid var(--stone);
  border-radius: 12px;
  padding: 0;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(90, 84, 53, 0.1);
  backdrop-filter: blur(12px);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.pal-panel-header {
  padding: 28px 26px 20px;
  border-bottom: 0.5px solid var(--stone);
}
.pal-panel-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: -0.005em;
  line-height: 1;
}
.pal-panel-title-ar {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ochre);
  direction: rtl;
  margin-top: 4px;
  line-height: 1.2;
}
.pal-panel-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brown-light);
  margin: 16px 0 18px;
  padding-top: 16px;
  border-top: 0.5px solid var(--stone-light);
}
.pal-panel-sub {
  font-size: 10px;
  color: var(--brown-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.pal-city-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 26px;
  border-bottom: 0.5px solid var(--stone-light);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.pal-city-row:hover { background: var(--cream); }
.pal-city-row.future { opacity: 0.55; cursor: default; }
.pal-city-row.future:hover { background: transparent; }
.pcr-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pcr-pin {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ochre);
}
.pcr-pin.future { background: var(--muted); }
.pcr-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.005em;
  line-height: 1;
}
.pcr-name-ar {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ochre);
  direction: rtl;
  margin-top: 3px;
}
.pcr-meta {
  font-size: 10px;
  color: var(--brown-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pal-panel-footer {
  padding: 20px 26px;
  border-top: 0.5px solid var(--stone-light);
  font-size: 11px;
  color: var(--brown-light);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.5;
}

/* ─── About page ─────────────────────────────────────────── */
.about-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 32px 100px;
}
.about-title {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  color: var(--brown);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.about-title-ar {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--ochre);
  direction: rtl;
  margin-bottom: 40px;
  line-height: 1.2;
}
.about-lead {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  color: var(--brown-light);
  line-height: 1.65;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 0.5px solid var(--stone);
}
.about-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 0.5px solid var(--stone-light);
}
.about-section:last-child { border-bottom: none; }
.about-section-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 20px;
}
.about-body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--brown);
}
.about-body p { margin-bottom: 18px; }
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--brown); font-weight: 500; }

/* ─── Toast notification ────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brown);
  color: var(--parchment);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Leaflet popup styling ──────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: var(--parchment-2);
  border: 0.5px solid var(--stone);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(90, 84, 53, 0.15);
  padding: 4px;
}
.leaflet-popup-tip {
  background: var(--parchment-2);
  border: 0.5px solid var(--stone);
}
.leaflet-popup-content {
  margin: 12px 16px;
  font-family: var(--sans);
  color: var(--brown);
}
.popup-inner {
  min-width: 200px;
}
.popup-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 4px;
}
.popup-ar {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ochre);
  direction: rtl;
  margin-bottom: 8px;
}
.popup-meta {
  font-size: 11px;
  color: var(--brown-light);
  margin-bottom: 10px;
}
.popup-open-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--ochre);
  color: var(--parchment);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.popup-open-btn:hover { background: var(--ochre-dark); }

/* ─── City intro overlay ─────────────────────────────────── */
.city-intro {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(253, 248, 232, 0.97);
  border: 0.5px solid var(--stone);
  border-radius: 14px;
  padding: 24px 36px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 550;
  min-width: 280px;
  backdrop-filter: blur(12px);
}
.city-intro.show { opacity: 1; }
.city-intro-name {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  color: var(--brown);
  line-height: 1;
}
.city-intro-ar {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ochre);
  direction: rtl;
  margin-top: 4px;
  line-height: 1;
}
.city-intro-sub {
  font-size: 11px;
  color: var(--brown-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid var(--stone-light);
}

/* ─── Coming soon city page ──────────────────────────────── */
.coming-soon-wrap {
  position: absolute;
  top: 68px; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment);
}
.coming-soon-card {
  max-width: 480px;
  text-align: center;
  padding: 48px 40px;
  background: var(--parchment-2);
  border: 0.5px solid var(--stone);
  border-radius: 12px;
}
.coming-soon-card h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 4px;
}
.coming-soon-ar {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ochre);
  direction: rtl;
  margin-bottom: 24px;
}
.coming-soon-card p {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--brown-light);
  line-height: 1.6;
  margin-bottom: 24px;
}
.coming-soon-back {
  display: inline-block;
  padding: 10px 20px;
  background: var(--ochre);
  color: var(--parchment);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
.coming-soon-back:hover {
  background: var(--ochre-dark);
  color: var(--parchment);
}

/* ─── Mobile responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  #header {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }
  .site-tagline {
    display: none;
  }
  .last-updated {
    display: none;
  }
  nav {
    margin-left: 0;
    gap: 16px;
  }
  #app {
    grid-template-columns: 1fr;
    top: auto;
  }
  .sidebar {
    display: none;
  }
  #detail-panel {
    width: 100%;
  }
  .pal-panel {
    right: 16px;
    left: 16px;
    width: auto;
    top: 16px;
  }
}

/* ─── Phase-1 provenance notice ─────────────────────────── */
.data-notice {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: rgba(253, 248, 232, 0.95);
  border: 1px solid #d6c89a;
  border-left: 3px solid #c8821a;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  color: #5a5435;
  max-width: min(92vw, 640px);
  text-align: center;
  box-shadow: 0 2px 10px rgba(90, 84, 53, 0.12);
}
.data-notice .dn-ar { display: block; margin-top: 2px; }
.data-notice.inline {
  position: static;
  transform: none;
  margin: 0 0 24px;
  text-align: left;
}
