/* ShelfQuest Experience System: the shopping notebook.
   Customer surfaces only. Print keeps the qualified paper layout in russell.css. */
:root {
  --sq-paper: #faf9f6;
  --sq-surface: #ffffff;
  --sq-ink: #242b28;
  --sq-muted: #555e58;
  --sq-line: #d6dbd4;
  --sq-red: #c51632;
  --sq-red-pressed: #9e1028;
  --sq-green: #286346;
  --sq-green-soft: #edf4ec;
  --sq-warning: #814408;
  --sq-warning-soft: #fff4de;
  --sq-error: #9d2033;
  --sq-focus: #145fba;
  --sq-radius: 12px;
  --sq-control: 48px;
  --sq-space: 8px;
  --sq-fast: 140ms;
  --sq-ease: cubic-bezier(.2, .7, .2, 1);
  --r-app-width: 760px;
  --r-gutter: 20px;
  --r-nav-height: 72px;
  --r-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r-red: var(--sq-red);
  --r-red-pressed: var(--sq-red-pressed);
  --r-text: var(--sq-ink);
  --r-ink: var(--sq-ink);
  --r-muted: var(--sq-muted);
  --r-divider: var(--sq-line);
  --r-canvas: var(--sq-paper);
  --r-success: var(--sq-green);
  --r-shadow-card: none;
  --r-shadow-nav: none;
}
@media screen {
  html, body { background: #e9ede7; color: var(--sq-ink); }
  body { font-family: var(--r-font); line-height: 1.5; }
  h1, h2, h3, strong, button { font-family: var(--r-font); }
  h2, h3, .screen-heading h2, .home-greeting-row h2, .guest-finder-heading h2 { font-weight: 700; }
  .empty-list { min-height: 0; padding: 24px 14px; border: 0; border-radius: 8px; background: var(--sq-paper); box-shadow: none; }
  .empty-list .objective-title { font-size: 17px; }
  body .app-shell { box-shadow: none; border-inline: 1px solid var(--sq-line); }
  body:not(.login-active) main, body:not(.login-active)[data-active-screen="presence"] main,
  body:not(.login-active):not([data-active-screen]) main, main {
    padding: 18px var(--r-gutter) calc(var(--sq-bottom-space, 110px) + env(safe-area-inset-bottom)); background: var(--sq-paper);
  }
  body:not(.login-active) .topbar, body:not(.login-active)[data-active-screen] .topbar,
  body:not(.login-active)[data-active-screen="presence"] .topbar, body.login-active .topbar,
  body[data-active-screen="lists"]:not(.large-text) .topbar {
    min-height: 82px; padding: max(12px, env(safe-area-inset-top)) var(--r-gutter) 12px;
    gap: 12px; border-bottom: 1px solid var(--sq-line); background: var(--sq-surface);
  }
  body .brand-lockup { display: grid; grid-template-columns: 1fr 94px; align-items: center; gap: 5px 12px; width: 100%; height: auto; overflow: visible; }
  .shelfquest-wordmark { font-size: 23px; font-weight: 760; letter-spacing: -.9px; line-height: 1.1; }
  .shelfquest-wordmark > span { color: var(--sq-red); }
  body .brand-lockup .new-world-logo { width: 94px; height: auto; border-radius: 0; }
  body:not(.login-active) .brand-lockup h1, body:not(.login-active)[data-active-screen="presence"] .brand-lockup h1, body .brand-lockup h1 {
    position: static; grid-column: 1 / -1; width: auto; font-size: 12px; font-weight: 650; line-height: 1.4; color: var(--sq-muted); letter-spacing: .03em; white-space: normal;
  }
  body.large-text .brand-lockup h1 { font-size: 15px; }
  .screen-heading { margin-bottom: 20px; align-items: start; gap: 12px; }
  .screen > h2, .screen-heading h2, .shopping-list-screen .list-screen-heading h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.65px; color: var(--sq-ink); }
  .step-label { color: var(--sq-green); font-size: 12px; letter-spacing: .06em; font-weight: 700; }
  .copy, .objective-meta, .login-sub, .info-card p { color: var(--sq-muted); }
  .shelf-card, .route-panel, .info-card, .freestyle-panel, .pantry-recipe-card,
  .guest-sign-in-card, .account-settings-card, .install-card { border: 1px solid var(--sq-line); border-radius: var(--sq-radius); box-shadow: none; background: var(--sq-surface); }
  .primary-button, .secondary-button, .action-button, .compact-button { min-height: var(--sq-control); border-radius: 8px; padding: 11px 14px; font-weight: 650; line-height: 1.25; box-shadow: none; }
  .primary-button { background: var(--sq-red); color: #fff; }
  .primary-button:hover { background: var(--sq-red-pressed); }
  .secondary-button { background: var(--sq-surface); border: 1px solid #b9c3b9; color: var(--sq-ink); }
  button:active:not(:disabled) { filter: brightness(.94); }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    min-height: var(--sq-control); border: 1px solid #9da99f; border-radius: 8px; background: var(--sq-surface); color: var(--sq-ink); padding: 10px 12px; font-size: 16px;
  }
  input::placeholder, textarea::placeholder { color: #687169; opacity: 1; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--sq-focus); outline-offset: 3px; box-shadow: none; }
  .shop-context-bar { display: block; width: 100%; text-align: left; min-height: 48px; padding: 10px 12px; margin: 0 0 18px; border: 1px solid #becdbc; border-left: 4px solid var(--sq-green); border-radius: 8px; background: var(--sq-green-soft); color: var(--sq-green); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
  .shop-progress { display: block; width: 100%; height: 6px; margin: 0 0 14px; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--sq-green); }
  .shop-progress::-webkit-progress-bar { background: #e2e9df; }
  .shop-progress::-webkit-progress-value { background: var(--sq-green); transition: width var(--sq-fast) var(--sq-ease); }
  .shop-progress::-moz-progress-bar { background: var(--sq-green); }
  .home-greeting-row { display: block; gap: 16px; margin: 0 0 20px; }
  .home-greeting-row h2 { font-size: 28px; font-weight: 700; line-height: 1.18; letter-spacing: -.8px; max-width: 310px; margin: 0 0 8px; }
  .home-greeting-row p { color: var(--sq-muted); font-size: 16px; line-height: 1.4; }
  .store-status-strip { width: 100%; justify-content: space-between; gap: 10px; margin-top: 8px; display: flex; }
  .store-status-strip > button:first-child { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; color: var(--sq-ink); min-height: 44px; }
  .store-status-strip > button:first-child span { white-space: normal; text-overflow: clip; overflow: visible; }
  .store-change-link { color: var(--sq-red); flex-shrink: 0; }
  .home-list-primary { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; min-height: 0; padding: 20px; border: 1px solid #b9ccb8; border-radius: 12px; background: var(--sq-green-soft); box-shadow: none; }
  .home-list-primary-icon { background: var(--sq-green); width: 40px; height: 40px; border-radius: 10px; }
  .home-list-primary-copy strong { font-size: 21px; line-height: 1.25; letter-spacing: -.3px; }
  .home-list-primary-copy small { color: var(--sq-muted); font-size: 14px; line-height: 1.45; margin-top: 5px; }
  .home-list-primary-action { grid-column: 2; justify-self: start; border-radius: 7px; color: #fff; background: var(--sq-green); padding: 10px 15px; font-size: 14px; }
  .guest-finder-card { padding: 22px 0; border: 0; border-bottom: 1px solid var(--sq-line); border-radius: 0; background: transparent; box-shadow: none; }
  .guest-finder-heading { display: block; }
  .guest-finder-icon { display: none; }
  .guest-finder-heading h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.4px; }
  .guest-finder-card p { font-size: 14px; line-height: 1.45; }
  .guest-finder-form label { font-size: 14px; }
  .guest-finder-form > div { grid-template-columns: minmax(0,1fr) auto; }
  .guest-finder-form input { width: 100%; }
  .guest-finder-hint { margin-bottom: 0; }
  .fresh-hero { display: block; min-height: 0; height: auto; margin: 22px 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .fresh-hero::before, .fresh-hero::after, .fresh-hero-copy > span { display: none; }
  .fresh-hero-copy { position: static; padding: 0; width: auto; max-width: none; }
  .fresh-hero-copy h2 { font-size: 21px; color: var(--sq-ink); text-shadow: none; line-height: 1.25; max-width: none; }
  .fresh-hero-copy p { color: var(--sq-muted); font-size: 14px; text-shadow: none; max-width: none; }
  .hero-offer-row { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 0; padding: 0; }
  .hero-offer-card { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; min-height: 0; padding: 12px; border: 1px solid var(--sq-line); border-radius: 10px; background: white; box-shadow: none; text-align: left; }
  .hero-offer-card img { position: static; width: 100%; height: 72px; object-fit: contain; margin: 0; }
  .hero-offer-card strong { color: var(--sq-ink); font-size: 16px; line-height: 1.3; }
  .hero-offer-card small { font-size: 14px; line-height: 1.4; color: var(--sq-red); margin-top: 5px; }
  .hero-offer-card > svg { display: none; }
  .home-feature-grid, .home-stats-strip { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; margin: 22px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .home-feature-card, .home-stat-card { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr); align-content: center; column-gap: 12px; row-gap: 3px; width: 100%; min-height: 80px; height: auto; padding: 15px 0; border: 0; border-top: 1px solid var(--sq-line); border-radius: 0; background: transparent; box-shadow: none; text-align: left; overflow: visible; }
  body .home-feature-card { background: transparent; }
  body .home-feature-card .feature-icon { color: var(--sq-green); background: transparent; }
  .home-feature-card img, .home-feature-card .feature-go { display: none; }
  .home-feature-card .feature-icon, .home-stat-card > svg { position: static; grid-column: 1; grid-row: 1 / 3; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--sq-green); box-shadow: none; }
  .home-feature-card strong, .home-stat-card strong { grid-column: 2; width: auto; max-width: none; margin: 0; padding: 0; font-size: 16px; line-height: 1.35; white-space: normal; overflow: visible; }
  .home-feature-card small, .home-stat-card small { grid-column: 2; display: block; max-width: none; margin: 0; font-size: 14px; line-height: 1.4; color: var(--sq-muted); overflow: visible; -webkit-line-clamp: unset; }
  .home-stat-card:nth-child(n) { border-left: 0; border-top: 1px solid var(--sq-line); }
  .shopping-list-screen > .shopping-list-card { padding: 16px; border-radius: 12px; }
  .list-store-context { color: var(--sq-muted); }
  .list-visibility-summary { border: 0; border-radius: 0; padding: 12px 0 8px; background: transparent; color: var(--sq-green); font-size: 14px; }
  .shopping-list-screen .shopping-item { border-radius: 0; border: 0; border-top: 1px solid var(--sq-line); box-shadow: none; padding-block: 16px; }
  .shopping-list-screen .shopping-item.checked { background: #f2f6ef; opacity: 1; }
  .shopping-list-screen .shopping-item .item-name { line-height: 1.4; }
  .shopping-route-badge, .route-index, .route-stop-badge { background: var(--sq-green); color: #fff; border-radius: 7px; font-variant-numeric: tabular-nums; }
  .list-reuse-footer { background: var(--sq-green-soft); border-color: #b9ccb8; }
  .saved-list-row, .settings-button { border-radius: 8px; box-shadow: none; }
  .more-tiles-grid { gap: 10px; }
  .more-tile { background: white; border: 1px solid var(--sq-line); border-radius: 10px; box-shadow: none; }
  .more-tile small { color: var(--sq-muted); }
  .catalogue-card, .recipe-card, .specials-product-card { border: 1px solid var(--sq-line); border-radius: 10px; box-shadow: none; background: var(--sq-surface); }
  .catalogue-card strong, .recipe-card strong { color: var(--sq-ink); font-size: 16px; line-height: 1.4; }
  .catalogue-card small, .recipe-card small { font-size: 14px; line-height: 1.4; color: var(--sq-muted); }
  .recipe-featured-heading { background: var(--sq-green); color: white; border-radius: 8px; }
  .recipe-featured-heading strong, .recipe-featured-kicker { color: white; }
  .recipe-category-pill { border-radius: 7px; min-height: 44px; font-size: 14px; }
  .recipe-category-pill.selected { background: var(--sq-green); color: white; }
  .recipe-layout { gap: 16px; }
  #recipeStep .screen-heading { display: grid; grid-template-columns: minmax(0,1fr); }
  .recipe-header-actions { justify-content: start; }
  #recipeHomeButton { width: auto; min-width: 120px; overflow-wrap: normal; }
  body[data-auth-state="signed-in"] .recipe-list-context > div { display: none; }
  .recipe-list-context { border: 0; padding: 0; background: transparent; }
  .recipe-card strong, .recipe-card small { font-weight: 650; }
  .catalogue-result { padding: 14px 0; border: 0; border-bottom: 1px solid var(--sq-line); border-radius: 0; background: transparent; box-shadow: none; }
  .catalogue-result strong { color: var(--sq-ink); font-size: 16px; line-height: 1.4; font-weight: 650; }
  .catalogue-result small { color: var(--sq-muted); font-size: 14px; line-height: 1.4; }
  .catalogue-result-media { border-radius: 8px; background: white; }
  .product-detail-card { border-radius: 14px; background: var(--sq-paper); }
  .product-detail-copy h2 { font-size: 24px; line-height: 1.3; font-weight: 700; }
  .product-shelf-position { background: var(--sq-green-soft); border: 1px solid #b9ccb8; border-radius: 8px; }
  .product-detail-facts { font-size: 14px; }
  .product-detail-facts dd { color: var(--sq-ink); }
  .scan-barcode-card, .add-choice-card { border: 1px solid var(--sq-line); border-radius: 8px; background: white; box-shadow: none; }
  .add-choice-card { min-height: 90px; padding: 14px; }
  .add-choice-card small, .scan-barcode-card small { font-size: 14px; color: var(--sq-muted); line-height: 1.45; }
  .gift-icon::before, .route-icon::before, .search-icon::before { content: none; }
  .evidence-metric-strip { background: transparent; box-shadow: none; border-block: 1px solid var(--sq-line); border-radius: 0; }
  .full-specials-card { border-radius: 8px; box-shadow: none; }

  .recipe-controls:has(button:disabled):not(:has(button:not(:disabled))) { display: none; }
  .recipe-list-context { padding: 12px; border-color: #c7d7c4; background: var(--sq-green-soft); }
  .pantry-recipe-card { margin-block: 20px; padding: 16px; }
  .recipe-card-image { object-fit: cover; aspect-ratio: 4 / 3; }
  .catalogue-image-placeholder { background: #eff1eb; color: var(--sq-muted); }
  .catalogue-modal { background: rgb(22 32 24 / 45%); backdrop-filter: none; }
  #adultRoutePanel { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .route-now-card .route-now-main { display: block; }
  .route-now-card .route-now-icon { display: none; }
  .route-now-card .route-stop-badge { color: white; background: var(--sq-green); }
  .route-now-card { border: 1px solid #b9ccb8; border-radius: 12px; padding: 18px; background: var(--sq-green-soft); box-shadow: none; }
  .route-now-card h2 { font-size: 24px; line-height: 1.25; color: var(--sq-ink); }
  .route-now-actions { gap: 8px; }
  .route-now-actions .primary-button { grid-column: 1 / -1; border: 1px solid var(--sq-green); background: var(--sq-green); }
  .customer-route-map { border: 0; background: transparent; padding: 18px 0; }
  .route-summary-detail { border-radius: 8px; box-shadow: none; }
  .route-stop { border: 0; border-top: 1px solid var(--sq-line); border-radius: 0; padding: 14px 0; }
  .login-hero { background: transparent; padding: 24px 0 16px; }
  .login-logo { max-height: 80px; object-fit: contain; }
  .login-form { border: 0; padding: 0; box-shadow: none; }
  .login-kicker { color: var(--sq-green); }
  .welcome-card { margin-top: 20px; padding: 24px; }
  .welcome-begin-button { background: var(--sq-red); border-radius: 8px; }
  .account-recovery-card { background: var(--sq-warning-soft); border: 1px solid #bc945c; box-shadow: none; }
  .toast { border-radius: 10px; background: var(--sq-ink); color: #fff; bottom: calc(88px + env(safe-area-inset-bottom)); box-shadow: 0 4px 16px rgb(0 0 0 / 12%); }
  body .parent-bar.shelfquest-bottom-nav { backdrop-filter: none; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); bottom: 0; width: min(100%,var(--r-app-width)); max-width: var(--r-app-width); min-height: 72px; margin: 0; padding: 6px 6px max(8px,env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--sq-line); border-radius: 0; background: white; box-shadow: none; }
  body .parent-bar.shelfquest-bottom-nav button, body .parent-bar.shelfquest-bottom-nav .floating-scan-button { position: relative; top: auto; margin: 0; transform: none; width: 100%; min-height: 56px; height: auto; border: 0; border-radius: 8px; box-shadow: none; background: transparent; color: var(--sq-muted); }
  body .parent-bar.shelfquest-bottom-nav button svg, body .parent-bar.shelfquest-bottom-nav .floating-scan-button svg { position: static; width: 22px; height: 22px; padding: 0; margin: 0 auto 4px; border: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; }
  body .parent-bar.shelfquest-bottom-nav button span, body .parent-bar.shelfquest-bottom-nav .floating-scan-button span { position: static; color: inherit; font-size: 12px; line-height: 1.2; }
  body .parent-bar.shelfquest-bottom-nav .floating-scan-button.active, body .parent-bar.shelfquest-bottom-nav button.active, body .parent-bar.shelfquest-bottom-nav button[aria-current="page"] { background: #fbeef0; color: var(--sq-red); box-shadow: none; outline-color: var(--sq-focus); }
  body .parent-bar.shelfquest-bottom-nav button::after, body .parent-bar.shelfquest-bottom-nav button::before { display: none; }
  body.large-text .shop-context-bar { font-size: 18px; }
  body.large-text .home-list-primary-copy strong { font-size: 27px; }
  body.large-text .home-greeting-row p { font-size: 20px; }
  body.large-text .parent-bar.shelfquest-bottom-nav button span, body.large-text .parent-bar.shelfquest-bottom-nav .floating-scan-button span { font-size: 15px; }
  body.large-text .catalogue-card strong, body.large-text .recipe-card strong { font-size: 20px; }
  body.large-text .catalogue-card small, body.large-text .recipe-card small { font-size: 18px; }
  body.large-text input:not([type="checkbox"]):not([type="radio"]), body.large-text select, body.large-text textarea { font-size: 20px; }
  body.high-contrast { --sq-ink: #111; --sq-muted: #222; --sq-line: #444; --sq-paper: #fff; --sq-green-soft: #fff; }
  body.high-contrast .shop-context-bar { color: #111; border: 2px solid #111; }
  @media (min-width: 650px) {
    :root { --r-gutter: 32px; }
    .home-greeting-row h2 { max-width: none; }
    .home-list-primary { grid-template-columns: 40px minmax(0,1fr) auto; }
    .home-list-primary-action { grid-column: 3; grid-row: 1; align-self: center; }
    .hero-offer-card { grid-template-columns: 80px 1fr; align-items: center; }
    .recipe-list, .catalogue-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media (max-width: 374px) {
    :root { --r-gutter: 14px; }
    body.large-text .shopping-list-screen .shopping-item .item-actions,
    body.large-text .catalogue-inline-list .shopping-item .item-actions { grid-template-columns: minmax(0,1fr); }
    .brand-lockup { grid-template-columns: 1fr 76px; }
    body .brand-lockup .new-world-logo { width: 76px; }
    .shelfquest-wordmark { font-size: 21px; }
    .home-list-primary { padding: 16px; }
    .home-list-primary-action { grid-column: 1 / -1; justify-self: stretch; }
    .hero-offer-row { grid-template-columns: 1fr; }
    .hero-offer-card { grid-template-columns: 64px minmax(0,1fr); align-items: center; }
    .hero-offer-card img { height: 60px; }
    .home-feature-grid, .home-stats-strip { grid-template-columns: minmax(0,1fr); }
  }
  @media (max-width: 260px) {
    :root { --sq-bottom-space: 175px; }
    body .app-shell { border-inline: 0; }
    .store-status-strip { flex-direction: column; align-items: stretch; }
    .store-status-strip > button { width: 100%; min-width: 44px; }
    body .brand-lockup { grid-template-columns: 1fr; }
    body .brand-lockup .new-world-logo { grid-row: 2; }
    .home-list-primary { grid-template-columns: 1fr; }
    .home-list-primary-icon { display: none; }
    .guest-finder-form > div { grid-template-columns: 1fr; }
    .hero-offer-card { grid-template-columns: 1fr; }
    body .parent-bar.shelfquest-bottom-nav { padding-inline: 0; height: auto; min-height: 136px; grid-template-columns: repeat(3,minmax(0,1fr)); }
    body:not(.login-active) main { padding-bottom: 175px; }
    body .parent-bar.shelfquest-bottom-nav button { overflow-wrap: anywhere; padding-inline: 1px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
}
