.alta-dist .alta-dist__mobile-controls,
.alta-dist .alta-dist__mobile-filter-trigger,
.alta-dist .alta-dist__mobile-filter-dialog {
  display: none;
}

@media (max-width: 960px) {
  .alta-dist .alta-dist__sidebar {
    display: none;
  }

  .alta-dist .alta-dist__mobile-controls {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 16px;
  }

  .alta-dist .alta-dist__mobile-controls .alta-dist__panel--search {
    flex: 1;
    min-width: 0;
  }

  .alta-dist .alta-dist__mobile-filter-trigger,
  .alta-dist .alta-dist__mobile-filter-apply,
  .alta-dist .alta-dist__mobile-filter-cancel {
    appearance: none;
    border: 1px solid var(--alta-dist-border-strong);
    border-radius: 12px;
    background: var(--alta-dist-card);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 12px 16px;
  }

  .alta-dist .alta-dist__mobile-filter-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .alta-dist .alta-dist__mobile-filter-dialog[open] {
    display: flex;
    flex-direction: column;
    width: min(100% - 32px, 560px);
    max-height: min(760px, calc(100dvh - 32px));
    padding: 0;
    overflow: hidden;
    color-scheme: dark;
    color: var(--alta-dist-text);
    background: var(--alta-dist-bg);
    border: 1px solid var(--alta-dist-border-strong);
    border-radius: 16px;
  }

  .alta-dist .alta-dist__mobile-filter-dialog::backdrop {
    background: rgba(0, 0, 0, 0.64);
  }

  .alta-dist .alta-dist__mobile-filter-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 20px;
  }

  .alta-dist .alta-dist__mobile-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }

  .alta-dist .alta-dist__mobile-filter-head h3,
  .alta-dist .alta-dist__mobile-filter-group legend {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
  }

  .alta-dist .alta-dist__mobile-filter-head h3 { margin: 0; }

  .alta-dist .alta-dist__mobile-filter-close {
    appearance: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
  }

  .alta-dist .alta-dist__mobile-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
  }

  .alta-dist .alta-dist__mobile-filter-group legend { margin-bottom: 12px; }

  .alta-dist .alta-dist__mobile-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    flex-shrink: 0;
    border-top: 1px solid var(--alta-dist-border);
  }

  .alta-dist .alta-dist__mobile-filter-confirm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .alta-dist .alta-dist__mobile-filter-cancel {
    appearance: none;
    padding: 10px 4px;
    border: 0;
    color: var(--alta-dist-muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
  }

  .alta-dist .alta-dist__mobile-filter-apply {
    background: var(--alta-dist-accent);
    border-color: var(--alta-dist-accent);
  }

  .alta-dist .alta-dist__mobile-filter-trigger:focus-visible,
  .alta-dist .alta-dist__mobile-filter-apply:focus-visible,
  .alta-dist .alta-dist__mobile-filter-cancel:focus-visible,
  .alta-dist .alta-dist__mobile-filter-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }
}

@media (max-width: 480px) {
  .alta-dist .alta-dist__mobile-controls { gap: 8px; }
  .alta-dist .alta-dist__mobile-filter-trigger { padding-inline: 12px; }
}

.alta-dist {
  --alta-dist-accent: #7c6cf0;
  --alta-dist-bg: #0a0d18;
  --alta-dist-card: #11162a;
  --alta-dist-border: rgba(124, 108, 240, 0.18);
  --alta-dist-border-strong: rgba(124, 108, 240, 0.32);
  --alta-dist-text: #fff;
  --alta-dist-muted: rgba(255, 255, 255, 0.7);
  --alta-dist-dim: rgba(255, 255, 255, 0.5);

  font-family: Satoshi, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--alta-dist-text);
  background: var(--alta-dist-bg);
  padding: 64px 32px;
  box-sizing: border-box;
}

.alta-dist *,
.alta-dist *::before,
.alta-dist *::after {
  box-sizing: border-box;
}

.alta-dist__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.alta-dist__title {
  margin: 0 0 48px;
  text-align: center;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

.alta-dist__layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* ---------------- sidebar ---------------- */

.alta-dist__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--alta-dist-accent) transparent;
}

.alta-dist__panel {
  background: var(--alta-dist-card);
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  padding: 18px 20px;
  flex-shrink: 0;
}

.alta-dist__panel--search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}

.alta-dist__search-icon {
  display: inline-flex;
  color: var(--alta-dist-dim);
}

.alta-dist__search-input {
  flex: 1;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 0;
  font: inherit;
  font-size: 15px;
  color: #fff;
  outline: none;
}

.alta-dist__search-input::placeholder {
  color: var(--alta-dist-dim);
}

.alta-dist__panel--counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.alta-dist__counter {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
  color: var(--alta-dist-muted);
}

.alta-dist__counter strong {
  color: #fff;
  font-weight: 600;
}

.alta-dist__link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--alta-dist-accent);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.alta-dist__link-btn:hover:not(:disabled) {
  opacity: 0.8;
}

