:root {
  --bg: #030d16;
  --bg-deep: #00090f;
  --bg-glass: rgba(3, 13, 22, 0.78);
  --surface: #0b1a26;
  --surface-2: #10222f;
  --field: #06121c;
  --line: rgba(150, 180, 210, 0.12);
  --line-strong: rgba(150, 180, 210, 0.22);
  --divider: 1px solid var(--line-strong); /* hairline rule: feature row, steps */
  --track: rgba(150, 180, 210, 0.12);
  --text: #f4f6f8;
  --text-soft: #c3ccd4;
  --muted: #8a9aa8;
  --red: #ce2829;
  --red-bright: #e8393a;
  --red-glow: rgba(206, 40, 41, 0.35);
  --accent: #9fc3e0;
  --error: #ff7a7a;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }
.accent { color: var(--red-bright); }

/* One heading treatment everywhere (matches the hero headline): Onest 500,
   tight tracking and leading. Sizes stay per level. */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 28px -10px var(--red-glow);
  transition: background 0.2s ease, transform 0.2s ease;
}
.button:hover { background: var(--red-bright); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button:disabled { opacity: 0.6; cursor: progress; }
.button--small { padding: 8px 18px; font-size: 0.9rem; }
.button--large { padding: 16px 32px; font-size: 1.05rem; }
.button--outline {
  padding: 9px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(244, 246, 248, 0.4);
  box-shadow: none;
}
.button--outline:hover { background: rgba(244, 246, 248, 0.08); border-color: var(--text); }
.button--ghost { background: transparent; border: 1px solid var(--line-strong); box-shadow: none; }
.button--ghost:hover { background: var(--surface-2); }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar__inner {
  max-width: 1320px;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: inline-flex; align-items: center; flex: none; }
.logo__img { display: block; width: auto; height: 26px; }
.topbar__side { display: flex; align-items: center; gap: 24px; }
.trust { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.trust__icon { flex: none; color: var(--muted); }
.topbar__divider { width: 1px; height: 36px; background: var(--line-strong); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red-bright);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 16px; }
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  background-color: var(--bg);
}
/* Digital rain backdrop (drawn by /js/digital-rain.js); it fades itself out
   toward the bottom and dims behind the text, so nothing overlays the copy. */
.hero__rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(40px, 6.5vh, 64px) clamp(40px, 7vh, 64px);
}
/* Centred text column; its box is also the rain's dim zone (see digital-rain.js). */
.hero__content {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0 0 clamp(24px, 4.2vh, 40px);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__title {
  font-size: clamp(2.4rem, 2.4vw + 0.8rem, 4.2rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: 14em;
  margin: 0 auto clamp(20px, 3.4vh, 32px);
  text-shadow: 0 2px 18px rgba(3, 13, 22, 0.8);
}
.hero__lead { color: var(--text-soft); max-width: 640px; margin: 0 auto 14px; font-size: clamp(1rem, 0.4vw + 0.6rem, 1.15rem); line-height: 1.55; text-shadow: 0 2px 18px rgba(3, 13, 22, 0.8); }
/* «Начать» plus the outlined link to the public rating; they wrap onto two rows on a phone.
   `.hero .button--large` gives both the same height, `.button--outline` the quieter look. */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: clamp(24px, 3.2vh, 32px) 0 clamp(40px, 6vh, 64px);
}
.hero__actions .button { max-width: 100%; text-align: center; }
.hero .button--large { padding: 14px 34px; }
/* Headline: three explicit lines from tablet up (the first line fits at 768px
   at the minimum font size); phones keep natural wrapping. */
@media (min-width: 768px) {
  .hero__title { max-width: none; text-wrap: balance; }
  .hero__line { display: block; }
}

.features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: auto 0 0;
  padding: 0;
  justify-content: center;
  row-gap: 20px;
}
.feature { display: flex; align-items: flex-start; gap: 14px; padding: 4px 28px; border-left: var(--divider); }
.feature:first-child { padding-left: 0; border-left: 0; }
.feature:last-child { padding-right: 0; }
.feature__icon { flex: none; margin-top: 2px; color: var(--text-soft); }
.feature__text { margin: 0; font-size: 0.875rem; font-weight: 500; line-height: 1.45; white-space: nowrap; }
.feature__sub { color: var(--muted); font-weight: 400; }
/* Large screens: the feature row grows with the headline. */
@media (min-width: 1440px) {
  .feature { gap: 16px; padding: 6px 36px; }
  .feature__icon { width: 32px; height: 32px; }
  .feature__text { font-size: 1.05rem; }
}
@media (min-width: 1920px) {
  .feature { gap: 18px; padding: 6px 48px; }
  .feature__icon { width: 36px; height: 36px; margin-top: 1px; }
  .feature__text { font-size: 1.15rem; }
}

