/* ============================================================
   Общий каркас статических страниц Resuma: шапка, подвал,
   блок заявки и служебные компоненты (формы, карточки, шаги).
   Подключается ко всем страницам из public/ и к лендингу.
   ============================================================ */

:root {
  --sh-ink: #20282b;
  --sh-muted: #5d676b;
  --sh-paper: #fdfaf6;
  --sh-line: #e3dbd1;
  --sh-accent: #9c6644;
  --sh-soft: #f4eee6;
  --sh-radius: 14px;
}

.shell-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--sh-line);
  background: rgba(253, 250, 246, 0.96);
}

.shell-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.shell-nav {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.shell-logo {
  color: var(--sh-ink);
  font: 700 24px/1 Georgia, 'Times New Roman', serif;
  text-decoration: none;
  white-space: nowrap;
}

.shell-logo em {
  color: var(--sh-accent);
  font-style: normal;
}

.shell-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 20px;
  font: 500 15px/1.3 Inter, system-ui, sans-serif;
}

.shell-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--sh-muted);
  text-decoration: none;
}

.shell-links a:hover {
  color: var(--sh-accent);
}

.shell-links .shell-cta {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--sh-ink);
  border-radius: 999px;
  background: var(--sh-ink);
  color: #fff;
  font-weight: 600;
}

.shell-links .shell-cta:hover {
  background: #313b3f;
  color: #fff;
}

/* Подвал */

.shell-footer {
  margin-top: 56px;
  border-top: 1px solid var(--sh-line);
  background: #f7f2ea;
  color: var(--sh-muted);
  font: 400 15px/1.55 Inter, system-ui, sans-serif;
}

.shell-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px 32px;
  padding: 44px 0 30px;
}

.shell-footer h4 {
  margin: 0 0 12px;
  color: var(--sh-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shell-footer p {
  max-width: 320px;
  margin: 12px 0 0;
  font-size: 14px;
}

.shell-footer a {
  display: block;
  margin: 8px 0;
  color: var(--sh-muted);
  text-decoration: none;
}

.shell-footer a:hover {
  color: var(--sh-accent);
  text-decoration: underline;
}

.shell-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 18px 0 30px;
  border-top: 1px solid var(--sh-line);
  font-size: 13.5px;
}

.shell-footer-bottom a {
  display: inline;
  margin: 0;
}

.shell-contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
}

/* Блок заявки перед подвалом */

.shell-lead {
  margin: 48px auto 8px;
  padding: 26px 28px;
  border: 1px solid var(--sh-line);
  border-left: 3px solid var(--sh-accent);
  border-radius: 0 var(--sh-radius) var(--sh-radius) 0;
  background: var(--sh-soft);
  font-family: Inter, system-ui, sans-serif;
}

.shell-lead h2 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
}

.shell-lead p {
  max-width: 640px;
  margin: 0;
  color: #3f484c;
  font-size: 15px;
}

.shell-lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.shell-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--sh-ink);
  border-radius: 999px;
  background: var(--sh-ink);
  color: #fff;
  font: 600 15px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.shell-btn:hover {
  background: #313b3f;
  color: #fff;
}

.shell-btn.secondary {
  border-color: var(--sh-line);
  background: transparent;
  color: var(--sh-ink);
}

.shell-btn.secondary:hover {
  border-color: var(--sh-ink);
  background: transparent;
  color: var(--sh-ink);
}

/* Служебные компоненты страниц услуг и документов */

