/* Главная с выбором города: общая тема публичных страниц, локальная композиция. */
body[data-city-home] main.wrap { padding-top: 32px; padding-bottom: 40px; }
body[data-city-home].has-comparison { padding-bottom: 0; }
body[data-city-home] :is(#cities, #about, #contacts) { scroll-margin-top: 88px; }
body[data-city-home] .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.city-home-intro { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 32px; }
.city-home-eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.city-home-intro h1 { margin: 0; font-size: 34px; line-height: 40px; font-weight: 700; text-wrap: balance; }
.city-home-lead { max-width: 64ch; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 24px; }
.city-home-intro #geo-status { margin: 12px 0 0; color: var(--muted); }
.city-home-stats { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.city-home-stats > div { display: flex; flex-direction: column-reverse; gap: 4px; }
.city-home-stats dt { color: var(--muted); font-size: 12px; line-height: 20px; }
.city-home-stats dd { margin: 0; color: var(--ink); font-size: 28px; font-weight: 650; line-height: 32px;  }
.city-home-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.city-home-section-head h2, .city-home-contact h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 650; }
.city-home-search { width: 320px; max-width: 100%; }
.city-home-search[hidden] { display: none; }
.city-home-search-field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--field-border); border-radius: var(--field-radius); background: var(--panel); }
.city-home-search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--field-ring); }
.city-home-search-field > .icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--muted); }
.city-home-search-field input { min-width: 0; width: 100%; height: 42px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; }
.city-home-search-field input::placeholder { color: var(--muted); opacity: 1; }
.city-home-search-field input:focus { box-shadow: none; }
.city-home-search-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 12px 0 16px; color: var(--muted); font-size: 13px; line-height: 20px; }
.city-home-search-note p { margin: 0; }
.city-home-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
body[data-city-home] .city-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; min-height: 100px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none; transition: background-color 200ms ease; }
body[data-city-home] .city-card:hover { background: var(--accent-soft); color: var(--ink); }
body[data-city-home] .city-card:active { background: var(--surface); }
.city-card-copy { display: grid; gap: 8px; min-width: 0; }
.city-card-name { font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.city-card-meta { color: var(--muted); font-size: 12px; line-height: 18px; }
.city-card-meta strong { color: var(--ink); font-weight: 600; }
.city-card-arrow { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--accent); }
.city-card-arrow .icon { width: 16px; height: 16px; }
body[data-city-home] .city-card[hidden] { display: none; }
.city-home-no-results { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.city-home-no-results p { margin: 0 0 12px; color: var(--muted); }
.city-home-reset { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; transition: background-color 200ms ease; }
.city-home-reset:hover { background: var(--accent-soft); }
.city-home-nearby { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.city-home-nearby > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 20px; color: var(--ink); font-weight: 500; cursor: pointer; list-style: none; }
.city-home-nearby > summary::-webkit-details-marker { display: none; }
.city-home-nearby > summary:hover { color: var(--accent); }
.city-home-nearby-count { color: var(--muted); font-size: 12px; }
.city-home-nearby > summary > .icon { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; transition: transform 200ms ease; }
.city-home-nearby[open] > summary > .icon { transform: rotate(180deg); }
.city-home-nearby > p { max-width: 80ch; margin: 0; padding: 4px 20px 16px; color: var(--muted); font-size: 13px; line-height: 20px; }
.city-nearby-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; padding: 0 20px 20px; }
.city-nearby-group h3 { margin: 0 0 4px; font-size: 14px; line-height: 22px; font-weight: 600; }
.city-nearby-group h3 a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.city-nearby-group h3 .icon { width: 14px; height: 14px; }
.city-nearby-group ul { margin: 0; padding: 0; list-style: none; }
body[data-city-home] .city-nearby-group li a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: 13px; line-height: 20px; }
body[data-city-home] .city-nearby-group li a:hover { color: var(--accent); text-decoration: underline; }
.city-home-about { margin-top: 32px; }
.city-home-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.city-home-guide article { position: relative; min-width: 0; padding-left: 44px; }
.city-home-guide-icon { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.city-home-guide-icon .icon { width: 18px; height: 18px; }
.city-home-guide h3 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.city-home-guide p { max-width: 42ch; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.city-home-data-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.city-home-contact { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.city-home-contact p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.city-home-email { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 16px; min-height: 44px; font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.city-home-email .icon { flex-shrink: 0; width: 18px; height: 18px; }
@media (max-width: 1100px) {
  .city-home-intro { align-items: start; gap: 24px; }
  .city-home-stats { gap: 20px; padding: 16px; }
  .city-home-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .city-nearby-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .city-home-intro { flex-direction: column; }
  .city-home-stats { width: 100%; gap: 24px; }
  .city-home-stats > div { flex-direction: row-reverse; align-items: baseline; justify-content: flex-end; gap: 8px; }
  .city-home-stats dd { font-size: 24px; line-height: 28px; }
  .city-home-links, .city-nearby-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .city-home-guide { gap: 20px; }
  .city-home-guide article { padding: 0; }
  .city-home-guide-icon { position: static; margin-bottom: 12px; }
}
@media (max-width: 767px) {
  body[data-city-home] main.wrap { padding-top: 24px; }
  .city-home-intro { gap: 20px; padding-bottom: 24px; }
  .city-home-intro h1 { font-size: 32px; line-height: 38px; }
  .city-home-lead { font-size: 14px; line-height: 22px; }
  .city-home-stats { padding: 12px 16px; }
  .city-home-stats > div { flex-direction: column-reverse; gap: 2px; }
  .city-home-section-head h2, .city-home-contact h2 { font-size: 20px; line-height: 26px; }
  .city-home-search { width: 100%; }
  .city-home-guide { grid-template-columns: minmax(0, 1fr); }
  .city-home-guide article { padding-left: 44px; }
  .city-home-guide-icon { position: absolute; margin-bottom: 0; }
  .city-home-guide p { max-width: none; }
  .city-home-contact { align-items: start; flex-direction: column; gap: 12px; padding: 20px; }
  .city-home-email { font-size: 17px; }
  .city-nearby-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-city-home] .city-nearby-group li a { min-height: 44px; }
}
@media (max-width: 540px) {
  .city-home-links { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body[data-city-home] .city-card { min-height: 80px; padding: 16px; }
  .city-card-copy { gap: 4px; }
  .city-home-nearby > summary { gap: 8px; padding-inline: 16px; }
  .city-home-nearby > p { padding-inline: 16px; }
  .city-nearby-groups { grid-template-columns: minmax(0, 1fr); padding-inline: 16px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-city-home] .city-card, .city-home-nearby > summary > .icon, .city-home-reset { transition: none; }
}
