/* PokéScrab — "Binder sheet" (docs/DESIGN.md). Products sit in sleeve pockets on a binder sheet, with a
   rubber-stamp status; one holo-foil button is the only flourish. Rebuilt 25 October 2026. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-wdth.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  /* Binder sheet: cool sleeve white, navy ink, sea-teal (Scrab) for action and life, stamp red for stock. */
  --page: #f3f5f8;
  --sheet: #e7ecf3;
  --pocket: #ffffff;
  --lip: #dbe2ec;
  --line: #d3dbe6;
  --ink: #16213a;
  --muted: #536079;
  --teal: #0b7a76;
  --teal-bright: #3cc4b4;
  --teal-wash: #e3f6f3;
  --red: #c8233a;
  --red-wash: #fdeaed;
  --amber-ink: #7a5310;
  --amber-wash: #fff3d6;
  --foil: linear-gradient(115deg, #7be0d6 0%, #9db8ff 30%, #f3a7e0 55%, #ffe08a 80%, #7be0d6 100%);
  --display: "Archivo", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-pocket: 10px;
  --r-control: 12px;
  font-family: var(--text);
  color: var(--ink);
  background: var(--page);
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.5; background: var(--page); }
button, input, select { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button, select, input { min-height: 44px; }
button { border: 1px solid var(--line); background: var(--pocket); border-radius: var(--r-control); padding: 10px 16px; font-weight: 700; }
button:hover:not(:disabled) { border-color: var(--ink); }
button:disabled { cursor: default; opacity: .5; }
input, select { background: var(--pocket); border: 1px solid #9aa6b9; border-radius: var(--r-control); padding: 10px 12px; max-width: 100%; }
input::placeholder { color: #66728a; opacity: 1; }
input[type=checkbox] { accent-color: var(--teal); width: 24px; height: 24px; min-height: auto; flex-shrink: 0; margin: 0; }
select { padding-right: 30px; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: 3px solid var(--teal); outline-offset: 6px; border-radius: 4px; }
h2:focus:not(:focus-visible), h1:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -.02em; }
h2 { font-size: 1.375rem; font-weight: 800; font-stretch: 115%; }
h3 { font-size: 1.125rem; font-weight: 800; font-stretch: 110%; }
time { font-variant-numeric: tabular-nums; }
.page-width { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -100px; background: var(--pocket); padding: 12px; z-index: 20; border-radius: 8px; }
.skip:focus { top: 12px; }
.small { font-size: .875rem; }

/* Header: mark, two links, the market switch. */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; min-height: 44px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.375rem; font-weight: 900; font-stretch: 115%; letter-spacing: -.01em; }
.brand-icon { width: 40px; height: 40px; flex-shrink: 0; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 10px; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current=page] { color: var(--ink); border-bottom-color: var(--teal-bright); }
.region { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--pocket); }
.region-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; border-radius: 999px; font-size: .875rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.region-link:hover { color: var(--ink); }
.region-link[aria-current=page] { background: var(--ink); color: var(--page); }

/* Hero: one promise, one foil button, the live line; Scrab on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 620px) 220px; justify-content: space-between; gap: 24px 48px; align-items: center; padding: 20px 0 12px; }
.hero-text { min-width: 0; max-width: 620px; }
.hero h1 { overflow-wrap: anywhere; }
.hero-lead { margin-top: 12px; font-size: 1.125rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; max-width: 100%; padding: 0 24px; border-radius: 14px; background: var(--foil); color: var(--ink); border: 1.5px solid var(--ink); font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.0625rem; text-decoration: none; text-align: center; box-shadow: 0 3px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.cta:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }
.cta:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.cta svg { stroke-width: 2.2; }
.hero-status { margin-top: 16px; font-size: .9375rem; color: var(--muted); }
.hero-status .live-dot { display: inline-block; vertical-align: -1px; margin-right: 8px; }
.hero-latency { margin-top: 6px; font-size: .875rem; color: var(--teal); font-weight: 700; }
.hero-latency strong { font-weight: 700; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #aeb8c8; flex-shrink: 0; }
.live-dot.on { background: var(--teal-bright); box-shadow: 0 0 0 4px #3cc4b433; }
.hero-mascot { width: 220px; height: auto; justify-self: center; }
.hero.pulse .hero-mascot { animation: scrab-hop .6s ease-out 1; }
@keyframes scrab-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-18px) rotate(-6deg); } 100% { transform: translateY(0); } }
.text-link { color: var(--teal); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
/* Market copy: the Worker sets data-market on <html>. */
.au-only { display: none; }
html[data-market="AU"] .au-only { display: initial; }
html[data-market="AU"] p.au-only { display: block; }
html[data-market="AU"] .sg-only { display: none; }

