/* Modern Deal Storefront — clean, high-conversion typography & layout
 * Wirecutter / modern retail aesthetic: clean slate canvas, crisp cards, emerald CTA, bold savings
 */
@import url('/assets/tokens.css');

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--color-accent); text-underline-offset: 0.18em; text-decoration: none; }
a:hover { color: var(--color-accent-deep); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
  margin: 0 0 var(--space-xs);
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
  color: var(--color-ink);
  letter-spacing: -0.02em;
}
h1 { font-size: var(--text-display-s); font-weight: 800; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-md); font-weight: 600; }
p { margin: 0 0 var(--space-sm); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-sm); top: -4rem; z-index: var(--z-sticky); background: var(--color-ink); color: #ffffff; padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-label); }
.skip:focus { top: var(--space-sm); }
.lead { font-size: var(--text-md); color: var(--color-ink-2); max-width: 62ch; line-height: 1.6; }
.fine { font-size: var(--text-sm); color: var(--color-muted); }
main { padding-bottom: var(--space-2xl); }

/* ---------- Buttons & links ---------- */
.button, button, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0 var(--space-md);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #ffffff;
  font: 700 var(--text-sm)/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(5 150 105 / 0.25);
  transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.button:hover, button:hover, .cta:hover {
  background: var(--color-accent-deep);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgb(5 150 105 / 0.35);
  transform: translateY(-1px);
}
.button:active, button:active, .cta:active { transform: translateY(1px); box-shadow: none; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.button--ghost, .button-quiet { background: transparent; color: var(--color-accent); box-shadow: none; border: 1px solid var(--color-rule-2); }
.button--ghost:hover, .button-quiet:hover { background: var(--color-accent-soft); color: var(--color-accent-deep); box-shadow: none; }
.text-link { font-weight: 600; white-space: nowrap; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-rule);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03);
}
.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding-block: 0.875rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-ink);
  text-decoration: none;
}
.brand:hover { color: var(--color-ink); text-decoration: none; }
.brand__word { display: flex; flex-direction: column; font-family: var(--font-display); line-height: 1; }
.brand__top { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }
.brand__bottom { font-size: 1.35rem; font-weight: 800; color: var(--color-ink); letter-spacing: -0.02em; }
.jar-mark__lid { fill: var(--color-accent); }
.jar-mark__glass { fill: var(--color-card); stroke: var(--color-ink); stroke-width: 1.6; }
.jar-mark__label { fill: var(--color-accent-deep); }
.jar-mark__tag { fill: #f59e0b; stroke: #d97706; stroke-width: 1; }
.jar-mark__hole { fill: var(--color-paper); }

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-rule-2);
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-label);
}
.menu-toggle:hover { background: var(--color-paper-2); color: var(--color-ink); border-color: var(--color-ink); }
.menu-toggle__lines { width: 1rem; height: 0.625rem; border-block: 2px solid currentColor; position: relative; }
.menu-toggle__lines::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid currentColor; transform: translateY(-50%); }

.primary-nav { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-sm); width: 100%; }
.primary-nav a {
  color: var(--color-ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.375rem 0.125rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

.js .menu-toggle { display: inline-flex; }
.js .primary-nav:not(.is-open) { display: none; }
.js .primary-nav.is-open { flex-direction: column; padding-block: var(--space-2xs); }

/* Aisle Navigation Bar */
.aisle-rail {
  background: var(--color-paper-2);
  border-block: 1px solid var(--color-rule);
  padding-block: 0.375rem;
}
.aisle-rail__list {
  display: flex;
  gap: 0.375rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.aisle-rail a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  background: var(--color-card);
  color: var(--color-ink-2);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.02);
  transition: all 0.15s ease;
}
.aisle-rail a:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.aisle-rail a[aria-current="page"] {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}
.aisle-rail__no {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: var(--radius-pill);
  background: var(--color-ink-2);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
}
.aisle-rail a[aria-current="page"] .aisle-rail__no {
  background: #ffffff;
  color: var(--color-accent);
}

@media (min-width: 52rem) {
  .masthead__bar { flex-wrap: nowrap; }
  .js .menu-toggle { display: none; }
  .primary-nav, .js .primary-nav:not(.is-open) { display: flex; width: auto; gap: var(--space-md); flex-direction: row; }
  .aisle-rail__list { justify-content: space-between; }
}

/* ---------- Breadcrumbs & page heads ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-2xs);
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.breadcrumbs li { display: inline-flex; gap: var(--space-2xs); min-width: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--color-rule-2); }
.breadcrumbs a { color: var(--color-muted); white-space: nowrap; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; color: var(--color-ink-2); font-weight: 600; }
.page-head { padding-block: var(--space-lg) var(--space-md); }
.page-head__kicker, .hero__kicker { margin-bottom: var(--space-2xs); font-size: var(--text-sm); font-weight: 700; color: var(--color-accent); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Home hero + ticket ---------- */
.hero { display: grid; gap: var(--space-lg); padding-block: var(--space-xl) var(--space-lg); }
.hero h1 { font-size: var(--text-display); max-width: 14ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-md); }

