/* ============================================================
   components.css — Sibpipe.ru
   Кнопки, бейджи, карточки, секции, пагинация, виджеты
   ============================================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 20px;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 7px;
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color .2s cubic-bezier(.37,0,.63,1),
              border-color .2s cubic-bezier(.37,0,.63,1);
  -webkit-user-select: none;
  user-select: none;
}

/* Ripple circle — expands from cursor entry point */
.btn::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: var(--btn-ripple-size, 300px);
  height: var(--btn-ripple-size, 300px);
  left: var(--btn-ripple-x, 50%);
  top: var(--btn-ripple-y, 50%);
  transform: translate3d(-50%, -50%, 0) scale(0);
  transform-origin: center;
  transition: transform .4s cubic-bezier(.37,0,.63,1);
  background-color: var(--btn-ripple-color, var(--color-primary));
  z-index: 0;
  pointer-events: none;
}

.btn.is-hovered::after {
  transform: translate3d(-50%, -50%, 0) scale(1.5);
}

/* JS wraps text nodes in this span so text stacks above the ripple */
.btn__inner {
  position: relative;
  z-index: 1;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary: синий фон → белый круг при наведении, текст меняется на синий */
.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  --btn-ripple-color: white;
}

.btn-primary.is-hovered {
  color: var(--color-primary);
}

/* Secondary: контурная с синей рамкой */
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
  --btn-ripple-color: var(--color-primary);
}

.btn-secondary.is-hovered {
  color: white;
}

/* Default: серая рамка, синий текст → синий ripple, белый текст (как на 24ist.ru) */
.btn-default {
  background: transparent;
  color: var(--color-primary);
  border-color: #a9adb9;
  --btn-ripple-color: var(--color-primary);
}

.btn-default.is-hovered {
  color: white;
  border-color: var(--color-primary);
}

.btn-default .btn__icon::before {
  background-color: #a9adb9;
}

.btn-default.is-hovered .btn__icon::before {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Accent (same as primary) */
.btn-accent {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  font-weight: 600;
  --btn-ripple-color: white;
}

.btn-accent.is-hovered {
  color: var(--color-primary);
}

/* Ghost: без рамки → светлый круг при наведении */
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
  --btn-ripple-color: var(--color-bg-alt);
}

.btn-ghost.is-hovered {
  color: var(--color-primary);
  border-color: var(--color-text-light);
}

/* ---- Split button: btn__text + btn__icon с разделительной линией ---- */
.btn-split {
  padding: 0;
  gap: 0;
  align-items: stretch;
}

/* Текстовая часть */
.btn__text {
  padding: 14px 20px;
  position: relative;
  z-index: 2;
  flex-grow: 1;
}

.btn-lg .btn__text {
  padding: 13px 20px;
}

.btn-sm .btn__text {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

/* Иконная часть — разделена 1px линией */
.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.btn-lg .btn__icon {
  padding: 0 15px;
}

/* Разделительная линия (1px вертикаль) */
.btn__icon::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: #a9adb9;
  transition: background-color .2s cubic-bezier(.37,0,.63,1);
}

/* SVG наследует цвет кнопки через currentColor */
.btn__icon svg [stroke] {
  stroke: currentColor;
  transition: stroke .2s cubic-bezier(.37,0,.63,1);
}
.btn__icon svg [fill]:not([fill="none"]) {
  fill: currentColor;
  transition: fill .2s cubic-bezier(.37,0,.63,1);
}

/* Цвет линии для разных вариантов кнопок */
.btn-primary .btn__icon::before {
  background-color: rgba(255, 255, 255, 0.3);
}
.btn-secondary.is-hovered .btn__icon::before,
.btn-ghost.is-hovered .btn__icon::before {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Size modifiers */
.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  border-radius: 5px;
}

.btn-sm .btn__icon-box {
  width: 28px;
  border-radius: 3px;
  margin: 3px 3px 3px 8px;
}

.btn-lg {
  padding: 13px 20px;
  font-size: 0.9375rem;
}

/* Full width modifier */
.btn-block {
  width: 100%;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Water — blue */
.badge-water {
  background: rgba(21, 51, 232, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(21, 51, 232, 0.18);
}

/* Gas — yellow/amber */
.badge-gas {
  background: rgba(232, 168, 56, 0.15);
  color: var(--color-badge-gas-text);
  border: 1px solid rgba(232, 168, 56, 0.3);
}

/* Standard / GOST — green */
.badge-standard {
  background: rgba(56, 161, 105, 0.1);
  color: var(--color-badge-success);
  border: 1px solid rgba(56, 161, 105, 0.2);
}

/* New / Новинка */
.badge-new {
  background: rgba(229, 62, 62, 0.1);
  color: var(--color-badge-danger);
  border: 1px solid rgba(229, 62, 62, 0.2);
}

/* SDR label */
.badge-sdr {
  background: rgba(21, 51, 232, 0.06);
  color: var(--color-primary);
  border: 1px solid rgba(21, 51, 232, 0.15);
}

/* Warning / переходный период */
.badge-warning {
  background: rgba(214, 158, 46, 0.12);
  color: var(--color-badge-gas-text);
  border: 1px solid rgba(214, 158, 46, 0.30);
}

/* ---- Specs Block (характеристики в стиле карточки 24ist.ru) ---- */
.specs-block {
  border: 1px solid rgba(56, 85, 171, 0.14);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--color-bg);
}

.specs-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(56, 85, 171, 0.1);
  background: #fafbff;
}

.specs-block__prefix {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

.specs-block__caption {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.specs-block__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #eef0f7;
}

.specs-block__row:last-child {
  border-bottom: none;
}

.specs-block__cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 20px;
}

.specs-block__cell + .specs-block__cell {
  border-left: 1px solid #eef0f7;
}

.specs-block__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.specs-block__value {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--color-primary);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.specs-block__value--sm {
  font-size: 0.8125rem;
}

@media (max-width: 480px) {
  .specs-block__row {
    grid-template-columns: 1fr;
  }

  .specs-block__cell + .specs-block__cell {
    border-left: none;
    border-top: 1px solid #eef0f7;
  }
}

/* ---- Transitional notice block ---- */
.transitional-notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(214, 158, 46, 0.40);
  border-left: 4px solid var(--color-warning);
  background: rgba(214, 158, 46, 0.08);
  color: var(--color-text);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.transitional-notice p {
  margin: 6px 0 0;
}

/* ---- ПЭ80 notice ---- */
.pe80-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-left: 4px solid var(--color-danger);
  background: rgba(220, 38, 38, 0.04);
  color: var(--color-text);
  font-size: 0.875rem;
  margin: 1.25rem 0;
}

.pe80-notice__icon {
  flex-shrink: 0;
  color: var(--color-danger);
  margin-top: 1px;
}

