@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #fbf5e9;
  --surface: #fffdf8;
  --ink: #1b2a24;
  --muted: #5d6b64;
  --line: #e6dcc8;
  --green: #1d4d3a;
  --green-ink: #f6f1e4;
  --green-soft: #e3eee6;
  --tomato: #b8361f;
  --tomato-soft: #fbe3dc;
  --mustard: #f2c14e;
  --mustard-soft: #fbefcc;
  --mustard-ink: #3d2f05;
  --shadow: 0 1px 0 rgb(27 42 36 / 0.06), 0 6px 18px -12px rgb(27 42 36 / 0.25);
  --display: "Bricolage Grotesque", ui-rounded, "Avenir Next", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a16;
    --surface: #18221d;
    --ink: #ecebe3;
    --muted: #a2ada6;
    --line: #2b3832;
    --green: #8fd3ad;
    --green-ink: #0f1a14;
    --green-soft: #1d3328;
    --tomato: #ff7a5c;
    --tomato-soft: #3a1e17;
    --mustard: #f2c14e;
    --mustard-soft: #3a3016;
    --mustard-ink: #2a2004;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--green); text-underline-offset: 2px; }
main, .masthead-inner, footer.site { max-width: 60rem; margin: 0 auto; padding-inline: 1rem; }
h1, h2, h3, .brand { font-family: var(--display); }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; margin: 1.5rem 0 0.4rem; }
h2 { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.01em; margin: 2.5rem 0 0.25rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.muted, .small, .sub { color: var(--muted); }
.small { font-size: 0.9rem; }
.sub { margin: 0 0 0.9rem; }
.lede { color: var(--muted); margin: 0 0 1rem; font-size: 1.05rem; }
.crumb { margin: 1rem 0 0; font-size: 0.9rem; }

/* masthead */
.masthead { background: var(--green); color: var(--green-ink); }
.masthead-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; padding-block: 0.8rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-right: auto; }
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.brand small { font-family: var(--body); font-weight: 500; font-size: 0.8rem; opacity: 0.8; letter-spacing: 0; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.masthead nav a { color: inherit; text-decoration: none; opacity: 0.85; font-weight: 500; }
.masthead nav a:hover { opacity: 1; text-decoration: underline; }
.masthead nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 var(--mustard); }
@media (prefers-color-scheme: dark) { .masthead { background: #0c1310; color: var(--ink); border-bottom: 1px solid var(--line); } }

footer.site { margin-top: 3rem; padding-block: 1.25rem 2.5rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: 0.9rem; }

.notice { background: var(--mustard-soft); border-left: 4px solid var(--mustard); border-radius: 6px; padding: 0.6rem 0.8rem; }
.summary { font-size: 1.05rem; margin: 0.25rem 0 0.75rem; }
.summary strong { color: var(--tomato); }

/* jump links */
.jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.jump a { font-size: 0.88rem; text-decoration: none; padding: 0.2rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.jump a:hover { border-color: var(--green); }

/* filters */
.filters { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; padding: 0.6rem 0.75rem; margin: 0 -0.75rem; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.filters label { display: flex; gap: 0.35rem; align-items: center; font-size: 0.9rem; color: var(--muted); }
select, button { font: inherit; }
select { padding: 0.3rem 0.4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 100%; }
.check { display: inline-flex; gap: 0.4rem; align-items: center; color: var(--ink) !important; }
.linkish { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; cursor: pointer; font-size: 0.9rem; }
.count { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }

/* highlight cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.3rem; }
.card.tier-standout { border-top: 4px solid var(--tomato); }
.card-head h3 { font-size: 1.08rem; line-height: 1.25; }
.card-head p { margin: 0.35rem 0 0; }
.card p { margin: 0; }
.card .price { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 1.15rem; background: var(--mustard); color: var(--mustard-ink); padding: 0.05rem 0.5rem; border-radius: 6px; transform: rotate(-1.5deg); }
.price { font-variant-numeric: tabular-nums; font-weight: 700; }
.unit { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.meta { font-size: 0.88rem; color: var(--muted); }
.reason { font-weight: 500; }
.cmp, .notes { font-size: 0.85rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag { border-radius: 999px; padding: 0.05rem 0.55rem; font-size: 0.78rem; font-weight: 650; white-space: nowrap; background: var(--green-soft); color: var(--green); }
.tag-pct { background: var(--tomato-soft); color: var(--tomato); }
.tag-low { background: var(--mustard-soft); color: var(--mustard-ink); }
@media (prefers-color-scheme: dark) { .tag-low { color: var(--mustard); } }
.tag-member { background: var(--line); color: var(--ink); }

/* where to shop */
.stores-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); counter-reset: store; }
.store-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; box-shadow: var(--shadow); counter-increment: store; }
.store-card h3 { font-size: 1.15rem; display: flex; gap: 0.5rem; align-items: baseline; }
.store-card h3::before { content: counter(store); font-size: 0.8rem; color: var(--green-ink); background: var(--green); border-radius: 999px; min-width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; }
@media (prefers-color-scheme: dark) { .store-card h3::before { color: var(--green-ink); } }
.store-card h3 a { color: inherit; text-decoration: none; }
.store-card .meta { margin: 0.2rem 0 0.3rem; }
.store-card .meta strong { color: var(--tomato); }
.strong-in { margin: 0 0 0.4rem; font-size: 0.88rem; }
.more { margin: 0.4rem 0 0; font-size: 0.88rem; }

/* mini lists */
.mini { list-style: none; padding: 0; margin: 0; }
.mini li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.28rem 0; border-bottom: 1px dotted var(--line); font-size: 0.92rem; }
.mini li:last-child { border-bottom: 0; }
.mini-price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini li.best .mini-price { color: var(--tomato); }
.mini li.best::after { content: none; }

