:root {
  color-scheme: light;
  --navy: #0e2a47;
  --navy-2: #173a5e;
  --green: #2fdc9b;
  --green-ink: #0b6b4a;
  --green-bg: #e3f7ef;
  --amber-ink: #7a4b00;
  --amber-bg: #fdf0d5;
  --grey-ink: #46525f;
  --grey-bg: #e9edf1;
  --ink: #15202b;
  --muted: #4f5d6b;
  --line: #d9e0e7;
  --bg: #f5f7f9;
  --card: #ffffff;
  --link: #0b5cad;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Armenian", "Noto Sans",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* One container for the header, the footer and every page, so the logo lines up with the content.
   Pages of text keep a reading column, and the product page its own, both from the left edge. */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.wrap-text > * { max-width: 760px; }

a { color: var(--link); }

:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.top :focus-visible { outline-color: var(--green); }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
}
.skip:focus { top: 8px; }

/* Header */
.top { background: var(--navy); color: #fff; }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; min-height: 52px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}
.mark { width: 34px; height: 34px; flex: none; }
.mark .ring { fill: none; stroke: #4f7ba6; stroke-width: 1.2; }
.mark .sweep { fill: var(--green); opacity: .45; }
.mark .blip { fill: var(--green); }
.mark .pct { fill: var(--navy); stroke: #fff; stroke-width: 1.7; }
.mark .slash { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }

/* On a phone the search box takes its own full-width row under the name and languages. */
.site-search { display: flex; order: 3; flex: 1 1 100%; gap: 6px; padding-bottom: 8px; }
.site-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  text-overflow: ellipsis;
}
.site-search .button { flex: none; background: var(--green); color: var(--navy); }

/* Suggestions under a search box while typing (DESIGN 6.8). Only suggest.js adds them. */
.has-suggest { position: relative; }
.suggest-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(14 42 71 / 18%);
  text-align: left;
}
.site-search .suggest-list { top: calc(100% - 4px); }
.suggest-list[hidden] { display: none; }
.suggest-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 6px 12px;
  color: inherit;
  text-decoration: none;
}
.suggest-list li.is-active a, .suggest-list a:hover { background: var(--grey-bg); }
.suggest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-detail { color: var(--muted); font-size: 13.5px; }
.suggest-all { border-top: 1px solid var(--line); }
.suggest-all a { color: var(--link); font-weight: 600; }
.suggest-none { padding: 12px; color: var(--muted); }

