/* (SEO-1) The public landing: no external requests; the only script is the tiny language-suggestion line (LANG-DEFAULT-1). Tokens and the emblem follow the app (web/src/styles.css). */
:root {
  --bg: #f5f6f6;
  --surface: #ffffff;
  --panel: #eef0f1;
  --text: #101418;
  --muted: #53606a;
  --line: #dfe3e5;
  --accent: #0e6b55;
  --accent-ink: #ffffff;
  --accent-soft: #e1f0eb;
  --bar: #1b2023;
  --bar-text: #eef1f2;
  --bar-muted: #aab4b9;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121516;
    --surface: #1a1e20;
    --panel: #161a1c;
    --text: #e3e7e8;
    --muted: #9aa5aa;
    --line: #2b3134;
    --accent: #3fbf98;
    --accent-ink: #0b1512;
    --accent-soft: #15302a;
    --bar: #0b0d0e;
    --bar-text: #e3e7e8;
    --bar-muted: #8f9a9f;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* top bar */
.bar {
  background: var(--bar);
  color: var(--bar-text);
}
.bar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  color: var(--bar-text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.bar nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.langs {
  display: flex;
  gap: 2px;
}
.langs a {
  display: inline-block;
  min-width: 36px;
  padding: 8px 8px;
  text-align: center;
  color: var(--bar-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
}
.langs a[aria-current='true'] {
  color: var(--bar-text);
  background: rgba(255, 255, 255, 0.12);
}
.langs a:hover {
  color: var(--bar-text);
}
.bar .login {
  color: var(--bar-text);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 4px;
}
.bar a:focus-visible {
  outline-color: #3fbf98;
}

/* hero */
.grid > *,
.two > * {
  min-width: 0;
}
.hero {
  padding: 44px 0 32px;
}
.hero .grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lead {
  margin: 0 0 24px;
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
}
.note {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* worksheet sample (feature-flagged): shapes only */
.ln {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  margin: 7px 0;
}
.ln.w90 {
  width: 90%;
}
.ln.w70 {
  width: 70%;
}
.ln.w45 {
  width: 45%;
}
.sheet {
  max-width: 220px;
  margin: 0 auto;
  background: #fff;
  color: #444;
  border: 1px solid var(--line);
  padding: 14px 14px 10px;
  border-radius: 2px;
}
.sheet strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: #101418;
}
.sheet .ln {
  background: #d9dee0;
}
.sheet .row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.sheet .num {
  flex: none;
  font-size: 12px;
  line-height: 22px;
  color: #101418;
}
.sheet .row > span:last-child {
  flex: 1;
}

/* sections */
section {
  padding: 28px 0;
}
h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.2;
  font-weight: 600;
}
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
}
.features h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}
.features p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
#join {
  scroll-margin-top: 16px;
}
.join {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 20px;
}
.join p {
  margin: 0 0 16px;
  max-width: 60ch;
}

