/* ============================================================
   L’Écritoire — editorial landing
   Дизайн-код: «бумага и чернила». Антиква Playfair Display в
   заголовках, гротеск Inter в тексте, плотная газетная сетка,
   правила-линейки, отточия, штриховые гравюры.
   Светлая тема намеренно одна — тёмный режим противоречил бы
   бумажной метафоре.
   Состояния (hover/focus/active/disabled/loading), контраст AA,
   тап-таргеты ≥44px и prefers-reduced-motion — по checklist.design.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }

/* ---------- Токены ---------- */
:root {
  --paper:     #f4f0e6;
  --paper-2:   #ece6d8;
  --paper-3:   #e3dbc9;
  --card:      #fbf9f3;

  --ink:       #17130f;
  --ink-2:     #453d33;
  --ink-3:     #6f6558;
  --rule:      #cfc5ae;
  --rule-soft: #ded5c1;

  --accent:    #8a2b22;   /* бордо */
  --accent-2:  #9c7420;   /* охра */
  --ok:        #3f6b3a;
  --err:       #a52b1f;

  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1240px;
  --gap: clamp(56px, 7vw, 104px);
  --ring: 0 0 0 3px rgba(138,43,34,.28);
}

/* ---------- База ---------- */
body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* лёгкая фактура бумаги */
  background-image:
    radial-gradient(circle at 18% 22%, rgba(138,43,34,.028) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 64%, rgba(23,19,15,.03) 0 1px, transparent 1px);
  background-size: 140px 140px, 190px 190px;
  font-size: 16.5px;
}
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.visually-hidden, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, .wordmark { font-family: var(--serif); font-weight: 700; line-height: 1.08; letter-spacing: -.012em; }
sup { font-size: .7em; }

/* ============================================================
   ЗАГОЛОВОК ИЗДАНИЯ
   ============================================================ */
.masthead { border-bottom: 3px double var(--ink); background: var(--paper); position: relative; z-index: 20; }
.edition {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); padding: 11px 0 10px; border-bottom: 1px solid var(--rule-soft);
}
.edition-sep { color: var(--rule); }

.masthead-main { text-align: center; padding: clamp(20px, 3.6vw, 38px) 0 clamp(16px, 2.4vw, 26px); }
.wordmark { display: inline-block; font-size: clamp(2.15rem, 6.2vw, 4.4rem); letter-spacing: -.03em; white-space: nowrap; }
.wordmark:hover { color: var(--accent); }
.tagline {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 12px; line-height: 1.7;
}

.topnav { border-top: 1px solid var(--rule-soft); position: relative; }
.topnav-list {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: clamp(10px, 2.4vw, 30px); list-style: none; padding: 0; margin: 0;
}
.topnav-list a {
  display: inline-flex; align-items: center; min-height: 46px;
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 500; color: var(--ink-2);
  border-bottom: 2px solid transparent; transition: color .18s, border-color .18s;
}
.topnav-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topnav-list a.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.topnav-cta { color: var(--accent) !important; font-weight: 600; }