.pe80-notice__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pe80-notice__body p {
  margin: 0;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Подсветка строк ПЭ80 в таблицах */
tr.row-pe80 td {
  color: var(--color-text-light);
}

tr.row-pe80 td:first-child::before {
  content: '⚠ ';
  color: var(--color-danger);
  font-size: 0.75em;
}

/* ---- Cards ---- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 180ms ease-out;
}

@media (hover: hover) {
  .card:hover {
    border-color: var(--color-primary);
  }
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.card__text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ---- Pipe Card ---- */
.pipe-card {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  transition: border-color 180ms ease-out;
}

@media (hover: hover) {
  .pipe-card:hover {
    border-color: var(--color-primary);
    text-decoration: none;
  }
}

.pipe-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pipe-card__diameter {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-text);
  line-height: 1;
}

.pipe-card__diameter-unit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-light);
  margin-left: 2px;
}

.pipe-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.pipe-card__spec {
  display: flex;
  flex-direction: column;
}

.pipe-card__spec-label {
  font-size: 0.6875rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.pipe-card__spec-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.pipe-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.pipe-card__weight {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* ---- Category Intro ---- */
.category-intro {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.category-intro__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.category-intro__text {
  font-size: 0.9375rem;
  color: var(--color-text);
  margin: 0;
}

/* ---- Hero Section ---- */
.hero-section {
  background: #FFFFFF;
  color: var(--color-text);
  min-height: calc(88vh - var(--header-height));  /* fallback */
  min-height: calc(88svh - var(--header-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Decorative concentric arcs — right side */
.hero-section::before {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  border: 1px solid rgba(21, 51, 232, 0.08);
  border-radius: 50%;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  width: 1200px;
  height: 1200px;
  border: 1px solid rgba(21, 51, 232, 0.04);
  border-radius: 50%;
  top: 50%;
  right: -400px;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Two-column hero layout */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pipe-svg {
  width: 100%;
  max-width: 360px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9.5rem);
  font-weight: 400;
  color: var(--color-text);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.hero-title span {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  color: var(--color-text-light);
  max-width: 520px;
  margin: 0;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat__value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  line-height: 1;
}

.hero-stat__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  line-height: 1.4;
  margin-top: 2px;
}

/* ---- Home page sections ---- */
.home-section {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}

/* ---- Features Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.feature-item__icon {
  width: 40px;
  height: 40px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.feature-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

.feature-item__text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.6;
}

/* ---- Section Title ---- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 24px;
  padding-bottom: 0;
  position: relative;
}

.section-title::after {
  display: none;
}

/* // label tag utility */
.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  line-height: 1;
}

.label-tag::before {
  content: "//";
  opacity: 0.4;
  margin-right: 2px;
  letter-spacing: 0;
  font-weight: 700;
}

/* ---- Sidebar ---- */
.sidebar {
  min-width: 0;
  margin-bottom: 12px;
}

/* ── sb-nav: диаметры с pill-сеткой ── */
.sb-nav {
  border: 1px solid rgba(56, 85, 171, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-bg);
  margin-bottom: 12px;
}

.sb-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafbff;
  border-bottom: 1px solid rgba(56, 85, 171, 0.1);
}

.sb-nav__prefix {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

.sb-nav__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.sb-nav__group {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(56, 85, 171, 0.07);
}

.sb-nav__group--last {
  border-bottom: none;
}

.sb-nav__group-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.sb-nav__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sb-nav__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--color-primary);
  border: 1px solid rgba(56, 85, 171, 0.22);
  border-radius: 20px;
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
  line-height: 1;
}

.sb-nav__pill:hover,
.sb-nav__pill.is-active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* ── sb-tools: инструменты-карточки ── */
.sb-tools {
  border: 1px solid rgba(56, 85, 171, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-bg);
}

.sb-tools__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafbff;
  border-bottom: 1px solid rgba(56, 85, 171, 0.1);
}

.sb-tools__prefix {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

.sb-tools__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.sb-tools__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(56, 85, 171, 0.07);
  text-decoration: none;
  transition: background 150ms ease;
}

.sb-tools__item--last {
  border-bottom: none;
}

.sb-tools__item:hover {
  background: rgba(56, 85, 171, 0.04);
  text-decoration: none;
}

.sb-tools__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(56, 85, 171, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background 150ms ease;
}

.sb-tools__item:hover .sb-tools__icon {
  background: var(--color-primary);
  color: white;
}

.sb-tools__text {
  flex: 1;
  min-width: 0;
}

.sb-tools__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.sb-tools__desc {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 2px;
  line-height: 1.3;
}

.sb-tools__arrow {
  flex-shrink: 0;
  color: var(--color-text-light);
  opacity: 0.5;
  transition: opacity 150ms ease, transform 150ms ease, color 150ms ease;
}

.sb-tools__item:hover .sb-tools__arrow {
  opacity: 1;
  color: var(--color-primary);
  transform: translateX(2px);
}

/* ── sb-cta: CTA-блок с градиентом ── */
.sb-cta {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #1a2f7a 0%, #3855AB 55%, #4f6ed4 100%);
  color: white;
}

.sb-cta__glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.sb-cta__inner {
  position: relative;
  z-index: 1;
  padding: 22px 20px 20px;
}

.sb-cta__prefix {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.sb-cta__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  line-height: 1.3;
}

.sb-cta__text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
  margin-bottom: 18px;
}

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

.sb-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-main);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  background: white;
  color: var(--color-primary);
  border: none;
}

.sb-cta__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  text-decoration: none;
  color: var(--color-primary);
}

.sb-cta__btn--outline {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.sb-cta__btn--outline:hover {
  background: rgba(255,255,255,0.2);
  color: white;
  box-shadow: none;
}

/* Старые классы sidebar-widget — оставляем для совместимости */
.sidebar-widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.sidebar-widget__title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-widget ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-widget li a {
  display: block;
  padding: 6px 8px;
  font-size: 0.875rem;
  color: var(--color-text);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.sidebar-widget li a:hover {
  background: white;
  color: var(--color-secondary);
  text-decoration: none;
}

/* ---- Tag List ---- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 150ms ease-out, color 150ms ease-out,
              border-color 150ms ease-out;
}

.tag:hover {
  background: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary);
  text-decoration: none;
}

/* ---- Comparison Widget ---- */
.comparison-widget {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
  background: var(--color-bg-alt);
}

.comparison-widget__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.comparison-widget__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--color-text-light);
  font-size: 0.875rem;
  text-align: center;
  gap: 8px;
}

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

.comparison-widget__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.comparison-widget__item-name {
  font-weight: 500;
  color: var(--color-text);
}

.comparison-widget__item-remove {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}

.comparison-widget__item-remove:hover {
  background: rgba(229, 62, 62, 0.1);
  color: var(--color-danger);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 24px 0;
}

.pagination__link,
.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
}

.pagination__link:hover,
.pagination__page:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  text-decoration: none;
}

.pagination__page--current,
.pagination__page[aria-current="page"] {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  cursor: default;
}

.pagination__page--current:hover {
  background: var(--color-primary);
  color: white;
}

.pagination__dots {
  font-size: 0.875rem;
  color: var(--color-text-light);
  padding: 0 4px;
}

