:root {
  --ink: #263f3b;
  --muted: #687a77;
  --line: #dfe8e5;
  --soft: #f3f7f6;
  --accent: #157b68;
  --accent-dark: #0d5d4e;
  --accent-light: #e5f2ef;
  --warning: #fff8e8;
  --warning-line: #e4be67;
  --danger-soft: #fff1f1;
  --danger: #b94a50;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font: 16px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); }

.help-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  display: flex;
  align-items: center;
}

.help-header__inner,
.help-layout,
.help-footer__inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.help-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.help-logo { display: inline-flex; align-items: center; }
.help-logo img { display: block; width: 146px; height: auto; }

.help-header__section {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.help-header__section:hover { color: var(--accent); }

.help-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: 68px;
  justify-content: center;
  padding: 54px 0 88px;
}

.help-nav { position: sticky; top: 98px; align-self: start; }

.help-nav__title {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.help-nav a {
  display: block;
  margin-left: -12px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}

.help-nav a:hover,
.help-nav a:focus-visible { color: var(--accent-dark); background: var(--soft); }
.help-nav a.is-current { color: var(--accent-dark); background: var(--accent-light); font-weight: 700; }

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.lead {
  margin: 20px 0 40px;
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

h2 {
  margin: 42px 0 14px;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

h3 { margin: 26px 0 9px; font-size: 20px; line-height: 1.35; }
p { margin: 0 0 15px; }

.anchored-heading {
  scroll-margin-top: 92px;
}

.heading-anchor {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  margin: 0 0 0 8px;
  padding: 5px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
  opacity: .55;
  transform: translateY(-2px);
  transition: color .18s ease, background .18s ease, opacity .18s ease;
}

.heading-anchor svg { display: block; width: 22px; height: 22px; }

.heading-anchor:hover,
.heading-anchor:focus-visible,
.heading-anchor.is-copied {
  color: var(--accent-dark);
  background: var(--accent-light);
  opacity: 1;
}

.heading-anchor:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.heading-anchor.is-copied::after {
  content: "Скопировано";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 10;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--white);
  background: var(--ink);
  font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateX(-50%);
}

.help-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.help-card {
  min-height: 190px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.help-card:hover,
.help-card:focus-visible {
  border-color: #a7c7c0;
  box-shadow: 0 14px 32px rgba(38, 63, 59, .09);
  transform: translateY(-2px);
}

.help-card__mark {
  width: fit-content;
  margin-bottom: 22px;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

.help-card h2 { margin: 0 0 7px; font-size: 20px; }
.help-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.help-card__arrow { margin-top: auto; padding-top: 14px; color: var(--accent); font-weight: 700; }

.steps { counter-reset: help-step; margin-top: 32px; }

.step {
  position: relative;
  padding: 0 0 35px 62px;
  counter-increment: help-step;
}

.step::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: -3px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  line-height: 1;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 41px;
  bottom: 5px;
  left: 19px;
  width: 1px;
  background: var(--line);
}

.step h2,
.step h3 { margin: 0 0 7px; font-size: 21px; }
.step p:last-child { margin-bottom: 0; }

.browser-list { display: grid; gap: 13px; margin-top: 24px; }

.browser-guide {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.browser-guide[open] { border-color: #a9c8c1; box-shadow: 0 10px 28px rgba(38, 63, 59, .07); }

.browser-guide summary {
  position: relative;
  padding: 19px 53px 19px 21px;
  cursor: pointer;
  list-style: none;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.browser-guide summary::-webkit-details-marker { display: none; }
.browser-guide summary::after {
  content: "+";
  position: absolute;
  right: 19px;
  top: 50%;
  width: 25px;
  height: 25px;
  margin-top: -12px;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 400;
}

.browser-guide[open] summary::after { content: "−"; }
.browser-guide__body { padding: 18px 22px 23px; border-top: 1px solid var(--line); }
.browser-guide__body ol, .browser-guide__body ul { margin: 0; padding-left: 23px; }
.browser-guide__body li { padding: 3px 0 9px 6px; }
.browser-guide__body li::marker { color: var(--accent); font-weight: 700; }

.note {
  margin: 24px 0;
  padding: 17px 19px;
  border-left: 4px solid var(--warning-line);
  border-radius: 0 9px 9px 0;
  background: var(--warning);
}

.note--info { border-color: var(--accent); background: var(--accent-light); }
.note--danger { border-color: var(--danger); background: var(--danger-soft); }
.note strong { display: block; margin-bottom: 3px; }
.note p:last-child { margin-bottom: 0; }

.help-media {
  margin: 24px 0 30px;
}

.help-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
  box-shadow: 0 10px 28px rgba(38, 63, 59, .08);
}

.help-media figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.example {
  margin: 24px 0 30px;
  padding: 20px;
  border: 1px solid #b9d1cc;
  border-radius: 13px;
  background: #f8fbfa;
}

.example__title {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
}

.example p:last-child,
.example ul:last-child,
.example ol:last-child { margin-bottom: 0; }

.example-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
}

.example-path span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
}

.example-path b {
  color: var(--muted);
  font-size: 13px;
}

.example-screen {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.example-screen__bar {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.example-screen__body { padding: 14px; }

.example-screen__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.example-screen__row:last-child { border-bottom: 0; }

.example-screen__mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: var(--white);
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.example-code {
  display: block;
  margin-top: 12px;
  padding: 13px 15px;
  overflow-wrap: anywhere;
  border-radius: 9px;
  color: #f5fbf9;
  background: var(--ink);
  font: 14px/1.55 Consolas, "Courier New", monospace;
}

.example-files {
  margin: 12px 0 0;
  padding-left: 21px;
}

.example-files li { padding: 3px 0; }

.checklist { margin: 18px 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 5px 0 8px 31px; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--white);
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.action {
  margin: 30px 0;
  padding: 24px;
  border-radius: 13px;
  background: var(--soft);
}

.action h2 { margin: 0 0 8px; font-size: 22px; }
.action p:last-child { margin-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 18px;
  border-radius: 7px;
  color: var(--white);
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.button:hover { background: var(--accent-dark); }

kbd {
  display: inline-block;
  min-width: 25px;
  margin: 0 1px;
  padding: 2px 7px;
  border: 1px solid #c9d5d2;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: 600 13px/1.6 inherit;
  white-space: nowrap;
}

.help-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.help-footer__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.help-footer a { text-decoration: none; }

@media (max-width: 820px) {
  .help-layout { grid-template-columns: minmax(0, 760px); padding-top: 37px; }
  .help-nav { display: none; }
}

@media (max-width: 560px) {
  .help-header__inner, .help-layout, .help-footer__inner { width: min(100% - 28px, 760px); }
  .help-header__section { font-size: 13px; }
  .help-layout { padding-bottom: 60px; }
  .lead { margin-bottom: 32px; font-size: 17px; }
  .help-cards { grid-template-columns: 1fr; }
  .help-card { min-height: 165px; }
  .step { padding-left: 52px; }
  .step::before { width: 36px; height: 36px; }
  .step:not(:last-child)::after { top: 37px; left: 17px; }
  .browser-guide summary { padding: 17px 48px 17px 17px; font-size: 18px; }
  .browser-guide__body { padding: 16px 17px 20px; }
  .example { padding: 17px; }
  .example-path { gap: 5px; }
  .heading-anchor { width: 30px; height: 30px; margin-left: 5px; padding: 5px; opacity: .7; }
  .heading-anchor svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heading-anchor { transition: none; }
}