.cat-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.cat-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.cat-box h3 { margin-bottom: 0.3rem; }

.compare { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); align-items: start; }
.cmp-group { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.9rem; }
.cmp-group summary { cursor: pointer; }
.cmp-group .mini { margin-top: 0.4rem; }

/* all items */
details.cat { margin-bottom: 0.5rem; }
details.cat > summary { cursor: pointer; list-style: none; padding: 0.4rem 0; border-bottom: 2px solid var(--ink); }
details.cat > summary::-webkit-details-marker { display: none; }
details.cat > summary h3 { display: inline; font-size: 1.15rem; }
details.cat > summary::before { content: "\25BE"; display: inline-block; width: 1.1rem; color: var(--muted); transition: transform 0.15s; }
details.cat:not([open]) > summary::before { transform: rotate(-90deg); }
.rows { list-style: none; padding: 0; margin: 0; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.r-item { min-width: 0; }
.r-store { font-size: 0.85rem; color: var(--muted); margin-left: 0.25rem; }
.r-note { display: block; font-size: 0.8rem; color: var(--muted); }
.r-price { text-align: right; white-space: nowrap; }
.r-price .unit { display: block; }
.r-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--tomato); margin-right: 0.4rem; vertical-align: 0.05rem; }
.dot-good { background: var(--green); }
.row.tier-standout .r-item { font-weight: 600; }

/* flyers */
.flyers, .weeks, .stores { list-style: none; padding: 0; margin: 0; }
.flyers { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.flyer { border-bottom: 1px solid var(--line); padding: 0.6rem 0; display: grid; gap: 0.15rem; align-content: start; }
.flyer .store { font-weight: 650; }
.flyer .links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.8rem; font-size: 0.92rem; }
.flyer .note, .note { font-size: 0.88rem; color: var(--muted); }
.status, .status-pill { font-size: 0.75rem; font-weight: 650; border-radius: 999px; padding: 0.05rem 0.5rem; margin-left: 0.3rem; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.status-pill { margin-left: 0; }
.status-partial .status, .status-pill.status-partial { background: var(--mustard-soft); color: var(--mustard-ink); }
.status-stale .status, .status-unreadable .status, .status-pill.status-stale, .status-pill.status-unreadable { background: var(--tomato-soft); color: var(--tomato); }
.status-none .status { background: var(--line); color: var(--muted); }
.status-stale .dates, .status-unreadable .dates { text-decoration: line-through; color: var(--muted); }

.weeks li, .stores li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.weeks a, .stores .store { font-weight: 650; margin-right: 0.5rem; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 0.4rem; } }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); max-width: min(32rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
dialog h2 { margin-top: 0; }
dialog .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.4rem; }
dialog button { padding: 0.4rem 1.1rem; border-radius: 8px; border: 0; background: var(--green); color: var(--green-ink); font-weight: 600; cursor: pointer; }

