/* toolbout conversion polish (patch toolbout-conversion-20261115).
   Buy-path buttons under the verdict and in the "Try it" note, a slim mobile
   verdict bar, and small one-time motion. Motion uses transform and opacity
   only, plays once, and is off under prefers-reduced-motion and under
   html.a11y-nomotion, where everything is simply visible. */

/* ---------- the affiliate button (same .btn .btn--primary component) ---------- */
.tb-cta-btn {
  min-height: 44px;
  justify-content: center;
  text-align: center;
  /* the live .btn list, with a faster press: hover colour and shadow still fade */
  transition: transform 0.16s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.25s;
}
.tb-cta-btn:hover,
.tb-cta-btn:focus-visible { color: var(--paper); }
/* every button answers a press (existing .btn and .nav-cta included) */
.btn:active, .nav-cta:active, .tb-cta-btn:active { transform: scale(0.97); transition-duration: 0.12s; }
.btn:focus-visible, .nav-cta:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.tb-cta-arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease-out);
}
/* clicked, browser leaving: the arrow stays nudged forward (the label may say
   "Opening <domain>…" when that fits the same box) */
.tb-leaving { cursor: progress; }
.tb-leaving .tb-cta-arrow { transform: translateX(3px); }

/* top: directly under the verdict card, before the scorecard */
.tb-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
}
.tb-cta-note { font-size: 0.85rem; line-height: 1.45; }
/* phones: the floating accessibility button (48px, right edge) never sits on the disclosure */
@media (max-width: 640px) {
  .tb-cta-note { max-width: calc(100% - 44px); }
}

/* bottom: the "Try it" note becomes a button block */
.note.tb-cta-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
}
.note.tb-cta-block > .small { flex-basis: 100%; font-size: 0.85rem; line-height: 1.45; }

/* trust row: only facts already on the page (vendor domain from Sources,
   verification date, Sources count, the method page); ul.tb-trust beats .article-body ul */
ul.tb-trust {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.tb-trust li { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 24px; }
/* phones: one fact per line instead of an accidental 1/1/2/1 wrap */
@media (max-width: 640px) {
  ul.tb-trust { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
}
.tb-trust-icon { flex: none; color: var(--sage); }
.tb-trust a {
  display: inline-block;
  padding-block: 3px; /* a 24px-tall target (WCAG 2.5.8) inside the 24px row */
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--copper); /* 3.8:1 on paper, 3.3:1 on the note tint */
  text-underline-offset: 3px;
}
.tb-trust a:hover { color: var(--copper-deep); text-decoration-color: currentColor; }
.note.tb-cta-block .tb-trust { padding-top: 0.6rem; border-top: 1px solid var(--line-strong); }
#sources { scroll-margin-top: 100px; }

/* ---------- verdict bar ----------
   phones: stands in for the top button whenever that button is off screen.
   wide screens: only on a short window where the top button starts below the
   fold; it leaves for good once the button has been seen. No JS: stays hidden. */
.tb-sticky[hidden] { display: none; }
.tb-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9980; /* under .a11y-fab (9990) and the newsletter banner (99990) */
  display: flex;
  flex-wrap: wrap; /* small phones: the button drops to its own row, the verdict is never cut */
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.6rem 16px calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -8px 24px rgba(33, 26, 19, 0.08);
  transform: translateY(110%);
  visibility: hidden;
  /* leaving is quicker than arriving */
  transition: transform 0.18s var(--ease-out), visibility 0s linear 0.18s;
}
.tb-sticky.is-on {
  transform: none;
  visibility: visible;
  transition: transform 0.26s var(--ease-out), visibility 0s;
}
/* basis 0 + min-content floor: the bar breaks lines on the pill's width alone,
   so the disclosure sits beside the pill when there is room and under it when not */
.tb-sticky-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.5rem;
  flex: 1 1 0;
}
.tb-sticky-who {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--sage-tint);
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.tb-sticky-who svg { flex: none; }
.tb-sticky-disc { font-size: 0.75rem; line-height: 1.2; color: var(--ink-soft); }
.tb-sticky .tb-cta-btn {
  flex: 1 0 auto; /* fills the row it lands on */
  max-width: 100%; /* a long name at A++ wraps inside the bar instead of running past its padding */
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
}
/* wide screens: one centred row, pill and disclosure side by side */
@media (min-width: 721px) {
  .tb-sticky { flex-wrap: nowrap; justify-content: center; gap: 1.25rem; padding: 0.7rem clamp(1.25rem, 4vw, 2.5rem); }
  .tb-sticky-verdict { flex: none; flex-wrap: nowrap; gap: 0.6rem; }
  .tb-sticky .tb-cta-btn { flex: none; }
}

