/* ═══ Строительные леса хомутовые: /catalog/lesa/ ═════════════════════
   Свои стили одной страницы. Общие файлы (catalog.css, lead-inline.css)
   подключены и не меняются: здесь только классы с префиксом .ls-, классы
   чертежей .d- и .c-. Цвета и шрифты только из токенов catalog.css, поэтому
   чертежи читаются и в тёмной, и в светлой теме (data-theme).
   Базовые правила идут первыми, media-запросы в конце файла. */

/* ── Первый экран ────────────────────────────────────────────────── */
.ls-head {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 48px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.ls-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "lead" "visual";
  row-gap: 24px;
  align-items: start;
}
.ls-hero__title { grid-area: title; min-width: 0; }
.ls-hero__lead { grid-area: lead; min-width: 0; }
.ls-hero__visual { grid-area: visual; min-width: 0; }

.ls-code {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--gold-ink);
}
.ls-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  text-wrap: balance;
}
.ls-sub {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted-lt);
  max-width: 54ch;
}
.ls-price { margin-top: 16px; }
.ls-price__amount {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--gold-ink);
}
.ls-price__unit { font-size: 0.95rem; font-weight: 700; }
.ls-price__note { margin-top: 4px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.ls-hero__lead .oq-card { margin-top: 18px; }

/* ── Чертёж ──────────────────────────────────────────────────────── */
.ls-draw {
  margin: 0;
  padding: 14px 14px 16px;
  background: radial-gradient(ellipse at center, var(--bg2) 0%, var(--bg) 75%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ls-draw__cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ls-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ls-draw__note { margin-top: 8px; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.ls-legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 18px;
  counter-reset: none;
}
.ls-legend li { margin: 0; }
.ls-legend button {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 6px;
  border-radius: 4px;
  text-align: left;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--muted-lt);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.ls-legend b {
  flex: 0 0 26px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  border: 1px solid var(--border-g);
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ls-legend button:hover,
.ls-legend button.is-hi { background: var(--gold-dim); color: var(--text); }
.ls-legend button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Детали чертежа: трубы, настил, размеры, позиции */
.d-hatch { stroke: var(--muted); stroke-width: 1; opacity: 0.18; }
.d-wall { fill: none; stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.4; }
.ls-svg--mini .d-wall { stroke-opacity: 0.25; }
.d-wallcut { stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.5; }
.d-wallface { stroke: var(--muted-lt); stroke-width: 2; }
.d-win { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.4; }
.d-note { fill: var(--muted); font-family: var(--font-body); font-size: 13px; letter-spacing: 0.06em; }
.d-ground { stroke: var(--muted-lt); stroke-width: 1.6; }
.d-groundh { opacity: 0.9; }
.d-stand { stroke: var(--muted-lt); stroke-width: 3.6; stroke-linecap: butt; }
.d-ledger { stroke: var(--muted-lt); stroke-width: 2.8; }
.d-transom { stroke: var(--muted-lt); stroke-width: 3; }
.d-diag { stroke: var(--steel-ink); stroke-width: 2.2; }
.d-tie { stroke: var(--gold-ink); stroke-width: 3; }
.d-rail { stroke: var(--gold-ink); stroke-width: 2.4; }
.d-deck { fill: var(--ember-ink); opacity: 0.8; }
.d-toe { fill: var(--ember-ink); }
.d-sole { fill: var(--ember-ink); opacity: 0.55; }
.d-plate { fill: var(--text); }
.d-node { fill: var(--text); }
.d-joint { fill: var(--card); stroke: var(--text); stroke-width: 1.6; }
.d-swivel { fill: var(--card); stroke: var(--steel-ink); stroke-width: 1.8; }
.d-anchor { fill: var(--card); stroke: var(--gold-ink); stroke-width: 1.8; }
.d-anchorx { stroke: var(--gold-ink); stroke-width: 1.6; fill: none; }
.d-dowel { fill: var(--card); stroke: var(--gold-ink); stroke-width: 1.6; }
.d-tube-end { fill: var(--card); stroke: var(--muted-lt); stroke-width: 2.2; }
.d-railend { stroke: var(--gold-ink); }
.d-ext { stroke: var(--muted); stroke-width: 0.8; }
.d-dim { stroke: var(--muted-lt); stroke-width: 1; }
.d-tick { stroke: var(--muted-lt); stroke-width: 1.4; fill: none; }
.d-dimt { fill: var(--text); font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.d-dimt--s { font-size: 13px; font-weight: 600; fill: var(--muted-lt); }
.d-lead { stroke: var(--muted); stroke-width: 1; }
.d-dot { fill: var(--muted-lt); }
.d-bubble { fill: var(--card); stroke: var(--gold-ink); stroke-width: 1.6; }
.d-num { fill: var(--text); font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.ls-svg [data-pos] { transition: opacity var(--dur-base) var(--ease-out); }
.ls-svg.has-hi [data-pos]:not(.is-hi) { opacity: 0.25; }
.ls-svg .d-call.is-hi .d-bubble { fill: var(--gold); stroke: var(--gold); }
.ls-svg .d-call.is-hi .d-num { fill: var(--on-gold); }

/* Хомуты: малые чертежи */
.c-tube { fill: var(--card); stroke: var(--muted-lt); stroke-width: 2; }
.c-tube--front { fill: var(--bg2); }
.c-axis { stroke: var(--muted); stroke-width: 0.8; stroke-dasharray: 10 3 2 3; }
.c-body { fill: var(--card); stroke: var(--gold-ink); stroke-width: 2.2; }
.c-ring { fill: none; stroke: var(--gold-ink); stroke-width: 1.2; }
.c-rivet { fill: var(--gold-ink); }
.c-edge { stroke: var(--gold-ink); stroke-width: 1.2; fill: none; }
.c-bolt { fill: var(--card); stroke: var(--text); stroke-width: 1.6; }
.c-gap { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 3 2; }

/* ── Разделы ─────────────────────────────────────────────────────── */
.ls-sec { padding-block: 56px; border-top: 1px solid var(--border); }
.ls-sec--alt { background: var(--atm-band); }
.ls-sec[id], .ls-h2[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }
.ls-h2 {
  font-family: var(--font-display);
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.ls-lede { max-width: 64ch; margin-bottom: 24px; font-size: 0.92rem; line-height: 1.65; color: var(--muted-lt); }
.ls-h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.ls-grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.ls-gap { margin-top: 28px; }
.ls-note { margin-top: 12px; max-width: 64ch; font-size: 0.8rem; line-height: 1.6; color: var(--muted); }

/* Таблицы: на узком экране строка становится карточкой, без прокрутки вбок */
.ls-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; line-height: 1.5; }
.ls-table caption {
  caption-side: bottom;
  padding-top: 12px;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}
.ls-table th,
.ls-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.ls-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--border-g);
}
.ls-table tbody th { font-weight: 600; color: var(--text); }
.ls-table td { color: var(--muted-lt); }
.ls-table .ls-num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }
.ls-table .ls-ask { color: var(--muted-lt); font-weight: 600; }
.ls-table small { display: block; margin-top: 2px; font-size: 0.76rem; color: var(--muted); }

.ls-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border-g);
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-ink);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.ls-pick:hover { background: var(--gold-dim); border-color: var(--gold-ink); }
.ls-pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Хомуты: три карточки */
.ls-clamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ls-clamp {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ls-clamp__fig { margin: 0 0 12px; padding: 8px 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); }
.ls-clamp p { font-size: 0.86rem; line-height: 1.6; color: var(--muted-lt); }
.ls-clamp dl { margin: 12px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 0.82rem; line-height: 1.5; }
.ls-clamp dt { color: var(--muted); }
.ls-clamp dd { margin: 0; color: var(--text); }
.ls-clamp__foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ls-clamp__price { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--gold-ink); }