.langs { display: flex; gap: 2px; }
.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 8px;
  color: #d5e2ef;
  font-size: 15px;
  text-decoration: none;
}
.langs a[aria-current] { background: var(--navy-2); color: #fff; font-weight: 700; }

.main-nav {
  display: flex;
  gap: 4px 18px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d5e2ef;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.main-nav a[aria-current] { color: #fff; border-bottom-color: var(--green); }

.review-note {
  margin: 12px auto 0;
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--amber-ink);
  background: var(--amber-bg);
  font-size: 14px;
  line-height: 1.45;
}

/* Content */
main { padding-top: 20px; padding-bottom: 36px; }

h1 { margin: 4px 0 8px; font-size: 30px; line-height: 1.2; color: var(--navy); }
h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; color: var(--navy); }
h3 { margin: 18px 0 6px; font-size: 17px; line-height: 1.35; color: var(--navy); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }
main > section { margin-top: 30px; scroll-margin-top: 12px; }

.lead { color: var(--muted); font-size: 18px; }
.meta { color: var(--muted); font-size: 15px; }

.callout {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
}
.callout h2 { font-size: 18px; }
.callout p:last-child { margin-bottom: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-size: 14.5px;
  line-height: 1.25;
  text-decoration: none;
}

.defs { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.defs > div { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 10px 14px; }
.defs-wide > div { grid-template-columns: 58px 1fr; }
.defs > div + div { border-top: 1px solid var(--line); }
.defs dt { font-weight: 700; color: var(--navy); }
.defs dd { margin: 0; min-width: 0; }

.rules { list-style: none; padding: 0; counter-reset: rule; }
.rules > li {
  counter-increment: rule;
  position: relative;
  margin-bottom: 10px;
  padding: 12px 14px 4px 46px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rules > li::before {
  content: counter(rule);
  position: absolute;
  left: 14px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grey-bg);
  color: var(--grey-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.rules p { margin-top: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 6px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(255 255 255 / .75);
  font-size: 12px;
  line-height: 1;
}
.chip-real_deal, .chip-real_deal_interim { background: var(--green-bg); color: var(--green-ink); }
.chip-weak_deal { background: var(--amber-bg); color: var(--amber-ink); }
.chip-not_verified { background: var(--grey-bg); color: var(--grey-ink); }
.chip-inflated_discount { background: #fff; color: var(--navy); border-color: var(--navy); }

.tag {
  display: inline-block;
  padding: 0 8px;
  background: var(--grey-bg);
  color: var(--grey-ink);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: middle;
}
.tag-open { background: var(--amber-bg); color: var(--amber-ink); }

.formula {
  padding: 2px 14px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.formula h3 { margin-top: 12px; }

.label-guide { list-style: none; margin: 0; padding: 0; }
.label-guide li { padding: 10px 0; border-top: 1px solid var(--line); }
.label-guide li:first-child { border-top: 0; }
.label-guide p { margin: 6px 0 0; }

.fold { margin-top: 18px; border-top: 1px solid var(--line); }
.fold > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "\25B8"; flex: none; color: var(--navy); font-size: 18px; }
.fold[open] > summary::before { content: "\25BE"; }
.fold > summary h2 { margin: 0; }
.fold > summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.data-cards { display: grid; gap: 10px; }
.data-cards article {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.data-cards h3 { margin: 0 0 6px; }
.data-cards dl { margin: 0; }
.data-cards dl > div { margin-top: 4px; }
.data-cards dt { display: inline; color: var(--muted); font-weight: 600; }
.data-cards dt::after { content: ": "; }
.data-cards dd { display: inline; margin: 0; }

.code-label { margin-bottom: 4px; color: var(--muted); font-size: 15px; }
.code {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--navy);
  color: #eaf2fa;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code code { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; }

/* Home */
/* On a phone the hero is kept short, so the first deal starts on the first screen. */
.hero { margin-top: -8px; padding: 0 0 4px; }
.hero h1 { margin: 0 0 4px; font-size: 28px; }
.hero .lead { margin-bottom: 8px; font-size: 15px; line-height: 1.4; }
.hero-search { display: flex; gap: 6px; }
.hero-search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--navy);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  text-overflow: ellipsis;
}
.hero-search .button { flex: none; min-height: 48px; }
.hero-hint { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
/* The chooser's way in: a plain link, so the hero keeps a single button (UX review). */
.hero-choose { margin: 2px 0 0; }
.hero-choose a { display: inline-block; padding: 8px 0; font-weight: 600; }
/* Category shortcuts: one row that scrolls sideways on a phone, wrapping where there is room. */
.chips { margin: 6px 0 0; }
.chips + section { margin-top: 12px; }
.chips + section h2 { margin-bottom: 6px; }
.chips ul {
  display: flex;
  gap: 8px;
  margin: 0 -3px;
  padding: 3px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips li { flex: none; margin: 0; }
.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}
.chips a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.home-more { margin: 14px 0 0; }
.home-extra { margin-top: 30px; }
.channel-block { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.channel-block p { max-width: 60ch; }
.channel-block p:last-child { margin-bottom: 0; }
.home-extra .link-cards { margin-top: 12px; }
.soon {
  display: inline-block;
  padding: 6px 12px;
  background: var(--green-bg);
  color: var(--green-ink);
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}
.link-cards { display: grid; gap: 10px; list-style: none; margin: 16px 0 0; padding: 0; }
.link-cards li { margin: 0; }
.link-cards a {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.link-cards strong { display: block; color: var(--navy); }
.link-cards span { color: var(--muted); font-size: 15px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.button-small { min-height: 44px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
.button-quiet { background: var(--card); color: var(--navy); border: 1px solid var(--line); }
button.button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* Deals */
.wrap-wide { max-width: 1180px; }
.sr-only, .sort-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* The checkbox that opens the Filters sheet sits inside the bar, well clear of the top edge. When
   an element that is off the screen, or inside the 12px scroll padding at the top (the -1px
   margin above put it half outside), gets focus, the browser scrolls the page to centre it. That
   moved the list by hundreds of pixels every time the sheet opened. */
.filters-toggle { top: 24px; left: 16px; margin: 0; }
.deals-lead { margin-bottom: 12px; font-size: 16px; }
.deals-layout { display: block; }
.deal-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0 -16px 12px;
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.filters-button { grid-column: 2; grid-row: 1; }
.sort-field { grid-column: 1; grid-row: 1; }
.deal-bar select, .filters input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}
.deal-bar input[type="search"] { text-overflow: ellipsis; }
/* The sort select shows its chosen option in full: no side padding beyond the arrow's. */
.deal-bar .sort-field select { padding-inline: 10px 4px; text-overflow: ellipsis; }
.sort-field { min-width: 0; }
.filters-button { cursor: pointer; white-space: nowrap; }
.filters-count:not(:empty) { margin-inline-start: .3em; }
#filters-open:focus-visible + .filters-button { outline: 3px solid var(--link); outline-offset: 2px; }
.filters {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  max-height: 85vh;
  padding: 12px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgb(14 42 71 / .28);
}
.filters:focus { outline: none; }
#filters-open:checked ~ .filters { display: block; }
/* The dimmed page behind the open sheet: a tap on it closes the sheet, and the page under it
   stays where it was (the same checkbox does both, so it also works without the script). */
.filters-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  display: none;
  background: rgb(14 42 71 / .5);
  touch-action: none;
  cursor: pointer;
}
#filters-open:checked ~ .filters-backdrop { display: block; }
html:has(#filters-open:checked) { overflow: hidden; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--navy);
  font-size: 26px;
  cursor: pointer;
}
.filters fieldset { margin: 12px 0 0; padding: 0; border: 0; }
.filters legend, .field { color: var(--navy); font-size: 15px; font-weight: 700; }
.field { display: block; margin-top: 12px; }
.filters .field select {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 10px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15.5px; line-height: 1.25; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-fields label { color: var(--muted); font-size: 14px; }
/* Spec filters (plan item 13): short choices side by side, each with how many results it gives. */
.spec-options { display: flex; flex-wrap: wrap; gap: 0 18px; }
.spec-options .check { gap: 8px; }
.spec-count { color: var(--muted); font-size: 14px; }
.spec-filter[hidden], .spec-filter [hidden], .spec-note[hidden] { display: none; }
.spec-note { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.filters-actions {
  position: sticky;
  bottom: -16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 14px 0 -16px;
  padding: 10px 0 16px;
  background: var(--card);
}
.filters-actions .button { justify-content: center; }

.deal-results[aria-busy="true"] { opacity: .55; }
/* Label choice above the list: one radio group drawn as chips. The radio itself is hidden, the
   chosen chip gets a thick navy outline and a check mark, so colour is not the only sign.
   On a phone the chips stay on one row that scrolls sideways, like the category chips: the
   neutral label names (DESIGN C-12) wrapped to four rows and pushed the first deal off the first
   screen. The 6px padding keeps the focus ring and the chosen outline inside the scrolling box. */
.label-chips { display: flex; flex-wrap: nowrap; gap: 8px; margin: -6px -6px 6px; padding: 6px; border: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
/* Each chip holds its hidden radio: without this the radios sat outside the scrolling row and made
   the page 782px wide on a 375px phone. */
.label-choice { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.label-choice .chip { min-height: 44px; padding: 4px 14px 4px 8px; white-space: nowrap; }
.label-choice .chip-all { padding-inline-start: 14px; background: var(--card); color: var(--navy); border-color: var(--line); }
.label-choice input:checked + .chip { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.label-choice input:checked + .chip::after { content: "✓"; margin-inline-start: 2px; }
.label-choice input:focus-visible + .chip { outline: 3px solid var(--link); outline-offset: 3px; }
.deal-count { margin-bottom: 10px; color: var(--muted); font-size: 15px; }
.notice {
  padding: 10px 14px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  border-radius: 10px;
  font-size: 15px;
}
/* minmax(0, 1fr): a long word or button row can never make a card wider than the screen. */
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.deal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
/* The image sits beside the store, title and price; everything else runs at full card width. */
.deal-top { display: flex; align-items: flex-start; gap: 12px; }
.deal-head { flex: 1 1 auto; min-width: 0; }
.deal-media { flex: none; width: 80px; height: 80px; overflow: hidden; background: #fff; border-radius: 8px; }
.deal-media img { display: block; width: 80px; height: 80px; object-fit: contain; }
.deal-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.deal-body p, .deal-head p { margin: 0 0 6px; }
.deal-store { color: var(--muted); font-size: 15px; font-weight: 600; }
/* The store's code, when another listing there has the same title (DESIGN 8.4). */
.deal-code { margin: -2px 0 6px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.deal-title {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.deal-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; line-height: 1.3; }
.deal-head .deal-price { margin-bottom: 0; }
.deal-price strong { color: var(--navy); font-size: 22px; }
.deal-price s { color: var(--muted); font-size: 15px; }
/* The store's own word for its crossed-out price, such as "Միջին գին" (web/old_price.py). */
.old-word { color: var(--muted); font-size: 14px; }
.deal-claimed { color: var(--muted); font-size: 15px; }
.deal-measured { font-size: 15px; font-weight: 600; }
.deal-stale { color: var(--grey-ink); font-size: 15px; font-weight: 600; }
.deal-reason { color: var(--muted); font-size: 15px; line-height: 1.4; }
.deal-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; }
.deal .tag { font-size: 15px; }
.tag-good { background: var(--green-bg); color: var(--green-ink); }
/* A badge explains itself: its name is the summary, its sentence opens below it. */
.badge > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  cursor: pointer;
  list-style: none;
}
.badge > summary::-webkit-details-marker { display: none; }
.badge > summary::after { content: "+"; font-weight: 700; }
.badge[open] > summary::after { content: "\2212"; }
.badge[open] { flex: 1 1 100%; }
.badge > p { margin: 4px 0 2px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.deal-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}
.deal-foot .meta { margin: 0; font-size: 14px; line-height: 1.35; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 16px; }
/* Numbered pages take the first row alone; 7 items of 44px fit a 375px phone. */
.pager-pages { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--link); font-weight: 600; text-decoration: none; }
.pager-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager-gap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--muted); }
.pager a[rel="next"] { justify-self: end; }
.pager a[rel="prev"] { justify-self: start; }
.deal-grid-home { margin-bottom: 20px; }

.deal-title a { color: inherit; text-decoration: none; }
.deal-title a:hover { color: var(--link); text-decoration: underline; }
/* The stock line and the Share icon share a row; the line wraps before it pushes the icon out.
   The row anchors the Share panel, so it opens right under the icon, over the two buttons. */
.deal-meta { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.deal-meta .meta { flex: 1 1 auto; min-width: 0; }
.deal-meta .share { flex: none; margin-inline-start: auto; }
/* Two buttons share the row and stretch to fill it; on a narrow phone the second one wraps. */
.deal-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-actions > .button { flex: 1 1 auto; justify-content: center; }

/* Share (UI-2). Where the browser has no share sheet, the button opens this panel. It hangs below
   the foot of the card or product, at its right edge and never wider than it, so it can't run off
   a narrow screen. It sits above the cards below it and under the sticky sort bar (z-index 5). */
.deal-foot { position: relative; }
.share > summary { gap: 6px; cursor: pointer; list-style: none; }
.share > summary::-webkit-details-marker { display: none; }
.share-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.share-compact > summary { justify-content: center; width: 44px; padding: 0; }
.share[open] > summary { border-color: var(--navy); }
.share-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(14 42 71 / .18);
}
/* Copy link needs share.js, which sets share-ready. Without it the panel offers Telegram only. */
.share-copy { display: none; }
.share-ready .share-copy { display: inline-flex; }
button.button-quiet { border: 1px solid var(--line); }
.share-status { color: var(--green-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* Product page */
.wrap-product > * { max-width: 980px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-bottom: 8px; color: var(--muted); font-size: 14.5px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.product-head {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.product-media { justify-self: center; width: 132px; height: 132px; overflow: hidden; background: #fff; border-radius: 8px; }
.product-media img { display: block; width: 132px; height: 132px; object-fit: contain; }
.product-info { min-width: 0; }
.product-info p { margin: 0 0 8px; }
.product-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.product-model { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.product-price strong { font-size: 26px; }
.product-reason { font-size: 15px; }
.product-foot { margin-top: 10px; }
.product-cheaper a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  background: var(--green-bg);
  color: var(--green-ink);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.product-cheaper a:hover { text-decoration: underline; }
.report-link, .correction-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-size: 14.5px; }
.report-link { margin-left: 10px; }

/* Version switcher (improvement plan item 10): one link per version of the model, the page's own
   filled in. On a phone the links wrap onto a second line instead of hiding past the edge. */
.versions { margin-top: 18px; }
.versions h2 { margin-bottom: 8px; font-size: 17px; }
.versions-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.versions-list li { margin: 0; }
.version {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 88px;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
  line-height: 1.3;
  text-decoration: none;
}
.version:hover { border-color: var(--navy); }
.version-name { font-weight: 700; }
.version-price { color: var(--muted); font-size: 14px; white-space: nowrap; }
.version[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.version[aria-current] .version-price { color: #fff; }

/* On a phone the chosen store's button stays on screen. The bar comes after the footer, so at the
   end of the page it takes its own place and never covers the footer. */
.buy-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgb(14 42 71 / 10%);
}
.buy-bar-offer { display: flex; flex-direction: column; min-width: 0; margin: 0; line-height: 1.3; }
.buy-bar-store { overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.buy-bar-offer strong { color: var(--navy); font-size: 18px; white-space: nowrap; }
.buy-bar-offer .deal-stale { margin: 0; font-size: 14px; }
.buy-bar .button { flex: none; }

.compare { width: 100%; margin-top: 8px; border-collapse: collapse; }
.compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.compare tbody, .compare tr, .compare td, .compare tbody th { display: block; }
.compare-row {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  margin-top: 8px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.compare-row.is-focus { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--navy); }
.compare td, .compare tbody th { min-width: 0; padding: 0; font-weight: 400; text-align: left; }
.compare .cell-store { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 700; color: var(--navy); }
.compare .cell-store a { display: inline-flex; align-items: center; min-height: 28px; font-weight: 700; }
.compare .cell-price { color: var(--navy); font-size: 18px; text-align: right; white-space: nowrap; }
.compare .cell-gap { display: block; color: var(--muted); font-size: 13.5px; font-weight: 400; }
.compare .cell-claimed, .compare .cell-label, .compare .cell-stock, .compare .cell-warranty { grid-column: 1 / -1; font-size: 14.5px; }
.compare .cell-claimed.is-empty { display: none; }
.compare td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
.compare .cell-label[data-label]::before { content: none; }
.compare .cell-checked { color: var(--muted); }
.compare .cell-checked::before { content: " · "; }
.compare s { color: var(--muted); }
.compare .cell-link { grid-column: 1 / -1; justify-self: end; margin-top: 4px; }
.compare-more { margin: -2px 0 0; padding: 0 12px 2px; }
.compare-more summary { display: flex; align-items: center; min-height: 44px; color: var(--link); font-size: 14.5px; cursor: pointer; }
.compare-more ul { margin: 0 0 8px; padding: 0; list-style: none; font-size: 14.5px; }
.compare-more li { margin: 0 0 8px; }
.compare-more .meta { display: block; font-size: 13.5px; }

/* A store's conditional offers (DC-6): muted text naming them as conditions, never like a price. */
.offer-notes { margin: 0 0 6px; color: var(--muted); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.offer-notes p, .offer-notes ul { margin: 0; }
.offer-notes ul { padding: 0; list-style: none; }
.offer-notes .offer-notes-lead { font-weight: 600; }
.offer-notes .offer-notes-note { margin-top: 4px; }
/* On a card: one full-width line under the price that opens to the store's words (DESIGN 8.4). */
.offer-notes-card > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  cursor: pointer;
  list-style: none;
}
.offer-notes-card > summary::-webkit-details-marker { display: none; }
.offer-notes-card > summary::after { content: "+"; font-weight: 700; }
.offer-notes-card[open] > summary::after { content: "\2212"; }
.offer-notes-card > summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.offer-notes-card > ul { margin: 2px 0 0; }
.product-info .offer-notes { margin-bottom: 8px; }
.compare-offers { padding: 6px 12px 0; }
.compare-offers .offer-notes { margin: 0; font-size: 14.5px; }

.chart-figure { margin: 8px 0 0; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.chart, .chart-lg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-lg { display: none; } /* the wide drawing is for desktop only */
.chart text, .chart-lg text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-axis-y text { text-anchor: end; }
.chart-axis-x text { text-anchor: middle; }
.chart-grid line { stroke: #e7ebef; stroke-width: 1; }
.chart-axis-x line { stroke: #b9c3cc; stroke-width: 1; }
.hue-0 { color: #2a78d6; }
.hue-1 { color: #eb6834; }
.hue-2 { color: #1baf7a; }
.hue-3 { color: #eda100; }
.hue-4 { color: #e87ba4; }
.hue-5 { color: #6250d6; }
.series-line { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.pt { fill: currentColor; stroke: var(--card); stroke-width: 1.5; paint-order: stroke; }
.pt-archive { fill: var(--card); stroke: currentColor; stroke-width: 2; }
.pt-active { stroke: var(--ink); stroke-width: 2; }
.series-dim { opacity: .45; }
.series-focus .series-line { stroke-width: 2.75; }
.mark { fill: none; stroke: var(--navy); stroke-width: 1.25; }
.mark-old { stroke-dasharray: 7 4; }
.mark-average { stroke-dasharray: 2 3; stroke-width: 1.75; }
.mark-low { stroke: var(--muted); stroke-dasharray: 9 3 2 3; }
.mark-start { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart-cross { stroke: var(--muted); stroke-width: 1; visibility: hidden; pointer-events: none; }
.chart-cross.is-on { visibility: visible; }
.chart-readout { margin: 6px 0 0; padding: 6px 10px; background: var(--grey-bg); color: var(--ink); border-radius: 8px; font-size: 14px; line-height: 1.4; white-space: pre-line; }
.chart-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.chart-figure figcaption p { margin: 0 0 6px; }
.chart-legend { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; padding: 0; list-style: none; color: var(--ink); }
.chart-legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.key { flex: none; width: 24px; height: 12px; overflow: visible; }
.key .pt { stroke-width: 1; }
.chart-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--muted); border-radius: 50%; background: var(--muted); }
.dot-hollow { margin-left: 10px; background: var(--card); }
.chart-table { margin-top: 10px; }
.chart-table summary { display: flex; align-items: center; min-height: 44px; color: var(--link); font-size: 15px; cursor: pointer; }
.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll th, .table-scroll td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-scroll th { color: var(--muted); font-weight: 600; }

.evidence { margin: 8px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.evidence > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 9px 14px; font-size: 15px; }
.evidence > div + div { border-top: 1px solid var(--line); }
.evidence dt { color: var(--muted); }
.evidence dd { margin: 0 0 0 auto; font-weight: 600; text-align: right; }
.evidence-flags { padding-left: 20px; font-size: 15px; }
.evidence-foot { margin-top: 10px; }

@media (min-width: 720px) {
  .product-head { grid-template-columns: 180px minmax(0, 1fr); padding: 18px; }
  .product-media, .product-media img { width: 180px; height: 180px; }
  .product-title { font-size: 26px; }
  .compare { display: table; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
  .compare thead { position: static; display: table-header-group; width: auto; height: auto; clip-path: none; white-space: normal; }
  .compare tbody { display: table-row-group; }
  .compare tr, .compare-row { display: table-row !important; }
  .compare .cell-claimed.is-empty { display: table-cell; }
  .compare td, .compare thead th, .compare tbody th { display: table-cell; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; text-align: left; }
  .compare thead th { color: var(--muted); font-size: 13.5px; font-weight: 600; }
  .compare .cell-store { display: table-cell; }
  .compare .cell-store .tag { margin-left: 6px; }
  .compare td[data-label]::before { content: none; }
  .compare .cell-price { font-size: 16px; text-align: left; }
  .compare .cell-checked { display: block; font-size: 13px; }
  .compare .cell-checked::before { content: none; }
  .compare .cell-link { margin: 0; text-align: right; }
  .compare-row.is-focus { box-shadow: inset 3px 0 0 var(--navy); }
  .compare-more { padding: 0; }
  .compare-more td { padding: 0 10px; }
  .compare-offers { padding: 0; }
  .compare-offers td { padding: 0 10px 10px; }
  .compare-row:has(+ .compare-offers) > * { border-bottom-color: transparent; }
  .compare-row.is-focus + .compare-offers { box-shadow: inset 3px 0 0 var(--navy); }
  .chart { display: none; }
  .chart-lg { display: block; }
  .chart-legend { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  .chart-legend li { display: inline-flex; }
  .evidence { max-width: 680px; }
  .buy-bar { display: none; }
}

@media print {
  .buy-bar { display: none; }
}

/* Footer */
.foot { padding: 20px 0 24px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot p { margin-bottom: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

.search-heading { font-size: 24px; }
/* On a phone each group is one row that scrolls sideways, so the first result stays on screen. */
.search-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0; }
.search-tools .toc {
  flex: 1 1 100%;
  flex-wrap: nowrap;
  min-width: 0;
  margin: 0 -3px;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.search-tools .toc a { flex: none; font-size: 15px; white-space: nowrap; }
.search-tools .toc a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
/* Spec filters on the search page (plan item 13): folded, and each row wraps once opened. */
.spec-details { flex: 1 1 100%; }
.spec-details summary { cursor: pointer; list-style: none; }
.spec-details summary::-webkit-details-marker { display: none; }
.search-tools .spec-links { flex-wrap: wrap; margin-top: 10px; overflow: visible; }
.spec-links .toc-label { flex: 1 1 100%; color: var(--navy); font-size: 15px; font-weight: 700; }
.toc a .spec-count { margin-inline-start: .3em; }
.search-tools .toc a[aria-current] .spec-count { color: inherit; }
.spec-details .spec-note { margin: 10px 0 0; }
/* The search page's price range (DESIGN 8.4): From, To and the button on one line when they fit. */
.price-range { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; margin-top: 10px; }
.price-range .toc-label { flex: 1 1 100%; color: var(--navy); font-size: 15px; font-weight: 700; }
.price-range label { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.price-range input { width: 9em; }

/* Chooser (improvement plan item 14): one column on a phone, every answer a tap target. */
.choose-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-inline-end: 8px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.choose-step h2 { font-size: 20px; }
.choose-types { margin: 6px 0 0; padding: 0; list-style: none; }
.choose-types li { margin: 0; }
.choose-count { margin-inline-start: 4px; color: var(--muted); font-size: 13px; }
.choose-type { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 4px 0 10px; }
.choose-type a { display: inline-flex; align-items: center; min-height: 44px; }
.choose-form {
  display: grid;
  gap: 10px;
  max-width: 560px;
  padding: 14px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.choose-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.choose-form legend, .choose-budget { margin-bottom: 4px; padding: 0; color: var(--navy); font-weight: 700; }
.choose-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 0 14px; }
.choose-form .meta { margin: 0; font-size: 14px; }
.choose-budget-field { display: flex; align-items: center; gap: 8px; }
.choose-budget-field input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}
.choose-budget-field span { color: var(--muted); font-weight: 600; }
.choose-form .button { justify-content: center; }

@media (min-width: 720px) {
  .sort-text { position: static; display: block; width: auto; height: auto; margin: 0 0 2px; overflow: visible; clip-path: none; white-space: normal; color: var(--muted); font-size: 14px; }
  h1 { font-size: 36px; }
  .hero { margin-top: 0; padding-top: 4px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 18px; }
  .chips + section { margin-top: 30px; }
  .hero-search { max-width: 640px; }
  .chips ul { flex-wrap: wrap; overflow: visible; }
  .label-chips { flex-wrap: wrap; overflow: visible; }
  .search-heading { font-size: 30px; }
  .search-tools .toc { flex: 0 1 auto; flex-wrap: wrap; overflow: visible; }
  .site-search { order: 0; flex: 1 1 280px; max-width: 460px; padding-bottom: 0; }
  .site-search .suggest-list { top: calc(100% + 4px); }
  .link-cards { grid-template-columns: repeat(3, 1fr); }
  .home-extra:has(.channel-block) { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; align-items: stretch; }
  .home-extra:has(.channel-block) .link-cards { grid-template-columns: 1fr; margin-top: 0; }
  .data-cards { grid-template-columns: repeat(3, 1fr); }
  .data-cards dt, .data-cards dd { display: block; }
  .data-cards dt::after { content: ""; }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-store { font-size: 14px; }
  .deal-reason, .badge > p { font-size: 14.5px; }
}

@media (min-width: 1000px) {
  .deals-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
  .deal-bar { display: block; position: static; margin: 0; padding: 0; background: none; border: 0; }
  .sort-field { display: block; margin-top: 8px; }
  #filters-open, .filters-button, .filters-close { display: none; }
  /* Beside the list the filters are not a sheet, so nothing is dimmed or locked. */
  #filters-open:checked ~ .filters-backdrop { display: none; }
  html:has(#filters-open:checked) { overflow: visible; }
  .filters {
    position: static;
    display: block;
    max-height: none;
    margin-top: 10px;
    padding: 12px 14px 14px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
  }
  /* Only here is the brand list a box of its own: on a phone it would be a scroll area inside the
     scrolling sheet, which is hard to use by touch. */
  .brand-list { max-height: 220px; overflow-y: auto; }
  .filters-actions { position: static; margin: 14px 0 0; padding: 0; }
  .deal-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .deal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Beside the filter column the list is about 890px wide. Three cards there were 278px wide and
     597px tall, taller than on a phone; two are 423px wide, about 400px tall, and the list is
     shorter. Home and search have no filter column and keep three. */
  .deals-layout .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
