/* Research host report theme (owned by the theme task).
   Calm technical-report look: warm paper, charcoal text, Libertinus + Share Tech Mono.
   Loads after site.css and the explorer CSS; charts live in research-charts.css. */

/* ------------------------------------------------------------------ tokens */
:root {
  --paper: #f8f6f1;
  --ink: #2a2a2c;
  --ink-strong: #0a0a0b;
  --ink-muted: #55555a;
  --rule: rgba(42, 42, 44, 0.16);
  --rule-strong: rgba(42, 42, 44, 0.45);
  --c-own: #b5d6c0;
  --c-wash: rgba(181, 214, 192, 0.22);
  --c-none: #cdd5f3;
  --c-leak: #f1b8b0;
  --c-neutral: #d9d6cf;
  --c-highlight: #b5d6c0;
  --c-highlight-hover: color-mix(in srgb, var(--c-highlight) 78%, var(--ink));
  --card: rgba(255, 255, 255, 0.55);
  --read: 65ch;
}

/* Re-map the original tokens so every untouched component inherits the palette. */
:root {
  --caeliai-bg: var(--paper);
  --caeliai-line: var(--rule);
  --caeliai-line-strong: var(--rule-strong);
  --caeliai-sage: var(--c-own);
  --caeliai-sage-wash: var(--c-wash);
  --caeliai-red: var(--ink);
  --shadow-soft: none;
  --section-gap: clamp(3rem, 6vw, 5rem);
  --muted: var(--ink-muted);
}

/* ------------------------------------------------------------------ base */
html { background: var(--paper); }
body.site-shell {
  background: var(--paper);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.6;
}
.site-shell::before { content: none; }
::selection { background: var(--c-highlight); color: var(--ink-strong); }

.page-editorial { --page-max: 64rem; --content-max: 100%; --page-pad: clamp(1.1rem, 4vw, 2.5rem); }
.page-editorial .container.narrow { width: min(calc(100% - (var(--page-pad) * 2)), 46rem); }

:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------------ links */
main :is(p, li, dd, td, figcaption, blockquote, summary) a:not([class]) {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--c-highlight), var(--c-highlight));
  background-repeat: no-repeat;
  background-position: 0 94%;
  background-size: 100% 0.4em;
  transition: background-color 160ms ease, background-size 160ms ease;
  overflow-wrap: anywhere;
}
main :is(p, li, dd, td, figcaption, blockquote, summary) a:not([class]):hover {
  background-image: linear-gradient(var(--c-highlight-hover), var(--c-highlight-hover));
  background-size: 100% 0.62em;
}

mark,
.report-takeaways mark {
  background: var(--c-highlight);
  color: var(--ink);
  padding: 0.04em 0.22em;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------------ type */
h1, h2, h3, h4 { font-weight: 400; color: var(--ink-strong); text-wrap: balance; }
.page-editorial .plain-hero-title,
.page-editorial .plain-hero-title--wide,
.page-editorial h1[data-fit-headline] {
  max-width: 26ch;
  margin: 0;
  font-size: clamp(2rem, 1.25rem + 2.9vw, 3.1rem) !important;
  line-height: 1.12;
  letter-spacing: -0.012em;
  font-weight: 400;
}
.page-editorial .section-heading h2,
.page-editorial .article-prose--longform > h2,
.page-detail .section-heading h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.2vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.008em;
}
.page-editorial .article-prose--longform > h3 { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem); line-height: 1.25; letter-spacing: 0; }
.step-row h3, .simple-card h3, .ref-row__body h3, .page-editorial .ref-row__body h3, .page-editorial .ref-row--featured .ref-row__body h3 {
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: 0;
}
.page-editorial .ref-row--featured .ref-row__body h3 { font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.65rem); }
.section-heading p, .page-home .section-heading p,
.hero__lede, .page-editorial .study-hero__lede, .page-editorial .hero__lede--statement {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: var(--read);
  color: var(--ink);
}
.hero__caption, .article-manuscript-note { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.6; color: var(--ink-muted); max-width: var(--read); letter-spacing: 0; }
.article-prose p, .article-prose--longform > p,
.article-prose ul, .article-prose ol,
.step-row p, .ref-row__body p, .faq-item p, .simple-card p, .study-card p:not([class]), .detail-card p:not([class]), .quote-panel p:not([class]), .signal-card p:not([class]) {
  max-width: var(--read);
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink);
}
.page-report .article-prose--longform > p,
.page-report .article-prose--longform > ul,
.page-report .article-prose--longform > ol { max-width: var(--read); }
.page-report .study-hero__copy, .page-report .article-prose--longform { margin-inline: 0; width: min(100%, 46rem); }
.page-report .article-prose--longform .article-quote, .page-report .article-callout { max-width: var(--read); }