.pagination__prev,
.pagination__next {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- Product Grid (pipe cards grid) ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ---- Section with top border accent ---- */
.section-block {
  margin: 32px 0;
}

.section-block + .section-block {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

/* ---- Loading Skeleton ---- */
.skeleton {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--color-skeleton-mid) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% { transform: translateX(200%); }
}

/* ---- Spec Item (inline key-value) ---- */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  padding: 4px 0;
  border-bottom: 1px dashed var(--color-border);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-item__label {
  flex: 0 0 auto;
  min-width: 140px;
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.spec-item__value {
  flex: 1;
  font-weight: 500;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* ---- Accordion (generic, used in guides) ---- */
.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-item summary {
  padding: 14px 16px;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.accordion-item[open] summary {
  background: var(--color-bg);
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}

.accordion-item__body {
  padding: 16px;
  font-size: 0.9375rem;
  color: var(--color-text);
}

/* ---- Steps List (montazh / how-to) ---- */
.steps-list {
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.step-item {
  counter-increment: steps;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-item::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-item__content {
  flex: 1;
}

.step-item__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.step-item__text {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ============================================================
   HOMEPAGE — уникальные секции
   ============================================================ */

/* ---- Scroll Animations ---- */
.anim-fade,
.anim-slide-up,
.anim-scale {
  opacity: 0;
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.anim-slide-up {
  transform: translateY(28px);
}

.anim-scale {
  transform: scale(0.95) translateY(16px);
}

.anim-fade.is-visible,
.anim-slide-up.is-visible,
.anim-scale.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 56px 0 48px;
  overflow: hidden;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 110% 50%, rgba(56, 85, 171, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__label {
  margin-bottom: 16px;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 16px;
}

.page-hero__title em {
  font-style: normal;
  color: var(--color-primary);
}

.page-hero__desc {
  font-size: 1.0625rem;
  color: var(--color-text-light);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.page-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.page-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-hero__stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
}

.page-hero__stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  font-weight: 500;
}

/* ---- Blog Cards ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.blog-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(56, 85, 171, 0.10);
  transform: translateY(-2px);
}

.blog-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.blog-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  margin: 0;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.blog-card__meta {
  font-size: 0.8rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.blog-card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-light);
}

/* ---- Method Cards (installation pages) ---- */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.method-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.method-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(56, 85, 171, 0.09);
}

.method-card:hover::before {
  opacity: 1;
}

.method-card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-border);
  letter-spacing: -0.02em;
}

.method-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.method-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.method-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.method-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(56, 85, 171, 0.07);
  color: var(--color-primary);
  border: 1px solid rgba(56, 85, 171, 0.15);
}

/* ---- Tool Cards ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.tool-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(56, 85, 171, 0.10);
  transform: translateY(-2px);
}

.tool-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(56, 85, 171, 0.06);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background 0.2s ease;
}

.tool-card:hover .tool-card__icon {
  background: rgba(56, 85, 171, 0.12);
}

.tool-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: var(--color-text);
}

.tool-card__title a {
  color: inherit;
  text-decoration: none;
}

.tool-card__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.tool-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

/* ---- GOST / Standards Cards ---- */
.gost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.gost-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.gost-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(56, 85, 171, 0.09);
  text-decoration: none;
}

.gost-card__number {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.2;
}

.gost-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
}

.gost-card__desc {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.gost-card__footer {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---- Comparison Cards ---- */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

/* Вся карточка — одна ссылка: крупная цель клика, без вложенных <a> */
.comparison-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.comparison-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 6px 20px rgba(56, 85, 171, 0.09);
  transform: translateY(-2px);
  text-decoration: none;
}

.comparison-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  text-decoration: none;
}

/* Заголовок-сопоставление «A vs B»: «vs» приглушён и уменьшен */
.comparison-card__vs {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.comparison-card__vs i {
  font-style: normal;
  font-weight: 500;
  font-size: 0.72em;
  color: var(--color-text-light);
  padding: 0 0.12em;
  vertical-align: 0.06em;
}

.comparison-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

/* CTA — минимальная текст-ссылка со стрелкой, не кнопка «Купить» */
.comparison-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

.comparison-card__cta svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.comparison-card:hover .comparison-card__cta svg {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .comparison-card:hover { transform: none; }
  .comparison-card__cta svg,
  .comparison-card:hover .comparison-card__cta svg { transition: none; transform: none; }
}

/* ---- Info Block (highlighted note) ---- */
.info-block {
  background: rgba(56, 85, 171, 0.04);
  border: 1px solid rgba(56, 85, 171, 0.12);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 32px 0;
}

.info-block h2,
.info-block h3 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ---- Quick Info Bar (product page) ---- */
.quick-info-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  margin: 24px 0;
}

.quick-info-card {
  padding: 20px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.quick-info-card:nth-child(3n) {
  border-right: none;
}

.quick-info-card:nth-last-child(-n+3) {
  border-bottom: none;
}

.quick-info-card .label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

.quick-info-card .value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

/* ---- Section separator ---- */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 48px 0;
}

/* ---- Content sections (article-level) ---- */
.content-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.content-section:first-child {
  border-top: none;
  padding-top: 0;
}

.content-section h2 {
  margin-top: 0;
}

/* SVG pipe draw animation */
.pipe-ring {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.pipe-ring--outer {
  stroke: var(--color-border);
  stroke-width: 0.5;
}

.pipe-ring--wall {
  stroke: var(--color-primary);
  stroke-width: 28;
  stroke-opacity: 0.10;
  transition-delay: 0.1s;
}

.pipe-ring--inner {
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-opacity: 0.6;
  transition-delay: 0.2s;
}

.pipe-ring.is-drawn {
  stroke-dashoffset: 0;
}

/* ---- HERO ---- */
.hp-hero {
  min-height: calc(100vh - var(--header-height));  /* fallback */
  min-height: calc(100svh - var(--header-height)); /* без перекрытия мобильным chrome */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.hp-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  color: rgba(21, 51, 232, 0.07);
}

.hp-hero__arc {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 70vw;
  height: 70vw;
  max-width: 800px;
}

.hp-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

.hp-hero__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hp-hero__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

.hp-hero__line {
  display: block;
}

.hp-hero__line--accent {
  color: var(--color-primary);
}

.hp-hero__sub {
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  color: var(--color-text-light);
  line-height: 1.65;
  max-width: 480px;
  margin: 0;
}

.hp-hero__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.hp-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-pipe-svg {
  width: 100%;
  max-width: 380px;
}

.hp-hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-light);
  animation: bounce 2s ease-in-out infinite;
  text-decoration: none;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ---- STATS — тёмная секция ---- */
.hp-stats {
  background: var(--color-text);
  padding: 0;
}

.hp-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hp-stat {
  padding: 56px 40px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-stat:last-child {
  border-right: none;
}

.hp-stat__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: white;
  line-height: 1;
}

.hp-stat__label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
}

/* ---- ПРИМЕНЕНИЕ — большие блоки ---- */
.hp-apps {
  /* stacked full-width blocks */
}

.hp-app {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  border-bottom: 1px solid var(--color-border);
}

.hp-app:nth-child(even) .hp-app__visual {
  order: -1;
}

.hp-app__content {
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hp-app__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

.hp-app__desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-light);
  max-width: 440px;
  margin: 0;
}

