/* Prototype B — «Как помочь». Базовая сетка и компоненты наследуются из styles.css. */

:root {
  --accent: #0d6b62;
  --accent-soft: #dcefeb;
  --teal: #0d6b62;
}

.hero--help h1 em { color: var(--teal); }
.hero--help { align-items: center; }
.hero--help .lede { max-width: 570px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(37, 103, 74, .28);
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--green); text-decoration-color: currentColor; }
.text-link .icon { width: 15px; height: 15px; }

/* ---------- Format panel ---------- */
.format-panel {
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: rgba(255, 253, 247, .72);
  box-shadow: var(--shadow-md);
}
.format-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.format-panel__hint { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--faint); }

.formats { display: flex; flex-direction: column; gap: 8px; }

.format-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  text-align: left;
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.format-card:hover { transform: translateX(2px); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.format-card.is-active {
  border-color: var(--fc);
  background: color-mix(in srgb, var(--fc) 8%, #fffdf7);
  box-shadow: 0 10px 24px -18px var(--fc);
}
.format-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--fc) 35%, transparent); outline-offset: 2px; }
.format-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--fc);
  background: color-mix(in srgb, var(--fc) 10%, #fffdf7);
  border: 1px solid color-mix(in srgb, var(--fc) 18%, #fffdf7);
}
.format-card__icon .icon { width: 21px; height: 21px; }
.format-card__body { display: flex; flex-direction: column; min-width: 0; }
.format-card__body b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
}
.format-card__body span {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.format-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-left: 6px;
}
.format-card__side b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}
.format-card__side span { font-size: 9px; color: var(--faint); }
.format-card.is-active .format-card__side b { color: var(--fc); }
.format-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  color: var(--fc);
}
.format-card.is-active .format-card__check { display: block; }
.format-card__check .icon { width: 14px; height: 14px; }

.format-panel__foot {
  padding: 12px 4px 1px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Map band ---------- */
.map-band {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: 8px;
  padding: clamp(30px, 4vw, 52px) max(clamp(18px, 4vw, 56px), calc((100vw - 1440px) / 2 + clamp(18px, 4vw, 56px)));
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(255, 253, 247, .5), transparent 70%),
    linear-gradient(120deg, #eae5d7 0%, #e6ebdd 100%);
}
.map-band__intro h2 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(27px, 2.7vw, 36px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.04em;
}
.map-band__text { font-size: 12.8px; line-height: 1.55; color: var(--ink-2); }
.map-band__count {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.map-band__count b {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.05em;
}
.map-band__count span { font-size: 11.5px; line-height: 1.35; color: var(--muted); }

.map-legend { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.map-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(255, 253, 247, .55);
  font-size: 11.5px;
  color: var(--ink-2);
  text-align: left;
  transition: background .16s, border-color .16s;
}
.map-legend .legend-item:hover { background: var(--paper); }
.map-legend .legend-item.is-active { border-color: var(--lc); background: var(--paper); font-weight: 600; }
.map-legend .legend-item i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.map-legend .legend-item b { margin-left: auto; font-size: 11px; color: var(--muted); }

.chip__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }

.map-card--flat { padding: 14px 14px 10px; box-shadow: 0 26px 60px -40px rgba(18, 63, 44, .45); }

/* ---------- Catalog B ---------- */
.grid--help { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.help-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  outline: none;
  overflow: hidden;
}
.help-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--cat);
  opacity: .8;
}
.help-card:hover,
.help-card:focus-visible {
  transform: translateY(-3px);
  border-color: #cec6b4;
  box-shadow: 0 22px 44px -30px rgba(18, 63, 44, .55);
}
.help-card:focus-visible { box-shadow: 0 0 0 3px rgba(37, 103, 74, .22), 0 22px 44px -30px rgba(18, 63, 44, .55); }

.help-card h3 {
  margin: 13px 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.help-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.6px;
  line-height: 1.5;
  color: var(--muted);
}

.ways { display: flex; flex-direction: column; gap: 6px; margin-top: 13px; }
.way {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--paper-2);
  transition: background .16s, border-color .16s, opacity .16s;
}
.way.is-active {
  border-color: color-mix(in srgb, var(--wc) 28%, #fffdf7);
  background: color-mix(in srgb, var(--wc) 7%, #fffdf7);
}
.way__icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  color: var(--wc);
  background: color-mix(in srgb, var(--wc) 10%, #fffdf7);
}
.way__icon .icon { width: 13px; height: 13px; }
.way b {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
}
.way p {
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.8px;
  line-height: 1.38;
  color: var(--ink-2);
}

.help-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
}
.coverage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--faint);
}
.coverage .icon { width: 11px; height: 11px; }

/* ---------- Switch ---------- */
.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12px; color: var(--ink-2); }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__ui {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d7d0c0;
  transition: background .18s;
  flex: 0 0 auto;
}
.switch__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 1px 3px rgba(23, 33, 27, .25);
  transition: transform .18s;
}
.switch input:checked + .switch__ui { background: var(--green); }
.switch input:checked + .switch__ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch__ui { box-shadow: 0 0 0 3px rgba(37, 103, 74, .18); }

/* ---------- Safety modal ---------- */
.steps { display: flex; flex-direction: column; gap: 13px; margin-top: 14px; }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 11px; align-items: start; }
.step__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}
.step b { display: block; font-size: 12.5px; color: var(--ink); }
.step p { margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* ---------- Responsive B ---------- */
@media (max-width: 1120px) {
  .map-band { grid-template-columns: 270px minmax(0, 1fr); }
  .format-card { padding: 13px; }
}

@media (max-width: 960px) {
  .hero--help { gap: 28px; }
  .format-panel { max-width: 680px; }
  .formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .format-card { grid-template-columns: 38px minmax(0, 1fr); align-items: start; }
  .format-card__icon { width: 38px; height: 38px; border-radius: 11px; }
  .format-card__icon .icon { width: 18px; height: 18px; }
  .format-card__side { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 4px; padding: 0; margin-top: 3px; }
  .format-card__side b { font-size: 16px; }
  .format-card__check { display: none !important; }
  .map-band { grid-template-columns: minmax(0, 1fr); }
  .map-band__intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 28px; align-items: end; }
  .map-band__intro .results__kicker,
  .map-band__intro h2,
  .map-band__text { grid-column: 1; }
  .map-band__count { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line-2); flex-direction: column; align-items: flex-start; gap: 4px; }
  .map-band__count b { font-size: 46px; }
  .map-legend { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; margin-top: 14px; }
  .map-legend .legend-item { width: auto; flex: 1 1 160px; }
}

@media (max-width: 760px) {
  .formats { grid-template-columns: minmax(0, 1fr); }
  .format-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .format-card__side { grid-column: 3; align-items: flex-end; flex-direction: column; margin-top: 0; }
  .format-card__check { display: block !important; }
  .format-panel { padding: 13px; border-radius: 18px; }
  .map-band {
    margin-top: 4px;
    padding: 28px 16px 30px;
    border-radius: 0;
  }
  .map-band__intro { display: block; }
  .map-band__count { margin-top: 16px; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line-2); flex-direction: row; align-items: baseline; }
  .map-legend { display: none; }
  .map-card--flat { padding: 12px 12px 8px; border-radius: 18px; }
  .grid--help { grid-template-columns: minmax(0, 1fr); }
  .help-card { padding: 17px; }
}
