:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #e4ebf4;
  --line-strong: #d6dfed;
  --ink: #07143d;
  --text: #233154;
  --muted: #687692;
  --blue: #075dff;
  --blue-dark: #0049d9;
  --blue-soft: #eaf2ff;
  --green: #12a86b;
  --red: #f2455f;
  --purple: #8c4cf5;
  --orange: #f59e0b;
  --teal: #14b8a6;
  --shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius: 18px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body.page-organizations,
body.page-detail {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.rs-container {
  width: min(1460px, calc(100vw - 36px));
  margin-inline: auto;
}

/* Header */
.site-header {
  height: 72px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 224px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #e1293e 0 17%, transparent 18%),
    repeating-conic-gradient(#e1293e 0 8deg, #ffffff 8deg 16deg);
  border: 3px solid #0baa58;
  box-shadow: inset 0 0 0 2px #ffffff, 0 2px 8px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}

.brand-copy strong {
  display: block;
  font-size: 28px;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.brand-copy strong span {
  color: var(--blue);
}

.brand-copy small {
  display: block;
  color: #52617f;
  font-size: 12px;
  margin-top: 4px;
}

.main-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 24px;
}

.main-nav a {
  height: 100%;
  display: flex;
  align-items: center;
  color: #071641;
  font-size: 14px;
  font-weight: 750;
  position: relative;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--blue);
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 11px;
  border: 0;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(7, 93, 255, 0.20);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-soft);
}

.btn-light {
  background: #ffffff;
  color: var(--blue);
  padding-inline: 18px;
}

.full-width {
  width: 100%;
}

.add-listing {
  height: 42px;
  padding: 0 22px;
}

.lang-btn,
.header-icon {
  height: 38px;
  border: 0;
  background: #ffffff;
  color: #071641;
  font-weight: 800;
}

.lang-btn {
  padding: 0 8px;
}

.header-icon {
  width: 38px;
  border-radius: 50%;
  font-size: 20px;
}

/* Organizations layout */
.org-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 28px 0 42px;
  align-items: start;
}

.filter-sidebar,
.map-card,
.side-card,
.missing-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.filter-sidebar {
  padding: 20px 16px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.filter-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.link-btn,
.reset-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 750;
}

.filter-block {
  margin-bottom: 17px;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  color: #172347;
  font-size: 13px;
  font-weight: 800;
}

.input-wrap {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-wrap:focus-within,
.select-control:focus,
.sort-label select:focus {
  border-color: rgba(7, 93, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(7, 93, 255, 0.08);
}

.input-wrap span {
  color: #8a96ad;
  font-size: 15px;
  line-height: 1;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.input-wrap.big {
  min-height: 56px;
  border-radius: 14px;
  padding-inline: 16px;
}

.input-wrap.big input {
  height: 54px;
}

.select-control,
.sort-label select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: 0;
  appearance: auto;
}

.check-list {
  display: grid;
  gap: 9px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--text);
  font-size: 13px;
  min-height: 25px;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.check-row small {
  color: #8a96ad;
  font-size: 12px;
  font-weight: 700;
}

.check-list.with-icons .check-row {
  grid-template-columns: 18px 26px minmax(0, 1fr) auto;
}

.cat-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.switch-list {
  display: grid;
  gap: 11px;
  padding-top: 6px;
  margin: 14px 0 18px;
}

.switch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.switch-row input {
  display: none;
}

.switch-row i {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d9e2ec;
  position: relative;
  transition: 0.18s ease;
}

.switch-row i::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  transition: 0.18s ease;
}

.switch-row input:checked + i {
  background: var(--blue);
}

.switch-row input:checked + i::after {
  left: 18px;
}

.reset-link {
  display: block;
  margin: 12px auto 0;
  padding: 4px;
}

.org-main {
  min-width: 0;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  margin-bottom: 22px;
}

.hero-row h1 {
  margin: 0 0 8px;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-row p {
  max-width: 450px;
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 0;
}

.verified-big {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 18px;
  vertical-align: 8px;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(4, 120px);
  gap: 12px;
}

.top-stat {
  min-height: 82px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--shadow-soft);
}

.top-stat i {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.top-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.top-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 12px;
  margin-bottom: 18px;
}

.search-btn {
  min-height: 56px;
}

.toolbar-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #172347;
  border-radius: 13px;
  padding: 0 15px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.pill small {
  display: inline-flex;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f8;
  color: #66758e;
  font-size: 11px;
}

.pill.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(7, 93, 255, 0.08);
}

