/* ═══════════════════════════════════════════════════════════════
   Laula — страницы цен (/ceny/…) и блок «Цена за м² по месяцам» в карточке ЖК.
   Опирается на tools.css (KPI, .tchart, .t-hero, .an-grid); здесь только своё.
   Цвета — только токены (тёмная тема переопределяет их сама).
   ═══════════════════════════════════════════════════════════════ */

.sp-hero { padding-top: 6px; }
.sp-hero .lead { max-width: 760px; }
.sp-first { padding-top: 6px; }
.sp-h2 { font-size: 18px; }

/* список «город/район/комнатность → цены»: на телефоне карточкой, на широком — строкой таблицы */
.sp-list { display: flex; flex-direction: column; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; align-items: start;
  padding: 12px 4px; border-bottom: 1px solid var(--line-2); }
.sp-row:last-child { border-bottom: 0; }
.sp-row.weak .sp-name a { color: var(--muted); }
.sp-name { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sp-name a { font-weight: 800; font-size: 15.5px; color: var(--ink); overflow-wrap: anywhere; }
.sp-name a:hover { color: var(--brand); }
.sp-name small { color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sp-val { min-width: 0; display: flex; flex-direction: column; }
.sp-val b { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; overflow-wrap: anywhere; }
.sp-val small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.sp-val.sp-wide { grid-column: 1 / -1; }
.sp-k { color: var(--faint); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.sp-none { color: var(--faint); font-weight: 700; font-size: 13px; }
.sp-go { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.sp-go svg { width: 14px; height: 14px; }
.sp-head { display: none; }

@media (min-width: 760px) {
  .sp-list:not(.sp-compact) .sp-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; }
  .sp-list:not(.sp-compact) .sp-name, .sp-list:not(.sp-compact) .sp-go { grid-column: auto; }
  .sp-list:not(.sp-compact) .sp-k { display: none; }
  .sp-list:not(.sp-compact) .sp-head { display: grid; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase;
    padding-top: 0; padding-bottom: 8px; }
}

.sp-links { display: flex; flex-wrap: wrap; gap: 8px; }
/* в кнопках — название района («Купить квартиру: район им. Әлихан Бөкейхан»): у .btn nowrap,
   и на телефоне 360 px такая кнопка выталкивала страницу вбок. Здесь подпись переносится. */
.sp-links .btn, .sp-actions .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 10px;
  padding-bottom: 10px; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.sp-actions { justify-content: center; }
.sp-chart-empty { flex-direction: column; gap: 10px; min-height: 180px; }
.sp-chart-empty svg { width: 32px; height: 32px; color: var(--faint); }
.sp-chart-empty p { max-width: 420px; }
.chips .chip small { font-weight: 700; opacity: .65; font-size: 12px; }
/* длинное название ЖК переносится внутри чипа, а не растягивает страницу вбок */
.sp-chips .chip { white-space: normal; height: auto; min-height: 38px; padding-top: 6px; padding-bottom: 6px; max-width: 100%;
  overflow-wrap: anywhere; }

/* вторая линия графика — район рядом с ЖК: пунктир, нейтральный цвет */
.tchart .t-line.alt { stroke: var(--c-other); stroke-dasharray: 5 4; }
.tchart .t-dot.alt { fill: var(--c-other); }
.legend .lg-main { background: var(--brand); }
.legend .lg-alt { background: var(--c-other); }

/* блок динамики в карточке ЖК */
.cxp-figs { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 6px; }
.cxp-figs div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.cxp-figs span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.cxp-figs b { font-size: clamp(15px, 4.2vw, 18px); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cxp-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; }
