/* Страницы услуг /usluga/<slug>. Подключается только на них (не входит в общий site.css).
   Образ: карта маршрута. Тёмная «обложка» с линией пути, дальше вертикальная нить шагов с узлами. */

.us-wrap { max-width: 960px; }

/* Цвета тем услуг: те же значения в legkodok.html и assets/usluga.css (build-pages.py сверяет). Контраст AA:
   тон на белом и на своём мягком фоне не ниже 5,1, белый на тоне не ниже 6; в тёмной теме не ниже 5,3. */
[data-tone] { --t-on: #FFFFFF; --t-soft: color-mix(in srgb, var(--t) 12%, var(--surface)); }
[data-tone="blue"]   { --t: #1D5FA6; }
[data-tone="violet"] { --t: #5B47A6; }
[data-tone="amber"]  { --t: #8A5300; }
[data-tone="terra"]  { --t: #A3461D; }
[data-tone="slate"]  { --t: #42577D; }
[data-tone="rose"]   { --t: #A3336B; }
[data-tone="petrol"] { --t: #0B6A84; }
@media (prefers-color-scheme: dark) {
  [data-tone] { --t-on: #0D1524; --t-soft: color-mix(in srgb, var(--t) 18%, var(--surface)); }
  [data-tone="blue"]   { --t: #8DB9F2; }
  [data-tone="violet"] { --t: #B9A9F3; }
  [data-tone="amber"]  { --t: #E5B566; }
  [data-tone="terra"]  { --t: #F1A27E; }
  [data-tone="slate"]  { --t: #AEBEDF; }
  [data-tone="rose"]   { --t: #F29BC3; }
  [data-tone="petrol"] { --t: #72C8DF; }
}
/* Шапка страницы цветом темы услуги; «ярче»: весь акцент страницы (узлы шагов, чипы ситуаций, ссылки) тоже её цветом */
.us-wrap[data-tone] .us-hero { background: var(--t); color: var(--t-on); }
.us-wrap[data-tone] .us-hero .btn { background: var(--t-on); color: var(--t); }
.us-wrap[data-usl-style="bright"] { --cloth: var(--t); --cloth-hi: color-mix(in srgb, var(--t) 85%, var(--ink)); --cloth-soft: var(--t-soft); --on-cloth: var(--t-on); }
/* Картинка темы в шапке: справа сверху на широком экране, над надзаголовком на телефоне */
.us-pic { position: absolute; z-index: 1; top: clamp(28px, 5vw, 52px); right: clamp(22px, 5vw, 52px); width: 120px; height: 120px; border-radius: 22px; overflow: hidden; }
.us-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.us-hero.has-pic h1, .us-hero.has-pic .us-dek { max-width: calc(100% - 150px); }
@media (max-width: 720px) {
  .us-pic { position: relative; top: auto; right: auto; display: block; width: 72px; height: 72px; border-radius: 16px; margin-bottom: 16px; }
  .us-hero.has-pic h1, .us-hero.has-pic .us-dek { max-width: none; }
}
.us-wrap h2 { margin-top: 56px; font-size: clamp(24px, 3vw, 32px); scroll-margin-top: 90px; }
.us-wrap h3 { margin: 0; font-size: clamp(18px, 2vw, 20px); line-height: 1.3; }
.us-wrap p { max-width: 42em; }
.us-wrap a { color: var(--cloth); }
/* кнопка-ссылка на странице услуги: текст цветом «на акценте», иначе правило выше красит его в цвет фона кнопки */
.us-wrap a.btn-primary, .us-wrap a.btn-primary:hover { color: var(--on-cloth); }

/* Обложка */
.us-hero {
  position: relative; overflow: hidden; margin-top: 18px;
  padding: clamp(28px, 5vw, 52px) clamp(22px, 5vw, 52px);
  border-radius: var(--r-l); background: var(--cloth); color: var(--on-cloth);
}
.us-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background:
    radial-gradient(circle at 12% 88%, currentColor 0 5px, transparent 6px),
    radial-gradient(circle at 46% 62%, currentColor 0 5px, transparent 6px),
    radial-gradient(circle at 78% 30%, currentColor 0 5px, transparent 6px),
    radial-gradient(circle at 96% 12%, currentColor 0 7px, transparent 8px),
    linear-gradient(160deg, transparent 0 46%, currentColor 46% 46.4%, transparent 46.4%);
}
.us-eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85;
}
.us-eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* «Проведём за руку»: в обложке под описанием, только у услуг с полем zaRuku */
.us-zaruku { position: relative; margin: 18px 0 0; max-width: 36em; padding: 14px 16px; border-radius: var(--r-m); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); }
.us-zaruku-badge { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 8px; background: var(--t-on, var(--on-cloth)); color: var(--t, var(--cloth)); font-weight: 700; font-size: 14px; line-height: 1.35; }
.us-zaruku p { margin: 0; }
.us-zaruku p + p { font-size: 16px; opacity: .95; }
.us-hero h1 { position: relative; margin: 14px 0 0; color: inherit; max-width: 16em; overflow-wrap: anywhere; }
.us-hero .us-dek { position: relative; margin: 16px 0 0; max-width: 36em; font-size: clamp(17px, 1.6vw, 19px); opacity: .92; }
.us-buy { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.us-price { display: flex; flex-direction: column; line-height: 1.15; }
.us-price b { font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -.01em; }
.us-price span { margin-top: 4px; font-size: 14px; opacity: .85; max-width: 22em; }
.us-hero .btn { background: var(--on-cloth); color: var(--cloth); min-height: 52px; padding-inline: 28px; font-weight: 700; }
.us-hero .btn:hover { filter: brightness(.96); }
.us-hero .us-skip { position: relative; display: inline-block; margin-top: 18px; color: inherit; font-size: 15px; opacity: .9; }

/* Кому подходит */
.us-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.us-one { margin-top: 20px; }
.us-list { margin: 0; padding: 20px 22px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.us-list h3 { margin-bottom: 12px; font-size: 16px; }
.us-list li { position: relative; margin: 10px 0 0; padding-left: 26px; font-size: 15.5px; }
.us-list li::before { position: absolute; left: 0; top: .05em; font-weight: 800; }
.us-list.is-yes li::before { content: "\2713"; color: var(--cloth); }
.us-list.is-no { background: var(--surface-2); }
.us-list.is-no li::before { content: "\00D7"; color: var(--signal); font-size: 1.15em; top: -.05em; }

/* Что входит */
.us-incl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.us-incl li {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--r-m); background: var(--surface); font-size: 15.5px;
}
.us-kind {
  align-self: flex-start; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; background: var(--cloth-soft); color: var(--cloth);
}
.us-incl li.k-soon { border-style: dashed; background: transparent; }
.us-incl li.k-soon .us-kind { background: var(--surface-2); color: var(--muted); }
.us-incl a { font-weight: 600; }

/* Путь целиком */
.us-legend { margin-top: 16px; }
.us-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: us; }
.us-strip li { position: relative; padding: 36px 10px 0 0; font-size: 14.5px; line-height: 1.35; counter-increment: us; }
.us-strip li::before {
  content: counter(us); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--cloth); color: var(--on-cloth); font-size: 13px; font-weight: 800; z-index: 1;
}
.us-strip li::after { content: ""; position: absolute; top: 12px; left: 26px; right: 0; height: 2px; background: var(--line); }
.us-strip li:last-child::after { display: none; }
.us-strip b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--cloth); }

/* Выбор ситуации */
.us-pick { margin: 36px 0 0; }
.us-pick-h { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.us-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.us-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink) !important;
  font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.us-chip small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.us-chip:hover { border-color: var(--cloth); }
.us-chip[aria-current="true"] { border-color: var(--cloth); background: var(--cloth-soft); box-shadow: inset 0 0 0 1px var(--cloth); }

/* Карта: нить шагов */
.us-route { margin-top: 32px; scroll-margin-top: 90px; }
.js .us-route[hidden] { display: none; }
.us-wrap .us-route-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 22px; font-size: clamp(20px, 2.4vw, 24px); }
.us-route-h small { font-size: 14px; font-weight: 500; color: var(--muted); }
.us-map { position: relative; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.us-map > li { position: relative; margin: 0; padding: 0 0 22px 56px; counter-increment: st; }
.us-map > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--cloth); color: var(--on-cloth); font-weight: 800; font-size: 16px;
  box-shadow: 0 0 0 5px var(--paper);
}
.us-map > li::after { content: ""; position: absolute; left: 18px; top: 38px; bottom: 0; width: 2px; background: var(--line); }
.us-map > li:last-child::after { display: none; }
.us-step { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.us-when {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--cloth-soft); color: var(--cloth); font-size: 13.5px; font-weight: 700; line-height: 1.3;
}
.us-when::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.us-step p { margin: 8px 0 0; font-size: 15.5px; }
.us-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.us-who li { padding: 3px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; }
.us-who .w-site { background: var(--cloth); color: var(--on-cloth); }
.us-who .w-you { border: 1.5px solid var(--ink); color: var(--ink); }
.us-who .w-other { background: var(--surface-2); color: var(--muted); }
.us-norm { margin: 10px 0 0 !important; font-size: 13.5px !important; color: var(--muted); }
.us-docs { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.us-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; border-radius: var(--r-s); background: var(--cloth-soft); font-size: 15px; }
.us-docs a { font-weight: 700; }
.us-docs .us-tag { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--cloth); }
.us-docs li.is-soon { background: var(--surface-2); border: 1px dashed var(--field-line); }
.us-docs li.is-soon .us-tag { color: var(--muted); }

/* Развилка «если отказали» */
.us-fork {
  margin: 4px 0 0 56px; padding: 18px 20px; border: 2px dashed var(--field-line); border-radius: var(--r-m); background: var(--surface-2);
}
.us-fork h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.us-fork h3::before { content: "\21AA"; color: var(--signal); font-size: 1.2em; }
.us-fork ul { margin: 12px 0 0; padding-left: 20px; }
.us-fork li { margin: 8px 0 0; font-size: 15.5px; }

.us-law { margin-top: 22px; font-size: 14px; color: var(--muted); }

@media (max-width: 720px) {
  .us-two { grid-template-columns: 1fr; }
  .us-strip { grid-template-columns: 1fr; gap: 0; }
  .us-strip li { padding: 0 0 18px 42px; min-height: 26px; }
  .us-strip li::after { top: 26px; bottom: 0; left: 12px; right: auto; width: 2px; height: auto; }
  .us-map > li { padding-left: 46px; }
  .us-map > li::before { width: 32px; height: 32px; font-size: 14px; }
  .us-map > li::after { left: 15px; top: 32px; }
  .us-fork { margin-left: 0; }
  .us-step, .us-fork { padding: 16px; }
  .us-buy .btn { width: 100%; }
}

/* Оплата ещё не открыта: вместо кнопки пояснение того же размера */
.us-btn-off { white-space: normal; text-align: center; justify-content: center; display: inline-flex; align-items: center; min-height: 52px; padding: 10px 20px; max-width: 24em; border: 1.5px dashed currentColor; border-radius: var(--r-m); background: transparent !important; color: inherit !important; font-size: 15px; font-weight: 600; line-height: 1.35; cursor: default; opacity: .9; }
.doc-cta .us-btn-off { color: var(--muted) !important; margin-top: 20px; }

/* Калькулятор услуги под картой прохождения (ссылка с главной перенесена сюда 18.10) */
.us-calc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.us-calc p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .us-calc .btn { width: 100%; justify-content: center; } }
