/* synthbid.css: what the reference stylesheet (site.css) has no rule for. Loaded after site.css; uses its tokens. */

/* contrast (shared/tools/site-clone/contrast.js, WCAG AA): the violet-tinted canvas needs a darker small-print grey than the
   reference's #6b7280, the red was-price needs a deeper red, and screen-reader text gets an explicit pair so it never reads as white on white */
:root { --ink-subtle: #5D6470; --danger: #C62828; }
.sr { color: var(--ink); background: var(--surface); }

/* Editor score in place of the reference's star ratings */
.syn-score { display: inline-flex; align-items: baseline; gap: 1px; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--brand); color: var(--on-brand); font-variant-numeric: tabular-nums; }
.syn-score b { font: 800 14px/1.3 var(--font-sans); }
.syn-score span { font-size: 11px; font-weight: 600; opacity: .85; }
.syn-score__word { font-size: 13px; font-weight: 700; color: var(--ink); }
.syn-mini { display: inline-block; min-width: 30px; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-strong) !important; font-size: 12px; text-align: center; box-shadow: inset 0 0 0 1px var(--brand-line); }
.sd-card__rating span { font-size: 11px; color: var(--ink-subtle); }

/* header extras: link inside the disclosure line */
.sd-disclosure a { color: var(--brand); font-weight: 600; margin-left: 4px; }

