/* RPX: quiet typography, straight edges, and real benchmark imagery. */
:root {
  --md-primary-fg-color: #183b38;
  --md-accent-fg-color: #087f75;
  --rpx-paper: #fafbf8;
  --rpx-ink: #192e2b;
  --rpx-muted: #566760;
  --rpx-line: #d8dfd7;
  --rpx-tint: #edf2e9;
  --rpx-accent: #183b38;
  --rpx-on-accent: #fff;
}
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #172422;
  --md-default-fg-color: #e9eee6;
  --md-default-fg-color--light: #bac6bd;
  --rpx-paper: #172422;
  --rpx-ink: #e9eee6;
  --rpx-muted: #bac6bd;
  --rpx-line: #384943;
  --rpx-tint: #22322c;
  --rpx-accent: #d4e5b3;
  --rpx-on-accent: #172422;
}
body { background: var(--rpx-paper); }
.md-typeset figure.rpx-workflow-figure { margin: 1.8rem 0; max-width: 100%; text-align: left; }
.rpx-workflow-figure img { width: 100%; height: auto; display: block; border: 1px solid var(--rpx-line); background: white; }
.md-typeset .rpx-workflow-figure figcaption { margin: .7rem 0 0; color: var(--rpx-muted); font-size: .65rem; font-style: normal; line-height: 1.6; }
.rpx-workflow-figure a { display: block; }
.md-grid { max-width: 1440px; }
.md-typeset { font-size: .82rem; line-height: 1.75; }
.md-typeset h1, .md-typeset h2, .md-typeset h3 {
  color: var(--rpx-ink); font-weight: 650; letter-spacing: -.035em;
}
.md-typeset h1 { font-size: 2.25rem; }
.md-typeset h2 { margin-top: 2.4rem; font-size: 1.45rem; }
/* Header: the RPX logo on a plain bar. The logo already says "RPX", so the title shows "Toolkit". */
.md-header { background: #ffffff; color: #1e1b4b; box-shadow: none; border-bottom: 1px solid var(--rpx-line); }
[data-md-color-scheme="slate"] .md-header { background: #0f1a19; color: #e9eee6; border-bottom-color: #ffffff18; }
.md-header__button.md-logo { margin: .2rem .2rem .2rem .4rem; padding: .2rem; }
.md-header__button.md-logo img { height: 1.75rem; width: auto; }
[data-md-color-scheme="slate"] .md-header__button.md-logo img { content: url("../assets/logo-dark.svg"); }
.md-nav__title .md-nav__button.md-logo img { height: 2.2rem; width: auto; }
[data-md-color-scheme="slate"] .md-nav__title .md-nav__button.md-logo img { content: url("../assets/logo-dark.svg"); }
.md-header__topic { font-weight: 600; letter-spacing: -.02em; }
.md-header__title .md-header__topic:first-child .md-ellipsis { font-size: 0; }
.md-header__title .md-header__topic:first-child .md-ellipsis::before { content: "Toolkit"; font-size: .9rem; color: #64748b; font-weight: 600; }
[data-md-color-scheme="slate"] .md-header__title .md-header__topic:first-child .md-ellipsis::before { color: #bac6bd; }
.md-header .md-search__input { background: #f1f5f4; color: #192e2b; }
.md-header .md-search__input::placeholder, .md-header .md-search__icon { color: #566760; }
[data-md-color-scheme="slate"] .md-header .md-search__input { background: #22322c; color: #e9eee6; }
[data-md-color-scheme="slate"] .md-header .md-search__input::placeholder,
[data-md-color-scheme="slate"] .md-header .md-search__icon { color: #bac6bd; }
.md-header .md-header__source { color: inherit; }
/* Sidebar: section headers stand out from the pages under them; a page's own headings nest beneath it. */
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
  margin-top: 1.1rem; color: var(--rpx-ink); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.md-nav--primary .md-nav--secondary { border-left: 1px solid var(--rpx-line); margin-left: .6rem; }
.md-nav--primary .md-nav--secondary .md-nav__link { font-size: .62rem; color: var(--rpx-muted); }
.md-nav--primary .md-nav--secondary .md-nav__link--active { color: var(--md-accent-fg-color); }
.md-nav__link { border-radius: 0; }
.md-nav__link--active { font-weight: 650; }
.md-typeset pre > code, .md-typeset table:not([class]), .md-typeset .admonition,
.md-typeset details, .md-search__form { border-radius: 0; }
.md-typeset pre > code { border: 1px solid var(--rpx-line); }
.md-typeset table:not([class]) { box-shadow: none; border: 1px solid var(--rpx-line); width: 100%; }
.md-typeset .md-typeset__table { display: block; }
.md-typeset table:not([class]) th { background: var(--rpx-tint); color: var(--rpx-ink); }
.md-typeset table:not([class]) tr:hover { background: var(--rpx-tint); }
.rpx-home { color: var(--rpx-ink); }
.rpx-home .headerlink { display: none; }
.rpx-hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 2.2rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.md-typeset .rpx-eyebrow { color: var(--rpx-muted); font-size: .58rem; font-weight: 650; letter-spacing: .16em; margin: 2.8rem 0 .7rem; }
.rpx-hero .rpx-eyebrow { margin-top: 0; }
.md-typeset .rpx-hero h1 { font-size: clamp(2.4rem, 4.7vw, 3.65rem); letter-spacing: -.055em; line-height: 1.07; font-weight: 700; margin: .8rem 0 1.15rem; }
.md-typeset .rpx-lead { font-size: 1.05rem; line-height: 1.55; color: var(--rpx-ink); margin-bottom: 1rem; }
.rpx-hero-copy > p:not(.rpx-eyebrow):not(.rpx-lead) { color: var(--rpx-muted); }
.rpx-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .9rem 1.4rem; margin-top: 1.5rem; font-size: .7rem; font-weight: 650; }
.md-typeset .rpx-primary { padding: .7rem .9rem; background: var(--rpx-accent); color: var(--rpx-on-accent); border: 1px solid var(--rpx-accent); }
.md-typeset .rpx-primary:hover { opacity: .86; }
.md-typeset .rpx-secondary { color: var(--rpx-ink); padding: .5rem 0; border-bottom: 1px solid var(--rpx-ink); }
.rpx-actions span { margin-left: .5rem; }
.md-typeset figure.rpx-hero-figure { margin: 0; text-align: left; max-width: 100%; }
.rpx-hero-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rpx-line); }
.md-typeset .rpx-hero-figure figcaption { margin: 0; padding: .65rem 0; font-size: .52rem; color: var(--rpx-muted); font-style: normal; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem; letter-spacing: .03em; }
.rpx-numbers { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--rpx-line); border-bottom: 1px solid var(--rpx-line); padding: 1.4rem 0; }
.rpx-numbers > div { padding-left: 1.4rem; border-left: 1px solid var(--rpx-line); }
.rpx-numbers > div:first-child { padding-left: 0; border-left: 0; }
.rpx-numbers strong { display: block; font-size: 1.85rem; line-height: 1.15; letter-spacing: -.04em; font-weight: 600; }
.rpx-numbers span { display: block; color: var(--rpx-muted); font-size: .65rem; margin-top: .35rem; }
.rpx-home > h2 { margin-top: 0; }
.rpx-home > p { max-width: 48rem; }
.rpx-filmstrip { display: grid; grid-template-columns: repeat(4,1fr); gap: .6rem; margin: 1.5rem 0 .5rem; }
.md-typeset .rpx-filmstrip figure, .md-typeset .rpx-modalities figure { margin: 0; width: 100%; max-width: 100%; text-align: left; }
.rpx-filmstrip img { width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: contain; background: #121916; }
.md-typeset .rpx-filmstrip figcaption, .md-typeset .rpx-modalities figcaption { margin: 0; font-style: normal; font-size: .62rem; color: var(--rpx-muted); padding: .6rem 0; }
.rpx-filmstrip figcaption span, .rpx-modalities figcaption span { display: block; color: var(--rpx-ink); font-size: .53rem; font-weight: 650; letter-spacing: .08em; margin-bottom: .15rem; }
.md-typeset .rpx-image-note { font-size: .62rem; color: var(--rpx-muted); margin-top: .4rem; }
.rpx-flow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; background: var(--rpx-tint); border-top: 1px solid var(--rpx-line); border-bottom: 1px solid var(--rpx-line); padding: 1rem; }
.rpx-flow span { font-size: .7rem; font-weight: 550; }
.rpx-flow b { display: block; font-size: .5rem; font-weight: 500; color: var(--rpx-muted); letter-spacing: .12em; }
.rpx-flow i { color: var(--rpx-muted); font-style: normal; }
.rpx-routes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; margin: 1rem 0 2.5rem; }
.md-typeset .rpx-routes > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: 1.2rem 0; color: var(--rpx-ink); border-bottom: 1px solid var(--rpx-line); transition: color .15s; }
.md-typeset .rpx-routes > a:hover { color: var(--md-accent-fg-color); }
.rpx-route-number { font-size: .55rem; color: var(--rpx-muted); }
.rpx-routes strong { display: block; font-size: .82rem; font-weight: 650; }
.rpx-routes small { display: block; color: var(--rpx-muted); font-size: .65rem; margin-top: .2rem; }
.rpx-modalities { display: grid; grid-template-columns: repeat(2,1fr); gap: .9rem; margin: 1.5rem 0 .5rem; }
.rpx-home .rpx-modalities { grid-template-columns: repeat(4,1fr); }
.rpx-modalities img { width: 100%; height: auto; aspect-ratio: 4/3; display: block; object-fit: contain; background: #101513; }
.rpx-modalities.rpx-three { grid-template-columns: repeat(3,1fr); }
.md-typeset .rpx-wide-figure { margin: 1.5rem 0; max-width: 100%; }
.rpx-wide-figure img { max-width: 100%; height: auto; }
.md-typeset .rpx-wide-figure figcaption { font-style: normal; font-size: .65rem; color: var(--rpx-muted); }
.rpx-closing { border-top: 1px solid var(--rpx-line); padding: .3rem 0 1rem; margin-top: 2.5rem; }
.rpx-closing h2 { font-size: 1.7rem; }
.md-typeset a:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 4px; }
@media (max-width: 1100px) {
  .rpx-hero { grid-template-columns: 1fr; gap: 1.3rem; }
  .rpx-hero-figure { width: 100%; }
  .md-typeset .rpx-hero h1 { font-size: 3rem; }
}
@media (max-width: 700px) {
  .rpx-hero { padding-top: .5rem; }
  .md-typeset .rpx-hero h1 { font-size: 2.45rem; }
  .rpx-filmstrip, .rpx-home .rpx-modalities, .rpx-modalities.rpx-three { grid-template-columns: 1fr 1fr; }
  .rpx-numbers { grid-template-columns: 1fr 1fr; gap: 1rem 0; }
  .rpx-numbers > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .rpx-routes { grid-template-columns: 1fr; }
  .rpx-flow { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .rpx-routes > a { transition: none; } }
/* Let long headings and image captions shrink within their grid columns. */
.rpx-hero > *, .rpx-filmstrip > *, .rpx-modalities > * { min-width: 0; }
@media (max-width: 700px) { .md-typeset .rpx-hero h1 { font-size: 2rem; } }

/* Benchmark walkthroughs: real inputs, compact contracts, and guided runs. */
.md-typeset .rpx-task-kicker { margin: 1.7rem 0 .5rem; font-size: .57rem; letter-spacing: .14em; font-weight: 650; color: var(--rpx-muted); }
.md-typeset .rpx-task-lead { font-size: .98rem; line-height: 1.6; max-width: 42rem; color: var(--rpx-muted); margin: -1rem 0 1.4rem; }
.rpx-task-switcher { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--rpx-line); }
.md-typeset .rpx-task-switcher a { color: var(--rpx-muted); padding: .65rem .35rem .7rem; font-size: .49rem; line-height: 1.4; border-bottom: 2px solid transparent; }
.rpx-task-switcher span { display: block; font-weight: 700; font-size: .62rem; margin-bottom: .25rem; }
.md-typeset .rpx-task-switcher a[aria-current="page"] { color: var(--rpx-ink); border-color: var(--md-accent-fg-color); background: var(--rpx-tint); }
.md-typeset .rpx-task-switcher a:hover { color: var(--md-accent-fg-color); background: var(--rpx-tint); }
.rpx-task-visual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.md-typeset .rpx-task-visual figure { margin: 0; max-width: 100%; width: 100%; text-align: left; }
.rpx-task-visual img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; background: #101513; }
.rpx-task-visual .rpx-reference-crop { background: var(--rpx-tint); padding: .65rem; }
.md-typeset .rpx-task-visual figcaption { margin: 0; text-align: left; font-style: normal; font-size: .61rem; color: var(--rpx-muted); padding: .7rem 0 .2rem; }
.rpx-task-visual figcaption span { display: block; font-size: .49rem; font-weight: 700; letter-spacing: .1em; color: var(--rpx-ink); margin-bottom: .25rem; }
.rpx-task-contract { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rpx-line); border-bottom: 1px solid var(--rpx-line); padding: 1rem 0; margin: 1.3rem 0 2rem; }
.rpx-task-contract > div { padding: 0 .8rem; border-left: 1px solid var(--rpx-line); }
.rpx-task-contract > div:first-child { padding-left: 0; border-left: 0; }
.rpx-task-contract span { display: block; color: var(--rpx-muted); font-size: .48rem; letter-spacing: .1em; font-weight: 650; }
.rpx-task-contract strong { display: block; font-size: .69rem; font-weight: 550; line-height: 1.5; margin-top: .35rem; }
.md-typeset .rpx-task-note { border-left: 3px solid var(--md-accent-fg-color); background: var(--rpx-tint); padding: .6rem 1rem; font-size: .73rem; margin: 1.1rem 0; }
.rpx-task-note > p { margin: .2rem 0; }
.rpx-task-next { margin-top: 2rem; padding-top: .6rem; border-top: 1px solid var(--rpx-line); font-size: .7rem; }
.rpx-result-files { display: grid; gap: 0; border-top: 1px solid var(--rpx-line); margin: 1rem 0; }
.rpx-result-files > div { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--rpx-line); }
.rpx-result-files span { color: var(--rpx-muted); font-size: .67rem; }
.rpx-benchmark-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.3rem; margin-top: 1.8rem; }
.md-typeset .rpx-task-preview { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .85rem; padding: 1.25rem 0; border-top: 1px solid var(--rpx-line); color: var(--rpx-ink); }
.rpx-task-preview img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--rpx-tint); }
.rpx-task-preview strong { display: block; font-weight: 650; font-size: .88rem; line-height: 1.35; margin: .3rem 0; }
.rpx-task-id { display: block; color: var(--rpx-muted); font-size: .48rem; letter-spacing: .1em; font-weight: 650; }
.rpx-task-description { display: block; color: var(--rpx-muted); font-size: .64rem; line-height: 1.5; }
.rpx-task-open { display: block; margin-top: .6rem; color: var(--md-accent-fg-color); font-size: .62rem; font-weight: 650; }
.md-typeset .rpx-task-preview:hover strong { color: var(--md-accent-fg-color); }
@media (max-width: 700px) {
  .rpx-benchmark-gallery { grid-template-columns: 1fr; }
  .md-typeset .rpx-task-preview { grid-template-columns: 5rem minmax(0, 1fr); }
  .rpx-task-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-typeset .rpx-task-switcher a { padding: .5rem; font-size: .52rem; }
  .md-typeset .rpx-task-lead { font-size: .85rem; }
  .rpx-task-contract { grid-template-columns: 1fr; gap: .7rem; }
  .rpx-task-contract > div { display: grid; grid-template-columns: 5rem 1fr; align-items: baseline; padding: 0; border: 0; gap: .5rem; }
  .rpx-task-contract strong { margin: 0; }
  .rpx-task-visual { gap: .6rem; }
  .rpx-result-files > div { grid-template-columns: 1fr; gap: .2rem; }
}
/* Wrap long commands visually; copying preserves the original command. */
.rpx-benchmark-page { --rpx-link: #08756d; }
[data-md-color-scheme="slate"] .rpx-benchmark-page { --rpx-link: #9bd6c9; }
.md-typeset .rpx-benchmark-page a { color: var(--rpx-link); }
.md-typeset .rpx-benchmark-page .rpx-task-preview { color: var(--rpx-ink); }
.rpx-task-preview strong { color: var(--rpx-ink); }
.rpx-benchmark-page .highlight pre > code { white-space: pre-wrap; overflow-wrap: anywhere; }
.md-typeset .rpx-benchmark-page .tabbed-labels > label { color: var(--rpx-muted); }
.md-typeset .rpx-benchmark-page .tabbed-set > input:checked + input + .tabbed-labels > label:first-child,
.md-typeset .rpx-benchmark-page .tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > label:nth-child(2) { color: var(--rpx-link); }
.rpx-task-shortcuts { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: -.25rem 0 1.25rem; font-size: .65rem; font-weight: 650; }
.rpx-task-shortcuts a { padding: .3rem 0; border-bottom: 1px solid var(--rpx-line); }
.rpx-task-shortcuts span { margin-left: .35rem; }

/* Findings figure: the image is a rounded card on a transparent background, so drop the frame. */
.rpx-workflow-figure.rpx-finding img { border: 0; background: transparent; }

/* Single-column hero (copy only) followed by the full-width paper overview figure. */
.rpx-hero.rpx-hero-single { grid-template-columns: 1fr; padding-bottom: 1.2rem; }
.rpx-hero.rpx-hero-single .rpx-hero-copy { max-width: 46rem; }
.md-typeset figure.rpx-overview-figure { margin: 0 0 2rem; max-width: 100%; text-align: left; }
.rpx-overview-figure img { display: block; width: 100%; height: auto; }
.md-typeset .rpx-overview-figure figcaption { margin: .7rem 0 0; color: var(--rpx-muted); font-size: .65rem; font-style: normal; line-height: 1.6; max-width: none; }
/* The header already names the site; on wide screens the sidebar's own title only repeats it. */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title { display: none; }
  .md-nav--primary > .md-nav__list > .md-nav__item--section:first-child > .md-nav__link { margin-top: 0; }
}
