@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/source-sans-3-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-italic-latin.woff2") format("woff2");
}

:root {
  --paper: #f6f0e6;
  --paper-deep: #ebe3d4;
  --card: #fffbf4;
  --ink: #1e1a16;
  --ink-soft: #5c554c;
  --rule: #d8cdb8;
  --beak: #e07a2f;
  --beak-deep: #c25d16;
  --goose: #4c4c4c;
  --moss: #3c5a45;
  --moss-soft: #e5eee7;
  --warn: #8a4a10;
  --warn-bg: #f8e5cd;
  --research: #3a4d63;
  --research-bg: #e4ebf3;
  --link: #8d3f0d;
  --max: 72rem;
  --text: 40rem;
  --header-h: 4.25rem;
  --shadow: 0 10px 30px rgba(30, 26, 22, 0.06);
  --radius: 1.1rem;
  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--beak-deep); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--beak);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
}
.wrap-narrow { width: min(100% - 1.75rem, var(--text)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #f4eee4;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 0.6rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.site-nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background: var(--paper-deep); }
.site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--beak); }

@media (max-width: 859px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.6rem 0.9rem 1rem;
  }
  body.nav-open .site-nav { display: block; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 0.15rem; }
  .site-nav a { padding: 0.35rem 0.65rem; }
  .brand-name { font-size: 1.15rem; }
}

/* Hero and typography */
.hero { padding: 2.2rem 0 1.5rem; }
.hero h1,
.page-hero h1,
.content h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0 0 1.25rem;
}
.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--beak-deep);
  margin-bottom: 0.55rem;
}
.updated {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
}
.page-hero { padding: 1.8rem 0 0.8rem; }
.page-hero .lede { margin-bottom: 0.5rem; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}

.honesty {
  background: var(--research-bg);
  border-left: 4px solid var(--research);
  padding: 0.9rem 1rem;
  border-radius: 0 0.8rem 0.8rem 0;
  color: var(--ink);
  margin: 1.2rem 0 0;
}
.honesty p { margin: 0; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.95rem;
}
.btn-primary { background: var(--ink); color: #fff8ee; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--card); color: var(--ink); }

/* Grids and cards */
.section { padding: 1.6rem 0 0.4rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.section-head a { font-weight: 700; font-size: 0.95rem; }

.area-grid,
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}

.area-card,
.shop-card,
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.area-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; min-height: 100%; }
.area-card:hover { border-color: color-mix(in srgb, var(--beak) 50%, var(--rule)); }
.area-card .body,
.shop-card .body { padding: 0.95rem 1rem 1.1rem; }
.area-card h3 { margin-bottom: 0.25rem; }
.muted, .meta { color: var(--ink-soft); font-size: 0.92rem; }
.count-pill {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--beak-deep);
}

.card-art {
  height: 8.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.55), transparent 50%),
    linear-gradient(160deg, var(--art-a, #ece2d0) 0%, var(--art-b, #d9c7a8) 100%);
}
.card-art svg { width: 4.6rem; height: 4.6rem; opacity: 0.9; }
.card-art .art-caption {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.badge-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.55rem; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-research { background: var(--research-bg); color: var(--research); }
.badge-visited { background: var(--moss-soft); color: var(--moss); }
.badge-sunday-closed { background: var(--warn-bg); color: var(--warn); }
.badge-sunday-open { background: var(--moss-soft); color: var(--moss); }
.badge-note { background: var(--paper-deep); color: var(--ink-soft); }

.shop-card h3 { margin-bottom: 0.15rem; }
.shop-card h3 a { color: inherit; text-decoration: none; }
.shop-card h3 a:hover { color: var(--beak-deep); }
.shop-dl { margin: 0.55rem 0 0; display: grid; gap: 0.28rem; }
.shop-dl div { display: grid; grid-template-columns: 6.2rem 1fr; gap: 0.4rem; font-size: 0.92rem; }
.shop-dl dt { color: var(--ink-soft); font-weight: 600; }
.shop-dl dd { margin: 0; }
.why { margin: 0.7rem 0 0; }
.shop-links { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; margin-top: 0.85rem; font-weight: 700; font-size: 0.92rem; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
  margin: 0.6rem 0 1.1rem;
}
.filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.filters select {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.55rem;
  padding: 0.45rem 0.6rem;
  min-width: 12rem;
}

/* Beans table */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table.beans {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 44rem;
}
table.beans th,
table.beans td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
table.beans th {
  background: var(--paper-deep);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
table.beans tr:last-child td { border-bottom: 0; }
table.beans .price { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.calc-note { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.8rem; }
.affiliate-pending {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-deep);
  padding: 0.05rem 0.35rem;
  border-radius: 0.3rem;
}

.bean-cards { display: none; }
@media (max-width: 719px) {
  .table-wrap { display: none; }
  .bean-cards { display: grid; gap: 0.8rem; }
  .bean-card { padding: 1rem; }
  .bean-card p { margin: 0.25rem 0; }
}

/* Shop detail */
.shop-detail { padding-bottom: 2.5rem; }
.shop-detail .lead-card { margin: 0.8rem 0 1.2rem; }
.shop-detail .card-art { height: 11rem; }
.prose { max-width: var(--text); }
.prose p, .prose li { margin: 0 0 0.85rem; }
.prose ul { padding-left: 1.2rem; }
.source-line { font-size: 0.9rem; color: var(--ink-soft); }

/* Newsletter */
.signup {
  background: var(--ink);
  color: #f6f0e6;
  border-radius: calc(var(--radius) + 0.2rem);
  padding: 1.4rem 1.2rem;
  margin: 2rem 0 1rem;
}
.signup h2 { color: #fff8ee; }
.signup p { color: #d9d0c3; margin: 0 0 0.9rem; }
.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.signup-form label { width: 100%; font-size: 0.82rem; font-weight: 700; color: #e7ddd0; }
.signup-form input[type="email"] {
  flex: 1 1 14rem;
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: #fffdf8;
  color: var(--ink);
}
.signup-form button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  background: var(--beak);
  color: #1e1a16;
  cursor: pointer;
}
.signup-form button:hover { background: #f08a3d; }
.form-msg { margin: 0.7rem 0 0; font-weight: 600; color: #fff8ee; }
.form-msg[hidden] { display: none; }

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.8rem; }
.footer-nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.disclosure { max-width: 46rem; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.empty-filter { padding: 1rem; background: var(--paper-deep); border-radius: var(--radius); }

.also-at { margin-top: 0.8rem; font-size: 0.92rem; color: var(--ink-soft); }

/* 404 */
.notfound { padding: 3rem 0 4rem; text-align: left; }

.badge-visited { display: none; }
[data-visit-verified="true"] .badge-visited { display: inline-flex; }
[data-visit-verified="true"] .badge-visited[hidden] { display: none !important; }