/* category page: lead paragraph and "how to choose" */
.syn-lead { max-width: 820px; margin-top: var(--space-4); font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.syn-choose__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin-bottom: var(--space-5); }
.syn-choose__item { padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.syn-choose__item h3 { font: 800 15px/1.3 var(--font-sans); margin-bottom: var(--space-2); }
.syn-choose__item p { font-size: 13px; line-height: 1.6; color: var(--ink-muted); }

/* review page: score bars, body sections, FAQ, deal button in the buy box */
.syn-scores__list dd { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.syn-scores__list dd b { font: 800 18px var(--font-sans); }
.syn-scores__list dd span { font-size: 12px; color: var(--ink-subtle); }
.syn-scores__list dd i { flex-basis: 100%; height: 6px; margin-top: var(--space-2); border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--brand) var(--w), var(--sunken) var(--w)); }
.syn-body { max-width: none; margin-top: var(--space-8); }
.syn-body h2 { margin-top: var(--space-6); }
.syn-body p, .syn-body li { font-size: 15px; line-height: 1.65; color: var(--ink); margin-bottom: var(--space-3); }
.syn-body ul, .syn-body ol { padding-left: var(--space-5); margin: 0 0 var(--space-3); }
.syn-body a { color: var(--brand); font-weight: 600; }
.syn-faq__item { margin-bottom: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.syn-faq__item summary { padding: var(--space-4) var(--space-5); font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
.syn-faq__item summary::-webkit-details-marker { display: none; }
.syn-faq__item summary::after { content: "+"; position: absolute; right: var(--space-5); top: 50%; transform: translateY(-50%); font: 700 18px var(--font-mono); color: var(--brand); }
.syn-faq__item[open] summary::after { content: "–"; }
.syn-faq__item p { padding: 0 var(--space-5) var(--space-4); font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.syn-dealbtn { display: flex; justify-content: center; margin-top: var(--space-3); }

/* deal page: best for / skip if under the facts */
.syn-dealfit { margin: var(--space-4) 0; }

/* site pages: lists and contact form in the prose layout */
.prose p { line-height: 1.65; margin-bottom: var(--space-3); }
.prose ul, .prose ol { padding-left: var(--space-5); }
.prose a { color: var(--brand); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.prose .nf-form-cont input:not([type=button]):not([type=submit]):not([type=checkbox]), .prose .nf-form-cont textarea { width: 100%; padding: var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); font: inherit; }
.prose .nf-form-cont input[type=button], .prose .nf-form-cont input[type=submit] { padding: var(--space-3) var(--space-6); border: 0; border-radius: var(--radius-pill); background: var(--brand); color: var(--on-brand); font: 700 14px var(--font-sans); cursor: pointer; }

@media (max-width: 900px) {
	.syn-choose__grid { grid-template-columns: minmax(0, 1fr); }
}

/* spacing the reference sets with inline style="" attributes, as classes (reference html: margin values copied) */
.wrap > .sd-secbar + p.muted, .wrap > h1.sd-secbar__title + p.muted { margin: 6px 0 14px; }
.wrap > p.muted + .sd-filterstrip, .wrap > .sd-filterstrip { margin-top: 12px; }
.verdict { margin-top: 24px; }
.verdict .gfit { margin: 14px 0 0; }
.gsection > h2.sd-secbar__title { margin-bottom: 12px; }
.gsection > h2#bd-title, .gsection > h2#br-title { margin-bottom: 14px; }
.gsection > .ggrid { margin-top: 14px; }
.gsection > .cmp, .wrap > .gsection .sd-secbar + .cmp { margin-top: 12px; }
.wrap > .tgrid, .wrap > .gpaths { margin-top: 16px; }
.wrap > .ggrid { margin-top: 18px; }
.gpath .muted.small { margin: 8px 0 0; font-weight: 700; color: var(--ink); }
.cside .gdeal__actions { margin-top: 8px; }
.prose .syn-back { margin-top: 28px; }

/* long spec tables show every row (the reference caps .cmp at 80vh; our categories have up to 11 rows) */
.cmp { max-height: none; }
.cmp td.syn-na { color: var(--ink-subtle); }

/* deal page: the grey image panel runs the full height of the card */
.dcard__media { align-self: stretch; display: flex; align-items: center; }

/* review page between 901 and 1024px: keep the buy box beside the review (our reviews are long) */
@media (max-width: 1024px) and (min-width: 901px) {
	.rv { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); }
	.rv__buy { position: sticky; top: var(--space-4); }
}

/* small fixes */
.tcard__badge, .gcard__size, .cmp__pill { white-space: nowrap; }
.sd-action .sd-ico { color: var(--highlight); }
.sd-search--inline { height: 44px; max-width: 520px; flex: none; }

.wrap > .cmp { margin-top: 16px; }

/* home categories: five on one row from tablet up (the reference has four). A fifth of the row is too narrow for
   picture-beside-text, so the picture sits above the name and the count stays on one line; phones keep that card
   two per row and give the odd last one the whole row, picture beside text */
.sd-cat { flex-direction: column; justify-content: center; gap: var(--space-2); padding: var(--space-4) var(--space-2); text-align: center; }
.sd-cat__img { width: 64px; height: 64px; }
.sd-cat small { white-space: nowrap; }
@media (min-width: 768px) {
	.sd-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
}
@media (max-width: 767px) {
	.sd-cats { gap: var(--space-3); }
	.sd-cats > :last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; gap: var(--space-4); text-align: left; }
}

/* four-card strips (home codes and picks, "More in" on deal pages, other picks on reviews): four or two per row, never
   three, so four cards never leave one alone on a row. The sidebar of home and deal pages goes below the main column
   up to 1180px, where four cards beside it would be too narrow for their titles and buttons */
@media (min-width: 901px) {
	.sd-frontgrid.sd-frontgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* a card left alone on the last row (marked .is-lone by site.js) takes the whole row, laid out for that width so it
   reads as a wide card rather than a stretched one */
.is-lone { grid-column: 1 / -1; }
.card.is-lone .sd-card__title, .card.is-lone .sd-card__variant { height: auto; }
.card.is-lone .sd-card__rating > span { display: inline; }
/* deal card: laid out by the width of its own grid, not the window (the deals list has a filter column beside it):
   portrait when narrow, picture | details from 560px, picture | details | button and score from 900px */
.sd-frontgrid { container-type: inline-size; }
@container (min-width: 560px) {
	.card.is-lone { flex-direction: row; gap: var(--space-5); }
	.card.is-lone .sd-card__media { width: min(40%, 280px); height: auto; min-height: 188px; margin-bottom: 0; }
	.card.is-lone .sd-card__body { min-width: 0; max-width: 360px; }
}
@container (min-width: 900px) {
	.card.is-lone .sd-card__body { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); column-gap: var(--space-8); align-content: center; }
	.card.is-lone .sd-card__body > * { grid-column: 1; }
	.card.is-lone .sd-card__get { grid-column: 2; grid-row: 1 / 4; align-self: end; margin-top: 0; }
	.card.is-lone .sd-card__actions { grid-column: 2; grid-row: 4 / 6; align-self: start; }
}
/* model and category cards are two per row from 901px (one per row below) */
@media (min-width: 901px) {
	/* model card: picture and name | summary on top, specs | best for and skip if under them, price and buttons below */
	.gcard.is-lone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "rib rib" "top verdict" "specs fit" "deal deal"; }
	.gcard.is-lone .gcard__ribbon { grid-area: rib; }
	.gcard.is-lone .gcard__top { grid-area: top; }
	.gcard.is-lone .gspecs { grid-area: specs; margin-bottom: var(--space-4); }
	.gcard.is-lone .gcard__verdict { grid-area: verdict; align-self: center; min-height: 0; margin: var(--space-4) var(--space-4) var(--space-4) 0; }
	.gcard.is-lone .gfit { grid-area: fit; margin: 0 var(--space-4) var(--space-4) 0; }
	.gcard.is-lone .gdeal { grid-area: deal; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-8); align-items: center; }
	.gcard.is-lone .gdeal__more { grid-column: 1 / -1; }
	/* category card: name, intro and brands | top pick */
	.tcard.is-lone .tcard__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-8); align-items: center; }
	.tcard.is-lone .tcard__pick { margin-top: 0; }
}
/* phones: a sale price with its was-price ("$255.99 $319.99") is wider than the card body at 360px; the was-price
   drops under the price there, and the score keeps only its number (the label stays in its aria-label) */
