/* FreeLocalYellowPages — design system. Mobile-first, no framework, WCAG 2.2 AA contrast. */
:root {
  --ink: #16181d; --ink-2: #3d4350; --muted: #5d6474; --line: #e3e5ea; --line-2: #cfd3db; --field-border: #8a919e;
  --bg: #ffffff; --bg-soft: #f6f7f9; --bg-warm: #fffaeb;
  --brand: #f5c400; --brand-ink: #1b1600; --brand-deep: #b38e00;
  --accent: #1747d1; --accent-ink: #ffffff; --accent-soft: #e9efff;
  --ok: #137a3a; --ok-soft: #e6f5ec; --warn: #8a5a00; --warn-soft: #fff3d6; --bad: #b42318; --bad-soft: #fde9e7;
  --sponsor: #6b4b00; --sponsor-soft: #fff6dc;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px; --header-h: 72px;
}
/* The hidden attribute always wins over component display rules (e.g. .btn's inline-flex). */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.envbar { background: #2b2f38; color: #ffe27a; text-align: center; font-size: .8rem; padding: 4px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding: 40px 0; }
.section-soft { background: var(--bg-soft); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.layout-side { display: grid; gap: 24px; }
@media (min-width: 960px) { .layout-side { grid-template-columns: minmax(0, 1fr) 320px; } .layout-side-left { grid-template-columns: 240px minmax(0, 1fr); } }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand b { background: var(--brand); padding: 0 5px; border-radius: 4px; color: var(--brand-ink); }
.main-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.main-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 2px; }
.main-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); }
.main-nav a.btn { color: var(--accent-ink); padding: 6px 12px; }
/* Phones: the nav wraps onto extra rows (every link, including Sign in and the CTA, stays visible) and the
   header scrolls away instead of covering up to a fifth of the viewport. */
@media (max-width: 640px) { .site-header { position: static; } html { scroll-padding-top: 8px; } .main-nav { width: 100%; justify-content: flex-start; gap: 2px 14px; padding-bottom: 4px; } .main-nav a { white-space: nowrap; } }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 56px; padding: 32px 0 20px; font-size: .92rem; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); } }
.footer-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.footer-grid a { display: block; color: var(--ink-2); text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-legal { margin-top: 20px; font-size: .8rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 0 0; margin: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 44px; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary, .btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-accent:hover { background: #1038a8; border-color: #1038a8; }
.btn-brand { background: var(--brand); border-color: var(--brand-deep); color: var(--brand-ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-sm { padding: 6px 10px; min-height: 34px; font-size: .9rem; }
.btn-block { width: 100%; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-height: 44px; }
::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-radius: var(--radius-sm); }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.hp { position: absolute; left: -5000px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }

/* Alerts, badges */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin: 16px 0; border: 1px solid; }
.alert-ok { background: var(--ok-soft); border-color: #b5e0c4; color: #0c4f26; }
.alert-error, .alert-bad { background: var(--bad-soft); border-color: #f5c2bd; color: #7a1710; }
.alert-warn, .alert-info { background: var(--warn-soft); border-color: #f1d79a; color: #5c3c00; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #b5e0c4; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #f1d79a; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: #f5c2bd; }
.badge-sponsor { background: var(--sponsor-soft); color: var(--sponsor); border-color: #ecd28d; text-transform: uppercase; letter-spacing: .04em; }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: #c7d5ff; }

/* Hero & search */
.hero { background: linear-gradient(180deg, var(--bg-warm), #fff); padding: 48px 0 36px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 760px; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 680px; }
.searchbar { display: grid; gap: 8px; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); max-width: 860px; }
@media (min-width: 720px) { .searchbar { grid-template-columns: 1.4fr 1fr auto; } }
.searchbar input { border: 1px solid var(--field-border); background: var(--bg-soft); }
.searchbar input:focus { border-color: var(--accent); background: #fff; }
.searchbar .loc { position: relative; }
.searchbar .geo-btn { position: absolute; right: 6px; top: 6px; min-height: 32px; padding: 4px 8px; font-size: .8rem; }
/* Reserve room for the visible geolocation button so typed text never runs underneath it. */
.searchbar .loc:has(.geo-btn:not([hidden])) input { padding-right: 140px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 4px; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--accent); }
.cat-tile { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; font-weight: 600; }
.cat-tile:hover { border-color: var(--accent); color: var(--accent); }
.cat-tile .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-warm); display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.biz-card { display: grid; gap: 10px; }
.biz-card .head { display: flex; gap: 12px; align-items: flex-start; }
.biz-card .logo { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); flex: none; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.biz-card h3 a { color: var(--ink); text-decoration: none; }
.biz-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.biz-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .88rem; color: var(--muted); }
.biz-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sponsored-block { border: 1px dashed #e0c169; background: var(--sponsor-soft); border-radius: var(--radius); padding: 12px; margin-bottom: 18px; }
.sponsored-block > .label { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sponsor); margin-bottom: 8px; display: block; }

/* Results / filters */
.results-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin: 20px 0 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select { width: auto; min-height: 36px; padding: 4px 8px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0; }
.pager a, .pager span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
#map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); }

/* Profile */
.profile-hero { padding: 24px 0; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.profile-hero .head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.profile-hero .logo { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hours-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hours-table td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.hours-table tr.today td { font-weight: 700; }
.unknown { color: var(--muted); font-style: italic; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos img { aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; width: 100%; }
.provenance { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; padding-top: 10px; }

/* Prose (answers/blog) */
.prose { font-size: 1.05rem; line-height: 1.7; }
.prose h2 { margin-top: 1.6em; } .prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .3em 0; }
.prose blockquote { border-left: 4px solid var(--brand); margin: 1em 0; padding: .2em 1em; background: var(--bg-warm); }
.answer-box { background: var(--accent-soft); border: 1px solid #c7d5ff; border-radius: var(--radius); padding: 16px 18px; font-size: 1.08rem; }
.answer-box strong.label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.sources ol { padding-left: 1.2em; font-size: .92rem; }

/* Tables (dashboard/admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .85rem; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.sidenav a:hover { background: var(--bg-soft); }
.sidenav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
@media (max-width: 959px) { .sidenav { flex-direction: row; overflow-x: auto; } .sidenav a { white-space: nowrap; } }
.progress { height: 10px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; background: var(--ok); }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.price { font-size: 2rem; font-weight: 800; } .price small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.plan.featured { border: 2px solid var(--accent); }

/* Regional sponsor banner (paid placement, always labelled) */
.region-banner { padding: 12px 0 4px; }
.region-banner .label { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sponsor); margin-bottom: 4px; }
.region-banner a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.region-banner img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; }