.ticket {
  margin: 0;
  padding: 1.25rem;
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  align-self: start;
  position: relative;
}
.ticket::before {
  content: "Today's shelf";
  grid-column: 1 / -1;
  font: 700 0.75rem/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--color-rule);
}
.ticket div { min-width: 0; }
.ticket dt { font-size: 0.75rem; color: var(--color-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.ticket dd { margin: 0.25rem 0 0; font-size: 1.875rem; font-weight: 800; line-height: 1; color: var(--color-ink); letter-spacing: -0.02em; }
.ticket__wide { grid-column: 1 / -1; border-top: 1px solid var(--color-rule); padding-top: var(--space-xs); }
.ticket__wide dd { font: 500 var(--text-sm)/1.5 var(--font-body); color: var(--color-ink-2); }
.ticket--empty { display: block; }
@media (min-width: 52rem) { .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; } }

/* ---------- Shelves ---------- */
.shelf-section { margin-block: var(--space-xl); }
.shelf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.shelf-head h2 { margin: 0; }
.shelf-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: none;
  max-width: 100%;
  flex-wrap: wrap;
}
.shelf-label__no {
  padding: 0.25rem 0.5rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.shelf-label__icon { display: inline-flex; color: var(--color-accent); }
.shelf-label__name { font-size: 1.35rem; font-weight: 800; color: var(--color-ink); letter-spacing: -0.02em; }
.shelf-label__count { font-size: 0.8125rem; font-weight: 500; color: var(--color-muted); }

.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
  box-shadow: none;
  margin-bottom: var(--space-xl);
}
.deal-grid > [hidden] { display: none; }
.disclosure { font-size: var(--text-sm); color: var(--color-muted); max-width: 70ch; }
.empty-shelf { padding: var(--space-lg) var(--space-md); border: 1px dashed var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink-2); }
.empty-shelf p { margin: 0; }

/* ---------- Deal card ---------- */
.deal-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  border-color: var(--color-rule-2);
}
.deal-card__media {
  aspect-ratio: 1;
  display: grid;
  border-bottom: 1px solid var(--color-rule);
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
.product-photo {
  display: grid;
  place-items: center;
  padding: var(--space-md);
  background: #ffffff;
}
.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease-out;
}
.deal-card:hover .product-photo img {
  transform: scale(1.04);
}

.deal-card__body {
  padding: 0.875rem 0.875rem 0.375rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.deal-card__brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.deal-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  margin-block: 0.125rem 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal-card__title a { color: var(--color-ink); text-decoration: none; }
.deal-card__title a:hover { color: var(--color-accent); text-decoration: none; }
.deal-card__checked { margin-top: auto; font-size: 0.75rem; color: var(--color-muted); }
.deal-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  padding: 0.375rem 0.875rem 0.875rem;
}
.deal-card__more { font-size: 0.8125rem; font-weight: 600; color: var(--color-accent); white-space: nowrap; }
.deal-card__more:hover { text-decoration: underline; }
.cta--compact {
  min-height: 2.25rem;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
}
.deal-card--past { opacity: 0.85; }
.aisle-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.aisle-chip--none { color: var(--color-muted); }

/* Deal Card Badge / Stamp */
.stamp {
  margin: 0;
  padding: 3px 8px;
  border: none;
  color: #ffffff;
  background: var(--color-stamp);
  font: 700 0.7rem/1.2 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: none;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 4px rgb(220 38 38 / 0.3);
  width: max-content;
}
.deal-card__media .stamp {
  position: absolute;
  left: 0.625rem;
  top: 0.625rem;
  z-index: 2;
}

