/* Строй Рынок — «Прайс-лист завода». См. DESIGN_BRIEF.md */

:root {
  --ink: #111111;
  --text: #2a2a2a;
  --grey: #666666;
  --rule: #d6d6d6;
  --paper: #ffffff;
  --paper-2: #f4f4f2;
  --accent: #c2410c;
  --accent-dark: #9a330a;
  --brand: var(--ink);
  --ok: #1f6b35;
  --err: #b42318;
  --sans: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
  --w: 1200px;
  --pad: 40px;
  --gap: 72px;
}
@media (max-width: 760px) { :root { --pad: 16px; --gap: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.55 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); font-weight: 600; margin: 0; letter-spacing: -0.01em; overflow-wrap: break-word; }
h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
table { border-collapse: collapse; width: 100%; }
@media (max-width: 760px) { h1 { font-size: 28px; } h2 { font-size: 22px; } }

.mono { font-family: var(--mono); font-size: 14px; letter-spacing: 0; }
.grey { color: var(--grey); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; left: 8px; top: -50px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { top: 8px; }

.container { max-width: calc(var(--w) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.container--text { max-width: calc(780px + 2 * var(--pad)); }
main { padding-bottom: var(--gap); }
main:has(.block--form:last-child) { padding-bottom: 0; }
.lead { font-size: 18px; color: var(--text); max-width: 680px; }
.note { color: var(--grey); font-size: 15px; margin-top: 20px; }
.note--top { margin: -4px 0 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; border-radius: 0; }
.btn:hover { background: var(--ink); color: #fff; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--line { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* шапка */
.header { border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 30; }
.header__row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo__mark { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); }
.nav__phone, .nav__cta { display: none !important; }
.header__phone { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.header__cta { min-height: 40px; }
.burger { display: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--ink); background: var(--paper); font: 500 15px var(--sans); color: var(--ink); cursor: pointer; }
.burger__close { display: none; }
@media (max-width: 1080px) {
  .header__phone, .header__cta { display: none; }
  .burger { display: inline-block; margin-left: auto; }
  .nav { display: none; position: fixed; left: 0; right: 0; top: var(--nav-top, 66px); bottom: 0; background: var(--paper); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 24px; overflow-y: auto; }
  .nav-open .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
  .nav__phone { display: block !important; }
  .nav__cta { display: inline-flex !important; margin-top: 20px; border-bottom: 0 !important; font-size: 16px !important; color: #fff !important; }
  .nav-open .burger__open { display: none; }
  .nav-open .burger__close { display: inline; }
  body.nav-open { overflow: hidden; }
}

/* крошки */
.crumbs { max-width: calc(var(--w) + 2 * var(--pad)); margin: 0 auto; padding: 16px var(--pad) 0; font-size: 14px; color: var(--grey); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule); }
.crumbs a { color: var(--grey); }

/* заголовки страниц и блоки */
.page-head { padding: 32px 0 8px; }
.page-head h1 { margin-bottom: 14px; max-width: 900px; }
.block { margin-top: var(--gap); }
.block__h { padding-top: 14px; border-top: 2px solid var(--ink); margin-bottom: 24px; }
.block__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 24px; }
.block__row .block__h { border: 0; padding: 0; margin: 0; }
.block__link { font-size: 15px; }

/* первый экран */
.intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; padding: 48px 0 8px; align-items: start; }
.intro h1 { margin-bottom: 18px; }
.intro__official { margin: 20px 0 0; font-size: 15px; }
.intro--brand { padding-top: 32px; }
.prose p { max-width: 640px; }
.status { color: var(--grey); font-size: 15px; max-width: 640px; border-left: 2px solid var(--brand); padding-left: 14px; margin-top: 16px; }
@media (max-width: 900px) { .intro { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 28px; } }

/* таблица-справка */
.spec { border-top: 1px solid var(--ink); }
.spec > div { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.6fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.spec dt { color: var(--grey); font-size: 15px; }
.spec dd { color: var(--ink); }
.intro .spec { font-size: 15px; }
@media (max-width: 520px) { .spec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* заводы */
.plants { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.plants li { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.plants li:last-child { border-right: 0; }
.plants a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 16px 18px 0; text-decoration: none; color: var(--text); }
.plants li + li a { padding-left: 16px; }
.plants a:hover .mark { text-decoration: underline; }
.plants__cat { font-size: 14px; color: var(--grey); }
.plants__place { color: var(--grey); font-size: 14px; }
@media (max-width: 900px) {
  .plants { grid-template-columns: minmax(0, 1fr); }
  .plants li { border-right: 0; }
  .plants a, .plants li + li a { padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .plants__place { grid-column: 1 / -1; }
}
.mark { font-weight: 600; font-size: 18px; color: var(--ink); border-left: 4px solid var(--brand); padding-left: 10px; line-height: 1.2; display: inline-block; }
.mark--img { border: 0; padding: 0; height: 40px; width: auto; }

/* колонки текста */
.cols { display: grid; gap: 40px; }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
.cols h3 { margin-bottom: 10px; }
.cols p { color: var(--text); margin: 0; }
@media (max-width: 860px) { .cols--2, .cols--3, .cols--map { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.dash li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.dash li::before { content: "—"; position: absolute; left: 0; color: var(--grey); }

/* прайс-таблица */
.price-cat { margin-bottom: 40px; }
.price-cat__h { font-size: 20px; margin-bottom: 8px; }
.price { font-size: 15px; }
.price th, .price td { text-align: left; vertical-align: middle; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.price thead th { font-weight: 500; font-size: 13px; color: var(--grey); border-bottom: 1px solid var(--ink); padding-top: 0; }
.price__img { width: 64px; }
.price__img img { width: 52px; height: 52px; object-fit: contain; }
.price__name { color: var(--ink); font-weight: 500; }
.price__pdf { display: block; font-weight: 400; font-size: 13px; color: var(--grey); }
.price__act { text-align: right !important; padding-right: 0 !important; width: 1%; white-space: nowrap; }
.price__group th { padding: 22px 0 8px; border-bottom: 1px solid var(--ink); font-weight: 400; }
.price tbody:first-of-type .price__group th { padding-top: 12px; }
.price__group th > a:first-child { font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; border-left: 4px solid var(--brand); padding-left: 10px; margin-right: 14px; }
.price__group .grey { font-size: 14px; }
.price__more { float: right; font-size: 14px; }
.price__none td { color: var(--grey); }
.price-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.price-empty p { margin: 0; color: var(--grey); }
@media (max-width: 760px) {
  .price thead { display: none; }
  .price, .price tbody, .price th { display: block; width: 100%; }
  .price tr { display: block; }
  .price tr:not(.price__group) { position: relative; padding: 12px 0 12px 56px; border-bottom: 1px solid var(--rule); min-height: 68px; }
  .price td { display: block; border: 0; padding: 0; }
  .price__img { position: absolute; left: 0; top: 12px; width: 44px !important; }
  .price__img img { width: 44px; height: 44px; }
  .price__name { font-size: 15px; }
  .price td.mono { display: inline; font-size: 13px; color: var(--grey); white-space: nowrap; }
  .price td.mono + td.mono::before { content: " · "; }
  .price td[data-label="Поставка"] { font-size: 13px; color: var(--grey); }
  .price td[data-label="Поставка"]::before { content: "Поставка: "; }
  .price__act { text-align: left !important; margin-top: 8px; width: auto; }
  .price__act .btn { min-height: 40px; }
  .price__none { padding-left: 0 !important; min-height: 0 !important; }
  .price__group th { padding-top: 18px; }
  .price__more { float: none; display: block; margin-top: 4px; }
  .price__group .grey { display: block; margin-top: 4px; }
}

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.steps li { padding: 16px 20px 16px 0; border-right: 1px solid var(--rule); }
.steps li + li { padding-left: 20px; }
.steps li:last-child { border-right: 0; }
.steps .mono { display: block; color: var(--accent); margin-bottom: 8px; }
.steps strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text); font-size: 15px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 0 14px 32px; position: relative; }
  .steps .mono { position: absolute; left: 0; top: 16px; }
}

/* официальный статус */
.official { margin-top: 32px; border-top: 2px solid var(--ink); }
.official-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.official-row__who p { margin: 8px 0; font-size: 13px; }
.official-row__who a { font-size: 14px; }
@media (max-width: 760px) { .official-row { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.docs li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.docs li:first-child { border-top: 1px solid var(--rule); }
.official-row .docs li:first-child { border-top: 0; padding-top: 0; }
.docs li > :last-child { white-space: nowrap; font-size: 14px; }
@media (max-width: 520px) { .docs li { flex-direction: column; gap: 2px; } }

/* подшапка завода */
.subhead { border-bottom: 1px solid var(--rule); background: var(--paper-2); border-top: 4px solid var(--brand); }
.subhead .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding-top: 14px; padding-bottom: 14px; }
.subhead__id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.subhead__mark { font-size: 20px; font-weight: 600; color: var(--ink); }
.subhead__nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.subhead__nav a { color: var(--text); text-decoration: none; font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
.subhead__nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.subhead__nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 500; }

/* обзор заводов */
.plants-table { margin-top: 32px; font-size: 15px; }
.plants-table th, .plants-table td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.plants-table thead th { font-weight: 500; font-size: 13px; color: var(--grey); border-bottom: 1px solid var(--ink); }
.plants-table td a { text-decoration: none; }
@media (max-width: 760px) {
  .plants-table thead { display: none; }
  .plants-table, .plants-table tbody { display: block; }
  .plants-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .plants-table td { border: 0; padding: 2px 0; }
  .plants-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--grey); font-family: var(--sans); }
  .plants-table .price__act { text-align: left !important; margin-top: 8px; width: auto; }
}

/* форма */
.block--form { background: var(--paper-2); box-shadow: 0 0 0 100vmax var(--paper-2); clip-path: inset(0 -100vmax); padding-bottom: 40px; }
.block--form .block__h { padding-top: 24px; border-top: 0; }
.container.page > .request { margin-top: 32px; }
.form__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font-size: 14px; font-weight: 500; color: var(--ink); padding: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #9a9a9a; border-radius: 0; background: #fff; color: var(--ink); font: 16px/1.35 var(--sans); }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--err); outline-color: var(--err); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.check input, .consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 20px; }
.consent { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--grey); cursor: pointer; }
.consent input[aria-invalid="true"] { outline: 2px solid var(--err); }
.form__preset { margin: 0 0 16px; padding-left: 12px; border-left: 4px solid var(--brand); font-weight: 500; color: var(--ink); }
.form__status { margin: 12px 0 0; font-size: 15px; }
.form__status:empty { display: none; }
.form__status.is-ok { color: var(--ok); font-weight: 500; }
.form__status.is-error { color: var(--err); font-weight: 500; }
@media (max-width: 860px) { .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form__grid { grid-template-columns: minmax(0, 1fr); } .form__foot .btn { width: 100%; } .consent { align-items: flex-start; } }

/* калькулятор */
.calc__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; max-width: 760px; }
.spec--calc { max-width: 760px; }
.spec--calc dd.mono { font-size: 16px; }
@media (max-width: 560px) { .calc__row { grid-template-columns: minmax(0, 1fr); } }

/* карта, фото */
.map { border: 1px solid var(--rule); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 20px; }

/* оглавление каталога */
.toc { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; font-size: 15px; }

/* юридические тексты */
.legal { padding-top: 24px; }
.legal h1 { font-size: 32px; margin-bottom: 8px; }
.legal h2 { font-size: 20px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.3em; margin-bottom: 12px; list-style: disc; }
.legal__sub, .legal-page__subtitle { color: var(--grey); }
.legal__req, .legal-page__req { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 12px 0; margin-bottom: 12px; }
.legal__req p, .legal-page__req p { margin: 2px 0; }
.legal-page__footer-note { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--grey); }
.legal table { display: block; overflow-x: auto; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
@media (max-width: 760px) { .legal h1 { font-size: 26px; } }

/* футер */
.footer { background: var(--paper-2); border-top: 2px solid var(--ink); font-size: 15px; padding: 36px 0 28px; }
.footer a { color: var(--text); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer__brand { font-weight: 600; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.footer__h { font-size: 13px; color: var(--grey); margin-bottom: 10px; }
.footer ul li { margin-bottom: 6px; }
.footer__docs { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; }
.footer__legal { margin-top: 16px; color: var(--grey); font-size: 12px; }
.footer__legal p { margin: 0 0 2px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* cookie */
.cookie { position: fixed; right: 16px; bottom: 16px; left: 16px; max-width: 420px; margin-left: auto; z-index: 40; display: flex; align-items: center; gap: 16px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--ink); font-size: 14px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; flex: 1; }
