/* Страницы для поисковиков (backend/seo.py): подборки, объявление, гиды.
   Те же токены, что в app.css, но отдельный лёгкий файл: страница грузится без скриптов. */
:root {
  color-scheme: light;
  --bg: #F5F9FC; --surface: #FFFFFF; --surface-2: #EDF3F7; --line: #E1E8EE;
  --text: #222C33; --text-2: #5E7083;
  --brand: #B94A2E; --brand-press: #9A3C24; --brand-soft: #FBEAE4; --brand-text: #A8432A;
  --ok: #1F6B4F; --ok-soft: #E3F3EA;
  --r-card: 20px; --r-btn: 14px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 500 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
h2 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; margin: 36px 0 14px; }
h3 { font-size: 16px; font-weight: 700; }
a { color: var(--brand-text); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

.s-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: rgba(245, 249, 252, 0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.s-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.s-logo b { color: var(--brand); font-weight: 800; }
.s-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.s-nav a:not(.s-btn) { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.s-nav a:not(.s-btn):hover { background: var(--surface-2); }

.s-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 16px 16px 48px; flex: 1; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.crumbs a { color: var(--text-2); }
.s-hero { display: grid; gap: 10px; margin: 8px 0 24px; }
.s-lead { font-size: 18px; color: var(--text); max-width: 60ch; }
.s-muted { color: var(--text-2); }
.s-small { font-size: 14px; }
.s-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.s-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: var(--r-btn);
  background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; border: 1px solid var(--brand); }
.s-btn:hover { background: var(--brand-press); }
.s-btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.s-btn-ghost:hover { background: var(--surface-2); }
.s-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.s-more { margin-top: 20px; }

.s-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.s-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.s-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.s-card-link:hover h3 { color: var(--brand-text); }
.s-card-img { aspect-ratio: 4 / 3; background: var(--surface-2); }
.s-card-img img { width: 100%; height: 100%; object-fit: cover; }
.s-noimg { display: block; width: 100%; height: 100%; min-height: 160px; background: var(--surface-2); }
.s-card-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.s-card-body .s-muted { font-size: 13px; }
.s-price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.s-price small { font-size: 14px; font-weight: 600; color: var(--text-2); }
.s-price-lg { font-size: 30px; }
.s-addr { color: var(--text-2); font-size: 14px; }
.s-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.s-badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-press); }
.s-badge-ok { background: var(--ok-soft); color: var(--ok); }
.s-ok { color: var(--ok); font-weight: 600; }
.s-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-card); padding: 24px; display: grid; gap: 6px; }

.s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.s-chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.s-chip:hover, .s-chip[aria-current] { border-color: var(--brand); color: var(--brand-text); }

.s-listing { display: grid; gap: 24px; }
.s-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-card); }
.s-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-card); scroll-snap-align: start; background: var(--surface-2); }
.s-listing-main { display: grid; gap: 10px; max-width: 720px; }
.s-listing-main h2 { margin-top: 22px; margin-bottom: 4px; }
.s-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.s-dl dt { color: var(--text-2); }
.s-dl dd { margin: 0; font-weight: 600; }
.s-desc { white-space: pre-line; }
.s-inv, .s-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.s-inv { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.s-inv li { padding: 5px 11px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }

.s-steps, .s-check { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.s-steps li, .s-check li { padding-left: 4px; }
.s-steps b, .s-check b { display: block; }
.s-steps span, .s-check span { color: var(--text-2); }
.s-guides { list-style: none; padding: 0; }
.s-facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.s-facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.s-facts p { color: var(--text-2); }
.s-article { max-width: 720px; display: grid; gap: 8px; }

.s-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; }
.s-faq summary { font-weight: 700; cursor: pointer; }
.s-faq details p { margin-top: 8px; color: var(--text-2); }

.s-foot { border-top: 1px solid var(--line); padding: 20px 16px 28px; font-size: 13px; }
.s-foot nav { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.s-foot a { color: var(--text-2); }

@media (min-width: 900px) {
  .s-main { padding: 24px 24px 64px; }
  .s-listing { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .s-listing > * { min-width: 0; }
  .s-gallery { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .s-gallery img:first-child { grid-column: 1 / -1; }
  .s-listing-main { position: sticky; top: 76px; }
}
@media (max-width: 420px) {
  .s-nav a:not(.s-btn) { padding: 8px 6px; }
  .s-dl { grid-template-columns: 1fr; gap: 2px; }
  .s-dl dd { margin-bottom: 8px; }
}
.s-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.s-pagination a { padding: 10px 16px; border: 1px solid #ddd; border-radius: 8px; }
.s-pagination a[aria-current="page"] { background: #b94a2e; color: #fff; }

/* таблицы: цены по районам, образцы документов */
.s-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.s-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.s-table th, .s-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.s-table thead th { color: var(--text-2); font-weight: 600; font-size: 13px; }
.s-table tbody tr:last-child > * { border-bottom: 0; }
.s-table tbody th a { color: var(--text); font-weight: 700; }

/* образец документа: читается как лист бумаги */
.s-doc { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; margin-top: 20px; display: grid; gap: 10px; }
.s-doc h2 { font-size: 17px; margin: 14px 0 0; }
.s-doc .s-doc-title { text-align: center; font-size: 18px; margin: 0 0 6px; }
.s-doc p { font-size: 15px; }
.s-doc .s-table { font-size: 13px; }
.s-doc .s-table td { min-width: 70px; height: 34px; white-space: normal; }
.s-sign { display: grid; gap: 14px; margin-top: 16px; }

@media print {
  .s-top, .s-foot, .crumbs, .s-cta, .s-faq, .s-doc-page > p, .s-doc-page > h1, .s-lead { display: none !important; }
  body { background: #fff; }
  .s-main { padding: 0; max-width: none; }
  .s-doc { border: 0; padding: 0; margin: 0; }
  .s-table-wrap { border: 0; overflow: visible; }
  .s-table th, .s-table td { border: 1px solid #000; }
}
.s-facts .s-price { color: var(--text); }