.nav-toggle { display: none; width: 46px; height: 46px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; margin: 0 auto; }
.nav-toggle-bar { width: 22px; height: 1.6px; background: var(--ink); transition: transform .24s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* Пунктов меню семь — на планшете и небольшом ноутбуке они в строку уже не
   помещаются, поэтому гамбургер включается раньше, чем прочая мобильная вёрстка. */
@media (max-width: 1060px) {
  .nav-toggle { display: flex; }
  .topnav-list {
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    border-top: 1px solid transparent;
  }
  .topnav-list.is-open { max-height: 520px; border-top-color: var(--rule-soft); }
  .topnav-list li + li { border-top: 1px solid var(--rule-soft); }
  .topnav-list a { min-height: 50px; justify-content: center; border-bottom: 0; }
}

/* ============================================================
   ВВЕДЕНИЕ
   ============================================================ */
.lead { padding-block: clamp(34px, 5vw, 60px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule); }
.lead-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: clamp(28px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .lead-grid { grid-template-columns: 1fr; } }

.kicker {
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
.lead h1 { font-size: clamp(2.15rem, 5.4vw, 4.15rem); line-height: 1.02; letter-spacing: -.026em; }

.lead-columns { columns: 2; column-gap: 34px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.lead-columns p { font-size: .96rem; color: var(--ink-2); line-height: 1.72; }
.lead-columns p + p { margin-top: 14px; }
@media (max-width: 640px) { .lead-columns { columns: 1; } }

.dropcap::first-letter {
  float: left; font-family: var(--serif); font-size: 3.1em; line-height: .74;
  padding: 7px 5px 0 0; margin-right: 1px; color: var(--accent); font-weight: 700;
}

.lead-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.lead-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 30px; background: var(--rule); border: 1px solid var(--rule);
}
.lead-facts > div { background: var(--paper); padding: 14px 16px; }
.lead-facts dt { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.lead-facts dd { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
@media (max-width: 560px) { .lead-facts { grid-template-columns: 1fr 1fr; } }

.lead-figure { text-align: center; }
.engraving { width: 100%; max-width: 260px; margin-inline: auto; color: var(--ink); }
figcaption {
  font-size: .74rem; color: var(--ink-3); font-style: italic;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule-soft); line-height: 1.55;
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; position: relative;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  border: 1.5px solid var(--ink); transition: background .2s, color .2s, border-color .2s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }

.btn-plain { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-plain:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-2); }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-label { opacity: 0; }
.btn-spinner { position: absolute; width: 17px; height: 17px; display: none; }
.btn.is-loading .btn-spinner {
  display: block; border: 2px solid rgba(244,240,230,.35); border-top-color: var(--paper);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   МАКЕТ: ОГЛАВЛЕНИЕ + КОНТЕНТ
   ============================================================ */
.layout { display: grid; grid-template-columns: 210px 1fr; gap: clamp(28px, 4.5vw, 72px); align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }

.toc { position: sticky; top: 24px; padding-top: var(--gap); }
@media (max-width: 1000px) { .toc { display: none; } }
.toc-title {
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.toc-list { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.toc-list li { border-bottom: 1px solid var(--rule-soft); }
.toc-list a {
  display: flex; gap: 10px; align-items: baseline; padding: 11px 0;
  font-size: .84rem; color: var(--ink-3); transition: color .18s;
}
.toc-num { font-family: var(--serif); font-size: .8rem; min-width: 18px; color: var(--rule); transition: color .18s; }
.toc-list a:hover { color: var(--ink); }
.toc-list a:hover .toc-num { color: var(--accent); }
.toc-list a.is-active { color: var(--ink); font-weight: 600; }
.toc-list a.is-active .toc-num { color: var(--accent); }
.toc-note { font-size: .7rem; color: var(--ink-3); font-style: italic; margin-top: 16px; line-height: 1.55; }

/* ============================================================
   ГЛАВЫ
   ============================================================ */
.chapter { padding-top: var(--gap); }
.chapter + .chapter { border-top: 1px solid var(--rule); margin-top: var(--gap); padding-top: var(--gap); }
.chapter-head { margin-bottom: 34px; }
.chapter-label {
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.chapter h2 { font-size: clamp(1.85rem, 4vw, 3rem); }
.chapter-standfirst {
  margin-top: 16px; max-width: 62ch; font-size: 1.02rem; color: var(--ink-2);
  padding-left: 16px; border-left: 2px solid var(--accent);
}
.chapter-more {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule-soft);
  font-size: .92rem;
}
.chapter-more a {
  color: var(--accent); font-weight: 600; border-bottom: 1px solid transparent;
}
.chapter-more a:hover { color: var(--ink); border-bottom-color: currentColor; }
.chapter-more a + a { margin-left: .15em; }

/* ---------- Список с отточиями ---------- */
.index-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.index-list > li { border-bottom: 1px solid var(--rule-soft); padding: 16px 0; }
.index-row { display: flex; align-items: baseline; gap: 8px; min-height: 34px; }
.index-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; transition: color .18s; }
.index-dots { flex: 1; border-bottom: 1.5px dotted var(--rule); transform: translateY(-4px); }
.index-price { font-weight: 600; font-size: .95rem; white-space: nowrap; transition: color .18s; }
.index-row:hover .index-name, .index-row:hover .index-price { color: var(--accent); }
.index-desc { font-size: .9rem; color: var(--ink-3); margin-top: 6px; max-width: 78ch; line-height: 1.65; }
.index-desc em { font-style: normal; color: var(--ink-2); font-weight: 500; }

.sidenote {
  margin-top: 30px; padding: 20px 22px; background: var(--paper-2);
  border-left: 3px solid var(--ink); font-size: .9rem; color: var(--ink-2); line-height: 1.7;
}
.sidenote strong { font-family: var(--serif); font-size: 1rem; }

/* ---------- Этапы ---------- */
.steps-wrap { display: grid; grid-template-columns: 1fr 220px; gap: clamp(24px, 4vw, 54px); align-items: start; }
@media (max-width: 860px) { .steps-wrap { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.step { background: var(--paper); padding: 24px 26px; display: grid; grid-template-columns: 54px 1fr; gap: 4px 18px; }
.step-num {
  grid-row: span 2; font-family: var(--serif); font-size: 2.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.step h3 { font-size: 1.16rem; }
.step p { font-size: .92rem; color: var(--ink-2); }
.chapter-figure { text-align: center; }
.chapter-figure--wide { margin-top: 40px; }
.chapter-figure--wide .engraving { max-width: 300px; }

/* ---------- Гарантии (пункты договора) ---------- */
.clauses { list-style: none; padding: 0; margin: 0; counter-reset: clause; columns: 2; column-gap: 44px; }
@media (max-width: 760px) { .clauses { columns: 1; } }
.clauses li {
  counter-increment: clause; break-inside: avoid; padding: 0 0 22px 46px;
  margin-bottom: 22px; border-bottom: 1px solid var(--rule-soft); position: relative;
}
.clauses li::before {
  content: counter(clause, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--serif); font-size: 1.35rem; color: var(--accent);
}
.clauses h3 { font-size: 1.1rem; margin-bottom: 6px; }
.clauses p { font-size: .9rem; color: var(--ink-2); }

/* ---------- Таблица ---------- */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.price-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.price-table th, .price-table td { text-align: left; padding: 14px 16px 13px; border-bottom: 1px solid var(--rule-soft); }
.price-table thead th {
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--ink);
}
.price-table tbody th { font-family: var(--serif); font-size: 1.04rem; font-weight: 700; }
.price-table td { font-size: .9rem; color: var(--ink-2); }
.price-table td.num { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table tbody tr:hover { background: var(--paper-2); }
.table-note { font-size: .78rem; color: var(--ink-3); margin-top: 14px; font-style: italic; }

/* ---------- Отзывы ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }
.quote { background: var(--paper); padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.quote blockquote p {
  font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; font-style: italic; position: relative;
}
.quote blockquote p::before { content: "«"; color: var(--accent); }
.quote blockquote p::after { content: "»"; color: var(--accent); }
.quote figcaption { border-top: 1px solid var(--rule-soft); padding-top: 12px; margin-top: auto; font-style: normal; }
.quote-name { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); }
.quote-meta { display: block; font-size: .76rem; color: var(--ink-3); margin-top: 2px; }

/* ---------- Аккордеон ---------- */
.accordion { border-top: 1px solid var(--ink); }
.acc-item { border-bottom: 1px solid var(--rule-soft); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 0; text-align: left; min-height: 60px; transition: color .18s;
}
.acc-q { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.acc-trigger:hover { color: var(--accent); }
.acc-icon { position: relative; width: 16px; height: 16px; flex: none; }
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: currentColor;
  transform: translate(-50%, -50%); transition: transform .25s ease, opacity .2s;
}
.acc-icon::before { width: 14px; height: 1.6px; }
.acc-icon::after { width: 1.6px; height: 14px; }
.acc-trigger[aria-expanded="true"] .acc-icon::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.acc-panel { padding: 0 0 22px; max-width: 76ch; }
.acc-panel p { font-size: .94rem; color: var(--ink-2); }
.acc-panel[hidden] { display: none; }

/* ============================================================
   РАСЧЁТ / КВИЗ
   ============================================================ */
.calc-section { margin-top: var(--gap); padding-block: var(--gap); background: var(--paper-2); border-top: 3px double var(--ink); }
.calc-head { max-width: 60ch; margin-bottom: 36px; }
.calc-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }

.calc-progress {
  display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0 0 28px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.calc-progress li {
  flex: 1; min-width: 96px; padding: 11px 6px; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); position: relative; text-align: center;
  transition: color .2s, background .2s;
}
.calc-progress li + li { border-left: 1px solid var(--rule-soft); }
.calc-progress li::before { content: attr(data-dot) ". "; color: var(--rule); }
.calc-progress li.is-current { color: var(--paper); background: var(--ink); font-weight: 600; }
.calc-progress li.is-current::before { color: var(--paper-3); }
.calc-progress li.is-done { color: var(--accent); }
.calc-progress li.is-done::before { color: var(--accent); }

.calc-body { display: grid; grid-template-columns: 1fr 300px; gap: clamp(24px, 3.4vw, 48px); align-items: start; }
@media (max-width: 900px) { .calc-body { grid-template-columns: 1fr; } }

.calc-step { display: none; }
.calc-step.is-active { display: block; animation: stepin .28s ease; }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } }
.calc-step legend { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; }
.calc-step-num { font-size: .9rem; color: var(--accent); }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.opts--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .opts, .opts--2 { grid-template-columns: 1fr; } }
.opt { display: block; background: var(--card); cursor: pointer; position: relative; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-face {
  display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; min-height: 64px;
  justify-content: center; transition: background .18s, color .18s;
}
.opt-name { font-family: var(--serif); font-size: 1.02rem; font-weight: 700; }
.opt-hint { font-size: .76rem; color: var(--ink-3); }
.opt:hover .opt-face { background: var(--paper-2); }
.opt input:checked + .opt-face { background: var(--ink); color: var(--paper); }
.opt input:checked + .opt-face .opt-hint { color: var(--paper-3); }
.opt input:focus-visible + .opt-face { outline: 2px solid var(--accent); outline-offset: -2px; }

.range-block { background: var(--card); border: 1px solid var(--rule-soft); padding: 26px 24px; }
.range-out { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; background: transparent; height: 34px; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--paper); margin-top: -11px; cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); cursor: grab;
}
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.range-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-3); margin-top: 2px; }
.range-hint { font-size: .78rem; color: var(--ink-3); font-style: italic; margin-top: 14px; }

