:root {
  --ink: #173b2b;
  --ink-soft: #426052;
  --cream: #f4f0e7;
  --paper: #fffdf8;
  --line: #d6d3c8;
  --lime: #d8ff62;
  --coral: #ff745c;
  --gold: #f2bd45;
  --shadow: 0 14px 35px rgba(23, 59, 43, .09);
}

/* Author layout rules must never override the platform's hidden state. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { scroll-behavior: smooth; }
.skip-link {
  position: fixed;
  z-index: 5000;
  left: 16px;
  top: 10px;
  padding: 11px 16px;
  color: #fff;
  background: #111;
  border: 3px solid #fff;
  border-radius: 8px;
  font-weight: 850;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
.beta-banner {
  position: relative;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px clamp(18px, 5vw, 72px);
  color: #633114;
  background: #fff0dc;
  border-bottom: 4px solid #e67e22;
  box-shadow: 0 5px 16px rgba(30, 39, 44, .11);
  text-align: center;
}
.beta-banner-label {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #fff;
  background: #e67e22;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
}
.beta-banner p { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.4; }
.beta-banner strong { font-weight: 900; }
.cookie-banner[hidden] { display: none; }
.cookie-banner { position: fixed; z-index: 1300; right: 22px; bottom: 22px; left: 22px; display: flex; width: min(1040px, calc(100% - 44px)); align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 18px 20px; color: var(--ink); background: rgba(255,255,255,.98); border: 2px solid var(--forest); border-radius: 18px; box-shadow: 0 22px 70px rgba(30,39,44,.25); }
.cookie-banner-copy { display: flex; min-width: 0; align-items: flex-start; gap: 13px; }
.cookie-banner-copy > div { min-width: 0; }
.cookie-banner-copy strong { display: block; margin-bottom: 3px; font-size: 16px; }
.cookie-banner-copy p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.cookie-banner-copy a { color: var(--forest); font-weight: 750; }
.cookie-icon { font-size: 28px; line-height: 1; }
.cookie-banner-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.active-search-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 8px 10px; color: var(--ink); background: #eaf5eb; border: 1px solid #b8d5bc; border-radius: 10px; font-size: 13px; }
.active-search-state .text-button { min-height: 30px; padding: 3px 8px; color: var(--forest); font-weight: 850; }
.deal-action-explanation { padding: 9px 11px; background: #f2f8f2; border-left: 4px solid var(--forest); border-radius: 8px; }
.button.cookie-choice { color: var(--forest); background: #fff; border: 1px solid #7baa81; box-shadow: none; }
.button.cookie-choice:hover, .button.cookie-choice:focus-visible { color: #fff; background: var(--forest); outline: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, select, input:not([type="checkbox"]):not([type="radio"]) { min-height: 36px; }
input[type="checkbox"], input[type="radio"] { min-width: 24px; min-height: 24px; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #b94f00 !important;
  outline-offset: 3px !important;
}
.auth-shell[hidden] { display: none; }

.site-tour[hidden] { display: none; }
.site-tour { position: fixed; z-index: 1200; inset: 0; pointer-events: none; }
.site-tour-card { position: fixed; right: clamp(14px, 4vw, 54px); bottom: clamp(14px, 4vw, 42px); width: min(440px, calc(100vw - 28px)); padding: 20px; color: var(--ink); background: var(--paper); border: 2px solid var(--coral); border-radius: 20px; box-shadow: 0 24px 70px rgba(30,39,44,.28); pointer-events: auto; }
.site-tour-card:focus { outline: none; }
.site-tour-card-heading { display: flex; align-items: center; gap: 12px; }
.site-tour-card-heading img { width: 58px; height: 54px; object-fit: contain; }
.site-tour-card-heading span { display: block; margin-bottom: 3px; color: var(--coral); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.site-tour-card h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; line-height: 1.1; }
.site-tour-card > p { margin: 14px 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.site-tour-points { display: grid; gap: 7px; margin: -6px 0 18px; padding: 13px 15px 13px 32px; color: var(--ink); background: #f2f8f2; border: 1px solid #c8ddca; border-radius: 13px; font-size: 13px; font-weight: 720; line-height: 1.4; }
.site-tour-points[hidden] { display: none; }
.site-tour-points li::marker { color: var(--forest); }
.site-tour-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 9px; }
.site-tour-actions .text-button { color: var(--ink-soft); }
.site-tour-highlight { position: relative; z-index: 20; border-radius: 14px; outline: 4px solid var(--coral); outline-offset: 5px; box-shadow: 0 0 0 9px rgba(230,126,34,.18); scroll-margin: 110px 0 280px; animation: site-tour-pulse 1.5s ease-in-out infinite; }
body.site-tour-active .topbar { z-index: 30; }
@keyframes site-tour-pulse { 50% { outline-color: var(--forest); box-shadow: 0 0 0 12px rgba(46,125,50,.13); } }

@media screen and (max-width: 560px) {
  .beta-banner { align-items: flex-start; gap: 9px; padding: 11px 14px; text-align: left; }
  .beta-banner-label { margin-top: 2px; }
  .beta-banner p { font-size: 13px; }
  .cookie-banner { right: 10px; bottom: 10px; left: 10px; flex-direction: column; width: calc(100% - 20px); max-height: calc(100dvh - 20px); align-items: stretch; gap: 14px; overflow-y: auto; padding: 16px; }
  .cookie-banner-copy { width: 100%; }
  .cookie-banner-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
  .cookie-banner-actions .text-button { justify-self: stretch; }
  .cookie-banner-actions .button, .cookie-banner-actions .text-button { width: 100%; min-width: 0; justify-content: center; padding-inline: 10px; font-size: 14px; }
  .cookie-dialog { padding: 20px 18px; }
  .accessibility-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); padding: 20px 18px; }
  .accessibility-option, .accessibility-select { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .accessibility-option input { justify-self: start; }
  .accessibility-select select { width: 100%; }
  .cookie-category { grid-template-columns: minmax(0, 1fr) auto; }
  .cookie-category em { grid-column: 1; grid-row: 2; text-align: left; }
  .cookie-category input { grid-column: 2; grid-row: 1 / span 2; }
  .cookie-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-dialog-actions #cookie-dialog-cancel { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .privacy-dialog-heading { padding: 20px 18px 14px; }
  .privacy-dialog-heading h2 { font-size: 30px; }
  .privacy-promise { margin: 18px 18px 0; }
  .privacy-content { padding: 8px 18px 20px; }
  .privacy-dialog-footer { padding: 12px 18px; }
  .site-footer { width: calc(100% - 28px); margin-top: -28px; padding-bottom: 24px; }
  .site-tour-card { right: 9px; bottom: 9px; width: calc(100vw - 18px); padding: 16px; }
  .site-tour-card-heading img { width: 48px; height: 44px; }
  .site-tour-card h2 { font-size: 20px; }
  .site-tour-card > p { margin: 11px 0 14px; font-size: 13px; }
  .site-tour-points { margin-bottom: 14px; font-size: 12px; }
  .site-tour-actions { grid-template-columns: auto 1fr auto; }
  .site-tour-actions > span { display: none; }
}

.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 80% 15%, rgba(216,255,98,.6), transparent 28%), var(--cream); }
.auth-card { width: min(100%, 470px); padding: 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.auth-brand { margin-bottom: 54px; }
.auth-card h1 { margin-bottom: 16px; font-size: clamp(50px, 10vw, 76px); }
.auth-copy { margin-bottom: 26px; color: var(--ink-soft); }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form .button { justify-self: start; margin-top: 4px; }
.optional-email-field { padding: 13px; background: #f1f8f2; border: 1px solid #bdd8c0; border-radius: 12px; }
.optional-email-field > span strong, #email-settings-form label > span strong { display: inline-block; margin-left: 5px; padding: 2px 7px; color: #7b3b16; background: #fff0dd; border-radius: 999px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.text-button { padding: 4px 0; color: var(--ink); background: transparent; border: 0; font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.auth-card > div > .text-button { margin-top: 18px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; }
.auth-links .text-button { margin: 0; }
.auth-links .privacy-link { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.account-actions { display: flex; align-items: center; justify-self: end; gap: 12px; }
.account-button { padding: 7px 12px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 100px; font-size: 12px; font-weight: 750; }
.header-signout { text-decoration: none; }
dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 70px rgba(23,59,43,.24); }
dialog::backdrop { background: rgba(17,36,28,.46); backdrop-filter: blur(3px); }
.account-dialog { width: min(94vw, 620px); max-height: 88vh; padding: 28px; overflow: auto; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-heading h2, .recovery-dialog h2 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.dialog-close { display: grid; width: 34px; height: 34px; place-items: center; background: #eef0e9; border: 0; border-radius: 50%; font-size: 22px; }
.account-identity { color: var(--ink-soft); font-size: 13px; }
.auth-form.compact { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.auth-form.compact h3 { margin-bottom: 0; }
.form-note { margin-bottom: 0; color: var(--ink-soft); font-size: 12px; }
.email-status { margin: 0; padding: 10px 12px; color: #245b2a; background: #eef8ef; border: 1px solid #c1ddc4; border-radius: 10px; font-size: 12px; font-weight: 750; }
.email-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.account-danger-zone { margin-top: 22px; border: 2px solid #b64a35; background: #fff5f1; }
.account-danger-zone h3 { color: #7d271c; }
.button.danger { background: #a73b2c; color: #fff; border-color: #7d271c; }
.button.danger:hover, .button.danger:focus-visible { background: #7d271c; }
.email-alert-option { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 13px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 12px; }
.email-alert-option span strong, .email-alert-option span small { display: block; }
.email-alert-option span small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.email-alert-option input { width: 24px; }
.recovery-dialog { width: min(92vw, 520px); padding: 30px; text-align: center; }
.recovery-dialog code { display: block; margin: 22px 0; padding: 16px; overflow-wrap: anywhere; color: var(--ink); background: #eef0e9; border-radius: 12px; font-size: 18px; font-weight: 800; user-select: all; }
.cookie-dialog { width: min(94vw, 720px); padding: 28px; }
.accessibility-dialog { width: min(94vw, 760px); max-height: 90vh; padding: 28px; overflow: auto; }
.accessibility-dialog .dialog-heading h2 { margin-bottom: 8px; }
.accessibility-intro { max-width: 570px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
#accessibility-form { display: grid; gap: 10px; margin: 22px 0 14px; }
.accessibility-option, .accessibility-select { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 68px; padding: 13px 16px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 13px; }
.accessibility-option > span strong, .accessibility-option > span small, .accessibility-select > span strong, .accessibility-select > span small { display: block; }
.accessibility-option strong, .accessibility-select strong { color: var(--ink); font-size: 14px; }
.accessibility-option small, .accessibility-select small { margin-top: 3px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.accessibility-option input { width: 24px; accent-color: var(--forest); }
.accessibility-select select { min-width: 150px; padding: 7px 34px 7px 10px; }
.accessibility-storage-note { margin: 0; padding: 11px 13px; color: var(--ink-soft); background: #fff7e8; border-left: 4px solid var(--coral); border-radius: 8px; font-size: 12px; line-height: 1.5; }
.accessibility-statement { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.accessibility-statement h3 { margin: 0 0 6px; font-size: 16px; }
.accessibility-statement p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.accessibility-statement a { color: var(--forest); font-weight: 800; }
.accessibility-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.cookie-dialog .dialog-heading h2 { margin-bottom: 8px; }
.cookie-dialog-intro { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.cookie-category-list { display: grid; gap: 10px; margin: 22px 0 16px; }
.cookie-category { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 16px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.cookie-category > span strong, .cookie-category > span small { display: block; }
.cookie-category > span strong { color: var(--ink); font-size: 14px; }
.cookie-category > span small { margin-top: 3px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.cookie-category input { width: 21px; min-height: 21px; accent-color: var(--forest); }
.cookie-category em { min-width: 76px; color: var(--ink-soft); font-size: 10px; font-style: normal; font-weight: 800; text-align: right; text-transform: uppercase; }
.cookie-category.required, .cookie-category.unavailable { cursor: default; }
.cookie-category.required { background: #eaf3eb; border-color: #b7cfba; }
.cookie-category.unavailable { opacity: .72; }
.cookie-dialog-note { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.cookie-dialog-note a { color: var(--forest); font-weight: 750; }
.cookie-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.privacy-dialog { width: min(94vw, 900px); max-height: 88vh; padding: 0; overflow: auto; }
.privacy-dialog-heading { position: sticky; z-index: 2; top: 0; padding: 26px 30px 18px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.privacy-dialog-heading h2 { margin: 0 0 6px; }
.privacy-effective { margin: 0; color: var(--ink-soft); font-size: 11px; }
.privacy-promise { display: grid; gap: 4px; margin: 24px 30px 0; padding: 16px 18px; color: #1f5f25; background: #e8f3e9; border: 1px solid #a9c7ad; border-left: 5px solid var(--forest); border-radius: 14px; }
.privacy-promise strong { font-size: 16px; }
.privacy-promise span { color: var(--ink-soft); font-size: 12px; }
.privacy-content { padding: 12px 30px 26px; }
.privacy-content section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.privacy-content section:last-child { border-bottom: 0; }
.privacy-content h3 { margin: 0 0 9px; color: var(--mask-grey); font-size: 18px; }
.privacy-content p, .privacy-content li { color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.privacy-content p { margin: 0 0 10px; }
.privacy-content p:last-child { margin-bottom: 0; }
.privacy-content ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.privacy-content strong { color: var(--ink); }
.privacy-content code { padding: 2px 5px; color: var(--ink); background: #edf1ee; border-radius: 5px; font-size: 12px; }
.privacy-content a { color: var(--forest); font-weight: 750; }
.inline-privacy-control { display: inline; padding: 0; font-size: inherit; vertical-align: baseline; }
.privacy-dialog-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 14px 30px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.site-footer { display: flex; width: min(1320px, calc(100% - 40px)); align-items: center; justify-content: space-between; gap: 18px; margin: -38px auto 0; padding: 24px 0 34px; color: var(--ink-soft); border-top: 1px solid var(--line); font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.site-footer a, .site-footer .footer-link { padding: 0; color: var(--forest); background: transparent; border: 0; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding: 12px clamp(20px, 5vw, 72px);
  background: rgba(244, 240, 231, .9);
  border-bottom: 1px solid rgba(23, 59, 43, .13);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50% 50% 50% 12%; background: var(--ink); color: var(--lime); font-family: Georgia, serif; font-size: 21px; }
.topbar > .button { justify-self: end; }
.scan-state { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9caa9f; box-shadow: 0 0 0 4px rgba(156, 170, 159, .16); }
.scan-state.running .status-dot { background: var(--gold); animation: pulse 1.1s infinite; }
.scan-state.completed .status-dot { background: #2f9f61; }
.scan-state.failed .status-dot { background: var(--coral); }

main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; min-height: 410px; padding: 74px 0 54px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 14px; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 920px; margin-bottom: 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 7.5vw, 104px); font-weight: 400; letter-spacing: -.055em; line-height: .91; }
.lede { max-width: 710px; margin-bottom: 0; color: var(--ink-soft); font-size: clamp(16px, 2vw, 20px); }
.hero-note { display: flex; align-items: baseline; gap: 10px; padding: 18px 22px; background: var(--lime); border-radius: 100px; transform: rotate(-3deg); white-space: nowrap; }
.note-number { font-family: Georgia, serif; font-size: 54px; line-height: .8; }
.hero-note span:last-child { font-size: 12px; font-weight: 800; line-height: 1.1; text-transform: uppercase; }

.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 24px 0 70px; }
.sale-only .setup-grid { grid-template-columns: 1fr; }
.sale-only .report-section { padding-bottom: 70px; }
.panel { min-width: 0; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.panel-heading, .panel-heading > div, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading { margin-bottom: 24px; }
.panel-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 400; letter-spacing: -.03em; }
.list-heading-actions { display: flex; align-items: center; gap: 12px; }
.clear-list-button { color: #8f2f21; }
.clear-list-button:disabled { color: var(--ink-soft); cursor: default; opacity: .45; }
.step { display: grid; width: 30px; height: 30px; place-items: center; margin-right: 10px; border: 1px solid var(--ink); border-radius: 50%; font-size: 10px; font-weight: 800; }
.count, .report-meta { color: var(--ink-soft); font-size: 12px; }
.entry-form { display: flex; align-items: end; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.entry-form label { display: grid; gap: 7px; min-width: 120px; }
.entry-form label.grow { flex: 1; }
.entry-form label.short { min-width: 90px; width: 96px; }
label span { color: var(--ink-soft); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
input { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none; }
select { min-height: 42px; padding: 8px 34px 8px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 59, 43, .09); }
.button { min-height: 42px; padding: 9px 17px; border: 0; border-radius: 100px; font-weight: 750; white-space: nowrap; transition: transform .15s ease, opacity .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { background: var(--lime); color: var(--ink); }
.button.dark { background: var(--ink); color: #fff; }
.saved-list { display: grid; gap: 9px; min-height: 42px; padding-top: 18px; }
.directory-note { margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; }
.store-bulk-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: -5px 0 12px; }
.store-bulk-actions > span { margin-right: auto; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.store-bulk-actions .text-button { font-size: 10px; }
.store-directory { display: grid; gap: 8px; max-height: 430px; overflow: auto; padding-right: 4px; }
.store-directory-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f2f2eb; border-radius: 12px; }
.store-directory-item.excluded { background: #e8e9e3; opacity: .62; }
.store-directory-item > div { min-width: 0; flex: 1; }
.store-directory-item strong, .store-directory-item small { display: block; }
.store-directory-item strong { font-size: 13px; }
.store-directory-item small { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.store-directory-item .source-price-count { color: var(--forest); font-weight: 750; }
.coverage-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 100px; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.coverage-badge.live { background: var(--lime); }
.coverage-badge.partial { color: #594200; background: #f3d66e; }
.coverage-badge.directory { color: var(--ink-soft); background: #dedfd8; }
.store-choice { display: grid; flex: 0 0 auto; justify-items: center; gap: 2px; cursor: pointer; }
.store-choice input { width: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--ink); cursor: pointer; }
.store-choice span { font-size: 8px; letter-spacing: .05em; }
.saved-pill { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 9px 10px 9px 7px; border-radius: 14px; background: #eef0e9; font-size: 13px; }
.saved-pill strong { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.saved-pill small { color: var(--ink-soft); }
.remove { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: rgba(23, 59, 43, .1); color: var(--ink); }
.remove:hover, .remove:focus-visible { color: #fff; background: #a33d2d; outline: none; }
.sortable-item { padding-left: 7px; cursor: grab; user-select: none; transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease; }
.sortable-item:active { cursor: grabbing; }
.sortable-item.dragging { opacity: .45; transform: scale(.98); box-shadow: 0 0 0 2px var(--ink); }
.drag-handle { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; padding: 0; color: #718178; background: transparent; border: 0; border-radius: 50%; font-size: 17px; line-height: 1; cursor: grab; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--ink); background: rgba(23, 59, 43, .08); outline: none; }
.item-name { min-width: 0; line-height: 1.3; }
.item-setting { display: grid; flex: 0 0 auto; grid-template-columns: auto 46px; align-items: center; gap: 5px; padding-left: 8px; border-left: 1px solid rgba(23,59,43,.13); }
.item-setting span { font-size: 9px; white-space: nowrap; }
.item-setting input { width: 46px; min-height: 30px; padding: 4px 6px; border-radius: 8px; font-size: 12px; }
.item-setting.quantity-setting { grid-template-columns: auto auto; }
.quantity-stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.quantity-stepper button { display: grid; width: 29px; height: 30px; place-items: center; padding: 0; color: var(--ink); background: #fff; border: 0; font-size: 17px; font-weight: 750; }
.quantity-stepper button:hover, .quantity-stepper button:focus-visible { background: var(--lime); outline: none; }
.quantity-stepper .quantity-step-remove { color: #8f3529; font-size: 11px; }
.quantity-stepper .quantity-step-remove:hover, .quantity-stepper .quantity-step-remove:focus-visible { color: #fff; background: #a33d2d; }
.quantity-stepper input { width: 38px; min-height: 30px; padding: 3px; border: 0; border-right: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0; text-align: center; box-shadow: none; }
.item-setting.alert-setting { grid-template-columns: auto 66px; }
.item-setting.alert-setting input { width: 66px; }
.watch-match-summary { grid-column: 2 / -1; display: grid; gap: 7px; min-width: 0; margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(23,59,43,.12); }
.watch-match-summary.pending, .watch-match-summary.empty { color: var(--ink-soft); font-size: 10px; }
.watch-best-match { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.watch-best-match > span { color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.watch-best-match > strong { color: var(--forest); font-size: 11px; white-space: nowrap; }
.upcoming-deal-badge { display: inline-flex; align-items: center; margin-left: 4px; padding: 2px 6px; color: #74400d; background: #fff0c7; border: 1px solid #e9bd62; border-radius: 100px; font-size: 8px; font-weight: 900; letter-spacing: .02em; line-height: 1.35; white-space: nowrap; }
.benefit-badge { display: inline-flex; align-items: center; margin-left: 5px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .02em; line-height: 1.35; vertical-align: 2px; white-space: nowrap; }
.benefit-badge.wic { color: #1d6e35; background: #edf8ef; }
.benefit-badge.ebt { color: #355268; background: #f1f6f9; }
.benefit-disclaimer { margin: 4px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.4; }
.watch-best-match .add-to-basket-button { min-width: 105px; }
.watch-match-summary details { min-width: 0; }
.watch-match-summary summary { width: fit-content; color: var(--ink-soft); cursor: pointer; font-size: 10px; font-weight: 750; }
.watch-match-summary summary span { color: var(--forest); font-weight: 850; }
.watch-match-options { display: grid; gap: 5px; margin-top: 7px; }
.watch-match-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; background: rgba(255,255,255,.72); border: 1px solid rgba(23,59,43,.1); border-radius: 9px; }
.watch-match-option > div { min-width: 0; }
.watch-match-option a { display: block; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.watch-match-option small { display: block; margin-top: 2px; font-size: 9px; }
.watch-match-option .add-to-basket-button, .watch-match-option .deal-list-controls { width: 105px; }
.empty { margin: 4px 0; color: #718178; font-size: 13px; }

.scan-console { margin-bottom: 64px; padding: 26px; background: var(--ink); color: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.console-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.console-heading .eyebrow { color: #bfd0c5; }
.console-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.schedule-form { display: flex; align-items: end; gap: 10px; }
.schedule-form > label { display: grid; gap: 6px; }
.schedule-form label > span { color: #dbe7df; }
.schedule-form .button { color: var(--ink); background: var(--lime); }
.toggle-label { display: flex !important; min-height: 42px; align-items: center; grid-template-columns: auto 1fr; gap: 8px !important; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; }
.toggle-label input { width: 18px; min-height: 18px; accent-color: var(--lime); }
.schedule-note { margin: 12px 0 20px; color: #bfd0c5; font-size: 12px; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.diagnostic-card { padding: 14px; color: var(--ink); background: #f5f3eb; border-left: 4px solid #8fa096; border-radius: 12px; }
.diagnostic-card.completed { border-left-color: var(--lime); }
.diagnostic-card.completed_with_warnings { border-left-color: var(--gold); }
.diagnostic-card.retry_queued { border-left-color: #f5b85b; }
.diagnostic-card.shared_catalog, .diagnostic-card.skipped_shared_catalog { border-left-color: #77a6b8; }
.diagnostic-card.shared_catalog_unavailable, .diagnostic-card.blocked, .diagnostic-card.interrupted, .diagnostic-card.partial { border-left-color: #dd8d55; }
.diagnostic-card.failed { border-left-color: var(--coral); }
.diagnostic-card > div { display: flex; justify-content: space-between; gap: 10px; }
.diagnostic-card p { margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; }
.diagnostic-status { font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.diagnostic-card details { margin-top: 8px; font-size: 11px; }
.diagnostic-card pre { overflow: auto; max-height: 100px; white-space: pre-wrap; }
.scan-console .empty { color: #bfd0c5; }
.collection-console { background: #203f4b; }
.collection-controls { display: flex; align-items: end; gap: 10px; }
.collection-safety { max-width: 900px; margin: 16px 0 12px; padding: 12px 14px; color: #dcecf0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; font-size: 12px; line-height: 1.55; }
.collection-safety code { padding: 2px 5px; color: var(--lime); background: rgba(0,0,0,.18); border-radius: 5px; }
.collection-summary { display: flex; align-items: center; gap: 9px; margin: 15px 0 4px; color: #fff; font-size: 13px; font-weight: 750; }
.collection-summary .status-dot { width: 9px; height: 9px; border-radius: 50%; background: #8fa096; }
.collection-summary.running .status-dot, .collection-summary.queued .status-dot { background: #f5b85b; box-shadow: 0 0 0 4px rgba(245,184,91,.16); }
.collection-summary.completed .status-dot { background: var(--lime); }
.collection-summary.failed .status-dot { background: var(--coral); }

.report-section { padding-top: 12px; }
.section-heading { align-items: end; margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 58px); font-weight: 400; letter-spacing: -.045em; }
.report-heading-controls { display: grid; justify-items: end; gap: 9px; }
.deal-filter { display: grid; grid-template-columns: 20px auto; align-items: center; column-gap: 9px; padding: 10px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.deal-filter input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--ink); }
.deal-filter span { color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.deal-filter small { grid-column: 2; max-width: 300px; color: var(--ink-soft); font-size: 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 10px 15px; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 100px; font-weight: 700; }
.tab span { display: inline-grid; min-width: 22px; min-height: 22px; margin-left: 6px; place-items: center; border-radius: 50%; background: rgba(23, 59, 43, .09); font-size: 11px; }
.tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.tab.active span { background: rgba(255, 255, 255, .14); }
.tab-panel { min-height: 180px; }
.weekly-sales { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.weekly-sales-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 20px; border-bottom: 1px solid var(--line); }
.weekly-sales-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.weekly-sales-heading > p { max-width: 520px; margin: 0; color: var(--ink-soft); font-size: 12px; }
.weekly-view-tools { display: grid; justify-items: end; gap: 10px; max-width: 560px; }
.weekly-sales-footer { display: grid; gap: 9px; padding: 18px 20px; color: var(--ink-soft); background: #fbfaf5; border-top: 1px solid var(--line); }
.weekly-sales-footer p { margin: 0; font-size: 12px; line-height: 1.5; }
.weekly-sales-footer .membership-disclaimer {
  width: fit-content;
  padding: 7px 10px;
  color: #704017;
  background: #fff2df;
  border: 1px solid #f0cfaa;
  border-radius: 9px;
}
.weekly-view-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.weekly-view-actions .button { padding: 7px 11px; font-size: 10px; }
.flipp-preview-shell { display: grid; gap: 14px; }
.flipp-preview-heading { align-items: center; }
.flipp-preview-heading .button { flex: 0 0 auto; }
.flipp-preview-note { margin: 0; padding: 12px 14px; color: var(--ink-soft); background: rgba(23,59,43,.055); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.flipp-preview-status { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.flipp-preview-status.running .status-dot, .flipp-preview-status.queued .status-dot { background: var(--gold); animation: pulse 1.1s infinite; }
.flipp-preview-status.completed .status-dot { background: #2f9f61; }
.flipp-preview-status.failed .status-dot { background: var(--coral); }
.flipp-stats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 9px; }
.flipp-stat { padding: 13px 15px; background: #f3f2eb; border: 1px solid var(--line); border-radius: 12px; }
.flipp-stat strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.flipp-stat span { color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.flipp-controls { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(150px, .7fr) auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.flipp-controls label { display: grid; gap: 5px; }
.flipp-controls label > span { color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.flipp-controls .deal-filter { display: grid; grid-template-columns: 20px auto; align-self: stretch; align-content: center; }
.flipp-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.flipp-preview-footer p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.watch-group { margin-bottom: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.watch-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.watch-title h3 { margin: 0; font-size: 16px; }
.watch-title p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.deal-table { overflow-x: auto; }
.deal-list { display: grid; min-width: 900px; }
.deal-header, .deal-row { display: grid; grid-template-columns: minmax(240px, 2.2fr) minmax(125px, .9fr) .72fr .9fr .65fr 62px; align-items: center; gap: 20px; min-width: 900px; }
.deal-header { padding: 10px 20px; color: var(--ink-soft); background: #f3f2eb; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; color: inherit; background: transparent; border: 0; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; }
.sort-button::after { color: #8a978f; content: "↕"; font-size: 11px; }
.sort-button[data-sort-priority]::before { display: inline-grid; width: 16px; height: 16px; place-items: center; color: #fff; background: var(--ink); border-radius: 50%; content: attr(data-sort-priority); font-size: 9px; letter-spacing: 0; }
.sort-button.ascending::after { color: var(--ink); content: "↑"; }
.sort-button.descending::after { color: var(--ink); content: "↓"; }
.sort-button:hover, .sort-button:focus-visible { color: var(--ink); outline: none; }
.sort-button:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.column-header-tools { display: flex; align-items: center; gap: 3px; }
.column-filter-button { position: relative; display: inline-grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; padding: 0; color: #6f7d75; background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 15px; font-weight: 900; line-height: 1; }
.column-filter-button span { transform: translateY(-2px); }
.column-filter-button:hover, .column-filter-button:focus-visible { color: var(--forest); background: #fff; border-color: #9fbea3; outline: none; }
.column-filter-button.active { color: #fff; background: var(--coral); border-color: var(--coral); }
.column-filter-button.active::after { position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; background: var(--forest); border: 2px solid #fff; border-radius: 50%; content: ""; }
.column-filter-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(700px, calc(100vh - 28px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 24px 80px rgba(30,39,44,.3); }
.column-filter-heading { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.column-filter-heading h2 { margin: 2px 0 0; font-size: 25px; }
.column-filter-body { display: grid; gap: 16px; max-height: min(470px, calc(100vh - 210px)); padding: 22px 24px; overflow: auto; }
.column-filter-field { display: grid; gap: 7px; }
.column-filter-field > span, .column-store-filter legend { color: var(--mask-grey); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.column-filter-field small { color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.column-filter-check { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; padding: 13px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 13px; }
.column-filter-check input { width: 19px; min-height: 19px; margin: 1px 0 0; accent-color: var(--forest); }
.column-filter-check span { display: grid; gap: 3px; }
.column-filter-check small { color: var(--ink-soft); font-size: 11px; }
.column-store-filter { min-width: 0; margin: 0; padding: 0; border: 0; }
.column-store-filter-actions { display: flex; gap: 14px; margin-top: 10px; }
.column-store-filter-actions button { padding: 2px 0; color: var(--forest); background: transparent; border: 0; font-size: 12px; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.column-store-filter-actions button:hover, .column-store-filter-actions button:focus-visible { color: var(--coral-dark); outline: 2px solid var(--coral); outline-offset: 3px; }
.column-store-filter-status { min-height: 18px; margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.column-store-filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.column-store-filter label { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 9px 10px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 750; }
.column-store-filter input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--forest); }
.column-store-filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-filter-input { display: flex; align-items: center; gap: 8px; }
.money-filter-input input { flex: 1 1 auto; }
.money-filter-input b { color: var(--forest); font-size: 16px; }
.column-filter-actions { display: flex; justify-content: space-between; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.table-sort-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; color: var(--ink-soft); background: #eef0e9; border-bottom: 1px solid var(--line); font-size: 12px; animation: sort-guidance-in 160ms ease-out; }
.table-sort-status span { line-height: 1.45; }
.table-sort-status small { display: block; margin-top: 2px; font-size: 11px; }
.table-sort-status button { flex: 0 0 auto; padding: 5px 10px; color: var(--ink); background: transparent; border: 1px solid #91a097; border-radius: 999px; font-size: 11px; font-weight: 800; }
.table-sort-status button:hover, .table-sort-status button:focus-visible { color: #fff; background: var(--ink); outline: none; }
@keyframes sort-guidance-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.deal-row { padding: 18px 20px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.deal-row:last-child { border-bottom: 0; }
.deal-row:hover { background: #faf8f1; }
.sale-table .deal-list { min-width: 900px; }
.sale-header, .sale-row { display: grid; grid-template-columns: minmax(250px, 2fr) minmax(140px, 1fr) minmax(115px, .72fr) minmax(100px, .62fr) minmax(220px, 1.4fr) minmax(120px, .75fr); align-items: center; gap: 18px; min-width: 900px; }
.sale-header { padding: 10px 20px; color: var(--ink-soft); background: #f3f2eb; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.sale-row { align-items: start; row-gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sale-row > .deal-product { grid-column: 1 / -1; }
.sale-row .deal-product > strong > a { overflow: visible; text-overflow: clip; white-space: normal; }
.sale-product-details { align-self: center; margin-top: 0; }
.sale-row:last-child { border-bottom: 0; }
.sale-row:hover { background: #faf8f1; }
.sale-offer strong, .sale-source strong { display: block; font-size: 12px; }
.sale-offer small, .sale-source small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.promotion-kind { display: inline-block; margin-bottom: 4px; padding: 3px 7px; color: #fff; background: var(--ink); border-radius: 100px; font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.fulfillment-badge { display: inline-block; margin: 0 0 4px 5px; padding: 3px 7px; color: #173b2b; background: #d9f5ff; border: 1px solid #87c9dc; border-radius: 100px; font-size: 9px; font-weight: 850; letter-spacing: .02em; vertical-align: middle; }
.promotion-filter-button { display: block; margin-top: 8px; padding: 5px 9px; color: var(--ink); background: transparent; border: 1px solid #8e9d93; border-radius: 100px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.promotion-filter-button:hover, .promotion-filter-button:focus-visible, .promotion-filter-button.active { color: #fff; background: var(--ink); border-color: var(--ink); outline: none; }
.deal-product-meta .promotion-filter-button { display: inline-block; margin-top: 0; }
.qualification-warning, .qualification-met { display: grid; gap: 4px; margin-top: 9px; padding: 9px 10px; border-radius: 10px; }
.qualification-warning { color: #74311f; background: #fff0e8; border: 1px solid #efb69f; }
.qualification-warning strong { font-size: 11px; font-weight: 850; line-height: 1.4; }
.qualification-met strong { font-size: 10px; }
.qualification-warning small, .qualification-met small { margin: 0; color: inherit; line-height: 1.35; }
.qualification-met { color: #195c39; background: #edf8f0; border: 1px solid #b7d8c1; }
.quantity-filter-controls { display: flex; gap: 10px; align-items: stretch; justify-content: flex-end; flex-wrap: wrap; }
.exact-quantity-filter { display: grid; gap: 4px; min-width: 160px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.55); }
.exact-quantity-filter span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-help-label { display: inline-flex; width: fit-content; align-items: center; gap: 5px; border-radius: 5px; cursor: help; }
.filter-help-label::after { display: inline-grid; width: 14px; height: 14px; place-items: center; color: #fff; background: var(--forest); border-radius: 50%; content: "?"; font-size: 9px; font-weight: 900; letter-spacing: 0; line-height: 1; }
.exact-quantity-filter select { min-height: 34px; padding: 5px 30px 5px 8px; }
.exact-quantity-filter select:disabled { opacity: .55; cursor: not-allowed; }
.exact-quantity-filter[hidden] { display: none; }
.condition-badge { display: inline-block; margin: 5px 0 0 7px; padding: 3px 7px; color: #71351f; background: #ffe0bf; border-radius: 100px; font-size: 9px; font-weight: 850; line-height: 1.25; vertical-align: middle; }
.quantity-condition { display: block; margin-top: 2px; color: #9a4d2d; font-size: 10px; font-style: normal; font-weight: 750; }
.deal-product { min-width: 0; }
.deal-product > strong { display: flex; min-width: 0; align-items: center; gap: 8px; overflow: visible; white-space: normal; }
.deal-product > strong > a { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-product > strong > .limited-deal-badge { flex: 0 0 auto; margin-left: 0; }
.deal-product a { color: inherit; text-decoration: none; }
.deal-product a:hover { text-decoration: underline; text-underline-offset: 2px; }
.deal-product small, .deal-metric small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.deal-product-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; margin-top: 5px; }
.deal-product-meta > small { flex: 0 0 68px; min-width: 68px; margin: 0; }
.add-to-list-button { display: inline-flex; min-height: 28px; align-items: center; justify-content: center; padding: 3px 8px; color: var(--ink); background: transparent; border: 1px solid #aeb8b0; border-radius: 100px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.add-to-list-button:hover, .add-to-list-button:focus-visible { background: var(--lime); border-color: var(--ink); outline: none; }
.add-to-list-button:disabled { color: #627269; background: #eef0e9; border-color: transparent; cursor: default; }
.add-to-list-button.active { color: #1f5f25; background: #e8f3e9; border-color: #a9c7ad; }
.add-to-basket-button { display: inline-flex; min-height: 28px; align-items: center; justify-content: center; padding: 3px 8px; color: #fff; background: var(--forest); border: 1px solid var(--forest); border-radius: 100px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.add-to-basket-button:hover, .add-to-basket-button:focus-visible { color: var(--ink); background: var(--lime); border-color: var(--ink); outline: none; }
.deal-action-group { display: inline-grid; width: min(100%, 280px); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px; }
.deal-action-group > .add-to-basket-button, .deal-action-group > .add-to-list-button, .deal-action-group > .deal-list-controls { width: 100%; }
.deal-action-group > .deal-list-controls .quantity-stepper { width: 100%; justify-content: space-between; }
.deal-list-controls { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.deal-list-controls .quantity-stepper { border-radius: 100px; }
.deal-list-controls .quantity-stepper button { width: 23px; height: 24px; font-size: 14px; }
.deal-list-controls .quantity-stepper input { width: 30px; min-height: 24px; padding: 1px 2px; font-size: 10px; }
.deal-list-remove { display: grid; width: 24px; height: 24px; place-items: center; padding: 0; color: #7a352b; background: #fff4ef; border: 1px solid #e7bbae; border-radius: 50%; font-size: 11px; line-height: 1; }
.deal-list-remove:hover, .deal-list-remove:focus-visible { color: #fff; background: #a33d2d; border-color: #a33d2d; outline: none; }
.deal-store { color: var(--ink-soft); font-size: 13px; }
.deal-store a { display: block; color: inherit; font-weight: 750; text-decoration: underline; text-decoration-color: rgba(23,59,43,.28); text-underline-offset: 2px; }
.deal-store a + a { margin-top: 4px; }
.deal-metric b { font-size: 15px; font-variant-numeric: tabular-nums; }
.deal-metric b span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.deal-metric small strong { color: #28744a; }
.price { position: relative; padding-top: 17px; }
.price b { font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.deal-metric .original-price { margin-top: 2px; color: #6f796f; font-size: 10px; font-weight: 750; }
.original-price del { text-decoration-thickness: 1px; }
.sale-discount strong { display: block; color: var(--forest); font-size: 14px; font-variant-numeric: tabular-nums; }
.sale-discount .advertised-discount-claim { color: #8a4b00; }
.sale-discount .featured-price-label { color: var(--ink); font-size: 12px; }
.sale-discount small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.last-updated { position: absolute; top: 0; right: 0; color: var(--ink-soft); font-size: 8px; font-weight: 750; line-height: 1.1; white-space: nowrap; }
.last-updated-card { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.card-price > div strong { display: block; }
.mini-price-chart { display: block; width: 132px; height: 42px; margin-top: 7px; overflow: visible; }
.mini-price-chart polyline { fill: none; stroke: #5c796b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mini-price-chart .best-price-point { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mini-chart-button { display: block; padding: 0; color: var(--ink-soft); background: transparent; border: 0; text-align: left; }
.mini-chart-button > span { display: inline-block; margin-top: 1px; font-size: 9px; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.mini-chart-button:hover .mini-price-chart polyline, .mini-chart-button:focus-visible .mini-price-chart polyline { stroke: var(--ink); stroke-width: 3; }
.mini-chart-button:focus-visible { border-radius: 4px; outline: 2px solid var(--ink); outline-offset: 3px; }
.no-sale-history { display: block; max-width: 145px; margin-top: 8px; color: var(--ink-soft); font-size: 9px; font-weight: 750; line-height: 1.35; }
.product-history-popover { position: fixed; z-index: 40; width: min(400px, calc(100vw - 24px)); padding: 16px; background: var(--paper); border: 1px solid var(--ink); border-radius: 15px; box-shadow: 0 18px 55px rgba(23,59,43,.24); }
.product-history-popover[hidden] { display: none; }
.product-history-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.product-history-heading span, .product-history-heading strong { display: block; }
.product-history-heading span { margin-bottom: 3px; color: var(--ink-soft); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.product-history-heading strong { max-width: 320px; font-size: 13px; line-height: 1.25; }
.product-history-heading button { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; padding: 0; color: var(--ink); background: #eef0e9; border: 0; border-radius: 50%; font-size: 19px; }
.product-history-chart { display: block; width: 100%; height: auto; }
.product-history-chart > line { stroke: #a8aea6; stroke-width: 1; }
.product-history-chart text { fill: var(--ink-soft); font-size: 10px; }
.product-history-chart polyline { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.product-history-chart circle { fill: var(--lime); stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.product-history-summary { margin: 6px 0 0; color: var(--ink-soft); font-size: 10px; }
.score-cell { display: grid; justify-content: end; }
.deal-score { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: var(--lime); font-size: 13px; font-weight: 850; }
.badge { display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 100px; background: #ffe3dc; color: #8f2f21; font-size: 10px; font-weight: 800; }
.empty-report { display: grid; min-height: 180px; place-items: center; padding: 32px; color: var(--ink-soft); border: 1px dashed #afb5aa; border-radius: 18px; text-align: center; }
.report-loading { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 8px; color: var(--ink-soft); border: 1px dashed #afb5aa; border-radius: 18px; text-align: center; }
.report-loading span { width: 24px; height: 24px; border: 3px solid #cbd1c8; border-top-color: var(--ink); border-radius: 50%; animation: report-spin .8s linear infinite; }
.report-loading small { font-size: 11px; }
.sale-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 22px; border-top: 1px solid var(--line); }
.sale-pagination p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.unusual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deal-card { display: grid; gap: 14px; padding: 21px; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.deal-card:hover { transform: translateY(-2px); }
.deal-card-link { display: grid; gap: 20px; color: inherit; text-decoration: none; }
.deal-card-link:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.deal-card-actions { display: flex; justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.deal-card .card-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.deal-card h3 { margin: 0 0 6px; font-size: 16px; }
.deal-card p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.card-price { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.card-price strong { font-family: Georgia, serif; font-size: 36px; font-weight: 400; line-height: 1; }
.savings { color: #28744a; font-size: 12px; font-weight: 800; }

.optimizer-shell { display: grid; gap: 16px; }
.guest-plan-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; color: #284331; background: #fff6e8; border: 1px solid #edc99c; border-radius: 14px; }
.guest-plan-notice div { display: grid; gap: 3px; }
.guest-plan-notice strong { font-size: 14px; }
.guest-plan-notice span { font-size: 12px; }
.optimizer-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 0 4px; }
.optimizer-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.optimizer-heading .eyebrow { margin-bottom: 5px; }
.optimizer-actions { display: flex; gap: 14px; }
.split-plan { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.split-total { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.split-total h3 { margin: 0; font-family: Georgia, serif; font-size: 48px; font-weight: 400; }
.split-total p { margin: 0 0 7px; color: #28744a; font-size: 12px; font-weight: 800; }
.basket-coverage-warning { display: grid; gap: 4px; margin: -4px 0 18px; padding: 13px 15px; color: #743817; background: #fff0dc; border: 1px solid #e8b183; border-left: 5px solid var(--coral); border-radius: 12px; }
.basket-coverage-warning strong { font-size: 13px; }
.basket-coverage-warning span { font-size: 12px; line-height: 1.45; }
.split-plan ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.split-plan li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.split-plan li > span { min-width: 0; }
.basket-line-details { flex: 1; }
.basket-line-title { display: flex; align-items: center; gap: 10px; }
.basket-line-title > b { min-width: 0; overflow-wrap: anywhere; }
.basket-line-title .quantity-stepper { flex: 0 0 auto; }
.split-plan li small { display: block; overflow: hidden; margin-top: 2px; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.basket-sale-link { color: var(--green); font-size: 12px; font-weight: 750; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.basket-sale-link:hover { color: var(--orange-dark); }
.split-plan li > strong { font-variant-numeric: tabular-nums; }
.optimizer-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 10px; }
.alert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.alert-card { display: grid; gap: 8px; padding: 20px; color: inherit; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.alert-card h3, .alert-card p { margin: 0; }
.alert-card p { color: var(--ink-soft); font-size: 11px; }
.alert-card > div { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.alert-card > div strong { font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.alert-card > div span { color: var(--ink-soft); font-size: 11px; }
.alert-hit { justify-self: start; padding: 3px 8px; color: #173b2b; background: var(--lime); border-radius: 100px; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 380px; padding: 12px 16px; color: #fff; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #8f2f21; }
.print-sheet { display: none; }

@keyframes pulse { 50% { transform: scale(1.25); opacity: .55; } }
@keyframes report-spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .setup-grid { grid-template-columns: 1fr; }
  .unusual-grid { grid-template-columns: repeat(2, 1fr); }
  .alert-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .topbar { grid-template-columns: auto 1fr; gap: 10px; padding-inline: 16px; }
  .scan-state { display: none; }
  .account-actions { gap: 6px; }
  .header-signout { display: none; }
  .account-button { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-actions .button { padding-inline: 12px; }
  main { width: min(100% - 28px, 1320px); }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 54px; }
  .hero-note { justify-self: start; }
  .entry-form { align-items: stretch; flex-direction: column; }
  .entry-form label, .entry-form label.short { width: 100%; }
  .panel { padding: 20px; }
  .sortable-item { grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; border-radius: 14px; }
  .item-name { grid-column: 2; }
  .sortable-item > .remove { grid-column: 3; grid-row: 1; }
  .sortable-item > .quantity-setting { grid-column: 2; grid-row: 2; justify-self: start; }
  .sortable-item > .alert-setting { grid-column: 2; grid-row: 3; justify-self: start; }
  .item-setting { grid-template-columns: auto 42px; }
  .item-setting input { width: 42px; }
  .item-setting.quantity-setting { grid-template-columns: auto auto; }
  .quantity-stepper input { width: 38px; }
  .item-setting.alert-setting { grid-template-columns: auto 58px; }
  .item-setting.alert-setting input { width: 58px; }
  .watch-match-summary { grid-column: 2 / -1; grid-row: 3; }
  .watch-best-match { grid-template-columns: minmax(0, 1fr) auto; }
  .watch-best-match > span { grid-column: 1 / -1; }
  .watch-match-option { grid-template-columns: minmax(0, 1fr); }
  .watch-match-option .add-to-basket-button, .watch-match-option .deal-list-controls { width: min(100%, 150px); }
  .list-heading-actions { flex-wrap: wrap; justify-content: flex-end; gap: 5px 10px; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { width: 100%; padding-inline: 10px; }
  .section-heading { align-items: start; flex-direction: column; }
  .report-heading-controls { width: 100%; justify-items: stretch; }
  .weekly-sales-heading { align-items: start; flex-direction: column; }
  .weekly-view-tools { justify-items: start; max-width: none; }
  .weekly-view-actions { justify-content: flex-start; }
  .flipp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flipp-controls { grid-template-columns: 1fr; }
  .console-heading, .schedule-form, .collection-controls { align-items: stretch; flex-direction: column; }
  .optimizer-heading { align-items: start; flex-direction: column; }
  .guest-plan-notice { align-items: stretch; flex-direction: column; }
  .column-store-filter-options { grid-template-columns: 1fr; }
  .column-filter-actions { align-items: stretch; flex-direction: column-reverse; }
  .column-filter-actions button { width: 100%; }
  .schedule-form { margin-top: 8px; }
  .unusual-grid { grid-template-columns: 1fr; }
  .alert-grid { grid-template-columns: 1fr; }
  .split-total h3 { font-size: 40px; }
  .split-plan li { align-items: start; }
  .basket-line-title { align-items: start; flex-direction: column; gap: 7px; }
  .deal-table { overflow: visible; }
  .deal-header { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 12px; min-width: 0; padding: 10px 18px; }
  .deal-header .sort-button { font-size: 9px; }
  .table-sort-status { align-items: flex-start; flex-direction: column; gap: 6px; padding-inline: 14px; }
  .table-sort-status small { display: block; margin: 3px 0 0; }
  .deal-list { min-width: 0; }
  .deal-row { grid-template-columns: 1fr 1fr; gap: 14px 20px; min-width: 0; padding: 18px; }
  .sale-table .deal-list { min-width: 0; }
  .sale-header { display: none; }
  .sale-row { grid-template-columns: 1fr 1fr; min-width: 0; padding: 18px; }
  .sale-row > *::before { display: block; margin-bottom: 4px; color: var(--ink-soft); content: attr(data-label); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .deal-product { grid-column: 1 / -1; }
  .deal-cell::before { display: block; margin-bottom: 3px; color: var(--ink-soft); content: attr(data-label); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .deal-product::before { display: none; }
  .score-cell { justify-content: start; }
  .deal-score { width: 42px; height: 42px; }
}

@media print {
  @page { margin: .55in; }
  body { background: #fff; color: #111; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet, .print-sheet[hidden] { display: block !important; font-family: Arial, sans-serif; }
  .print-sheet-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 18px; border-bottom: 3px solid #173b2b; }
  .print-sheet-header .eyebrow { margin-bottom: 5px; color: #173b2b; }
  .print-sheet-header h1 { margin: 0; color: #173b2b; font-size: 42px; line-height: 1; }
  .print-sheet-meta { display: grid; justify-items: end; font-size: 12px; }
  .print-sheet-meta span { color: #555; }
  .print-list { margin: 24px 0 0; padding: 0; list-style: none; }
  .print-list li { display: grid; grid-template-columns: 20px 42px minmax(0, 1fr) auto; align-items: start; gap: 10px; min-height: 54px; padding: 11px 0; border-bottom: 1px solid #bbb; break-inside: avoid; }
  .print-check { width: 17px; height: 17px; margin-top: 2px; border: 1.5px solid #111; }
  .print-list li > b { font-variant-numeric: tabular-nums; }
  .print-list li strong, .print-list li small { display: block; }
  .print-list li small { margin-top: 3px; color: #555; font-size: 10px; }
  .print-alert { padding: 3px 7px; border: 1px solid #777; border-radius: 100px; font-size: 9px; font-weight: 700; }
  .print-section-row { min-height: 38px !important; padding-top: 20px !important; border-bottom: 2px solid #173b2b !important; }
  .print-list .print-section-row { grid-template-columns: minmax(0, 1fr) !important; }
  .print-list .print-recipe-ingredient { grid-template-columns: 20px minmax(0, 1fr) !important; }
  .print-list .print-recipe-step { grid-template-columns: 30px minmax(0, 1fr) !important; }
  .print-sale-row { grid-template-columns: 28px 82px minmax(0, 1fr) 120px !important; min-height: 66px !important; }
  .print-sale-row > b { font-size: 15px; }
  .print-sale-rank { color: #666; font-size: 10px; }
  .print-sale-summary { text-align: right; }
  .print-sale-summary strong, .print-sale-summary small { display: block; }
  .sales-print .print-sheet-header { align-items: center; padding-bottom: 8px; border-bottom-width: 2px; }
  .sales-print .print-sheet-header .eyebrow { margin-bottom: 2px; font-size: 7px; }
  .sales-print .print-sheet-header h1 { font-size: 27px; }
  .sales-print .print-sheet-meta { font-size: 8px; }
  .sales-print .print-list { margin-top: 8px; }
  .sales-print .print-sale-row { grid-template-columns: 20px 62px minmax(0, 1fr) 105px !important; gap: 6px; min-height: 0 !important; padding: 4px 0; font-size: 8px; line-height: 1.15; }
  .sales-print .print-sale-row > b { font-size: 11px; }
  .sales-print .print-sale-row strong { font-size: 9px; line-height: 1.15; }
  .sales-print .print-sale-row small { margin-top: 1px; font-size: 7px; line-height: 1.15; }
  .sales-print .print-sale-rank { font-size: 7px; }
  .sales-print .print-sale-summary { line-height: 1.15; }
  .sales-print .print-sheet-footer { margin-top: 10px; font-size: 7px; }
  .print-sheet-footer { margin-top: 24px; color: #666; font-size: 9px; }
}

/* The administrator workspace is a separately authenticated document. */
.admin-page { background: var(--paper, #f5f7f6); }
.admin-topbar { position: sticky; top: 0; z-index: 20; }
.admin-page-main { width: min(1500px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 5rem; }
.admin-page-heading { margin: 0 0 1.5rem; }
.admin-page-heading h1 { margin: .2rem 0; }
.admin-page-heading p:last-child { color: var(--mask-grey, #34495e); }
.admin-page .scan-console { margin: 0 0 1.5rem; }
.admin-page .admin-management-grid { margin: 0 0 1.5rem; }
.admin-create-user-form { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1fr) auto; gap: .8rem; align-items: end; margin: 1rem 0; }
.admin-create-user-form h3 { grid-column: 1 / -1; margin: 0; }
.admin-page .admin-table td small { display: block; margin-top: .25rem; }

@media (max-width: 780px) {
  .admin-page-main { width: min(100% - 1rem, 1500px); padding-top: 1rem; }
  .admin-create-user-form { grid-template-columns: 1fr; }
  .admin-create-user-form h3 { grid-column: auto; }
  .admin-page .console-heading { align-items: flex-start; }
}

/* Bright 2026 interface refresh. Screen-only so printable views remain stable. */
@media screen {
  :root {
    --ink: #15324a;
    --ink-soft: #587386;
    --cream: #f5fbff;
    --paper: #ffffff;
    --line: #dceaf1;
    --lime: #76e6aa;
    --coral: #ff896f;
    --gold: #ffd663;
    --forest: #197553;
    --sky: #dff6ff;
    --blue: #2f9fe8;
    --violet: #7367e8;
    --shadow: 0 14px 40px rgba(43, 102, 137, .10);
  }

  body {
    background:
      radial-gradient(circle at 8% 5%, rgba(112, 213, 255, .18), transparent 26rem),
      linear-gradient(180deg, #ffffff 0, var(--cream) 32rem, #f8fcff 100%);
  }

  body main { display: flex; flex-direction: column; }
  .hero { order: 1; }
  .report-section { order: 2; }
  .test-features-section { order: 10; }
  .setup-grid { order: 4; }
  #admin-schedule-console { order: 5; }
  #catalog-collection-console { order: 6; }
  #catalog-collection-console { order: 5; }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 68px;
    padding: 10px clamp(18px, 4vw, 58px);
    background: rgba(255, 255, 255, .92);
    border-bottom-color: var(--line);
    box-shadow: 0 6px 22px rgba(45, 105, 139, .07);
  }
  .brand { font-size: 16px; }
  .brand-mark {
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue), var(--violet));
    border-radius: 13px;
    box-shadow: 0 7px 18px rgba(47, 159, 232, .25);
  }
  .primary-nav { display: flex; align-items: center; gap: 5px; margin-left: 22px; }
  .primary-nav a {
    padding: 8px 12px;
    color: var(--ink-soft);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }
  .primary-nav a:hover, .primary-nav a:focus-visible { color: var(--ink); background: var(--sky); outline: none; }
  .scan-state { padding: 7px 10px; background: #f1f8fb; border: 1px solid var(--line); border-radius: 100px; font-size: 11px; }
  .account-actions { gap: 8px; }
  .account-button { background: #fff; border-color: #bfd9e6; }
  .header-signout { color: var(--ink-soft); }

  main { width: min(1440px, calc(100% - 44px)); padding-bottom: 70px; }
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    margin: 28px 0 34px;
    padding: clamp(34px, 5vw, 62px);
    overflow: hidden;
    background:
      radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .92), transparent 12rem),
      linear-gradient(125deg, #e0f7ff 0%, #edfff2 54%, #fff6d7 100%);
    border: 1px solid #cfebf3;
    border-radius: 30px;
    box-shadow: var(--shadow);
  }
  .hero .eyebrow { color: #2473a3; }
  .hero h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(44px, 6vw, 78px); line-height: .96; }
  .lede { max-width: 680px; color: #466a7e; font-size: clamp(15px, 1.7vw, 19px); }
  .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
  .hero-actions a { display: inline-flex; align-items: center; text-decoration: none; }
  .hero-note {
    align-self: center;
    color: var(--ink);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 12px 30px rgba(66, 123, 151, .12);
    transform: rotate(2deg);
  }
  .button { border-radius: 12px; box-shadow: none; }
  .button.primary { color: #fff; background: linear-gradient(135deg, var(--blue), #4a87ed); }
  .button.dark { color: #fff; background: var(--ink); }
  .button.light { color: var(--ink); background: rgba(255, 255, 255, .88); border: 1px solid #c8e2ec; }
.button.food-help-button { color: #fff; background: #a94416; border: 1px solid #87340f; }
.button.food-help-button:hover, .button.food-help-button:focus-visible { color: #fff; background: #87340f; }
  .food-help-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 40px);
    order: 0;
    margin: 22px 0 0;
    padding: 13px clamp(22px, 3.5vw, 40px);
    color: #57220f;
    background: linear-gradient(110deg, #fff3e8 0%, #fffaf3 58%, #eef8ec 100%);
    border: 2px solid #e7a174;
    border-left: 10px solid var(--bargain-orange);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(82, 48, 28, .1);
  }
  .food-help-callout > div { max-width: 900px; }
  .food-help-callout .eyebrow { margin: 0 0 2px; color: #a33b13; font-size: 10px; }
  .food-help-callout h2 { margin: 0; color: var(--ink); font-size: clamp(20px, 2vw, 27px); line-height: 1.08; }
  .food-help-callout p:last-child { margin: 4px 0 0; color: #5f5049; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.35; }
  .food-help-callout .food-help-button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
  }
  .text-button { color: #216f9f; }
  .utility-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    color: #216f9f;
    background: #fff;
    border: 1px solid #b9dbea;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(47, 126, 166, .06);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  }
  .utility-button:hover,
  .utility-button:focus-visible {
    color: #175b84;
    background: var(--sky);
    border-color: #84c8e2;
    outline: none;
    transform: translateY(-1px);
  }
  .utility-button:focus-visible { box-shadow: 0 0 0 3px rgba(47, 159, 232, .18); }
  .utility-button:disabled { cursor: default; opacity: .45; transform: none; }
  .utility-button.compact { min-height: 28px; padding: 4px 8px; border-radius: 8px; font-size: 9px; }
  .utility-button.danger { color: #a13e32; border-color: #efc5be; }
  .utility-button.danger:hover, .utility-button.danger:focus-visible { color: #8b3026; background: #fff1ee; border-color: #e9a99e; }
  .list-heading-actions, .optimizer-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

  .report-section {
    scroll-margin-top: 90px;
    margin-bottom: 38px;
    padding: 28px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
  }
  .section-heading { align-items: start; margin-bottom: 18px; }
  .section-heading h2 { font-size: clamp(36px, 4vw, 54px); }
  .report-heading-controls { max-width: 820px; }
  .quantity-filter-controls { align-items: stretch; }
  .deal-filter, .exact-quantity-filter {
    background: #fff;
    border-color: #cfe3ec;
    box-shadow: 0 5px 16px rgba(54, 112, 145, .05);
  }
  .deal-filter input, .store-choice input { accent-color: var(--blue); }
  .tabs { gap: 7px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: thin; }
  .tab { flex: 0 0 auto; padding: 9px 13px; background: #fff; border-color: #cfe2ea; border-radius: 11px; }
  .tab:hover { color: var(--ink); background: var(--sky); }
  .tab.active { color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; box-shadow: 0 7px 18px rgba(86, 106, 222, .22); }

  .weekly-sales { border-color: var(--line); border-radius: 18px; box-shadow: none; }
  .weekly-sales-heading { background: linear-gradient(90deg, #fbfeff, #f5fbff); }
  .sale-header, .deal-header { color: #41697d; background: #eaf6fa; }
  .sort-button {
    min-height: 27px;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
  }
  .sort-button:hover, .sort-button:focus-visible { color: #175b84; background: #fff; border-color: #b9dbea; text-decoration: none; }
  .sort-button.ascending, .sort-button.descending { color: #175b84; background: #fff; border-color: #84c8e2; box-shadow: 0 2px 8px rgba(47, 126, 166, .08); }
  .sort-button[data-sort-priority]::before { background: var(--blue); }
  .table-sort-status { background: #f2faff; }
  .table-sort-status .utility-button { color: #216f9f; background: #fff; border-color: #b9dbea; }
  .table-sort-status .utility-button:hover, .table-sort-status .utility-button:focus-visible { color: #175b84; background: var(--sky); border-color: #84c8e2; }
  .sale-row, .deal-row { border-bottom-color: #e3edf2; }
  .sale-row:hover, .deal-row:hover { background: #f4fbff; }
  .promotion-kind { background: #3c7f9f; }
  .fulfillment-badge { color: #20516a; background: #dff6ff; border-color: #a7dced; }
  .condition-badge { color: #7a4824; background: #fff0d5; }
  .deal-score { color: #15324a; background: linear-gradient(145deg, #ffed78, #8cf0b7); }
  .promotion-filter-button:hover, .promotion-filter-button:focus-visible, .promotion-filter-button.active { background: var(--blue); border-color: var(--blue); }

  .setup-grid { grid-template-columns: 1fr 1fr; gap: 20px; padding: 4px 0 38px; }
  #shopping-list { order: 1; }
  #stores { order: 2; }
  #shopping-list, #stores { scroll-margin-top: 90px; }
  .panel { border-color: var(--line); border-radius: 22px; box-shadow: var(--shadow); }
  .panel-heading { margin-bottom: 18px; }
  .panel-heading h2 { font-size: 28px; }
  .step { color: #fff; background: var(--blue); border: 0; }
  .entry-form { padding: 14px; background: #f4faff; border: 1px solid var(--line); border-radius: 14px; }
  input, select { background: #fff; border-color: #cbdfe8; }
  input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 159, 232, .13); outline: none; }
  .saved-pill, .store-directory-item { background: #f3f9fc; border: 1px solid #e0edf2; }
  .saved-pill:hover, .store-directory-item:hover { background: #ecf8fd; }
  .store-directory-item.excluded { background: #f2f4f5; }
  .coverage-badge.live { color: #166245; background: #d5f8e4; }
  .coverage-badge.partial { background: #fff1bd; }
  .quantity-stepper button:hover, .quantity-stepper button:focus-visible { background: var(--sky); }

  .scan-console {
    scroll-margin-top: 90px;
    margin-bottom: 28px;
    color: var(--ink);
    background: linear-gradient(135deg, #edfaff, #f3fff6);
    border: 1px solid #cfe8ef;
    border-radius: 22px;
    box-shadow: var(--shadow);
  }
  .console-heading .eyebrow, .schedule-note, .scan-console .empty { color: var(--ink-soft); }
  .schedule-form label > span { color: var(--ink-soft); }
  .schedule-form .button { color: #fff; background: var(--blue); }
  .toggle-label { border-color: #bcd7e2; background: #fff; }
  .toggle-label input { accent-color: var(--blue); }
  .diagnostic-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid #9bb8c5; }
  .diagnostic-card.completed { border-left-color: var(--lime); }
  .collection-console { background: linear-gradient(135deg, #f3f1ff, #eefaff); border-color: #ddd9fb; }
  .collection-safety { color: var(--ink-soft); background: rgba(255,255,255,.7); border-color: #d8d8ef; }
  .collection-safety code { color: #5344b5; background: #edeafd; }
  .collection-summary { color: var(--ink); }

  .auth-shell { background: linear-gradient(145deg, #daf5ff, #f1fff5 52%, #fff5cf); }
  .auth-card { border-color: rgba(255,255,255,.9); border-radius: 28px; box-shadow: 0 24px 80px rgba(47, 114, 149, .16); }
  .auth-brand { margin-bottom: 42px; }
  .auth-card h1 { font-size: clamp(46px, 9vw, 68px); }
  dialog { border-color: var(--line); box-shadow: 0 24px 70px rgba(35, 83, 109, .22); }
  dialog::backdrop { background: rgba(28, 64, 84, .36); }
}

@media screen and (max-width: 1120px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .scan-state { display: none; }
  .primary-nav { justify-content: center; }
  .hero-note { display: none; }
  .report-section { padding: 22px; }
  .section-heading { flex-direction: column; }
  .report-heading-controls { width: 100%; max-width: none; justify-items: stretch; }
}

@media screen and (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr; gap: 8px; padding: 9px 14px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin: 0; overflow-x: auto; }
  .primary-nav a { flex: 0 0 auto; padding: 7px 10px; }
  .account-actions { grid-column: 2; grid-row: 1; }
  .account-actions .button { font-size: 10px; }
  main { width: min(100% - 24px, 1440px); }
  .hero { margin-top: 16px; padding: 30px 24px; border-radius: 22px; }
  .hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .hero-actions { margin-top: 20px; }
  .report-section { padding: 16px; border-radius: 20px; }
  .quantity-filter-controls { justify-content: stretch; }
  .quantity-filter-controls > * { width: 100%; }
  .setup-grid { grid-template-columns: 1fr; }
  .scan-console { padding: 20px; }
}

/* priceraccoon.com brand system based on the supplied local identity artwork. */
@media screen {
  :root {
    --ink: #1e272c;
    --ink-soft: #58656b;
    --cream: #f5f7f6;
    --paper: #ffffff;
    --line: #d9e1dc;
    --lime: #83c978;
    --coral: #e67e22;
    --gold: #f2b35f;
    --forest: #2e7d32;
    --sky: #e8f3e9;
    --blue: #2e7d32;
    --violet: #e67e22;
    --mask-grey: #34495e;
    --shadow: 0 14px 38px rgba(30, 39, 44, .09);
  }

  body {
    background:
      radial-gradient(circle at 6% 3%, rgba(46, 125, 50, .08), transparent 24rem),
      radial-gradient(circle at 94% 20%, rgba(230, 126, 34, .08), transparent 22rem),
      var(--cream);
    color: var(--ink);
  }
  h1, .section-heading h2, .panel-heading h2, .weekly-sales-heading h3,
  .optimizer-heading h3, .console-heading h2, .dialog-heading h2, .recovery-dialog h2 {
    font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, sans-serif;
    font-weight: 750;
    letter-spacing: -.045em;
  }
  .eyebrow { color: var(--forest); }

  .topbar {
    background: rgba(245, 247, 246, .95);
    border-bottom: 3px solid var(--forest);
    box-shadow: 0 7px 24px rgba(30, 39, 44, .08);
  }
  .brand { gap: 9px; color: var(--ink); letter-spacing: -.04em; }
  .brand-mark {
    position: relative;
    width: 29px;
    height: 25px;
    flex: 0 0 29px;
    color: transparent;
    background: var(--coral);
    border-radius: 4px 10px 10px 4px;
    box-shadow: none;
    transform: rotate(-7deg);
  }
  .brand-mark::before {
    position: absolute;
    top: 7px;
    right: 5px;
    width: 5px;
    height: 5px;
    background: var(--cream);
    border: 2px solid var(--mask-grey);
    border-radius: 50%;
    content: "";
  }
  .brand-mark::after {
    position: absolute;
    left: -7px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--coral);
    content: "";
    transform: rotate(45deg);
  }
  .brand-word { position: relative; z-index: 1; color: var(--ink); font-size: 21px; font-weight: 850; }
  .brand-word strong { color: var(--forest); font-weight: 850; }
  .brand-domain { color: var(--ink); }
  .primary-nav a:hover, .primary-nav a:focus-visible { color: var(--forest); background: #e5f0e6; }
  .scan-state { color: var(--mask-grey); background: #eef3f0; border-color: #d2ddd6; }
  .account-button { color: var(--mask-grey); background: #fff; border-color: #c5d2ca; }

  .hero {
    grid-template-columns: minmax(0, .88fr) minmax(470px, 1.12fr);
    align-items: center;
    background:
      linear-gradient(135deg, rgba(255,255,255,.93), rgba(245,247,246,.86)),
      repeating-linear-gradient(-45deg, transparent 0 18px, rgba(46,125,50,.025) 18px 36px);
    border: 1px solid #ccd9d1;
    border-top: 6px solid var(--forest);
    border-radius: 26px;
    box-shadow: var(--shadow);
  }
  .hero .eyebrow { color: var(--forest); }
  .hero h1 { max-width: 660px; color: var(--ink); font-size: clamp(46px, 6vw, 76px); line-height: .94; }
  .hero-brand-art {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 12px 12px 56px;
    background: #fff;
    border: 1px solid #dce3df;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(30,39,44,.10);
    transform: rotate(1.25deg);
  }
  .hero-brand-art::after {
    position: absolute;
    right: -22px;
    bottom: -26px;
    width: 118px;
    height: 118px;
    background: rgba(230, 126, 34, .12);
    border-radius: 50%;
    content: "";
  }
  .hero-brand-art img {
    display: block;
    width: 108%;
    max-width: none;
    margin: -2% 0 0 -4%;
    border-radius: 13px;
  }
  .hero-brand-art p { position: absolute; left: 24px; bottom: 15px; z-index: 1; margin: 0; }
  .hero-brand-art p strong, .hero-brand-art p span { display: block; }
  .hero-brand-art p strong { color: var(--forest); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  .hero-brand-art p span { color: var(--mask-grey); font-size: 11px; }

  .button { border-radius: 10px; }
  .button.primary { color: #fff; background: var(--forest); box-shadow: 0 6px 14px rgba(46,125,50,.18); }
  .button.primary:hover, .button.primary:focus-visible { background: #246928; outline: none; }
  .button.dark { color: #fff; background: var(--mask-grey); }
  .button.dark:hover, .button.dark:focus-visible { background: var(--ink); outline: none; }
  .button.light { color: var(--forest); background: #fff; border: 1px solid #a9c7ad; }
  .button.light:hover, .button.light:focus-visible { background: #eaf3eb; outline: none; }
  .text-button { color: var(--forest); }
  .utility-button {
    color: var(--forest);
    background: #fff;
    border-color: #a9c7ad;
    box-shadow: 0 3px 9px rgba(46,125,50,.06);
  }
  .utility-button:hover, .utility-button:focus-visible {
    color: #205d24;
    background: #e8f3e9;
    border-color: #78a97d;
    box-shadow: 0 0 0 3px rgba(46,125,50,.12);
  }
  .utility-button.danger { color: #a64d21; border-color: #e7bea3; }
  .utility-button.danger:hover, .utility-button.danger:focus-visible { color: #8c3d18; background: #fff0e5; border-color: #df9d72; }

  .report-section, .panel { background: rgba(255,255,255,.92); border-color: #d6dfd9; box-shadow: var(--shadow); }
  .report-section { border-top: 5px solid var(--forest); }
  .panel { border-top: 4px solid var(--coral); }
  #stores { border-top-color: var(--forest); }
  .step { color: #fff; background: var(--coral); }
  #stores .step { background: var(--forest); }
  .entry-form { background: #f4f7f5; border-color: #d8e2db; }
  input, select { border-color: #c8d4cc; }
  input:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(46,125,50,.12); }
  .saved-pill, .store-directory-item { background: #f3f6f4; border-color: #e0e7e2; }
  .saved-pill:hover, .store-directory-item:hover { background: #eaf3eb; }
  .coverage-badge.live { color: #1d6122; background: #ddefdf; }
  .coverage-badge.partial { color: #82460f; background: #ffe6c8; }
  .quantity-stepper button:hover, .quantity-stepper button:focus-visible { background: #ddefdf; }

  .deal-filter, .exact-quantity-filter { background: #fff; border-color: #cbd8cf; box-shadow: none; }
  .deal-filter input, .store-choice input { accent-color: var(--forest); }
  .tabs { padding-bottom: 11px; border-bottom: 1px solid #dbe3de; }
  .tab { color: var(--mask-grey); background: #fff; border-color: #ced9d2; }
  .tab:hover { color: var(--forest); background: #edf5ee; }
  .tab.active { color: #fff; background: var(--forest); border-color: var(--forest); box-shadow: 0 6px 15px rgba(46,125,50,.18); }
  .tab.active span { color: var(--ink); background: #fff; }
  .weekly-sales { border-color: #d5ded8; }
  .weekly-sales-heading { background: linear-gradient(90deg, #f8fbf9, #fff8f1); }
  .sale-header, .deal-header { color: var(--mask-grey); background: #e8efe9; }
  .sale-row, .deal-row { border-bottom-color: #e1e7e3; }
  .sale-row:hover, .deal-row:hover { background: #fbf7f2; }
  .sort-button:hover, .sort-button:focus-visible { color: var(--forest); background: #fff; border-color: #9fbea3; }
  .sort-button.ascending, .sort-button.descending { color: var(--forest); background: #fff; border-color: #76a77b; box-shadow: 0 2px 8px rgba(46,125,50,.09); }
  .sort-button[data-sort-priority]::before { background: var(--coral); }
  .table-sort-status { background: #eef5ef; }
  .table-sort-status .utility-button { color: var(--forest); border-color: #a9c7ad; }
  .table-sort-status .utility-button:hover, .table-sort-status .utility-button:focus-visible { color: #205d24; background: #e1efe3; border-color: #78a97d; }
  .promotion-kind { background: var(--coral); }
  .promotion-filter-button:hover, .promotion-filter-button:focus-visible, .promotion-filter-button.active { background: var(--forest); border-color: var(--forest); }
  .fulfillment-badge { color: var(--mask-grey); background: #edf1f4; border-color: #c4cfd7; }
  .condition-badge { color: #85450e; background: #fff0dc; }
  .deal-score { color: #fff; background: var(--forest); }
  .savings { color: var(--forest); }
  .badge { color: #91450f; background: #ffead7; }

  .scan-console { background: #f0f5f1; border-color: #cad8cd; border-top: 5px solid var(--forest); }
  .collection-console { background: #f3f5f6; border-color: #d4dce1; border-top-color: var(--mask-grey); }
  .schedule-form .button { background: var(--forest); }
  .toggle-label { border-color: #b9c8bd; }
  .toggle-label input { accent-color: var(--forest); }
  .collection-safety { background: #fff; border-color: #d3dce0; }
  .collection-safety code { color: var(--forest); background: #e5eee6; }
  .diagnostic-card.completed { border-left-color: var(--forest); }
  .diagnostic-card.completed_with_warnings, .diagnostic-card.retry_queued { border-left-color: var(--coral); }

  .auth-shell {
    background:
      linear-gradient(90deg, rgba(245,247,246,.97), rgba(245,247,246,.88)),
      url("/groceries/assets/priceraccoon-com-brand.jpg") center / cover no-repeat;
  }
  .auth-card { border-top: 6px solid var(--forest); box-shadow: 0 24px 70px rgba(30,39,44,.15); }
  .auth-brand { margin-bottom: 38px; }
  dialog { border-top: 5px solid var(--forest); box-shadow: 0 24px 70px rgba(30,39,44,.22); }
  dialog::backdrop { background: rgba(30,39,44,.48); }
  .toast { background: var(--mask-grey); border-left: 5px solid var(--coral); }
}

@media screen and (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; }
  .hero-brand-art { width: min(100%, 760px); }
}

@media screen and (max-width: 760px) {
  .topbar { border-bottom-width: 2px; }
  .brand-word { font-size: 17px; }
  .brand-mark { width: 24px; height: 21px; flex-basis: 24px; }
  .brand-mark::after { left: -5px; top: 5px; width: 12px; height: 12px; }
  .brand-mark::before { top: 5px; right: 4px; }
  .account-actions { display: grid; grid-template-columns: auto auto; align-self: start; gap: 5px 7px; }
  .account-actions #scan-button { grid-column: 1 / -1; justify-self: end; min-height: 34px; padding: 6px 11px; }
  .header-signout { display: inline-flex; align-self: center; white-space: nowrap; }
  .hero { padding: 26px 20px; border-top-width: 5px; }
  .hero-brand-art { padding: 8px 8px 52px; border-radius: 16px; transform: none; }
  .hero-brand-art img { width: 116%; margin-left: -8%; }
  .hero-brand-art p { left: 16px; bottom: 13px; }
  .report-section { border-top-width: 4px; }
  .panel-heading { align-items: flex-start; }
  .list-heading-actions { justify-content: flex-start; }
}

@media print {
  .beta-banner { display: none; }
  .print-sheet-header { border-bottom-color: #2e7d32; }
  .print-sheet-header .eyebrow, .print-sheet-header h1 { color: #1e272c; }
  .print-section-row { border-bottom-color: #2e7d32 !important; }
}

/* Whimsical mascot moments. Characters remain decorative; nearby HTML carries meaning. */
@media screen {
  .admin-management-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; margin-top: 28px; }
  .admin-tool-card { min-width: 0; padding: 22px; background: #fff; border: 1px solid #cad8cd; border-radius: 18px; }
  .admin-tool-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
  .admin-tool-heading h3 { margin: 2px 0 0; font-size: 24px; }
  .admin-tool-heading > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .admin-tool-heading label { display: grid; min-width: 120px; gap: 4px; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .admin-tool-heading select { min-height: 42px; padding: 7px 34px 7px 10px; color: var(--ink); background: #fff; border: 1px solid #afc1b3; border-radius: 9px; font-size: 15px; }
  .admin-stat-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
  .admin-stat-grid span { padding: 8px 11px; color: var(--ink-soft); background: #edf5ee; border-radius: 999px; font-size: 13px; }
  .admin-stat-grid strong { color: var(--forest); font-size: 17px; }
  .admin-privacy-note { margin: 0 0 16px; padding: 12px 14px; color: var(--ink-soft); background: #f5f7f6; border-left: 4px solid var(--forest); border-radius: 8px; font-size: 14px; line-height: 1.45; }
  .admin-table-wrap { max-height: 520px; overflow: auto; border: 1px solid #d4dfd6; border-radius: 12px; }
  .admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .admin-table th { position: sticky; z-index: 1; top: 0; padding: 10px; color: var(--mask-grey); background: #e8f0e9; text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
  .admin-table td { padding: 11px 10px; vertical-align: top; border-top: 1px solid #e0e7e1; }
  .admin-table td small, .admin-table td > span { display: block; margin-top: 3px; color: var(--ink-soft); }
  .admin-table .muted { color: #77827d; font-style: italic; }
  .admin-status { display: inline-block !important; margin: 4px 0 0 5px !important; padding: 2px 6px; color: #7b4b14 !important; background: #fff0dc; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
  .admin-status.good { color: #1f6429 !important; background: #e3f3e5; }
  .admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-row-actions .utility-button { min-height: 34px; padding: 6px 9px; font-size: 12px; }
  .admin-table input, .admin-table select { width: min(220px, 100%); min-height: 38px; padding: 7px 8px; }
  .admin-password-actions { display: flex; justify-content: center; gap: 10px; }

  .raccoon-mascot {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(30, 39, 44, .12));
    pointer-events: none;
    user-select: none;
    animation: raccoon-bob 4.2s ease-in-out infinite;
  }
  .auth-shell { position: relative; grid-template-columns: minmax(0, 480px); overflow: hidden; }
  .auth-card { position: relative; z-index: 2; grid-area: 1 / 1; }
  .auth-raccoon {
    position: absolute;
    z-index: 1;
    right: max(18px, calc(50% - 410px));
    bottom: 10px;
    width: min(31vw, 330px);
    transform: rotate(3deg);
    transform-origin: bottom center;
  }
  .report-heading-side { display: flex; min-width: 0; align-items: flex-end; gap: 13px; }
  .comparing-raccoon { width: 118px; flex: 0 0 118px; margin-bottom: -8px; animation-delay: -.8s; }
  .report-heading-side .report-heading-controls { min-width: 0; }

  .playful-loading { grid-template-columns: 132px minmax(180px, auto); justify-content: center; align-items: center; text-align: left; }
  .playful-loading > div { display: grid; justify-items: start; gap: 7px; }
  .playful-loading > div > span { width: 22px; height: 22px; }
  .loading-raccoon { width: 124px; animation-duration: 2.8s; }

  .mascot-state { grid-template-columns: 110px minmax(0, 440px); justify-content: center; gap: 22px; text-align: left; }
  .mascot-state p { margin: 0; font-weight: 700; }
  .empty-raccoon { width: 108px; }

  .optimizer-celebration { display: flex; align-items: flex-end; justify-content: flex-end; gap: 14px; }
  .success-raccoon { width: 112px; margin: -32px 0 -12px; animation-delay: -.4s; }
  .mascot-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 126px;
    margin-bottom: 16px;
    padding: 14px 22px;
    overflow: hidden;
    background: linear-gradient(110deg, #fff7ec, #edf6ee);
    border: 1px solid #dfddd3;
    border-radius: 18px;
  }
  .mascot-banner h3 { margin: 0; color: var(--ink); font-size: 20px; }
  .mascot-banner .eyebrow { margin-bottom: 3px; }
  .celebrating-raccoon { width: 118px; margin: -12px 0 -20px; animation-duration: 2.5s; }

  .playful-heading { align-items: center; }
  .heading-mascot-copy { display: flex; max-width: 620px; align-items: center; gap: 12px; }
  .heading-mascot-copy > p { margin: 0; color: var(--ink-soft); font-size: 12px; }
  .discount-raccoon { width: 90px; flex: 0 0 90px; margin: -14px 0 -16px; animation-duration: 2.6s; }

  .panel, .weekly-sales, .report-section { position: relative; }
  .panel::after, .report-section::after {
    position: absolute;
    z-index: 0;
    width: 12px;
    height: 12px;
    background: var(--coral);
    border-radius: 3px 6px 6px 3px;
    content: "";
    opacity: .16;
    transform: rotate(-12deg);
    pointer-events: none;
  }
  .panel::after { right: 18px; bottom: 16px; }
  .report-section::after { right: 24px; top: 22px; }

  @keyframes raccoon-bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -5px; }
  }
}

@media screen and (max-width: 1120px) {
  .admin-management-grid { grid-template-columns: 1fr; }
  .report-heading-side { width: 100%; justify-content: flex-end; }
  .report-heading-side .report-heading-controls { flex: 1; }
}

@media screen and (max-width: 760px) {
  .admin-tool-heading { align-items: stretch; flex-direction: column; }
  .admin-tool-heading > div:last-child { justify-content: flex-start; }
  .admin-table { min-width: 720px; }
  .brand-word { font-size: 15px; }
  .auth-raccoon { right: -65px; bottom: -20px; width: 210px; opacity: .22; }
  .report-heading-side { align-items: flex-start; }
  .comparing-raccoon { width: 84px; flex-basis: 84px; }
  .playful-loading { grid-template-columns: 90px minmax(0, 1fr); }
  .loading-raccoon, .empty-raccoon { width: 86px; }
  .mascot-state { grid-template-columns: 86px minmax(0, 1fr); gap: 12px; }
  .optimizer-heading { align-items: flex-start; }
  .optimizer-celebration { align-items: flex-start; }
  .success-raccoon { width: 78px; margin: -12px 0 -2px; }
  .mascot-banner { min-height: 108px; padding: 12px 15px; }
  .celebrating-raccoon { width: 88px; }
  .heading-mascot-copy { align-items: flex-start; }
  .discount-raccoon { width: 72px; flex-basis: 72px; }
}

@media screen and (max-width: 520px) {
  .comparing-raccoon { display: none; }
  .playful-heading, .heading-mascot-copy { align-items: flex-start; flex-direction: column; }
  .discount-raccoon { margin: -4px 0 -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .raccoon-mascot { animation: none !important; translate: none !important; }
}

/* Sales filters stay together as one control group for the currently visible list. */
@media screen {
  .report-heading-controls { width: min(100%, 820px); }
  .quantity-filter-controls {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 12px 10px;
    background: #f3f7f4;
    border: 1px solid #b9cdbd;
    border-radius: 16px;
    box-shadow: 0 7px 18px rgba(46, 125, 50, .07);
  }
  .quantity-filter-controls legend {
    padding: 0 8px;
    color: var(--forest);
    background: var(--paper);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  .quantity-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1px;
    overflow: hidden;
    background: #dbe4de;
    border: 1px solid #d2ddd5;
    border-radius: 12px;
  }
  .quantity-filter-row.quantity-visible { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .quantity-filter-row > .deal-filter:not(.limited-deal-filter) { grid-column: 1; grid-row: 1; }
  .quantity-filter-row > .limited-deal-filter { grid-column: 2; grid-row: 1; }
  .quantity-filter-row > #required-quantity-filter { grid-column: 1; grid-row: 2; }
  .quantity-filter-row > #limited-day-filter { grid-column: 2; grid-row: 2; }
  .quantity-filter-row > label[for="fulfillment-filter"] { grid-column: 1; grid-row: 3; }
  .quantity-filter-row > .page-size-filter { grid-column: 2; grid-row: 3; }
  .quantity-filter-row > .sale-search-filter { grid-column: 1 / -1; grid-row: 4; }
  .quantity-filter-controls .deal-filter,
  .quantity-filter-controls .exact-quantity-filter {
    min-width: 0;
    margin: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .sale-search-filter input { width: 100%; }
  .quantity-filter-row > #required-quantity-filter[hidden],
  .quantity-filter-row > #limited-day-filter[hidden] {
    display: grid;
    visibility: hidden;
    pointer-events: none;
  }
  .quantity-filter-controls .report-meta { margin-top: 8px; padding: 0 3px; text-align: right; }
}

@media screen and (max-width: 760px) {
  .quantity-filter-controls legend { width: auto; }
  .quantity-filter-row, .quantity-filter-row.quantity-visible { grid-template-columns: 1fr; }
  .quantity-filter-row > .deal-filter,
  .quantity-filter-row > .sale-search-filter,
  .quantity-filter-row > label[for="fulfillment-filter"],
  .quantity-filter-row > #required-quantity-filter,
  .quantity-filter-row > #limited-day-filter,
  .quantity-filter-row > .page-size-filter { grid-column: 1; grid-row: auto; }
  .quantity-filter-row > .deal-filter:not(.limited-deal-filter) { order: 1; }
  .quantity-filter-row > .limited-deal-filter { order: 2; }
  .quantity-filter-row > #required-quantity-filter { order: 3; }
  .quantity-filter-row > #limited-day-filter { order: 4; }
  .quantity-filter-row > label[for="fulfillment-filter"] { order: 5; }
  .quantity-filter-row > .page-size-filter { order: 6; }
  .quantity-filter-row > .sale-search-filter { order: 7; }
  .quantity-filter-controls .report-meta { text-align: left; }
}

/* Keep the opening brand moment useful without pushing the working UI down the page. */
@media screen {
  .hero {
    grid-template-columns: minmax(0, .76fr) minmax(500px, 1.24fr);
    gap: clamp(22px, 3vw, 38px);
    margin: 18px 0 24px;
    padding: clamp(24px, 3.2vw, 42px);
  }
  .hero .eyebrow { margin-bottom: 8px; }
  .hero h1 {
    max-width: 560px;
    margin-bottom: 12px;
    font-size: clamp(40px, 4.7vw, 62px);
    line-height: .96;
  }
  .hero .lede { max-width: 580px; font-size: clamp(14px, 1.45vw, 17px); line-height: 1.45; }
  .hero-actions { margin-top: 18px; }
  .hero-brand-art {
    padding: 8px 8px 42px;
    border-radius: 18px;
    transform: rotate(.5deg);
  }
  .hero-brand-art img { width: 104%; margin: -1% 0 0 -2%; border-radius: 11px; }
  .hero-brand-art p { left: 18px; bottom: 10px; }
}

@media screen and (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 28px; }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 24px; }
  .hero-copy .eyebrow, .hero-copy h1, .hero-copy .lede { grid-column: 1; }
  .hero-copy .hero-actions { grid-column: 2; grid-row: 1 / span 3; align-self: end; justify-content: flex-end; }
  .hero-brand-art { width: 100%; }
}

@media screen and (max-width: 760px) {
  .hero { gap: 18px; margin: 14px 0 20px; padding: 22px 18px; }
  .hero-copy { display: block; }
  .hero h1 { font-size: clamp(38px, 12vw, 50px); }
  .hero-actions { margin-top: 16px; }
  .hero-brand-art { padding: 6px 6px 38px; }
  .hero-brand-art img { width: 108%; margin-left: -4%; }
  .hero-brand-art p { left: 14px; bottom: 9px; }
}

@media print {
  .raccoon-mascot, .mascot-banner, .button-help-tooltip { display: none !important; }
}

.button-help-tooltip {
  position: fixed;
  z-index: 3000;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 13px;
  color: #fff;
  background: var(--charcoal, #1e272c);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 10px;
  box-shadow: 0 9px 28px rgb(30 39 44 / 24%);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.38;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
}

.button-help-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 120ms ease, transform 120ms ease;
}

.button-help-tooltip::after {
  position: absolute;
  left: var(--tooltip-arrow-left, 50%);
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: var(--charcoal, #1e272c);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.button-help-tooltip.below::after {
  top: -6px;
  bottom: auto;
}

button[data-help]:focus-visible, .filter-help-label:focus-visible {
  outline: 3px solid rgb(230 126 34 / 42%);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .button-help-tooltip.visible { transition: none; }
  .site-tour-highlight { animation: none; }
}

/* Store picker: kept in the sticky navigation and opened on demand. */
@media screen {
  .primary-nav .nav-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .primary-nav .nav-button:hover,
  .primary-nav .nav-button:focus-visible {
    color: var(--forest);
    background: #e5f0e6;
    outline: none;
  }
  #store-nav-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    padding: 0 6px;
    color: #fff;
    background: var(--forest);
    border-radius: 100px;
    font-size: 10px;
    line-height: 1;
  }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
  #shopping-list { order: initial; }
  .stores-dialog {
    width: min(94vw, 760px);
    max-height: min(88vh, 820px);
    padding: 26px;
    overflow: hidden;
  }
  .stores-dialog[open] { display: flex; flex-direction: column; animation: store-dialog-in 150ms ease-out; }
  .stores-dialog-heading { margin-bottom: 8px; }
  .stores-dialog-summary { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
  .stores-dialog-summary .count { flex: 0 0 auto; color: var(--forest); font-weight: 850; }
  .stores-dialog-summary p { margin: 0; color: var(--ink-soft); font-size: 13px; }
  .stores-dialog .store-bulk-actions { margin-top: 0; }
  .stores-dialog .store-directory { min-height: 180px; max-height: min(54vh, 520px); padding-right: 7px; }
  .stores-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .stores-dialog-footer span { color: var(--ink-soft); font-size: 12px; }
  @keyframes store-dialog-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media screen and (max-width: 760px) {
  .primary-nav .nav-button { flex: 0 0 auto; padding: 7px 10px; }
  .stores-dialog { width: calc(100vw - 18px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); padding: 20px 16px 16px; }
  .stores-dialog-heading h2 { font-size: 32px; }
  .stores-dialog-summary { display: grid; gap: 4px; }
  .stores-dialog .store-directory { flex: 1 1 auto; min-height: 120px; max-height: none; }
  .stores-dialog-footer { flex: 0 0 auto; margin-top: 12px; padding-top: 12px; }
  .store-directory-item { align-items: flex-start; flex-wrap: wrap; }
  .store-directory-item > div { flex-basis: calc(100% - 70px); }
  .store-directory-item .coverage-badge { order: 3; }
  .store-directory-item .store-choice { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .stores-dialog[open] { animation: none; }
}

/* Navigation hierarchy: primary activities stay together; site tools form a quieter group. */
@media screen {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .header-navs {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 2vw, 28px);
    margin-left: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .primary-nav, .utility-nav { display: flex; min-width: max-content; align-items: center; gap: 5px; }
  .primary-nav {
    margin: 0;
    padding: 4px;
    background: #edf4ee;
    border: 1px solid #d5e2d7;
    border-radius: 14px;
  }
  .primary-nav > a, .experiment-nav-menu > summary {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    color: var(--mask-grey);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
  }
  .primary-nav > a:hover, .primary-nav > a:focus-visible,
  .experiment-nav-menu > summary:hover, .experiment-nav-menu > summary:focus-visible { color: var(--forest); background: #fff; outline: none; }
  .primary-nav > a.current, .experiment-nav-menu > summary.current { color: #fff; background: var(--forest); box-shadow: 0 5px 13px rgba(46,125,50,.18); }
  .primary-nav > a.current:hover, .primary-nav > a.current:focus-visible,
  .experiment-nav-menu > summary.current:hover, .experiment-nav-menu > summary.current:focus-visible { color: #fff; background: #256c2a; }
  .primary-nav > a span, .experiment-nav-menu > summary span {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    padding: 0 6px;
    color: var(--mask-grey);
    background: rgba(52,73,94,.09);
    border-radius: 100px;
    font-size: 10px;
    line-height: 1;
  }
  .primary-nav > a.current span, .experiment-nav-menu > summary.current span { color: var(--forest); background: #fff; }
.primary-nav > a.food-help-nav-link { color: #7a2d0e; background: #fff0e3; }
.primary-nav > a.food-help-nav-link:hover, .primary-nav > a.food-help-nav-link:focus-visible { color: #fff; background: #a94416; }
  .experiment-nav-menu { position: relative; }
  .experiment-nav-menu > summary { cursor: pointer; list-style: none; }
  .experiment-nav-menu > summary::-webkit-details-marker { display: none; }
  .experiment-nav-menu > summary::after { content: "▾"; margin-left: 1px; font-size: 9px; }
  .experiment-nav-menu[open] > summary::after { content: "▴"; }
  .experiment-nav-options {
    position: fixed;
    z-index: 50;
    inset: auto;
    width: max-content;
    min-width: 245px;
    margin: 0;
    padding: 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(30, 39, 44, .18);
  }
  .experiment-nav-options[popover]:not(:popover-open) { display: none; }
  .experiment-nav-options a {
    display: block;
    padding: 10px 12px;
    color: var(--ink);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }
  .experiment-nav-options a:hover, .experiment-nav-options a:focus-visible { color: var(--forest); background: #edf7ee; outline: none; }
  .utility-nav { padding-left: clamp(12px, 1.5vw, 22px); border-left: 1px solid var(--line); }
  .utility-nav .nav-button, .utility-nav > a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
  }
  .utility-nav .nav-button:hover, .utility-nav .nav-button:focus-visible,
  .utility-nav > a:hover, .utility-nav > a:focus-visible {
    color: var(--forest);
    background: #e5f0e6;
    outline: none;
  }
  .report-view-trigger[hidden] { display: none; }
}

@media screen and (max-width: 1180px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .scan-state { display: none; }
  .header-navs { overflow-x: auto; scrollbar-width: thin; }
}

@media screen and (min-width: 1181px) and (max-width: 1800px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: clamp(12px, 1.5vw, 22px);
    row-gap: 3px;
    padding-block: 8px;
  }
  .brand { grid-column: 1; grid-row: 1 / span 2; }
  .header-navs { grid-column: 2; grid-row: 1 / span 2; margin-left: 0; }
  .account-actions { grid-column: 3; grid-row: 1; }
  .scan-state { grid-column: 3; grid-row: 2; justify-self: end; padding-block: 4px; }
}

@media screen and (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr; }
  .header-navs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding-bottom: 3px;
    overflow-x: auto;
  }
  .primary-nav { flex: 0 0 auto; }
  .utility-nav { flex: 0 0 auto; padding-left: 10px; }
  .primary-nav a { min-height: 35px; padding: 7px 10px; }
  .utility-nav .nav-button, .utility-nav > a { padding: 7px 9px; }
}

/* Public browsing with account access presented only when a personal feature is requested. */
body.auth-open { overflow: hidden; }
.auth-shell {
  position: fixed !important;
  z-index: 2200;
  inset: 0;
  grid-template-columns: minmax(0, 500px) !important;
  min-height: 0;
  padding: 24px;
  overflow: auto !important;
  background: rgba(30,39,44,.68) !important;
  backdrop-filter: blur(8px);
}
.auth-card {
  position: relative;
  width: min(100%, 500px);
  max-height: calc(100vh - 48px);
  padding: 34px;
  overflow: auto;
  border-top: 6px solid var(--forest);
}
.auth-close { position: absolute; z-index: 3; top: 16px; right: 16px; }
.auth-raccoon { right: max(12px, calc(50% - 430px)); width: min(28vw, 300px); opacity: .94; }
.auth-account-choice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.auth-account-choice span { color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.auth-form label small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
#register-view > .text-button { margin-top: 18px; }
.personal-feature-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
  background: linear-gradient(135deg, #edf7ee, #fff8ed);
  border: 1px solid #b9d1bc;
  border-left: 6px solid var(--forest);
  border-radius: 16px;
}
.personal-feature-gate[hidden] { display: none; }
.personal-feature-gate h3 { margin: 0 0 7px; color: var(--mask-grey); font-size: 24px; }
.personal-feature-gate p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.personal-feature-gate > div:last-child { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.personal-feature-gate.compact { gap: 14px; margin-bottom: 15px; padding: 14px 16px; border-left-width: 4px; }
.personal-feature-gate.compact strong, .personal-feature-gate.compact span { display: block; }
.personal-feature-gate.compact strong { font-size: 13px; }
.personal-feature-gate.compact span { flex: 1; color: var(--ink-soft); font-size: 11px; }

@media screen and (max-width: 680px) {
  .auth-shell { place-items: start center; padding: 10px; }
  .auth-card { max-height: calc(100vh - 20px); padding: 28px 20px 22px; }
  .auth-raccoon { display: none; }
  .auth-account-choice, .personal-feature-gate { align-items: stretch; flex-direction: column; }
  .personal-feature-gate > div:last-child { flex-wrap: wrap; }
  .personal-feature-gate.compact { align-items: flex-start; }
}

.sale-row.limited-deal {
  background: linear-gradient(90deg, rgba(230,126,34,.12), rgba(255,255,255,0) 44%);
  box-shadow: inset 5px 0 0 var(--coral);
}
.sale-row.limited-deal:hover { background: linear-gradient(90deg, rgba(230,126,34,.18), #fffaf4 50%); }
.limited-deal-badge {
  display: inline-block;
  margin: 4px 0 0 8px;
  padding: 4px 8px;
  color: #fff;
  background: #a94416;
  border: 1px solid #87330f;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.2;
  vertical-align: middle;
}
.sale-source .limited-deal-date { color: #9b3d13; font-size: 13px; }

/* User-selected accessibility preferences. Core keyboard and screen-reader support does not depend on these options. */
html.a11y-text-large { font-size: 112.5%; }
html.a11y-text-extra-large { font-size: 125%; }
html.a11y-text-large body :where(p, li, label, button, input, select, textarea, a, small),
html.a11y-text-extra-large body :where(p, li, label, button, input, select, textarea, a, small) { font-size: max(1rem, 1em); }
body.a11y-high-contrast {
  --ink: #000;
  --ink-soft: #111;
  --cream: #fff;
  --paper: #fff;
  --line: #000;
  --forest: #005a00;
  --coral: #9b3700;
  color: #000;
  background: #fff;
}
body.a11y-high-contrast :where(.auth-shell, .beta-banner, .topbar, .hero, .panel, .report-section, .weekly-sales, dialog, .cookie-banner, .accessibility-option, .accessibility-select) { color: #000; background: #fff; border-color: #000; box-shadow: none; }
body.a11y-high-contrast a { color: #0000c9; }
body.a11y-high-contrast :where(.button.primary, .button.dark, .tab.active) { color: #fff; background: #000; border-color: #000; }
body.a11y-high-contrast :where(.count, #store-nav-count, .promotion-kind, .limited-deal-badge) { color: #000; background: #ffeb00; border-color: #000; }
body.a11y-high-contrast .sale-row.limited-deal { background: #fff; box-shadow: inset 7px 0 0 #000; }
body.a11y-high-contrast .sale-source .limited-deal-date { color: #000; }
body.a11y-high-contrast :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-color: #005fcc !important; box-shadow: 0 0 0 2px #fff, 0 0 0 6px #005fcc !important; }
body.a11y-underline-links a:not(.button):not(.brand) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }
body.a11y-text-spacing :where(p, li, label, button, input, select, textarea, a, small) { letter-spacing: .04em !important; line-height: 1.75 !important; word-spacing: .12em !important; }
body.a11y-text-spacing :where(p, ul, ol) { margin-bottom: 1.4em; }
body.a11y-reduced-motion *, body.a11y-reduced-motion *::before, body.a11y-reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid Highlight !important; }
  .button, .utility-button, .tab, .promotion-kind, .condition-badge, .limited-deal-badge { forced-color-adjust: auto; }
}

/* Experimental staples filter and weekly recipe bonus feature. */
.weekly-recipes-shell { display: grid; gap: 20px; }
.test-features-section {
  scroll-margin-top: 90px;
  margin: 54px 0 38px;
  padding: 32px;
  background: linear-gradient(145deg, #fff8ee, #f3f7f4);
  border: 2px dashed #d79b63;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.about-site {
  order: 8;
  display: grid;
  gap: 26px;
  margin: 22px 0 38px;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(255,255,255,.92);
  border: 1px solid #d6dfd9;
  border-top: 5px solid var(--forest);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.about-site-heading { max-width: 820px; }
.about-site-heading h2, .questions h2 { margin: 6px 0 10px; color: var(--ink); }
.about-site-heading > p:last-child { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.how-it-works-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.how-it-works-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 18px; background: #f4f8f5; border: 1px solid #d6e4d8; border-radius: 16px; }
.how-it-works-list li > span { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--forest); border-radius: 50%; font-weight: 900; }
.how-it-works-list h3 { margin: 2px 0 7px; color: var(--ink); font-size: 17px; }
.how-it-works-list p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.questions { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.questions h2 { margin-bottom: 6px; }
.questions details { padding: 0 16px; background: #fffaf5; border: 1px solid #eadacb; border-radius: 12px; }
.questions summary { min-height: 48px; padding: 13px 28px 13px 0; cursor: pointer; color: var(--ink); font-weight: 850; line-height: 1.35; }
.questions p { margin: 0; padding: 0 0 16px; color: var(--ink-soft); line-height: 1.6; }

@media screen and (max-width: 900px) {
  .how-it-works-list { grid-template-columns: 1fr; }
}

body.a11y-high-contrast :where(.about-site, .how-it-works-list li, .questions details) {
  color: #000;
  background: #fff;
  border-color: #000;
  box-shadow: none;
}
.test-features-section::before {
  content: "EXPERIMENT SANDBOX";
  display: inline-block;
  margin: -48px 0 20px;
  padding: 7px 12px;
  color: #fff;
  background: var(--coral);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}
.test-features-heading { margin-bottom: 18px; }
.test-features-heading p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--ink-soft); }
.experiment-heading { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.experiment-heading h3 { margin: 2px 0 7px; color: var(--ink); font-size: 27px; }
.experiment-heading p:last-child { max-width: 860px; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.recipe-experiment { scroll-margin-top: 100px; padding-top: 8px; }
.recipe-experiment > h3 { margin: 0 0 18px; color: var(--ink); font-size: 22px; }
.recipe-safety-notice {
  margin-bottom: 20px;
  padding: 17px 19px;
  color: #6d2b15;
  background: #fff3e8;
  border: 2px solid #e67e22;
  border-left-width: 7px;
  border-radius: 14px;
}
.recipe-safety-notice strong { display: block; margin-bottom: 5px; font-size: 17px; }
.recipe-safety-notice p { margin: 0; line-height: 1.55; }
.weekly-recipes-intro {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #edf7ee, #fff5e8);
  border: 1px solid #bfd4c1;
  border-radius: 18px;
}
.weekly-recipes-intro .mascot-art { width: 100%; max-height: 145px; object-fit: contain; }
.weekly-recipes-intro h3 { margin: 2px 0 8px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.weekly-recipes-intro p:last-child { max-width: 850px; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.recipe-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--forest);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(30, 39, 44, .06);
}
.recipe-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.recipe-card-heading h3 { margin: 2px 0 0; color: var(--ink); font-size: 24px; line-height: 1.15; }
.recipe-card-badges { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 7px; flex-direction: column; }
.recipe-sale-count { flex: 0 0 auto; padding: 5px 9px; color: #fff; background: var(--forest); border-radius: 100px; font-size: 11px; font-weight: 850; }
.recipe-same-store { max-width: 230px; padding: 5px 9px; color: #713607; background: #fff0dc; border: 1px solid #efbe82; border-radius: 100px; font-size: 11px; font-weight: 900; text-align: center; }
.recipe-summary { margin: 12px 0 18px; color: var(--ink-soft); line-height: 1.5; }
.recipe-price-note { margin: 0 0 18px; padding: 11px 13px; color: var(--ink-soft); background: #edf7ee; border: 1px solid #b8d5bb; border-radius: 11px; font-size: 12px; line-height: 1.45; }
.recipe-ingredient-price { display: block; margin-top: 5px; color: var(--forest); font-size: 12px; font-weight: 850; }
.recipe-limited-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.recipe-limited-days span, .recipe-limited-ingredient { display: inline-block; padding: 4px 8px; color: #77380e; background: #fff0dc; border: 1px solid #efbe82; border-radius: 100px; font-size: 11px; font-weight: 900; }
.recipe-limited-ingredient { margin-top: 6px; }
.recipe-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 18px; }
.recipe-columns section { min-width: 0; }
.recipe-columns h4 { margin: 0 0 8px; color: var(--mask-grey); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.recipe-columns ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
.recipe-columns li { color: var(--ink-soft); line-height: 1.35; }
.recipe-columns li strong, .recipe-columns li small { display: block; }
.recipe-columns li strong { color: var(--ink); }
.recipe-columns li small { margin-top: 2px; overflow-wrap: anywhere; }
.recipe-sale-link { position: relative; display: block; padding-right: 18px; color: inherit; text-decoration-color: var(--saver-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.recipe-sale-link:hover { color: var(--saver-green); }
.recipe-sale-link-icon { position: absolute; top: 0; right: 0; color: var(--saver-green); font-weight: 900; }
.recipe-directions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.recipe-directions summary { width: fit-content; cursor: pointer; color: var(--forest); font-weight: 850; }
.recipe-directions ol { display: grid; gap: 9px; margin: 14px 0 0; padding-left: 24px; }
.recipe-directions li { padding-left: 4px; line-height: 1.5; }
.recipe-deal-notes { margin-top: 14px; padding: 12px 14px; background: #fff6e8; border-radius: 10px; }
.recipe-deal-notes ul { margin: 6px 0 0; padding-left: 18px; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; padding-top: 20px; }
.recipe-actions .button, .recipe-actions .utility-button { min-height: 42px; }
.print-recipe-ingredient, .print-recipe-step { break-inside: avoid; }

@media screen and (max-width: 900px) {
  .recipe-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 600px) {
  .weekly-recipes-intro { grid-template-columns: 85px minmax(0, 1fr); padding: 16px; }
  .weekly-recipes-intro h3 { font-size: 24px; }
  .recipe-card { padding: 17px; }
  .recipe-card-heading, .recipe-columns { grid-template-columns: 1fr; }
  .recipe-card-heading { flex-direction: column; }
  .recipe-columns { display: grid; }
  .recipe-actions > * { width: 100%; }
}

body.a11y-high-contrast :where(.test-features-section, .recipe-safety-notice, .weekly-recipes-intro, .recipe-card, .recipe-price-note, .recipe-deal-notes, .experiment-nav-options, .recipe-limited-days span, .recipe-limited-ingredient) {
  color: #000;
  background: #fff;
  border-color: #000;
  box-shadow: none;
}
body.a11y-high-contrast .recipe-sale-count { color: #000; background: #ffeb00; border: 1px solid #000; }
body.a11y-high-contrast .recipe-same-store { color: #000; background: #fff; border: 2px solid #000; }

/* Trust and usability pass: keep actionable text legible and targets usable.
   Long labels must wrap inside their control instead of spilling into the next
   column. Compact describes visual density, not tiny type. */
.button, .utility-button, button.text-button, .tab, .account-button,
.primary-nav > a, .experiment-nav-menu > summary,
.utility-nav .nav-button, .utility-nav > a,
.add-to-list-button, .add-to-basket-button, .promotion-filter-button,
.utility-button.compact, .table-sort-status button {
  min-height: 44px;
  font-size: 14px;
  line-height: 1.25;
}
.button, .utility-button, button.text-button,
.add-to-list-button, .add-to-basket-button, .promotion-filter-button,
.table-sort-status button {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}
.button, .utility-button, .add-to-list-button, .add-to-basket-button,
.promotion-filter-button, .table-sort-status button {
  padding: 9px 12px;
}
.deal-action-group {
  min-width: 0;
  align-items: stretch;
}
.deal-action-group > .add-to-basket-button,
.deal-action-group > .add-to-list-button {
  min-width: 0;
  min-height: 52px;
}
.promotion-filter-button { display: inline-flex; align-items: center; justify-content: center; }
.sort-button { min-height: 44px; font-size: 13px; line-height: 1.25; white-space: normal; }
.account-actions .button, .store-bulk-actions .text-button { font-size: 14px; }
.cookie-banner-actions .button { font-size: 14px; }
.deal-list-controls .quantity-stepper button, .deal-list-remove,
.remove, .drag-handle, .column-filter-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
}
.deal-list-controls .quantity-stepper input { min-height: 44px; font-size: 16px; }
.promotion-kind, .fulfillment-badge, .condition-badge, .coverage-badge,
.last-updated-card, .sale-discount small, .exact-quantity-filter span,
.store-directory-item small, .optimizer-note, .split-plan li small {
  font-size: 14px;
}
.deal-product small, .deal-metric small, .sale-offer small, .sale-source small,
.deal-metric .original-price, .last-updated, .quantity-condition {
  font-size: 14px;
}
.requirement-summary { display: block; margin-top: 7px; font-size: 14px; font-weight: 780; line-height: 1.35; }
.requirement-summary.has-catch { color: #7a3b12; }
.requirement-summary.no-catch { color: #236337; }
.promotion-kind.conditional { color: #5b2c0c; background: #ffe0a6; border: 1px solid #d69b3f; }
.promotion-kind.unconditional { color: #173b2b; background: #e5f4e8; border: 1px solid #a7c9ad; }
.basket-requirements { display: block; width: fit-content; margin-top: 7px; padding: 6px 9px; color: #713b14; background: #fff0dc; border-radius: 8px; font-size: 14px; font-weight: 750; }
.basket-qualification { display: grid; gap: 3px; margin-top: 8px; padding: 9px 11px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.basket-qualification.short { color: #733519; background: #fff0e8; border: 1px solid #efb69f; }
.basket-qualification.met { color: #195c39; background: #edf8f0; border: 1px solid #b7d8c1; }
.split-plan li > strong small { display: block; margin-top: 3px; text-align: right; white-space: nowrap; }
.conditional-total { max-width: 130px; color: #7a3b12; text-align: right; }
.optimizer-note.qualification-choice { padding: 10px 12px; color: #713b14; background: #fff6e8; border-radius: 10px; font-size: 14px; }
.mobile-sale-sort { display: none; }

@media screen and (max-width: 760px) {
  .food-help-callout {
    display: grid;
    gap: 18px;
    margin-top: 14px;
    padding: 14px 16px;
    border-left-width: 7px;
    border-radius: 18px;
  }
  .food-help-callout .food-help-button { width: 100%; }
  .mobile-sale-sort {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 14px 18px;
    background: #eef5ef;
    border-bottom: 1px solid var(--line);
  }
  .mobile-sale-sort span { color: var(--ink); font-size: 13px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .mobile-sale-sort select { width: 100%; min-height: 44px; padding: 7px 36px 7px 10px; background: #fff; }
  .sale-row > *::before, .deal-cell::before { font-size: 11px; }
  .sale-row { gap: 18px 14px; }
  .split-plan li { flex-wrap: wrap; }
  .split-plan li > strong { margin-left: auto; }
}



.area-site-management { margin-bottom: 1.5rem; }
.area-site-management form { margin-top: 1rem; }
.area-site-management fieldset { min-inline-size: 0; }
.area-site-management li { margin-block: .55rem; overflow-wrap: anywhere; }
.area-site-management li a { text-decoration: underline; }