/* footer */
footer {
  margin-top: 32px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
footer p {
  margin: 0 0 10px;
}
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
footer a {
  display: inline-block;
  padding: 4px 0;
}

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }
  .hero {
    padding: 64px 0 40px;
  }
  .hero .grid {
    grid-template-columns: 1fr;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .two {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1000px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* (LANDING-LINKS-1) «Полезные ссылки» under «Что в базе» */
.useful {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.useful li {
  margin: 0.35rem 0;
}

/* (LANDING-SPHERE-1) «Карта тем»: a dark panel in both colour schemes (self-contained tokens); landing/sphere.js draws the sphere into .msph-svgbox */
.mapsec .maphint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.msph-panel {
  --p-bg: #0f1214;
  --p-surface: #171b1d;
  --p-line: #2b3134;
  --p-text: #e6eaeb;
  --p-muted: #9aa6ac;
  --p-accent: #3fbf98;
  --p-soft: #15302a;
  background: var(--p-bg);
  color: var(--p-text);
  border: 1px solid var(--p-line);
  border-radius: 12px;
  padding: 16px;
}
.msph-nojs {
  margin: 0;
  color: var(--p-muted);
}
.mapsec.js .msph-nojs {
  display: none;
}
.mapsec:not(.js) .msph-stage {
  display: none;
}
.msph-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.msph-segs {
  display: inline-flex;
}
.msph-seg,
.msph-zoom button {
  font: inherit;
  font-size: 15px;
  color: var(--p-text);
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  min-height: 44px;
  cursor: pointer;
}
.msph-seg {
  padding: 0 18px;
  font-weight: 500;
}
.msph-seg:first-child {
  border-radius: 6px 0 0 6px;
}
.msph-seg:last-child {
  border-radius: 0 6px 6px 0;
  margin-left: -1px;
}
.msph-seg[aria-pressed='true'] {
  background: var(--p-soft);
  color: var(--p-accent);
  border-color: var(--p-accent);
}
.msph-seg:hover,
.msph-zoom button:hover {
  border-color: var(--p-accent);
}
.msph-seg:focus-visible,
.msph-zoom button:focus-visible {
  outline: 3px solid var(--p-accent);
  outline-offset: 2px;
}
.msph-wrapbox {
  position: relative;
  width: 100%;
  max-width: min(720px, calc((100vh - 120px) * 1.1111)); /* the whole sphere fits the window height */
  margin: 0 auto;
}
.msph-svgbox {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 720;
  overflow: hidden;
  touch-action: pan-y;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.msph-svgbox:active {
  cursor: grabbing;
}
.msph-svgbox svg {
  width: 100%;
  height: 100%;
  display: block;
}
.msph-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.msph-lbl {
  position: absolute;
  white-space: nowrap;
  color: var(--p-text);
  font-size: max(10px, 1.5625cqw);
  opacity: 0;
  transition: opacity 0.35s ease, font-size 0.3s ease;
  text-shadow: 0 0 3px #0f1214, 0 0 3px #0f1214, 0 0 8px #0f1214;
  cursor: pointer;
}
.msph-lbl.is-area {
  font-size: max(10px, 1.875cqw);
  font-weight: 600;
}
.msph-card {
  position: absolute;
  right: 8px;
  top: 8px;
  width: min(270px, 62%);
  padding: 12px 14px;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-left: 3px solid var(--p-accent);
  border-radius: 6px;
  pointer-events: none;
}
.msph-card.is-tap {
  pointer-events: auto;
  cursor: pointer;
}
.msph-card[hidden] {
  display: none;
}
.msph-card-sub {
  font-size: 12px;
  color: var(--p-muted);
}
.msph-card-title {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}
.msph-card-body {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}
.msph-card-body:empty {
  display: none;
}
.msph-card-cta {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--p-line);
  font-size: 12px;
  color: var(--p-muted);
}
.msph-zoom {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
}
.msph-zoom button {
  width: 44px;
  font-size: 20px;
  line-height: 1;
  border-radius: 6px;
}
.msph-still {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msph-still[hidden] {
  display: none;
}
.msph-still svg {
  width: 20px;
  height: 20px;
}
.msph-still[aria-pressed='true'] .sq,
.msph-still[aria-pressed='false'] .tri {
  display: none;
}
/* below 540 px wide or 520 px high a sphere is too small to read: it is not shown (and sphere.js does not run its loop): the whole section is hidden */
@media (max-width: 539px), (max-height: 519px) {
  .mapsec {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .msph-lbl {
    transition: none;
  }
}

/* (LANDING-PAGES-1) method / topic content pages */
.article .wrap {
  max-width: 68ch;
  padding-top: 20px;
  padding-bottom: 24px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 15px;
  color: var(--muted);
}
.crumbs li + li::before {
  content: '›';
  margin-right: 8px;
}
.crumbs a {
  display: inline-block;
  padding: 4px 0;
}
.article h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.article .lead {
  margin: 0 0 24px;
  font-size: 19px;
  color: var(--muted);
}
.article h2 {
  margin: 32px 0 10px;
  font-size: 23px;
  line-height: 1.25;
}
.article p {
  margin: 0 0 14px;
}
.article ul,
.article ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}
.article li {
  margin: 0 0 6px;
}
.article .example .statement {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.article .example .statement p:last-child,
.article .example .solution p:last-child {
  margin-bottom: 0;
}
.article .example .label {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.article .example .solution {
  padding: 0 4px;
}
.article .hub {
  list-style: none;
  padding: 0;
}
.article .hub h2 {
  margin: 20px 0 4px;
  font-size: 21px;
}
.article .closing {
  margin-top: 36px;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.article .closing h2 {
  margin-top: 0;
}
@media (min-width: 720px) {
  .article h1 {
    font-size: 36px;
  }
}

/* (LANDING-HERO-1) the sphere sits right of the headline from ~900 px wide */
@media (min-width: 900px) {
  .hero .grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}
