/* ============================================================
   aff-components — component styles. TOKENS ONLY (aff-child
   variables.css). A literal color here is a bug.
   ============================================================ */

/* ---------- Auto-Disclosure Bar ---------- */
.aff-disclosure {
  background: color-mix(in srgb, var(--surface), var(--border) 45%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: calc(var(--space-unit) * 0.6) var(--space-unit);
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--body), var(--surface) 15%);
  margin-bottom: calc(var(--space-unit) * 1.5);
}
.aff-disclosure a { color: var(--brand); }

/* ---------- Verdict Box ---------- */
.aff-verdict {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  margin: calc(var(--space-unit) * 1.5) 0;
  background: #fff;
}
.aff-verdict__heading {
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: calc(var(--space-unit) * 0.5) var(--space-unit);
}
.aff-verdict__pick {
  display: flex;
  align-items: center;
  gap: var(--space-unit);
  padding: var(--space-unit);
  border-top: 1px solid var(--border);
}
.aff-verdict__pick:first-of-type { border-top: 0; }
.aff-verdict__role {
  flex: 0 0 110px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
}
.aff-verdict__body { flex: 1 1 auto; }
.aff-verdict__name, .aff-verdict__name a {
  font-weight: 600;
  color: var(--ink);
}
.aff-verdict__blurb {
  margin: 0.25em 0 0;
  font-size: 14px;
  color: color-mix(in srgb, var(--body), var(--surface) 20%);
}
.aff-verdict__cta { flex: 0 0 auto; }
@media (max-width: 640px) {
  .aff-verdict__pick { flex-wrap: wrap; }
  .aff-verdict__role { flex-basis: 100%; }
}

/* CTA styling for AAWP text links wrapped by components (button look) */
.aff-cta-wrap a, .aff-cta-wrap a:visited {
  display: inline-block;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 700;
  font-size: 14px;
  padding: 0.55em 1em;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--cta), #000 12%);
}
.aff-cta-wrap a:hover {
  background: color-mix(in srgb, var(--cta), #000 10%);
  color: var(--cta-text);
}

/* ---------- Rating Rubric ---------- */
.aff-rubric {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-unit);
  background: #fff;
  margin: calc(var(--space-unit) * 1.5) 0;
}
.aff-rubric__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-unit);
  margin-bottom: calc(var(--space-unit) * 0.75);
}
.aff-rubric__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.aff-rubric__avg {
  background: var(--brand);
  color: var(--surface);
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius);
  padding: 0.2em 0.55em;
}
.aff-rubric__row {
  display: flex;
  align-items: center;
  gap: calc(var(--space-unit) * 0.75);
  padding: calc(var(--space-unit) * 0.3) 0;
}
.aff-rubric__label { flex: 0 0 200px; font-size: 14px; font-weight: 600; }
.aff-rubric__bar {
  flex: 1 1 auto;
  height: 10px;
  background: color-mix(in srgb, var(--surface), var(--border) 60%);
  border-radius: 999px;
  overflow: hidden;
}
.aff-rubric__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand), var(--surface) 25%), var(--brand));
  border-radius: 999px;
}
.aff-rubric__score { flex: 0 0 48px; text-align: right; font-size: 13px; font-weight: 600; }
@media (max-width: 640px) {
  .aff-rubric__label { flex-basis: 110px; }
}

/* ---------- Author box ---------- */
.aff-author {
  display: flex;
  gap: var(--space-unit);
  align-items: center;
  border-top: 2px solid var(--border);
  margin-top: calc(var(--space-unit) * 2.5);
  padding-top: calc(var(--space-unit) * 1.25);
}
.aff-author__photo,
.aff-author__monogram {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex: 0 0 72px;
  object-fit: cover;
}
.aff-author__monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}
.aff-author__name { font-weight: 700; color: var(--ink); }
.aff-author__bio { margin: 0.25em 0 0; font-size: 0.875rem; color: color-mix(in srgb, var(--body), var(--surface) 20%); }

/* ---------- reading time ---------- */
.aff-reading-time {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--body), var(--surface) 35%);
  margin: 0.25em 0 0;
}

/* ---------- Rank Math ToC as a boxed element (sticky treatment
   evaluated at the A2 demo; long reads get .aff-long-read on body) ---------- */
.wp-block-rank-math-toc-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: var(--space-unit);
  font-size: 14px;
}
.wp-block-rank-math-toc-block a { color: var(--brand); text-decoration: none; }
.wp-block-rank-math-toc-block a:hover { text-decoration: underline; }

/* ---------- Hub cards / hub guides (architecture layer) ---------- */
.aff-hub-cards {
  display: grid;
  /* min(210px, 100%) = overflow-proof: columns can never force the grid
     wider than its container on narrow screens */
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: var(--space-unit);
  margin: calc(var(--space-unit) * 1.5) 0;
}
.aff-card {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-unit);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.aff-card:hover { border-color: var(--brand); transform: translateY(-2px); }
/* the whole card stays clickable, but only the TITLE reads as a link:
   kill the underline/color the theme's `.entry-content a` rule inherits
   onto blurbs and badges */
.entry-content a.aff-card,
a.aff-card { color: inherit; text-decoration: none; }
.aff-card .aff-card__blurb,
.aff-card .aff-card__badge { text-decoration: none; }
.aff-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 17px;
  display: inline-block; /* blocks decoration propagation from the anchor */
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand), transparent 60%);
  text-underline-offset: 3px;
}
.aff-card:hover .aff-card__title { color: var(--brand); text-decoration-color: currentColor; }
.aff-card__blurb { font-size: 0.8125rem; display: inline-block; color: color-mix(in srgb, var(--body), var(--surface) 25%); }
.aff-card__badge {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand), var(--surface) 88%);
  border-radius: 999px;
  padding: 0.15em 0.7em;
}
.aff-card--empty .aff-card__badge {
  color: color-mix(in srgb, var(--body), var(--surface) 15%);
  background: color-mix(in srgb, var(--surface), var(--border) 50%);
}
.aff-hub-guides { list-style: none; margin: var(--space-unit) 0; padding: 0; }
.aff-hub-guides li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-unit);
  padding: calc(var(--space-unit) * 0.55) 0;
  border-bottom: 1px solid var(--border);
}
.aff-hub-guides a { color: var(--ink); font-weight: 600; text-decoration: none; }
.aff-hub-guides a:hover { color: var(--brand); }
.aff-hub-guides__meta { font-size: 0.8125rem; color: color-mix(in srgb, var(--body), var(--surface) 35%); white-space: nowrap; }
.aff-hub-empty {
  box-sizing: border-box; /* padding inside the cap — keeps the shared container edge */
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: calc(var(--space-unit) * 1.25);
  text-align: center;
  color: color-mix(in srgb, var(--body), var(--surface) 30%);
  background: color-mix(in srgb, var(--surface), #fff 40%);
}

/* ---------- Spec table (attested editorial specs) ---------- */
.aff-spec-table .aff-spec-table__title { font-weight: 600; color: var(--ink); display: block; }
.aff-spec-table .aff-spec-table__role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-top: 0.2em;
}