/* Shelf tag (Price block) */
.shelf-tag {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.375rem 0.875rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: 8px;
  clip-path: none;
}
.shelf-tag p { margin: 0; }
.shelf-tag__main { flex: 1; min-width: 0; }
.shelf-tag__label { font: 700 0.7rem/1.1 var(--font-body); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-muted); }
.shelf-tag__price { font-size: 1.35rem; font-weight: 800; color: var(--color-ink); letter-spacing: -0.02em; }
.shelf-tag__was { font-size: 0.75rem; color: var(--color-muted); text-decoration: line-through; margin-top: 1px; }
.shelf-tag__off {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #dcfce7;
  color: #15803d;
  margin-left: 0.375rem;
}
.shelf-tag__unit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  border: none;
  text-align: right;
  min-width: auto;
}
.shelf-tag__unit-price { font-size: 0.8125rem; font-weight: 600; color: var(--color-ink-2); }
.shelf-tag__unit-per { font-size: 0.7rem; color: var(--color-muted); }
.shelf-tag--noprice .shelf-tag__price { font-size: 1.125rem; }

.shelf-tag--large { margin: 0 0 var(--space-sm); padding: var(--space-md); border-radius: var(--radius-card); }
.shelf-tag--large .shelf-tag__price { font-size: var(--text-3xl); }
.shelf-tag--large .shelf-tag__was { font-size: var(--text-sm); }
.shelf-tag--large .shelf-tag__unit { min-width: auto; }
.shelf-tag--large .shelf-tag__unit-price { font-size: 1.125rem; }

/* Jar-label placeholder */
.jar-label {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-3xs);
  padding: var(--space-md);
  margin: var(--space-md);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  text-align: center;
}
.jar-label__icon { color: var(--color-accent); }
.jar-label__brand { font: 700 var(--text-md)/1.1 var(--font-display); color: var(--color-ink); }
.jar-label__size { font: 600 var(--text-sm)/1.2 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); }
.jar-label__note { font-size: var(--text-xs); color: var(--color-muted); }

/* Phones */
@media (max-width: 40rem) {
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .deal-card__body { padding: var(--space-xs); }
  .deal-card__title { font-size: 0.8125rem; -webkit-line-clamp: 2; }
  .deal-card__brand, .deal-card__checked { font-size: 0.7rem; }
  .deal-card .shelf-tag { flex-direction: column; margin-inline: var(--space-xs); padding: 0.375rem; }
  .deal-card .shelf-tag__price { font-size: 1.125rem; }
  .deal-card .shelf-tag__unit { align-items: flex-start; }
  .deal-card__actions { flex-direction: column-reverse; align-items: stretch; padding: var(--space-2xs) var(--space-xs) var(--space-xs); text-align: center; }
  .deal-card .stamp { font-size: 0.65rem; left: 0.375rem; top: 0.375rem; padding: 2px 6px; }
  .product-photo { padding: var(--space-xs); }
}

/* ---------- Deal page ---------- */
.deal-page__head { padding-block: var(--space-md); }
.deal-page__head h1 { font-size: var(--text-2xl); max-width: 40ch; line-height: 1.25; }
.deal-page__meta { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.deal-page__meta span + span::before { content: '·'; margin-right: var(--space-sm); color: var(--color-rule-2); }
.check-line { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); padding: 0.5rem var(--space-sm); border-radius: var(--radius-label); border-left: 4px solid var(--color-accent); background: var(--color-accent-soft); font-size: var(--text-sm); font-weight: 500; }
.check-line--past { border-left-color: var(--color-muted); background: var(--color-paper-2); }