/* keep the accessibility button and panel clear of whichever bottom bar is up
   (mobile verdict bar or newsletter banner); --tb-lift is set by conversion.js.
   `translate` is its own property: it composes with the live hover and
   open/close `transform`s instead of replacing them. The live transition lists
   are repeated with `translate` appended (style.css .a11y-fab / .a11y-panel). */
html.tb-lift .a11y-fab,
html.tb-lift .a11y-panel {
  translate: 0 calc(-1 * var(--tb-lift, 0px) - 0.4rem);
}
.a11y-fab {
  transition: transform 0.3s var(--ease-out), border-color 0.25s, box-shadow 0.3s var(--ease-out),
    translate 0.26s var(--ease-out);
}
.a11y-panel {
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s,
    translate 0.26s var(--ease-out);
}

/* ---------- T2: free tier, home winners, table header link, byline ---------- */
/* free tier: the page table's own words, ink so it reads as a fact, not a link */
.tb-trust-free { color: var(--ink); }
/* a long free-tier cell wraps: the icon stays on the first line */
.tb-trust li:has(.tb-trust-free) { align-items: flex-start; }
.tb-trust li:has(.tb-trust-free) .tb-trust-icon { margin-top: 0.2em; }

/* home "Latest bouts": the bout page's verdict badge, same sage pill as the bar */
.bout-card .tb-card-who {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0.75rem 0 0;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: var(--sage-tint);
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}
.bout-card .tb-card-who svg { flex: none; }

/* comparison table: a quiet text link under the linked tool's name; the table
   scrolls inside its own box and its header is not sticky */
.htable thead th .tb-th-try {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  min-height: 24px; /* WCAG 2.5.8 target */
  margin-top: 0.15rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--copper-bright); /* 6.8:1 on espresso */
  text-decoration: underline;
  text-underline-offset: 3px;
}
.htable thead th .tb-th-try:hover { color: var(--bone); }
.htable thead th .tb-th-try:focus-visible { outline: 2px solid var(--copper-bright); outline-offset: 2px; }
.tb-th-disc { display: block; font-family: var(--sans); font-size: 0.72rem; line-height: 1.3; color: var(--line); }

/* one loud button per page: where the patch adds "Try <Tool>" (body.tb-buy-page),
   the nav "Find your winner" becomes the outline version, tokens only. The ring
   is an inset shadow, not a border, so the box keeps its live size. No transition
   is written here: the live `a { transition: color }` and the press scale stay. */
body.tb-buy-page .nav-links .nav-cta {
  background: transparent;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px var(--ink-faint);
}
body.tb-buy-page .nav-links .nav-cta:hover,
body.tb-buy-page .nav-links .nav-cta:active {
  background: var(--copper-tint);
  color: var(--copper-deep) !important;
  box-shadow: inset 0 0 0 1px var(--copper-deep);
}

/* the byline before Sources (two sentences from /method) */
.tb-byline { margin: 1.75rem 0 0.75rem; font-size: 0.85rem; line-height: 1.55; color: var(--ink-soft); }
.tb-byline a {
  display: inline-block;
  padding-block: 3px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 3px;
}
.tb-byline a:hover { color: var(--copper-deep); }

/* ---------- motion: one entrance per bout page ---------- */
/* the verdict card is there at once; the button settles under it, the trust
   facts follow 40ms apart, then the scorecard bars grow as the evidence */
.tb-cta[data-tb-cta="top"] > .tb-cta-btn,
.tb-cta[data-tb-cta="top"] > .tb-cta-note { animation: tb-settle 0.2s var(--ease-out) both; }
.tb-cta[data-tb-cta="top"] .tb-trust li { animation: tb-settle 0.2s var(--ease-out) both; }
.tb-cta[data-tb-cta="top"] .tb-trust li:nth-child(1) { animation-delay: 0.04s; }
.tb-cta[data-tb-cta="top"] .tb-trust li:nth-child(2) { animation-delay: 0.08s; }
.tb-cta[data-tb-cta="top"] .tb-trust li:nth-child(3) { animation-delay: 0.12s; }
.tb-cta[data-tb-cta="top"] .tb-trust li:nth-child(4) { animation-delay: 0.16s; }