/* Смета */
.calc-estimate { background: var(--card); border: 1px solid var(--ink); padding: 24px 22px; position: sticky; top: 22px; }
@media (max-width: 900px) { .calc-estimate { position: static; } }
.estimate-label { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.estimate-price {
  font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 800;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--ink);
  font-variant-numeric: tabular-nums;
}
.estimate-list { display: grid; gap: 9px; }
.estimate-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; align-items: baseline; }
.estimate-list dt { color: var(--ink-3); white-space: nowrap; }
.estimate-list dd { text-align: right; font-weight: 500; }
.estimate-note { font-size: .74rem; color: var(--ink-3); font-style: italic; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft); line-height: 1.55; }

.calc-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); }
.calc-counter { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ============================================================
   ФОРМЫ
   ============================================================ */
.calc-form { display: grid; gap: 16px; max-width: 620px; }
.field { display: grid; gap: 6px; }
.field > label { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.req { color: var(--err); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--rule); color: var(--ink); border-radius: 0;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: .75; }
.field input:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(165,43,31,.14); }
.field-error { color: var(--err); font-size: .78rem; font-weight: 500; }
.field-error[hidden] { display: none; }
.field-error::before { content: "— "; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-height: 44px; }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-box {
  width: 21px; height: 21px; flex: none; margin-top: 2px; border: 1.5px solid var(--rule);
  background: var(--card); display: grid; place-items: center; color: var(--paper); transition: background .16s, border-color .16s;
}
.checkbox-box svg { opacity: 0; transition: opacity .16s; }
.checkbox input:checked + .checkbox-box { background: var(--ink); border-color: var(--ink); }
.checkbox input:checked + .checkbox-box svg { opacity: 1; }
.checkbox input:focus-visible + .checkbox-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkbox-text { font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
.checkbox-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.field-consent { gap: 2px; }
.form-status { font-size: .86rem; min-height: 1.2em; font-weight: 500; }
.form-status.is-ok { color: var(--ok); }
/* Сбой отправки должен читаться иначе, чем успех: человек должен
   понять, что заявка не ушла, и написать другим способом. */
.form-status.is-error { color: var(--err); }

/* ============================================================
   ВЫХОДНЫЕ ДАННЫЕ
   ============================================================ */
.colophon { border-top: 3px double var(--ink); margin-top: 0; padding-top: 48px; background: var(--paper); }
.colophon-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 36px; border-bottom: 1px solid var(--rule); }
@media (max-width: 860px) { .colophon-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .colophon-grid { grid-template-columns: 1fr; } }
.wordmark--sm { font-size: 1.8rem; }
.colophon-brand p { font-size: .87rem; color: var(--ink-2); margin-top: 12px; max-width: 34ch; }
.colophon-contacts a { font-weight: 600; color: var(--ink); }
.colophon-contacts a:hover { color: var(--accent); }
.colophon-col h2 { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.colophon-col ul { display: grid; gap: 9px; list-style: none; padding: 0; }
.colophon-col a { font-size: .87rem; color: var(--ink-2); }
.colophon-col a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.colophon-cities { font-size: .78rem; color: var(--ink-3); padding: 18px 0; border-bottom: 1px solid var(--rule); line-height: 1.8; }
.colophon-cities span { letter-spacing: .16em; text-transform: uppercase; font-size: .68rem; color: var(--ink-2); margin-right: 6px; }

.colophon-bottom { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 0 26px; }
.colophon-bottom p { font-size: .74rem; color: var(--ink-3); max-width: 70ch; line-height: 1.6; }
.colophon-legal a { text-decoration: underline; text-underline-offset: 2px; }
.colophon-legal a:hover { color: var(--accent); }

.to-top {
  position: fixed; left: 18px; bottom: 18px; z-index: 40;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  background: var(--ink); color: var(--paper); padding: 12px 16px; min-height: 44px;
  display: inline-flex; align-items: center; opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s, background .2s;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--accent); }

