:root {
  --band: #0a2a47;
  --bg: #f6f7f9;
  --card: #fff;
  --line: #dde3ea;
  --ink: #1d242c;
  --muted: #5b6570;
  --accent: #0f3a5f;
  --accent-dark: #0a2a47;
  --call: #c75b12;
  --call-dark: #a34a0c;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --tint: #fdf3e3;
  --star: #dd7f1f;
  --shadow: 0 1px 2px rgba(29, 36, 44, .05), 0 2px 8px rgba(29, 36, 44, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
::selection { background: #fbe3bd; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* header band */
.top { background: var(--band); color: #fff; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-top: .85rem; padding-bottom: .85rem; }
.brand { color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.top a:focus-visible { outline-color: #fff; }
.status { font-size: .85rem; color: #c9d9ea; display: inline-flex; align-items: center; gap: .45rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: #f0a13c; box-shadow: 0 0 0 3px rgba(240, 161, 60, .25); }

/* town nav row */
.townnav { background: var(--card); border-bottom: 1px solid var(--line); }
.townnav .wrap { display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; padding-top: .55rem; padding-bottom: .55rem; font-size: .92rem; }
.townnav a { color: var(--muted); text-decoration: none; padding: .1rem 0; }
.townnav a:hover { color: var(--accent); }
.townnav a[aria-current] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* type */
h1 { font-family: var(--serif); font-size: 34px; line-height: 1.15; letter-spacing: -.015em; margin: 1.75rem 0 1rem; }
h2 { font-family: var(--serif); font-size: 22px; line-height: 1.25; margin: 2.25rem 0 1rem; }
h2::after { content: ""; display: block; width: 36px; height: 3px; background: var(--accent); margin-top: .5rem; border-radius: 2px; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .5rem; }
p { margin: 0 0 .9rem; }
address { font-style: normal; }

.crumbs { font-size: .9rem; color: var(--muted); margin-top: 1.25rem; }
.crumbs a { color: var(--muted); }
.answer { font-size: 19px; max-width: 62ch; }
.note { color: var(--muted); font-size: .92rem; margin-top: 1.75rem; }
.meta { color: var(--muted); font-variant: all-small-caps; letter-spacing: .04em; font-size: .95rem; }

/* stat band */
.stats { list-style: none; margin: 1.5rem 0; padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem 2.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  color: var(--muted); font-variant: all-small-caps; letter-spacing: .04em; }
.stats strong { display: block; font-size: 26px; line-height: 1.1; color: var(--accent); font-variant: normal; letter-spacing: 0; }

.how { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 1.1rem 1.25rem .3rem; margin: 1.75rem 0; }
.how h2 { margin-top: 0; font-size: 1.1rem; }
.how h2::after { display: none; }

/* town tiles */
.towns { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.towns a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.towns a:hover { border-color: #b9c9da; color: var(--ink); }
.towns strong { display: block; }
.towns span { display: block; color: var(--muted); font-size: .9rem; }
@media (min-width: 640px) { .towns { grid-template-columns: repeat(3, 1fr); } }

/* sort + filter controls (plain links to pre-built pages) */
.controls { margin: 1.25rem 0 .25rem; }
.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin: 0 0 .6rem; font-size: .92rem; }
.ctl-label { color: var(--muted); font-weight: 600; margin-right: .15rem; }
.ctl a, .ctl strong { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; }
.ctl a { color: var(--accent); }
.ctl a:hover { border-color: var(--star); color: var(--accent-dark); }
.ctl strong, .ctl a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ctl a.on:hover { color: #fff; }
.shown { color: var(--muted); font-size: .9rem; margin: .1rem 0 0; }
.card[hidden], .n[hidden] { display: none; }
.back { font-size: .95rem; margin: -.25rem 0 0; }
.back a::before { content: "← "; }

/* listing cards */
.cards { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: var(--shadow); }
.card:hover { border-color: #b9c9da; }
.card p, .card address { margin: 0 0 .35rem; }
.card h3 { display: flex; align-items: center; gap: .55rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.n { flex: none; display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; }
.rating { display: inline-block; background: var(--tint); color: var(--ink); font-weight: 600; font-size: .92rem; border-radius: 999px; padding: .2rem .75rem; }
.rating::before { content: "★"; color: var(--star); margin-right: .35rem; }
.card .rating { margin-bottom: .6rem; }
.hours { color: var(--muted); }
.card .meta { margin: .6rem 0 0; padding-top: .6rem; border-top: 1px solid var(--line); }

/* the phone number is the main action */
.call {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 18px; margin: .25rem 0 .6rem;
  background: var(--call); color: #fff; border-radius: 12px;
  font-size: 1.2rem; font-weight: 700; text-decoration: none; letter-spacing: .01em;
}
.call:hover { background: var(--call-dark); color: #fff; }
.call:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
@media (min-width: 640px) { .card .call { display: inline-flex; } }
.call.big { font-size: 1.4rem; min-height: 56px; margin: .75rem 0 .5rem; }
.rating.big { font-size: 1.02rem; padding: .3rem .9rem; }

/* company info block */
.info { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: var(--shadow); }
.info h2 { font-family: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.1rem 0 .2rem; }
.info h2::after { display: none; }
.info p, .info address { margin-bottom: .2rem; }
.facts { margin-top: 1.5rem; max-width: 62ch; }

/* full list */
.compact { list-style: none; padding: 0 1rem; margin: 0 0 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.compact li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.compact li:last-child { border-bottom: 0; }
.compact .tel { white-space: nowrap; font-weight: 600; text-decoration: none; }
main > h3 { margin-top: 1.5rem; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 3rem; padding: 1.25rem 0 2rem; color: var(--muted); font-size: .9rem; }
.foot p { margin: 0 0 .35rem; }
.foot .updated { font-size: .82rem; }
.foot a { color: var(--muted); }

/* ---------- DESIGN-V4: desktop (>=1024px). Nothing below this line applies to phones/tablets. ---------- */
@media (min-width: 1024px) {
  .wrap { max-width: 1160px; padding: 0 2rem; }
  h1 { font-size: 42px; }
  main > p:not(.answer), .facts, .note { max-width: 75ch; }

  /* header: one line, sticky */
  .top { position: sticky; top: 0; z-index: 30; }
  .top .wrap { flex-wrap: nowrap; height: 56px; padding-top: 0; padding-bottom: 0; }
  .status { white-space: nowrap; }

  /* sort/filter bar sticks under the header while its list scrolls */
  .listing > .controls { position: sticky; top: 56px; z-index: 20; background: var(--bg); margin: 1rem 0 0; padding: .75rem 0 .4rem;
    border-bottom: 1px solid var(--line); box-shadow: 0 8px 8px -8px rgba(29, 36, 44, .12); }
  .listing > .controls .ctl { margin-bottom: .45rem; }
  .listing > .cards { margin-top: 1rem; }

  /* listing cards: two columns; info left, call button right */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  /* rows 1-6 hold the info lines, row 7 absorbs extra height in a taller grid row, row 8 is the meta line */
  .card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: repeat(6, auto) 1fr auto; column-gap: 1.25rem; row-gap: 0; }
  .card > * { grid-column: 1; }
  .card > .rating { justify-self: start; }
  .card > p:has(> .call) { grid-column: 2; grid-row: 1 / span 6; align-self: center; margin: 0; }
  .card .call { display: flex; min-width: 12.5rem; margin: 0; }
  .card > .meta { grid-column: 1 / -1; grid-row: 8; }

  /* homepage */
  .overview { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; margin: 1.75rem 0; }
  .overview > .stats, .overview > .how { margin: 0; }
  .overview > .stats { align-content: center; justify-content: space-around; }
  .towns { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .compact { columns: 2; column-gap: 2.5rem; }
  .compact li { break-inside: avoid; }

  /* company page: details left, call + hours rail right */
  .co { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 2.5rem; row-gap: 0; align-items: start; }
  .co > * { grid-column: 1; }
  .co > .info { display: contents; }
  .co > .info > .rating { justify-self: start; }
  .co .rail { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: 76px; margin-top: 1.75rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; box-shadow: var(--shadow); }
  .co .rail .call.big { margin-top: 0; }
  .co .rail h2 { margin-top: 1.25rem; }

  /* footer: three columns */
  .foot .wrap { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: .5rem 2rem; align-items: start; }
}
@media (min-width: 1024px) and (hover: hover) {
  .card:hover, .towns a:hover { box-shadow: 0 2px 4px rgba(29, 36, 44, .06), 0 10px 24px rgba(29, 36, 44, .09); }
  .ctl a:hover { background: #fdf3e3; }
}