/* Section bar: plain text links, the way a binder has tabs. */
.section-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px 2px; margin: 8px 0 0; padding: 6px 0; background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.section-bar::-webkit-scrollbar { display: none; }
.section-bar-label { font-size: .875rem; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.section-bar a, .section-bar button { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-bar a:hover, .section-bar button:hover { background: var(--sheet); }
.section-bar button[aria-pressed=true] { background: var(--ink); color: var(--page); }
.section-bar a.has-new { position: relative; }
.section-bar a.has-new::after { content: ''; position: absolute; top: 8px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* Feeds: a heading, then the binder sheet of pockets. An empty feed folds to one quiet line. */
.feed { padding: 24px 0 4px; scroll-margin-top: 64px; }
.results-toolbar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feed-count { color: var(--muted); }
.now-note { margin-top: 4px; font-size: .9375rem; color: var(--muted); max-width: 46em; }
/* The sheet is as wide as its pockets: one catch is one pocket, not a pocket beside an empty sheet. */
.feed-list { list-style: none; margin: 12px 0 0; padding: 10px; display: flex; flex-wrap: wrap; gap: 10px; width: fit-content; max-width: 100%; background: var(--sheet); border-radius: 16px; min-height: 48px; }
.feed-list > li { flex: 0 1 252px; min-width: 0; }
.feed.is-quiet { padding-top: 14px; }
.feed.is-quiet .now-note, .feed.is-quiet .feed-count { display: none; }
.feed.is-quiet .feed-list { background: transparent; padding: 0; margin-top: 4px; min-height: 0; display: block; width: auto; }
.feed.is-quiet h2 { font-size: 1.125rem; color: var(--muted); }
.now-empty { color: var(--muted); font-size: .9375rem; padding: 2px 0; }
/* A list holding only its empty line is not a sheet. */
.feed-list:has(> .now-empty:only-child) { background: transparent; padding: 0; width: auto; min-height: 0; }
.feed-list > .now-empty { flex-basis: 100%; }
.feed-more { margin-top: 10px; }
/* A pocket: sleeve lip on top, the product picture, then name, stamp, shop, price, time. */
.now-item { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; padding: 10px; background: var(--pocket); border-radius: var(--r-pocket); border-top: 6px solid var(--lip); }
.now-item > * { min-width: 0; overflow-wrap: anywhere; }
.now-photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--pocket); border-radius: 6px; }
.now-item:not(.has-photo) .now-photo { display: none; }
.now-title { color: var(--ink); font-weight: 700; line-height: 1.3; text-decoration: none; min-height: 24px; }
.now-title:hover { text-decoration: underline; }
.now-meta { font-size: .875rem; color: var(--muted); line-height: 1.4; }
.now-label { display: inline-block; margin-right: 6px; padding: 3px 7px; border-radius: 5px; background: var(--ink); color: var(--pocket); font-family: var(--display); font-size: .75rem; font-weight: 800; font-stretch: 110%; line-height: 1.2; }
.now-label.soon { background: var(--teal); }
.now-label.release { background: var(--amber-wash); color: var(--amber-ink); }
/* With a picture, the label becomes a stamp on the sleeve. */
.now-item.has-photo .now-label { position: absolute; top: 16px; left: 14px; transform: rotate(-4deg); box-shadow: 0 1px 0 #16213a33; }
.restock-feed .now-label, #back-in-stock .now-label { background: var(--red); }
.now-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--sheet); color: var(--ink); }
.now-estimate { font-size: .875rem; padding: 8px; background: var(--teal-wash); border-radius: 8px; line-height: 1.4; }
.now-estimate strong { color: var(--teal); }
.now-note-line { font-size: .875rem; color: var(--muted); line-height: 1.4; }
.now-countdown { font-family: var(--display); font-weight: 800; color: var(--ink); }
.now-countdown.now { color: var(--teal); }
.now-countdown.past { color: var(--muted); font-weight: 700; }
.now-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.now-follow { min-height: 44px; padding: 6px 12px; font-size: .875rem; }
.now-follow[aria-pressed=true] { background: var(--teal-wash); border-color: var(--teal); color: var(--teal); }
.feed .now-item.just-now { box-shadow: 0 0 0 3px var(--teal-bright); }
/* Loading: grey shapes, never the word "Loading". A feed's placeholder is one line high, the size of its quiet
   state, so the page does not jump when most feeds turn out empty. */