/* ---------- Verdict Box — "cards" variant (mad3 Top-3 port) ----------
   Mobile swipe row → ≥900px 3-up grid; CTAs pinned to a shared baseline;
   badge bleeds past the card edge. Behavior ported exactly from fleet-hq
   contracts/reference/mad3-top3-box-reference.md — don't regress it.
   Badges use brand → ink → muted (NOT --cta: the CTA color is reserved
   for affiliate buttons by design-system rule). */
.aff-vcards { margin: calc(var(--space-unit) * 1.5) auto; }
.aff-vcards__row {
  display: flex; overflow-x: auto; gap: 12px; margin: 12px 0 0;
  padding: 2px 2px 10px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--border);
}
.aff-vcards__row::-webkit-scrollbar { height: 9px; }
.aff-vcards__row::-webkit-scrollbar-track { background: var(--border); border-radius: 5px; }
.aff-vcards__row::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 5px; }
.aff-vcards__card {
  flex: 0 0 43%; min-width: 148px; scroll-snap-align: start;
  display: flex; flex-direction: column; box-sizing: border-box;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink), transparent 93%);
  padding: 0 12px 14px;
}
.aff-vcards__badge {
  align-self: flex-start; max-width: calc(100% - 4px); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--surface);
  font-weight: 800; font-size: 0.72em; letter-spacing: 0.02em;
  text-transform: uppercase; padding: 5px 10px; margin: -1px 0 5px -13px;
}
.aff-vcards__badge--1 { background: var(--brand); }
.aff-vcards__badge--2 { background: var(--ink); }
.aff-vcards__badge--3 { background: color-mix(in srgb, var(--body), var(--surface) 25%); }
.aff-vcards__img { height: 120px; display: flex; align-items: center; justify-content: center; margin: 2px 0; }
.aff-vcards__img img {
  max-height: 112px !important; max-width: 100% !important;
  width: auto !important; height: auto !important; object-fit: contain;
}
.aff-vcards__name { font-size: 0.95em; line-height: 1.3; font-weight: 800; margin: 8px 0 3px; }
.aff-vcards__name a { color: var(--ink); text-decoration: none; }
.aff-vcards__sub { margin: 0 0 10px; font-weight: 700; line-height: 1.35; font-size: 0.85em; }
.aff-vcards__sub, .aff-vcards__sub a {
  color: color-mix(in srgb, var(--body), var(--surface) 15%); text-decoration: none;
}
.aff-vcards__desc {
  display: none; margin: 0 0 16px;
  color: color-mix(in srgb, var(--body), var(--surface) 15%);
  font-size: 0.95em; line-height: 1.5;
}
.aff-vcards__cta { margin-top: auto; text-align: center; }
.aff-vcards__btn a, .aff-vcards__btn a:visited {
  display: block; text-align: center; background: var(--cta);
  color: var(--cta-text) !important; font-weight: 700; text-decoration: none;
  padding: 8px 10px; border-radius: 999px; font-size: 0.85em;
}
.aff-vcards__prime { min-height: 22px; margin: 7px 0 0; }
.aff-vcards__prime img { max-height: 20px !important; width: auto !important; }
.aff-vcards__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 2px 10px; }
.aff-vcards__foot .aff-asof--group { margin: 0; text-align: left; }
.aff-vcards__hint {
  text-align: right; font-size: 0.8em; margin: 0 0 0 auto;
  color: color-mix(in srgb, var(--body), var(--surface) 35%);
}
@media (min-width: 900px) {
  .aff-vcards__row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 18px; overflow: visible; padding: 0; margin: 12px 0 8px;
  }
  .aff-vcards__card { min-width: 0; padding: 0 18px 18px; }
  .aff-vcards__badge { font-size: 0.92em; padding: 7px 14px; margin: -1px 0 6px -19px; }
  .aff-vcards__img { height: 185px; margin: 4px 0 2px; }
  .aff-vcards__img img { max-height: 175px !important; }
  .aff-vcards__name { font-size: 1.08em; margin: 12px 0 4px; }
  .aff-vcards__sub { font-size: 1em; margin: 0 0 9px; }
  .aff-vcards__desc { display: block; }
  .aff-vcards__btn a { display: inline-block; padding: 10px 22px; font-size: 1em; }
  .aff-vcards__prime { min-height: 26px; margin: 9px 0 0; }
  .aff-vcards__hint { display: none; }
  .aff-vcards__foot { justify-content: flex-end; }
}

/* ---------- Product Box — "review" variant (mad review-box port) ----
   Corner badge tab bleeding over the top-left with its ::before triangle
   fold — preserved exactly per fleet-hq
   contracts/reference/mad-review-box-reference.md. Fixes folded in per
   the reference §4: token-derived shadow (source had a colorless one),
   affiliate button on --cta (CTA rule), no real headings inside. */
.aff-rbox {
  border: 5px solid var(--brand); padding: 10px; max-width: 700px;
  position: relative; margin: calc(var(--space-unit) * 1.5) auto;
  background: #fff;
  box-shadow: 0 2px 4px color-mix(in srgb, var(--ink), transparent 85%);
}
/* box directly under a heading (review order, 2026-10-19): the tab overhangs the
   frame by ~20px, so leave room for it below the heading rule */