.hp-app__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-app__count {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.hp-app__sdrs {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  letter-spacing: 0.01em;
}

.hp-app__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  position: relative;
}

.hp-app--water  .hp-app__visual { background: #EFF6FF; }
.hp-app--gas    .hp-app__visual { background: #FFFBEB; }
.hp-app--heat   .hp-app__visual { background: #FFF7ED; }
.hp-app--cable  .hp-app__visual { background: #F5F3FF; }

.hp-app__svg {
  width: 100%;
  max-width: 280px;
}

.hp-app--water  .app-ring { stroke: #1D4ED8; }
.hp-app--gas    .app-ring { stroke: #B45309; }
.hp-app--heat   .app-ring { stroke: #C2410C; }
.hp-app--cable  .app-ring { stroke: #7C3AED; }

.app-ring {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.app-ring--glow {
  stroke-width: 0.5;
  opacity: 0.3;
  transition-delay: 0s;
}

.app-ring {
  stroke-width: 22;
  opacity: 0.15;
  transition-delay: 0.15s;
}

.app-ring--inner {
  stroke-width: 1.5;
  opacity: 0.5;
  transition-delay: 0.3s;
}

.is-visible .app-ring {
  stroke-dashoffset: 0;
}

/* ---- ДИАМЕТРЫ ---- */
.hp-diameters {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}

.hp-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hp-section-head .section-title {
  margin-bottom: 0;
  flex: 1;
}

.hp-section-head__link {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.hp-section-head__link:hover {
  text-decoration: underline;
}

.hp-diameters__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hp-diam-card {
  background: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 160ms ease-out;
  position: relative;
}

@media (hover: hover) {
  .hp-diam-card:hover {
    background: rgba(21, 51, 232, 0.04);
    text-decoration: none;
  }
}

.hp-diam-card__d {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--color-text);
}

.hp-diam-card__unit {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hp-diam-card__specs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.hp-diam-card__arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1rem;
  color: var(--color-primary);
  opacity: 0;
  transition: opacity 160ms ease-out;
}

@media (hover: hover) {
  .hp-diam-card:hover .hp-diam-card__arrow {
    opacity: 1;
  }
}

/* ---- ИНСТРУМЕНТЫ ---- */
.hp-tools {
  padding: 80px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hp-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hp-tool-card {
  background: #fff;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 160ms ease-out;
}

@media (hover: hover) {
  .hp-tool-card:hover {
    background: rgba(21, 51, 232, 0.03);
    text-decoration: none;
  }
}

.hp-tool-card__icon {
  color: var(--color-primary);
  width: 36px;
  height: 36px;
}

.hp-tool-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

.hp-tool-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.hp-tool-card__cta {
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ---- СТАНДАРТЫ ---- */
/* ---- Секция ГОСТ (slider layout как на 24ist.ru) ---- */
.hp-gosts {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}

.hp-gosts__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Левая колонка */
.hp-gosts__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding-right: 40px;
}

.hp-gosts__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--color-text);
  margin: 12px 0 0;
}

.hp-gosts__count {
  font-size: 0.45em;
  font-weight: 400;
  color: var(--color-text-light);
  vertical-align: super;
  letter-spacing: 0;
}

/* Кнопки навигации */
.hp-gosts__controls {
  display: flex;
  gap: 8px;
}

.hp-gosts__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
  flex-shrink: 0;
}

.hp-gosts__btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(56, 85, 171, 0.05);
}

.hp-gosts__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Правая колонка — слайдер */
.hp-gosts__right {
  overflow: hidden;
}

.hp-gosts__track {
  display: flex;
  gap: 12px;
  transition: transform .45s cubic-bezier(.37,0,.63,1);
  will-change: transform;
}

/* Карточка ГОСТ */
.hp-gost-card {
  flex: 0 0 calc(33.333% - 8px);
  min-width: 0;
  background: #f4f4f5;
  border-radius: 7px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  transition: background .2s ease;
  min-height: 180px;
}

.hp-gost-card:hover {
  background: #ecedf0;
  text-decoration: none;
}

.hp-gost-card__num {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.hp-gost-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

.hp-gost-card__scope {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-top: auto;
}

/* ──────────────────────────────────────────────────────────────────────────
   .gost-switch — переключатель между аналогами по разным ГОСТам
   ────────────────────────────────────────────────────────────────────────── */
.gost-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(56, 85, 171, 0.04) 0%, rgba(56, 85, 171, 0.08) 100%);
  border: 1px solid rgba(56, 85, 171, 0.18);
  border-radius: 10px;
  font-size: 0.875rem;
}

.gost-switch__label {
  color: var(--color-text-light);
  font-weight: 500;
}

.gost-switch__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease;
}

.gost-switch__link:hover {
  color: #1e3480;
  text-decoration: none;
}

.gost-switch__link svg {
  transition: transform 200ms ease;
}

.gost-switch__link:hover svg {
  transform: translateX(2px);
}

/* ──────────────────────────────────────────────────────────────────────────
   Отступы между секциями на странице товара и категориях
   ────────────────────────────────────────────────────────────────────────── */
.page-main > section + section,
.page-main > .anim-fade + .anim-fade,
.page-main > section + .anim-fade,
.page-main > .anim-fade + section {
  margin-top: 40px;
}

.page-main > section > h2:first-child,
.page-main > section > .label-tag:first-child + h2 {
  margin-top: 0;
}

.expert-content p,
.category-faq p {
  margin: 0 0 14px;
  line-height: 1.65;
}

.expert-content p:last-child,
.category-faq p:last-child {
  margin-bottom: 0;
}

.expert-content h2,
.category-faq h2 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.expert-content h2:first-child,
.category-faq h2:first-child {
  margin-top: 0;
}

/* ---- Уведомление об условиях транспортировки бухт (над таблицей малотоннажных машин) ---- */
.loading-transport-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-left: 4px solid var(--color-warning);
  background: rgba(217, 119, 6, 0.04);
  color: var(--color-text);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.loading-transport-notice__icon {
  flex-shrink: 0;
  color: var(--color-warning);
  margin-top: 1px;
}

.loading-transport-notice__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loading-transport-notice__body p {
  margin: 0;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ---- Значок «открытый верх» в первом столбце таблицы малотоннажных машин ---- */
.open-top-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-warning);
  cursor: default;
  position: relative;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Tooltip рендерится через JS в <body> — см. main.js */
.open-top-tooltip {
  position: absolute;
  background: #1e293b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 400;
  width: 300px;
  line-height: 1.5;
  z-index: 300; /* ярус тултипов — выше шапки/поиска (200) */
  white-space: normal;
  text-align: left;
  pointer-events: none;
}

/* ── Vehicle spec cards (под таблицей малотоннажных машин) ─────────────────── */
.vehicle-specs {
  margin-top: 1.5rem;
}

.vehicle-specs__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-bottom: 10px;
  display: block;
}

.vehicle-specs__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.veh-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.veh-card__name {
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.25;
  color: var(--color-text);
}

.veh-card__capacity {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.veh-card__capacity-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

.veh-card__capacity-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  line-height: 1;
}

.veh-card__dims {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.veh-card__dim {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
}

.veh-card__dim dt {
  font-size: 0.6875rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

.veh-card__dim dd {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.veh-card__dim--open-top dt,
.veh-card__dim--open-top dd {
  color: var(--color-warning);
}

.vehicle-specs__note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .vehicle-specs__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .vehicle-specs__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════════
   Калькулятор загрузки — общий (ci = cargo-input)
   ══════════════════════════════════════════════════════════════ */

/* ── Вводный текст ───────────────────────────────────────────── */
.ci-intro {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

/* ── Форма ввода ─────────────────────────────────────────────── */
.ci-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 32px;
}

/* ── Секция ──────────────────────────────────────────────────── */
.ci-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px 22px;
}

.ci-section--inline {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.ci-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ci-section__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

/* ── Кнопка добавления строки ────────────────────────────────── */
.ci-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-main);
  color: var(--color-primary);
  background: rgba(56, 85, 171, 0.07);
  border: 1px solid rgba(56, 85, 171, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
  white-space: nowrap;
}
.ci-add-btn:hover {
  background: rgba(56, 85, 171, 0.13);
  border-color: rgba(56, 85, 171, 0.45);
}

/* ── Таблица заказа ──────────────────────────────────────────── */
.ci-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ci-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  white-space: nowrap;
}

.ci-order-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
}

.ci-order-table td {
  padding: 5px 6px;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}

.ci-order-table tr:last-child td { border-bottom: none; }

/* Мобиле: строка заказа не скроллится, а раскладывается карточкой в несколько рядов.
   Ничего не прячем — поля переносятся; заголовки колонок берём из data-label. */
@media (max-width: 640px) {
  .ci-table-wrap { overflow-x: visible; }
  .ci-order-table { white-space: normal; }
  .ci-order-table thead { display: none; }
  .ci-order-table tbody { display: block; }

  .ci-order-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    position: relative;
  }

  .ci-order-table td {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: none;
    min-width: 0;
  }

  .ci-order-table td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
  }

  /* Назначение и Масса — во всю ширину карточки */
  .ci-order-table td[data-label="Назначение"],
  .ci-order-table td.row-mass { grid-column: 1 / -1; }

  .ci-order-table .ci-select,
  .ci-order-table .ci-input { width: 100%; }

  /* Масса — лейбл слева, значение справа в строку */
  .ci-order-table td.row-mass {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-variant-numeric: tabular-nums;
  }

  /* Кнопка удаления — в правый верхний угол карточки */
  .ci-order-table td.ci-cell-del {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0;
  }
  .ci-order-table td.ci-cell-del::before { display: none; }
  .ci-order-table .ci-del-btn { width: 34px; height: 34px; }
}

/* ── Элементы управления внутри таблицы ─────────────────────── */
.ci-select,
.ci-input {
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: max(16px, 0.875rem); /* ≥16px — не даёт iOS Safari зумить viewport при фокусе */
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 150ms, box-shadow 150ms;
  min-width: 0;
}

.ci-select:focus,
.ci-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(56, 85, 171, 0.12);
}

