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

:root {
  --bg: #f4f6fb;
  --bg-surface: #ffffff;
  --bg-elevated: #eaecf4;
  --border: #d8dce8;
  --text-primary: #1a1f2e;
  --text-secondary: #5a6478;
  --text-muted: #9099ac;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --header-h: 56px;
  --sidebar-w: 280px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* ── Page wrapper (scrollable, since body/html overflow:hidden) ── */
.page {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: var(--header-h);
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-logo svg {
  color: var(--accent);
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

/* ── Maps Section ── */
.maps-section {
  scroll-snap-align: start;
  display: flex;
  height: calc(100vh - var(--header-h));
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.sidebar-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-chevron {
  display: none;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.sidebar-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-header p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Layer Groups ── */
.layer-group {
  padding: 8px 12px 4px;
  border-bottom: 1px solid var(--border);
}

.layer-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0 8px 6px;
}

.layer-group-title svg {
  opacity: 0.7;
}

/* ── Layer Items ── */
.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}

.layer-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.layer-item input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.check-icon {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.12s, transform 0.12s;
}

.layer-item input:checked ~ .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.layer-item input:checked ~ .checkbox-custom .check-icon {
  opacity: 1;
  transform: scale(1);
}

.layer-item input:checked ~ .checkbox-custom ~ .marker-dot,
.layer-item input:checked ~ .checkbox-custom + .marker-dot {
  opacity: 1;
}

.marker-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.layer-item input:checked ~ .marker-dot {
  opacity: 1;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
}

.api-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.api-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}

.api-notice code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent-hover);
}

/* ── Map ── */
.map-container {
  flex: 1;
  position: relative;
}

#map-wrapper {
  width: 100%;
  height: 100%;
}

/* ── Dataset separator ── */
.layer-group-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.layer-group-separator::before,
.layer-group-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.2));
}

.layer-group-separator::after {
  background: linear-gradient(90deg, rgba(37,99,235,0.2), transparent);
}

/* ── Tomb count badge ── */
.tomb-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(37,99,235,0.1);
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Chronology badges ── */
.chron-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.layer-item input:checked ~ .chron-badge {
  opacity: 1;
}