.entry-content :is(h2, h3, h4) + .aff-rbox { margin-top: 44px; }
.aff-rbox__badge {
  background: color-mix(in srgb, var(--brand), var(--ink) 30%);
  color: var(--surface); padding: 5px 20px; font-weight: 700;
  text-align: center; width: fit-content; position: relative;
  margin: -30px 0 10px -25px;
}
.aff-rbox__badge::before {
  content: ''; position: absolute; top: 100%; left: 0;
  border: 10px solid transparent;
  border-top-color: color-mix(in srgb, var(--brand), var(--ink) 55%);
}
.aff-rbox__content { display: flex; align-items: center; }
.aff-rbox__img {
  width: 30%; height: auto; margin: 0 20px;
  display: flex; justify-content: center; align-items: center;
}
.aff-rbox__img img { max-width: 100% !important; height: auto !important; }
.aff-rbox__details { flex: 1; padding: 0 10px; }
.aff-rbox__name { font-size: 1.25em; font-weight: 800; margin: 0 0 4px; }
.aff-rbox__name a { color: var(--ink); text-decoration: none; }
.aff-rbox__sub { font-size: 1.02em; font-weight: 700; margin: 0 0 8px; }
.aff-rbox .aff-rbox__sub a { /* spec line: reads as text, stays a link; beats the theme's content-link underline */
  color: color-mix(in srgb, var(--body), var(--surface) 15%);
  text-decoration: none;
}
.aff-rbox .aff-rbox__btn a { text-decoration: none !important; }
.aff-rbox__desc { margin: 10px 0; font-size: 14px; text-align: left; } /* justify left word gaps in narrow columns */
.aff-rbox__btn a, .aff-rbox__btn a:visited {
  display: block; width: 100%; box-sizing: border-box; font-size: 20px;
  padding: 8px; background: var(--cta); color: var(--cta-text) !important;
  text-decoration: none; font-weight: 700; margin-top: 15px;
  text-align: center; border-radius: 999px;
}
.aff-rbox__btn a:hover {
  background: color-mix(in srgb, var(--cta), var(--ink) 12%);
}
@media (max-width: 768px) {
  .aff-rbox { max-width: 100%; padding: 5px; }
  .aff-rbox__badge { padding: 5px 10px; margin-left: -20px; font-size: 1.2em; }
  .aff-rbox__content { flex-direction: column; align-items: flex-start; }
  .aff-rbox__img { width: auto; margin: 0 auto 10px; }
  .aff-rbox__name { font-size: 1.2rem; }
  .aff-rbox__sub { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
  /* box now opens each review: thin products (rods) must not get a tall white slot */
  .aff-rbox .aff-rbox__img img { max-height: 120px; width: auto !important; }
  .aff-rbox__desc { font-size: 1rem; margin-bottom: 5px; }
  .aff-rbox__btn a { padding: 10px; font-size: 1rem; }
}

/* ---------- style pack Phase B: S4 review index, S5 image layout,
   S6 callout, S2 spec-table heading (mad-article-style-pack ref) ---- */
.aff-review-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(260px, 40%), 1fr));
  gap: 6px 36px; margin: 18px 0 34px;
}
.aff-review-index__row { margin: 0; border-bottom: 1px solid var(--border); padding: 7px 0; }
.aff-review-index__n { font-weight: 800; color: var(--brand); font-size: 0.85em; }
.aff-review-index__row a { text-decoration: none; font-weight: 600; }
.aff-pbox-image {
  display: flex; justify-content: center;
  margin: calc(var(--space-unit) * 1.25) auto;
}
.aff-pbox-image img { max-width: min(350px, 100%) !important; height: auto !important; }
.aff-callout { border-left: 3px solid var(--brand); padding: 2px 0 2px 16px; margin: 28px 0; }
.aff-callout__label {
  font-weight: 800; font-size: 0.8em; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0 0 6px;
}
.aff-callout > p:last-child { margin-bottom: 0; }
.aff-spec-table__heading {
  font-weight: 800; font-size: 0.8em; letter-spacing: 0.12em;
  text-transform: uppercase; display: inline-block;
  border-bottom: 3px solid var(--brand); padding-bottom: 6px; margin: 0 0 10px;
}

/* ---------- Spec Table — "stacked" variant (mad Key Specs port) ----
   Per-product rows per contracts/reference/mad-spec-stack-reference.md:
   own labels per product, first row heavier rule + diamond, role tag
   after the name, auto-fit cell grid, footnote in the component. */
.aff-spec-stack { margin: calc(var(--space-unit) * 1.25) 0; }
.aff-spec-stack__item { border-top: 1px solid var(--border); padding: 9px 0 10px; }
.aff-spec-stack__item:first-child { border-top: 3px solid var(--ink); }
.aff-spec-stack__head { margin: 0 0 5px; }
.aff-spec-stack__n {
  font-weight: 800; font-size: 0.85em; color: var(--brand); margin-right: 10px;
}
.aff-spec-stack__item:first-child .aff-spec-stack__name::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  background: var(--brand); transform: rotate(45deg); margin: 0 7px 1px 0;
}
.aff-spec-stack__name a { color: var(--ink); text-decoration: none; }
.aff-spec-stack__role {
  font-weight: 800; font-size: 0.68em; letter-spacing: 0.1em;
  color: var(--brand); text-transform: uppercase; white-space: nowrap;
  margin-left: 10px;
}
.aff-spec-stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(140px, 21%), 1fr));
  gap: 4px 20px;
}
.aff-spec-stack__label {
  margin: 0 0 1px; font-weight: 800; font-size: 0.62em;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--body), var(--surface) 35%);
}
.aff-spec-stack__value { margin: 0; font-weight: 700; }
.aff-spec-stack__value--na {
  font-weight: 400; font-style: italic;
  color: color-mix(in srgb, var(--body), var(--surface) 35%);
}
.aff-spec-stack__value--bestfor {
  font-weight: 400;
  color: color-mix(in srgb, var(--body), var(--surface) 15%);
}
.aff-spec-stack__note {
  font-size: 0.85em; font-style: italic; margin: 4px 0 0;
  color: color-mix(in srgb, var(--body), var(--surface) 30%);
}

/* ---------- AAWP comparison-table refinements (owner, 2026-10-13) ----
   Larger preview images to themadstore proportions; title truncation,
   "Check on Amazon" button text and strikethrough list price are
   aawp_output settings (newsite.sh seeds them fleet-wide). */
.aawp .aawp-table__td-thumb .aawp-product__img {
  max-height: 90px !important; max-width: 110px !important;
  width: auto !important; height: auto !important;
}
.aawp .aawp-table__th-thumb, .aawp .aawp-table__td-thumb { min-width: 118px; }

/* ---------- Collage (style pack S10, Phase D) ----------
   Tilted 3-col photo grid; tilt cycle is the reference's exact sequence
   (-2.2, 1.6, -1.2, 2.0, -1.6, 1.2), repeating via nth-child(6n+k). */
