/* Research reports. Loaded only by /research/<study>/ pages, on top of the
   guide layout (guide-detail rb-editorial). Colours come from styles.css
   tokens; the few research-only shades are named here once. */
.rx-page {
  --rx-ink: var(--ink);
  --rx-muted: var(--muted);
  --rx-line: var(--line);
  --rx-accent: var(--purple);
  --rx-accent-soft: var(--lav);
  --rx-warm: var(--surface2, #fff7fb);
  --rx-track: var(--surface3, #f5efff);
}

/* Findings card: the answer before the method. */
.rx-answer { max-width: 720px; margin: 0 0 40px; padding: 28px 30px 30px; border-radius: 20px; background: var(--rx-accent-soft); }
.rx-kicker { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rx-accent); }
.rx-answer p { margin: 0 0 12px; font-size: 18px; line-height: 1.62; color: var(--rx-ink); max-width: none !important; }
.rx-answer p:last-of-type { margin-bottom: 0; }
.rx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.rx-stats div { padding: 16px 16px 14px; border-radius: 14px; background: #fff; }
.rx-stats strong { display: block; font-size: clamp(30px, 3.4vw, 40px); line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-stats span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--rx-muted); }

/* Bar comparisons: plain CSS, one value per row, readable without colour. */
.rx-bars { max-width: 720px; margin: 28px 0 32px; }
.rx-bars h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.35; font-weight: 750; color: var(--rx-ink); }
.rx-bars ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rx-bars li { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 64px; align-items: center; gap: 14px; font-size: 15px; color: var(--rx-ink); }
.rx-bars li i { position: relative; height: 12px; border-radius: 6px; background: var(--rx-track); overflow: hidden; }
.rx-bars li i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); min-width: 3px; border-radius: 6px; background: var(--rx-accent); }
.rx-bars li b { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.rx-bars figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--rx-muted); }

/* Real output excerpts, side by side on wide screens. */
.rx-example { max-width: 720px; margin: 24px 0 32px; border: 1px solid var(--rx-line); border-radius: 18px; overflow: hidden; }
.rx-example figcaption { padding: 14px 20px; font-size: 14px; font-weight: 700; color: var(--rx-ink); border-bottom: 1px solid var(--rx-line); }
.rx-example > div { padding: 16px 20px 18px; }
.rx-example > div + div { border-top: 1px solid var(--rx-line); }
.rx-example small { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rx-muted); }
.rx-example p { margin: 0 0 6px !important; font-size: 15px !important; line-height: 1.6 !important; color: var(--rx-ink); max-width: none !important; }
.rx-ex-prompt { background: var(--rx-warm); }

/* Method facts. */
.rx-method { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); max-width: 720px; margin: 18px 0 24px; border-top: 1px solid var(--rx-line); }
.rx-method dt, .rx-method dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rx-line); font-size: 15px; line-height: 1.5; }
.rx-method dt { font-weight: 700; color: var(--rx-ink); padding-right: 16px; }
.rx-method dd { color: var(--rx-muted); }

/* Claim boundary. */
.rx-boundary { max-width: 720px; margin: 28px 0; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--rx-line); background: #fff; }
.rx-boundary strong { display: block; margin-bottom: 8px; font-size: 17px; color: var(--rx-ink); }
.rx-boundary p { margin: 0 0 8px !important; font-size: 15px !important; line-height: 1.6 !important; color: var(--rx-muted); }