/* small mono labels: everything that should read as a label, kept small and muted */
.publication-kicker, .publication-meta, .method-line, .inline-meta, .article-byline,
.paper-meta, .abstract-block__label, .chip, .eyebrow, .section-label, .section-mark,
.back-link, .report-label, .colophon, .ref-row__meta, .ref-row__index, .step-row__num,
.figure-plate__head, .evidence-figure__caption, .evidence-figure__legend, .evidence-figure__note,
.study-media__label, .study-media__meta, .consensus-item__meta, .publication-contents,
.metric__label, .hbar__name, .split-legend, .ui-divide__status, .note-aside__note,
.figure-plate__note, .page-editorial .figure-plate__note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.publication-kicker::before, .chip::before, .page-editorial .publication-kicker::before, .chip--live::before {
  width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; border-radius: 50%;
  background: var(--c-own); box-shadow: 0 0 0 1px var(--ink); vertical-align: 0.04em;
}
.publication-meta, .paper-meta strong, .article-byline span { color: var(--ink); }
.method-line, .page-editorial .study-hero__copy > .method-line { padding: 0; border: 0; max-width: none; }
.evidence-figure__note, .figure-plate__note { text-transform: none; letter-spacing: 0.02em; font-size: 0.72rem; }
.section-mark { white-space: normal; }
.section-mark::after { content: none; }
.article-byline span + span::before { color: var(--ink-muted); }
.paper-meta { border: 0; padding: 0; margin-bottom: 0; gap: 0.4rem 1.5rem; }
.colophon, .page-genesis-03 .colophon { border: 0; padding-top: 0; }

/* any remaining low-alpha text colour from site.css becomes the solid muted ink (>= 4.5:1 on paper and pastel) */
.direct-list strong, .card-label, .metric-label, .shift-panel__title, .shift-reply, .shift-card__name,
.rail-row__step, .rail-row__items em, .article-author-line, .testimonial-row__attribution,
.sg-item__label, .sg-proposal__head, .evidence-card__results, .comp-strip__label, .rlog__date,
.fnref, .footnotes, .video-placeholder__eyebrow, .form-note, .form-status { color: var(--ink-muted); }

/* ------------------------------------------------------------------ header / footer */
.site-header, .page-editorial .site-header {
  position: relative;
  background: var(--paper);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--rule);
}
.page-editorial .site-header__inner { min-height: 0; padding: 1rem 0; gap: 0.75rem 2rem; flex-wrap: wrap; }
.wordmark img { width: 38px; height: 38px; }
.wordmark__title { font-size: 0.95rem; letter-spacing: 0.24em; color: var(--ink-strong); }
.wordmark__meta, .page-editorial .wordmark__meta { font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink-muted); max-width: none; }
.site-nav, .page-editorial .site-nav { gap: 0.25rem 1.4rem; }
.site-nav a, .page-editorial .site-nav a {
  isolation: isolate;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  padding: 0.25rem 0;
}
.site-nav a::after {
  z-index: -1;
  height: 0.5em;
  bottom: 0.2rem;
  background: var(--c-highlight);
  transform: scaleX(0);
  transform-origin: left;
}
.site-nav a:hover::after, .site-nav a[aria-current='page']::after { transform: scaleX(1); }
.site-nav a[data-book-call] { padding: 0.35rem 0.85rem; border: 1px solid var(--rule-strong); border-radius: 999px; }
.site-nav a[data-book-call]::after { content: none; }
.site-nav a[data-book-call]:hover { background: var(--c-highlight); }

.site-footer, .page-editorial .site-footer {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: 0 0 2rem;
  background: transparent;
  border-top: 1px solid var(--rule);
}
.page-editorial .site-footer__inner { align-items: flex-start; padding: 1.5rem 0 0; }
.footer-note { max-width: 40ch; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: none; color: var(--ink-muted); }
.footer-links { gap: 0.4rem 1.2rem; font-size: 0.7rem; letter-spacing: 0.08em; }
.footer-links a, .footer-links span { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink-strong); background: linear-gradient(var(--c-highlight), var(--c-highlight)) 0 94% / 100% 0.4em no-repeat; }
.site-footer .wordmark__title { font-size: 0.85rem; }