/* store map and info */
.map { height: min(65vh, 32rem); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); z-index: 0; }
.map-small { height: 18rem; margin-bottom: 0.5rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0; }
.pin { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; vertical-align: -0.1rem; margin-right: 0.25rem; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pin-hot { background: var(--tomato); }
.pin-flyer { background: var(--green); }
.pin-other { background: var(--surface); border-color: var(--green); width: 0.7rem; height: 0.7rem; }
.pin-none { background: var(--surface); border-color: var(--muted); width: 0.7rem; height: 0.7rem; }
.map-toggles { margin: 0 0 1rem; font-size: 0.9rem; }
.map-toggles summary { cursor: pointer; color: var(--green); }
.map-toggles .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.3rem; margin-top: 0.5rem; }
.info-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.35rem; }
.info-card p { margin: 0; }
.info-card h3 a { color: inherit; text-decoration: none; }
.info-card .meta strong { color: var(--tomato); }
.card-links { display: flex; gap: 1rem; font-size: 0.9rem; margin-top: auto !important; padding-top: 0.2rem; }
.locations { list-style: none; padding: 0; margin: 0 0 1rem; }
.locations li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content { font: 0.9rem/1.4 var(--body); }
.leaflet-container a { color: var(--green); }
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }

/* persimmon season */
body.persimmon { --persim: #f07c1e; --persim-text: #a14a00; --persim-soft: #ffe3c6; --persim-ink: #4a1f00; background: linear-gradient(#fff4e3, #ffe0bd) fixed; overflow-x: hidden; }
@media (prefers-color-scheme: dark) { body.persimmon { --persim-text: #ffa45c; --persim-soft: #3a2412; --persim-ink: #ffd2a1; background: linear-gradient(#1c130c, #2a180b) fixed; } }
.persim-sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.persim-page { position: relative; z-index: 1; }
body.persimmon main, body.persimmon footer.site { position: relative; z-index: 1; }
.faller { position: absolute; top: -12vh; animation: persim-fall var(--dur, 10s) linear infinite; opacity: 0.9; filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.15)); }
.faller.burst { animation-iteration-count: 1; animation-duration: calc(var(--dur, 10s) * 0.5); }
.faller svg { width: 100%; height: 100%; }
@keyframes persim-fall {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(var(--sway, 0), 60vh) rotate(calc(var(--spin, 360deg) / 2)); }
  100% { transform: translate(0, 125vh) rotate(var(--spin, 360deg)); }
}
.persim-eyebrow { margin: 1.5rem 0 0; font-weight: 600; color: var(--persim-text); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.persim-title { font-size: clamp(2.2rem, 8vw, 4.2rem); margin: 0.2rem 0 1.25rem; transform: rotate(-1deg); }
.persim-title span { color: var(--persim-text); display: inline-block; animation: persim-wobble 3s ease-in-out infinite; }
@keyframes persim-wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-2px); } }
.persim-hero { position: relative; text-align: center; background: var(--surface); border: 3px solid var(--persim); border-radius: 28px; padding: 2rem 1.25rem 1.75rem; box-shadow: 0 12px 0 -4px var(--persim-soft), var(--shadow); }
.persim-mascot { width: clamp(7rem, 22vw, 10rem); margin: -4.5rem auto 0.25rem; cursor: pointer; animation: persim-float 4s ease-in-out infinite; }
.persim-mascot svg { width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.18)); }
.persim-mascot.boing { animation: persim-boing 0.6s cubic-bezier(.3,1.6,.5,1); }
.persim-mascot.sad { filter: grayscale(0.6); transform: rotate(12deg); animation: none; }
@keyframes persim-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes persim-boing { 0% { transform: scale(1); } 30% { transform: scale(1.25, 0.8); } 60% { transform: scale(0.9, 1.15) translateY(-14px); } 100% { transform: scale(1); } }
.persim-kicker { margin: 0; font-weight: 700; color: var(--persim-text); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.persim-price { font-size: clamp(3rem, 14vw, 6rem); line-height: 1; margin: 0.4rem 0; color: var(--persim-ink); letter-spacing: -0.03em; }
.persim-where { font-size: 1.35rem; font-weight: 600; margin: 0.2rem 0; }
.persim-item { margin: 0.2rem 0; color: var(--muted); }
.persim-math { margin: 0.9rem auto 0; max-width: 32rem; background: var(--persim-soft); color: var(--persim-ink); border-radius: 12px; padding: 0.6rem 0.9rem; }
.persim-math .muted { display: block; font-size: 0.85rem; color: inherit; opacity: 0.75; }
.persim-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.persim-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.9rem; border-bottom: 1px dashed var(--line); }
.persim-list li:last-child { border-bottom: 0; }
.persim-list a { font-size: 0.88rem; margin-left: 0.3rem; }
.persim-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.persim-log li { display: grid; grid-template-columns: 4.5rem 1fr 8rem; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.pl-bar { position: relative; height: 1.6rem; }
.pl-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--persim); border-radius: 999px; }
.pl-bar span { position: relative; padding-left: 0.6rem; line-height: 1.6rem; font-weight: 700; color: #fff; }
.pl-store { color: var(--muted); }
@media (max-width: 30rem) { .persim-log li { grid-template-columns: 3.8rem 1fr; } .pl-store { grid-column: 2; margin-top: -0.3rem; } }
.persim-facts ul { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1rem 0.8rem 2rem; margin: 0; }
.persim-facts li { margin: 0.3rem 0; }
.persim-foot { text-align: center; margin-top: 2rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .persim-title span, .persim-mascot { animation: none; } }
body.persimmon .masthead { position: relative; z-index: 2; }
.masthead nav a.nav-persim { display: inline-flex; align-items: center; opacity: 1; }
.nav-persim svg { transition: transform 0.2s; }
.nav-persim:hover svg, .nav-persim:focus-visible svg { transform: rotate(-15deg) scale(1.2); }
.masthead nav a.nav-persim[aria-current="page"] { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .nav-persim svg { transition: none; } }

/* accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus-visible { position: fixed; left: 1rem; top: calc(env(safe-area-inset-top, 0px) + 0.5rem); width: auto; height: auto; margin: 0; clip: auto; overflow: visible; z-index: 10; background: var(--mustard); color: var(--mustard-ink); padding: 0.4rem 0.8rem; border-radius: 8px; font-weight: 700; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; border-radius: 4px; }
.masthead :focus-visible { outline-color: var(--mustard); }
main:focus { outline: none; }
@media (prefers-color-scheme: dark) {
  .status-partial .status, .status-pill.status-partial { color: var(--mustard); }
  .card .price { color: #2a2004; }
}

/* menu persimmon as a button */
.masthead nav a.nav-persim { display: inline-flex; align-items: center; justify-content: center; height: 1.75rem; padding: 0 0.75rem; margin-block: -0.2rem; border-radius: 999px; background: var(--green-ink); box-shadow: 0 3px 0 rgb(0 0 0 / 0.25); transition: transform 0.15s, box-shadow 0.15s; }
.masthead nav a.nav-persim:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgb(0 0 0 / 0.25); text-decoration: none; }
.masthead nav a.nav-persim:active { transform: translateY(2px); box-shadow: 0 1px 0 rgb(0 0 0 / 0.25); }
.masthead nav a.nav-persim[aria-current="page"] { box-shadow: 0 0 0 3px var(--mustard); }
.nav-persim svg { width: 1.3rem; height: 1.3rem; }
@media (prefers-color-scheme: dark) { .masthead nav a.nav-persim { background: #2b3832; } }
.ending { background: var(--tomato-soft); border-radius: 12px; padding: 0.2rem 1rem 0.8rem; margin-top: 1rem; }
.ending h2 { margin-top: 0.8rem; }
.ends-when { font-size: 0.8rem; font-weight: 700; color: var(--tomato); margin-left: 0.3rem; text-transform: uppercase; letter-spacing: 0.03em; }