/* Raw data downloads. */
.rx-data { display: grid; max-width: 720px; margin: 16px 0 8px; border-top: 1px solid var(--rx-line); }
.rx-data a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--rx-line); font-size: 15px; font-weight: 650; color: var(--rx-ink); }
.rx-data a b { color: var(--rx-accent); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.rx-data a:hover b { transform: translateY(2px); }

.rx-page .guide-prose h3 { margin: 32px 0 10px; font-size: 20px; line-height: 1.3; }

@media (max-width: 560px) {
  .rx-answer { padding: 22px 20px 22px; }
  .rx-answer p { font-size: 17px; }
  .rx-stats { grid-template-columns: 1fr; gap: 8px; }
  .rx-stats div { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 16px; }
  .rx-stats strong { font-size: 28px; }
  .rx-stats span { margin-top: 0; }
  .rx-bars li { grid-template-columns: minmax(0, 1fr) 56px; gap: 6px 10px; }
  .rx-bars li i { grid-column: 1 / -1; grid-row: 2; }
  .rx-method { grid-template-columns: 1fr; }
  .rx-method dt { padding-bottom: 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .rx-data a b { transition: none; } }

/* Before/after idea lists. Flags use a mark plus a text style, never colour alone. */
.rx-compare { max-width: 720px; margin: 24px 0 32px; }
.rx-cmp-title { margin-bottom: 12px; font-size: 17px; font-weight: 750; color: var(--rx-ink); }
.rx-cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rx-cmp-cols > div { padding: 16px 18px 18px; border-radius: 16px; background: var(--rx-accent-soft); }
.rx-cmp-cols > div + div { background: var(--rx-warm); }
.rx-cmp-cols small { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rx-muted); }
.rx-cmp-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rx-cmp-cols li { margin: 0 !important; padding: 9px 12px; border-radius: 10px; background: #fff; font-size: 15px !important; line-height: 1.4 !important; color: var(--rx-ink); }
.rx-cmp-cols li.is-flag { color: var(--rx-muted); text-decoration: line-through; text-decoration-color: var(--pink); }
.rx-cmp-cols li.is-side { color: var(--rx-muted); outline: 1.5px dashed var(--rx-line); outline-offset: -1.5px; background: transparent; }
.rx-cmp-note { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--rx-muted); }
@media (max-width: 560px) { .rx-cmp-cols { grid-template-columns: 1fr; } }

/* Research hub: findings first, then studies, then how we test. Typography
   and rules carry the page; no hero picture, no card grid. */
.rx-hub-page { --rx-ink: var(--ink); --rx-muted: var(--muted); --rx-line: var(--line); --rx-accent: var(--purple); }
.rx-hub-hero { padding: clamp(128px, 12vw, 168px) 0 clamp(48px, 6vw, 72px); background: linear-gradient(180deg, var(--lav), #fff); }
.rx-hub-hero h1 { max-width: 14ch; margin: 0; font-size: clamp(42px, 6.2vw, 84px); line-height: 1; letter-spacing: -.045em; color: var(--rx-ink); }
.rx-hub-lede { max-width: 52ch; margin: 24px 0 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--rx-muted); }
.rx-hub-meta { margin: 20px 0 0; font-size: 14px; font-weight: 750; color: var(--rx-ink); }
.rx-hub-block { padding: clamp(48px, 6vw, 80px) 0 0; }
.rx-hub-block h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -.03em; color: var(--rx-ink); }
.rx-hub-intro { max-width: 60ch; margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: var(--rx-muted); }

/* Three headline findings. */
.rx-finds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 28px; }
.rx-find { display: block; padding-top: 18px; border-top: 3px solid var(--rx-ink); color: inherit; }
.rx-find > span { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rx-muted); }
.rx-find strong { display: block; margin-top: 12px; font-size: clamp(40px, 4.4vw, 56px); line-height: 1; font-weight: 700; letter-spacing: -.035em; color: var(--rx-ink); font-variant-numeric: tabular-nums; white-space: nowrap; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.rx-find p { margin: 12px 0 0; max-width: 32ch; font-size: 15.5px; line-height: 1.5; color: var(--rx-muted); }
.rx-find:hover strong { transform: translateX(4px); }

/* Before/after numbers: the old value muted, the new one in ink, a thin
   accent arrow between. Calmer than a purple number. */
.rx-before { color: var(--rx-muted); font-weight: 500; opacity: .75; }
.rx-to { display: inline-block; margin: 0 .22em; font-style: normal; font-weight: 400; color: var(--rx-accent); }
.rx-row-stat { padding-left: 18px; border-left: 1px solid var(--rx-line); }

/* The experiments: question, answer, one number. */
.rx-index { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--rx-line); }
.rx-row { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 240px 32px; gap: 8px 32px; align-items: center; padding: 26px 8px; border-bottom: 1px solid var(--rx-line); transition: background .2s cubic-bezier(.22, 1, .36, 1); }
.rx-row:hover { background: var(--lav); }
.rx-row-id { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rx-muted); }
.rx-row-main h3 { margin: 0; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; letter-spacing: -.015em; color: var(--rx-ink); }
.rx-row-main h3 a::after { content: ""; position: absolute; inset: 0; }
.rx-row-main p { margin: 6px 0 0; max-width: 62ch; font-size: 16px; line-height: 1.55; color: var(--rx-muted); }
.rx-row-main .rx-row-note { font-size: 14px; color: var(--rx-muted); opacity: .85; }
.rx-row-stat strong { display: block; font-size: clamp(22px, 2vw, 26px); line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--rx-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-row-stat > span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--rx-muted); }
.rx-row-arrow { font-style: normal; font-size: 20px; color: var(--rx-accent); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.rx-row:hover .rx-row-arrow { transform: translateX(4px); }

/* How we test. */
.rx-method-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.rx-method-cols h3 { margin: 0; font-size: 18px; line-height: 1.3; color: var(--rx-ink); }
.rx-method-cols p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--rx-muted); }