.ci-input {
  background-image: none;
  padding-right: 10px;
  width: 90px;
}

.ci-cell-mass {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  min-width: 80px;
}

.ci-cell-del { width: 32px; text-align: center; }

.ci-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  color: var(--color-text-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 150ms, background 150ms;
}
.ci-del-btn:hover {
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.08);
}

/* ── Футер секции с кнопкой расчёта ──────────────────────────── */
.ci-section__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  margin-bottom: 4px;
}

.ci-footer-hint {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.4;
}

#truckResults:not(:empty) { margin-top: 24px; }
#costResults:not(:empty)  { margin-top: 18px; }

/* ── Расстояние доставки ─────────────────────────────────────── */
.ci-dist-group {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.ci-dist-field {
  display: flex;
  flex-direction: column;
}

.ci-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.ci-label__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-light);
  cursor: default;
  position: relative;
}

.ci-label__hint:hover::after,
.ci-label__hint:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  line-height: 1.5;
  width: 280px;
  white-space: normal;
  text-transform: none;
  letter-spacing: 0;
  z-index: 300; /* ярус тултипов — выше шапки/поиска (200) */
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.ci-input--dist {
  padding: 9px 12px;
  font-size: 1rem;
  min-width: 140px;
  background-image: none;
  width: 160px;
}

.ci-dist-hint {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 5px;
  line-height: 1.4;
}

.ci-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-bottom: 4px;
}

/* ── Результаты ──────────────────────────────────────────────── */
.ci-results {
  margin-bottom: 40px;
}

.ci-empty,
.ci-warning {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  padding: 24px 20px;
  text-align: center;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.ci-warning { color: var(--color-warning); }

/* ── Пометка малотоннажный транспорт ────────────────────────── */
.ci-small-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(217, 119, 6, 0.07);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.ci-small-note svg { color: var(--color-warning); flex-shrink: 0; margin-top: 2px; }

.ci-small-note--warn {
  border-color: rgba(217, 119, 6, 0.45);
  background: #FFFBEB;
}

.ci-truck__open {
  color: var(--color-warning);
  font-weight: 600;
}

.ci-cost-small {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin: 10px 2px 0;
  line-height: 1.5;
}

/* ── KPI карточки ────────────────────────────────────────────── */
.ci-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.ci-kpi {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ci-kpi--accent {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(56, 85, 171, 0.12);
}

.ci-kpi__num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: 0.02em;
}

.ci-kpi--accent .ci-kpi__num { color: var(--color-primary); }

.ci-kpi__unit {
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text-light);
  font-weight: 400;
}

.ci-kpi__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-light);
  margin-top: 4px;
}

.ci-kpi__sub {
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.35;
}