/* ------------------------------------------------------------------ sections / hero */
.section { padding: clamp(2rem, 4.5vw, 3.25rem) 0; }
.section--tight { padding: clamp(1.5rem, 3.5vw, 2.5rem) 0; }
.quote-panel, .study-card, .detail-card { align-content: start; gap: 0.75rem; }
.study-summary-grid { align-items: start; }
.page-editorial main > .section + .section,
.page-editorial main > article > .section + .section { border-top: 0; }
.section.hero, .page-editorial .hero { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.study-hero__copy, .page-editorial .study-hero__copy, .paper-hero__copy { gap: 1rem; }
.page-editorial .study-hero, .page-editorial .hero__grid, .paper-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.study-hero__copy > p, .paper-hero__copy > p, .hero__copy > p, .lede-block > p { margin: 0; }
.hero__copy { display: grid; gap: 1rem; }
.back-link { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-muted); }
.back-link:hover { color: var(--ink-strong); }
.lede-block { gap: 0.9rem; }
.publication-contents {
  margin-top: 0.4rem; padding: 0.9rem 0 0; border-top: 1px solid var(--rule);
  gap: 0.4rem 1.1rem; letter-spacing: 0.08em;
}
.publication-contents > span { color: var(--ink-muted); }
.publication-contents a { color: var(--ink); border-bottom: 0; background: linear-gradient(var(--c-highlight), var(--c-highlight)) 0 96% / 100% 0.35em no-repeat; }
.publication-contents a:hover { background-image: linear-gradient(var(--c-highlight-hover), var(--c-highlight-hover)); }
.abstract-block { padding: 1.1rem 1.4rem; border: 0; border-left: 3px solid var(--c-own); background: var(--c-wash); border-radius: 0 10px 10px 0; max-width: 46rem; }
.abstract-block p { font-size: 1.2rem; line-height: 1.6; }
.study-abstract-body { max-width: var(--read); }
.study-abstract-body::first-letter { float: none; font-size: inherit; line-height: inherit; padding: 0; font-weight: inherit; color: inherit; }
.bullet-list, .bullet-list--spacious { gap: 0.55rem; padding-left: 1.2rem; }

/* ------------------------------------------------------------------ buttons */
.button, .page-editorial .button--primary, .page-editorial .button--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  text-align: center;
}
.page-editorial .button--ghost:hover, .button--ghost:hover { background: var(--c-highlight); border-color: var(--ink); color: var(--ink-strong); transform: none; }
.page-editorial .button--primary, .button--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.page-editorial .button--primary:hover, .button--primary:hover { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; transform: none; }
.button-row, .page-editorial .button-row { gap: 0.7rem; margin-top: 0.5rem; }