.alta-dist__link-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.alta-dist__panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.alta-dist__panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.alta-dist__check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alta-dist__check-list--scroll {
  /* The whole sidebar scrolls so its lower controls remain reachable. */
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--alta-dist-accent) transparent;
}

.alta-dist__check-list--scroll::-webkit-scrollbar {
  width: 4px;
}

.alta-dist__check-list--scroll::-webkit-scrollbar-thumb {
  background: var(--alta-dist-accent);
  border-radius: 4px;
}

.alta-dist__check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--alta-dist-muted);
  transition: color 0.15s ease;
}

.alta-dist__check:hover {
  color: #fff;
}

.alta-dist__check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.alta-dist__check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--alta-dist-border-strong);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.alta-dist__check input:checked + .alta-dist__check-box {
  background: var(--alta-dist-accent);
  border-color: var(--alta-dist-accent);
}

.alta-dist__check input:checked + .alta-dist__check-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 viewBox=%270 0 12 12%27%3E%3Cpath fill=%27none%27 stroke=%27%23ffffff%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 d=%27M2.5 6.5l2.5 2.5L9.5 4%27/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

.alta-dist__check input:focus-visible + .alta-dist__check-box {
  outline: 2px solid var(--alta-dist-accent);
  outline-offset: 2px;
}

/* ---------------- main column ---------------- */

.alta-dist__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.alta-dist__location-panel {
  background: var(--alta-dist-card);
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 0 0 24px;
}

.alta-dist__location-title { margin: 0; font-size: 18px; font-weight: 600; }
.alta-dist__location-status, .alta-dist__attribution, .alta-dist__distance { margin: 5px 0 0; color: var(--alta-dist-muted); font-size: 13px; line-height: 1.45; }
.alta-dist__location-status { width: 100%; color: var(--alta-dist-dim); }
.alta-dist__location-status:empty { display: none; }
.alta-dist__location-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.alta-dist__location-button { appearance: none; border: 1px solid var(--alta-dist-accent); border-radius: 8px; background: var(--alta-dist-accent); color: #fff; padding: 9px 13px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.alta-dist__location-button:disabled { cursor: wait; opacity: .7; }
.alta-dist__location-button--secondary { color: var(--alta-dist-accent); background: transparent; }
.alta-dist__attribution { margin: 0; font-size: 11px; color: var(--alta-dist-dim); }
.alta-dist__attribution a { color: inherit; }
.alta-dist__distance { color: var(--alta-dist-accent); font-weight: 600; }

.alta-dist__filtering {
  background: var(--alta-dist-card);
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 60px;
}

.alta-dist__filtering-label {
  color: var(--alta-dist-muted);
  font-size: 14px;
}

.alta-dist__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--alta-dist-muted);
  font-size: 14px;
}

.alta-dist__sort select {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--alta-dist-border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--alta-dist-card);
  color: var(--alta-dist-text);
  font: inherit;
  color-scheme: dark;
  cursor: pointer;
}

.alta-dist__sort select:focus-visible {
  outline: 2px solid var(--alta-dist-accent);
  outline-offset: 2px;
}

.alta-dist__filtering-empty {
  color: var(--alta-dist-dim);
  font-size: 13px;
  font-style: italic;
}

.alta-dist__filter-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alta-dist__filter-chip {
  appearance: none;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--alta-dist-accent);
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}

.alta-dist__filter-chip:hover {
  opacity: 0.85;
}

.alta-dist__loading,
.alta-dist__empty {
  background: var(--alta-dist-card);
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  color: var(--alta-dist-muted);
  font-size: 14px;
}

.alta-dist__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alta-dist__card {
  background: var(--alta-dist-card);
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease;
}

.alta-dist__card:hover {
  border-color: var(--alta-dist-border-strong);
}

.alta-dist__card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.alta-dist__pill {
  display: inline-flex;
  align-items: center;
  background: var(--alta-dist-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.alta-dist__breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--alta-dist-muted);
}

.alta-dist__breadcrumb-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alta-dist__breadcrumb-sep {
  color: var(--alta-dist-dim);
  font-size: 12px;
}

.alta-dist__card-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.alta-dist__card-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alta-dist__meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.alta-dist__meta-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--alta-dist-accent);
  margin-top: 1px;
}

.alta-dist__meta-text {
  color: var(--alta-dist-muted);
  word-break: break-word;
}

