/* CAL-415: блоки главной «Аутсорс» (маршрут звеньев) и «Риски» (гистограмма скачков).
   Холст 05.12: B (маршрут) + C (гистограмма). Всё под префиксом .hb. */
.hb { --ink: #0B1220; --ink-2: #06101C; --line: #263449; --teal: #14B8A6; --teal-hi: #5EEAD4; --teal-ink: #06231F;
  --red: #F87171; --fg: #F8FAFC; --fg-2: #CBD5E1; --fg-3: #94A3B8;
  color: var(--fg); font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; border-bottom: 1px solid var(--line); padding: 56px 0; }
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }
.hb-wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.hb-eyebrow { margin: 0 0 10px; font: 600 12px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.hb-teal { color: var(--teal-hi); } .hb-red { color: var(--red); }
.hb-h2 { margin: 0; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.08; font-weight: 900; letter-spacing: -.02em; }
.hb-lead { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--fg-2); max-width: 36rem; }
.hb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font-family: inherit; font-size: 16px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hb-btn-teal { background: var(--teal); color: var(--teal-ink); border: 0; }
.hb-btn-teal:hover { background: var(--teal-hi); }
.hb-btn-ghost { background: transparent; color: var(--fg-2); border: 1px solid #334155; font-weight: 600; }
.hb-btn-link { color: var(--teal-hi); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 0 8px; }
.hb button:focus-visible, .hb a:focus-visible { outline: 3px solid #FBBF24; outline-offset: 2px; }

/* Маршрут */
.hb-route { background: linear-gradient(180deg, #0B1A2C 0%, var(--ink-2) 100%); }
.hb-head { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; justify-content: space-between; }
.hb-head > div { flex: 1 1 560px; min-width: 0; }
.hb-head .hb-lead { flex: 1 1 280px; margin: 0; }
.hb-track { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 32px;
  background: linear-gradient(#334155, #334155) 0 20px / 100% 4px no-repeat; }
.hb-stop { display: flex; flex-direction: column; align-items: center; gap: 10px; background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--fg-2); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; min-height: 96px; }
.hb-dot { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #475569;
  background: var(--ink-2); color: var(--fg-2); font: 700 15px "JetBrains Mono", monospace; transition: background .2s, border-color .2s, transform .2s; }
.hb-stop:hover .hb-dot { border-color: var(--teal-hi); }
.hb-stop[aria-pressed="true"] .hb-dot { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); transform: scale(1.08); }
.hb-stop[aria-pressed="true"] .hb-stop-label { color: var(--fg); }
.hb-foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-top: 20px; }
.hb-count { margin: 0; font-size: 15px; color: var(--fg-2); }
.hb-count b { color: var(--teal-hi); }
.hb-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* Риски */
.hb-risk { background: var(--ink); }
.hb-risk-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hb-risk-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hb-risk-copy .hb-lead { margin: 0; }
.hb-risk-copy .hb-h2 { font-size: clamp(24px, 2.6vw, 32px); }
.hb-big { font: 800 clamp(64px, 9vw, 120px)/.95 "JetBrains Mono", ui-monospace, monospace; color: var(--red); letter-spacing: -.04em; }
.hb-chart { flex: 1 1 480px; min-width: 0; }
.hb-bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; height: 280px; border-bottom: 2px solid #334155; }
.hb-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; height: 100%; background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--fg-3); position: relative; }
.hb-bar-val { font: 700 12px "JetBrains Mono", monospace; text-align: center; }
.hb-bar-col { display: block; min-height: 4px; border-radius: 8px 8px 0 0; background: #334155; transition: background .2s; }
.hb-bar-term { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font: 500 12px "JetBrains Mono", monospace; color: var(--fg-3); }
.hb-bar:hover .hb-bar-col { background: #475569; }
.hb-bar[aria-pressed="true"] .hb-bar-col { background: var(--red); }
.hb-bar[aria-pressed="true"] .hb-bar-val { color: var(--red); }
.hb-note { margin: 34px 0 0; font-size: 12px; color: var(--fg-3); }

@media (prefers-reduced-motion: reduce) { .hb-dot, .hb-bar-col { transition: none; } .hb-stop[aria-pressed="true"] .hb-dot { transform: none; } }
@media (max-width: 760px) {
  .hb { padding: 44px 0; }
  .hb-track { grid-template-columns: 1fr; gap: 4px; background: linear-gradient(#334155, #334155) 20px 0 / 4px 100% no-repeat; }
  .hb-stop { flex-direction: row; min-height: 48px; gap: 14px; text-align: left; font-size: 14px; }
  .hb-dot { width: 44px; height: 44px; flex: none; }
  .hb-bars { gap: 4px; height: 220px; }
  .hb-bar-val { font-size: 10px; }
  .hb-btn { white-space: normal; }
}