.aff-collage {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 16px; max-width: 760px; margin: 20px auto 30px;
}
.aff-collage__card {
  background: #fff; border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow-tint, color-mix(in srgb, var(--brand) 18%, var(--surface)));
  padding: 8px 8px 4px; text-align: center; margin: 0;
}
.aff-collage__card:nth-child(6n+1) { transform: rotate(-2.2deg); }
.aff-collage__card:nth-child(6n+2) { transform: rotate(1.6deg); }
.aff-collage__card:nth-child(6n+3) { transform: rotate(-1.2deg); }
.aff-collage__card:nth-child(6n+4) { transform: rotate(2deg); }
.aff-collage__card:nth-child(6n+5) { transform: rotate(-1.6deg); }
.aff-collage__card:nth-child(6n)   { transform: rotate(1.2deg); }
.aff-collage__img { height: 120px; display: flex; align-items: center; justify-content: center; }
.aff-collage__img img { max-height: 110px !important; max-width: 100% !important; width: auto !important; height: auto !important; object-fit: contain; }
.aff-collage__caption {
  font-size: 0.62em; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; margin: 4px 0 2px; color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  .aff-collage__card { transform: none; }
}

/* spec heading hugs its list (owner QA 2026-10-13, same proximity rule
   as the eyebrow): kill the list's top margin when the label precedes it */
.aff-spec-table__heading + .aff-spec-stack,
.aff-spec-table__heading + .aff-spec-table { margin-top: 0 !important; }

/* ---------- Hub guides: featured layout (level-2 "featured" homepage) ---------- */
.aff-featured {
  display: flex; flex-direction: column; gap: 0.45em;
  padding: calc(var(--space-unit) * 1.5); margin: var(--space-unit) 0 calc(var(--space-unit) * 1.25);
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius); text-decoration: none; color: inherit;
}
.entry-content a.aff-featured { color: inherit; text-decoration: none; }
.aff-featured__kicker {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand);
}
.aff-featured__title {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.15;
}
.aff-featured:hover .aff-featured__title { color: var(--brand); }
.aff-featured__summary { color: color-mix(in srgb, var(--body), var(--surface) 15%); max-width: 62ch; }
.aff-featured__meta { font-size: 0.8125rem; color: color-mix(in srgb, var(--body), var(--surface) 35%); }
.aff-cards--raised .aff-featured { border: 0; border-radius: calc(var(--radius) * 2.5); box-shadow: 0 4px 18px color-mix(in srgb, var(--ink) 10%, transparent); }
.aff-cards--ruled .aff-featured { background: transparent; border: 0; border-top: 3px solid var(--ink); border-radius: 0; padding-left: 0; padding-right: 0; }
/* featured guide with its top-pick image: image beside text on desktop, above on phones */
.aff-featured__body { display: flex; flex-direction: column; gap: 0.45em; }
.aff-featured--has-img { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: calc(var(--space-unit) * 1.25); align-items: center; }
.aff-featured__img { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--radius); padding: 10px; }
.aff-featured__img img { max-width: 100% !important; max-height: 200px !important; width: auto !important; height: auto !important; object-fit: contain; }
@media (max-width: 640px) {
  .aff-featured--has-img { grid-template-columns: 1fr; }
  .aff-featured__img img { max-height: 170px !important; }
}

/* ---------- Related guides (same category; replaces GP prev/next) ---------- */
.aff-related { margin: calc(var(--space-unit) * 2) 0 0; padding-top: var(--space-unit); border-top: 3px solid var(--ink); }
.aff-related__heading {
  font-weight: 800; font-size: 0.8em; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0 0 8px;
}
.aff-related ul { list-style: none; margin: 0; padding: 0; }
.aff-related li { border-bottom: 1px solid var(--border); padding: 8px 0; margin: 0; }
.aff-related li a { font-weight: 600; text-decoration: none; color: var(--ink); }
.aff-related li a:hover { color: var(--brand); }

/* hub pages: everything past the newest 10, compact two columns */
.aff-hub-more__heading {
  font-weight: 800; font-size: 0.8em; letter-spacing: 0.1em;
  text-transform: uppercase; margin: calc(var(--space-unit) * 1.5) 0 8px;
}
.aff-hub-more { columns: 2 260px; column-gap: 32px; list-style: none; margin: 0; padding: 0; }
.aff-hub-more li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--border); margin: 0; }
.aff-hub-more a { text-decoration: none; font-weight: 600; }

/* phones: wider top-3 cards (owner/external review 2026-10-16). At 43% a card
   was ~150 px: names wrapped two words per line and the price button broke
   in two. ~60% shows one and a half cards — still reads as "swipe". */
