:root {
  --background: #f5f7f8;
  --surface: #ffffff;
  --foreground: #18212b;
  --muted: #65717e;
  --border: #dce1e6;
  --accent: #087f78;
  --accent-soft: #e7f4f2;
  --area-accent: #a64b16;
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; margin: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.places-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.places-brand { color: var(--foreground); font-size: 18px; font-weight: 700; text-decoration: none; }
.places-total { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; }
.places-total strong { color: var(--foreground); font-size: 16px; font-variant-numeric: tabular-nums; }

.places-main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.places-heading { margin-bottom: 28px; }
.places-heading p { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 700; }
.places-heading h1 { max-width: 720px; margin: 0; font-size: 34px; font-weight: 700; letter-spacing: 0; line-height: 1.15; }
.localities { display: grid; gap: 12px; }

.locality-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 124px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.locality-card:hover { border-color: #aeb8c0; box-shadow: 0 8px 24px rgb(24 33 43 / 10%); transform: translateY(-1px); }
.locality-card:focus-visible { outline: 3px solid rgb(8 127 120 / 22%); outline-offset: 2px; }

.locality-content { min-width: 0; padding: 24px 28px; }
.locality-region { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.locality-content h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: 0; }
.locality-stats { display: flex; gap: 18px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.locality-stats strong { color: var(--area-accent); font-variant-numeric: tabular-nums; }

.locality-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 21px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .places-header { min-height: 58px; padding: 0 16px; }
  .places-main { width: calc(100% - 32px); padding: 40px 0 56px; }
  .places-heading h1 { font-size: 27px; }
  .locality-card { grid-template-columns: minmax(0, 1fr) 34px; min-height: 118px; }
  .locality-content { padding: 18px 16px; }
  .locality-region { font-size: 11px; }
  .locality-content h2 { font-size: 20px; }
  .locality-stats { display: grid; gap: 4px; margin-top: 12px; font-size: 12px; }
  .locality-arrow { width: 28px; height: 28px; font-size: 18px; }
}
