:root {
  color-scheme: light;
  --ink: #231f20;
  --muted: #625c5d;
  --red: #981f33;
  --red-dark: #701426;
  --blue: #0b4778;
  --cream: #f4f0bd;
  --line: #d8d2c7;
  --paper: #fff;
  --shadow: 0 10px 28px rgba(20, 35, 50, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #8de4ff url("/Background.png") repeat;
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--blue); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }

.directory-shell {
  width: min(100% - 24px, 1120px);
  margin: 24px auto;
  background: var(--paper);
  border: 2px solid #00008b;
  box-shadow: var(--shadow);
}

.directory-header { padding: 12px 18px 0; }
.directory-logo { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.directory-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.directory-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #655d5d;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.directory-nav a:hover { background: var(--cream); }
.directory-content { padding: clamp(18px, 4vw, 40px); }
.breadcrumbs { margin: 0 0 16px; color: var(--muted); font-size: .93rem; }
.breadcrumbs a { color: inherit; }
h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.05; }
h2 { margin: 30px 0 12px; font-size: clamp(1.4rem, 3vw, 2rem); }
p { margin: 8px 0; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.1rem; }

.browse-groups { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin: 24px 0; }
.browse-groups h2 { margin: 0 0 10px; font-size: 1.15rem; }
.browse-links { display: flex; flex-wrap: wrap; gap: 7px; }
.browse-links a { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #f7f6f1; color: var(--ink); font-size: .9rem; text-decoration: none; }
.browse-links a:hover { border-color: var(--red); background: var(--cream); }
.browse-links span { color: var(--muted); font-size: .78rem; }

.directory-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 26px 0 18px;
  padding: 16px;
  background: #f7f6f1;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.directory-controls label { display: block; margin-bottom: 4px; font-weight: 750; }
.directory-controls input,
.directory-controls select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #817a79;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.button,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #655d5d;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover { background: var(--cream); color: var(--ink); }
.button-primary { background: var(--red); border-color: var(--red-dark); color: white; }
.button-primary:hover { background: var(--red-dark); color: white; }
.result-status { margin: 0 0 14px; color: var(--muted); font-weight: 650; }

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.place-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: 9px;
  background: white;
  box-shadow: 0 4px 14px rgba(20, 35, 50, .07);
}

.place-card[hidden] { display: none; }
.place-card h2,
.place-card h3 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.25; }
.place-card h2 a,
.place-card h3 a { color: var(--ink); text-decoration: none; }
.place-card h2 a:hover,
.place-card h3 a:hover { color: var(--red); text-decoration: underline; }
.place-card-meta { color: var(--muted); }
.place-card-tags { margin-top: 9px; }
.tag {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf5fa;
  color: #174c70;
  font-size: .82rem;
  font-weight: 750;
}
.place-card-link { margin-top: auto; padding-top: 14px; font-weight: 750; }
.empty-results { padding: 24px; border: 1px dashed var(--line); text-align: center; }

.place-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.place-eyebrow { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.rating-card { min-width: 272px; padding: 14px; border-radius: 9px; background: var(--cream); }
.listing-basket-rating { display: flex; gap: 5px; }
.listing-rating-basket { position: relative; display: block; width: 44px; height: 34px; flex: 0 0 44px; }
.listing-rating-basket::before,
.listing-rating-basket-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 34px;
  background: #c9c9c9;
  -webkit-mask: url('/bushel_basket.svg') center / contain no-repeat;
  mask: url('/bushel_basket.svg') center / contain no-repeat;
}
.listing-rating-basket-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.listing-rating-basket-fill::before { background: #bc7918; }
.rating-card p { margin: 6px 0 0; }
.rating-card .rating-source { color: #59534b; font-size: .75rem; }

.place-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 30px; margin-top: 25px; }
.place-layout-logo { grid-template-columns: minmax(0, 1.5fr) minmax(160px, .45fr) minmax(260px, .7fr); }
.listing-business-logo { align-self: start; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.listing-business-logo img { display: block; width: 100%; height: auto; }
.place-facts { display: grid; grid-template-columns: minmax(115px, .35fr) 1fr; margin: 0; border-top: 1px solid var(--line); }
.place-facts dt,
.place-facts dd { margin: 0; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.place-facts dt { font-weight: 800; }
.place-facts dd { overflow-wrap: anywhere; }
.action-stack { display: grid; gap: 9px; align-content: start; }
.notice { padding: 13px 15px; border-left: 5px solid var(--blue); background: #edf5fa; }
.listing-shop-ad { display: flex; align-items: center; gap: 24px; margin: 30px 0; padding: 24px; border: 2px solid var(--red); border-radius: 14px; background: #fff9e6; color: var(--ink); }
.listing-shop-art { display: block; flex: 0 0 130px; color: var(--red); }
.listing-shop-art img { display: block; width: 100%; height: auto; }
.listing-shop-copy { flex: 1; min-width: 0; }
.listing-shop-copy .listing-shop-label { margin: 0 0 8px; color: #655b50; font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.listing-shop-copy h2 { margin: 0 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.15; }
.listing-shop-copy p { margin: 0; line-height: 1.5; }
.listing-shop-cta,
.listing-shop-cta:visited { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 44px; padding: 10px 18px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 800; text-decoration: none; }
.listing-shop-cta:hover { background: #751728; text-decoration: underline; }
.listing-shop-art:focus-visible,
.listing-shop-cta:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.nearby-section { margin-top: 34px; padding-top: 4px; border-top: 1px solid var(--line); }
.directory-footer { padding: 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

@media (max-width: 780px) {
  .directory-shell { width: min(100% - 12px, 1120px); margin: 6px auto; }
  .directory-header { padding: 8px 8px 0; }
  .directory-nav { padding: 8px; }
  .directory-content { padding: 20px 14px 28px; }
  .directory-controls { grid-template-columns: 1fr; }
  .browse-groups { grid-template-columns: 1fr; }
  .place-hero,
  .place-layout { grid-template-columns: 1fr; }
  .rating-card { min-width: 0; width: 100%; }
  .listing-shop-ad { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .listing-shop-art { width: 82px; }
  .listing-shop-copy h2 { font-size: 1.2rem; }
  .listing-shop-copy p { font-size: .84rem; }
  .listing-shop-copy .listing-shop-label { font-size: .58rem; letter-spacing: .06em; }
  .listing-shop-cta { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 480px) {
  .place-grid { grid-template-columns: 1fr; }
  .place-facts { grid-template-columns: 1fr; }
  .place-facts dt { padding-bottom: 0; border-bottom: 0; }
  .place-facts dd { padding-top: 3px; }
  .directory-nav a { flex: 1 1 auto; justify-content: center; }
}

@media print {
  body { background: white; }
  .directory-shell { width: 100%; margin: 0; border: 0; box-shadow: none; }
  .directory-nav, .directory-controls, .share-actions { display: none; }
}