/* ============================================================
   ДВИЖЕНИЕ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================
   ВНУТРЕННИЕ СТРАНИЦЫ (генерируются build.py)
   ============================================================ */

/* Компактная мачта на внутренних: логотип меньше, воздуха меньше */
.masthead--compact .masthead-main { padding: clamp(14px, 2vw, 22px) 0 clamp(10px, 1.4vw, 16px); }
.masthead--compact .wordmark { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.masthead--compact .tagline { font-size: .66rem; margin-top: 8px; }

/* Хлебные крошки */
.crumbs { border-bottom: 1px solid var(--rule-soft); background: var(--paper); }
.crumbs ol {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 11px 0; margin: 0;
  font-size: .74rem; letter-spacing: .06em; color: var(--ink-3);
}
.crumbs li + li::before { content: "→"; margin-right: 8px; color: var(--rule); }
.crumbs a { border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }

/* Шапка страницы */
.page-lead { padding-block: clamp(30px, 4.5vw, 56px) clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--rule); }
.page-lead h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); max-width: 20ch; }
.page-lead-text { margin-top: 18px; max-width: 62ch; font-size: 1.06rem; color: var(--ink-2); }
.lead-facts--service { grid-template-columns: repeat(4, 1fr); margin-top: 26px; }
@media (max-width: 640px) { .lead-facts--service { grid-template-columns: 1fr 1fr; } }