@media (max-width: 480px) {
	.sd-card__pricerow { flex-wrap: wrap; gap: 0 6px; height: auto; min-height: 28px; }
	.sd-card__price { font-size: 18px; }
}
@media (max-width: 380px) {
	.sd-card__rating > span { display: none; }
	.sd-card__price { font-size: 16px; }
	.sd-card__pricerow { gap: 0 4px; }
	.sd-card__listprice { font-size: 12px; }
}
/* deal-card button: the short label on phones (two cards per row), the full one elsewhere and on a lone card */
.sd-get__s { display: none; }
@media (max-width: 480px) {
	.sd-card__get .sd-get__l { display: none; }
	.sd-card__get .sd-get__s { display: inline; }
	.card.is-lone .sd-card__get .sd-get__l { display: inline; }
	.card.is-lone .sd-card__get .sd-get__s { display: none; }
}

/* pager: Previous, the page numbers and Next on one row, "Page x of y" under them (the markup has the status before
   Next, which left Next alone on the second row); phones put the numbers on their own row above */
.pager__btn:last-child { order: 1; }
.pager__status { order: 2; }
@media (max-width: 600px) {
	.pager__nums { order: -1; width: 100%; justify-content: center; }
	.pager__status { order: 0; width: auto; flex: 1; }
}

/* footer links: one row needs about 1104px; below that a free wrap left "Terms" alone on a second row, so the 14
   links go into even columns instead (7 x 2, then 3 and 2 columns on phones) */
@media (max-width: 1180px) {
	.foot__nav { display: grid; grid-template-columns: repeat(7, max-content); gap: var(--space-3) var(--space-6); }
}
@media (max-width: 767px) {
	.foot__nav { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); }
}
@media (max-width: 400px) {
	.foot__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
	.sd-shell:not(.sd-shell--list) { grid-template-columns: minmax(0, 1fr); }
	.sd-shell:not(.sd-shell--list) .sd-sidebar { position: static; }
}
