:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #111318;
  --muted: #5f6672;
  --soft-muted: #7a828e;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --surface-blue: #edf4ff;
  --accent: #1769e8;
  --accent-strong: #0f5fcf;
  --accent-dark: #0b4fac;
  --line: #d5d9df;
  --line-soft: #e7e9ed;
  --success: #18794e;
  --success-bg: #edf9f2;
  --warning: #8a5a00;
  --warning-bg: #fff8e8;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --radius: 1.05rem;
  --shadow-hover: 0 14px 34px rgba(15, 76, 170, 0.1);
  --font: "Segoe UI", Arial, sans-serif;
  --font-display: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgba(23, 105, 232, 0.055), transparent 24rem),
    var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  background: #111318;
  color: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { color: #fff; transform: translateY(0); }

:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  min-height: 5.4rem;
  border-bottom: 1px solid #e2e5e9;
  background: rgba(255, 255, 255, 0.96);
}

.header-frame,
.footer-frame {
  width: min(92vw, 1460px);
  margin: 0 auto;
}

.header-frame {
  min-height: 5.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #101216;
  text-decoration: none;
}

.brand:hover { color: #101216; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  border: 1px solid #cfe0fb;
  border-radius: 0.78rem;
  background: var(--surface-blue);
}

.brand-mark span {
  width: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.brand-mark span:nth-child(1) { height: 9px; opacity: 0.62; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: 0.78; }

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}
.brand-copy small { margin-top: 0.22rem; color: #68707c; font-size: 0.72rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a {
  padding: 0.58rem 0.82rem;
  border-radius: 0.72rem;
  color: #343a44;
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.main-nav a:hover { background: var(--surface-blue); color: var(--accent-strong); }

main {
  width: min(92vw, 1460px);
  min-height: calc(100vh - 11rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 5rem) 0;
}

footer {
  border-top: 1px solid var(--line-soft);
  background: var(--surface-soft);
  color: var(--muted);
}

.footer-frame {
  min-height: 5.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 0.86rem;
}

.footer-frame strong { color: #242933; font-family: var(--font-display); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.footer-links a { color: var(--accent-strong); font-weight: 650; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: #111318;
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  margin: 0.7rem 0 1rem;
  font-size: clamp(2.15rem, 4vw, 3.7rem);
  font-weight: 580;
  letter-spacing: -0.052em;
  line-height: 1.04;
}

h2 { margin: 2.35rem 0 0.9rem; font-size: clamp(1.35rem, 2vw, 1.8rem); letter-spacing: -0.025em; }
h3 { margin: 0.15rem 0 0.45rem; font-size: 1.13rem; letter-spacing: -0.015em; }
p { text-wrap: pretty; }

.hero {
  width: min(100%, 1120px);
  margin: clamp(1.4rem, 4vw, 3.4rem) auto clamp(2.6rem, 5vw, 4.3rem);
  text-align: center;
}

.hero h1 {
  max-width: 1050px;
  margin: 0.9rem auto 1.25rem;
  font-size: clamp(2.7rem, 5.6vw, 5.5rem);
  font-weight: 560;
  line-height: 1.02;
}

.hero > p:not(.eyebrow) {
  max-width: 820px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumbs a { color: var(--accent-strong); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.card {
  position: relative;
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  border: 1px solid #cfd4db;
  border-radius: var(--radius);
  background: var(--surface);
  color: #15181e;
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.clickable-card { cursor: pointer; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.card p:last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }
.business h2 { margin: 0.45rem 0 0.2rem; font-size: 1.28rem; }
.business small { color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.27rem 0.64rem;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 720;
}

.button,
button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.72rem;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  border-color: var(--accent-dark);
  background: var(--accent-strong);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(23, 105, 232, 0.16);
}

button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; box-shadow: none; }
.danger { border-color: var(--danger); background: var(--danger); }
.danger:hover { border-color: #8f1b13; background: #991f16; }

form { max-width: 520px; display: grid; gap: 0.9rem; }
label { display: grid; gap: 0.38rem; color: #292e37; font-size: 0.9rem; font-weight: 680; }

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c8ced7;
  border-radius: 0.68rem;
  background: #ffffff;
  color: var(--foreground);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input::placeholder,
textarea::placeholder { color: #969da8; }

input:hover,
select:hover,
textarea:hover { border-color: #aab3c0; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.11);
  outline: none;
}

textarea { min-height: 8rem; resize: vertical; }

.filters {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: start;
  margin-bottom: 1.2rem;
  padding: clamp(1.1rem, 2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 0.55rem; color: #242933; font-size: 0.88rem; font-weight: 760; }

.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.48rem;
  font-weight: 430;
}

.check input { width: 1rem; min-height: 1rem; accent-color: var(--accent); }
.check span { color: var(--muted); }
.facet-search input { min-height: 2.35rem; margin-bottom: 0.42rem; padding: 0.48rem 0.62rem; background: #fff; }
.facet-options { max-height: 210px; overflow: auto; padding-right: 0.3rem; scrollbar-color: #c4cad3 transparent; }
.city-search { display: grid; gap: 0.38rem; margin-bottom: 0.65rem; color: #4d5663; font-size: 0.8rem; font-weight: 650; }
.city-search input { min-height: 2.35rem; padding: 0.48rem 0.62rem; background: #fff; }
.facet-subtitle { display: block; margin: 0 0 0.42rem; color: var(--muted); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.045em; }

.filter-actions,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin: 1rem 0;
}

.filter-actions { align-self: end; }
.actions form { display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 1.25rem; }
.chips a { text-decoration: none; }

.detail { max-width: 840px; }
.legal-page { max-width: 820px; }
.legal-page h2 { margin-top: 2rem; }
.legal-page li { margin: 0.45rem 0; }
.detail > p { color: #4e5662; }
.detail > h2 { margin-top: 2.6rem; }
.detail .alert { margin: 1.5rem 0; }
.business-hero { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; align-items: center; gap: clamp(1.2rem, 4vw, 2.4rem); margin: 1.6rem 0; }
.business-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.business-cover-placeholder { display: grid; place-items: center; color: var(--accent); font-family: var(--font-display); font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 650; }
.business-logo { display: block; width: auto; max-width: 160px; height: 56px; margin-bottom: 0.7rem; object-fit: contain; object-position: left center; }
.contact-card { margin: 1.6rem 0; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface-soft); }
.contact-card h2 { margin: 0 0 0.65rem; font-size: 1.2rem; }
.contact-card p { margin: 0.3rem 0 0.85rem; color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.secondary-button { border-color: #b8cbea; background: #fff; color: var(--accent-strong); }
.secondary-button:hover { border-color: var(--accent); background: var(--surface-blue); color: var(--accent-dark); }

.request-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

.request-links a { color: var(--accent-strong); font-size: 0.88rem; font-weight: 650; text-decoration: none; }
.request-links a:hover { text-decoration: underline; }

.pagination { justify-content: center; margin: 2.2rem 0 0; align-items: center; }

.table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
}

table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem; }
th, td { padding: 0.78rem 0.88rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); color: #404751; font-size: 0.76rem; font-weight: 780; letter-spacing: 0.035em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcff; }
td a { color: var(--accent-strong); font-weight: 620; }

.success,
.alert {
  padding: 1rem 1.1rem;
  border-radius: 0.8rem;
}

.success { border: 1px solid #a8dec0; background: var(--success-bg); color: #145d3d; }
.alert { border: 1px solid #ecd28f; background: var(--warning-bg); color: #6f4a05; }

.status { font-weight: 760; }
.status-insert { color: var(--success); }
.status-update { color: var(--warning); }
.status-review { color: var(--danger); }
.status-ignore { color: var(--muted); }

.editor {
  max-width: 900px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.2rem 0;
  padding: clamp(1.15rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.editor label:has(textarea),
.editor fieldset,
.editor button { grid-column: 1 / -1; }

.search-form { display: flex; max-width: 720px; align-items: end; gap: 0.7rem; margin: 1rem 0 1.25rem; }
.search-form label { flex: 1; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.stat { min-height: 8.2rem; }
.stat strong { display: block; color: var(--accent-strong); font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 620; letter-spacing: -0.04em; }
.stat small { display: block; margin-top: 0.4rem; color: var(--muted); font-weight: 430; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.card-meta span { padding: 0.22rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.78rem; background: var(--surface); }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1rem; }
dt { color: #333943; font-weight: 760; }
dd { margin: 0; color: var(--muted); }

.code-block {
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid #26314a;
  border-radius: 0.8rem;
  background: #0d1424;
  color: #e9efff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sr-only,
.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 720px) {
  .header-frame { align-items: flex-start; }
  .brand-copy small { display: none; }
  .main-nav { align-items: stretch; flex-direction: column; gap: 0; }
  .main-nav a { padding: 0.34rem 0.55rem; font-size: 0.82rem; }
  main { padding-top: 2.2rem; }
  .hero { margin-top: 1.5rem; }
  .editor { grid-template-columns: 1fr; }
  .search-form { align-items: stretch; flex-direction: column; }
  .footer-frame { align-items: flex-start; flex-direction: column; justify-content: center; }
  .business-hero { grid-template-columns: 1fr; }
  .business-cover { max-height: 260px; }
  dl { grid-template-columns: 1fr; gap: 0.1rem; }
  dd { margin-bottom: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
