:root {
  --bg: #f7f4ef;
  --bg-2: #efe9e1;
  --card: #ffffff;
  --ink: #1d1916;
  --ink-2: #4a423b;
  --muted: #7a7067;
  --line: #e6dfd5;
  --accent: #e8590c;
  --accent-2: #fd7e14;
  --accent-soft: #fff0e6;
  --on-accent: #ffffff;
  --good: #2b8a3e;
  --good-soft: #e6f7ea;
  --warn: #b35c00;
  --warn-soft: #fff3df;
  --bad: #c92a2a;
  --bad-soft: #fdeaea;
  --img-bg: #ffffff;
  --shadow: 0 1px 2px rgb(40 25 10 / 0.05), 0 4px 16px rgb(40 25 10 / 0.06);
  --shadow-lg: 0 10px 40px rgb(40 25 10 / 0.18);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141110;
    --bg-2: #1c1816;
    --card: #211c19;
    --ink: #f4eee8;
    --ink-2: #d3c9bf;
    --muted: #9d9289;
    --line: #362f2a;
    --accent: #ff7a2e;
    --accent-2: #ff9a52;
    --accent-soft: #3a2416;
    --on-accent: #1a0d05;
    --good: #69db7c;
    --good-soft: #1b2e20;
    --warn: #ffc069;
    --warn-soft: #3a2c14;
    --bad: #ff8787;
    --bad-soft: #3a1c1c;
    --img-bg: #f4f1ec;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 10px 40px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141110;
  --bg-2: #1c1816;
  --card: #211c19;
  --ink: #f4eee8;
  --ink-2: #d3c9bf;
  --muted: #9d9289;
  --line: #362f2a;
  --accent: #ff7a2e;
  --accent-2: #ff9a52;
  --accent-soft: #3a2416;
  --on-accent: #1a0d05;
  --good: #69db7c;
  --good-soft: #1b2e20;
  --warn: #ffc069;
  --warn-soft: #3a2c14;
  --bad: #ff8787;
  --bad-soft: #3a1c1c;
  --img-bg: #f4f1ec;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 10px 40px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Full-height column so the footer sits at the bottom of the window on short pages */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand-mark { color: var(--accent); width: 30px; height: 30px; display: grid; }
.brand-mark svg { width: 30px; height: 30px; stroke: none; } /* logo colours come from the SVG itself */
.brand-name { font-size: 17px; letter-spacing: -0.02em; }
.brand-name b { color: var(--accent); }

.search {
  flex: 1; display: flex; align-items: center; gap: 6px; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 4px 4px 14px; box-shadow: var(--shadow); max-width: 640px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 15px; padding: 8px 4px;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.kbd {
  font: 600 11px/1 ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px;
}
.search:focus-within .kbd { display: none; }
.btn-primary {
  border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 650; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent);
  transition: transform .1s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .7; cursor: progress; }

/* Search suggestions */
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  margin: 0; padding: 6px; list-style: none; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  max-height: min(420px, 60vh); overflow-y: auto; animation: rise .15s both;
}
.suggest li {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 15px; line-height: 1.25;
}
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--bg-2); }
.suggest li svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.suggest .s-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-text b { font-weight: 700; color: var(--ink); }
.suggest .s-text { color: var(--ink-2); }
.suggest .s-hint { color: var(--muted); font-size: 13px; margin-left: 4px; }
.suggest .s-kind {
  font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0;
}
.suggest .s-kind.brand { color: var(--accent); }
.suggest .s-loading { color: var(--muted); font-size: 13px; padding: 6px 10px; cursor: default; }
.suggest .s-loading:hover { background: none; }

.top-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; position: relative;
  transition: background .15s, transform .1s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.035em; margin: 0 auto 12px; max-width: 760px; }
.lead { font-size: 17px; color: var(--ink-2); margin: 0 auto 26px; max-width: 560px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 10px 0; }
.chip-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px;
  font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip .x { opacity: .5; font-size: 12px; }
.hero-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 34px; color: var(--muted); font-size: 13px; }
.hero-stores span { display: inline-flex; align-items: center; gap: 6px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); display: inline-block; flex-shrink: 0; }

/* ---------- Results header ---------- */
.results-head { padding: 26px 0 6px; }
.results-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.results-head h2 q { color: var(--accent); quotes: "“" "”"; }
.results-head p { margin: 2px 0 0; font-size: 14px; }

