/* Раздел «Помощь». Опирается на переменные из style.css. */

.help-hero {
  padding: 54px 0 28px;
}
.help-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 6px 0 10px;
  letter-spacing: -0.02em;
}
.help-hero .help-lead {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 22px;
  font-size: 1.05rem;
}

.help-search {
  position: relative;
  max-width: 640px;
}
.help-search input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 15px 46px 15px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  outline: none;
}
.help-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(27, 154, 85, 0.14);
}
.help-search::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 17px;
  height: 17px;
  margin-top: -9px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  pointer-events: none;
}
.help-search::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 50%;
  width: 8px;
  height: 2px;
  margin-top: 5px;
  background: var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.help-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.help-search input::-webkit-search-cancel-button,
.help-search input::-webkit-search-decoration {
  /* Свой крестик уже есть — родной рядом с ним выглядит опечаткой. */
  -webkit-appearance: none;
  appearance: none;
}
.help-search-clear.on { display: block; }
.help-search-clear:hover { background: var(--border); color: var(--text); }

.help-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.help-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.help-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.help-chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.help-layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}

.help-side {
  position: sticky;
  top: 90px;
}
.help-side-title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px 12px;
}
.help-side a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.help-side a:hover { background: var(--bg-alt); color: var(--text); }
.help-side a.active {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.help-side a.empty { opacity: 0.35; }
.help-side .cnt {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 1px 8px;
}

.help-cat { margin-bottom: 44px; }
.help-cat > h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 4px;
  scroll-margin-top: 92px;
}
.help-cat > p.help-cat-note {
  color: var(--text-muted);
  margin: 0 0 18px;
}

.help-topic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  scroll-margin-top: 92px;
}
.help-topic.open { box-shadow: var(--shadow); border-color: #bcdcc8; }

.help-topic-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--text);
}
.help-topic-head:hover { background: rgba(27, 154, 85, 0.04); }
.help-topic-head .tt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  display: block;
}
.help-topic-head .tl {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 3px;
}
.help-topic-head .caret {
  margin-left: auto;
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.help-topic.open .caret { transform: rotate(-135deg); }

.badge-new {
  flex: none;
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 3px 9px;
}

.help-topic-body {
  display: none;
  padding: 0 18px 18px 18px;
  border-top: 1px solid var(--border);
  margin-top: -1px;
}
.help-topic.open .help-topic-body { display: block; }
.help-topic-body p { margin: 14px 0 0; }
.help-topic-body ul { margin: 12px 0 0; padding-left: 20px; }
.help-topic-body li { margin-bottom: 6px; }
.help-topic-body .note {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
}

.keytable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.95rem;
}
.keytable td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.keytable tr:last-child td { border-bottom: 0; }
.keytable td:first-child { width: 160px; white-space: nowrap; }
.keytable tr.hit td { background: rgba(27, 154, 85, 0.12); }

kbd {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text);
  white-space: nowrap;
}

mark {
  background: rgba(63, 214, 135, 0.35);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.help-empty {
  display: none;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.help-empty.on { display: block; }

/* Проверка клавиш */
.help-keys { background: var(--bg-alt); padding: 56px 0; }
.keycheck {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.keycheck p { margin: 0; color: var(--text-muted); flex: 1 1 260px; }
.keycheck-out {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 120px;
}
.keycheck-out.miss { color: var(--text-muted); font-weight: 500; font-size: 1rem; }

.keycols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.keycard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.keycard h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.help-contact { padding: 56px 0 72px; text-align: center; }
.help-contact h2 { font-family: var(--font-display); margin: 0 0 8px; }
.help-contact p { color: var(--text-muted); margin: 0 0 20px; }

@media (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; gap: 24px; }
  .help-side { position: static; }
  .help-side nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .help-side a { padding: 7px 12px; border: 1px solid var(--border); }
  .help-side .cnt { display: none; }
}

/* Мелочи, которых нет в общем style.css. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.main-nav a.active { color: var(--brand-dark); font-weight: 600; }