/* ── Визуальный план ─────────────────────────────────────────── */
.ci-plan {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.ci-plan__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.ci-plan__svg {
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.ci-plan__note {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 8px;
  text-align: center;
}

/* ── Карточки фур (до 10 шт, два вида на фуру) ──────────────── */
.ci-trucks {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ci-truck {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ci-truck__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.ci-truck__num {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.ci-truck__of {
  font-weight: 400;
  color: var(--color-text-light);
}

.ci-truck__meta {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
}

/* ── Расшифровка содержимого машины ── */
.ci-truck__manifest {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.ci-truck__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ci-truck__line {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-text);
}

.ci-truck__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ci-truck__qty { font-weight: 600; }
.ci-truck__nest {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

.ci-truck__pipe {
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ci-truck__m {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-light);
  white-space: nowrap;
}

.ci-truck__totals {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.ci-truck__views {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 8px;
  padding: 12px;
  align-items: center;
}

.ci-truck__view {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.ci-truck__view svg {
  width: 100%;
  height: auto;
  display: block;
}

.ci-truck__view--rear svg { max-width: 380px; }
.ci-truck__view--side svg { max-width: 640px; }

/* Форк B (mobile): длинный боковой вид кузова НЕ ужимаем до нечитаемых кружков —
   держим легибельную высоту, длину листаем по горизонтали внутри рамки.
   Обрезанный правый край кузова служит естественным индикатором прокрутки. */
@media (max-width: 640px) {
  .ci-truck__view--side {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ci-truck__view--side svg {
    width: auto;
    max-width: none;
    height: clamp(120px, 34vw, 160px);
  }
  /* тонкий скролл-бар как явный сигнал прокрутки */
  .ci-truck__view--side::-webkit-scrollbar { height: 4px; }
  .ci-truck__view--side::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
  }
}

.ci-trucks-rest {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin: 12px 0 0;
  text-align: center;
}

/* ── Разбивка по позициям ────────────────────────────────────── */
.ci-breakdown {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.ci-breakdown__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.ci-pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ci-pos-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-light);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.ci-pos-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.ci-pos-table tr:last-child td { border-bottom: none; }

/* ── Детали расчёта ──────────────────────────────────────────── */
.ci-detail {
  margin-bottom: 20px;
}

.ci-detail details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.ci-detail summary {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
  list-style: none;
  user-select: none;
}
.ci-detail summary::-webkit-details-marker { display: none; }

.ci-detail__body {
  padding: 0 18px 14px;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  line-height: 1.6;
  border-top: 1px solid var(--color-border);
}
.ci-detail__body p { margin: 8px 0 0; }

/* ── Справочная секция ───────────────────────────────────────── */
.ci-help {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-top: 8px;
}

.ci-help h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.ci-help h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-light);
  margin: 22px 0 10px;
}

.ci-help h3:first-of-type { margin-top: 0; }

.ci-help > p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

.ci-help__list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.ci-help__list dt {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
  margin-bottom: 2px;
}

.ci-help__list dd {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ci-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ci-summary { grid-template-columns: 1fr 1fr; }
  .ci-section--inline { flex-direction: column; align-items: stretch; }
  .ci-kpi__num { font-size: 1.75rem; }
  .ci-section { padding: 14px 14px 16px; }

  .ci-pos-table th:first-child,
  .ci-pos-table td:first-child { display: none; }

  .ci-truck__views { grid-template-columns: minmax(0, 1fr); }
  .ci-section__footer .btn { width: 100%; justify-content: center; }
  .ci-dist-group { align-items: stretch; flex-direction: column; }
  .ci-dist-group .btn { width: 100%; justify-content: center; }

  /* touch-таргеты ≥44px */
  .ci-select,
  .ci-input,
  .ci-add-btn { min-height: 44px; }
}

@media (max-width: 480px) {
  .ci-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ci-input--dist { width: 130px; }
}


/* ═══════════════════════════════════════════════════════════════
   МОНТАЖ — раздел /montazh/ (Instrument Panel)
   ═══════════════════════════════════════════════════════════════ */
.mzh { padding-top: var(--space-2xl); padding-bottom: var(--space-3xl); }

.mzh-section { margin-top: var(--space-3xl); }
.mzh-section:first-child { margin-top: 0; }

.mzh-h2 {
  font-size: clamp(1.3rem, 1rem + 1.3vw, 1.5rem); /* fluid: плавно между мобилой и десктопом */
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 14px;
  color: var(--color-text);
}
.mzh-h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.mzh-lead {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-light);
  max-width: 74ch;
  margin: 0 0 22px;
}
.mzh-lead strong { color: var(--color-text); font-weight: 600; }
.mzh-note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin: 14px 0 0;
}

/* ── Таблица характеристик (паттерн 24ist.ru) ──
   key → value: серый лейбл слева, синий value справа, тонкая рамка #A9ADB9,
   строки-разделители, моноширинный uppercase. */
.characteristics-table {
  --ct-line: #A9ADB9;
  border: 1px solid var(--ct-line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.characteristics-table__row { display: flex; }
.characteristics-table__row + .characteristics-table__row {
  border-top: 1px solid var(--ct-line);
}
.characteristics-table__cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  font-size: 0.8125rem;
  line-height: 1.3;
  text-transform: uppercase;
}
.characteristics-table__cell--sm { flex-basis: 50%; }
.characteristics-table__cell--sm + .characteristics-table__cell--sm {
  border-left: 1px solid var(--ct-line);
}
.characteristics-table__cell-label {
  color: var(--color-text-light);
  min-width: 0;
}
.characteristics-table__cell-value {
  color: var(--color-primary);
  font-weight: 500;
  text-align: right;
  min-width: 0;
  hyphens: none;
}
/* Заголовочная строка «// секция» */
.characteristics-table__row--head { background: var(--color-bg-alt); }
.characteristics-table__row--head .characteristics-table__cell {
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 0.6875rem;
}
.characteristics-table__row--head .characteristics-table__cell-label {
  color: var(--ct-line);
  letter-spacing: 0.06em;
}
.characteristics-table__row--head .characteristics-table__cell-value {
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Матрица трёх конструкций: тот же визуальный язык, но сравнение ── */
.spec-matrix-wrap { overflow-x: auto; border-radius: 5px; -webkit-overflow-scrolling: touch; }
.spec-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #A9ADB9;
  border-radius: 5px;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  font-size: 0.75rem;
  line-height: 1.4;
}
.spec-matrix th,
.spec-matrix td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid #A9ADB9;
  border-left: 1px solid rgba(169, 173, 185, 0.45);
}
.spec-matrix th:first-child,
.spec-matrix td:first-child { border-left: none; }
.spec-matrix thead th { border-top: none; }
.spec-matrix thead th {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-alt);
  font-size: 0.6875rem;
  line-height: 1.35;
  white-space: nowrap;
}
.spec-matrix tbody th[scope="row"] {
  color: var(--color-text-light);
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.spec-matrix tbody td { color: var(--color-primary); }
.spec-matrix tbody td strong { color: var(--color-primary); font-weight: 700; }
.spec-matrix .mzh-col-accent { background: rgba(56, 85, 171, 0.05); }
.spec-matrix thead .mzh-col-accent {
  background: var(--color-primary);
  color: #fff;
  border-left-color: var(--color-primary);
}

/* Мобиле: даём заголовкам/значениям переноситься, чтобы таблица влезала без скролла */
@media (max-width: 640px) {
  .spec-matrix { font-size: 0.6875rem; }
  .spec-matrix th,
  .spec-matrix td {
    padding: 8px 8px;
    white-space: normal;
  }
  .spec-matrix thead th,
  .spec-matrix tbody th[scope="row"] { white-space: normal; }
}

/* ── Спец-числа ── */
.mzh-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}
.mzh-specs--tight { margin: 22px 0; }
.mzh-spec {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mzh-spec--hi {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.06);
}
.mzh-spec__val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.mzh-spec--hi .mzh-spec__val { color: var(--color-warning); }
.mzh-spec__unit { font-size: 0.9rem; color: var(--color-text-light); font-weight: 400; }
.mzh-spec__key { font-size: 0.8125rem; line-height: 1.45; color: var(--color-text); font-weight: 600; }
.mzh-spec__src { font-size: 0.6875rem; color: var(--color-text-light); font-variant-numeric: tabular-nums; }

/* ── Два метода сварки ── */
.mzh-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}
.mzh-method {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}
.mzh-method__head {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.mzh-method__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.mzh-method__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--color-text);
  margin: 0 0 6px;
}
.mzh-method__norm {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--color-text-light);
  margin: 0;
}

