/**
 * HTML-карта /sitemap/ — индекс SEO-посадочных под графом
 */

body.neuroege-site-map-page {
  overflow: auto;
  height: auto;
  min-height: 100dvh;
}

body.neuroege-site-map-page .page--not-found {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body.neuroege-site-map-page .not-found-main {
  overflow: visible;
  width: min(88rem, 100%);
  padding-bottom: 2rem;
}

/* Граф на /sitemap/ — полный размер, прокрутка страницы вместо микро-масштаба */
body.neuroege-site-map-page .not-found-graph {
  flex: none;
  min-height: auto;
  overflow: visible;
}

body.neuroege-site-map-page .not-found-graph__frame {
  --nf-cluster-w: 15.5rem;
  --nf-gap: 0.9rem;
  --nf-leaf-gap: 0.34rem;
  flex: none;
  min-height: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 1.1rem 1.25rem 1.35rem;
  container-type: normal;
}

body.neuroege-site-map-page .not-found-graph__fit {
  width: max-content;
  max-width: none;
  transform: none !important;
}

body.neuroege-site-map-page .not-found-graph__stage {
  grid-template-columns: max-content auto max-content;
  grid-template-rows: repeat(3, max-content);
  grid-template-areas:
    "ege    .      oge"
    "tools  hub    account"
    ".      info   .";
  width: max-content;
  gap: var(--nf-gap);
}

body.neuroege-site-map-page .not-found-graph__cluster {
  width: var(--nf-cluster-w);
  min-width: var(--nf-cluster-w);
}

body.neuroege-site-map-page .not-found-graph__hub {
  width: 6.75rem;
  height: 6.75rem;
}

body.neuroege-site-map-page .not-found-graph__hub-code {
  font-size: 1.55rem;
}

body.neuroege-site-map-page .not-found-graph__hub-label {
  font-size: 0.68rem;
}

body.neuroege-site-map-page .not-found-graph__hub-hint {
  font-size: 0.6rem;
}

body.neuroege-site-map-page .not-found-graph__cluster-core {
  min-height: 2.65rem;
  padding: 0.55rem 0.72rem;
}

body.neuroege-site-map-page .not-found-graph__cluster-glyph {
  width: 2rem;
  height: 2rem;
  font-size: 0.82rem;
}

body.neuroege-site-map-page .not-found-graph__cluster-title {
  font-size: 0.88rem;
  white-space: normal;
}

body.neuroege-site-map-page .not-found-graph__leaf {
  min-height: 2.15rem;
  padding: 0.42rem 0.62rem;
}

body.neuroege-site-map-page .not-found-graph__leaf-label {
  font-size: 0.84rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

body.neuroege-site-map-page .not-found-graph__leaf-hint {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.62;
  color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

body.neuroege-site-map-page .not-found-graph__leaf-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.12rem;
  align-self: flex-start;
}

@media (max-width: 960px) {
  body.neuroege-site-map-page .not-found-graph__frame {
    --nf-cluster-w: min(100%, 18rem);
    padding: 0.85rem 0.65rem 1rem;
  }

  body.neuroege-site-map-page .not-found-graph__fit {
    width: 100%;
  }

  body.neuroege-site-map-page .not-found-graph__stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hub"
      "ege"
      "oge"
      "tools"
      "account"
      "info";
    width: 100%;
    gap: 0.75rem;
  }

  body.neuroege-site-map-page .not-found-graph__cluster {
    width: 100%;
    min-width: 0;
  }
}

.site-map-index {
  flex-shrink: 0;
  width: 100%;
  max-width: 52rem;
  margin: 0.75rem auto 0;
  padding: 1rem 0.25rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[data-theme="light"] .site-map-index {
  border-top-color: rgba(15, 23, 42, 0.1);
}

.site-map-index__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-map-index__lead {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.78;
}

.site-map-index__lead a {
  color: var(--primary-color, #6ee7b7);
  text-decoration: none;
}

.site-map-index__lead a:hover {
  text-decoration: underline;
}

.site-map-index__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-map-index__heading {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.82;
}

.site-map-index__grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-map-index__grid--oge {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.site-map-index__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(110, 231, 183, 0.28);
  background: rgba(5, 150, 105, 0.08);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.site-map-index__link--oge {
  border-color: rgba(219, 39, 119, 0.28);
  background: rgba(219, 39, 119, 0.08);
}

.site-map-index__link:hover {
  border-color: rgba(110, 231, 183, 0.55);
  background: rgba(5, 150, 105, 0.14);
}

.site-map-index__link--oge:hover {
  border-color: rgba(219, 39, 119, 0.5);
  background: rgba(219, 39, 119, 0.12);
}

.site-map-index__num {
  font-size: 0.88rem;
  font-weight: 700;
  color: #6ee7b7;
}

.site-map-index__link--oge .site-map-index__num {
  color: #f472b6;
}

[data-theme="light"] .site-map-index__link {
  background: rgba(236, 253, 245, 0.85);
}

[data-theme="light"] .site-map-index__link--oge {
  background: rgba(253, 242, 248, 0.85);
}

[data-theme="light"] .site-map-index__num {
  color: #047857;
}

[data-theme="light"] .site-map-index__link--oge .site-map-index__num {
  color: #be185d;
}

@media (max-width: 720px) {
  .site-map-index__columns {
    grid-template-columns: 1fr;
  }

  .site-map-index__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .site-map-index__grid--oge {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