.chron-r  { background: rgba(124,58,237,0.08);  color: #6d28d9; border: 1px solid rgba(124,58,237,0.25); }
.chron-hr { background: rgba(6,182,212,0.08);   color: #0891b2; border: 1px solid rgba(6,182,212,0.25); }
.chron-h  { background: rgba(5,150,105,0.08);   color: #059669; border: 1px solid rgba(5,150,105,0.25); }

/* ── Risk classification badges ── */
.risk-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.layer-item input:checked ~ .risk-badge { opacity: 1; }

.risk-hr  { background: #ff3d00;   color: #fff; }
.risk-ir  { background: #FF9800;   color: #fff; }
.risk-lmr { background: #ffe500;   color: #454545; }

/* ── Town list ── */
.town-list {
  max-height: 140px;
  overflow-y: auto;
  margin: 0 4px 4px;
}

.town-list::-webkit-scrollbar {
  width: 4px;
}
.town-list::-webkit-scrollbar-track {
  background: transparent;
}
.town-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Overlay toggle switch ── */
.overlay-item {
  justify-content: space-between;
  cursor: default;
}

.overlay-label {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.toggle-switch {
  position: relative;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  display: block;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: #fff;
}

.overlay-item:has(input:checked) .overlay-label {
  color: var(--text-primary);
}

.town-all {
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Scrollbar styling */
.sidebar-body::-webkit-scrollbar {
  width: 4px;
}
.sidebar-body::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Hero ── */
.hero {
  scroll-snap-align: start;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 64px 48px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* subtle radial glow in the background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(37,99,235,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 75% 55%, rgba(124,58,237,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-accent {
  background: linear-gradient(135deg, #4f8ef7 0%, #c97cf7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
}

.hero-cta svg {
  transition: transform 0.2s;
}

.hero-cta:hover svg {
  transform: translateY(2px);
}

/* ── Hero visual ── */
.hero-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-map-preview {
  width: 360px;
  height: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 0 1px rgba(37,99,235,0.1);
  position: relative;
  overflow: hidden;
}

.hero-map-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(37,99,235,0.03) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(37,99,235,0.05) 24px, rgba(37,99,235,0.05) 25px),
    repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(37,99,235,0.05) 24px, rgba(37,99,235,0.05) 25px);
  border-radius: 20px;
}

.cyprus-outline {
  width: 100%;
  height: 100%;
  position: relative;
}

.map-pins circle {
  animation: pulse 2.5s ease-in-out infinite;
}

.map-pins circle:nth-child(2) { animation-delay: 0.4s; }
.map-pins circle:nth-child(3) { animation-delay: 0.8s; }
.map-pins circle:nth-child(4) { animation-delay: 1.2s; }
.map-pins circle:nth-child(5) { animation-delay: 1.6s; }
.map-pins circle:nth-child(6) { animation-delay: 2.0s; }

/* Only animate the glow rings (even children = r:9/8 circles) */
.map-pins circle:nth-child(even) {
  animation: ping 2.5s ease-out infinite;
}

@keyframes ping {
  0%   { transform-origin: center; transform: scale(1); opacity: 0.2; }
  70%  { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Nav toggle (hamburger) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}

.nav-toggle.nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.nav-open span:nth-child(2) { opacity: 0; }
.nav-toggle.nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Text Sections ── */
.text-section {
  scroll-snap-align: start;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 64px 48px;
  background: var(--bg);
  position: relative;
}

.text-section-alt {
  background: var(--bg-surface);
}

.section-inner {
  width: 100%;
  max-width: 800px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

h2.section-subtitle,
h3.section-subtitle {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 25px 0 5px;
}

h2.section-subtitle {
  font-size: 22px;
}

h3.section-subtitle {
  font-size: 19px;
}

.section-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.section-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.section-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.section-list li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.section-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

/* ── Chronology section ── */
.chron-inner {
  max-width: 900px;
}

.chron-header {
  margin-bottom: 28px;
}


/* ── Period cards ── */
.period-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.period-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.text-section-alt .period-card {
  background: var(--bg);
}

.period-card-h {
  border-top: 3px solid #059669;
}

.period-card-r {
  border-top: 3px solid #6d28d9;
}

.period-card-num {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  opacity: 0.05;
  position: absolute;
  top: 16px;
  right: 20px;
  pointer-events: none;
  user-select: none;
}

.period-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.period-card-h .period-name { color: #059669; }
.period-card-r .period-name { color: #6d28d9; }

.period-dates {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.period-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ── Dataset ── */
.dataset-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 28px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}

.dataset-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.section-acknowledgements {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-acknowledgements p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.citation {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: 8px;
  border-left: 3px solid var(--border);
}

.citation a {
  color: var(--accent);
  text-decoration: none;
}

.citation a:hover {
  text-decoration: underline;
}

/* ── Team grid ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px 24px;
  gap: 10px;
}

.team-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
}

.team-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.team-role {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Analysis section ── */
#analysis {
  align-items: flex-start;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.analysis-table th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.analysis-table td {
  padding: 9px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.analysis-table tbody tr:last-child td {
  border-bottom: none;
}

.analysis-table tbody tr:hover {
  background: var(--bg-elevated);
}

.section-body {
  margin-bottom: 10px;
}

.section-inner code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-hover);
  border: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Nav: tighter spacing */
  .nav-link {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Text sections: stack vertically */
  .text-section {
    flex-direction: column;
    gap: 36px;
    padding: 48px 32px;
  }

  /* Intro: center the stacked layout */
  #project {
    align-items: center;
    text-align: center;
  }

  #project .section-list {
    text-align: left;
  }

  #project .hero-cta {
    align-self: flex-start;
  }

  .hero-visual {
    width: 100%;
    justify-content: center;
  }

  .hero-map-preview {
    width: 100%;
    max-width: 360px;
  }

  /* Period cards: single column */
  .period-cards {
    grid-template-columns: 1fr;
  }

  /* Team grid: 2 columns */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Disable mandatory scroll-snap — sections exceed viewport height on mobile */
  .page {
    scroll-snap-type: none;
  }

  .text-section,
  .maps-section {
    scroll-snap-align: none;
    min-height: auto;
    padding: 40px 20px;
  }

  /* Header: show hamburger, hide inline nav */
  .header {
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px 12px;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .header-nav.nav-open {
    display: flex;
  }

  .nav-link {
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* Cyprus map preview: visible but small */
  #project .hero-visual {
    display: flex;
  }

  #project .hero-map-preview {
    width: 220px;
    height: 150px;
  }

  /* Dataset link: full width */
  .dataset-link {
    width: 100%;
    justify-content: center;
  }

  /* Maps section: sidebar stacks above map */
  :root {
    --sidebar-w: 100%;
  }

  .maps-section {
    flex-direction: column;
    height: auto;
  }

  /* Sidebar: collapsible on mobile — no scroll trap */
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-chevron {
    display: block;
  }

  .sidebar-header {
    cursor: pointer;
    user-select: none;
  }

  .sidebar-body {
    display: none;
    max-height: 50vh;
  }

  .sidebar.filters-open .sidebar-body {
    display: block;
  }

  .sidebar.filters-open .sidebar-chevron {
    transform: rotate(180deg);
  }

  /* Fix map height — height:100% needs an explicit parent height */
  .map-container {
    height: 60vh;
    min-height: 300px;
    flex: none;
  }

  /* Team grid: single column */
  .team-grid {
    grid-template-columns: 1fr;
  }
}