/* Основной текст внутренних страниц */
.prose { padding-block: var(--gap) calc(var(--gap) * .6); }
/* мера строки ограничена у самих элементов, чтобы блок совпадал по левому краю с H1 */
.prose > h2, .prose > h3 { max-width: 72ch; }
.prose > h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 52px; padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose > h3 { font-size: 1.16rem; margin-top: 30px; }
.prose > p { margin-top: 14px; color: var(--ink-2); max-width: 72ch; }
.prose > p a, .prose li a, .price-table a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose > p a:hover, .prose li a:hover, .price-table a:hover { color: var(--ink); }
.prose-lead { font-size: 1.1rem; color: var(--ink) !important; }
.prose .sidenote, .prose .table-wrap, .prose .steps,
.prose .clauses, .prose .quotes, .prose .accordion { margin-top: 24px; }
.prose .index-list { margin-top: 24px; }

.prose-list, .prose-ol { margin-top: 16px; padding-left: 22px; color: var(--ink-2); max-width: 72ch; }
.prose-list li, .prose-ol li { margin-bottom: 8px; }
.prose-list { list-style: none; padding-left: 0; }
.prose-list li { position: relative; padding-left: 20px; }
.prose-list li::before { content: "—"; position: absolute; left: 0; color: var(--rule); }

.checklist { list-style: none; padding: 0; margin-top: 18px; max-width: 72ch; }
.checklist li {
  position: relative; padding: 9px 0 9px 30px; color: var(--ink-2);
  border-bottom: 1px solid var(--rule-soft);
}
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 11px; height: 6px;
  border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

/* Пары «термин — значение» */
.spec-list { margin-top: 20px; border-top: 1px solid var(--ink); max-width: 72ch; }
.spec-list > div {
  display: grid; grid-template-columns: 210px 1fr; gap: 4px 24px;
  padding: 13px 0; border-bottom: 1px solid var(--rule-soft);
}
.spec-list dt { font-family: var(--serif); font-weight: 700; font-size: 1rem; }
.spec-list dd { color: var(--ink-2); font-size: .93rem; }
@media (max-width: 620px) { .spec-list > div { grid-template-columns: 1fr; } }

