:root {
  --brand-primary: #233B46;
  --brand-dark: #252A2C;
  --accent-cta: #C66A42;

  --bg-page: #F1F1EE;
  --bg-card: #FFFFFF;

  --text-primary: #25282A;
  --text-secondary: #657075;
  --border: #D5DADB;

  --success: #2E6B5B;

  --font-main: "Manrope", Arial, sans-serif;
  --font-heading: "Manrope", Arial, sans-serif; /* утверждённый шрифт заголовков */
  --font-technical: "IBM Plex Mono", monospace;

  --color-bg: #F1F1EE; /* --bg-page */
  --color-text: #25282A;
  --color-accent: #C66A42;
  --color-muted: #657075;
  --container: 1120px;

  --header-h: 72px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 40px rgba(37, 42, 44, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-primary);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(35, 59, 70, 0.08), transparent 60%),
    linear-gradient(180deg, #f7f7f4, var(--bg-page));
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(241, 241, 238, 0.94);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.footer-inner,
.page {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner,
.footer-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  justify-content: flex-end;
  align-items: center;
}

.nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}

.nav-useful {
  position: relative;
}

.nav-useful > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-useful > summary::-webkit-details-marker {
  display: none;
}

.nav-useful > summary.is-active,
.nav-useful[open] > summary,
.nav a.is-active,
.nav a:hover {
  color: var(--brand-primary);
}

.nav-useful-menu {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 14rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 900px) {
  .nav-useful-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 20;
  }
}

.page {
  padding: 2.5rem 0 4rem;
}

.page-intro {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-family: var(--font-technical);
  color: var(--text-secondary);
}

.page-intro h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-dark);
}

.lead {
  margin: 0;
  color: var(--text-secondary);
}

.calc-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.25rem;
  align-items: start;
}

/* Длинные названия пород и nowrap-таблица иначе раздвигают сетку шире экрана. */
.calc-shell > *,
.calc-form > *,
.calc-results > *,
.calc-grid > *,
.table-wrap {
  min-width: 0;
}

.calc-form,
.calc-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.calc-form {
  padding: 1.25rem;
  display: grid;
  gap: 0.95rem;
}

.calc-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.calc-form input,
.calc-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.65rem 0.8rem;
}

.calc-form input:focus,
.calc-form select:focus {
  outline: 2px solid rgba(35, 59, 70, 0.18);
  border-color: var(--brand-primary);
}

.density-line {
  margin: -0.2rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.density-line strong {
  font-family: var(--font-technical);
  color: var(--brand-primary);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-cta);
  color: #fff;
}

.btn-primary:hover {
  background: #b55c37;
}

/* Lead CTA: solid primary + soft lift, breath glow, occasional shimmer */
.btn-lead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-weight: 700;
  padding: 0.82rem 1.28rem;
  box-shadow:
    0 4px 10px rgba(37, 42, 44, 0.18),
    0 12px 28px rgba(198, 106, 66, 0.38);
  transition:
    transform 0.25s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
  animation: lead-glow 2.8s ease-in-out infinite;
}

.btn-lead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.34) 48%,
    transparent 100%
  );
  transform: translateX(-160%) skewX(-16deg);
  animation: lead-shimmer 4.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.btn-lead > * {
  position: relative;
  z-index: 2;
}

.btn-lead:hover {
  transform: scale(1.03);
  background: #b55c37;
  box-shadow:
    0 6px 14px rgba(37, 42, 44, 0.22),
    0 18px 36px rgba(198, 106, 66, 0.5);
  animation-duration: 1.5s;
}

.btn-lead:hover::before {
  animation-duration: 2.2s;
}

.btn-lead:active {
  transform: scale(0.99);
  box-shadow:
    0 3px 8px rgba(37, 42, 44, 0.14),
    0 8px 18px rgba(198, 106, 66, 0.28);
}

@keyframes lead-glow {
  0%,
  100% {
    box-shadow:
      0 4px 10px rgba(37, 42, 44, 0.18),
      0 12px 28px rgba(198, 106, 66, 0.32),
      0 0 0 0 rgba(198, 106, 66, 0.34);
  }
  50% {
    box-shadow:
      0 6px 14px rgba(37, 42, 44, 0.2),
      0 16px 34px rgba(198, 106, 66, 0.48),
      0 0 0 12px rgba(198, 106, 66, 0);
  }
}

