:root {
  color-scheme: light;
  --paper: #f7f3e8;
  --card: #fffdf6;
  --ink: #172f2a;
  --muted: #4c6057;
  --accent: #9c3223;
  --line: #c9c8b7;
  --wash: #e9eee4;
  font: 16px/1.55 system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, .brand, .footer-brand { font-family: Georgia, serif; }
h1, h2, p { margin: 0; }
h1 { line-height: .98; letter-spacing: -.055em; font-weight: 500; font-size: clamp(2.7rem, 6vw, 5.4rem); text-wrap: balance; }
h2 { line-height: 1.12; letter-spacing: -.025em; font-weight: 600; font-size: clamp(1.35rem, 2.8vw, 2rem); }
a { color: inherit; text-decoration-thickness: .075em; text-underline-offset: .21em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #aa3825; outline-offset: 4px; }
img { display: block; max-width: 100%; }
button, select, input { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: absolute; z-index: 1100; left: 1rem; top: .5rem; transform: translateY(-200%); padding: .5rem; background: var(--card); }
.skip:focus { transform: none; }
.topbar { border-bottom: 1px solid var(--line); background: var(--card); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 5.5rem; }
.brand { display: inline-flex; gap: .35rem; align-items: baseline; text-decoration: none; font-size: 1.65rem; line-height: 1; letter-spacing: -.055em; }
.brand span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
nav a { font-size: .92rem; font-weight: 650; text-decoration: none; padding-block: .6rem; }
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
main { flex: 1; padding-bottom: 4rem; }
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 29rem; margin-block: 2rem 0; border: 1px solid var(--line); background: var(--card); }
.hero-copy { align-self: center; padding: clamp(1.4rem, 4vw, 4rem); }
.hero h1 { margin-block: 1rem; }
.hero-copy > p:not(.eyebrow), .page-heading > p:not(.eyebrow) { max-width: 38rem; color: var(--muted); font-size: 1.12rem; }
.hero-photo { width: 100%; height: 100%; min-height: 16rem; object-fit: cover; }
.eyebrow { color: var(--accent); font-weight: 750; letter-spacing: .11em; text-transform: uppercase; font-size: .72rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: .85rem; row-gap: .5rem; margin-top: 1.15rem; }
.button { display: inline-flex; align-items: center; min-height: 2.8rem; border: 1px solid var(--ink); padding: .55rem .95rem; background: var(--ink); color: var(--card); text-decoration: none; font-weight: 650; line-height: 1.2; }
.button:hover { background: var(--accent); border-color: var(--accent); color: white; }
.button.outline { background: transparent; color: var(--ink); }
.button.outline:hover { color: var(--accent); border-color: var(--accent); }
.button.small { font-size: .86rem; }
.text-link { font-weight: 650; }
.brief { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding: .95rem 1.15rem; background: var(--wash); border: 1px solid var(--line); border-top: 0; font-size: .88rem; }
.brief a { margin-left: auto; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2.3rem; border-block: 1px solid var(--line); }
.features > div { padding: 1.3rem; border-right: 1px solid var(--line); }
.features > div:last-child { border-right: 0; }
.features p { color: var(--muted); margin-top: .55rem; }
.page-heading { padding-block: 3rem 1.75rem; }
.page-heading h1 { margin-bottom: .85rem; }
.page-heading .eyebrow { margin-bottom: .7rem; }
.filters { display: grid; grid-template-columns: minmax(12rem, 1.6fr) repeat(3, minmax(7rem, 1fr)) auto; gap: .8rem; align-items: end; padding: 1rem; background: var(--wash); border: 1px solid var(--line); }
.filters label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 650; }
.filters :is(input, select) { width: 100%; min-height: 2.8rem; padding: .5rem .65rem; color: var(--ink); background: var(--card); border: 1px solid #75867a; font-size: .95rem; border-radius: 0; }
.directory-count { margin-block: 1rem; font-size: .88rem; font-weight: 650; }
.empty { padding: 1rem; background: var(--card); border: 1px solid var(--line); }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.shop-card { background: var(--card); padding: 1.15rem; border: 1px solid var(--line); min-width: 0; }
.shop-card[data-active] { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.shop-card h2 { font-size: 1.5rem; margin-block: .25rem .4rem; }
.shop-title { display: flex; gap: .7rem; align-items: flex-start; }
.address, .note, .byline, .styles, .map-note, figcaption { color: var(--muted); }
.styles { margin-top: .75rem; font-size: .88rem; }
.price-line { margin-top: .4rem; }
.price-line strong { font-variant-numeric: tabular-nums; }
.note { font-size: .88rem; margin-top: 1rem; }
.with-map { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.with-map .shop-grid { grid-template-columns: 1fr; }
.with-map:has(.map-panel[hidden]) { display: block; }
.map-panel { position: sticky; top: .7rem; background: var(--card); border: 1px solid var(--line); }
#map { width: 100%; height: clamp(23rem, 64vh, 39rem); background: var(--wash); }
.map-note { font-size: .82rem; padding: .6rem .8rem; }
.map-marker, .pin-button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 2px solid white; border-radius: 50%; background: var(--ink); color: white; font: 700 .88rem system-ui; }
.map-marker.is-active, .pin-button[aria-pressed="true"] { background: var(--accent); }
.pin-button { min-width: 2.5rem; min-height: 2.5rem; margin-top: .3rem; }
.map-popup { display: grid; gap: .4rem; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.story-card { background: var(--card); border: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; }
.story-card img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.story-card > div { padding: 1.1rem; }
.story-card h2 { margin-block: .45rem; }
.story-card p:not(.eyebrow) { margin-bottom: .7rem; color: var(--muted); }
.reading { max-width: 50rem; margin-inline: auto; }
.reading .page-heading { padding-block: 1.2rem .65rem; }
.reading h1 { font-size: clamp(2.5rem, 5.2vw, 4.7rem); }
.reading .back { padding-top: 1.4rem; font-size: .9rem; }
.reading h2 { margin-block: 1.5rem .5rem; }
.reading :is(section, p:not(.eyebrow), li) { max-width: 67ch; }
.reading .styles { margin-bottom: .55rem; }
.reading figure { margin: 1.25rem 0; }
.reading figure img { width: 100%; height: auto; max-height: 24rem; object-fit: cover; }
figcaption, .byline { font-size: .83rem; }
figcaption { margin-top: .4rem; }
.table-wrap { overflow-x: auto; margin-block: 1.25rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
caption { text-align: left; padding-bottom: .5rem; font-size: .86rem; }
th, td { padding: .6rem .7rem; text-align: left; border: 1px solid var(--line); }
thead { background: var(--wash); }
tbody td { font-variant-numeric: tabular-nums; }
.footer { border-top: 1px solid var(--line); background: var(--wash); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem 2rem; padding-block: 1.35rem; }
.footer-brand { font-weight: 700; font-size: 1.3rem; }
.footer p, .footer-inner > div + div { color: var(--muted); font-size: .88rem; }
.footer-inner > div + div { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; }

@media (max-width: 57rem) {
  .shop-grid, .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .with-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters label:first-child { grid-column: span 2; }
}
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 1.75rem); }
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: .5rem; padding-block: .8rem .35rem; }
  nav { gap: .15rem 1rem; }
  nav a { min-height: 2.6rem; }
  .hero { display: block; min-height: 0; margin-top: 1rem; }
  .hero-photo { height: auto; min-height: 0; aspect-ratio: 16/10; }
  .brief a { margin-left: 0; }
  .features, .shop-grid, .story-grid, .with-map { grid-template-columns: 1fr; }
  .features > div { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: .5rem; }
  .features > div:last-child { border-bottom: 0; }
  .page-heading { padding-block: 1.8rem 1.25rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-panel { position: relative; top: auto; }
  #map { height: 21rem; }
}
