/* WikiRielt: классическое светлое оформление. Шрифты системные, внешних запросов нет. */
:root {
  color-scheme: light;
  --ink: #202124;
  --ink-soft: #3c4043;
  --muted: #5f6368;
  --line: #dadce0;
  --paper: #ffffff;
  --soft: #f5f6f8;
  --brand: #1a4f8b;
  --brand-dark: #0e3560;
  --max: 1080px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; z-index: 50; background: #fff; padding: 6px 10px; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; flex-direction: column; font: 700 22px/1.1 var(--serif); color: var(--ink); text-decoration: none; }
.brand span { margin-top: 3px; font: 400 12px/1.3 var(--sans); color: var(--muted); }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; font-size: 14px; }
.main-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

.site-search { position: relative; display: flex; margin-left: auto; flex: 0 1 300px; min-width: 200px; }
.site-search input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #9aa0a6; border-radius: 4px 0 0 4px; font: inherit; font-size: 14px; }
.site-search button { height: 36px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 0 4px 4px 0; background: var(--brand); color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.live-results { position: absolute; top: 42px; left: 0; right: 0; z-index: 30; padding: 6px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.live-results[hidden] { display: none; }
.live-results a { display: block; padding: 8px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.live-results a:hover { background: var(--soft); }
.live-results strong { display: block; font-size: 14px; }
.live-results p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* Основной текст */
main { padding-top: 22px; padding-bottom: 48px; }
h1 { margin: 6px 0 12px; font: 700 34px/1.2 var(--serif); letter-spacing: -.01em; }
h2 { margin: 32px 0 12px; font: 700 24px/1.3 var(--serif); }
h3 { margin: 0 0 6px; font: 700 18px/1.35 var(--serif); }
.lede { max-width: 740px; font-size: 18px; color: var(--ink-soft); }
.kicker { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meta { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.note { max-width: 760px; margin: 20px 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--line); font-size: 14px; color: var(--muted); }
.prose p, .prose ul, .prose ol, .article-section p, .article-section ul, .article-section ol { max-width: 760px; }
.prose h3 { margin-top: 18px; }
.plain-list { list-style: none; padding-left: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain-list li span { margin-left: 8px; font-size: 13px; color: var(--muted); }

.page-head { margin-bottom: 18px; }
.crumbs { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Главная */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 6px 0 26px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.hero img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--brand); border-radius: 4px; background: var(--brand); color: #fff; font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); }
.btn-ghost:hover { background: var(--soft); color: var(--brand-dark); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 14px 0 8px; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); text-decoration: underline; }
.card p { font-size: 15px; color: var(--muted); }
.card .links { margin: 8px 0 0; font-size: 14px; }
.agency-block { margin-top: 32px; padding: 20px 22px; background: var(--soft); border-radius: 6px; }

/* Новостройки */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.jump li { margin: 0; }
.jump a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; text-decoration: none; }
.locality { scroll-margin-top: 90px; }
.complex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.complex { padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; scroll-margin-top: 110px; }
.complex-dev { margin: 0; font-size: 14px; color: var(--muted); }
.complex dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0 0; }
.complex dl > div { min-width: 0; }
.complex dt { font-size: 12px; color: var(--muted); }
.complex dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.developer { scroll-margin-top: 90px; }
.faq { margin-top: 28px; }

/* Словарь */
.dictionary-filter { margin-bottom: 18px; }
.dictionary-filter label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.dictionary-filter input { width: 100%; max-width: 520px; height: 40px; padding: 0 12px; border: 1px solid #9aa0a6; border-radius: 4px; font: inherit; }
.letter-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.letter-picker button { min-width: 36px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--brand); font: inherit; font-size: 14px; cursor: pointer; }
.letter-picker button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.result-count { margin: 0; font-size: 13px; color: var(--muted); }
.letter-group h2 { padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.term-entry { padding: 14px 0; border-bottom: 1px solid var(--line); }
.term-entry h3 { margin-bottom: 4px; }
.term-entry p { max-width: 760px; margin-bottom: 6px; }
.term-keywords { font-size: 13px; color: var(--muted); }
[hidden] { display: none !important; }

/* Ипотека */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.calc-card { padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.calc-card h2 { margin-top: 0; font-size: 21px; }
.section-lead { font-size: 14px; color: var(--muted); }
.calc-form { display: grid; gap: 12px; margin-bottom: 14px; }
.calc-form label { display: grid; gap: 4px; font-size: 14px; }
.calc-form input { height: 40px; padding: 0 10px; border: 1px solid #9aa0a6; border-radius: 4px; font: inherit; }
.calc-form .btn { justify-self: start; }
.result-main { display: grid; gap: 2px; padding: 14px; margin-bottom: 10px; background: var(--soft); border-radius: 6px; }
.result-main span { font-size: 13px; color: var(--muted); }
.result-main strong { font: 700 26px/1.2 var(--serif); }
.result-cell { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.result-cell span { color: var(--muted); }
.result-cell strong { white-space: nowrap; }

/* Банки и обучение */
.bank h3, .card h3 { margin-bottom: 8px; }

/* Статьи */
.article-section { margin-bottom: 8px; }
.article .page-head { margin-bottom: 24px; }
.related { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; font-size: 20px; }

/* Поиск */
.search-page { position: relative; display: flex; flex-wrap: wrap; gap: 8px; max-width: 640px; margin-bottom: 18px; }
.search-page input { flex: 1 1 260px; height: 42px; padding: 0 12px; border: 1px solid #9aa0a6; border-radius: 4px; font: inherit; }
.search-page .live-results { top: 48px; }
.result-list { list-style: none; padding: 0; }
.result-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.result-list .row-meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.result-list .row-title { font: 700 18px/1.35 var(--serif); }
.result-list p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Подвал */
.site-footer { margin-top: 40px; padding: 28px 0; background: var(--soft); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-title { margin: 0 0 6px; font: 700 15px/1.3 var(--serif); color: var(--ink); }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }

/* Адаптив */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero img { aspect-ratio: 16 / 10; }
  .site-search { flex: 1 1 100%; margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .lede { font-size: 17px; }
  .complex-grid, .grid { grid-template-columns: 1fr; }
  .complex dl { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .main-nav { gap: 4px 12px; font-size: 13px; }
}
