/* SundaySaver
   Layout idea: a quiet, paper-colored page. The loud things are the stores' own logos and ad covers.
   The one bold element is the Sunday-edition masthead: heavy condensed type, halftone dots, a yellow shelf tag. */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #f5f7f2;
  --surface: #ffffff;
  --ink: #15201a;
  --ink-2: #4d5c53;
  --line: #dbe2d8;
  --green: #17803d;
  --green-deep: #0f5c2b;
  --green-wash: #e2f1e3;
  --on-green: #ffffff;
  --tag: #ffd60a;
  --tag-ink: #1c1a00;
  --red: #c4122f;
  --on-red: #ffffff;
  --stage: #27322b;
  --logo-bg: #ffffff;
  --shadow: 0 1px 2px rgb(21 32 26 / 0.07), 0 6px 18px rgb(21 32 26 / 0.07);
  --display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

/* Dark follows the device setting. data-theme on <html> overrides it either way. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #101613;
    --surface: #19221d;
    --ink: #e8efe9;
    --ink-2: #a0b1a6;
    --line: #2b3830;
    --green: #62d68a;
    --green-deep: #8ee6ab;
    --green-wash: #1a2c21;
    --on-green: #06200f;
    --tag: #ffd60a;
    --tag-ink: #1c1a00;
    --red: #ff6f80;
    --on-red: #2a0008;
    --stage: #080b09;
    --logo-bg: #ffffff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #101613;
  --surface: #19221d;
  --ink: #e8efe9;
  --ink-2: #a0b1a6;
  --line: #2b3830;
  --green: #62d68a;
  --green-deep: #8ee6ab;
  --green-wash: #1a2c21;
  --on-green: #06200f;
  --tag: #ffd60a;
  --tag-ink: #1c1a00;
  --red: #ff6f80;
  --on-red: #2a0008;
  --stage: #080b09;
  --logo-bg: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--tag); color: var(--tag-ink); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--tag); color: var(--tag-ink); padding: 8px 12px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 8px; }
.icon { flex: none; }

/* ---------- Header ---------- */

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; padding-block: 10px; }
.wordmark { font-family: var(--display); font-stretch: 88%; font-size: 1.55rem; line-height: 1; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark__a { color: var(--ink-2); font-weight: 400; }
.wordmark__b { color: var(--green); font-weight: 800; }

.search { position: relative; display: flex; align-items: center; max-width: 560px; width: 100%; justify-self: center; }
.search > .icon { position: absolute; left: 12px; color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1.5px solid var(--line); border-radius: 21px; background: var(--surface); }
.search input::placeholder, .filter input::placeholder { color: var(--ink-2); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a.is-on { background: var(--green-wash); }
.suggest small { color: var(--ink-2); margin-left: auto; }

.top__actions { display: flex; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 19px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.chip-btn:hover { border-color: var(--green); color: var(--ink); }
.chip-btn .icon { color: var(--green); }
.count { background: var(--tag); color: var(--tag-ink); font-weight: 800; font-size: 0.75rem; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }

.cats { border-top: 1px solid var(--line); }
.cats__row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cats__row::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 9px 12px 7px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.92rem; border-bottom: 3px solid transparent; }
.cats a:hover { color: var(--ink); }
.cats a.is-active { color: var(--ink); border-bottom-color: var(--green); }

@media (max-width: 720px) {
  .top__row { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .chip-btn { padding: 0 10px; }
  .top__actions .chip-btn__text { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Buttons, tags, prices ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--on-green); }
.btn--danger { color: var(--red); }
.btn--danger:hover { border-color: var(--red); color: var(--red); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.link-btn:hover { color: var(--green-deep); }
.link-btn--danger { color: var(--red); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid transparent; border-radius: 8px; background: none; color: inherit; text-decoration: none; }
.icon-btn:hover { border-color: var(--line); background: var(--surface); color: inherit; }

/* A shelf tag: yellow, with a punched hole. Used for ad dates. */
.tag { display: inline-block; padding: 2px 8px 2px 18px; font: 800 0.72rem/1.5 var(--display); font-stretch: 90%; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tag-ink); background: radial-gradient(circle at 9px 50%, transparent 2.6px, var(--tag) 3.2px); border-radius: 3px; white-space: nowrap; }
.tag--ending { color: var(--on-red); background: radial-gradient(circle at 9px 50%, transparent 2.6px, var(--red) 3.2px); }
.tag--upcoming { color: var(--ink); background: radial-gradient(circle at 9px 50%, transparent 2.6px, var(--line) 3.2px); }
.tag--expired, .tag--draft { color: var(--ink-2); background: radial-gradient(circle at 9px 50%, transparent 2.6px, var(--line) 3.2px); }

.price { display: inline-block; font-family: var(--display); font-stretch: 68%; font-weight: 900; font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em; color: var(--tag-ink); background: var(--tag); padding: 5px 8px 4px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.price--sm { font-size: 1.05rem; padding: 4px 6px 3px; }
.price--lg { font-size: 2.6rem; padding: 8px 12px 6px; }
.price:empty { display: none; }

/* ---------- Store logos ---------- */

.logo { flex: none; display: grid; place-items: center; width: var(--logo, 48px); height: var(--logo, 48px); border-radius: 22%; background: var(--logo-bg); border: 1px solid var(--line); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo--mono { background: hsl(var(--hue) 45% 34%); border-color: transparent; color: #fff; font: 800 calc(var(--logo, 48px) * 0.38) / 1 var(--display); font-stretch: 80%; letter-spacing: 0.01em; }

/* ---------- Sunday-edition masthead ---------- */

.edition { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.edition::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, color-mix(in srgb, var(--ink) 22%, transparent) 1.1px, transparent 1.7px) 0 0 / 10px 10px; -webkit-mask-image: linear-gradient(105deg, transparent 38%, #000 110%); mask-image: linear-gradient(105deg, transparent 38%, #000 110%); pointer-events: none; }
.edition__in { position: relative; padding-block: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 40px); display: grid; gap: 14px; justify-items: start; }
.edition__tag { display: inline-flex; align-items: baseline; gap: 10px; padding: 5px 12px 4px 26px; background: radial-gradient(circle at 13px 50%, transparent 3.6px, var(--tag) 4.2px); color: var(--tag-ink); border-radius: 4px; font: 900 1.15rem/1.2 var(--display); font-stretch: 72%; transform: rotate(-1.2deg); }
.edition__tag span { font-weight: 700; font-size: 0.72rem; font-stretch: 100%; letter-spacing: 0.1em; text-transform: uppercase; }
.edition h1, .pagehead h1 { font-stretch: 72%; font-weight: 850; font-size: clamp(2.3rem, 6.2vw, 4.2rem); line-height: 0.96; letter-spacing: -0.015em; max-width: 16ch; }
.edition h1 em, .pagehead h1 em { font-style: normal; color: var(--green); }
.edition__lede { max-width: 56ch; font-size: 1.1rem; color: var(--ink-2); }
.edition__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 0.95rem; }
.edition__facts b { font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.edition__note { font-size: 0.88rem; color: var(--ink-2); }

.pagehead { padding-block: clamp(24px, 4vw, 44px) 8px; display: grid; gap: 10px; justify-items: start; }
.pagehead h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 22ch; }
.pagehead__sub { color: var(--ink-2); }
.crumbs { font-size: 0.88rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }

/* ---------- Sections ---------- */

.band { padding-block: 22px; }
.band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.band__head h2, .listpage__h { font-stretch: 84%; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.005em; }
.band__head a { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.band__count { font-family: var(--body); font-weight: 600; font-size: 0.85rem; color: var(--ink-2); margin-left: 4px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 18px 2px; }
.filter { position: relative; display: flex; align-items: center; flex: 0 1 260px; }
.filter .icon { position: absolute; left: 11px; color: var(--ink-2); pointer-events: none; }
.filter input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); }
.filter input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a { display: inline-flex; gap: 6px; padding: 5px 10px; border-radius: 6px; background: var(--green-wash); color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.jump a span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.jump a:hover { background: var(--green); color: var(--on-green); }
.jump a:hover span { color: inherit; }

.none { color: var(--ink-2); padding-block: 8px; }
.empty { display: grid; gap: 10px; justify-items: start; padding-block: 28px; }
.empty h2 { font-stretch: 84%; font-size: 1.4rem; }
.empty p { color: var(--ink-2); max-width: 60ch; }

/* ---------- Store tiles ---------- */

.stores { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 8px; }
.store { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 44px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.12s, box-shadow 0.12s; }
.store:hover { border-color: var(--green); box-shadow: var(--shadow); }
.store__text { display: grid; min-width: 0; }
.store__link { color: var(--ink); text-decoration: none; }
.store__link:hover { color: var(--ink); }
.store__link::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.store__link:focus-visible { outline: none; }
.store__link:focus-visible::after { outline: 3px solid var(--tag); outline-offset: 2px; }
.store__name { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.store__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 0.82rem; color: var(--ink-2); }
.store__cta { display: inline-flex; align-items: center; gap: 4px; }
.store:hover .store__cta { color: var(--green); }
.store:hover .store__cta .icon { transform: translate(1px, -1px); }
.store__info { position: relative; z-index: 1; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.store__info:hover { color: var(--green); text-decoration-color: currentColor; }
.fav { position: absolute; z-index: 1; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: color-mix(in srgb, var(--ink-2) 38%, var(--surface)); }
.fav:hover { color: var(--red); background: var(--paper); }
.fav[aria-pressed='true'] { color: var(--red); }
.fav.fav--wide { position: static; translate: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: auto; min-height: 42px; padding: 8px 16px; border-radius: 8px; color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); white-space: nowrap; }
.fav.fav--wide:hover { border-color: var(--ink-2); background: var(--surface); color: var(--ink); }
.fav.fav--wide .icon { color: color-mix(in srgb, var(--ink-2) 50%, var(--surface)); }
.fav.fav--wide[aria-pressed='true'] .icon { color: var(--red); }

@media (max-width: 560px) {
  .storehead__row { gap: 14px; }
  .storehead__row .logo { --logo: 60px !important; }
  .storehead__actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .storehead__actions .btn { width: 100%; }
  .stores { grid-template-columns: 1fr 1fr; gap: 6px; }
  .store { padding: 8px 30px 8px 8px; gap: 9px; }
  .store .logo { --logo: 38px !important; }
  .store__name { font-size: 0.86rem; overflow-wrap: break-word; hyphens: auto; }
  .store__cta { display: none; }
  .store__info { font-size: 0.76rem; }
  .fav { right: 0; width: 30px; }
}

/* ---------- Circular cards ---------- */

.flyers { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 178px; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.flyers--grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(46%, 178px), 1fr)); overflow: visible; }
.flyer { scroll-snap-align: start; }
.flyer__link { display: grid; gap: 8px; color: var(--ink); text-decoration: none; }
.flyer__cover { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s; }
.flyer__cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.flyer__cover .tag { position: absolute; left: 8px; top: 8px; box-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.flyer__link:hover .flyer__cover { transform: translateY(-3px) rotate(-0.6deg); }
.flyer__meta { display: flex; gap: 8px; align-items: flex-start; }
.flyer__text { display: grid; min-width: 0; line-height: 1.25; }
.flyer__store { font-weight: 700; }
.flyer__title, .flyer__dates { font-size: 0.82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Deals ---------- */

.deals { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 190px), 1fr)); gap: 10px; }
.deal__link { display: grid; grid-template-rows: auto 1fr; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
.deal__link:hover { border-color: var(--green); box-shadow: var(--shadow); color: var(--ink); }
.deal__img { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--logo-bg); color: #b9c2ba; border-bottom: 1px solid var(--line); overflow: hidden; }
.deal__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.deal__body { display: grid; gap: 4px; padding: 10px; align-content: start; justify-items: start; }
.deal__name { font-weight: 700; line-height: 1.25; }
.deal__story, .deal__store { font-size: 0.82rem; color: var(--ink-2); }

/* ---------- Store page, A to Z ---------- */

.storehead__row { display: flex; align-items: center; gap: 18px; }
.storehead__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.storehead__hint { font-size: 0.88rem; color: var(--ink-2); }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pills a { display: block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.pills a:hover { border-color: var(--green); }
.letters { display: flex; flex-wrap: wrap; gap: 4px; }
.letters a { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 6px; background: var(--green-wash); color: var(--ink); font: 800 0.95rem var(--display); text-decoration: none; }
.letters a:hover { background: var(--green); color: var(--on-green); }
.az { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--line); }
.az h2 { font-stretch: 72%; font-weight: 900; font-size: 2.2rem; line-height: 1; color: var(--green); }
.az__list { list-style: none; columns: 260px 4; column-gap: 20px; }
.az__list li { break-inside: avoid; }
.az__list a { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: var(--ink); text-decoration: none; }
.az__list a:hover span { text-decoration: underline; }
.az__list small { color: var(--ink-2); margin-left: auto; font-size: 0.78rem; white-space: nowrap; }
@media (max-width: 560px) {
  .az { grid-template-columns: 34px minmax(0, 1fr); }
  .az h2 { font-size: 1.7rem; }
  .az__list a { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; row-gap: 0; }
  .az__list small { grid-column: 2; margin-left: 0; white-space: normal; }
}

.prose { display: grid; gap: 14px; max-width: 68ch; }
.prose h2 { font-stretch: 84%; font-size: 1.3rem; margin-top: 10px; }

/* ---------- Dialogs ---------- */

.sheet { border: 0; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: min(86dvh, 760px); background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / 0.35); }
.sheet::backdrop { background: rgb(10 16 12 / 0.55); }
.sheet__body { padding: 20px; display: grid; gap: 14px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__head h2 { font-stretch: 80%; font-weight: 850; font-size: 1.6rem; }
.sheet__hint { color: var(--ink-2); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 4px; }
.state-btn { text-align: left; padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; background: none; }
.state-btn:hover { background: var(--green-wash); }
.state-btn.is-current { background: var(--green); color: var(--on-green); font-weight: 700; }

/* ---------- Footer ---------- */

.foot { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); font-size: 0.9rem; }
.foot__grid { display: grid; grid-template-columns: minmax(200px, 1.2fr) 1fr 1fr 1fr; gap: 28px 32px; padding-block: 32px 16px; }
.foot h2 { font: 700 0.75rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.foot ul { list-style: none; display: grid; gap: 4px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__brand { display: grid; gap: 8px; align-content: start; color: var(--ink-2); }
.foot__states { grid-column: 1 / -1; }
.foot__states ul { display: block; columns: 150px 7; column-gap: 20px; }
.foot__states li { padding-block: 2px; }
.foot__legal { padding-block: 16px 28px; color: var(--ink-2); font-size: 0.82rem; }
@media (max-width: 640px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }

/* ---------- Circular viewer ---------- */

body.is-bare { height: 100dvh; overflow: hidden; }
body.is-bare .top .wrap { max-width: none; }
body.is-bare main { min-height: 0; display: flex; }
.viewer { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.viewer__bar { display: flex; align-items: center; gap: 10px; padding: 8px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); }
.viewer__title { min-width: 0; flex: 1; }
.viewer__title h1 { font-stretch: 84%; font-weight: 800; font-size: 1.1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__title h1 span { font-weight: 500; color: var(--ink-2); }
.viewer__title p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.85rem; color: var(--ink-2); }
.viewer__tools { display: flex; align-items: center; gap: 6px; }
.viewer__count { font-variant-numeric: tabular-nums; font-size: 0.88rem; color: var(--ink-2); padding-inline: 6px; white-space: nowrap; }
.viewer__main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.viewer__main.no-items, .viewer.items-off .viewer__main { grid-template-columns: minmax(0, 1fr); }
.viewer.items-off .items { display: none; }

.stage { display: flex; gap: 14px; padding: 16px; overflow: auto; background: var(--stage); scroll-behavior: smooth; overscroll-behavior: contain; }
.stage:focus-visible { outline-offset: -3px; }
.stage::after { content: ''; flex: none; width: 2px; }
.page { position: relative; flex: none; margin: 0; height: calc(var(--stage-h, 70dvh) * var(--zoom, 1)); aspect-ratio: var(--ar); background: #fff; box-shadow: 0 4px 22px rgb(0 0 0 / 0.45); }
.page img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.stage__empty { color: #cfd8d1; margin: auto; }
.spot { position: absolute; padding: 0; border: 2px solid transparent; border-radius: 6px; background: transparent; }
.spot:hover, .spot:focus-visible, .spot.is-on { border-color: var(--tag); background: rgb(255 214 10 / 0.22); outline: none; box-shadow: 0 0 0 2px rgb(0 0 0 / 0.35); }
.spot.is-listed { border: 3px solid var(--tag); border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%; box-shadow: 0 0 0 1.5px rgb(0 0 0 / 0.3); }
@media (hover: none) { .spot:not(.is-listed) { border: 1.5px dashed rgb(255 214 10 / 0.9); } }

.items { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.items__head { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.items__head h2 { font-stretch: 84%; font-weight: 800; font-size: 1.1rem; }
.items__head .filter { flex: none; }
.items__list { list-style: none; overflow-y: auto; flex: 1; }
.items__list button { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.items__list button:hover, .items__list button.is-on { background: var(--green-wash); }
.items__img { position: relative; width: 52px; height: 52px; border-radius: 6px; background: var(--logo-bg); border: 1px solid var(--line); overflow: hidden; }
.items__img img { width: 100%; height: 100%; object-fit: contain; }
.items__text { display: grid; min-width: 0; line-height: 1.25; }
.items__name { font-weight: 600; font-size: 0.92rem; }
.items__story { font-size: 0.78rem; color: var(--ink-2); }

.sheet--item { width: min(760px, calc(100vw - 24px)); }
.item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; position: relative; }
.item__close { position: absolute; right: 10px; top: 10px; }
.item__img { display: grid; place-items: center; min-height: 220px; background: var(--logo-bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.item__img img { max-height: 360px; object-fit: contain; }
.item__info { display: grid; gap: 10px; align-content: start; justify-items: start; padding-right: 30px; }
.item__info h2 { font-stretch: 84%; font-weight: 800; font-size: 1.5rem; line-height: 1.15; }
.item__store, .item__fine { font-size: 0.85rem; color: var(--ink-2); }
.item__story { font-weight: 700; }
.item__desc { color: var(--ink-2); }
.item__story:empty, .item__desc:empty { display: none; }
.item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn[aria-pressed='true'] { background: var(--green-wash); border-color: var(--green); color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast a { color: var(--tag); margin-left: 8px; }

@media (max-width: 860px) {
  body.is-bare { height: auto; overflow: visible; }
  body.is-bare main { display: block; }
  .viewer__bar { position: sticky; top: 0; z-index: 15; flex-wrap: wrap; padding-inline: 12px; }
  .viewer__tools { width: 100%; justify-content: flex-end; }
  .viewer__main { display: block; }
  .stage { flex-direction: column; padding: 8px; gap: 8px; overflow-x: auto; }
  .page { height: auto; width: calc(100% * var(--zoom, 1)); }
  .items { border-left: 0; border-top: 1px solid var(--line); }
  .items__list { max-height: none; overflow: visible; }
  .item { grid-template-columns: 1fr; }
  .item__img { min-height: 160px; }
  .item__img img { max-height: 240px; }
}

/* ---------- Shopping list ---------- */

.listpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 32px; align-items: start; }
.listpage__main { display: grid; gap: 16px; }
.additem { display: flex; gap: 8px; }
.additem input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 1.05rem; }
.additem input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.staples { display: flex; flex-wrap: wrap; gap: 6px; }
.staples button { padding: 4px 11px; border: 1px dashed var(--ink-2); border-radius: 16px; background: none; font-size: 0.88rem; }
.staples button:hover { background: var(--green-wash); border-style: solid; border-color: var(--green); }
.listpage__h { margin-bottom: 8px; }
.mylist { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mylist li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.mylist li:last-child { border-bottom: 0; }
.mylist input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.mylist label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.mylist .is-done .mylist__text { text-decoration: line-through; color: var(--ink-2); }
.mylist__text { display: grid; min-width: 0; line-height: 1.25; }
.mylist__text small { color: var(--ink-2); }
.mylist__img { width: 44px; height: 44px; flex: none; border-radius: 6px; border: 1px solid var(--line); background: var(--logo-bg); object-fit: contain; }
.mylist .icon-btn { width: 32px; height: 32px; color: var(--ink-2); }
.listpage__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.listpage__side { position: sticky; top: 140px; display: grid; gap: 8px; }
.listpage__side .deals { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .listpage { grid-template-columns: 1fr; } .listpage__side { position: static; } }

@media print {
  .top, .foot, .additem, .staples, .listpage__tools, .listpage__side, .mylist .icon-btn, .mylist .link-btn, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .mylist { border-color: #999; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Seasonal: Black Friday ----------
   One deliberate look whatever the visitor's theme: near-black paper, the yellow shelf tag as the accent,
   oversized condensed type. Everything else on the page keeps working through the same tokens. */

body.theme-black-friday {
  --paper: #0c0c0b;
  --surface: #171714;
  --ink: #f3f3ef;
  --ink-2: #a9a89f;
  --line: #2d2c27;
  --green: #ffd60a;
  --green-deep: #ffe45c;
  --green-wash: #2b2610;
  --on-green: #1c1a00;
  --red: #ff6f80;
  --on-red: #2a0008;
  --logo-bg: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px rgb(0 0 0 / 0.45);
  color-scheme: dark;
  background: var(--paper);
  color: var(--ink);
}
body.theme-black-friday .top { background: color-mix(in srgb, var(--paper) 90%, transparent); }
body.theme-black-friday .wordmark__b { color: var(--green); }

.bf-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.bf-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgb(255 214 10 / 0.22) 1.2px, transparent 1.9px) 0 0 / 12px 12px; -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 105%); mask-image: linear-gradient(100deg, transparent 30%, #000 105%); pointer-events: none; }
.bf-hero__in { position: relative; display: grid; gap: 16px; justify-items: start; padding-block: clamp(30px, 6vw, 72px) clamp(26px, 4vw, 44px); }
.bf-eyebrow { font: 700 0.78rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.bf-hero h1 { font-stretch: 62%; font-weight: 900; font-size: clamp(3.6rem, 13vw, 8.6rem); line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase; max-width: none; }
.bf-hero h1 span { color: var(--green); text-transform: lowercase; font-stretch: 70%; }
.bf-hero__lede { max-width: 58ch; font-size: 1.1rem; color: var(--ink-2); }

/* The countdown is a big shelf tag with a punched hole. */
.bf-tag { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 20px 8px 42px; background: radial-gradient(circle at 21px 50%, transparent 6px, #ffd60a 6.8px); color: #1c1a00; border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 6px 20px rgb(0 0 0 / 0.5); }
.bf-tag b { font: 900 clamp(1.9rem, 5vw, 2.8rem) / 1 var(--display); font-stretch: 66%; font-variant-numeric: tabular-nums; }
.bf-tag span { font: 800 0.95rem var(--display); font-stretch: 85%; text-transform: uppercase; letter-spacing: 0.04em; }
.bf-tag--day { background: radial-gradient(circle at 21px 50%, transparent 6px, #ff3b4e 6.8px); color: #fff; }
.bf-tag--over { background: radial-gradient(circle at 21px 50%, transparent 6px, #3a3933 6.8px); color: var(--ink); }

.bf-over { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 12px; }

.bf-faq h2 { font-stretch: 84%; font-weight: 800; font-size: 1.35rem; margin-bottom: 12px; }
.bf-faq dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px 28px; margin: 0; }
.bf-faq dt { font-weight: 700; margin-bottom: 4px; }
.bf-faq dd { margin: 0; color: var(--ink-2); }

/* Home-page strip while the event is in season. */
.bf-banner { display: block; background: #0c0c0b; color: #f3f3ef; text-decoration: none; border-bottom: 3px solid #ffd60a; }
.bf-banner:hover { color: #f3f3ef; }
.bf-banner__in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-block: 12px; }
.bf-banner__name { font: 900 1.5rem/1 var(--display); font-stretch: 64%; text-transform: uppercase; letter-spacing: 0.01em; }
.bf-banner__when { padding: 3px 10px 2px 22px; background: radial-gradient(circle at 11px 50%, transparent 3.2px, #ffd60a 3.8px); color: #1c1a00; border-radius: 3px; font: 800 0.85rem var(--display); font-stretch: 85%; text-transform: uppercase; }
.bf-banner__when b { font-weight: 900; }
.bf-banner__go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #ffd60a; }
.bf-banner:hover .bf-banner__go { text-decoration: underline; }
@media (max-width: 560px) { .bf-banner__go { margin-left: 0; width: 100%; } }

/* The menu tab for an event in season. */
.cats a.cats__event { color: #1c1a00; background: #ffd60a; border-radius: 4px 4px 0 0; font-weight: 800; }
.cats a.cats__event:hover { color: #1c1a00; background: #ffe45c; }
.cats a.cats__event.is-active { border-bottom-color: var(--ink); }

/* A store's own event-ad button on its store page. */
.btn.btn--event { background: #0c0c0b; border-color: #0c0c0b; color: #ffd60a; }
.btn.btn--event:hover { background: #26251f; border-color: #26251f; color: #ffe45c; }
body.theme-black-friday .btn.btn--event, :root[data-theme='dark'] .btn.btn--event { border-color: #ffd60a; }
@media (prefers-color-scheme: dark) { .btn.btn--event { border-color: #ffd60a; } }

@media (max-width: 560px) {
  /* On phones the event note (e.g. "Ad drops Nov 15") is the one detail worth the space. */
  .store--event .store__cta { display: inline-flex; font-size: 0.76rem; }
  .bf-hero ~ .band .band__head { flex-wrap: wrap; }
  .bf-hero ~ .band .band__head .filter { flex: 1 1 100%; }
}

/* The Black Friday link on a saved store's tile. */
.store__info.store__event { color: var(--ink); text-decoration-color: var(--tag); text-decoration-thickness: 2px; font-weight: 600; }
.store__info.store__event:hover { color: var(--green); }
[data-saved-empty] .icon { vertical-align: -2px; color: var(--red); }

.prose h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; margin-top: 4px; }
.prose__list { display: grid; gap: 6px; padding-left: 1.2em; }
.prose code { font-size: 0.92em; padding: 1px 5px; border-radius: 4px; background: var(--green-wash); }
.selectable { user-select: all; font-weight: 600; }
.postal { display: grid; font-style: normal; padding-left: 12px; border-left: 3px solid var(--tag); }

/* Links to the sister site at the end of the menu bar, marked as leaving the site. */
.cats a.cats__ext { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.cats a.cats__ext .icon { opacity: 0.7; }
.cats a.cats__ext:hover { color: var(--ink); }
.cats a.cats__ext--first { margin-left: auto; padding-left: 20px; }

/* The store-info paragraph on a store page. */
.store-about { display: grid; gap: 10px; justify-items: start; }
.store-about > * { max-width: 72ch; }
.store-about h2 { font-stretch: 84%; font-weight: 800; font-size: 1.25rem; }
.store-about p { color: var(--ink-2); font-size: 1.02rem; }
.store-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.store-facts div { display: grid; gap: 1px; }
.store-facts dt { font: 700 0.72rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.store-facts dd { margin: 0; font-weight: 700; }
.edition__lede strong { color: var(--ink); font-weight: 600; }

/* The home headline breaks where it reads best ("This week's ads / in Delaware"), the same for every state. */
.edition h1 { max-width: none; }
.h1-line { display: block; }

/* "Missing a store?" call-out and the request form. */
.request-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-block: 24px 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.request-prompt p { color: var(--ink-2); }
.request-prompt b { color: var(--ink); }
.request { display: grid; justify-items: start; }
.request > * { width: 100%; max-width: 640px; }
.request__form { display: grid; gap: 16px; }
.request__form label { display: grid; gap: 5px; font-weight: 600; }
.request__form input, .request__form select, .request__form textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; }
.request__form input:focus, .request__form select:focus, .request__form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.request__form small { font-weight: 400; color: var(--ink-2); }
.request__form .btn { justify-self: start; }
.request__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.request .optional { font-weight: 400; color: var(--ink-2); }
.request__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.request__done { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.request__done h2 { font-stretch: 84%; font-size: 1.4rem; }
.request__done p { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-2); }
.request .flash { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); font-weight: 600; }
@media (max-width: 560px) { .request__row { grid-template-columns: 1fr; } }