.deal-page__grid { display: grid; gap: var(--space-lg); }
.deal-page__media { background: #ffffff; border: 1px solid var(--color-rule); border-radius: var(--radius-card); aspect-ratio: 1; display: grid; overflow: hidden; max-height: 32rem; }
.buy-box { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-sm); padding-top: var(--space-md); }
.buy-box .shelf-tag { align-self: stretch; margin: 0; }
.buy-box .cta { width: 100%; min-height: 3.25rem; font-size: var(--text-md); }
.buy-box__summary { color: var(--color-ink-2); font-size: var(--text-sm); }
@media (min-width: 52rem) { .deal-page__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.price-story { margin-block: var(--space-xl); padding: var(--space-md); background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.history-notes { margin: 0 0 var(--space-md); padding-left: var(--space-md); }
.history-notes li { margin-bottom: var(--space-3xs); }
.fact-table { width: 100%; border-collapse: collapse; margin-top: var(--space-md); font-size: var(--text-sm); }
.fact-table caption { text-align: left; font: 700 var(--text-md)/1.2 var(--font-display); padding-bottom: var(--space-2xs); color: var(--color-ink); }
.fact-table th, .fact-table td { padding: 0.625rem 0; border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
.fact-table td { text-align: right; font: 600 var(--text-md)/1.2 var(--font-body); color: var(--color-ink); }
.fact-table th { font-weight: 500; padding-right: var(--space-sm); color: var(--color-muted); }

.deal-page__checks { display: grid; gap: var(--space-md); }
@media (min-width: 52rem) { .deal-page__checks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.checklist { padding: var(--space-md); background: var(--color-card); border-radius: var(--radius-card); border: 1px solid var(--color-rule); border-top: 4px solid var(--color-accent); }
.checklist ul { padding-left: var(--space-md); margin: 0 0 var(--space-sm); }
.checklist li { margin-bottom: var(--space-2xs); }
.checklist h3 { font-size: var(--text-base); margin-top: var(--space-sm); }

.guide-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.guide-links a { padding: var(--space-3xs) var(--space-xs); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Price chart ---------- */
.price-chart { margin: var(--space-md) 0; padding: var(--space-md); background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.price-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); }
.price-chart__head h2 { font-size: var(--text-lg); margin: 0; }
.price-chart__key { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-sm); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--color-muted); }
.price-chart__key li { display: inline-flex; align-items: center; gap: var(--space-3xs); }
.price-chart__key li::before { content: ''; width: 1rem; border-top: 3px solid var(--color-accent); }
.price-chart__key .k-typical::before { border-top: 2px dashed var(--color-muted); }
.price-chart__key .k-low::before { width: 0.6rem; height: 0.6rem; border: 0; border-radius: 50%; background: var(--color-stamp); }
.price-chart__svg { display: block; width: 100%; height: auto; margin-top: var(--space-2xs); }
.price-chart figcaption { margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.pc-grid { stroke: var(--color-rule); stroke-width: 1; }
.pc-tick { stroke: var(--color-rule); stroke-width: 1; stroke-dasharray: 2 4; }
.pc-axis { fill: var(--color-muted); font-size: 12px; font-family: var(--font-body); }
.pc-area { fill: var(--color-accent); fill-opacity: 0.08; }
.pc-line { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linejoin: round; }
.pc-typical { stroke: var(--color-muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.pc-low { fill: var(--color-stamp); stroke: var(--color-paper); stroke-width: 2; }
.pc-now { fill: #f59e0b; stroke: #d97706; stroke-width: 2.5; }
.pc-now-label { fill: var(--color-ink); font-size: 13px; font-weight: 800; font-family: var(--font-body); }
@media (max-width: 35rem) { .pc-axis { font-size: 20px; } .pc-now-label { font-size: 22px; } .price-story { padding: var(--space-sm); } }

/* ---------- Deals index: filter bar ---------- */
.collection-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-block: var(--space-sm); }
.collection-links a, .chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.collection-links a:hover, .chip:hover { border-color: var(--color-accent); color: var(--color-accent); }
.chip.is-active { background: var(--color-accent); color: #ffffff; border-color: var(--color-accent); }

.filter-bar { display: grid; gap: var(--space-sm); margin-block: var(--space-md); padding: var(--space-sm); background: var(--color-paper-2); border-radius: var(--radius-card); border: 1px solid var(--color-rule); }
.filter-bar label { display: grid; gap: var(--space-3xs); font-size: var(--text-sm); font-weight: 600; }
.filter-bar__chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
input, select {
  font: inherit;
  color: var(--color-ink);
  background: var(--color-card);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-label);
  min-height: 2.5rem;
  padding: 0 var(--space-xs);
  width: 100%;
  min-width: 0;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.02);
}
input:hover, select:hover { border-color: var(--color-ink-2); }
input:focus-visible, select:focus-visible { border-color: var(--color-focus); }
input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--color-error); }
@media (min-width: 52rem) { .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 12rem); } .filter-bar__chips { grid-column: 1 / -1; } }