body.shell-page {
  margin: 0;
  min-width: 320px;
  background: var(--sh-paper);
  color: var(--sh-ink);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell-page * {
  box-sizing: border-box;
}

.shell-page .shell-main {
  padding-bottom: 24px;
}

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

.meta a:hover {
  text-decoration: underline;
}

.shell-page h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.shell-page h2 {
  margin: 36px 0 12px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.18;
}

.shell-page h3 {
  margin: 26px 0 10px;
  font-size: 20px;
}

.shell-page p,
.shell-page li {
  color: #333c40;
  font-size: 17px;
  line-height: 1.65;
}

.shell-page ul,
.shell-page ol {
  padding-left: 22px;
}

.shell-page main a:not(.shell-btn) {
  color: var(--sh-accent);
}

.shell-page main a.shell-btn,
.shell-page main a.shell-btn:hover {
  color: #fff;
}

.shell-page main a.shell-btn.secondary,
.shell-page main a.shell-btn.secondary:hover {
  color: var(--sh-ink);
}

.shell-kicker {
  margin: 0 0 12px;
  color: var(--sh-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shell-lede {
  max-width: 720px;
  color: var(--sh-muted);
  font-size: 19px;
  line-height: 1.55;
}

.shell-hero {
  padding: 64px 0 36px;
}

.shell-section {
  padding: 12px 0 40px;
}

.shell-narrow {
  max-width: 780px;
}

.shell-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.shell-card {
  padding: 22px;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  background: #fff;
}

.shell-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.shell-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.shell-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.shell-steps li {
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  background: #fff;
  font-size: 15px;
}

.shell-steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  color: var(--sh-accent);
  font: 700 13px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.1em;
}

.shell-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.shell-price {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  background: #fff;
}

.shell-price strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
  line-height: 1.1;
}

.shell-price .shell-price-note {
  color: var(--sh-muted);
  font-size: 13.5px;
}

.shell-price ul {
  margin: 14px 0 18px;
  padding-left: 18px;
}

.shell-price li {
  font-size: 14.5px;
  line-height: 1.5;
}

.shell-price .shell-btn {
  margin-top: auto;
}

.shell-price.is-featured {
  border-color: var(--sh-ink);
  box-shadow: 0 16px 36px rgb(32 40 43 / 0.08);
}

.shell-faq details {
  padding: 16px 0;
  border-bottom: 1px solid var(--sh-line);
}

.shell-faq summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
}

.shell-faq p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--sh-muted);
  font-size: 16px;
}

/* Форма заявки */

.shell-form {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  background: #fff;
}

.shell-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.shell-form input,
.shell-form select,
.shell-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d6ccc1;
  border-radius: 10px;
  background: #fffdfa;
  color: var(--sh-ink);
  font: 400 16px/1.4 Inter, system-ui, sans-serif;
}

.shell-form textarea {
  min-height: 96px;
  resize: vertical;
}

.shell-form input:focus,
.shell-form select:focus,
.shell-form textarea:focus {
  outline: 2px solid rgb(156 102 68 / 0.35);
  outline-offset: 1px;
}

.shell-form .shell-form-note,
.shell-form-note {
  margin: 0;
  color: var(--sh-muted);
  font-size: 13px;
  line-height: 1.5;
}

.shell-form-status {
  margin: 0;
  font-size: 14px;
  color: #2f6b3f;
}

.shell-form-status.is-error {
  color: #a13f28;
}

.lead-field-error {
  color: #a13f28;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.shell-form [aria-invalid='true'] {
  border-color: #c4694f;
  background: #fdf4f1;
}

.lead-result {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid var(--sh-line);
  border-radius: var(--sh-radius);
  background: var(--sh-soft);
}

.lead-result-title {
  margin: 0 0 6px;
  color: var(--sh-ink);
  font-size: 17px;
  font-weight: 600;
}

.lead-result-note,
.lead-result-hint {
  margin: 0;
  color: var(--sh-muted);
  font-size: 14px;
  line-height: 1.55;
}

.lead-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.lead-result-actions .shell-btn {
  font-size: 14px;
  min-height: 42px;
  padding: 0 16px;
}

.shell-contact-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.shell-contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
}

.shell-contact-list b {
  color: var(--sh-ink);
}

.shell-muted {
  color: var(--sh-muted);
}

.shell-divider {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--sh-line);
}

.shell-note {
  padding: 16px 18px;
  border: 1px solid var(--sh-line);
  border-radius: 12px;
  background: var(--sh-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Таблицы внутри статей (блоки «было → стало», сравнения) */

main table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}

main th,
main td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--sh-line);
  text-align: left;
  vertical-align: top;
}

main th {
  background: var(--sh-soft);
  font-weight: 700;
}