/* ------------------------------------------------------------------ report contract blocks */
.report-opening {
  position: relative;
  box-sizing: border-box;
  max-width: 46rem;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--c-wash);
  border-left: 3px solid var(--c-own);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
}
:is(main, article, section) > .report-opening {
  width: min(100% - 2 * var(--page-pad), 46rem);
  margin-left: max(var(--page-pad), calc((100% - var(--page-max)) / 2));
  margin-right: auto;
}
:is(main, article, section) > .rchart {
  box-sizing: border-box;
  width: min(100% - 2 * var(--page-pad), var(--page-max));
  margin-inline: auto;
}
.report-label { display: block; margin: 0 0 0.55rem; }
.report-summary { margin: 0 0 1.5rem; max-width: var(--read); font-size: 1.2rem; line-height: 1.55; color: var(--ink-strong); }
.report-takeaways { counter-reset: takeaway; display: grid; gap: 0.9rem; margin: 0 0 1.6rem; padding: 0; list-style: none; max-width: var(--read); }
.report-takeaways li { counter-increment: takeaway; position: relative; padding-left: 2.2rem; font-size: 1.12rem; line-height: 1.55; }
.report-takeaways li::before {
  content: counter(takeaway, decimal-leading-zero);
  position: absolute; left: 0; top: 0.2em;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-muted);
}
.report-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem; }
.report-tool, .cite-block > summary {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: 2.5rem; padding: 0.4rem 1rem;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.2; letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer; list-style: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.report-tool:hover, .cite-block > summary:hover { background: var(--c-highlight); border-color: var(--ink); color: var(--ink-strong); }
.cite-block > summary::-webkit-details-marker { display: none; }
.cite-block[open] > summary { background: var(--c-highlight); border-color: var(--ink); }
.cite-block { flex: 1 1 auto; min-width: 0; max-width: 100%; }
.cite-block[open] { flex-basis: 100%; }
.cite-block > .report-tool { margin-top: 0.1rem; }
.cite-block pre {
  box-sizing: border-box; max-width: 100%; margin: 0.8rem 0; padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink); font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; overflow: hidden;
}
.cite-block code { font-family: inherit; white-space: inherit; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ stat blocks, cards */
.signal-card, .signal-card.surface--sage, .surface--sage.signal-card, .page-editorial .signal-card.broken-frame {
  display: grid; gap: 0.9rem; padding: 0; background: transparent; border: 0; box-shadow: none;
}
.page-genesis-03 .study-hero__aside .signal-card { padding-top: 0; }
.study-hero__aside .signal-card > p:not([class]), .study-stack .signal-card > p:not([class]) { max-width: var(--read); }
.metric-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.metric { padding: 0.85rem 0 0; border-top: 1px solid var(--rule); }
.metric__value, .page-home .metric__value {
  font-family: var(--font-mono); font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); line-height: 1.15; color: var(--ink-strong); overflow-wrap: anywhere;
}
.metric__label { display: block; margin-top: 0.3rem; font-size: 0.68rem; }
.detail-kpis { gap: 0.75rem; }
.detail-kpi { padding: 0.9rem 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; }
.detail-kpi strong { font-family: var(--font-mono); font-weight: 400; font-size: 1.4rem; color: var(--ink-strong); overflow-wrap: anywhere; }
.detail-kpi span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); line-height: 1.5; display: block; }
.study-summary-grid { gap: 1.25rem; }
.detail-card, .study-card, .page-editorial .detail-card.broken-frame {
  align-content: start; padding: 1.25rem 1.4rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); box-shadow: none;
}
.page-genesis-03 .study-card { padding: 1.25rem 1.4rem; }
.simple-card, .page-editorial .simple-card { padding: 1rem 0 0; border: 0; border-top: 1px solid var(--rule); background: transparent; }
.quote-panel, .page-editorial .quote-panel.broken-frame, .quote-panel.surface--sage {
  padding: 0.2rem 0 0.2rem 1.4rem; background: transparent; border: 0; border-left: 3px solid var(--c-own); box-shadow: none; border-radius: 0;
}
.quote-panel blockquote, .study-quote, .quote-panel.surface--sage blockquote, .quote-panel.surface--sage .study-quote {
  border: 0; padding-left: 0; font-style: italic; color: var(--ink-strong); font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); line-height: 1.4;
}
.article-quote, .article-prose--longform .article-quote { border-left: 3px solid var(--c-own); color: var(--ink-strong); font-size: 1.2rem; line-height: 1.5; padding-left: 1.2rem; }
.article-callout { border: 0; border-left: 3px solid var(--c-own); background: var(--c-wash); border-radius: 0 10px 10px 0; }
.article-takeaway { color: var(--ink); }
.limitation-note {
  max-width: 46rem; padding: 1rem 1.3rem; border: 0; border-left: 3px solid var(--c-neutral);
  background: rgba(217, 214, 207, 0.3); border-radius: 0 10px 10px 0;
}
.limitation-note p { font-size: 1.05rem; }
.limitation-note .publication-kicker::before { content: none; }
.page-editorial .article-prose--longform :not(pre) > code, .article-prose :not(pre) > code {
  background: var(--c-wash); border: 1px solid var(--rule); border-radius: 3px; color: var(--ink);
}

/* figures */
.page-editorial .figure-plate, .page-editorial .figure-plate.broken-frame, .page-editorial .article-figure, .page-editorial .article-figure.broken-frame, .article-figure {
  padding: clamp(1rem, 2.5vw, 1.6rem); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: none;
}
.page-editorial .figure-plate__head { padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); font-size: 0.72rem; letter-spacing: 0.08em; }
.article-figure__caption, .article-figure__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-muted); line-height: 1.6; }
.evidence-figure { border-top: 1px solid var(--rule); }
.evidence-figure__bar, .split-bar, .page-editorial .split-bar { height: 22px; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; background: transparent; }
.evidence-figure__segment + .evidence-figure__segment, .split-bar__seg + .split-bar__seg { border-left: 1px solid var(--ink); }
.evidence-figure__segment--owns, .evidence-figure__swatch--owns, .split-bar__seg--winner, .split-legend__item--winner::before { background: var(--c-own); }
.evidence-figure__segment--leaks, .evidence-figure__swatch--leaks, .split-bar__seg--leak, .split-legend__item--leak::before { background: var(--c-leak); }
.evidence-figure__segment--none, .evidence-figure__swatch--none { background: var(--c-none); }
.split-bar__seg--loser, .split-legend__item--loser::before { background: var(--c-neutral); }
.evidence-figure__swatch, .split-legend__item::before { border: 1px solid var(--ink); border-radius: 2px; }
.split-headline__value, .stat-band__value { color: var(--ink-strong); font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); }
.split-headline__value--alert { border-bottom: 0; background: linear-gradient(var(--c-leak), var(--c-leak)) 0 92% / 100% 0.28em no-repeat; }
.stat-band__caption { border-bottom: 1px solid var(--rule); }
.split-headline__copy, .page-editorial .split-headline__copy { font-size: 1.15rem; }
.study-media__frame, .page-editorial .study-media__frame.broken-frame { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; }