.feed-list[aria-busy=true] { background: transparent; padding: 0; width: auto; min-height: 0; }
.feed-list[aria-busy=true] > .skeleton { flex: 0 1 60%; min-height: 22px; border-radius: 6px; }
.skeleton { display: block; min-height: 180px; border-radius: var(--r-pocket); background: linear-gradient(100deg, #f7f9fb 30%, #eef2f7 50%, #f7f9fb 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; list-style: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Search and the full price list. */
.search-panel { margin-top: 32px; padding: 20px; background: var(--pocket); border-radius: 16px; border-top: 8px solid var(--lip); }
.search-panel h2 { margin-bottom: 4px; }
.search-panel .now-note { margin: 0 0 12px; }
#search-form { display: flex; align-items: stretch; gap: 8px; }
.search-field { min-width: 0; flex: 1; position: relative; }
.search-field svg { position: absolute; left: 14px; top: 16px; color: var(--muted); pointer-events: none; }
#query { width: 100%; min-height: 54px; padding: 12px 12px 12px 46px; font-size: 1rem; border-color: #9aa6b9; }
.primary { background: var(--ink); color: var(--page); border-color: var(--ink); }
.primary:hover:not(:disabled) { background: #24314f; color: var(--page); }
#search-submit { min-width: 96px; }
.browse-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 12px; }
.quick-searches { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.quick-searches button { min-height: 44px; padding: 6px 14px; border-radius: 999px; background: var(--sheet); border-color: transparent; font-size: .875rem; }
.quick-searches button[aria-pressed=true] { background: var(--ink); color: var(--page); }
#watch-only::before { content: '♡ '; }
#watch-only[aria-pressed=true]::before { content: '♥ '; }
summary { min-height: 44px; padding: 10px 0; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
#filter-panel > summary { display: flex; align-items: center; gap: 8px; list-style: none; width: max-content; max-width: 100%; white-space: nowrap; font-size: .875rem; padding: 8px 10px; border-radius: 8px; }
#filter-panel > summary:hover { background: var(--sheet); }
#filter-panel[open] { flex-basis: 100%; }
.details-chevron { width: 16px; height: 16px; transition: transform .16s ease; transform-origin: center; }
details[open] .details-chevron { transform: rotate(180deg); }
.filter-content { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; }
label { display: block; font-size: .8125rem; font-weight: 700; margin-bottom: 4px; }
.filters select, .filters input[type=number] { width: 100%; font-size: .875rem; }
.check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 44px; margin: 0; font-size: .875rem; font-weight: 400; cursor: pointer; }
.filter-content > .text-button { margin-top: 10px; }
.text-button { border: 0; background: transparent; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; font-size: .875rem; padding: 8px 6px; }
.active-filter-row { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; }
#active-filters { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
#active-filters button { background: var(--sheet); border-color: transparent; font-size: .875rem; padding: 6px 12px; border-radius: 999px; overflow-wrap: anywhere; text-align: left; }
#clear-active { flex-shrink: 0; }

.results-section { padding-block: 24px 16px; }
#results-heading { font-size: 1.375rem; }
#result-count { font-size: .875rem; color: var(--muted); }
.connection { color: var(--muted); font-size: .875rem; margin-top: 8px; }
.connection.danger, .notice.danger { color: #8b2230; background: var(--red-wash); border-radius: 10px; padding: 10px 14px; }
.connection.warning { color: var(--amber-ink); }
.notice { margin-block: 14px; padding: 14px; border-radius: 12px; }
.notice.warning { background: var(--amber-wash); color: var(--amber-ink); }
.saved-note { background: var(--teal-wash); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-size: .875rem; margin-block: 12px; }

/* Price cards: pockets on the same sheet. */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding: 10px; background: var(--sheet); border-radius: 16px; }
.cards:empty { display: none; }
.offer-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; background: var(--pocket); border-radius: var(--r-pocket); border-top: 6px solid var(--lip); }
.card-product { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 12px; }
.card-product-copy { flex: 1; min-width: 0; }
.product-illustration { position: relative; flex: 0 0 76px; display: flex; justify-content: center; align-items: center; width: 76px; height: 76px; background: var(--page); border-radius: 8px; overflow: hidden; }
.product-illustration img { width: 60px; height: 46px; object-fit: contain; }
.product-illustration.format-generic img { width: 36px; height: 36px; }
.product-illustration .product-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--pocket); opacity: 0; transition: opacity .25s ease; }
.product-illustration.has-photo .product-photo { opacity: 1; }
.product-illustration.has-photo > img:not(.product-photo) { visibility: hidden; }
.product-title { font-size: 1rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.product-title a { color: inherit; text-decoration: none; display: inline-block; padding-block: 2px; min-height: 24px; }
.product-title a:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .875rem; line-height: 1.45; margin-top: 4px; overflow-wrap: anywhere; }
.card-store { margin-top: 10px; }
.card-store strong { font-size: .875rem; }
.seller, .seller-issue { color: var(--amber-ink); background: var(--amber-wash); border-radius: 6px; padding: 4px 7px; font-size: .8125rem; margin-top: 4px; width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.price-detail { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.price { overflow-wrap: anywhere; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; font-weight: 900; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.price-change { display: inline-block; font-size: .8125rem; padding: 2px 6px; background: var(--teal-wash); color: var(--teal); border-radius: 5px; }
.price-change.up { background: var(--amber-wash); color: var(--amber-ink); }
.price-more { font-size: .875rem; flex-basis: 100%; }
.price-more summary { color: var(--teal); min-height: 44px; display: flex; align-items: center; padding: 0; width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.price-more p, .price-more time { font-size: .875rem; margin-block: 4px; }
.price-more time { display: block; }
.price-more a { display: inline-flex; align-items: center; min-height: 44px; }
.card-stock { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 7px; font-family: var(--display); font-weight: 800; font-stretch: 108%; font-size: .8125rem; line-height: 1.3; color: var(--muted); background: var(--sheet); }
.pill.in_stock { color: var(--pocket); background: var(--red); }
.pill.stale { color: var(--amber-ink); background: var(--amber-wash); }
.pill.invalid, .pill.out_of_stock { color: var(--muted); background: var(--sheet); }
.pill.preorder, .pill.pre_order, .pill.backorder { color: var(--pocket); background: var(--teal); }
.stamp { color: var(--muted); font-size: .8125rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.buy { display: flex; justify-content: center; align-items: center; flex: 1 1 120px; min-height: 44px; padding: 8px; border-radius: var(--r-control); background: var(--ink); color: var(--page); text-decoration: none; font-size: .875rem; font-weight: 700; }
.buy:hover { background: #24314f; }
.watch { min-width: 76px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; font-size: .875rem; }
.watch svg { width: 15px; height: 15px; }
.watch[aria-pressed=true] { color: var(--teal); background: var(--teal-wash); border-color: var(--teal); }
.radar-track { font-size: .875rem; padding: 6px 12px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }
.pagination button { font-size: .875rem; min-width: 104px; }
#page-count { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.results-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 8px; color: var(--muted); }
.loading-state { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; background: var(--sheet); border-radius: 16px; margin-top: 12px; }
.loading-state .skeleton { min-height: 160px; }
.empty { text-align: center; padding: 32px 20px; background: var(--sheet); border-radius: 16px; margin-top: 12px; }
.empty img { width: 120px; height: auto; }
.empty h3 { margin-block: 8px; }
.empty p { color: var(--muted); max-width: 26em; margin-inline: auto; }
.empty button { margin-top: 16px; }
.comparison { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; font-size: .875rem; }
.comparison summary { min-height: 44px; display: flex; align-items: center; color: var(--teal); }
.comparison ul { padding: 0; list-style: none; }
.comparison li { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.comparison-link { display: flex; align-items: center; min-height: 44px; color: var(--teal); }

/* Unlock card: the first page of a feed is open; more asks for an email or a Telegram tap. */
.unlock { margin-top: 10px; padding: 16px; border-radius: 14px; background: var(--pocket); border: 1.5px solid var(--ink); }
.unlock h3 { margin-bottom: 4px; }
.unlock-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.unlock-form input { flex: 1 1 220px; min-height: 46px; font-size: 1rem; }
.unlock-form .primary { min-height: 46px; padding-inline: 18px; }
.unlock .small { margin-top: 8px; }
.unlock-note:empty { display: none; }

/* Good to know */
.good-to-know { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.good-to-know h2 { margin-bottom: 8px; }
.help-panel { border-bottom: 1px solid var(--line); }
.help-panel > summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; list-style: none; }
.help-panel > summary::after { content: '+'; margin-left: auto; font-size: 1.25rem; font-weight: 400; }
.help-panel[open] > summary::after { content: '−'; }
.help-content { padding: 0 2px 20px; font-size: .9375rem; color: var(--muted); }
.help-content > p, #source-health > p { max-width: 46em; margin-top: 8px; }
.help-content p a, .policy p a { padding-block: 4px; }
.source-health-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin: 12px 0 0; }
.source-health-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.store-name { color: var(--ink); font-weight: 700; }
.source-country, .source-time { color: var(--muted); }
.source-time { grid-column: 1 / -1; font-size: .8125rem; }
.source-state { text-align: right; font-weight: 700; color: var(--ink); }
.source-state.source-success { color: var(--teal); }
.source-state.source-partial { color: var(--amber-ink); }
.source-state.source-error, .source-state.source-failed { color: var(--red); }
.source-state.source-not_integrated { color: var(--muted); font-weight: 400; }

/* Footer, toast */
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: start; margin-top: 24px; padding-block: 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-about strong { color: var(--ink); font-family: var(--display); font-stretch: 112%; }
.footer-about p { margin-top: 4px; max-width: 34em; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 2px; }
.footer-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 8px; color: var(--teal); font-weight: 700; }
.footer-nav a[aria-current=page] { color: var(--ink); text-decoration: none; }
html:not([data-market="AU"]) .footer-nav a.au-only, html[data-market="AU"] .footer-nav a.sg-only { display: none; }
.footer-meta { grid-column: 1 / -1; font-size: .8125rem; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 20; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 16px; background: var(--ink); color: var(--page); border-radius: 12px; font-size: .875rem; max-width: calc(100% - 32px); text-align: center; transition: opacity .2s ease, transform .2s ease; }
.toast.visible, .toast.show { opacity: 1; transform: translate(-50%, 0); }
.dev-banner { margin: 0; padding: 4px 16px; background: var(--amber-wash); color: var(--amber-ink); font-size: .875rem; text-align: center; }
.dev-banner p { margin: 0; }
.dev-banner a { color: inherit; display: inline-block; padding: 6px 2px; }

/* Help, About, Privacy, Page not found. */
.policy { max-width: 42em; margin: 32px auto 48px; }
.policy h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.policy h2 { margin-top: 28px; }
.policy p, .policy li { margin-top: 12px; }
.not-found { text-align: center; }
.not-found img { display: block; margin: 0 auto 16px; width: 160px; height: auto; }
.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; list-style: none; margin-top: 20px; }
.not-found-links li { margin: 0; }
.not-found-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: var(--r-control); background: var(--pocket); color: var(--ink); font-weight: 700; text-decoration: none; }

/* Product page: one big pocket for the picture, the lowest price, the foil button, then every shop. */
.product-page { padding-block: 4px 40px; }
.crumbs { margin: 8px 0 14px; color: var(--muted); }
.crumbs a { color: var(--teal); }
.product-hero { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.product-picture { width: 100%; aspect-ratio: 1; max-width: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--pocket); border-radius: 14px; border-top: 8px solid var(--lip); }
.product-picture img { width: 100%; height: 100%; object-fit: contain; }
.product-picture img.fallback { width: 120px; height: 120px; opacity: .6; }
.product-copy h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-stretch: 118%; overflow-wrap: anywhere; }
.product-copy .now-tags { margin-top: 8px; }
.product-shop { margin-top: 8px; color: var(--muted); }
.product-price { margin-top: 10px; font-size: 2.25rem; }
.product-live { margin-top: 6px; color: var(--muted); min-height: 1.4em; }
.product-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.product-actions .buy { flex: 0 1 auto; padding-inline: 18px; }
.product-actions .cta { min-height: 48px; }
.variant-list, .shop-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.variant-list li, .shop-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.shop-row { display: flex; flex: 1 1 240px; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; min-height: 32px; }
.shop-row-name { flex: 1; font-weight: 700; }
.shop-row-title { color: var(--muted); }
.small-buy { flex: 0 0 auto; min-height: 44px; padding: 6px 14px; }
.product-section { margin-top: 28px; }
.product-section h2 { margin-bottom: 8px; }
.product-signals { grid-template-columns: 1fr; }
.likely-heading { font-size: 1rem; margin-top: 16px; color: var(--muted); }

/* Stats page */
.stats-page { padding-block: 4px 40px; }
.stats-page section { margin-top: 24px; }
.stats-page h2 { margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.kpi { background: var(--pocket); border-radius: var(--r-pocket); border-top: 6px solid var(--lip); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi strong { font-family: var(--display); font-size: 1.5rem; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .875rem; color: var(--muted); }
.stats-table { width: 100%; border-collapse: collapse; font-size: .9375rem; background: var(--pocket); border-radius: 10px; overflow: hidden; }
.stats-table th, .stats-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.stats-table th { font-size: .8125rem; color: var(--muted); }
.stats-table td:last-child, .stats-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Widths ---------- */
@media (max-width: 1050px) {
  .cards, .loading-state { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; }
  .hero-mascot { width: 160px; }
}
@media (max-width: 760px) {
  .page-width { width: calc(100% - 32px); }
  .site-header { padding-block: 10px 6px; gap: 6px 12px; }
  .brand { font-size: 1.25rem; gap: 8px; }
  .brand-icon { width: 34px; height: 34px; }
  .region { order: 2; }
  .site-nav { order: 3; width: 100%; }
  .hero { grid-template-columns: minmax(0, 1fr) 96px; gap: 8px 12px; padding-top: 6px; }
  .hero-mascot { width: 96px; grid-column: 2; grid-row: 1; align-self: center; }
  .hero-lead { font-size: 1rem; }
  .hero-actions { grid-column: 1 / -1; }
  .hero-actions .cta { flex: 1 1 100%; }
  .hero-text { display: contents; }
  .hero h1 { grid-column: 1; grid-row: 1; align-self: center; }
  .hero-lead, .hero-status, .hero-latency { grid-column: 1 / -1; }
  .feed { scroll-margin-top: 56px; }
  .feed-list { width: 100%; padding: 8px; gap: 8px; }
  .feed-list > li { flex: 0 1 calc(50% - 4px); }
  .now-item { padding: 8px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards, .loading-state { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 8px; }
  .product-title a { min-height: 44px; display: flex; align-items: center; }
  .radar-track, .watch { min-height: 44px; }
  .product-hero { grid-template-columns: 1fr; gap: 14px; }
  .product-picture { max-width: 280px; margin: 0 auto; }
  .product-actions .buy, .product-actions .cta { flex: 1 1 100%; }
  .source-health-list { column-gap: 20px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .footer-nav { justify-content: flex-start; margin-left: -8px; }
}
@media (max-width: 520px) {
  .search-panel { padding: 14px; }
  #query { padding-left: 40px; }
  .search-field svg { left: 12px; width: 18px; height: 18px; }
  #search-submit { min-width: 76px; padding-inline: 12px; }
  .source-health-list { grid-template-columns: minmax(0, 1fr); }
  .pagination { gap: 10px; }
  .pagination button { min-width: 92px; }
}
@media (max-width: 350px) {
  .feed-list > li { flex-basis: 100%; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  #filter-panel > summary svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