/* Шаги: строки с тонким разделителем, номер моноширинным «01» — без кружков */
.mzh-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; counter-reset: mzhstep; }
.mzh-steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text);
}
.mzh-steps li:first-child { border-top: none; padding-top: 2px; }
.mzh-steps li::before {
  counter-increment: mzhstep;
  content: counter(mzhstep, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.mzh-steps strong { font-weight: 600; color: var(--color-primary); }

.mzh-method__flag {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: baseline;
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.mzh-method__flag-k { font-weight: 700; color: var(--color-text); white-space: nowrap; }
.mzh-method__foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-light);
}
.mzh-method__foot strong { color: var(--color-text); }

/* ── Две колонки ── */
.mzh-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.mzh-cols--text > div > p { font-size: 0.9375rem; line-height: 1.65; color: var(--color-text-light); margin: 0 0 12px; }
.mzh-cols--text > div > p strong { color: var(--color-text); }

/* ── Alt-секция (засыпка) ── */
.mzh-section--alt {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.mzh-section__inner { }

/* ── Слои засыпки ── */
.mzh-backfill { display: flex; flex-direction: column; gap: 8px; margin: 22px 0; }
.mzh-zone {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.mzh-zone--pipe { border-color: rgba(56, 85, 171, 0.35); background: rgba(56, 85, 171, 0.05); }
.mzh-zone--protect { border-color: rgba(56, 85, 171, 0.2); }
.mzh-zone__n {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-border);
  text-align: center;
}
.mzh-zone--pipe .mzh-zone__n,
.mzh-zone--protect .mzh-zone__n { color: var(--color-primary); }
.mzh-zone__body { display: flex; flex-direction: column; gap: 3px; }
.mzh-zone__body strong { font-size: 0.9375rem; color: var(--color-text); }
.mzh-zone__body span { font-size: 0.8125rem; line-height: 1.5; color: var(--color-text-light); }

.mzh-faults { margin: 8px 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 5px; }
.mzh-faults li { font-size: 0.875rem; line-height: 1.55; }

@media (max-width: 640px) {
  .mzh-section { margin-top: var(--space-2xl); }
  .mzh-h2 { font-size: 1.3125rem; }
  .mzh-section--alt { padding: 20px 16px; }
  .mzh-method { padding: 18px; }
  .mzh-zone { grid-template-columns: 32px 1fr; gap: 12px; padding: 12px 14px; }
  /* характеристики: парные ячейки в столбик */
  .characteristics-table__cell { padding: 12px 14px; gap: 12px; }
  .characteristics-table__row:not(.characteristics-table__row--head) { flex-wrap: wrap; }
  .characteristics-table__cell--sm { flex-basis: 100%; }
  .characteristics-table__cell--sm + .characteristics-table__cell--sm {
    border-left: none;
    border-top: 1px solid var(--ct-line);
  }
}

/* ══════════════ Инструменты: панель ввода (язык 24ist) ══════════════ */
.tool-panel {
  --ct-line: #A9ADB9;
  border: 1px solid var(--ct-line);
  border-radius: 5px;
  background: var(--color-bg);
  max-width: 860px;
}
.tool-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--ct-line);
  border-radius: 5px 5px 0 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tool-panel__head-label { color: var(--ct-line); }
.tool-panel__head-title { color: var(--color-text); font-weight: 600; letter-spacing: 0.04em; }
.tool-panel__body { padding: 20px; }

.tool-seg {
  display: inline-flex;
  border: 1px solid var(--ct-line);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 18px;
}
.tool-seg__btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
}
.tool-seg__btn + .tool-seg__btn { border-left: 1px solid var(--ct-line); }
.tool-seg__btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

.tool-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin-bottom: 18px;
}
.tool-fields[hidden],
.tool-panel > div[id][hidden] { display: none; }
.tool-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tool-field__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-light);
}
.tool-field__input {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--ct-line);
  border-radius: 5px;
  padding: 11px 13px;
  width: 100%;
}
.tool-field__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(56, 85, 171, 0.15);
}
/* Выпадающие списки: убираем нативную стрелку, ставим свою с отступами */
select.tool-field__input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px 12px;
}
select.tool-field__input::-ms-expand { display: none; }
.tool-field__hint {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-light);
}
.tool-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 30px;
  border-radius: 5px;
}
.tool-btn:hover { background: var(--color-primary-dark); }

.tool-panel > div[id]:not([hidden]) {
  border-top: 1px solid var(--ct-line);
  padding: 20px;
}
.tool-result { max-width: none; }
.characteristics-table__cell-value.ct-ok { color: var(--color-success); }
.characteristics-table__cell-value.ct-warn { color: var(--color-warning); }
.characteristics-table__cell-value.ct-danger { color: var(--color-danger); }

/* ── Формулы ── */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.formula-card {
  border: 1px solid #A9ADB9;
  border-radius: 5px;
  padding: 18px 20px;
  background: var(--color-bg);
}
.formula-card__expr {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-primary);
  margin-bottom: 10px;
  overflow-x: auto;
}
.formula-card__note {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-light);
  margin: 0;
}

@media (max-width: 640px) {
  .tool-panel__body { padding: 16px; }
  .tool-fields { grid-template-columns: 1fr; }
  .tool-seg { display: flex; }
  .tool-seg__btn { flex: 1; }
  .tool-btn { width: 100%; }
  .tool-panel > div[id]:not([hidden]) { padding: 12px; }
}

/* ══════════════ Глоссарий ══════════════ */
.glos-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.glos-nav__chip {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid #A9ADB9;
  border-radius: 5px;
  padding: 6px 12px;
}
.glos-nav__chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.glos-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  margin-top: 40px;
  scroll-margin-top: 90px;
}
.glos-group__letter {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--color-primary);
  position: sticky;
  top: 90px;
  align-self: start;
}
.glos-items { border-top: 1px solid var(--color-border); }
.glos-term {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 90px;
}
.glos-term h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}
.glos-term p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-light);
  margin: 0;
  max-width: 74ch;
}
.glos-term p strong { color: var(--color-text); }
.glos-term p code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-bg-alt);
  border-radius: 4px;
  padding: 1px 6px;
}
@media (max-width: 640px) {
  .glos-group { grid-template-columns: 1fr; gap: 8px; margin-top: 28px; }
  .glos-group__letter { position: static; font-size: 2.25rem; }
}