/* horizontal bars (older papers and field study) */
.hbar__track { height: 18px; background: rgba(42, 42, 44, 0.06); border: 1px solid var(--rule-strong); border-radius: 4px; overflow: hidden; }
.hbar__track--pair { display: flex; }
.hbar__fill, .hbar:nth-child(2) .hbar__fill { background: var(--c-own); border-right: 1px solid var(--ink); }
.hbar__fill--own, .hbar:nth-child(2) .hbar__fill--own { background: var(--c-own); }
.hbar__fill--muted, .hbar:nth-child(2) .hbar__fill--muted { background: var(--c-neutral); }
.hbar__value { color: var(--ink-strong); font-size: 0.78rem; }

/* field-study components */
main figure { margin-inline: 0; }
.container > * + .article-figure, .container > * + .shopping-proof { margin-top: 1.75rem; }
.page-editorial .broken-frame { border-radius: 12px; border-color: var(--rule); box-shadow: none; }
.page-editorial .broken-frame::after { display: none; }
.manifest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin: 0.75rem 0; padding: 0; list-style: none; }
.manifest-grid li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); font-size: 1.05rem; }
.manifest-grid__num, .path-scorecard li > span, .rung-ladder__num, .shopping-proof__failure-mark { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-muted); }
.manifest-grid__runs { display: inline-flex; gap: 0.25rem; }
.manifest-grid__runs i { width: 0.7rem; height: 0.7rem; background: var(--c-own); border: 1px solid var(--ink); border-radius: 2px; }
.shopping-proof { display: grid; gap: 1.5rem; padding: clamp(1rem, 2.5vw, 1.6rem); background: var(--card); }
.shopping-proof__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1.5rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.shopping-proof__success { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.shopping-proof__failures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.shopping-proof__failures article { display: grid; gap: 0.3rem; align-content: start; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.shopping-proof__failures strong { font-weight: 400; font-size: 1.1rem; color: var(--ink-strong); line-height: 1.3; }
.shopping-proof__failures p { margin: 0; font-size: 1rem; line-height: 1.5; }
.ai-result-card { overflow: hidden; background: #fffdf9; border: 1px solid var(--rule-strong); border-radius: 10px; }
.ai-result-card__chrome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.ai-result-card__status { padding: 0.1rem 0.6rem; background: var(--c-own); border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); }
.ai-result-card__body { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 1rem; padding: 0.9rem; align-items: center; }
.ai-result-card__image { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 0.4rem; }
.ai-result-card__image svg { display: block; width: 100%; height: auto; }
.ai-result-card__copy { display: grid; gap: 0.25rem; min-width: 0; line-height: 1.35; }
.ai-result-card__copy strong { font-weight: 400; font-size: 1.1rem; color: var(--ink-strong); }
.ai-result-card__brand, .ai-result-card__price, .ai-result-card__merchant, .ai-result-card__url { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-muted); overflow-wrap: anywhere; }
.ai-result-card__price { color: var(--ink); }
.path-scorecard { display: grid; gap: 0.75rem; }
.path-scorecard__total { display: flex; align-items: baseline; gap: 0.8rem; }
.path-scorecard__total strong { font-family: var(--font-mono); font-weight: 400; font-size: 2rem; color: var(--ink-strong); }
.path-scorecard__total span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.path-scorecard ol { display: grid; margin: 0; padding: 0; list-style: none; }
.path-scorecard li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: 0.5rem; padding: 0.5rem 0; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.4; }
.rung-ladder { display: grid; gap: 0.35rem; margin: 0.75rem 0; padding: 0; list-style: none; }
.rung-ladder li { display: grid; grid-template-columns: 2rem minmax(7rem, 9rem) minmax(0, 1fr); align-items: baseline; gap: 0.25rem 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid transparent; border-top-color: var(--rule); border-radius: 6px; }
.rung-ladder strong { font-weight: 400; font-size: 1.1rem; color: var(--ink-strong); }
.rung-ladder__desc { font-size: 1rem; line-height: 1.45; }
.rung-ladder li.rung-ladder__rung--own { background: var(--c-own); border-color: var(--ink); }
.rung-ladder li.rung-ladder__rung--own .rung-ladder__num { color: var(--ink); }