@media (max-width: 899px) {
  .aff-vcards__card { flex-basis: 60%; min-width: 190px; }
  .aff-vcards__btn a { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
}

/* ---------- native Amazon data layer (0.17.0): comparison table, price stamp,
   price disclaimer. Desktop = the familiar 5-column table; phones = compact
   cards (thumb | name + price, full-width button). Selectors use a doubled
   class (.T.T) to beat the theme's generic .entry-content table/link rules. */
.aff-ptable.aff-ptable { margin: calc(var(--space-unit) * 1.5) auto; overflow-x: auto; }
.aff-ptable.aff-ptable table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); font-size: 0.875rem; margin: 0; }
.aff-ptable.aff-ptable th {
  background: var(--ink); color: var(--surface); text-align: left;
  font-weight: 700; padding: 10px 12px; border: 0;
}
.aff-ptable.aff-ptable td { padding: 10px 12px; vertical-align: middle; border: 0; border-top: 1px solid var(--border); background: #fff; }
.aff-ptable.aff-ptable tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface), #fff 40%); }
.aff-ptable.aff-ptable .aff-ptable__pos { width: 2.2em; font-weight: 700; }
.aff-ptable--plain.aff-ptable--plain .aff-ptable__pos { display: none; }
.aff-ptable.aff-ptable .aff-ptable__thumb { width: 118px; }
.aff-ptable.aff-ptable .aff-ptable__thumb img { display: block; width: 90px; height: 90px; object-fit: contain; margin: 0 auto; }
.aff-ptable.aff-ptable .aff-ptable__title a { color: var(--ink); font-weight: 600; text-decoration: none; }
.aff-ptable.aff-ptable .aff-ptable__title a:hover { text-decoration: underline; }
.aff-ptable.aff-ptable .aff-ptable__label { display: block; margin-top: 4px; font-size: 0.8125rem; line-height: 1.35; color: color-mix(in srgb, var(--body), var(--surface) 15%); }
.aff-ptable.aff-ptable .aff-ptable__role { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand); }
.aff-ptable.aff-ptable .aff-ptable__pricing { min-width: 6em; }
.aff-ptable.aff-ptable .aff-ptable__price { font-weight: 700; color: var(--body); white-space: nowrap; }
.aff-ptable.aff-ptable .aff-ptable__old { font-size: 0.8125rem; color: color-mix(in srgb, var(--body), var(--surface) 25%); white-space: nowrap; }
.aff-prime {
  /* Prime-styled text (owner pick 2026-10-16): Amazon's Prime blue + check mark,
     no logo artwork. The blue is the one deliberate non-token colour. */
  display: inline-block; vertical-align: 1px; font-size: 12px; font-weight: 700; line-height: 1.3;
  color: #0073A8; white-space: nowrap; letter-spacing: 0.01em; /* Amazon blue darkened to pass 4.5:1 at 12px */
}
.aff-prime::before { content: "\2713"; font-weight: 900; margin-right: 2px; }
.aff-ptable.aff-ptable .aff-ptable__cta { text-align: right; white-space: nowrap; }
.aff-ptable.aff-ptable .aff-ptable__btn {
  display: inline-block; padding: 8px 16px; text-decoration: none;
  border: 1px solid transparent;
}
@media (max-width: 768px) {
  .aff-ptable.aff-ptable { overflow: visible; }
  .aff-ptable.aff-ptable table, .aff-ptable.aff-ptable tbody { display: block; border: 0; }
  .aff-ptable.aff-ptable thead { display: none; }
  .aff-ptable.aff-ptable tbody tr {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px; align-items: center;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px;
    background: #fff;
  }
  /* reset (0,2,3) first; the per-cell rules below (0,3,1) then win */
  .aff-ptable.aff-ptable tbody tr td { display: block; padding: 0; border: 0; background: none; min-width: 0; width: auto; }
  .aff-ptable.aff-ptable tbody tr:nth-child(even) td { background: none; }
  .aff-ptable.aff-ptable td.aff-ptable__pos { display: none; }
  .aff-ptable.aff-ptable td.aff-ptable__thumb { grid-column: 1; grid-row: 1 / span 2; }
  .aff-ptable.aff-ptable td.aff-ptable__thumb img { width: 76px; height: 76px; margin: 0; }
  .aff-ptable.aff-ptable td.aff-ptable__title { grid-column: 2; grid-row: 1; font-size: 0.9375rem; line-height: 1.35; }
  .aff-ptable.aff-ptable td.aff-ptable__pricing { grid-column: 2; grid-row: 2; }
  .aff-ptable.aff-ptable td.aff-ptable__cta { grid-column: 1 / -1; grid-row: 3; text-align: center; margin-top: 6px; }
  .aff-ptable.aff-ptable .aff-ptable__btn { display: block; padding: 10px; }
}

.aff-asof { display: block; font-size: 0.75rem; line-height: 1.3; margin-top: 4px; }
.aff-asof a { display: inline-block; padding: 6px 0; } /* taller tap target, same look */
.aff-asof.aff-asof a { color: color-mix(in srgb, var(--body), var(--surface) 25%); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--body), transparent 60%); }
.aff-rbox .aff-asof { text-align: center; margin-top: 6px; }
.aff-asof--group { text-align: right; margin: 6px 0 0; }
.aff-ptable .aff-asof--group { margin-top: 8px; }
.aff-price-note {
  font-size: 0.8125rem; margin-top: calc(var(--space-unit) * 2);
  padding-top: var(--space-unit); border-top: 1px solid var(--border);
  color: color-mix(in srgb, var(--body), var(--surface) 25%);
}

/* ---------- core tables → labelled cards on phones (aff-stack, set by
   includes/core-table.php for any core table with a header row) ---------- */
@media (max-width: 768px) {
  .entry-content .aff-stack.wp-block-table { overflow: visible; }
  .entry-content .aff-stack table, .entry-content .aff-stack tbody { display: block; width: 100%; border: 0; }
  .entry-content .aff-stack thead { display: none; }
  .entry-content .aff-stack tbody tr {
    display: block; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 12px 6px; margin: 0 0 10px; background: #fff;
  }
  .entry-content .aff-stack tbody td {
    display: flex; gap: 10px; justify-content: space-between; align-items: baseline;
    padding: 5px 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--border), transparent 40%); background: none; text-align: right;
  }
  .entry-content .aff-stack tbody td::before {
    content: attr(data-label); flex: 0 0 42%; text-align: left;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand);
  }
  .entry-content .aff-stack.wp-block-table tbody tr:nth-child(even) td { background: none; } /* beats the theme's zebra rule */
  /* first column is the product name: card title, no label */
  .entry-content .aff-stack tbody td:first-child { display: block; border-top: 0; padding-top: 0; text-align: left; font-weight: 700; color: var(--ink); }
  .entry-content .aff-stack tbody td:first-child::before { content: none; }
}

/* ---------- Top-3 cards v2 (Phase C spec 2026-10-19, owner-corrected mock,
   owner 2026-10-19: same content on desktop, cards side by side). Gated by
   the aff_vcards_v2 option / owner preview. Old markup parts (subhead,
   desktop note, price-in-button, prime slot, per-box stamp) are hidden in v2. ---------- */
