:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --ink-2: #4a5a70;
  --line: #dfe5ee;
  --brand: #0b6bcb;
  --brand-ink: #ffffff;
  --brand-soft: #e6f1fc;
  --hero: #0b2a4a;
  --star: #f5a623;
  --star-empty: #d7dde6;
  --local: #1b7f4b;
  --local-soft: #e5f5ec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 14px rgba(15, 27, 45, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --surface: #152131;
    --ink: #e8eef6;
    --ink-2: #a3b2c6;
    --line: #253448;
    --brand: #4fa3f7;
    --brand-ink: #06121f;
    --brand-soft: #16304d;
    --hero: #0a1a2c;
    --star-empty: #3a4a60;
    --local: #5fd394;
    --local-soft: #16352a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { background: var(--hero); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.05rem; }
.logo strong { color: #7cc0ff; }
.header-nav { display: flex; gap: 20px; }
.header-nav a { color: #cfe2f7; text-decoration: none; font-size: .95rem; }
.header-nav a:hover { color: #fff; }

/* Hero */
.hero { background: var(--hero); color: #fff; padding: 40px 0 56px; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); max-width: 22ch; letter-spacing: -.01em; }
.lede { color: #c6d6ea; font-size: 1.1rem; max-width: 60ch; margin: 16px 0 28px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.hero-stats span { color: #9fb6d1; font-size: .9rem; }

/* Filters */
.directory { margin-top: -28px; padding-bottom: 48px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow);
}
.field { display: flex; }
.field-search { flex: 1 1 240px; }
.filters input[type="search"], .filters select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 42px;
}
.filters input:focus, .filters select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; color: var(--ink-2); white-space: nowrap; padding: 0 4px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.result-count { color: var(--ink-2); font-size: .9rem; margin: 18px 2px 10px; }

/* Shop cards */
.shops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.shop {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.shop[hidden] { display: none; }
.shop-head { display: flex; flex-direction: column; gap: 4px; }
.shop-name { font-size: 1.15rem; }
.rating { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: .92rem; width: fit-content; }
.rating-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.rating-count { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rating-none { color: var(--ink-2); font-size: .85rem; }
.stars { display: inline-flex; gap: 1px; }
.star {
  width: 16px; height: 16px;
  background: linear-gradient(90deg, var(--star) var(--fill), var(--star-empty) var(--fill));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tag-local { background: var(--local-soft); color: var(--local); }
.tag-muted { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.shop-addr { font-style: normal; color: var(--ink-2); font-size: .95rem; }
.shop-phone { font-weight: 600; font-size: 1.05rem; text-decoration: none; width: fit-content; font-variant-numeric: tabular-nums; }
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .92rem; text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.empty { text-align: center; color: var(--ink-2); padding: 32px 0; }
.fineprint { color: var(--ink-2); font-size: .85rem; max-width: 75ch; margin-top: 28px; }

/* City pages and city links */
.hero-city { padding-bottom: 48px; }
.hero-city h1 { max-width: none; }
.crumbs { font-size: .9rem; color: #9fb6d1; margin-bottom: 12px; }
.crumbs a { color: #cfe2f7; }
.hero-city + .directory { margin-top: -24px; }
.nearby { color: var(--ink-2); margin-top: 24px; }
.cities { padding-bottom: 48px; }
.cities h2 { font-size: 1.3rem; margin-bottom: 14px; }
.city-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.city-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600;
}
.city-links a:hover { border-color: var(--brand); color: var(--brand); }
.city-count { color: var(--ink-2); font-weight: 400; font-size: .85rem; white-space: nowrap; }

/* FAQ */
.faq { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0; }
.faq h2 { font-size: 1.3rem; margin-bottom: 14px; }
.faq-list { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 28px 14px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--ink-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 0 0 16px; }

/* Simple content pages */
.page { padding: 40px 16px 64px; max-width: 760px; }
.page h1 { font-size: 2rem; margin-bottom: 16px; }
.page h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.page p, .page li { color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--ink-2); font-size: .85rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 16px; }

@media (max-width: 560px) {
  .header-nav a[href="#directory"] { display: none; }
  .shops { grid-template-columns: 1fr; }
  .filters .field:not(.field-search) { flex: 1 1 calc(50% - 5px); }
  .hero-stats { gap: 20px; }
}