/* tables, code, logs */
.research-table th { color: var(--ink-muted); border-bottom: 1px solid var(--ink); }
.research-table td { border-bottom: 1px solid var(--rule); }
.research-table .rt--win { box-shadow: inset 0 -3px 0 var(--c-own); border-bottom-color: var(--rule); color: var(--ink-strong); }
.research-table .rt--mid { color: var(--ink-muted); }
.research-table .rt--bad { color: var(--ink); box-shadow: inset 0 -3px 0 var(--c-leak); }
.scan-log, .article-code {
  box-sizing: border-box; max-width: 100%; background: rgba(255, 255, 255, 0.6); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 8px; font-size: 0.78rem; overflow-x: auto;
}
.scan-log__prompt { color: var(--ink-strong); }
.scan-log__win { color: var(--ink); background: var(--c-own); padding: 0 0.2em; }
.scan-log__leak { color: var(--ink); background: var(--c-leak); padding: 0 0.2em; }
.scan-log__lose { color: var(--ink-muted); }
.path-trace__node { border-color: var(--rule-strong); border-radius: 4px; color: var(--ink); }
.path-trace__node--ok { border-color: var(--ink); background: var(--c-own); border-width: 1px; }
.path-trace__node--break { border-color: var(--ink); background: var(--c-leak); border-style: solid; color: var(--ink); }
.path-trace__arrow, .path-trace__arrow--break, .path-trace__status { color: var(--ink-muted); }
.ui-divide__row--yes .ui-divide__name { box-shadow: inset 0 -3px 0 var(--c-own); }
.outcome-card--winner, .page-editorial .outcome-card--winner { border-color: var(--c-own); }
.outcome-card--leak, .page-editorial .outcome-card--leak { border-color: var(--c-leak); }
.outcome-card--loser, .page-editorial .outcome-card--loser { border-color: var(--c-neutral); }

/* ------------------------------------------------------------------ lists: papers, blog, steps, faq */
.ref-group-label { margin: 0 0 0.75rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.ref-row, .page-editorial .ref-row, .page-editorial .ref-row--featured {
  margin-inline: -0.9rem; padding: 1.5rem 0.9rem; border: 0; border-radius: 10px;
  background: linear-gradient(var(--rule), var(--rule)) 0.9rem 0 / calc(100% - 1.8rem) 1px no-repeat;
  transition: background-color 180ms ease;
}
.ref-list .ref-row:last-child { border-bottom: 0; }
.ref-row:hover, .ref-row:focus-within { background: var(--c-wash); }
.ref-row:hover .ref-row__index { color: var(--ink-muted); }
.ref-row__body h3 a { color: var(--ink-strong); text-decoration: none; }
.ref-row__body h3 a:hover { text-decoration: underline; text-decoration-color: var(--c-own); text-decoration-thickness: 0.18em; text-underline-offset: 0.15em; }
.ref-row__links { font-size: 0.72rem; letter-spacing: 0.08em; }
.ref-row__links a, .page-editorial .ref-row__links a {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.2rem 0.8rem;
  border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink); text-decoration: none;
}
.ref-row__links a:hover, .page-editorial .ref-row__links a:hover { background: var(--c-highlight); border-color: var(--ink); color: var(--ink-strong); }
.ref-row .chip--live, .ref-row__meta .chip--live { color: var(--ink); }
.step-row, .faq-item { border-top-color: var(--rule); }
.step-list .step-row:last-child, .faq-list .faq-item:last-child { border-bottom-color: var(--rule); }
.step-row:hover .step-row__num { color: var(--ink-muted); }
.faq-item summary { font-size: 1.12rem; font-weight: 400; color: var(--ink-strong); }
.faq-item summary::after { color: var(--ink-muted); }
.faq-item summary:focus-visible { outline-offset: 2px; }
.page-article .faq-item summary { font-size: 1.12rem; }
.agent-reading-note summary, .analysis-drawer > summary { cursor: pointer; }