.alta-dist__meta-text--link {
  color: var(--alta-dist-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.alta-dist__meta-text--link:hover {
  color: #fff;
}

.alta-dist__meta-link {
  color: var(--alta-dist-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.alta-dist__meta-link:hover {
  opacity: 0.85;
}

/* ---------------- audience and personal directory ---------------- */

.alta-directory-shell {
  color: #fff;
  background: var(--alta-dist-bg, #0a0d18);
  font-family: Satoshi, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.alta-audience-switch {
  max-width: 1384px;
  margin: 0 auto;
  padding: 24px 32px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, .65);
  font-size: 13px;
}

.alta-audience-switch button {
  border: 0;
  background: transparent;
  color: var(--alta-dist-accent);
  font: inherit;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.alta-audience-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 40px;
  border: 1px solid rgba(124, 108, 240, .32);
  border-radius: 22px;
  color: #fff;
  background: #11162a;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .45);
  font: inherit;
}

.alta-audience-dialog::backdrop {
  background: rgba(4, 6, 15, .8);
  backdrop-filter: blur(6px);
}

.alta-audience-dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, .7);
  background: transparent;
  font: inherit;
  font-size: 26px;
  cursor: pointer;
}

.alta-audience-dialog__eyebrow {
  margin: 0 0 12px;
  color: var(--alta-dist-accent);
  font-size: 13px;
  font-weight: 600;
}

.alta-audience-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.6px;
}

.alta-audience-dialog__intro {
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, .65);
  line-height: 1.5;
}

.alta-audience-dialog__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.alta-audience-dialog__choices > button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(124, 108, 240, .32);
  border-radius: 14px;
  padding: 24px;
  background: #171d34;
  color: rgba(255, 255, 255, .7);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.alta-audience-dialog__choices > button:hover { border-color: var(--alta-dist-accent); background: #1c2240; }
.alta-audience-dialog__choice-title { font-size: 19px; font-weight: 700; color: #fff; }
.alta-audience-dialog__choice-action { margin-top: auto; padding-top: 10px; color: var(--alta-dist-accent); font-weight: 600; }
.alta-audience-dialog button:focus-visible, .alta-audience-switch button:focus-visible { outline: 2px solid var(--alta-dist-accent); outline-offset: 3px; }

.alta-personal__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 22px;
  border: 1px solid var(--alta-dist-border);
  border-radius: 14px;
  background: var(--alta-dist-card);
  margin-bottom: 28px;
}

.alta-personal__location-actions { display: flex; align-items: center; gap: 12px; }
.alta-personal__location-button { border: 1px solid var(--alta-dist-accent); border-radius: 8px; background: var(--alta-dist-accent); color: #fff; padding: 11px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.alta-personal__location-button:disabled { opacity: .65; cursor: wait; }
.alta-personal__country { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--alta-dist-muted); font-size: 14px; }
.alta-personal__country select { min-width: 210px; max-width: 100%; border: 1px solid var(--alta-dist-border-strong); border-radius: 8px; padding: 11px 12px; background: var(--alta-dist-bg); color: #fff; font: inherit; color-scheme: dark; }
.alta-personal__country select,
.alta-dist__sort select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27m4 6 4 4 4-4%27 fill=%27none%27 stroke=%27white%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
.alta-personal__status { flex-basis: 100%; margin: 0; color: var(--alta-dist-muted); font-size: 13px; }
.alta-personal__status:empty { display: none; }
.alta-personal__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.alta-personal__group { background: var(--alta-dist-card); border: 1px solid var(--alta-dist-border); border-radius: 14px; padding: 26px; }
.alta-personal__country-title { margin: 0 0 20px; color: #fff; font-size: 24px; line-height: 1.2; }
.alta-personal__websites { display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0; }
.alta-personal__website { color: var(--alta-dist-accent); font-size: 16px; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.alta-personal__website:hover { color: #fff; }
.alta-personal__empty { padding: 32px; border: 1px solid var(--alta-dist-border); border-radius: 14px; text-align: center; color: var(--alta-dist-muted); }
.alta-personal__attribution { color: var(--alta-dist-dim); font-size: 11px; margin: 20px 0 0; }
.alta-personal__attribution a { color: inherit; }
.alta-personal__controls :is(button, select):focus-visible, .alta-personal__website:focus-visible { outline: 2px solid var(--alta-dist-accent); outline-offset: 3px; }

/* ---------------- responsive ---------------- */

@media (max-width: 960px) {
  .alta-dist {
    padding: 48px 20px;
  }
  .alta-dist__title {
    margin-bottom: 32px;
  }
  .alta-dist__layout {
    grid-template-columns: 1fr;
  }
  .alta-dist__sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .alta-dist__check-list--scroll {
    max-height: 260px;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .alta-dist {
    padding: 36px 16px;
  }
  /* font-size handled by clamp() — only spacing tweaks below this breakpoint */
  .alta-dist__card {
    padding: 18px;
  }
  .alta-dist__card-name {
    font-size: 19px;
  }
  .alta-dist__location-actions { width: 100%; margin-left: 0; }
  .alta-dist__location-button { flex: 1; }
  .alta-dist__sort { width: 100%; margin-left: 0; }
  .alta-dist__sort select { flex: 1; }
}

@media (max-width: 640px) {
  .alta-audience-switch { padding: 16px 20px 0; }
  .alta-audience-dialog { padding: 36px 22px 24px; }
  .alta-audience-dialog__choices { grid-template-columns: 1fr; }
  .alta-audience-dialog__choices > button { padding: 20px; }
  .alta-personal__controls { padding: 18px; align-items: stretch; }
  .alta-personal__location-actions { width: 100%; }
  .alta-personal__location-button { flex: 1; }
  .alta-personal__country { width: 100%; margin-left: 0; }
  .alta-personal__country select { flex: 1; min-width: 0; }
  .alta-personal__groups { grid-template-columns: 1fr; }
  .alta-personal__group { padding: 22px; }
}

