/* Sejururi active - operatori independenți — shared styles (vanilla, no build).
   One stylesheet drives the grid, detail and dashboard pages. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1f2733;
  --muted: #6b7785;
  --line: #e3e7ec;
  --brand: #1f7a5a;        /* boutique green */
  --brand-ink: #125e44;
  --accent: #c9772b;       /* warm adventure accent */
  --ro: #2563eb;
  --intl: #7c3aed;
  --hi: #d8f3e3; --hi-ink: #11663f;
  --mid: #fff3cf; --mid-ink: #8a5a00;
  --lo: #ffe0db; --lo-ink: #a3331f;
  --zero: #f1f3f5; --zero-ink: #adb5bd;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--brand-ink); }
.muted { color: var(--muted); }
code { background: #eef1f4; padding: 0.05em 0.35em; border-radius: 4px; font-size: 0.9em; }

/* --- header / nav -------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.brand { text-decoration: none; display: flex; align-items: center; }
.brand img { display: block; }
.site-header__inner input[type="search"] {
  flex: 1 1 200px; max-width: 320px; min-width: 0;
  padding: 0.4rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.88rem; background: var(--surface);
}
.nav { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--ink); }
.scope-emoji { font-size: 1.1rem; margin-right: 0.15rem; }
.header-updated { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

main { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.error-banner {
  background: #fff4f2; border: 1px solid #f3c4bc; color: #a3331f;
  padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
}

/* --- toolbar (count + reset only; search is in header) ------------------- */
.toolbar {
  display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 1rem; justify-content: flex-end;
}
.result-count { color: var(--muted); font-size: 0.9rem; white-space: nowrap; margin-right: auto; }
.btn-reset {
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.75rem; cursor: pointer; color: var(--muted);
}
.btn-reset:hover { color: var(--ink); border-color: var(--muted); }

/* --- layout: map section (map + overlaid sidebar), then full-width grid --- */
.map-section {
  position: relative; margin-bottom: 1rem;
}
.map-section .map-index { margin-bottom: 0; }

.facets {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 220px; max-height: 100%; overflow-y: auto; overflow-x: hidden;
  background: rgba(247, 248, 250, 0.92); border-right: 1px solid var(--line);
  padding: 0.5rem 0.75rem 1rem; z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Overlay sits on top of the map — let clicks on empty space pass through
     to the map underneath; only actual controls should intercept them. */
  pointer-events: none;
}
.facets input, .facets button, .facets select, .facets a, .facets summary, .facets label {
  pointer-events: auto;
}

/* map page: fixed map height, sidebar matches */
.layout--map { align-items: start; }
.layout--map .worldmap { height: 26.875rem; }  /* 430px */
.layout--map .worldmap svg { width: 100%; height: 100%; }
.layout--map .facets { position: static; max-height: 26.875rem; overflow: auto; }
.facets h2 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; }

/* Collapsible facet sections (details/summary) */
.facet { border: none; padding: 0; margin: 0; }
.facet summary {
  list-style: none; cursor: pointer; padding: 0.4rem 0;
  font-weight: 600; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after {
  content: "+"; font-size: 0.85rem; font-weight: 400; color: var(--muted);
  transition: transform 0.15s; margin-left: 0.5rem;
}
.facet[open] summary::after { content: "−"; }
.facet summary:hover { color: var(--ink); }
.facet .facet__opts { padding: 0.35rem 0 0.5rem; }

.facet legend { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); padding: 0.5rem 0 0.35rem; }

/* Sidebar-embedded sort + view controls */
.sidebar-controls {
  display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
}
.sidebar-controls select {
  flex: 1; padding: 0.15rem 0; border: none; border-radius: 0;
  background: transparent; font-size: 0.8rem; color: var(--muted);
}
.sidebar-controls select:focus { outline: none; color: var(--ink); }
.sidebar-controls .view-toggle { margin: 0; border: none; }