@keyframes lead-shimmer {
  0%,
  62% {
    transform: translateX(-160%) skewX(-16deg);
  }
  78%,
  100% {
    transform: translateX(280%) skewX(-16deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-lead,
  .btn-lead::before {
    animation: none;
  }

  .btn-lead:hover {
    transform: none;
  }
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--brand-primary);
}

.btn-ghost:hover {
  border-color: var(--brand-primary);
}

.calc-results {
  padding: 1.25rem;
}

.result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.result-cards article {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.result-cards span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.result-cards strong {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--font-technical);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.result-cards small {
  margin-left: 0.25rem;
  color: var(--text-secondary);
}

.table-wrap {
  overflow-x: auto;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.calc-table th,
.calc-table td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.calc-table td:first-child {
  white-space: normal;
}

.calc-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 600;
}

.calc-table td:nth-child(2),
.calc-table td:nth-child(3),
.calc-table td:nth-child(4),
.calc-table td:nth-child(5),
.calc-table tfoot th:nth-child(2),
.calc-table tfoot th:nth-child(3) {
  font-family: var(--font-technical);
}

.calc-table tfoot th {
  font-family: var(--font-main);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--brand-dark);
}

.empty-row td {
  color: var(--text-secondary);
  white-space: normal;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.remove-btn:hover {
  color: var(--accent-cta);
}

.calc-note {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  max-width: 54rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 1.8rem;
  background: rgba(255, 255, 255, 0.35);
}

.site-footer .brand img {
  width: 36px;
  height: 36px;
}

.site-footer .footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 1rem 1.5rem;
}

.footer-col {
  min-width: 0;
  line-height: 2;
}

.footer-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.footer-mid {
  justify-self: center;
}

.footer-end {
  justify-self: end;
  text-align: left;
}

.footer-end .footer-note {
  margin: 0 0 0.15rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 2;
}

.footer-contacts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  color: var(--color-muted);
  font-size: 0.9rem; /* как .site-footer p */
  line-height: 2;
}

.footer-inn {
  font-family: var(--font-technical);
}

.footer-phone,
.footer-apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.75rem;
}

.footer-apps {
  gap: 0.15rem;
}

.footer-contacts .footer-apps a {
  min-width: 44px; /* как .location-apps a */
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer-apps img {
  width: 1.5rem; /* 24px при корне 16px: компактная иконка внутри зоны 44px */
  height: 1.5rem;
  object-fit: contain;
}

.footer-contacts a {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
  line-height: 2;
}

.site-footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-legal {
  margin: 0;
}

.footer-legal a {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  line-height: 2;
}

.consent-note {
  margin: 1.25rem 0 0; /* как gap .stone-hero: чуть ниже кнопок заявки */
  max-width: 36rem;
  color: var(--color-muted);
  font-size: 0.85rem; /* чуть меньше .lead */
  line-height: 1.45;
}

.stone-section .consent-note,
.cta-band .consent-note,
.about-block > .consent-note,
.stone-copy .consent-note {
  margin: 1.25rem 0 0; /* родительские правила p обнуляют верхний отступ .consent-note */
}

.consent-note a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 1100px) {
  .calc-shell {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .calc-table th,
  .calc-table td {
    padding-inline: 0.4rem;
  }
}

@media (max-width: 920px) {
  .calc-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-grid,
  .result-cards {
    grid-template-columns: 1fr;
  }

  .calc-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  /* Шесть колонок с nowrap не помещаются: порода сверху, цифры строками. */
  .calc-table thead {
    display: none;
  }

  .calc-table,
  .calc-table tbody,
  .calc-table tfoot {
    display: block;
    width: 100%;
  }

  .calc-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.2rem 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
  }

  .calc-table tr.empty-row {
    display: block;
  }

  .calc-table th,
  .calc-table td {
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .calc-table tbody td:nth-child(1) {
    font-weight: 700;
  }

  .calc-table tbody td:nth-child(6) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .calc-table tbody td:nth-child(n + 2):not(:nth-child(6)),
  .calc-table tfoot th:nth-child(2),
  .calc-table tfoot th:nth-child(3) {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
  }

  .calc-table tbody td[data-label]::before,
  .calc-table tfoot th[data-label]::before {
    content: attr(data-label);
    font-family: var(--font-main);
    font-size: 0.75rem; /* как .calc-table th */
    font-weight: 600;
    letter-spacing: 0.04em; /* как .calc-table th */
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .calc-table tfoot th:first-child {
    grid-column: 1 / -1;
  }

  .calc-table tfoot th:last-child {
    display: none;
  }

  .remove-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

.nav-toggle {
  display: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.page-intro h1,
.stone-hero h1,
.cta-band h2 {
  font-family: var(--font-heading);
  overflow-wrap: anywhere;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.crumbs a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.stone-hero {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stone-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-dark);
}

.hero-actions,
.cta-band .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

/* На узком телефоне кнопки на всю ширину колонки, как у главной. */
@media (max-width: 479px) {
  .hero-actions .btn,
  .cta-band .btn {
    width: 100%;
  }
}

.stone-layout {
  display: grid;
  gap: 1rem;
}

.stone-photo {
  position: relative;
  margin: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
}

.stone-photo-placeholder,
.stone-photo > img,
.photo-carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) + 2px);
}

/* Подписи к фото: в DOM для SEO/скринридеров, визуально скрыты */
.stone-photo figcaption,
.gallery-grid figcaption:not(:empty) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.photo-carousel {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  touch-action: pan-y;
  user-select: none;
  cursor: default;
}

.photo-carousel-track {
  position: relative;
  cursor: default;
}

.photo-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  pointer-events: none;
}