.sort-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.view-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.view-toggle button.is-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172347;
  font-size: 13px;
  font-weight: 800;
}

.sort-label select {
  width: 142px;
}

.results-meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 750;
}

/* Cards: exactly 3 columns on desktop */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.listing-grid.list-view {
  grid-template-columns: 1fr;
}

.org-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.06);
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.org-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  border-color: #cfd9ea;
}

.listing-grid.list-view .org-card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.card-cover {
  height: 150px;
  position: relative;
  background: linear-gradient(135deg, var(--theme, #075dff), #081942);
  overflow: visible;
}

.listing-grid.list-view .card-cover {
  height: auto;
  min-height: 210px;
}

.cover-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.05);
  opacity: 0.86;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.28), transparent 25%),
    linear-gradient(135deg, var(--theme, #075dff), #07143d);
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.heart {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 20px;
}

.card-logo {
  position: absolute;
  left: 18px;
  bottom: -34px;
  z-index: 3;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 5px solid #ffffff;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--theme, #075dff), #07143d);
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
}

.card-body {
  padding: 46px 18px 18px;
}

.listing-grid.list-view .card-body {
  padding: 20px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.card-title h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.verified-badge {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.location {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.excerpt {
  min-height: 66px;
  margin-bottom: 12px;
  color: #42506d;
  font-size: 13px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f0f4fa;
  color: #4e5b75;
  font-size: 12px;
  font-weight: 650;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.socials {
  display: inline-flex;
  gap: 7px;
}

.social-dot {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.profile-link,
.link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pagination button {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 850;
}

.pagination button.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Map sidebar */
.map-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.map-card,
.side-card {
  padding: 18px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-title-row h3,
.side-card h3,
.missing-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.card-title-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.svg-map-box {
  height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #dcecff;
  border: 1px solid var(--line);
}

.europe-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.europe-map.is-dragging {
  cursor: grabbing;
}

.map-sea {
  fill: #dbeafd;
}

.country-shape {
  fill: rgba(255, 255, 255, 0.66);
  stroke: #ffffff;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: fill 0.16s ease, stroke 0.16s ease;
  cursor: pointer;
}

.country-group.has-data .country-shape {
  fill: rgba(255, 255, 255, 0.82);
}

.country-group:hover .country-shape,
.country-group.is-active .country-shape {
  fill: #c5dcff;
  stroke: var(--blue);
}

.map-marker {
  pointer-events: none;
}

.map-marker circle {
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 4px 10px rgba(17, 24, 39, 0.16));
}

.map-marker text {
  fill: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
}

.map-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
}

.map-zoom button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.10);
}

.map-tooltip {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(16, 25, 48, 0.94);
  color: #ffffff;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.map-tooltip strong {
  display: block;
  margin-bottom: 2px;
}

.map-card .btn-outline {
  margin-top: 12px;
}

.focus-bars {
  display: grid;
  gap: 13px;
}

.focus-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.focus-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme) 12%, white);
  color: var(--theme);
  font-weight: 900;
}

.focus-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f8;
  margin-top: 5px;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--theme);
}

.focus-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.missing-card {
  min-height: 182px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #075dff, #02a98f);
  overflow: hidden;
  position: relative;
}

.missing-card p {
  max-width: 260px;
  color: rgba(255, 255, 255, 0.90);
}

.missing-wheel {
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0 18%, transparent 19%),
    repeating-conic-gradient(rgba(225, 41, 62, 0.80) 0 9deg, rgba(255, 255, 255, 0.14) 9deg 18deg);
}

/* Detail page */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 24px 0 44px;
  align-items: start;
}

.breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 2px;
}