/* blog / long-form article */
.page-editorial .article-prose h2, .page-blog .article-prose h2, .page-editorial .article-prose--longform > h2 {
  margin-top: 2.4rem; padding-top: 0; border-top: 0;
}
.page-editorial .article-prose--longform > h3 { padding-top: 0; border-top: 0; margin-top: 1.8rem; }
.page-editorial .article-prose h2:first-child, .page-editorial .article-prose--longform > h2:first-child { margin-top: 0; }
.article-prose--longform > hr { border-top-color: var(--rule); }
.article-sources, .page-blog .article-sources { border-top: 1px solid var(--rule); }
.article-sources p { color: var(--ink); }
.article-cta h2 { max-width: 28ch; }
.article-prose--longform li::marker { color: var(--ink-muted); }

/* ------------------------------------------------------------------ research home + explorer */
.research-switch {
  display: flex; gap: 0.5rem; padding-block: 1rem; border-bottom: 1px solid var(--rule);
  font: 0.76rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.research-switch a, .research-switch a:not([class]) {
  color: var(--ink); text-decoration: none; padding: 0 1rem; min-height: 2.5rem; border: 1px solid transparent; border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.research-switch a:hover { background: var(--c-wash); }
.research-switch a[aria-current], .research-switch a[aria-selected='true'] {
  background: var(--c-highlight); border-color: var(--ink); text-decoration: none; color: var(--ink-strong);
}
.research-switch span { color: var(--ink-muted); }

.bench-title, .bench-hero .bench-title {
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem) !important; line-height: 1.15 !important; letter-spacing: -0.01em; font-weight: 400;
}
.bench-hero { padding-block: clamp(1.75rem, 4vw, 3rem) 1.25rem; }
.archive-edition, .archive-companion-row .archive-edition { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
#agent-link { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.agent-reading-note { margin-top: 0.5rem; font-size: 1rem; color: var(--ink); }
.agent-reading-note summary { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.reading-note { font-size: 0.98rem; color: var(--ink-muted); }

.bench-tools label > span { font: 0.68rem var(--font-mono); letter-spacing: 0.08em; color: var(--ink-muted); }
.bench-tools input, .bench-tools select, .bench-tools input:focus, .bench-tools select:focus {
  background: #fffdf9; border: 1px solid var(--rule-strong); border-radius: 8px; color: var(--ink); font-family: var(--font-serif);
}
.bench-tools input:focus, .bench-tools select:focus { border-color: var(--ink); outline: 2px solid var(--ink-strong); outline-offset: 2px; }
.bench-app button, .bench-dialog button { color: var(--ink); letter-spacing: 0.04em; }
.bench-presets button, .bench-app .bench-presets button {
  border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); color: var(--ink);
  transition: background-color 160ms ease;
}
.bench-presets button:hover { background: var(--c-wash); }
.bench-presets button[aria-pressed='true'] { background: var(--c-own); border-color: var(--ink); color: var(--ink-strong); box-shadow: none; }
.bench-app .active-filters button { background: var(--c-wash); border: 1px solid var(--rule-strong); color: var(--ink); }
.bench-scope { color: var(--ink-muted); font-size: 0.72rem; }
.bench-scope button, .bench-scope-actions button { color: var(--ink); }

.query-records { gap: 1.5rem; margin-top: 1rem; }
.query-record, .query-record:hover {
  padding: 1.25rem 1.35rem 0.5rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
}
.query-record .publication-kicker, .bench-app .query-record .publication-kicker { font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink-muted); }
.bench-app .query-title { font-size: 1.35rem; line-height: 1.22; color: var(--ink-strong); letter-spacing: 0; }
.bench-app .query-title:hover { text-decoration: underline; text-decoration-color: var(--c-own); text-decoration-thickness: 0.15em; }
.query-insight { color: var(--ink); font-size: 1.02rem; }
.query-footer span, .card-preview-note { color: var(--ink-muted); font-size: 0.68rem; letter-spacing: 0.04em; }
.bench-app .explain-answer { color: var(--ink-strong); text-decoration-color: var(--c-own); text-decoration-thickness: 0.15em; }
.missing-cards, .product-image > span, .prompt-facts dt { color: var(--ink-muted); }
.product-image, .product-image-missing { background: #fffdf9; border: 1px solid var(--rule); border-radius: 8px; }
.product-merchant, .product-rating { color: var(--ink-muted); }

.bench-pagination { color: var(--ink-muted); font-size: 0.72rem; }
.bench-pagination button, .bench-app .bench-pagination button { border-radius: 999px; }
.bench-pagination button:hover:not(:disabled) { background: var(--c-wash); }
.bench-page-links button[aria-current='page'] { background: var(--ink); color: #fff; }
.bench-page-ellipsis { color: var(--ink-muted); }
.bench-app :focus-visible, .bench-dialog :focus-visible, .research-switch a:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; }

.analysis-drawer, .bench-app .analysis-drawer { background: var(--c-wash); border: 0; border-radius: 12px; }
.analysis-drawer > summary { font-size: 1.3rem; color: var(--ink-strong); }
.summary-note { color: var(--ink-muted); }
.bench-stats { border: 0; gap: 0.75rem; margin: 1.25rem 0 1.75rem; }
.bench-stat, .bench-stat:first-child { padding: 0.9rem 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; }
.bench-stat:last-child { border: 1px solid var(--rule); }
.bench-stat strong { font-family: var(--font-mono); font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); color: var(--ink-strong); }
.bench-stat span { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.bench-chart-heading > span, .bench-caption { color: var(--ink-muted); }
.bench-track { height: 0.6rem; background: rgba(42, 42, 44, 0.07); border-radius: 3px; }
.bench-fill { background: var(--c-own); box-shadow: 0 0 0 1px var(--ink); border-radius: 3px; }
.rate-row { color: var(--ink); }
.rate-track { background: rgba(42, 42, 44, 0.07); border: 1px solid var(--rule-strong); border-radius: 3px; }
.rate-fill { background: var(--c-own); border-right: 1px solid var(--ink); }
.rate-fill-context { background: var(--c-neutral); }
.bench-method summary, #detail-content summary { color: var(--ink); }
.bench-table tr:first-child, .best-comparison th { color: var(--ink-muted); }
.research-advisory, .bench-app .research-advisory { background: var(--c-wash); border: 0; border-radius: 12px; }
.research-advisory .reading-note { color: var(--ink-muted); }

.bench-dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 12px; }
.bench-dialog-top button, .bench-dialog-actions button { border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 1rem; background: var(--paper); }
.bench-dialog-top button:hover, .bench-dialog-actions button:hover { background: var(--c-highlight); }
.bench-dialog::backdrop { background: rgba(42, 42, 44, 0.45); }
.bench-dialog-top { background: var(--paper); border-bottom: 1px solid var(--rule); }
.bench-dialog h2, .bench-dialog h3 { font-weight: 400; color: var(--ink-strong); }
.bench-dialog h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.bench-dialog dd, .bench-dialog .prompt-facts { color: var(--ink); }
.evidence-reading blockquote { border-left: 3px solid var(--c-own); }
.evidence-reading > p { color: var(--ink-muted); }
.answer-text { background: var(--c-wash); color: var(--ink); border-radius: 8px; }
.ai-result-card { border-radius: 10px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .shopping-proof__success { grid-template-columns: minmax(0, 1fr); }
  .metric-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-stat, .bench-stat:first-child { border: 1px solid var(--rule) !important; }
}
@media (max-width: 720px) {
  .manifest-grid, .shopping-proof__failures { grid-template-columns: minmax(0, 1fr); }
  .rung-ladder li { grid-template-columns: 2rem minmax(0, 1fr); }
  .rung-ladder__desc { grid-column: 2; }
  body.site-shell { font-size: 1.1rem; }
  .research-switch { gap: 0.25rem; }
  .ref-row, .page-editorial .ref-row, .page-editorial .ref-row--featured { margin-inline: -0.6rem; padding: 1.25rem 0.6rem; background-position: 0.6rem 0; background-size: calc(100% - 1.2rem) 1px; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .page-editorial .site-header__inner { padding: 0.75rem 0; }
  .site-nav, .page-editorial .site-nav { gap: 0.1rem 1rem; }
  .report-opening { border-radius: 0 10px 10px 0; }
  .page-editorial .plain-hero-title, .page-editorial .plain-hero-title--wide, .page-editorial h1[data-fit-headline] { max-width: none; }
}
@media (max-width: 400px) {
  .detail-kpis, .detail-kpis--three, .detail-kpis--two { grid-template-columns: minmax(0, 1fr); }
  .report-tool, .cite-block > summary { font-size: 0.7rem; padding-inline: 0.8rem; }
  .button, .page-editorial .button--primary, .page-editorial .button--ghost { padding-inline: 1rem; }
  .query-record, .query-record:hover { padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Touch targets: at least 44px tall on small screens. */
@media (max-width: 760px) {
  .site-nav a, .footer-links a, .back-link, .publication-contents a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-nav { gap: 0 .9rem; }
  .footer-links { gap: 0 .9rem; }
}