.photo-carousel-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photo-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: default;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.photo-carousel-prev { left: 0.55rem; }
.photo-carousel-next { right: 0.55rem; }

.photo-carousel-nav:hover {
  background: #fff;
}

.photo-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.7rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  pointer-events: none;
}

.photo-carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: default;
}

.photo-carousel-dot.is-active {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 42, 44, 0.35);
}

body.has-lightbox {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 20, 0.92);
  cursor: default;
}

.photo-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  touch-action: pan-y;
  cursor: default;
}

.photo-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.photo-lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.photo-lightbox-close,
.photo-lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: default;
}

.photo-lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.6rem;
  line-height: 1;
}

.photo-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.6rem;
  line-height: 1;
}

.photo-lightbox-prev { left: 0.75rem; }
.photo-lightbox-next { right: 0.75rem; }

.photo-lightbox-close:hover,
.photo-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (pointer: coarse) {
  .photo-carousel-nav,
  .photo-lightbox-nav {
    display: none;
  }
}

.specs {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
}

.specs div {
  display: grid;
  gap: 0.15rem;
}

.specs dt {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.specs dd {
  margin: 0;
  font-family: var(--font-technical);
  font-size: 0.92rem;
}

.fold {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fold + .fold {
  margin-top: 0.65rem;
}

.fold summary {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem; /* как .stone-section p */
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  overflow-wrap: anywhere;
}

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

.fold summary::after {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.4rem; /* у первой строки вопроса, если заголовок переносится */
  margin-right: 0.15rem;
  border-right: 2px solid var(--color-accent); /* как outline focus-visible */
  border-bottom: 2px solid var(--color-accent);
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.fold[open] summary::after {
  transform: translateY(0.12rem) rotate(-135deg);
}

.fold p,
.fold ul {
  margin: 0;
  padding: 0 0.95rem 0.95rem;
  color: var(--color-text); /* как вопрос в summary */
}

.fold ul {
  padding-left: 1.6rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.pager a {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.perk-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

.stone-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* неполный ряд пород и продукции по центру */
  gap: 0.9rem;
}

.stone-grid > .stone-card {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
}

.stone-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.stone-card:hover {
  border-color: var(--brand-primary);
}

.stone-card h2 {
  margin: 0.85rem 0.95rem 0.3rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.stone-card p {
  margin: 0 0.95rem 0.95rem;
  color: var(--color-muted);
  font-size: 0.92rem;
  overflow-wrap: break-word;
}

.stone-card .density {
  margin-top: auto;
  padding: 0; /* боковые поля уже даёт .stone-card p, иначе цифра съезжает вправо */
  font-family: var(--font-technical);
  font-size: 0.82rem;
}

.perk-grid article,
.cta-band {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1rem;
}

.perk-grid h2,
.cta-band h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.perk-grid p,
.cta-band p {
  margin: 0;
  color: var(--color-muted);
}

.section-gap {
  margin-top: 2.2rem;
}

@media (min-width: 768px) {
  .stone-hero,
  .stone-layout {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }

  .stone-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .stone-photo {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .perk-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stone-grid > .stone-card {
    flex-basis: calc((100% - 0.9rem) / 2); /* одна щель gap .stone-grid */
    max-width: calc((100% - 0.9rem) / 2);
  }
}

@media (min-width: 1200px) {
  .stone-grid > .stone-card {
    flex-basis: calc((100% - 2.7rem) / 4); /* три щели по 0.9rem, как gap .stone-grid */
    max-width: calc((100% - 2.7rem) / 4);
  }

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

@media (max-width: 768px) {
  /* Пока меню — «гамбургер», три колонки подвала не влезают. */
  .footer-inner,
  .site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-mid,
  .footer-end {
    justify-self: start;
    text-align: left;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 0.55rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--brand-primary);
    font-weight: 600;
    cursor: pointer;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 0.4rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Карта как у крупных камнеобработчиков: карточка адреса слева, широкая Яндекс.Карта справа. */
.location {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.location-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.15rem 1.05rem 1.2rem;
}

.location-info h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.25rem; /* как .requisites h2 */
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.location-info p {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem; /* как прежний .place-card p */
  line-height: 1.45;
}

.location-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.7rem;
  margin-top: 0.85rem;
  font-size: 1.15rem;
}

.location-phone > a,
.location-info .location-phone + p a {
  min-height: 44px; /* как .footer-contacts a */
  display: inline-flex;
  align-items: center;
}

.location-info .location-phone + p {
  margin-top: 0.2rem;
}

.location-apps {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.location-apps a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.location-apps img {
  width: 1.15em; /* чуть больше кегля номера в .location-phone */
  height: 1.15em;
  object-fit: contain;
}

.location-info a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.location-info .location-apps a {
  text-decoration: none;
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem; /* как .hero-actions */
  margin-top: 1.1rem; /* как .hero-actions */
}

.location-actions .btn {
  text-decoration: none;
}

.location-map {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: var(--border);
  min-height: 320px;
}

.location-map iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

@media (min-width: 768px) {
  .location-map iframe {
    height: 420px;
  }
}

@media (min-width: 920px) {
  .location {
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
  }

  .location-map,
  .location-map iframe {
    height: 460px;
    min-height: 460px;
  }
}

.requisites {
  margin-top: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.1rem 1rem 1.2rem;
}

.requisites-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.requisites-head h2 {
  margin: 0;
}

.requisites h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.requisites dl {
  margin: 0;
  display: grid;
}

.requisites dl > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.requisites dl > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.requisites dl > div:last-child {
  padding-bottom: 0;
}

.requisites dt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.78rem;
}

.requisites dd {
  margin: 0;
  padding: 0;
  color: var(--color-text);
}

@media (min-width: 640px) {
  .requisites dl > div {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 0.4rem 1.25rem;
    align-items: baseline;
  }
}

.requisites dd.mono {
  font-family: var(--font-technical);
  font-size: 0.95rem;
}

.about-block {
  margin-top: 2rem;
}

.about-block h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--brand-dark);
}

.about-block > p {
  margin: 0;
  max-width: 46rem;
  color: var(--color-text);
}

.about-block > p + p {
  margin-top: 0.75rem; /* как расстояние абзацев .stone-section p */
}

.palette-logo {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 1rem 0;
}

.palette-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 72px;
}

.palette {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  grid-template-columns: 1fr;
}

.palette article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1rem;
}

.palette h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--brand-primary);
}

.palette ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.palette a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (min-width: 768px) {
  .palette {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .palette {
    grid-template-columns: repeat(4, 1fr);
  }
}

.specs-board {
  margin-top: 0.25rem;
}

.stone-story {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.stone-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.05rem 1rem 1.15rem;
}

.stone-section h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--brand-dark);
}