.facet { border: none; padding: 0; margin: 0 0 1rem; }
.facet legend { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); padding: 0.5rem 0 0.35rem; }
.facet__opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.45rem;
  padding: 0.18rem 0; cursor: pointer; font-size: 0.92rem;
}
.facet__opt:hover { color: var(--brand-ink); }
.facet__count { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.facet__opt.is-zero { opacity: 0.4; }

.facet .rng { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
.facet input[type="number"] {
  width: 5.5rem; padding: 0.3rem 0.4rem; border: 1px solid var(--line); border-radius: 6px;
}
.facet .hint { color: var(--muted); font-size: 0.75rem; margin-top: 0.35rem; }

/* --- card grid ----------------------------------------------------------- */
.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { position: relative; aspect-ratio: 4 / 3; max-height: 200px; background: #eef1f4; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media .chip { position: absolute; left: 0.5rem; bottom: 0.5rem; }
.card__body { padding: 0.7rem 0.8rem 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card__title { font-size: 0.98rem; margin: 0; line-height: 1.3; }
.card__op-price-row { margin-top: auto; display: flex; flex-direction: column; gap: 0.15rem; }
.card__op { color: var(--muted); font-size: 0.82rem; }
.card__meta { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.card__price { font-weight: 700; color: var(--brand-ink); }
.card__pricenote { color: var(--muted); cursor: help; font-weight: 400; margin-left: 0.2rem; }
.card__cta { display: none; }

/* --- list view: 2-column, compact rows ----------------------------------- */
.grid--list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.grid--list .card {
  display: grid; grid-template-columns: 100px 1fr; gap: 0.6rem;
  align-items: start; border-radius: 0; border: none;
  background-color: rgba(255,255,255,.5);
  padding: 0.55rem 0.65rem;
  box-shadow: none;
}
@media (min-width: 540px) {
.grid--list {
  gap: 1ex .5rem;;
}
  
}

.grid--list .card:nth-child(odd) { border-right: 1px solid var(--line); }
.grid--list .card:nth-child(-n+2) { border-top: 1px solid var(--line); }
.grid--list .card:hover { box-shadow: none; transform: none; background: #fafbfc; }
.grid--list .card__media { aspect-ratio: 4 / 3; width: 100px; max-height: 75px; border-radius: 4px; overflow: hidden; }
.grid--list .card__media .chip { display: none; }
.grid--list .card__body { gap: 0.1rem; padding: 0; flex: 1; min-width: 0; }
.grid--list .card__title { font-size: 0.85rem; }
.grid--list .card__op { font-size: 0.72rem; }
.grid--list .card__op-price-row { margin-top: 0; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.grid--list .card__price { font-size: 0.82rem; text-align: right; white-space: nowrap; }
.grid--list .card__pricenote { display: none; }
.grid--list .card__meta { display: none; }
.grid--list .card__cta { display: none; }

/* --- compact view -------------------------------------------------------- */
.grid--compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; }
.grid--compact .card__media { aspect-ratio: 2 / 1; max-height: 130px; }
.grid--compact .card__media .chip { display: none; }
.grid--compact .card__body { padding: 0.4rem 0.5rem 0.5rem; gap: 0.2rem; }
.grid--compact .card__title { font-size: 0.82rem; }
.grid--compact .card__op-price-row { margin-top: auto; }
.grid--compact .card__op { display: none; }
.grid--compact .card__meta { display: none; }
.grid--compact .card__price { font-size: 0.82rem; }

/* --- interstitials (decorative/promo cards injected into grid) ------------ */
.interstitial {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); min-height: 120px;
}
.interstitial.span-2x { grid-column: span 2; }
.interstitial.span-2y { grid-row: span 2; }

/* Quote interstitial */
.interstitial.type-quote {
  background: var(--brand-ink); color: #fff; padding: 1.2rem 1rem;
}
.interstitial__text {
  font-family: Georgia, "Source Serif 4", serif; font-size: 1rem;
  line-height: 1.5; font-style: italic; text-align: center;
  max-width: 90%; z-index: 1;
}

/* Image interstitial */
.interstitial.type-img { padding: 0; }
.interstitial.type-img img {
  width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
/* IG quote / animation: image with optional text overlay at bottom */
.interstitial.type-img .interstitial__text {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff; font-size: 0.85rem; padding: 1.5rem 0.75rem 0.6rem;
  text-align: center; max-width: 100%; font-style: normal;
}

/* Responsive: collapse spans on mobile */
@media (max-width: 860px) {
  .interstitial.span-2x { grid-column: span 1; }
  .interstitial.span-2y { grid-row: span 1; }
}

/* --- view toggle --------------------------------------------------------- */
.view-toggle { display: flex; gap: 2px; border: none; }
.view-toggle button {
  background: transparent; border: none; padding: 0.15rem 0.3rem; cursor: pointer;
  color: var(--muted); font-size: 0.82rem; line-height: 1;
}
.view-toggle button + button { border-left: none; }
.view-toggle button.active { background: transparent; color: var(--ink); font-weight: 700; }
.view-toggle button:hover:not(.active) { background: transparent; color: var(--ink); }

/* --- chips --------------------------------------------------------------- */
.chip {
  display: inline-block; padding: 0.12rem 0.5rem; border-radius: 999px;
  background: #eef1f4; color: var(--muted); font-size: 0.75rem; font-weight: 600;
  white-space: nowrap;
}
.chip--activity { background: #e7f4ee; color: var(--brand-ink); }
.chip--ro { background: #e6efff; color: var(--ro); }
.chip--intl { background: #f0e9fe; color: var(--intl);  }
.chip--date { background: #fdf3e3; color: #8a5a00; }


/* --- empty state --------------------------------------------------------- */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* --- detail page --------------------------------------------------------- */
.detail-back { display: inline-block; margin-bottom: 0.75rem; text-decoration: none; color: var(--muted); }
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.gallery__main { aspect-ratio: 4 / 3; background: #eef1f4; border-radius: var(--radius); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery__thumbs { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.gallery__thumbs img {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent;
}
.gallery__thumbs img.active { border-color: var(--brand); }

.detail h1 { margin: 0 0 0.25rem; font-size: 1.5rem; line-height: 1.25; }
.detail .op-line { color: var(--muted); margin-bottom: 0.75rem; }
.detail .op-line a { font-weight: 600; }
.detail .price-block { font-size: 1.4rem; font-weight: 700; color: var(--brand-ink); }
.detail .price-note { color: var(--muted); font-size: 0.85rem; font-weight: 400; margin-top: 0.25rem; white-space: pre-line; }
.detail .badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.75rem 0; }
.cta {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  padding: 0.7rem 1.2rem; border-radius: var(--radius); font-weight: 600; margin: 0.5rem 0;
}
.cta:hover { background: var(--brand-ink); color: #fff; }

.specs { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.specs li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.65rem; }
.specs .k { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.specs .v { font-weight: 600; }

.section { margin-top: 1.75rem; }
.section h2 { font-size: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; }

.op-profile h1 { margin: 0 0 0.25rem; font-size: 1.5rem; line-height: 1.25; }
.op-profile .badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.75rem 0; }
.op-social { margin-bottom: 0.5rem; }
.op-social a { color: var(--brand); font-weight: 600; margin-right: 0.75rem; }
.desc { white-space: pre-line; }
.desc--md { white-space: normal; }
.desc--md h2, .desc--md h3, .desc--md h4, .desc--md h5, .desc--md h6 {
  font-size: 0.95rem; margin: 1.1rem 0 0.35rem; color: var(--brand-ink);
  scroll-margin-top: 3.5rem; /* keep headings clear of the sticky TOC after a jump */
}
.desc--md h2:first-child, .desc--md h3:first-child { margin-top: 0; }
.desc--md p { margin: 0.5rem 0; line-height: 1.55; }
.desc--md ul, .desc--md ol { margin: 0.4rem 0 0.8rem; padding-left: 1.3rem; line-height: 1.5; }
.desc--md li { margin: 0.2rem 0; }
.desc--md a { color: var(--brand); }

/* Horizontal table of contents for the Markdown description -- sticks to
   the top of the viewport once scrolled past, so long descriptions stay
   navigable. */
.toc-md {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 0.5rem; overflow-x: auto; white-space: nowrap;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 0.6rem 0; margin: 0.75rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}
.toc-md a {
  flex: 0 0 auto; padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--bg); color: var(--ink); text-decoration: none;
  font-size: 0.82rem; font-weight: 600; border: 1px solid var(--line);
}
.toc-md a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.departures { list-style: none; padding: 0; }
.departures li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.freshness { color: var(--muted); font-size: 0.82rem; margin-top: 1rem; }

.rail { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none;
  align-items: center; justify-content: center; z-index: 50; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 6px; }

/* --- dashboard ----------------------------------------------------------- */
.dash-section { margin-bottom: 2.5rem; }
.dash-section > h2 { font-size: 1.2rem; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 1.1rem; min-width: 130px;
}
.stat .n { font-size: 1.6rem; font-weight: 700; color: var(--brand-ink); }
.stat .l { color: var(--muted); font-size: 0.82rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
th, td { padding: 0.45rem 0.6rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { position: sticky; top: 0; background: #f3f5f7; z-index: 1; font-size: 0.78rem; }
tbody tr:hover { background: #fafbfc; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.cov { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.cov--hi { background: var(--hi); color: var(--hi-ink); }
.cov--mid { background: var(--mid); color: var(--mid-ink); }
.cov--lo { background: var(--lo); color: var(--lo-ink); }
.cov--zero { background: var(--zero); color: var(--zero-ink); font-weight: 400; }
.cov--na { color: var(--zero-ink); }
.col-field { position: sticky; left: 0; background: var(--surface); font-weight: 600; z-index: 2; }
thead .col-field { z-index: 3; background: #f3f5f7; }

.pill {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
}
.pill--ok { background: var(--hi); color: var(--hi-ink); }
.pill--warn { background: var(--mid); color: var(--mid-ink); }
.pill--bad { background: var(--lo); color: var(--lo-ink); }
.pill--idle { background: var(--zero); color: var(--zero-ink); }

.tabs { display: flex; gap: 0.5rem; margin: 1rem 0; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; padding: 0.6rem 0.9rem; cursor: pointer; color: var(--muted);
  font-size: 0.95rem; font-weight: 600; border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.pivot-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 1rem;
  font-size: 0.82rem; color: var(--muted); cursor: pointer; user-select: none;
  vertical-align: middle;
}
.pivot-toggle input { cursor: pointer; }
.pivot-toggle:has(input:checked) { color: var(--brand-ink); font-weight: 600; }

.cov-all-row td { border-bottom: 2px solid var(--line); }

.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* --- scrollable facet (long country list) -------------------------------- */
.facet--scroll .facet__opts { max-height: 15rem; overflow: auto; padding-right: 0.25rem; }
.chip--geo { background: #eaf3ef; color: var(--brand-ink); }

/* --- map results (below map on click) ----------------------------------- */
.map-results { margin-top: 1.5rem; }
.map-results__header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem;
}
.map-results__header h2 { margin: 0; font-size: 1.1rem; }
.map-results .grid { margin-top: 0; }

/* --- map page ------------------------------------------------------------ */
.map-title { font-size: 1.1rem; margin: 0; }
.map-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.75rem;
}
.worldmap svg { width: 100%; height: auto; display: block; }
.worldmap .cc { fill: #eef1f4; stroke: #fff; stroke-width: 0.3; }
.worldmap .cc.is-active { cursor: pointer; }
.worldmap .cc.is-active:hover { stroke: var(--brand-ink); stroke-width: 0.8; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center;
  margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--muted);
}
.map-legend__item { display: inline-flex; align-items: center; gap: 0.35rem; }
.map-legend__sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.map-hint { font-size: 0.85rem; margin: 0.6rem 0 0; }
.map-tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--ink); color: #fff; padding: 0.3rem 0.5rem;
  border-radius: 6px; font-size: 0.82rem; white-space: nowrap;
  box-shadow: var(--shadow);
}

/* --- embedded map (index page) -------------------------------------------- */
.map-index {
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  height: 380px; overflow: hidden; position: relative; z-index: 1;
  width: 100%;
}
.map-index .leaflet-container { background: transparent !important; }
.map-index .loading { padding: 11rem 1rem; text-align: center; color: var(--muted); }

/* --- filter bar (scope toggle + activity chips) --------------------------- */
.filter-bar {
  display: flex; align-items: center; gap: 1ex; flex-wrap: nowrap;
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  margin-bottom: 0.75rem; padding: 6px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

/* --- scope tabs (INTL / RO) ----------------------------------------------- */
.scope-toggle {
  display: flex; gap: 16px; flex-shrink: 0; margin-right: 12px;
}
.scope-toggle__btn {
  padding: 2px 0; border: none; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  font-family: inherit; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); transition: color 0.15s, border-color 0.15s;
  
}
.scope-toggle__btn.active { color: var(--ink); border-bottom-color: var(--accent); }
.scope-toggle__btn:hover:not(.active) { color: var(--ink); }
.scope-toggle__btn:before {margin: 0 .7ex; transform: scale(1.25); display: inline-block;}
.scope-toggle__btn[data-scope="intl"]:before {content:"🌏"; }
.scope-toggle__btn[data-scope="ro"]:before {content:"🇷🇴"; }

/* --- activity chips ------------------------------------------------------- */
.chip {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 4px 10px; border: 1px solid transparent; border-radius: 0;
  background: none; cursor: pointer; user-select: none;
  font-size: 0.7rem; font-family: inherit; color: var(--muted);
  min-width: 52px; line-height: 1.25; text-align: center;
  transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.chip:hover { background: var(--bg); }
.chip.on { color: var(--ink); font-weight: 600; }
.chip.on .chip-count { color: var(--ink); }
.chip:not(.on) .chip-icon-row { opacity: 0.45; filter: saturate(0.4); }
.chip-icon-row { display: inline-flex; align-items: baseline; gap: 0.2rem; margin-bottom: 0; font-size: 1.75rem; line-height: 1.1; }
.chip-icon-row .chip-count { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.chip { font-size: 0.78rem; }
.chip.is-zero { display: none; }

/* "Show all countries" / "Toate" button */
.chip-clear {
  flex-shrink: 0; margin-left: 8px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 0;
  background: none; cursor: pointer;
  font-family: inherit; font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.chip-clear:hover { color: var(--ink); border-color: var(--muted); }

/* --- map legend (embedded) ------------------------------------------------ */
.map-legend-index {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  padding: 0.35rem 0.5rem; font-size: 0.75rem; color: var(--muted);
  background: var(--surface); border-top: 1px solid var(--line);
}
.map-legend-index__item { display: inline-flex; align-items: center; gap: 0.25rem; }
.map-legend-index__sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* --- XL: list view 3 columns --------------------------------------------- */
@media (min-width: 1400px) {
  .grid--list { grid-template-columns: 1fr 1fr 1fr; }
}

/* --- responsive: tablet -------------------------------------------------- */
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .map-index { height: 260px; }
  .grid--list { grid-template-columns: 1fr; }
  .grid--list .card { border-right: none; }

  /* Sidebar slides below map as static panel */
  .facets {
    position: static; width: 100%; max-height: none;
    background: transparent; border-right: none; backdrop-filter: none;
    padding: 0.5rem 0;
  }
  .map-section { display: flex; flex-direction: column; }
  .map-section .map-index { order: -1; }

  /* Filter bar: horizontal scroll with hidden scrollbar, tighter chips */
  .filter-bar {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px; gap: 1ex;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar { gap: 1ex; }
  .filter-bar .chip {margin: 1em;}
  .chip { padding: 3px 10px; min-width: 46px; font-size: 0.7rem; }
  .chip-icon-row { font-size: 1.3rem; }
  .chip-icon-row .chip-count { font-size: 0.62rem; }
  .scope-toggle { gap: 10px; margin-right: 8px; }
  .scope-toggle__btn { font-size: 0.65rem; }

  /* Header: tighter spacing */
  .site-header__inner { gap: 0.6rem; padding: 0.5rem 0.75rem; }
  .site-header__inner input[type="search"] { max-width: 160px; font-size: 0.8rem; }
  .brand img { height: 32px !important; }
}

/* --- responsive: phone --------------------------------------------------- */
@media (max-width: 540px) {
  .map-index { height: 200px; }
  .filter-bar { gap: 6px; padding-bottom: 4px; margin-bottom: 0.5rem; }
  .scope-toggle { gap: 8px; margin-right: 14px; }
  .scope-toggle__btn { font-size: 0.6rem; letter-spacing: 0.05em; }
  .chip { padding: 3px 10px; min-width: 42px; font-size: 0.62rem; }
  .chip-icon-row { font-size: 1.15rem; gap: 0.2rem; }
  .chip-icon-row .chip-count { font-size: 0.58rem; }
  .chip-clear { font-size: 0.55rem; padding: 3px 10px; margin-left: 8px; }
  main { padding: 0.5rem 0.4rem 2rem; }
  .toolbar { gap: 0.4rem; }
  .btn-reset { padding: 0.3rem 0.45rem; font-size: 0.75rem; }
  .site-header__inner { gap: 0.4rem; padding: 0.4rem 0.5rem; }
  .site-header__inner input[type="search"] { max-width: 100px; font-size: 0.75rem; padding: 0.3rem 0.4rem; }
  .nav { gap: 0.5rem; }
  .nav a { font-size: 0.82rem; }
  .sidebar-controls { flex-wrap: wrap; gap: 0.35rem; }

  /* Mobile toggles */
  .mobile-toggles { display: flex; gap: 6px; margin-bottom: 0.5rem; }
  .mobile-toggle {
    flex: 1; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); font-size: 0.75rem; cursor: pointer; text-align: center;
    color: var(--muted); transition: color 0.15s, border-color 0.15s;
  }
  .mobile-toggle.on { color: var(--ink); border-color: var(--muted); font-weight: 600; }
  .map-index.mobile-hidden, .facets.mobile-hidden { display: none; }
}

/* Hide mobile toggles on desktop */
.mobile-toggles { display: none; }
@media (max-width: 540px) {
  .mobile-toggles { display: flex; }
}
.filter-bar .chip-count { margin-left: -1em; opacity: .9; border-radius: 4px; background-color: white;}