/* How it works */
/* Section heading layout shared by «Три шага» and the form: on desktop the
   eyebrow sits in the left third, baseline-aligned with the title's first line,
   and the title (plus whatever follows it) takes the right two thirds. */
.split-head__eyebrow { margin: 0 0 12px; }
@media (min-width: 1024px) {
  .split-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; align-items: baseline; }
  .split-head__eyebrow { grid-column: 1; margin: 0; }
  .split-head__main { grid-column: 2 / 4; }
}

.how { padding: 48px 0 72px; }
/* Steps are plain rows ruled like a table, with the same hairline as the
   hero feature-row dividers. */
.how__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: var(--divider); }
.how__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  padding: 24px 0;
  border-bottom: var(--divider);
  color: var(--text-soft);
}
.how__num { color: var(--red-bright); font-weight: 500; font-size: 1.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.how__text { line-height: 1.5; }
@media (min-width: 1024px) {
  .how__item { padding: 28px 0; }
}

/* Info blocks after «Три шага» and before the footer: «Для кого», «Что это»,
   «Вопросы и ответы». Same heading grid and hairline rows as the steps. */
.info { padding: 24px 0 72px; }
.info--faq { padding: 72px 0 120px; border-top: 1px solid var(--line); }
.info__text { margin: 0; max-width: 70ch; color: var(--text-soft); line-height: 1.6; }
/* «Для кого»: four cards in a row on desktop, 2×2 on tablets, a column on phones. */
.audience { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.audience__item { padding: 24px; }
.audience__who { margin: 0 0 12px; font-size: 1.15rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.audience__why { margin: 0; color: var(--text-soft); line-height: 1.5; }
@media (min-width: 600px) {
  .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .audience { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .audience__item { padding: 28px; }
}
/* «Что это» and the FAQ: the title in the left third, the content in the right two thirds. */
@media (min-width: 1024px) {
  .info-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .info-split__title { grid-column: 1; margin: 0; }
  .info-split__text { grid-column: 2 / 4; padding-top: 6px; }
  .info-split__line { display: block; }
}

.faq { margin: 32px 0 0; border-top: var(--divider); }
.faq__item { border-bottom: var(--divider); }
/* The FAQ's first rule lines up with the cap height of its title (9px below the line box at the
   desktop title size); placed after .faq, which adds its own top margin. */
@media (min-width: 1024px) {
  .faq.info-split__side { grid-column: 2 / 4; margin-top: 9px; }
}
.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  line-height: 1.4;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after { content: "+"; flex: none; color: var(--red-bright); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 0.2s ease; }
.faq__item[open] .faq__question::after { transform: rotate(45deg); }
.faq__question:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.faq__answer { margin: -8px 0 24px; max-width: 70ch; color: var(--text-soft); line-height: 1.6; }
.faq__answer a { color: var(--text); }

.form-section { padding: 72px 0 200px; border-top: 1px solid var(--line); }
/* Bot trap: kept off screen instead of display:none, which simple bots skip. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.column { display: grid; gap: 16px; align-content: start; }
/* Contacts: the last card, full width under the three columns. */
.contacts-slot { margin-top: 16px; }
.contacts-slot:empty { display: none; }
@media (min-width: 1024px) {
  .group__body--row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .group__body--row > .step { border-bottom: 0; }
}
@media (min-width: 1280px) {
  .group__body--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.group { padding: 8px 20px 12px; animation: appear 0.3s ease; }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.group__title { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.3; }
.group__count { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.step { padding: 12px 0; border-bottom: 1px solid var(--line); animation: appear 0.3s ease; }
.step:last-child { border-bottom: 0; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step__label { position: relative; font-weight: 500; margin: 0 0 8px; padding-left: 26px; line-height: 1.35; }
.step__label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}
.step--done .step__label::before {
  border-color: var(--red);
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: 0 0 12px var(--red-glow);
}
.step--done.step--passed .step__next { display: none; }
.step__hint { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.step__hint--note { padding-left: 26px; }
.step__error { color: var(--error); font-size: 0.85rem; margin: 6px 0; }
.step__error:empty { display: none; }
.step__body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-left: 26px; }
.step__body > input[type="text"], .step__body > input[type="email"], .step__body > input[type="tel"] { flex: 1 1 140px; width: auto; min-width: 0; }
.step__body > select, .step__body > .autocomplete { flex: 1 1 100%; }
.step__next { margin-top: 10px; }
.step__next { margin-left: 26px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select {
  font: inherit;
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  width: 100%;
  background: var(--field);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(206, 40, 41, 0.25); }
input:disabled { opacity: 0.45; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238a9aa8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 16px no-repeat;
  cursor: pointer;
}
select option { background: var(--surface); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--red); margin: 0; }

.autocomplete { width: 100%; }
.suggestions { list-style: none; margin: 4px 0 0; padding: 0; }
.suggestions__item {
  width: 100%;
  text-align: left;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 4px;
  font: inherit;
  cursor: pointer;
}
.suggestions__item:hover, .suggestions__item:focus { border-color: var(--red); outline: none; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice, .unknown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.choice:has(input:checked), .unknown:has(input:checked) { border-color: var(--red); background: rgba(206, 40, 41, 0.14); }
.choice:has(input:focus-visible), .unknown:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.unknown { color: var(--muted); }

.computed { margin: 0; padding: 12px 0 14px 26px; color: var(--muted); font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.computed strong { color: var(--accent); }
/* «Сообщите, когда добавите мой тип сырья» under the mineral list. */
.mineral-request { display: grid; gap: 8px; padding: 12px 0 4px 26px; }
.mineral-request .step__hint, .mineral-request .service__status { margin: 0; font-size: 0.85rem; }
.mineral-request a { color: var(--text); }
.mineral-request a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mineral-request__fields { display: flex; flex-wrap: wrap; gap: 8px; }
.mineral-request__fields input { flex: 1 1 140px; width: auto; min-width: 0; }

/* Bottom dock with progress and submit */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.dock--visible { transform: none; }
.dock__inner { display: grid; gap: 12px; }
/* progress__text: a wrapping flex row. Text + percent always share the top line (percent pinned
   right via margin-left: auto); the hint sits on its own full-width line on phones, and inline
   next to the text from 600px up if there is room. */
.progress__text {
  display: flex;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 4px;
  align-items: baseline;
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.progress__percent { order: 1; margin-left: auto; color: var(--text); font-weight: 600; }
.progress__hint { order: 2; flex-basis: 100%; color: var(--red-bright); font-size: 0.82rem; }
.progress__hint[hidden] { display: none; }
@media (min-width: 600px) {
  .progress__percent { order: 2; }
  .progress__hint { order: 1; flex-basis: auto; }
}
.progress__track { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.progress__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  box-shadow: 0 0 14px var(--red-glow);
  transition: width 0.4s ease;
}
.submit { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.submit .button { flex: none; }
.submit .consent { flex: 1 1 0; min-width: 0; }
.captcha-note { flex-basis: 100%; margin: -8px 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
.captcha-note a { color: var(--text-soft); }
.captcha-note a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* SmartCaptcha appends its challenge overlay (an iframe) to <body>; its own CSS is blocked by our
   CSP, which left a 150px empty frame under the footer. Hidden until Yandex shows a challenge, then a
   full-screen layer with the challenge frame in the middle. */
.SmartCaptcha-Overlay { display: none; }
.SmartCaptcha-Overlay_visible,
.captcha-challenge .SmartCaptcha-Overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 9, 15, 0.7);
}
.SmartCaptcha-Overlay iframe {
  width: min(100vw - 32px, 420px);
  height: min(100vh - 32px, 640px);
  border: 0;
  border-radius: var(--radius-sm);
  background: #fff;
}
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.consent a { color: var(--text); }
.consent a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal { padding-block: 48px 80px; }
.notice { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.notice strong { color: var(--accent); font-weight: 600; }
.errors { margin: 0; padding-left: 18px; color: var(--error); font-size: 0.9rem; }
.errors:empty { display: none; }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin: 12px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 9, 15, 0.6);
}
.cookie-banner--top { bottom: auto; top: 0; }
.cookie-banner__text { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.cookie-banner__link { color: var(--text); }
.cookie-banner__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cookie-banner__button { flex: none; }

/* Result */
.result-section { padding: 72px 0 120px; outline: none; }
.result-hero { position: relative; overflow: hidden; padding: clamp(24px, 5vw, 48px); border-color: rgba(206, 40, 41, 0.35); box-shadow: 0 0 80px -30px var(--red-glow); }
.result-hero__name { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 24px; overflow-wrap: anywhere; }
.result-hero__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 48px; }
.result-place { margin: 0; display: flex; align-items: baseline; gap: 14px; }
.result-place strong { font-size: clamp(4rem, 12vw, 7rem); line-height: 0.9; color: var(--red-bright); text-shadow: 0 0 40px var(--red-glow); }
.result-place span { color: var(--muted); font-size: 1.2rem; }
.result-score { margin: 0; color: var(--muted); }
.result-score strong { display: block; color: var(--text); font-size: 1.8rem; }

.result-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.result-group { padding: 20px; }
.result-group__name { margin: 0 0 14px; font-weight: 600; }
.result-group__bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-bottom: 14px; }
.result-group__fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--red-bright)); border-radius: inherit; }
.result-group__meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.result-group__meta strong { color: var(--text); }
/* Paid-service request under the result. */
.service { margin-top: 24px; padding: 24px; display: grid; gap: 16px; justify-items: start; }
.service__text { margin: 0; max-width: 70ch; color: var(--text-soft); }
.service__status { margin: 0; color: var(--accent); }
.service__status:empty { display: none; }
.service__status--error { color: var(--error); }

.result-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.result-actions .step__hint { margin: 0; }

.footer {
  padding: 40px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: rgba(244, 246, 248, 0.6);
  font-size: 0.625rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .footer { font-size: 0.75rem; }
}
@media (min-width: 1024px) {
  .footer { font-size: 0.875rem; }
}
.footer__logo { display: block; width: auto; height: 22px; margin-bottom: 40px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "company"
    "inn"
    "ogrn"
    "head-doc"
    "doc1"
    "doc2"
    "doc3"
    "doc4"
    "head-contact"
    "contact1"
    "contact2";
  align-items: start;
  row-gap: 10px;
}
.footer__grid p { margin: 0; }
.footer__company { grid-area: company; font-weight: 500; }
.footer__inn { grid-area: inn; }
.footer__ogrn { grid-area: ogrn; }
.footer__head { font-weight: 600; }
.footer__head-doc { grid-area: head-doc; }
.footer__head-contact { grid-area: head-contact; }
.footer__doc1 { grid-area: doc1; }
.footer__doc2 { grid-area: doc2; }
.footer__doc3 { grid-area: doc3; }
.footer__doc4 { grid-area: doc4; }
.footer__contact1 { grid-area: contact1; }
.footer__contact2 { grid-area: contact2; }
.footer__grid a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
.footer__grid a:hover { color: var(--text); text-decoration: underline; }
.footer__grid a:focus-visible { color: var(--text); outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.footer__bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: inherit; line-height: 1.6; color: rgba(244, 246, 248, 0.6); }
@media (min-width: 768px) {
  .footer__grid {
    /* Outer columns hug their text, the middle one takes the slack: the contacts
       column then sits at the right edge of the container. */
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    justify-content: space-between;
    grid-template-areas:
      ". head-doc head-contact"
      "company doc1 contact1"
      "inn doc2 contact2"
      "ogrn doc3 ."
      ". doc4 .";
    column-gap: 32px;
    row-gap: 10px;
  }
  /* The documents block sits between the company details and the contacts, but its
     own lines start on one vertical line. */
  .footer__grid { grid-template-columns: max-content max-content max-content; }
}

/* Public rating page (/rating): same shell as the legal pages, with a mineral
   switcher and a three-column table (place, name, score). */
.rating { padding-block: 48px 80px; }
.rating__asof { margin: 0 0 10px; color: var(--accent); }
.rating__asof:empty { display: none; }
.rating__note { margin: 0 0 28px; max-width: 70ch; color: var(--muted); }
.rating__empty { color: var(--muted); }

.rating-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.rating-switch__item {
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.rating-switch__item:hover { border-color: var(--text); color: var(--text); }
.rating-switch__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rating-switch__item[aria-current="page"] { border-color: var(--red); background: rgba(206, 40, 41, 0.14); color: var(--text); }

/* Three short columns: capped so «Балл» does not drift half a screen away from the name. */
.rating-table { width: 100%; max-width: 860px; border-collapse: collapse; }
.rating-table th, .rating-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.rating-table th { border-bottom: var(--divider); color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.rating-table th:first-child, .rating-table td:first-child { padding-left: 0; }
.rating-table th:last-child, .rating-table td:last-child { padding-right: 0; }
.rating-table__place { width: 5em; }
.rating-table td.rating-table__place { font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.rating-table__score { width: 8em; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .rating { padding-block: 32px 56px; }
  .rating-table th, .rating-table td { padding: 10px 8px; }
  .rating-table th { font-size: 0.7rem; letter-spacing: 0.06em; }
  .rating-table__place { width: 3.5em; }
  .rating-table__score { width: 5em; }
  .rating-table td { font-size: 0.9rem; }
  .rating-table td.rating-table__place { font-size: 1rem; }
}

.legal h2 { font-size: 1.2rem; margin: 32px 0 12px; letter-spacing: -0.01em; line-height: 1.3; }
.legal ul { padding-left: 20px; color: var(--text); }
.legal li { margin: 6px 0; }
.legal a { color: var(--text); overflow-wrap: anywhere; }
.footer a { overflow-wrap: anywhere; }
.legal p, .legal li { hyphens: auto; -webkit-hyphens: auto; }
@media (min-width: 768px) {
  .legal p, .legal li { text-align: justify; }
}

/* Tablet and phone: one column */
@media (max-width: 1023px) {
  .columns { display: flex; flex-direction: column; gap: 16px; }
  .column { display: contents; }
  .result-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .hero__inner { min-height: 0; }
  .features { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 20px 48px; margin-top: 0; }
  .feature, .feature:first-child { padding: 0; border-left: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__inner { padding-bottom: 56px; }
}
@media (max-width: 767px) {
  :root { --header-h: 60px; }
  .logo__img { height: 22px; }
  .trust, .topbar__divider { display: none; }
  .button--outline { padding: 7px 20px; font-size: 0.9rem; }

  .hero__inner { padding-bottom: 48px; }
  /* A third smaller than before (2/9.2vw/2.4 divided by 1.5), then +3px back on
     the owner's request: the headline fits without crowding the screen. */
  .hero__title { font-size: clamp(1.52rem, 6.9vw, 1.79rem); }
  /* Lead text 3px smaller than the base size on phones. */
  .hero__lead { font-size: 0.8125rem; }
  .hero__actions { margin-bottom: 40px; }
  .hero__eyebrow { gap: 14px; letter-spacing: 0.14em; font-size: 11px; }
  .features { grid-template-columns: repeat(2, minmax(0, max-content)); gap: 20px 16px; }
  .feature { gap: 10px; }
  .feature__text { white-space: normal; font-size: 0.8125rem; }
  .how__item { grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding: 20px 0; }
  .how__num { font-size: 1.05rem; }
  .submit { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
  .captcha-note { margin: 0; }
  .result-groups { grid-template-columns: 1fr; }
  .group { padding-inline: 16px; }

  /* Footer on a phone: everything centred on one column and the vertical rhythm
     tightened by ~10px per row (line 16px + gap 10px = 26px before, 14px + 2px now).
     The two column headings keep a small gap so the blocks stay apart. */
  .footer { line-height: 1.4; }
  .footer__logo { margin-inline: auto; margin-bottom: 20px; }
  .footer__grid { justify-items: center; text-align: center; row-gap: 2px; }
  .footer__grid .footer__head { margin-top: 12px; }
  .footer__bottom { margin-top: 16px; padding-top: 12px; text-align: center; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .group { animation: none; }
  .progress__fill, .dock, .faq__question::after { transition: none; }
}