/* ── Таблица наименований фитингов ── */
.fit-table th[scope="row"] { font-weight: 500; color: var(--color-primary); white-space: normal; }
.fit-table td { color: var(--color-text-light); white-space: nowrap; }
.fit-table .fit-group th {
  background: var(--color-bg-alt);
  color: var(--color-text);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding-top: 14px;
  padding-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   Полный текст ГОСТа — страница-документ (/standarty/…/tekst/)
   ═══════════════════════════════════════════════════════════════ */
.gost-wrap { padding-top: 28px; padding-bottom: 64px; }

.gost-doc-layout { display: block; }
@media (min-width: 1024px) {
  .gost-doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 44px;
    align-items: start;
  }
  .gost-doc  { grid-column: 1; grid-row: 1; min-width: 0; }
  .gost-aside { grid-column: 2; grid-row: 1; }
}

/* ── Оглавление ── */
.gost-aside { margin-bottom: 24px; }
@media (min-width: 1024px) {
  .gost-aside {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    margin-bottom: 0;
    max-height: calc(100svh - var(--header-height) - 32px);
    overflow-y: auto;
  }
}
.gost-toc { border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg); }
.gost-toc__toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 16px; min-height: 44px;
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--color-text); background: var(--color-bg-alt); border: none; border-radius: 8px; cursor: pointer;
}
.gost-toc__toggle svg { transition: transform var(--transition); flex-shrink: 0; }
.gost-toc__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.gost-toc__head { display: none; }
.gost-toc__panel { display: none; padding: 8px 10px 12px; }
.gost-toc__panel.is-open { display: block; }
@media (min-width: 1024px) {
  .gost-toc__toggle { display: none; }
  .gost-toc__panel { display: block; padding: 16px 14px; }
  .gost-toc__head {
    display: block; margin: 0 0 10px;
    font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--color-text-light);
  }
}
.gost-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gost-toc__item.is-h3 .gost-toc__link { padding-left: 20px; font-size: 0.78125rem; }
.gost-toc__link {
  display: block; padding: 6px 9px; font-size: 0.8125rem; line-height: 1.35;
  color: var(--color-text-light); text-decoration: none; border-radius: 5px;
  transition: color var(--transition), background var(--transition);
}
.gost-toc__link:hover { color: var(--color-primary); background: var(--color-bg-alt); text-decoration: none; }
.gost-toc__link.is-active { color: var(--color-primary); background: rgba(56, 85, 171, 0.08); font-weight: 600; }
.gost-toc__pdf {
  display: inline-flex; align-items: center; gap: 7px; margin: 14px 0 2px; padding: 9px 13px;
  font-family: var(--font-main); font-size: 0.8125rem; font-weight: 500; color: var(--color-primary);
  border: 1px solid var(--color-primary); border-radius: 6px; text-decoration: none;
  transition: background var(--transition);
}
.gost-toc__pdf:hover { background: rgba(56, 85, 171, 0.06); text-decoration: none; }

/* ── Тулбар документа (мета + кнопка PDF) ── */
.gost-doc__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding-bottom: 20px; margin-bottom: 26px; border-bottom: 1px solid var(--color-border);
}
.gost-doc__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.gost-doc__chip {
  font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--color-text-light); background: var(--color-bg-alt);
  border: 1px solid var(--color-border); border-radius: 5px; padding: 5px 9px;
}
.gost-doc__chip--status { color: var(--color-primary); border-color: rgba(56, 85, 171, 0.3); }
.gost-doc__pdf-btn { flex-shrink: 0; }

/* ── Типографика документа ── */
.gost-doc { font-size: 0.9375rem; line-height: 1.7; color: var(--color-text); }
.gost-doc > h1:first-of-type { margin-top: 4px; }
.gost-doc h1 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.08; color: var(--color-text);
  margin: 0 0 8px;
}
.gost-doc h2 {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 700;
  text-transform: uppercase; line-height: 1.2; color: var(--color-text);
  margin: 46px 0 14px; padding-top: 14px; border-top: 1px solid var(--color-border);
  scroll-margin-top: 80px;
}
.gost-doc h3 {
  font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--color-text);
  margin: 30px 0 10px; scroll-margin-top: 80px;
}
.gost-doc h4 { font-size: 0.9375rem; font-weight: 700; margin: 22px 0 8px; }
.gost-doc p { margin: 0 0 14px; max-width: 72ch; }
.gost-doc ul, .gost-doc ol { margin: 0 0 16px; padding-left: 22px; max-width: 72ch; }
.gost-doc li { margin-bottom: 6px; }
.gost-doc li::marker { color: var(--color-text-light); }
.gost-doc strong { font-weight: 700; color: var(--color-text); }
.gost-doc a:not(.btn) { color: var(--color-primary); }
.gost-doc em { font-style: italic; color: var(--color-text-light); }
.gost-doc blockquote {
  margin: 0 0 22px; padding: 14px 18px; background: var(--color-bg-alt);
  border-radius: 8px; color: var(--color-text);
}
.gost-doc blockquote p { max-width: none; }
.gost-doc blockquote p:last-child { margin-bottom: 0; }
.gost-doc code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--color-bg-alt); padding: 1px 5px; border-radius: 4px;
}
.gost-doc hr { border: none; border-top: 1px solid var(--color-border); margin: 34px 0; }
/* Рисунки-схемы (напр. стенды испытаний в ГОСТ Р МЭК 61386.24): портретные ч/б
   диаграммы — ограничиваем ширину, центрируем и оформляем как фигуру на белом. */
.gost-doc img {
  display: block;
  max-width: min(100%, 360px);
  height: auto;
  margin: 10px auto 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.gost-doc .doc-table-wrap { margin: 14px 0 26px; }
.gost-doc h2 + .doc-table-wrap,
.gost-doc h3 + .doc-table-wrap { margin-top: 8px; }

/* Таблицы дословного текста ГОСТа: заголовки и ячейки переносятся по словам
   (а не nowrap), чтобы широкие таблицы влезали без горизонтальной прокрутки.
   Колонки нормативной таблицы прятать нельзя — вместо этого сужаем их переносом. */
.gost-doc .doc-table-wrap .specs-table th,
.gost-doc .doc-table-wrap .specs-table td {
  white-space: normal;
  overflow-wrap: break-word;
  padding: 9px 10px;
}
.gost-doc .doc-table-wrap .specs-table tbody td:first-child {
  white-space: normal;
}

/* Мобайл: «текучие» таблицы (помечены JS — те, где есть ячейка-абзац, напр.
   Таблица 5) раскладываем table-layout: fixed с равными колонками и переносом
   длинных слов, чтобы огромная ячейка не распирала таблицу и всё влезало без
   горизонтальной прокрутки. Числовые таблицы этим правилом не затрагиваются. */
@media (max-width: 640px) {
  .gost-doc .doc-table-wrap--flow .specs-table {
    table-layout: fixed;
    width: 100%;
  }
  /* Ширины колонок из JS (--w) пропорциональны объёму текста: «№»/числовые узкие,
     текстовые широкие. Вне media-запроса --w не применяется — десктоп не трогаем. */
  .gost-doc .doc-table-wrap--flow col { width: var(--w); }
  .gost-doc .doc-table-wrap--flow .specs-table th,
  .gost-doc .doc-table-wrap--flow .specs-table td {
    overflow-wrap: anywhere;
    padding: 6px 5px;
  }
}