.stone-section p {
  margin: 0 0 0.75rem;
  max-width: 48rem;
  color: var(--color-text);
}

.stone-section p:last-child,
.stone-section .points:last-child {
  margin-bottom: 0;
}

.points {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.points li {
  padding-left: 0.8rem;
  border-left: 3px solid var(--color-accent);
  color: var(--color-text);
}

.points a {
  color: var(--brand-primary); /* как .stone-links a */
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.points strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--brand-primary);
  font-weight: 700;
}

@media (min-width: 768px) {
  .specs-board {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .specs-board {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Каталог продукции использует ту же .stone-grid, что и «Виды гранитов»:
   1 колонка, 2 колонки с 768px, 4 колонки с 1200px.
   Неполный последний ряд центрируется через justify-content.
   Отдельного правила на 480px у сетки пород нет — до 768px остаётся одна колонка. */

.product-block > h2 {
  margin: 0 0 0.15rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem); /* как .stone-section h2 */
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--brand-dark);
  overflow-wrap: break-word;
}

.product-block .tool-links {
  margin: 0 0 0.9rem; /* как прежний нижний отступ .product-block > h2 */
}

.product-block + .product-block {
  margin-top: 2.2rem; /* как .section-gap */
}

.stone-card .stone-links p.card-calc {
  margin: 0.35rem 0 0;
  font-family: var(--font-main);
  font-size: 0.92rem; /* как .stone-links a */
  letter-spacing: 0;
  text-transform: none; /* соседний p — подпись «Используемые граниты» капителью */
  color: inherit;
}

.card-calc a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-primary);
  font-size: 0.92rem; /* как .stone-links a */
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.card-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
}