.profile-shell {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.detail-cover {
  height: 245px;
  position: relative;
  background: linear-gradient(135deg, var(--theme, #075dff), #06133d);
}

.detail-cover > img,
.detail-cover > .cover-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-cover > img {
  opacity: 0.82;
}

.detail-logo {
  position: absolute;
  left: 36px;
  bottom: -64px;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 7px solid #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.detail-top-actions {
  position: absolute;
  right: 34px;
  bottom: -52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.detail-action.primary {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.detail-main-content {
  padding: 82px 36px 34px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: #e8fff4;
  color: #087d4d;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 12px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-title h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-subtitle {
  max-width: 780px;
  margin-bottom: 20px;
  color: var(--text);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.detail-tabs a {
  padding: 18px 0 15px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  position: relative;
}

.detail-tabs a.is-active {
  color: var(--blue);
}

.detail-tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.section-title {
  margin-bottom: 14px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  margin-bottom: 26px;
}

.about-text {
  color: var(--text);
  line-height: 1.7;
}

.read-more {
  color: var(--blue);
  font-weight: 850;
}

.mission-box,
.info-card,
.detail-side-card,
.summary-grid {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.mission-box {
  padding: 22px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.mission-icon,
.summary-item i,
.side-info-row i,
.info-row i {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.mission-box h3 {
  margin-bottom: 6px;
}

.mission-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 18px;
  margin-bottom: 26px;
}

.summary-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.summary-item small,
.info-row small,
.side-info-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong,
.info-row strong,
.side-info-row strong {
  display: block;
  color: var(--ink);
  line-height: 1.35;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.program-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.program-img {
  height: 118px;
  background: linear-gradient(135deg, var(--theme, #075dff), #07143d);
}

.program-body {
  padding: 17px;
}

.program-body h3 {
  margin-bottom: 8px;
}

.program-body p {
  color: var(--text);
  font-size: 13px;
}

.key-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 26px;
}

.info-card {
  padding: 22px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.info-row a {
  color: var(--blue);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.doc-list,
.news-list,
.side-list,
.focus-list,
.country-list,
.connect-buttons {
  display: grid;
  gap: 14px;
}

.doc-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.doc-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.doc-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ffeef2;
  color: var(--red);
}

.doc-item h4,
.news-item h4 {
  margin: 0 0 3px;
}

.doc-item p,
.news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.news-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
}

.news-thumb {
  width: 70px;
  height: 58px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--theme, #075dff), #07143d);
}

.detail-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.detail-side-card {
  padding: 22px;
}

.detail-side-card h3 {
  margin-bottom: 16px;
  font-size: 21px;
}

.mini-map {
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(7, 93, 255, 0.05) 0 49%, rgba(7, 93, 255, 0.10) 50%),
    linear-gradient(0deg, rgba(7, 93, 255, 0.05) 0 49%, rgba(7, 93, 255, 0.10) 50%),
    #dcecff;
  margin-bottom: 12px;
}

.pin {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 50% 50% 50% 0;
  background: var(--blue);
  transform: rotate(-45deg);
  position: relative;
}

.pin::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  left: 11px;
  top: 11px;
}

.side-info-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-info-row i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.focus-chip,
.country-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.focus-chip i {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
}

.detail-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 34px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e9f3ff, #ffffff);
  border: 1px solid var(--line);
}

.detail-cta h3 {
  margin-bottom: 5px;
}

.detail-cta p {
  margin: 0;
  color: var(--text);
}

/* Responsive */
@media (max-width: 1380px) {
  .rs-container {
    width: min(1320px, calc(100vw - 28px));
  }

  .org-layout {
    grid-template-columns: 245px minmax(0, 1fr) 330px;
    gap: 20px;
  }

  .top-stats {
    grid-template-columns: repeat(2, 120px);
  }
}

@media (max-width: 1180px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    height: auto;
    min-height: 72px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
    height: 42px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .main-nav a {
    height: 42px;
  }

  .org-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar,
  .map-sidebar,
  .detail-sidebar {
    position: static;
  }

  .filter-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .filter-head,
  .switch-list,
  .filter-sidebar .btn,
  .reset-link {
    grid-column: 1 / -1;
  }

  .map-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .missing-card {
    grid-column: 1 / -1;
  }

  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-grid,
  .key-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .rs-container {
    width: min(100vw - 18px, 100%);
  }

  .brand {
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 24px;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .org-layout,
  .detail-layout {
    padding-top: 18px;
  }

  .hero-row,
  .search-row,
  .toolbar-row,
  .sort-area {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-row h1 {
    font-size: 38px;
  }

  .top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-sidebar,
  .map-sidebar,
  .listing-grid,
  .programs-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .listing-grid.list-view .org-card {
    grid-template-columns: 1fr;
  }

  .svg-map-box {
    height: 390px;
  }

  .detail-cover {
    height: 210px;
  }

  .detail-logo {
    width: 110px;
    height: 110px;
    left: 22px;
    bottom: -55px;
  }

  .detail-top-actions {
    position: static;
    margin: 16px 18px 0;
    flex-wrap: wrap;
  }

  .detail-main-content {
    padding: 76px 22px 24px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Development polish: Google Sans, emoji UI, map filtering-ready layout */
body {
  font-family: "Google Sans", "Google Sans Flex", "Roboto", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.site-header {
  min-height: 72px;
}

.main-nav a {
  gap: 6px;
  white-space: nowrap;
}

.header-actions .btn,
.header-actions button {
  white-space: nowrap;
}

.org-layout {
  grid-template-columns: 250px minmax(720px, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.filter-sidebar {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
}

.filter-head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.filter-block {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(228, 235, 244, 0.72);
}

.filter-block:last-of-type {
  border-bottom: 0;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.control-label {
  font-size: 13px;
  margin-bottom: 9px;
}

.input-wrap,
.select-control,
.sort-label select {
  min-height: 46px;
  border-radius: 13px;
  background: #ffffff;
}

.input-wrap input,
.select-control,
.sort-label select {
  font-size: 14px;
}

.select-control {
  padding-inline: 13px;
}

.check-list {
  gap: 10px;
}

.check-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 28px;
  gap: 10px;
}

.check-list.with-icons .check-row {
  grid-template-columns: 18px 30px minmax(0, 1fr) auto;
}

.check-row span:not(.cat-icon) {
  overflow-wrap: anywhere;
}

.cat-icon,
.focus-icon,
.top-stat i,
.summary-item i,
.side-info-row i,
.info-row i {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.cat-icon {
  width: 28px;
  height: 28px;
  font-size: 15px;
  background: #f2f6ff;
}

.switch-list {
  padding: 12px 0 2px;
  margin-top: 8px;
  border-top: 1px solid rgba(228, 235, 244, 0.72);
}

.switch-row {
  min-height: 30px;
}

.btn.full-width {
  min-height: 46px;
  border-radius: 13px;
}

.hero-row {
  display: flex;
  flex-direction: column;
}

.hero-row h1 {
  font-size: clamp(40px, 4vw, 54px);
}

.hero-row p {
  max-width: 520px;
}

.top-stats {
  grid-template-columns: repeat(4, 190px);
}

.top-stat {
  min-height: 78px;
  border-radius: 18px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.toolbar-row {
  align-items: start;
}

.category-pills {
  row-gap: 12px;
}

.pill {
  min-height: 42px;
  border-radius: 14px;
}

.sort-area {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-toggle button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

/* Keep organization cards at 3 columns on desktop. */
.listing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.org-card {
  min-width: 0;
  border-radius: 20px;
}

.card-cover {
  height: 172px;
}

.card-body {
  padding: 50px 18px 18px;
}

.card-title h3 {
  font-size: 20px;
  line-height: 1.16;
}

.excerpt {
  min-height: 64px;
}

.tags {
  min-height: 34px;
}

.card-actions {
  align-items: center;
}

.profile-link {
  white-space: nowrap;
}

.map-sidebar {
  gap: 18px;
}

.svg-map-box {
  height: 430px;
  border-radius: 18px;
}

.map-card,
.side-card,
.missing-card {
  border-radius: 20px;
}

.map-tooltip {
  font-family: "Google Sans", "Google Sans Flex", "Roboto", Arial, sans-serif;
}

/* Clear visual state when a country is selected from the SVG map. */
.country-group.is-active .country-shape {
  fill: #bfd8ff;
  stroke: var(--blue);
  stroke-width: 2;
}

/* Detail page polish */
.detail-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-top-actions {
  gap: 10px;
}

.detail-action,
.btn,
.link-pill {
  font-family: "Google Sans", "Google Sans Flex", "Roboto", Arial, sans-serif;
}

.summary-grid,
.key-grid,
.bottom-grid,
.programs-grid {
  gap: 20px;
}

@media (max-width: 1500px) {
  .rs-container {
    width: min(1380px, calc(100vw - 28px));
  }

  .org-layout {
    grid-template-columns: 245px minmax(0, 1fr) 325px;
    gap: 22px;
  }

  .top-stats {
    grid-template-columns: repeat(2, 128px);
  }

  .svg-map-box {
    height: 400px;
  }
}

@media (max-width: 1280px) {
  .org-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .map-sidebar {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr) minmax(280px, 0.8fr);
    position: static;
  }

  .missing-card {
    min-height: auto;
  }
}

@media (max-width: 1180px) {
  .org-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .filter-head,
  .switch-list,
  .filter-sidebar .btn,
  .reset-link {
    grid-column: 1 / -1;
  }

  .filter-block {
    margin-bottom: 0;
  }

  .map-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .listing-grid,
  .filter-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-row,
  .search-row,
  .toolbar-row,
  .sort-area {
    grid-template-columns: 1fr;
  }

  .top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-btn {
    width: 100%;
  }
}