/* scorecard bars: a 40ms cascade, verdict row last (pages without a top button) */
.scorecard--article .score-row:nth-child(2) .score-fill { animation-delay: 0.04s; }
.scorecard--article .score-row:nth-child(3) .score-fill { animation-delay: 0.08s; }
.scorecard--article .score-row:nth-child(4) .score-fill { animation-delay: 0.12s; }
.scorecard--article .score-row:nth-child(5) .score-fill { animation-delay: 0.16s; }
.scorecard--article .score-row:nth-child(6) .score-fill { animation-delay: 0.2s; }
/* with a top button the same cascade follows the trust facts, from 200ms */
.tb-cta + .scorecard--article .score-row:nth-child(1) .score-fill { animation-delay: 0.2s; }
.tb-cta + .scorecard--article .score-row:nth-child(2) .score-fill { animation-delay: 0.24s; }
.tb-cta + .scorecard--article .score-row:nth-child(3) .score-fill { animation-delay: 0.28s; }
.tb-cta + .scorecard--article .score-row:nth-child(4) .score-fill { animation-delay: 0.32s; }
.tb-cta + .scorecard--article .score-row:nth-child(5) .score-fill { animation-delay: 0.36s; }
.tb-cta + .scorecard--article .score-row:nth-child(6) .score-fill { animation-delay: 0.4s; }
@keyframes tb-settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* the winner's column gets one soft sage pass when the table enters view */
.htable td.tb-col-pass { position: relative; z-index: 0; }
.htable td.tb-col-pass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sage-tint);
  opacity: 0;
  pointer-events: none;
  animation: tb-col-pass 0.9s var(--ease-soft) var(--tb-d, 0ms) both;
}
@keyframes tb-col-pass {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

/* arrows nudge on hover (pointer devices only) */
.workflow-options a > span[aria-hidden="true"]:last-child {
  display: inline-block;
  transition: transform 0.2s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tb-cta-btn:hover .tb-cta-arrow { transform: translateX(3px); }
  .workflow-options a:hover > span[aria-hidden="true"]:last-child { transform: translate(2px, -2px); }
}

/* ---------- motion off: everything simply visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .tb-cta > *, .tb-trust li, .tb-cta-btn, .tb-cta-arrow, .tb-sticky, .tb-sticky.is-on,
  .htable td.tb-col-pass::before,
  .workflow-options a > span[aria-hidden="true"]:last-child { animation: none !important; transition: none !important; }
  .tb-cta > *, .tb-trust li { opacity: 1; transform: none; }
  .htable td.tb-col-pass::before { opacity: 0; }
  .btn:active, .nav-cta:active, .tb-cta-btn:active,
  .tb-cta-btn:hover .tb-cta-arrow,
  .workflow-options a:hover > span[aria-hidden="true"]:last-child { transform: none; }
}
html.a11y-nomotion .tb-cta > *,
html.a11y-nomotion .tb-trust li { animation: none; opacity: 1; transform: none; }
html.a11y-nomotion .htable td.tb-col-pass::before { animation: none; opacity: 0; }
html.a11y-nomotion .btn:active,
html.a11y-nomotion .nav-cta:active,
html.a11y-nomotion .tb-cta-btn:active,
html.a11y-nomotion .tb-cta-btn:hover .tb-cta-arrow,
html.a11y-nomotion .workflow-options a:hover > span[aria-hidden="true"]:last-child { transform: none; }

/* ---------- QA Minor 2026-11-27 ---------- */
/* TB-8: who wrote it and when, right under the title */
.article-hero .tb-dateline, .tb-dateline { margin: 0.6rem 0 1.25rem; font-family: var(--sans); font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }
.tb-dateline a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.tb-dateline a:hover { color: var(--copper-deep); }
/* TB-9: three related bouts after the sources */
.tb-related { padding: 0 0 3rem; }
.tb-related .wrap { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; }
.tb-related h2 { margin: 0 0 0.75rem; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.tb-related ul { list-style: none; margin: 0; padding: 0; }
.tb-related li { border-bottom: 1px solid var(--line); }
.tb-related li a { display: block; padding: 0.8rem 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; color: var(--ink); text-decoration: none; transition: color 0.2s var(--ease-out); }
.tb-related li a:hover { color: var(--copper-deep); }
.tb-related p { margin: 1rem 0 0; font-size: 0.9rem; }
.tb-related p a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
/* TB-11: the affiliate note under "Try" is readable, not hairline-faint */
.tb-th-disc { color: #cfc4b3; font-size: 0.75rem; }