.card-main .stone-photo {
  flex-shrink: 0;
}

.stone-copy .lead + .lead {
  margin-top: 0.75rem; /* как расстояние абзацев .stone-section p */
}

.stone-card .stone-links {
  margin-top: auto;
  padding: 0 0.95rem 0.95rem; /* как боковые поля .stone-card p */
}

.page-intro:has(+ .gallery-grid) {
  margin-bottom: 0.75rem; /* как расстояние абзацев .stone-section p */
}

.gallery-grid {
  display: grid;
  gap: 0.65rem; /* как .hero-actions */
  margin-top: 0;
  grid-template-columns: 1fr;
}

.gallery-grid figure {
  position: relative;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gallery-grid figcaption:empty {
  display: none;
}

.gallery-empty {
  margin: 0;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.stone-card .stone-links p {
  margin: 0 0 0.15rem;
  font-family: var(--font-technical);
  font-size: 0.78rem; /* как .specs dt */
  letter-spacing: 0.04em; /* как .calc-table th */
  text-transform: uppercase;
  color: var(--color-muted);
}

.stone-links ul,
ul.stone-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stone-links a {
  min-height: 44px; /* как .nav a и .pager a */
  display: inline-flex;
  align-items: center;
  color: var(--brand-primary);
  font-size: 0.92rem; /* как .stone-card p */
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: break-word;
}

.stone-section .eyebrow + .stone-links,
.stone-section .stone-links + .eyebrow {
  margin-top: 0.35rem;
}

.stone-section .stone-links + .eyebrow {
  margin-top: 0.9rem; /* как gap .stone-grid */
}

/* Калькулятор брусчатки. Отдельных --font-size-* нет: размеры взяты у соседних блоков. */
#massa {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.85rem 0 0;
}

.tool-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pave-shell,
.pave-dims,
.pave-shell > * {
  min-width: 0;
}

.pave-shell {
  display: grid;
  gap: 1.25rem; /* как .calc-shell */
  grid-template-areas:
    "form"
    "results"
    "photo";
}

.pave-form {
  grid-area: form;
}

.pave-results {
  grid-area: results;
}

.pave-photo {
  grid-area: photo;
}

.pave-photo .stone-photo-placeholder {
  background: var(--brand-dark); /* карточки продукции красят заглушку #1b2429 точечно */
}

.pave-dims {
  display: grid;
  gap: 0.8rem; /* как .calc-grid */
}

.pave-dims[hidden],
#paveModeWrap[hidden],
#paveLayerWrap[hidden],
#paveDensityWrap[hidden],
.pave-error[hidden],
#paveBulkCard[hidden],
#paveWeightCard[hidden] {
  display: none;
}

.pave-error {
  margin: 0 0 0.8rem;
  color: var(--color-accent);
  font-size: 0.92rem; /* как .density-line */
}

.pave-hint {
  margin: 0.15rem 0 0;
  color: var(--text-secondary);
  font-size: 0.86rem; /* как .calc-note */
}