/* ---------- Aisles page ---------- */
.aisles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-md); margin-block: var(--space-lg); }
.aisle-sign {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-ink);
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
.aisle-sign:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08);
  border-color: var(--color-accent);
  color: var(--color-ink);
  text-decoration: none;
}
.aisle-sign__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2xs); }
.aisle-sign__no {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-pill);
}
.aisle-sign__icon { color: var(--color-accent); }
.aisle-sign h2 { font-size: var(--text-lg); margin: 0 0 var(--space-3xs); }
.aisle-sign p { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.aisle-sign__count { margin-top: auto; padding-top: var(--space-sm); font-size: var(--text-xs); font-weight: 700; color: var(--color-accent); }

/* ---------- Guides & prose ---------- */
.prose { max-width: var(--measure); line-height: 1.7; }
.prose h2 { margin-top: var(--space-xl); }
.prose h3 { margin-top: var(--space-lg); }
.prose ul, .prose ol { padding-left: var(--space-md); }
.prose li { margin-bottom: var(--space-2xs); }
.document { padding-bottom: var(--space-xl); }
.byline { font-size: var(--text-sm); color: var(--color-muted); }
.guide__layout { display: grid; gap: var(--space-xl); }
.guide__aside { display: grid; gap: var(--space-sm); align-content: start; }
.aside-card { display: grid; gap: var(--space-2xs); padding: var(--space-md); background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.aside-card h2 { font-size: var(--text-md); }
.aside-card p { margin: 0; }
.aside-card .button { white-space: normal; text-align: center; min-height: 2.75rem; padding-block: var(--space-2xs); }
@media (min-width: 60rem) { .guide__layout { grid-template-columns: minmax(0, 1fr) 18rem; } .guide__aside { position: sticky; top: var(--space-md); } }
.sources { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px dashed var(--color-rule-2); font-size: var(--text-sm); }
.faq { margin-block: var(--space-xl); max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--color-rule-2); }
.faq summary { padding: var(--space-sm) 0; font-weight: 700; cursor: pointer; }
.faq summary:hover { color: var(--color-accent); }
.faq details p { margin-top: 0; }
.contact-address { font-weight: 700; overflow-wrap: anywhere; }
.aisles-note { margin-block: var(--space-xl); }

/* ---------- Calculator workbench ---------- */
.workbench { display: grid; gap: var(--space-xl); }
@media (min-width: 60rem) { .workbench { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.calculator { padding: var(--space-md); background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.calculator__title { font-size: var(--text-lg); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: var(--space-sm); }
.fields label { display: grid; gap: var(--space-3xs); font-size: var(--text-sm); font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-md); }
.form-error { margin-top: var(--space-sm); padding: var(--space-xs); background: var(--color-error-bg); color: var(--color-error); border-radius: var(--radius-label); font-weight: 600; }
.result-slip { margin-top: var(--space-md); padding: var(--space-md); background: var(--color-paper-2); color: var(--color-ink); border-radius: var(--radius-label); border: 1px solid var(--color-rule); }
.result-slip h3 { font-size: var(--text-lg); }
.result-slip ul { margin: 0; padding-left: var(--space-md); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding-block: var(--space-2xl);
  border-top: 1px solid #1e293b;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #ffffff; }
.site-footer__inner { display: grid; gap: var(--space-lg); }
.site-footer .brand { color: #ffffff; }
.site-footer .brand__top { color: #10b981; }
.site-footer__brand p { margin-top: var(--space-sm); max-width: 40ch; font-size: var(--text-sm); color: #94a3b8; }
.site-footer__links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: var(--space-md); }
.site-footer__links div { display: grid; gap: var(--space-2xs); align-content: start; }
.site-footer__links h2 { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-label); color: #f8fafc; }
.site-footer__links a { white-space: nowrap; text-decoration: none; font-size: var(--text-sm); }
.site-footer__links a:hover { text-decoration: underline; color: #ffffff; }
.site-footer__legal { grid-column: 1 / -1; font-size: var(--text-xs); max-width: 90ch; margin: 0; opacity: 0.8; color: #64748b; }
@media (min-width: 52rem) { .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.review-notice { margin-top: var(--space-sm); padding: var(--space-xs); background: var(--color-stamp-soft); border-radius: var(--radius-label); font-size: var(--text-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .deal-card:hover, .aisle-sign:hover { transform: none; }
}
.pc-now-label { paint-order: stroke; stroke: var(--color-card); stroke-width: 4px; stroke-linejoin: round; }
@media (min-width: 64rem) { .aisle-rail__list { overflow: visible; flex-wrap: wrap; } }
@media (min-width: 64rem) { .aisle-rail .icon { display: none; } .aisle-rail__list { flex-wrap: nowrap; gap: var(--space-3xs); } }
@media (max-width: 40rem) { .filter-bar__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-3xs); scrollbar-width: thin; } }