/* What every study publishes. */
.rx-hub-show h2 { max-width: 22ch; }
.rx-show { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.rx-show div { padding: 18px 20px; border-radius: 14px; background: var(--lav); }
.rx-show strong { display: block; font-size: 16px; color: var(--rx-ink); }
.rx-show span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--rx-muted); }

/* Read next. */
.rx-hub-next { padding-bottom: clamp(64px, 8vw, 104px); }
.rx-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: 20px; border-top: 1px solid var(--rx-line); }
.rx-next a { position: relative; display: block; padding: 20px 32px 20px 0; border-bottom: 1px solid var(--rx-line); color: inherit; }
.rx-next strong { display: block; font-size: 17px; color: var(--rx-ink); }
.rx-next span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--rx-muted); }
.rx-next b { position: absolute; right: 4px; top: 20px; color: var(--rx-accent); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.rx-next a:hover b { transform: translateX(4px); }

@media (max-width: 900px) {
  .rx-finds, .rx-method-cols { grid-template-columns: 1fr; gap: 28px; }
  .rx-row { grid-template-columns: 40px minmax(0, 1fr); padding: 22px 4px; }
  .rx-row-stat { grid-column: 2; }
  .rx-row .rx-icon { width: 40px; height: 40px; }
  .rx-row-stat { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; padding-left: 0; border-left: 0; }
  .rx-row-stat > span { margin-top: 0; }
  .rx-row-arrow { display: none; }
  .rx-show { grid-template-columns: 1fr 1fr; }
  .rx-next { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .rx-show { grid-template-columns: 1fr; }
  .rx-row-stat strong { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .rx-row, .rx-row-arrow, .rx-find strong, .rx-next b { transition: none; } }

/* Licence line under the raw data downloads. */
.rx-license { max-width: 720px; margin: 10px 0 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--rx-muted); }
.rx-license a { color: var(--rx-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Custom 3D icons: decorative anchors for findings and study rows. */
.rx-icon { display: block; width: 52px; height: 52px; object-fit: contain; }
.rx-row .rx-icon { align-self: start; margin-top: 2px; }
.rx-find .rx-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.rx-cmp-cols li.is-flag { display: flex; align-items: center; gap: 8px; }
.rx-flag { flex: none; width: 18px; height: 18px; }