.guide {
  display: grid;
  gap: 0.9rem; /* как .stone-story */
  margin-top: 1.25rem;
  min-width: 0;
}

.guide .stone-section {
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.stone-section h3 {
  margin: 1rem 0 0.45rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--brand-dark);
}

.formula {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  min-width: 0;
  overflow-x: auto;
  background: var(--bg-page);
  border-radius: var(--radius);
  font-family: var(--font-technical);
  font-size: 0.92rem;
  line-height: 1.45;
}

.size-wrap {
  min-width: 0;
  overflow-x: auto;
  margin: 0 0 0.15rem;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.size-table caption {
  margin: 0 0 0.55rem;
  caption-side: top;
  text-align: left;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.size-table th,
.size-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.size-table th {
  font-family: var(--font-technical);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.size-table td:nth-child(n + 2),
.size-table th:nth-child(n + 2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.guide .stone-section a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.result-cards strong {
  overflow-wrap: anywhere;
}

@media (min-width: 480px) {
  .pave-dims {
    grid-template-columns: 1fr 1fr;
  }

  .pave-dims label:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .pave-dims {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .pave-dims label:last-child {
    grid-column: auto;
  }
}

@media (min-width: 1200px) {
  .pave-shell {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); /* как .calc-shell */
    grid-template-areas:
      "form results"
      "form photo";
    align-items: start;
  }
}

/* Поставка. Переменные только из :root в начале файла:
   --font-main, --font-heading, --font-technical, --color-text, --color-accent,
   --color-muted, --brand-dark, --brand-primary, --bg-page, --bg-card, --border,
   --radius, --container, --header-h, --shadow.
   Отдельных --font-size-* нет: заголовки берут размер .stone-section h2 и .page-intro h1.
   Новых шрифтов, цветов и теней нет. */
.supply .page-intro .lead + .lead {
  margin-top: 0.75rem; /* как расстояние абзацев .stone-section p */
}

.supply-title {
  margin: 0 0 0.7rem; /* как .stone-section h2 */
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem); /* как .stone-section h2 */
  letter-spacing: -0.03em;
  line-height: 1.25; /* как .stone-section h2 */
  color: var(--brand-dark);
}

.supply-split {
  display: grid;
  gap: 0.9rem; /* как .stone-story */
  min-width: 0;
}

.supply-split > div {
  min-width: 0;
  padding: 1rem; /* как .cta-band */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.supply-best {
  border-color: var(--color-accent);
  background: var(--bg-card);
}

.supply-meter {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}

.supply-meter p {
  margin: 0.35rem 0 0;
}

.supply-meter-track {
  height: 0.55rem;
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}

/* Ширина полос — схема «10 тонн против 20»: 100% и 50%. Менять вместе с примером на странице поставки. */
.supply-meter-track span {
  display: block;
  height: 100%;
  background: var(--color-accent);
}

.supply-meter-track .is-short {
  width: 50%;
  background: var(--brand-primary);
}

.supply #zayavka,
.supply #raschet {
  scroll-margin-top: calc(var(--header-h) + 0.5rem); /* как #massa */
}

.supply .cta-band .consent-note {
  margin: 1.25rem 0 0; /* как .consent-note */
}

@media (min-width: 768px) {
  .supply-split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .supply-split {
    grid-template-columns: 1fr 1fr; /* не 4 колонки .perk-grid */
  }
}

/* Главная. Переменные только из :root.
   Отдельных --font-size-* нет: h1 как .page-intro h1, h2 как .stone-section h2,
   карточки как .stone-card h2 (1.15rem), подписи как .eyebrow.
   Новых шрифтов, цветов и теней нет. Точки 480 / 768 / 1200 — как у калькулятора брусчатки. */
.home-hero {
  display: grid;
  gap: 1.25rem; /* как .calc-shell */
  min-width: 0;
}

.home-hero-copy {
  max-width: none;
  margin-bottom: 0;
}

.home .page-intro .lead + .lead {
  margin-top: 0.75rem; /* как .supply .page-intro .lead + .lead */
}

.home-hero-copy .hero-actions {
  margin-top: 1.1rem; /* как .hero-actions */
}

.home .calc-form {
  min-width: 0;
}

.home .calc-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 7rem;
  border: 1px solid var(--border); /* как .calc-form input */
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.65rem 0.8rem;
  font: inherit;
  resize: vertical;
}

.home input:focus-visible,
.home textarea:focus-visible {
  outline: 2px solid var(--color-accent); /* как a:focus-visible */
  outline-offset: 3px;
}

.home-photo {
  margin: 0;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px); /* как .gallery-grid figure */
  overflow: hidden;
}

.home-photo img,
.home-photo-placeholder {
  display: block;
  width: 100%;
  height: auto; /* атрибуты width/height не растягивают кадр */
  aspect-ratio: 3 / 2; /* как .gallery-grid img */
  object-fit: cover;
}

.home-photo--carousel .photo-carousel {
  border-radius: 0;
}

.home-photo--carousel .photo-carousel-slide img {
  aspect-ratio: 3 / 2;
  border-radius: 0;
}

.home-photo--carousel .photo-carousel-dots {
  flex-wrap: wrap;
  row-gap: 0.3rem;
  padding: 0 0.75rem;
}

.home-photo--carousel .photo-carousel-dot {
  width: 0.42rem;
  height: 0.42rem;
}

.home-photo-placeholder {
  background: var(--brand-primary);
}

.home-grid,
.home-faq {
  display: grid;
  gap: 0.9rem; /* как .perk-grid */
  min-width: 0;
}

.home-grid > *,
.home-faq > * {
  min-width: 0;
}

.home-card {
  min-width: 0;
  padding: 1rem; /* как .cta-band */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.home-card h3,
.home-stat strong {
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.15rem; /* как .stone-card h2 */
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}

.home-card p,
.home-stat span {
  margin: 0;
  color: var(--color-muted); /* как .perk-grid p */
  font-size: 0.92rem; /* как .stone-card p */
  overflow-wrap: anywhere;
}

.home-card .points {
  margin-top: 0.75rem;
}

.home-stat strong {
  display: block;
  font-family: var(--font-technical);
  color: var(--brand-primary);
}

.home-faq .fold + .fold {
  margin-top: 0;
}

.home [id] {
  scroll-margin-top: calc(var(--header-h) + 0.5rem); /* как #massa */
}

.home .cta-band .consent-note,
.home .calc-form .consent-note {
  margin: 1.25rem 0 0; /* родительские p обнуляют верхний отступ */
}

@media (max-width: 479px) {
  .home .calc-form .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .home-grid-2,
  .home-segments,
  .home-offer,
  .home-why,
  .home-terms,
  .home-steps {
    grid-template-columns: 1fr 1fr;
  }

  /* Пять карточек аудитории и три карточки поставки: последняя не остаётся узкой полосой слева. */
  .home-segments > :nth-child(5):last-child,
  .home-offer > :nth-child(3):last-child {
    grid-column: 1 / -1;
    width: calc((100% - 0.9rem) / 2); /* как одна колонка .home-grid */
    justify-self: center;
  }

  .home-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .supply .home-faq {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 920px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); /* как .location с 920px */
    align-items: start;
  }

  .home-faq {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .home-offer,
  .home-why,
  .home-terms,
  .home-steps {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .home-segments {
    grid-template-columns: repeat(6, 1fr);
  }

  .home-segments > * {
    grid-column: span 2;
  }

  .home-segments > :nth-child(4):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  .home-segments > :nth-child(5):last-child {
    grid-column: 4 / span 2;
    width: auto;
    justify-self: stretch;
  }

  .home-offer > :nth-child(3):last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}

/* Заявка, производственная база, шкала машины. Цвета и радиус — из :root. */
.lead-form {
  display: grid;
  gap: 0.8rem; /* как .calc-grid */
  margin-top: 0.9rem;
}

.phone-label {
  position: relative;
}

.phone-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.phone-label:focus-within .phone-field {
  outline: 2px solid rgba(35, 59, 70, 0.18);
  border-color: var(--brand-primary);
}

.phone-country {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 46px;
  padding: 0 0.65rem 0 0.7rem;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.phone-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.phone-code {
  font-family: var(--font-technical);
  font-size: 0.92rem;
}

.phone-caret {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.phone-field input[type="tel"] {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.phone-field input[type="tel"]:focus {
  outline: none;
  border-color: transparent;
}

.phone-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.15rem);
  z-index: 40;
  margin-top: 0.25rem;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.phone-label.is-drop-up .phone-dropdown {
  top: auto;
  bottom: calc(100% - 0.15rem);
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.phone-group + .phone-group {
  border-top: 1px solid var(--border);
}

.phone-group-title {
  padding: 0.55rem 0.75rem 0.25rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-option {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phone-option:hover,
.phone-option.is-active {
  background: rgba(35, 59, 70, 0.06);
}

.phone-option-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.phone-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-option-code {
  color: var(--color-muted);
  font-family: var(--font-technical);
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .phone-country {
    padding: 0 0.5rem 0 0.55rem;
    gap: 0.25rem;
  }

  .phone-code {
    font-size: 0.86rem;
  }

  .phone-field input[type="tel"] {
    padding-left: 0.6rem;
  }
}

.lead-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 7rem;
  border: 1px solid var(--border); /* как .home .calc-form textarea */
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.65rem 0.8rem;
  font: inherit;
  resize: vertical;
}

.lead-form input[type="checkbox"] {
  width: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  padding: 0;
}

.lead-form .form-agreement {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem; /* как .hero-actions */
  min-height: 44px;
}

.lead-form .form-agreement label {
  display: block; /* не колонка .calc-form label: чекбокс стоит рядом */
  margin: 0;
  color: var(--color-text);
  font-size: 0.92rem; /* как .stone-card p */
}

.form-agreement a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.privacy-content {
  max-width: 46rem; /* как .about-block > p */
  margin-inline: auto;
  line-height: 1.5; /* как body */
}

.privacy-content h1 {
  margin: 0 0 0.7rem; /* как .page-intro h1 */
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 4vw, 2.6rem); /* как .page-intro h1 */
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1; /* как .page-intro h1 */
  color: var(--brand-dark);
}

.privacy-content h2 {
  margin: 2rem 0 0.55rem; /* верх как .about-block, низ как .about-block h2 */
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem); /* как .about-block h2 */
  letter-spacing: -0.03em;
  line-height: 1.2; /* как .about-block h2 */
  color: var(--brand-dark);
}

.privacy-content p,
.privacy-content li {
  margin: 0;
  color: var(--color-text);
}

.privacy-content p + p,
.privacy-content ul + p,
.privacy-content p + ul {
  margin-top: 0.75rem; /* как .about-block > p + p */
}

.privacy-content ul {
  margin-top: 0.75rem;
  padding-left: 1.6rem; /* как .fold ul */
}

.privacy-content li + li {
  margin-top: 0.35rem;
}

.lead-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.92rem; /* как .calc-note */
}

.lead-status.is-ok {
  color: var(--success);
}

.lead-status.is-err {
  color: var(--color-accent); /* как .pave-error */
}

.lead-status a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* display только при [open]: иначе close()/Esc не скрывают dialog */
.has-lead-dialog,
html.has-lead-dialog body {
  overflow: hidden;
}

.lead-dialog {
  width: min(36rem, calc(100% - 2rem)); /* как .consent-note */
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 1rem; /* как .cta-band */
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.lead-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lead-dialog form.lead-form {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.75rem;
  overflow: auto;
}

.lead-dialog form .btn[type="submit"] {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.lead-dialog::backdrop {
  background: rgba(37, 42, 44, 0.45);
}

.lead-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.lead-dialog-head .supply-title {
  margin: 0;
}

.home-plant {
  display: grid;
  gap: 0.9rem; /* как .home-grid */
  min-width: 0;
}

.home-plant figure {
  min-width: 0;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.home-plant img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2; /* как .home-photo img */
  object-fit: cover;
  background: var(--brand-primary);
}

.home-plant figcaption {
  padding: 0.7rem 0.9rem 0.85rem; /* как .stone-photo figcaption */
  color: var(--color-text);
  font-size: 0.92rem; /* как .stone-card p */
  overflow-wrap: anywhere;
}

.home-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem; /* как .hero-actions */
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.home-badges li {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--brand-primary);
  font-size: 0.86rem; /* как .calc-note */
  font-weight: 600;
}

.truck-load {
  margin-top: 0.9rem;
}

.truck-load .supply-meter-track span {
  width: 0;
}

@media (max-width: 479px) {
  .lead-form .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .home-plant {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .home-plant {
    grid-template-columns: repeat(4, 1fr);
  }
}