/* Документы и проектировщику */
.ls-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ls-docs li {
  position: relative;
  padding: 12px 14px 12px 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted-lt);
}
.ls-docs li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 19px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--gold-ink);
  border-radius: 2px;
}
.ls-docs b { color: var(--text); font-weight: 700; }
.ls-proj {
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--border-g);
  border-radius: var(--r-lg);
  box-shadow: inset 0 2px 0 var(--gold);
}
.ls-proj p { margin-bottom: 14px; font-size: 0.88rem; line-height: 1.6; color: var(--muted-lt); }
.ls-btn { height: auto; min-height: 48px; padding-block: 10px; text-align: center; justify-content: center; }

/* Вопросы */
.ls-faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ls-faq__item { padding: 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); }
.ls-faq__item h3 { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.ls-faq__item p { font-size: 0.88rem; line-height: 1.65; color: var(--muted-lt); }

/* Заявка в конце страницы */
.ls-end { padding-block: 56px 64px; border-top: 1px solid var(--border); background: var(--bg2); }
.ls-end__head { max-width: 640px; margin: 0 auto 24px; text-align: center; }
.ls-end__head p { font-size: 0.92rem; line-height: 1.6; color: var(--muted-lt); }
.ls-end__contacts { margin-top: 16px; text-align: center; font-size: 0.9rem; line-height: 1.6; color: var(--muted-lt); }
.ls-end__contacts a { display: inline-block; padding-block: 8px; color: var(--text); border-bottom: 1px solid var(--border); }
.ls-end__contacts a:hover { border-bottom-color: var(--gold); }
.ls-end .trust-row { margin-top: 20px; }

/* ── Media-запросы ───────────────────────────────────────────────── */
@media (max-width: 719px) {
  .ls-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .ls-table--stack,
  .ls-table--stack tbody,
  .ls-table--stack tr,
  .ls-table--stack th,
  .ls-table--stack td { display: block; width: 100%; }
  .ls-table--stack tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .ls-table--stack th,
  .ls-table--stack td { padding: 2px 0; border-bottom: 0; }
  .ls-table--stack tbody th { margin-bottom: 4px; font-size: 0.92rem; }
  .ls-table--stack td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted);
  }
  .ls-table--stack caption { display: block; }
  .ls-table--spec td { color: var(--text); }
  .ls-table--price td:last-child { padding-top: 8px; }
}
@media (max-width: 767px) {
  .ls-head { padding-top: calc(var(--nav-h) + 6px); padding-bottom: 32px; }
  .ls-head .breadcrumb { margin-bottom: 12px; }
  .ls-hero { row-gap: 18px; }
  .ls-hero__lead .oq-card { margin-top: 12px; }
  .ls-sec, .ls-end { padding-block: 44px; }
  .ls-draw { padding: 10px 8px 12px; }
}
@media (max-width: 559px) {
  /* Чертёж в 640 единиц на экране 360px мельчит подписи вдвое: номера и размеры крупнее. */
  .d-num, .d-dimt { font-size: 20px; }
  .d-dimt--s { font-size: 16px; }
}
@media (min-width: 560px) {
  .ls-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .ls-clamps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ls-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-sec { padding-block: 72px; }
}
@media (min-width: 900px) {
  .ls-grid2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; }
}
@media (min-width: 1024px) {
  .ls-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-areas: "visual title" "visual lead";
    grid-template-rows: auto 1fr;
    column-gap: 48px;
    row-gap: 0;
  }
  .ls-h1 { font-size: clamp(2rem, 3.1vw, 2.7rem); }
  .ls-hero__lead .oq-card { margin-top: 16px; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .ls-head { padding-top: calc(var(--nav-h) + 18px); }
  .ls-head .breadcrumb { margin-bottom: 12px; }
  .ls-sub { font-size: 0.9rem; line-height: 1.55; }
  .ls-price { margin-top: 10px; }
  .ls-hero__lead .oq-card { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ls-svg [data-pos], .ls-legend button, .ls-pick { transition: none; }
}