/* Смежные услуги */
.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); margin-top: 24px; }
@media (max-width: 700px) { .related-list { grid-template-columns: 1fr; } }
.related-list a {
  display: flex; flex-direction: column; gap: 4px; background: var(--card);
  padding: 18px 20px; min-height: 74px; justify-content: center; transition: background .18s;
}
.related-list a:hover { background: var(--paper-2); }
.related-list a span { font-size: .8rem; color: var(--ink-3); }
.related-list a { font-family: var(--serif); font-weight: 700; font-size: 1.04rem; }

/* Метка для range + honeypot */
.range-label { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Заголовки колонок в подвале — не h2, чтобы не спорить с контентом */
.colophon-col-title { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 14px; }

/* ============================================================
   ПОЧИНКА МОБИЛЬНОЙ ВЁРСТКИ  (баги из audit.md)
   ============================================================ */

/* 1. Цены в каталоге уезжали за край: имя не сжималось */
.index-row { flex-wrap: wrap; }
.index-name { flex: 1 1 auto; min-width: 0; }
.index-price { margin-left: auto; }

/* 2. Заголовки FAQ не переносились */
.acc-q { flex: 1; min-width: 0; }
.acc-trigger { min-width: 0; }

/* 2a. Корень проблемы: grid-элементы по умолчанию имеют min-width:auto
   и не сжимаются уже своего содержимого — из-за этого вся страница
   получала горизонтальный скролл на мобиле. */
.layout > main, .layout > .toc { min-width: 0; }
.calc-body > * { min-width: 0; }

@media (max-width: 620px) {
  .index-dots { display: none; }
  .index-row { justify-content: space-between; gap: 4px 14px; }
  .index-name { flex: 1 1 100%; }
  .index-price { margin-left: 0; }

  /* 3. Степпер квиза: точки без подписей, чтобы не рвался на две строки */
  .calc-progress { border-bottom: 0; }
  .calc-progress li { min-width: 0; flex: 1; padding: 9px 2px; font-size: 0; }
  .calc-progress li::before { font-size: .72rem; content: attr(data-dot); }
  .calc-progress li span { display: none; }

  /* 4. Смета — не обрезанный сайдбар, а блок над кнопками */
  .calc-body { display: flex; flex-direction: column; }
  .calc-estimate { order: -1; padding: 18px 18px 16px; }
  .estimate-price { font-size: 1.9rem; padding-bottom: 12px; margin-bottom: 12px; }
  .estimate-note { display: none; }

  /* 5. Гравюры на узком экране — мёртвый скролл */
  .lead-figure, .chapter-figure { display: none; }

  /* 6. Таблицы прейскуранта читаемее */
  .price-table { min-width: 460px; }
  .price-table th, .price-table td { padding: 12px 12px 11px; }
}

@media (max-width: 400px) {
  .price-table { min-width: 380px; font-size: .88rem; }
}

/* ============================================================
   ВИТРИНА ЗНАКОВ: ВУЗЫ И СИСТЕМЫ ПРОВЕРКИ
   Логотипы горизонтальные и разной пропорции, поэтому кружки не
   годятся: в них текст превращается в пятно. Ряд плиток с общей
   высотой знака выравнивает их зрительный вес. Обесцвечены, чтобы
   не спорить с палитрой; цвет возвращается при наведении.
   ============================================================ */
.brands { padding: 44px 0 4px; }

.brands-title {
  font-size: .84rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--ink); text-align: center;
  margin: 0 0 26px; padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
}
.brands-title--second { margin-top: 46px; }

.brands-list {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 30px 26px; list-style: none; padding: 0; margin: 0;
}
.brands-list--wide { grid-template-columns: repeat(4, 1fr); max-width: 900px; margin-inline: auto; }

.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.brand-logo {
  width: 100%; height: 52px; object-fit: contain;
  filter: grayscale(1) contrast(.95); opacity: .62;
  transition: filter .22s, opacity .22s;
}
.brand:hover .brand-logo { filter: grayscale(0) contrast(1); opacity: 1; }

.brand-name {
  font-size: .72rem; letter-spacing: .04em; color: var(--ink-3);
  text-align: center; line-height: 1.3; transition: color .22s;
}
.brand:hover .brand-name { color: var(--ink); }

@media (max-width: 900px) {
  .brands-list, .brands-list--wide { grid-template-columns: repeat(3, 1fr); gap: 26px 20px; }
}
@media (max-width: 620px) {
  .brands { padding-top: 30px; }
  .brands-list, .brands-list--wide { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .brand-logo { height: 44px; }
}