main tr:last-child td {
  border-bottom: 0;
}

.wrap table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}

.wrap th,
.wrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--sh-line);
  text-align: left;
  vertical-align: top;
}

.wrap th {
  background: var(--sh-soft);
  font-weight: 700;
}

main .example-note,
.seo-card-note {
  margin: -6px 0 12px;
  color: var(--sh-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.seo-template-card > div:last-child a {
  display: inline-block;
  margin-top: 6px;
}

main article .checklist,
.shell-page main .checklist {
  padding-left: 0;
  list-style: none;
}

main article .checklist li,
.shell-page main .checklist li {
  position: relative;
  padding-left: 28px;
}

main article .checklist li::before,
.shell-page main .checklist li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--sh-accent);
  font-weight: 700;
}

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

  .shell-card-grid,
  .shell-price-grid,
  .shell-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* Таблицы в статьях: «как пишут → почему не работает → как исправить»
   и сравнения. До этого стили были только для мобильной раскладки,
   поэтому на десктопе таблицы ехали браузерным дефолтом. */
.table-stack {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 15.5px;
}

.table-stack th,
.table-stack td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--sh-line, #e3dbd1);
}

.table-stack th {
  background: var(--sh-paper, #f7f1eb);
  font-weight: 700;
  color: var(--sh-ink, #20282b);
}

.table-stack td:first-child {
  width: 38%;
}

/* Дата обновления страницы: сигнал свежести для человека и для поиска.
   Правило общее — страницы старой сборки носят стили в себе. */
.updated {
  display: block;
  margin: -12px 0 18px;
  color: #797979;
  font-size: 13.5px;
}

/* Сообщение lead.js о восстановленном черновике заявки или подставленных полях. */
[data-lead-note] {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(32, 41, 43, 0.12);
  border-radius: 10px;
  background: #f7f1eb;
  color: #383936;
  font-size: 14.5px;
}

@media (max-width: 640px) {
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }

  .table-stack thead {
    display: none;
  }

  .table-stack tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--sh-line);
  }

  .table-stack td {
    padding: 2px 0;
    border: 0;
  }

  .table-stack td:first-child {
    color: var(--sh-ink);
    font-weight: 700;
  }

  .table-stack tr:last-child {
    border-bottom: 0;
  }

  .shell-wrap {
    width: min(100% - 32px, 1120px);
  }

  .shell-nav {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    padding: 12px 0;
  }

  .shell-links {
    width: 100%;
    justify-content: flex-start;
    gap: 2px 14px;
    font-size: 13.5px;
    line-height: 1.2;
  }

  .shell-links a {
    min-height: 32px;
  }

  .shell-links .shell-cta {
    min-height: 32px;
    margin-left: auto;
    padding: 0 12px;
  }

  .shell-footer-grid,
  .shell-card-grid,
  .shell-price-grid,
  .shell-steps {
    grid-template-columns: 1fr;
  }

  .shell-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .shell-hero {
    padding: 32px 0 20px;
  }

  .shell-lead {
    padding: 20px;
  }

  .shell-form {
    padding: 18px;
  }
}

@media print {
  .shell-header,
  .shell-footer,
  .shell-lead {
    display: none !important;
  }
}

/* Мобильная липкая кнопка заявки на странице услуги */

.service-sticky {
  display: none;
}

@media (max-width: 720px) {
  .service-sticky {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--sh-line);
    border-radius: 16px;
    background: rgba(253, 250, 246, 0.97);
    box-shadow: 0 12px 30px rgb(32 40 43 / 0.16);
    backdrop-filter: blur(8px);
    transform: translateY(140%);
    transition: transform 180ms ease;
  }

  .service-sticky.is-visible {
    transform: none;
  }

  .service-sticky .shell-btn {
    flex: 1;
    min-height: 44px;
  }

  .service-sticky-note {
    flex: 0 0 auto;
    max-width: 118px;
    color: var(--sh-muted);
    font-size: 11.5px;
    line-height: 1.25;
  }
}

@media print {
  .service-sticky {
    display: none !important;
  }
}