.aff-vcards__rev { display: block; margin-top: 4px; padding: 11px 0; min-height: 44px; box-sizing: border-box; font-size: 0.875rem; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.aff-vcards__note { font-size: 0.8125rem; line-height: 1.4; margin: 0 0 8px; color: color-mix(in srgb, var(--body), var(--surface) 30%); }
/* v1 (not stacked): the v2-only parts stay off */
.aff-vcards:not(.aff-vcards--stack) .aff-vcards__count, .aff-vcards:not(.aff-vcards--stack) .aff-vcards__spec,
.aff-vcards:not(.aff-vcards--stack) .aff-vcards__chips, .aff-vcards:not(.aff-vcards--stack) .aff-vcards__pricebox,
.aff-vcards:not(.aff-vcards--stack) .aff-vcards__why, .aff-vcards:not(.aff-vcards--stack) .aff-vcards__btn-short { display: none; }
.aff-vcards:not(.aff-vcards--stack) .aff-vcards__top { display: contents; }

/* v2 content, every width */
.aff-vcards--stack .aff-vcards__sub, .aff-vcards--stack .aff-vcards__btn-full,
.aff-vcards--stack .aff-vcards__prime, .aff-vcards--stack .aff-vcards__hint, .aff-vcards--stack .aff-vcards__foot .aff-asof--group { display: none; }
.aff-vcards--stack .aff-vcards__btn-short { display: inline; }
.aff-vcards--stack .aff-vcards__top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.aff-vcards--stack .aff-vcards__badge { margin: 0; padding: 4px 10px; border-radius: 999px; font-size: 0.7em; max-width: 78%; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; } /* long roles wrap (≈24 chars per line) instead of being cut */
.aff-vcards--stack .aff-vcards__count { display: inline; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: color-mix(in srgb, var(--body), var(--surface) 35%); }
.aff-vcards--stack .aff-vcards__name { margin: 0 0 2px; font-size: 1.05em; }
.aff-vcards--stack .aff-vcards__spec { display: block; margin: 0 0 6px; font-size: 0.8125rem; color: color-mix(in srgb, var(--body), var(--surface) 25%); }
.aff-vcards--stack .aff-vcards__chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.aff-vcards--stack .aff-vcards__chips li { font-size: 0.75rem; line-height: 1.3; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface), #fff 40%); color: var(--body); }
.aff-vcards--stack .aff-vcards__desc { display: block; font-size: 0.9375rem; margin: 10px 0 8px; }
.aff-vcards--stack .aff-vcards__pricebox { display: block; margin: 0 0 8px; }
.aff-vcards--stack .aff-vcards__price { font-size: 1.375rem; font-weight: 700; color: var(--ink); margin-right: 8px; }
.aff-vcards--stack .aff-vcards__pricebox .aff-asof { margin-top: 2px; }
.aff-vcards--stack .aff-vcards__why { display: block; margin: 0 0 10px; }
.aff-vcards--stack .aff-vcards__why summary {
  list-style: none; cursor: pointer; text-align: center; padding: 9px 14px;
  border: 1px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 0.9375rem; color: var(--ink);
}
.aff-vcards--stack .aff-vcards__why summary::-webkit-details-marker { display: none; }
.aff-vcards--stack .aff-vcards__why summary::after { content: " \25BE"; }
.aff-vcards--stack .aff-vcards__why[open] summary::after { content: " \25B4"; }
.aff-vcards--stack .aff-vcards__why-opened, .aff-vcards--stack .aff-vcards__why[open] .aff-vcards__why-closed { display: none; }
.aff-vcards--stack .aff-vcards__why[open] .aff-vcards__why-opened { display: inline; }
.aff-vcards--stack .aff-vcards__why-body { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface), var(--border) 45%); font-size: 0.875rem; line-height: 1.45; text-align: left; }
.aff-vcards--stack .aff-vcards__why-body p { margin: 0 0 6px; }
.aff-vcards--stack .aff-vcards__why-body p:last-child { margin-bottom: 0; }
.aff-vcards--stack .aff-vcards__why-body .aff-vcards__note { margin: 0; }
.aff-vcards--stack .aff-vcards__cta { text-align: center; margin: 0; }
.aff-vcards--stack .aff-vcards__btn a { display: block; padding: 10px 16px; font-size: 1em; text-decoration: none !important; }
.aff-vcards--stack .aff-vcards__rev { display: block; margin-top: 4px; text-align: center; }

/* phones: image left of the header text */
@media (max-width: 899px) {
  .aff-vcards--stack .aff-vcards__row { display: block; overflow: visible; padding: 0; margin: 12px 0 0; }
  .aff-vcards--stack .aff-vcards__card {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 14px; align-items: start;
    grid-template-areas: "top top" "img name" "img spec" "img chips" "desc desc" "price price" "why why" "cta cta";
    width: auto; min-width: 0; padding: 10px 12px 14px; margin: 0 0 12px; border-radius: var(--radius);
  }
  .aff-vcards--stack .aff-vcards__top { grid-area: top; }
  .aff-vcards--stack .aff-vcards__img { grid-area: img; height: auto; margin: 0; }
  .aff-vcards--stack .aff-vcards__img img { max-height: 104px !important; max-width: 104px; }
  .aff-vcards--stack .aff-vcards__name { grid-area: name; }
  .aff-vcards--stack .aff-vcards__spec { grid-area: spec; }
  .aff-vcards--stack .aff-vcards__chips { grid-area: chips; }
  .aff-vcards--stack .aff-vcards__desc { grid-area: desc; }
  .aff-vcards--stack .aff-vcards__pricebox { grid-area: price; }
  .aff-vcards--stack .aff-vcards__why { grid-area: why; }
  .aff-vcards--stack .aff-vcards__cta { grid-area: cta; }
}
/* desktop: three cards side by side, image on top, price/expander/buttons pinned to the bottom */
@media (min-width: 900px) {
  .aff-vcards--stack .aff-vcards__card { padding: 12px 16px 16px; border-radius: var(--radius); }
  .aff-vcards--stack .aff-vcards__img { height: 150px; margin: 0 0 8px; }
  .aff-vcards--stack .aff-vcards__img img { max-height: 140px !important; }
  .aff-vcards--stack .aff-vcards__pricebox { margin-top: auto; padding-top: 10px; }
  /* closed: equal heights so the buttons line up; while any expander is open,
     cards keep their own height instead of stretching to the open one */
  .aff-vcards--stack .aff-vcards__row:has(.aff-vcards__why[open]) { align-items: start; }
  .aff-vcards--stack .aff-vcards__btn a { display: block; }
}

/* ---------- Compare (product-box layout "compare", 0.22.0): one comparison
   with expandable rows; filter chips are radios + :has(). Desktop = aligned
   grid rows under a header; phones = cards. ---------- */
