/* site.css — NC Keys. Версия: 2026-09-30e
   Светлый фон, белые карточки, один «морской» акцент. Без JavaScript. */
:root {
  --bg: #f5f7f8;
  --card: #ffffff;
  --line: #dfe5e8;
  --text: #1c2429;
  --muted: #56636b;
  --accent: #0b5f73;        /* контраст с белым ≈ 7:1 */
  --accent-dark: #084a5a;
  --accent-soft: #e3f1f4;
  --radius: 10px;
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .4rem 0 .6rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .8rem; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }

/* Шапка */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 8px 0; }
.logo__mark { width: 28px; height: 28px; fill: var(--accent); flex: none; }
.logo__name { font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.logo__tag { color: var(--muted); font-size: .85rem; }
.top__nav { display: flex; gap: 16px; align-items: center; font-weight: 600; }
.top__nav a { text-decoration: none; }
.top__bot { background: var(--accent); color: #fff !important; padding: 6px 12px; border-radius: 999px; }
.top__bot:hover { background: var(--accent-dark); }
@media (max-width: 640px) { .logo__tag { display: none; } .top__nav { gap: 12px; font-size: .95rem; } }

/* Хлебные крошки */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 4px; }
.crumbs a { color: var(--muted); }

/* Кнопки */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 18px; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; text-align: center; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--accent); border: 1px solid var(--line); }

/* Главная */
.hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin-top: 18px; }
.hero h1 { font-size: 1.9rem; margin-top: 0; }
.hero__sub { color: var(--muted); margin: 0 0 16px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile__name { font-weight: 700; font-size: 1.1rem; margin: 0 0 6px; }
.tile__links { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.tile__links a { text-decoration: none; font-weight: 600; }
.tile__links span { color: var(--muted); font-weight: 400; }
.more { margin-top: 14px; }
.howto { background: var(--accent-soft); border-radius: var(--radius); padding: 4px 20px 10px; margin: 28px 0 8px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .hero h1 { font-size: 1.5rem; } }

/* Фильтры */
.filters { display: grid; gap: 10px 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.filters--compact { grid-template-columns: 1fr 1.4fr 1.4fr auto; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
.f select, .f input { font: 1rem var(--font); color: var(--text); padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; width: 100%; }
.f__pair { display: flex; gap: 6px; }
.f__pair input { flex: 1; }
.f__pair select { flex: 0 0 64px; }
.f--check { flex-direction: row; align-items: center; gap: 8px; padding-bottom: 10px; color: var(--text); }
.f--check input { width: 18px; height: 18px; }
.f--submit { height: 42px; }
.filters-box { margin: 12px 0 18px; }
.filters-box > summary { list-style: none; }
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box[open] > summary { margin-bottom: 12px; }
.filters-box .filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
@media (max-width: 900px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters--compact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .filters, .filters--compact { grid-template-columns: 1fr; } }

/* Заголовок списка, районы */
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.list-head__count { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; text-decoration: none; color: var(--text); font-size: .92rem; }
.chip span { color: var(--muted); margin-left: 2px; }
.chip--on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip--on span { color: #d6ecf1; }

/* Сетка карточек: 3 / 2 / 1 */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .grid, .grid--4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:hover { border-color: #b9c7cd; box-shadow: 0 2px 10px rgba(16, 40, 50, .07); }
.card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: #e8eef1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__nophoto { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.card__nophoto svg { width: 40px; height: 40px; fill: #b8c7ce; }
.badge { position: absolute; top: 10px; font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge--deal { left: 10px; background: #fff; color: var(--accent); }
.badge--count { right: 10px; background: rgba(20, 30, 36, .72); color: #fff; font-weight: 600; }
.card__body { padding: 12px 14px 14px; }
.card__body p { margin: 0; }
.card__price { font-size: 1.3rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.card__gbp { font-size: .85rem; font-weight: 500; color: var(--muted); }
.card__line { font-weight: 600; margin-top: 2px !important; }
.card__place { color: var(--text); }
.card__date { color: var(--muted); font-size: .85rem; margin-top: 4px !important; }

/* Страницы, пусто, ошибки */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 8px; }
.pager a, .pager span { min-width: 40px; padding: 8px 10px; text-align: center; border-radius: 8px; }
.pager a { background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager__cur { background: var(--accent); color: #fff; font-weight: 700; }
.pager__gap { color: var(--muted); }
.empty, .errorbox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.errorbox { margin-top: 30px; }
.notice--error { background: #fff4e5; border: 1px solid #f0c27a; border-radius: 8px; padding: 10px 14px; }

/* Объявление */
.lst__title { margin-top: 12px; }
.lst__cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: #e8eef1; scrollbar-width: thin; }
.gallery__item { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.gallery__item img { max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.gallery--empty { aspect-ratio: auto; padding: 40px 20px; color: var(--muted); text-align: center; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs a { flex: 0 0 96px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 96px; height: 72px; object-fit: cover; }
.lst__side { position: sticky; top: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel__price { font-size: 1.9rem; font-weight: 800; color: var(--accent); margin: 0; font-variant-numeric: tabular-nums; }
.panel__gbp { color: var(--muted); margin: 0 0 10px; }
.params { width: 100%; border-collapse: collapse; margin: 10px 0 16px; }
.params th, .params td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.params th { color: var(--muted); font-weight: 500; width: 42%; }
.btn--contact { display: block; width: 100%; font-size: 1.05rem; padding: 13px; }
.panel__note { color: var(--muted); font-size: .85rem; margin: 10px 0 6px; }
.panel__report { font-size: .85rem; color: var(--muted); margin: 0; }
.lst__desc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 16px; margin-top: 20px; max-width: 780px; }
.desc { white-space: pre-line; overflow-wrap: anywhere; }
.stickybar { display: none; }
.similar { margin-top: 10px; }
@media (max-width: 860px) {
  .lst__cols { grid-template-columns: 1fr; }
  .lst__side { position: static; }
  .stickybar { display: block; position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
  .stickybar .btn { display: block; width: 100%; padding: 13px; }
  .lst__side .btn--contact { display: none; }
}

/* Текстовые страницы */
.text { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 24px 18px; margin: 18px 0; max-width: 820px; }
.text pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.text code { font-size: .92em; }

/* Подвал */
.foot { margin-top: 40px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot__row { padding: 18px 16px 26px; }
.foot__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.foot p { margin: 6px 0; }