/* Store bar */
.storebar { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 14px; scrollbar-width: thin; }
.store-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer;
  font-size: 13px; transition: opacity .15s, border-color .15s, background .15s;
}
.store-chip:hover { border-color: var(--c); }
.store-chip.off { opacity: .45; background: transparent; }
.store-chip.off .sdot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.store-chip .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.store-chip .st { color: var(--muted); }
.store-chip .spin {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--c);
  animation: spin .7s linear infinite;
}
.store-chip.err .st { color: var(--bad); }
.store-chip.busy .st { color: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Best deals */
.best { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.deal {
  position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, border-color .15s;
  animation: rise .35s both;
}
.deal:hover { transform: translateY(-2px); border-color: var(--accent); }
.deal::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--k); }
.deal img, .deal .noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: var(--img-bg); flex-shrink: 0; }
.deal .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--k); }
.deal .v { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.deal .t { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.deal .s { font-size: 12px; color: var(--muted); }
.deal.skeleton { min-height: 86px; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.refine {
  flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 40px;
}
.refine:focus-within { border-color: var(--accent); }
.refine svg { width: 16px; height: 16px; color: var(--muted); }
.refine input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; min-width: 0; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 0 12px; height: 34px; border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg svg { width: 16px; height: 16px; display: block; }
.view-toggle button { padding: 0 9px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 36px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s;
}
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sizes { justify-content: flex-start; margin: 12px 0 0; }
.sizes .chip { padding: 4px 11px; font-size: 13px; }
.count-line { font-size: 13px; margin: 14px 0 10px; }

/* ---------- Product cards ---------- */
.results.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card.enter { animation: rise .35s both; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card.best-price { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.card.oos { opacity: .62; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card .img {
  display: block; aspect-ratio: 1; background: var(--img-bg); position: relative;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.card .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .3s; }
.card:hover .img img { transform: scale(1.04); }
.card .tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag.good { background: var(--good); color: #fff; }
.tag.sale { background: var(--bad); color: #fff; }
.tag.oos { background: #444; color: #fff; }
.tag.value { background: #1c7ed6; color: #fff; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650;
  padding: 2px 9px 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--ink);
}
.card .title {
  font-weight: 600; font-size: 14px; line-height: 1.35; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.card .title:hover { color: var(--accent); }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.was { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.size { font-size: 12px; color: var(--muted); margin-left: auto; font-weight: 600; }
.meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.meter .bar { flex: 1; height: 5px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: inherit; background: var(--m, var(--accent)); transition: width .5s; }
.meter b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ship { font-size: 12px; display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.ship svg { width: 14px; height: 14px; flex-shrink: 0; }
.ship.free { color: var(--good); font-weight: 650; }
.ship.unknown { color: var(--warn); }
.ship .tot { font-weight: 700; color: var(--ink); }

.visit-btn {
  margin-top: 6px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: border-color .15s, color .15s, background .15s; padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.visit-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Compare view: one card per product, one row per shop */
.results.compare { display: flex; flex-direction: column; gap: 12px; }
.gcard {
  display: grid; grid-template-columns: 112px 1fr; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.gcard.enter { animation: rise .35s both; }
.gimg { display: block; background: var(--img-bg); border-right: 1px solid var(--line); position: relative; min-height: 112px; }
.gimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.gbody { padding: 12px 14px 10px; min-width: 0; }
.ghead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 8px; }
.gtitle { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.gmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.size-pill { font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink); }
.gfrom { font-weight: 700; color: var(--good); }
.offers { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
/* Every row uses the same column widths (nothing sized by its own content), so columns line up across shops:
   shop | price (+ badge) | €/kg | delivery | link */
.offer {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(170px, 1.2fr) 84px minmax(190px, 2fr) 64px;
  align-items: center; gap: 4px 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.offer > * { min-width: 0; }
.offer:last-child { border-bottom: 0; }
.offer.cheapest { background: linear-gradient(90deg, var(--good-soft), transparent 70%); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.offer.oos { opacity: .6; }
.offer .store-pill { justify-self: start; }
.o-price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.o-price b { font-size: 16px; font-variant-numeric: tabular-nums; min-width: 4.2em; } /* prices start and end at the same x */
.o-price .tag { font-size: 10px; padding: 1px 6px; }
.o-unit { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.o-ship .ship { font-size: 12px; font-variant-numeric: tabular-nums; }
.o-link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: 12px; text-align: right; }
.o-link:hover { text-decoration: underline; }
.gfoot { display: flex; gap: 16px; padding-top: 6px; }
.gfoot .link-btn { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
.gfoot svg { width: 14px; height: 14px; }
.ghist { margin-top: 8px; padding: 10px 12px; background: var(--bg-2); border-radius: 10px; }
.ghist p { margin: 4px 0 0; }
.spark { width: 100%; max-width: 420px; height: 64px; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; }
.spark .low { fill: var(--good); stroke: none; }
.results.compare .card.skeleton { flex-direction: row; min-height: 112px; }
.results.compare .card.skeleton .img { width: 112px; aspect-ratio: auto; }
.results.compare .card.skeleton .body { flex: 1; }

/* List view */
.results.list { display: flex; flex-direction: column; gap: 10px; }
.results.list .card { flex-direction: row; align-items: stretch; }
.results.list .card .img { width: 120px; min-height: 120px; aspect-ratio: auto; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line); }
.results.list .card .img img { padding: 10px; }
.results.list .card .body {
  display: grid; grid-template-columns: 1fr 210px; grid-template-areas: "pill price" "title meter" "title ship" "title add";
  column-gap: 20px; row-gap: 4px; align-items: center;
}
.results.list .store-pill { grid-area: pill; justify-self: start; }
.results.list .title { grid-area: title; align-self: start; min-height: 0; font-size: 15px; }
.results.list .price-row { grid-area: price; margin: 0; justify-content: flex-end; }
.results.list .meter { grid-area: meter; }
.results.list .ship { grid-area: ship; }
.results.list .visit-btn { grid-area: add; margin: 0; }

/* Skeletons */
.skeleton .sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card.skeleton:hover { transform: none; box-shadow: var(--shadow); }
.card.skeleton .img { background: var(--bg-2); }

/* Empty / error */
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 16px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 6px; }
.empty h3 { color: var(--ink); margin: 0 0 4px; }

/* ---------- Footer ---------- */
.foot { margin-top: auto; padding-top: 36px; padding-bottom: 48px; } /* auto: pushed to the bottom on short pages */
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 650; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding-bottom: 16px; }
.store-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13px; border-top: 3px solid var(--c); }
.store-card b { font-size: 14px; }
.store-card a { color: var(--muted); }


.sw-label { font-weight: 600; }
.multi-size { font-size: 11px; color: var(--warn); }
.related-head {
  grid-column: 1 / -1; margin: 18px 0 2px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
}

.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; margin-top: 10px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot-links .link-btn { margin: 0; font-size: 13px; }
.foot-links .powered { margin-left: auto; color: var(--muted); }
.foot-links .powered a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.foot-links .powered a:hover { color: var(--accent); }
.legal-foot { border-top: 1px solid var(--line); margin-top: auto; padding-top: 16px; padding-bottom: 32px; max-width: 760px; } /* same width as .legal */
@media (max-width: 640px) { .foot-links .powered { margin-left: 0; flex-basis: 100%; } }

/* Impressum / Datenschutz */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 64px; }
.legal h1 { font-size: 30px; letter-spacing: -0.02em; margin: 8px 0 18px; }
.legal h2 { font-size: 17px; margin: 26px 0 6px; }
.legal p { color: var(--ink-2); margin: 0 0 10px; }
.legal a { color: var(--accent); }

.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 12px; padding: 0; margin-top: 6px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .best { grid-template-columns: 1fr; }
  .results.list .card .body { grid-template-columns: 1fr; grid-template-areas: "pill" "title" "price" "meter" "ship" "add"; }
  .results.list .price-row { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .kbd { display: none; }
  .btn-primary { padding: 9px 14px; }
  .hero { padding: 32px 0 24px; }
  .results.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .body { padding: 10px; }
  .price { font-size: 19px; }
  .card .title { font-size: 13px; }
  .results.list .card .img { width: 92px; }
  .toolbar .refine { flex-basis: 100%; }
  .gcard { grid-template-columns: 1fr; }
  .gimg { min-height: 0; height: 120px; border-right: 0; border-bottom: 1px solid var(--line); }
  .offer { grid-template-columns: 1fr auto; grid-template-areas: "pill price" "ship ship" "unit link"; gap: 2px 10px; padding: 8px 0; }
  .offer .store-pill { grid-area: pill; }
  /* price stays at the right edge on every row; badges/old price go to its left */
  .o-price { grid-area: price; flex-direction: row-reverse; justify-content: flex-start; }
  .o-price b { min-width: 0; }
  .o-unit { grid-area: unit; text-align: left; }
  .o-ship { grid-area: ship; }
  .o-link { grid-area: link; justify-self: end; }
  .best { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .deal { flex: 0 0 82%; scroll-snap-align: start; }
}