.aff-compare { margin: calc(var(--space-unit) * 1.5) auto; }
.aff-compare__filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.aff-compare__filters input { position: absolute; opacity: 0; width: 0; height: 0; }
.aff-compare__filters label {
  cursor: pointer; font-size: 0.875rem; font-weight: 600; line-height: 1.3; padding: 12px 16px; /* >= 44px tap target */
  border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: #fff;
}
.aff-compare__filters input:checked + label { background: var(--ink); color: var(--surface); }
.aff-compare__filters input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand), var(--surface) 20%); outline-offset: 2px; }
.aff-compare__head, .aff-compare__summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 28px; column-gap: 14px; align-items: center;
}
.aff-compare__head { padding: 8px 12px; background: var(--ink); color: var(--surface); font-size: 0.8125rem; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; }
.aff-compare__row { border: 1px solid var(--border); border-top: 0; background: #fff; }
.aff-compare__row:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.aff-compare__summary { list-style: none; cursor: pointer; padding: 12px; }
.aff-compare__summary::-webkit-details-marker { display: none; }
.aff-compare__product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.aff-compare__thumb { flex: 0 0 56px; }
.aff-compare__thumb img, .aff-compare__img { display: block; width: 56px; height: 56px; object-fit: contain; }
.aff-compare__text { display: flex; flex-direction: column; min-width: 0; }
.aff-compare__name { font-weight: 700; color: var(--ink); }
.aff-compare__cat { font-size: 0.8125rem; color: color-mix(in srgb, var(--body), var(--surface) 25%); }
.aff-compare__uses { font-size: 0.8125rem; color: var(--body); margin-top: 2px; }
.aff-compare__facts { display: flex; flex-wrap: wrap; gap: 6px; }
.aff-chip { font-size: 0.75rem; line-height: 1.3; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface), #fff 40%); color: var(--body); white-space: nowrap; }
.aff-compare__pricecell { text-align: right; white-space: nowrap; }
.aff-compare__price { font-weight: 700; color: var(--ink); }
.aff-compare__toggle::before { content: "\25BE"; display: inline-block; color: var(--brand); font-size: 1.1em; }
.aff-compare__row[open] .aff-compare__toggle::before { content: "\25B4"; }
.aff-compare__panel { padding: 4px 12px 14px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface), #fff 40%); }
.aff-compare__specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 10px 0 0; }
.aff-compare__spec { display: flex; flex-direction: column; }
.aff-compare__spec-l { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand); }
.aff-compare__spec-v { font-size: 0.9375rem; color: var(--ink); }
.aff-compare__note { margin: 10px 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--body); }
.aff-compare__note strong { color: var(--ink); }
.aff-compare__caveat { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.4; color: color-mix(in srgb, var(--body), var(--surface) 30%); }
.aff-compare__caveat::before {
  content: "i"; display: inline-block; width: 15px; height: 15px; margin-right: 6px; border-radius: 50%;
  border: 1px solid currentColor; font: 700 10px/13px var(--font-body); text-align: center; vertical-align: 1px;
}
.aff-compare__actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 12px; }
/* the two panel actions share one shape (owner 2026-10-19): same pill, same
   44px height, one line; filled = Amazon (primary), outlined = review */
.aff-compare .aff-compare__rev, .aff-compare .aff-compare__btn.aff-cta {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; padding: 0 18px; border-radius: 999px !important; border: 1px solid;
  font-size: 0.9375rem; line-height: 1.2; white-space: nowrap; text-decoration: none !important;
}
.aff-compare .aff-compare__rev { font-weight: 600; color: var(--ink); border-color: var(--ink); background: #fff; }
.aff-compare .aff-compare__rev:hover { background: color-mix(in srgb, var(--surface), var(--border) 45%); }
.aff-compare .aff-compare__btn.aff-cta { font-weight: 700; }
.aff-btn--square .aff-compare .aff-compare__rev, .aff-btn--square .aff-compare .aff-compare__btn.aff-cta { border-radius: 2px !important; }
.aff-compare .aff-asof--group { margin-top: 8px; }
@media (max-width: 768px) {
  .aff-compare__head { display: none; }
  .aff-compare__row { border-top: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 10px; }
  /* price under the name, not beside it: long names stay on 1-2 lines (site evaluation 2026-10-20) */
  .aff-compare__summary { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "product product" "price price" "facts toggle"; row-gap: 6px; }
  .aff-compare__pricecell { text-align: left; padding-left: 68px; }
  .aff-compare__product { grid-area: product; }
  .aff-compare__pricecell { grid-area: price; align-self: start; }
  .aff-compare__facts { grid-area: facts; }
  .aff-compare__toggle { grid-area: toggle; text-align: right; }
  .aff-compare__specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aff-compare__actions { justify-content: stretch; gap: 10px; }
  .aff-compare .aff-compare__actions .aff-compare__rev, .aff-compare .aff-compare__actions .aff-compare__btn.aff-cta { flex: 1 1 0; padding: 0 10px; }
}

/* ---------- "Read more" block: core Details with class aff-more (content
   pipeline 2026-10-20). Collapsed methodology/sources sections. ---------- */
.entry-content details.aff-more { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; margin: calc(var(--space-unit) * 1.25) auto; background: #fff; }
.entry-content details.aff-more > summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 12px 28px 12px 0; position: relative;
  font-weight: 600; color: var(--ink); line-height: 1.4;
}
.entry-content details.aff-more > summary::-webkit-details-marker { display: none; }
.entry-content details.aff-more > summary::after { content: "\25BE"; position: absolute; right: 2px; top: 12px; color: var(--brand); }
.entry-content details.aff-more[open] > summary::after { content: "\25B4"; }
.entry-content details.aff-more[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.entry-content details.aff-more > :not(summary) { max-width: 100%; }
.entry-content details.aff-more h3 { font-size: 1.05em; margin: 14px 0 6px; }
.entry-content details.aff-more > :last-child { margin-bottom: 14px; }

/* ---------- guide cards (homepage "Latest guides", 0.29.0) ---------- */
.aff-guide-cards { list-style: none; margin: var(--space-unit) auto calc(var(--space-unit) * 1.5); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.aff-guide-cards li { margin: 0; }
.entry-content a.aff-gcard, .aff-gcard, .aff-gcard * { text-decoration: none !important; }
.aff-gcard { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--body); transition: box-shadow 150ms ease-out, transform 150ms ease-out; }
.aff-gcard:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--ink), transparent 85%); transform: translateY(-2px); }
.aff-gcard__img { display: block; aspect-ratio: 1200 / 630; background: color-mix(in srgb, var(--surface), var(--border) 50%); }
.aff-gcard__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aff-gcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.aff-gcard__kicker { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.aff-gcard__title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.entry-content a.aff-gcard:hover .aff-gcard__title { text-decoration: underline !important; text-underline-offset: 2px; }
.aff-gcard__meta { margin-top: auto; font-size: 0.75rem; color: color-mix(in srgb, var(--body), var(--surface) 30%); }
@media (max-width: 899px) { .aff-guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .aff-guide-cards { grid-template-columns: 1fr; gap: 10px; }
  .aff-gcard { flex-direction: row; align-items: center; }
  /* whole image, never cropped (the cards carry text): fixed 1.9:1 thumbnail, centred */
  .aff-gcard__img { flex: 0 0 120px; width: 120px; aspect-ratio: 1200 / 630; align-self: center; margin-left: 10px; border-radius: calc(var(--radius) - 2px); overflow: hidden; }
  .aff-gcard__body { padding: 10px 12px; gap: 4px; }
  .aff-gcard__title { font-size: 0.9375rem; }
}
@media (prefers-reduced-motion: reduce) { .aff-gcard { transition: none; } .aff-gcard:hover { transform: none; } }

/* ---------- homepage v2 (owner 2026-10-21): section links under the hero; the
   old "Find your gear" block (wrapped in .aff-home-legacy) hides when v2 is on ---------- */
.aff-home-v2 .aff-home-legacy { display: none; }
.aff-chiplinks { display: flex; flex-wrap: wrap; gap: 10px; margin: calc(var(--space-unit) * 1.25) auto 0; }
.aff-chiplink { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; box-sizing: border-box; padding: 10px 16px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none !important; font-weight: 600; }
.aff-chiplink:hover { border-color: var(--brand); }
.aff-chiplink__count { font-size: 0.75rem; font-weight: 600; color: var(--brand); }
@media (max-width: 600px) {
  .aff-chiplinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .aff-chiplinks::-webkit-scrollbar { display: none; }
  .aff-chiplink { flex: 0 0 auto; }
}


/* ---------- section pages v2 (owner 2026-10-23; body.aff-hub-v2) ---------- */
/* the page's own "Latest guides" heading is replaced by the block's sections */
.aff-hub-v2 .entry-content > h2:has(+ .aff-hubx) { display: none; }
.aff-hubx__stats { margin: 0 0 calc(var(--space-unit) * 1.5); font-size: 0.875rem; color: color-mix(in srgb, var(--body), var(--surface) 30%); }
.aff-hubx__h { margin: calc(var(--space-unit) * 2) 0 var(--space-unit); }
.aff-guide-cards--start { margin-bottom: var(--space-unit); }
@media (min-width: 769px) {
  .aff-guide-cards--start .aff-gcard__title { font-size: 1.125rem; }
}
/* chips: radio inputs hidden, labels are the pills; filtering is pure CSS (:has) */
.aff-hubx__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-unit); }
.aff-hubx__chips input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.aff-hubx__chips label {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--border);
  border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 0.9375rem; cursor: pointer; user-select: none;
}
.aff-hubx__chips label:hover { border-color: var(--brand); }
.aff-hubx__chips input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.aff-hubx__chips input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Learn strip: compact link cards */
.aff-hubx__learn { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: calc(var(--space-unit) * 2); }
.aff-hubx__learn a {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none !important; font-weight: 600; line-height: 1.35;
}
.aff-hubx__learn a:hover span { text-decoration: underline; text-underline-offset: 2px; }
.aff-hubx__learn small { font-weight: 400; color: color-mix(in srgb, var(--body), var(--surface) 30%); }
/* the section block is wider than the reading column: guides are a grid, not prose */
@media (min-width: 900px) {
  .aff-hub-v2 .entry-content > .aff-hubx { width: min(1000px, calc(100vw - 64px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
}
.aff-hubx__more { text-align: center; margin: calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 1.5); }
.aff-hubx__more input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.aff-hubx__more label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 22px; border: 1px solid var(--ink);
  border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer;
}
.aff-hubx__more label:hover { background: var(--ink); color: var(--surface); }
.aff-hubx__more input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

/* aff/tool — interactive calculators (0.36.0). Tokens only; families restyle through --radius/--brand/--ink. */
.aff-tool { margin: 32px 0; padding: 20px 22px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 0 rgba(15,23,42,.04); }
.aff-tool__title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.aff-tool__title::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.45em; border-radius: 2px; background: var(--brand); vertical-align: 0.05em; }
.aff-tool__form { margin: 0; }
.aff-tool__switches { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px; }
.aff-tool__switch { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aff-tool__switch legend { float: left; margin-right: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--body); }
.aff-tool__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.aff-tool__switch label { display: inline-block; padding: 6px 12px; min-height: 32px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; line-height: 1.4; cursor: pointer; color: var(--ink); background: #fff; }
.aff-tool__switch input:checked + label { background: var(--ink); border-color: var(--ink); color: #fff; }
.aff-tool__switch input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.aff-tool__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.aff-tool__field[hidden] { display: none; }
.aff-tool__field label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--body); margin-bottom: 4px; }
.aff-tool__input { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: calc(var(--radius) * 0.6); overflow: hidden; background: #fff; }
.aff-tool__input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand), transparent 82%); }
.aff-tool__input input { flex: 1; min-width: 0; border: 0 !important; padding: 9px 10px; font-size: 1rem; background: transparent; color: var(--ink); box-shadow: none !important; outline: none; -moz-appearance: textfield; }
.aff-tool__input input::-webkit-outer-spin-button, .aff-tool__input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.aff-tool__unit { display: flex; align-items: center; padding: 0 10px; font-size: 0.8125rem; color: var(--body); background: var(--surface); border-left: 1px solid var(--border); }
.aff-tool__out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; }
.aff-tool__out > div { margin: 0; padding: 12px 14px; border-radius: calc(var(--radius) * 0.6); background: var(--surface); border-left: 3px solid var(--brand); }
.aff-tool__out dt { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--body); }
.aff-tool__out dd { margin: 4px 0 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--ink); font-variant-numeric: tabular-nums; }
.aff-tool__alt { display: block; margin-top: 1px; font-size: 0.8125rem; font-weight: 500; color: var(--body); font-style: normal; text-transform: none; }
.aff-tool__note { margin: 14px 0 0 !important; font-size: 0.8125rem !important; line-height: 1.55 !important; color: var(--body); }
@media (max-width: 600px) {
  .aff-tool { padding: 16px 14px 14px; }
  .aff-tool__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 10px; }
  .aff-tool__out { gap: 8px; }
  .aff-tool__out > div { padding: 10px 10px; }
  .aff-tool__out dt { font-size: 0.6875rem; letter-spacing: 0.04em; }
  .aff-tool__out dd { font-size: 1rem; }
  .aff-tool__switch legend { float: none; width: 100%; margin: 0 0 2px; }
}

/* AAWP converter (0.37.0): inline price stamp inside AAWP-era markup */
.aff-asof--inline { font-size: 0.75em; font-weight: 400; opacity: .8; white-space: nowrap; }
