/* research-story.css — the Research page as a single-column article (research.html).
   Builds on the tokens in index2-theme.css (--ink, --muted, --line, --link, ...).

   Layout rule: everything sits on one 700px text column. Only wide figures and the
   stage cards break out, symmetrically. One accent (the key-finding rule); labels,
   citations, and controls stay gray. Nothing moves unless the reader asks. */

.rx-page {
  --rx-measure: 700px;
  --rx-wide: 800px;
  --rx-wide-w: min(var(--rx-wide), calc(100vw - 48px));
}

/* Reading progress */
.rx-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none; }
.rx-progress > div { height: 100%; background: var(--link); transform: scaleX(0); transform-origin: 0 50%; transition: transform .08s linear; }

.rx-wrap { padding: 44px 24px 24px; }

/* ── Title block ────────────────────────────────────────────── */
.rx-hero { max-width: var(--rx-measure); margin: 20px auto 44px; }
.rx-kicker, .rx-chapter { font-family: var(--font-ui); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rx-title { font-size: clamp(36px, 5.2vw, 50px); font-weight: 600; letter-spacing: -0.022em; line-height: 1.1; margin: 12px 0 14px; color: var(--ink); text-wrap: balance; }
.rx-subtitle { font-size: clamp(20px, 2.2vw, 23px); line-height: 1.42; color: var(--muted); margin: 0 0 26px; }
.rx-byline { display: flex; align-items: center; gap: 14px; }
.rx-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.rx-byline b { display: block; font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.rx-byline div > span { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.rx-dot { color: var(--rule); }
.rx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-top: 26px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--font-ui); font-size: 14px; }
.rx-mode { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.rx-mode button { border: 0; background: transparent; color: var(--muted); font: inherit; padding: 3px 14px; border-radius: 999px; cursor: pointer; }
.rx-mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.rx-bar-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.rx-bar-links a { color: var(--muted); text-decoration: none; }
.rx-bar-links a:hover { color: var(--link); }

/* ── The column ─────────────────────────────────────────────── */
.rx-article { max-width: var(--rx-measure); margin: 0 auto; font-size: 20px; line-height: 1.65; color: var(--ink); }
.rx-article > section { scroll-margin-top: 80px; }
.rx-article h2, .rx-article h3 { scroll-margin-top: 84px; color: var(--ink); }
.rx-article p { font-size: inherit; line-height: inherit; color: var(--ink); margin: 0 0 1.3em; }
.rx-article p.rx-lead { font-size: 23px; line-height: 1.52; }
.rx-article strong, .rx-article p b { font-weight: 600; }
.rx-article a:not(.cx) { color: var(--link); text-underline-offset: 3px; }

/* Chapters are separated the way essays are: space and three dots */
.rx-article > section + section { margin-top: 76px; }
.rx-article > section + section::before { content: "\00B7\2002\00B7\2002\00B7"; display: block; text-align: center; font-size: 26px; line-height: 1; color: var(--rule); margin-bottom: 64px; }
.rx-article h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.16; margin: 6px 0 22px; text-wrap: balance; }
.rx-article h3 { font-size: 25px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; margin: 2.3em 0 .65em; }

/* Blocks that break out of the column, centered on it */
.rx-fig.rx-fig-wide, .rx-phil-steps { width: var(--rx-wide-w); max-width: none; margin-left: calc(50% - var(--rx-wide-w) / 2); margin-right: 0; }

/* Glossary terms */
dfn[data-def] { font-style: normal; border-bottom: 1px dotted var(--link); cursor: help; }

/* ── Citations: small bracketed numbers; details appear on hover ── */
cite { font-style: normal; font-family: var(--font-ui); font-size: .64em; vertical-align: .42em; line-height: 0; color: var(--muted); white-space: nowrap; margin-left: 1px; }
a.cx { color: var(--muted); text-decoration: none; padding: 0 1px; }
a.cx:hover, a.cx:focus { color: var(--link); text-decoration: underline; outline: none; }

.rx-card { position: absolute; z-index: 1200; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.16); opacity: 0; transform: translateY(4px); transition: opacity .14s, transform .14s; font-family: var(--font-text); }
.rx-card.on { opacity: 1; transform: none; }
.rx-card-thumb { display: block; width: 100%; max-height: 190px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.rx-card-body { padding: 12px 16px 14px; }
.rx-card-venue { font-family: var(--font-ui); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--link); display: flex; gap: 8px; align-items: center; }
.rx-badge { text-transform: none; letter-spacing: 0; background: var(--bg-soft); color: var(--ink-soft); border-radius: 999px; padding: 0 8px; font-size: 11px; }
.rx-card-title { font-size: 16px; line-height: 1.3; font-weight: 600; margin: 4px 0 4px; }
.rx-card-auth { font-size: 13px; color: var(--muted); line-height: 1.4; }
.rx-card-auth b { color: var(--ink); font-weight: 600; }
.rx-card-abs { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rx-card-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-family: var(--font-ui); font-size: 13px; }
.rx-card-links a { color: var(--link); text-decoration: none; }
.rx-card-links a:hover { text-decoration: underline; }
.rx-card-ref { margin-left: auto; color: var(--muted) !important; }
.rx-def p { font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin: 4px 0 0; }

/* ── Figures: centered, a little narrower than the text; three sizes plus wide ── */
.rx-fig { max-width: 600px; margin: 2em auto 2.1em; }
.rx-fig.rx-fig-mid { max-width: 440px; }
.rx-fig.rx-fig-narrow { max-width: 340px; }
.rx-fig img { width: 100%; display: block; cursor: zoom-in; }
.rx-fig img:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.rx-fig figcaption { font-size: 15px; line-height: 1.55; color: var(--muted); text-align: center; max-width: 560px; margin: 12px auto 0; }
html.dark .rx-fig img, html.dark .rx-phil { border-radius: 6px; }

/* Walk-throughs (driven by assets/research_figures.json): a region lights up with its caption sentence */
.rx-tour-stage, .rx-phil { position: relative; overflow: hidden; background: #fff; }
.rx-tour-stage > img, .rx-phil > img { transition: opacity .3s; }
.rx-tour-stage.focus > img, .rx-phil.focus > img { opacity: .2; }
.rx-tour-win, .rx-phil-win { position: absolute; background-repeat: no-repeat; opacity: 0; transition: opacity .3s; pointer-events: none; }
.rx-tour-win { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 3px; }
.rx-tour-win.on, .rx-phil-win.on { opacity: 1; }
.rx-cap-step { border-radius: 3px; padding: 1px 2px; margin: 0 -2px; cursor: default; transition: color .2s, background .2s; }
.rx-cap-step.on { color: var(--ink); background: rgba(255, 204, 51, .34); }
html.dark .rx-cap-step.on { background: rgba(255, 204, 51, .2); }
.rx-tour-bar { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 8px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.rx-tour-bar button { font: inherit; color: var(--muted); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.rx-tour-bar button:hover, .rx-tour-bar button:focus-visible { color: var(--link); }
.rx-tour-start { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rx-tour-start span { margin-left: 5px; }
.rx-tour-nav { display: inline-flex; align-items: center; gap: 12px; }
.rx-tour-nav[hidden], .rx-tour-start[hidden] { display: none; }
.rx-tour-prev, .rx-tour-next { font-size: 18px !important; line-height: 1; padding: 0 6px !important; }
.rx-tour-count { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }

/* ── The loop: four stages under the overview figure ────────── */
.rx-phil-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: -1.2em; margin-bottom: 1.4em; border-top: 1px solid var(--line); }
.rx-phil-step { display: block; padding: 14px 16px 12px 0; text-decoration: none !important; color: var(--muted); border-top: 2px solid transparent; margin-top: -1px; }
.rx-phil-step .n { display: block; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.rx-phil-step b { display: block; font-weight: 600; font-size: 18px; color: var(--ink); line-height: 1.3; }
.rx-phil-step span:last-child { display: block; font-size: 15px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.rx-phil-step.on, .rx-phil-step:hover { border-top-color: var(--link); }
.rx-phil-step.on .n, .rx-phil-step:hover .n { color: var(--link); }

/* ── Key finding: the one sentence to remember ──────────────── */
.rx-finding { margin: 1.7em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--link); font-size: 19px; line-height: 1.6; color: var(--ink); }
.rx-finding > b { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin-bottom: 6px; }
.rx-finding > div b { font-weight: 600; }

/* ── Example and outlook: the same indented shape as a key finding, with a gray rule ── */
.rx-example, .rx-callout { margin: 1.7em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--line); font-size: 17.5px; line-height: 1.6; color: var(--ink-soft); }
.rx-ex-h, .rx-demos-h, .rx-metrics-h, .rx-callout-h { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rx-example q { font-style: italic; color: var(--ink); quotes: "\201C" "\201D"; }
.rx-ex-grid { display: grid; gap: 12px; }
.rx-ex-grid b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.rx-article .rx-callout p { font-size: inherit; color: inherit; margin-bottom: 0; }
.rx-callout .rx-fig { margin-top: 1.4em; margin-bottom: .4em; }

/* ── Numbers ────────────────────────────────────────────────── */
.rx-num { font-variant-numeric: tabular-nums; }
.rx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 2em 0; padding: 22px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.rx-stats .rx-num { display: block; font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.rx-stats small { font-family: var(--font-ui); font-size: 13.5px; color: var(--muted); line-height: 1.35; display: block; margin-top: 4px; }

/* Gaze metrics */
.rx-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 1.7em 0; }
.rx-metrics-h { grid-column: 1 / -1; margin-bottom: 0; }
.rx-metric { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: center; }
.rx-metric img { grid-row: span 2; width: 56px; height: 40px; object-fit: contain; background: #fff; border-radius: 4px; }
.rx-metric b { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.rx-metric span { font-size: 15px; color: var(--muted); line-height: 1.4; }

/* Lists */
.rx-principles, .rx-next { padding-left: 1.15em; margin: 0 0 1.3em; }
.rx-principles li, .rx-next li { margin-bottom: .55em; padding-left: .2em; }
.rx-principles b, .rx-next b { font-weight: 600; }

/* ── Demos: a row of small stills inside the column; media plays on click ── */
.rx-demos { margin: 2.2em 0 2.4em; }
.rx-demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.rx-demo { min-width: 0; display: flex; flex-direction: column; }
.rx-demo > img, .rx-demo > .rx-yt, .rx-demo > .rx-yt-frame, .rx-demo > .rx-vid, .rx-demo > video.rx-vid-player { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #fff; display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rx-demo > video.rx-vid-player { background: #000; }
.rx-yt { position: relative; background-size: cover; background-position: center; cursor: pointer; padding: 0; }
.rx-yt span, .rx-vid .rx-play { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 14px; padding-left: 2px; }
.rx-yt:hover span, .rx-vid:hover .rx-play, .rx-vid:focus-visible .rx-play { background: rgba(0,0,0,.8); }
.rx-vid { position: relative; padding: 0; cursor: pointer; }
.rx-vid img, .rx-vid canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.rx-vid .rx-vid-len { position: absolute; right: 8px; bottom: 8px; font-family: var(--font-ui); font-size: 11px; color: #fff; background: rgba(0,0,0,.6); border-radius: 4px; padding: 1px 6px; }
.rx-demo-body { padding: 9px 1px 0; display: block; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.rx-demo-body b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 1px; }
.rx-demo-body > span { display: block; }
.rx-demo-body a { font-family: var(--font-ui); font-size: 13.5px; text-decoration: none; display: inline-block; margin-top: 6px; }
.rx-demo-body a + a { margin-left: 12px; }

/* ── Community: a plain list ────────────────────────────────── */
.rx-community { margin: 1.4em 0 2.2em; border-top: 1px solid var(--line); }
.rx-article .rx-community a.rx-comm { display: block; padding: 16px 0 15px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 16.5px; line-height: 1.5; }
.rx-comm b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.3; margin: 2px 0; transition: color .15s; }
.rx-comm:hover b { color: var(--link); }
.rx-comm > span { display: block; }
.rx-comm .rx-comm-role { font-family: var(--font-ui); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rx-comm .rx-comm-ed { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-family: var(--font-ui); font-size: 13.5px; }

/* #funding also carries an older rule in index2-theme.css; the id keeps the anchor, these reset its frame */
.rx-sponsors, #funding.rx-sponsors { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: center; margin-top: 2.2em; padding-top: 0; border-top: 0; }
.rx-sponsors img { height: 32px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.rx-sponsors img.sq { height: 48px; }
.rx-sponsors a:hover img { filter: none; opacity: 1; }
html.dark .rx-sponsors img { background: #f4f4f2; border-radius: 4px; padding: 3px 6px; }

/* ── References: small and quiet ────────────────────────────── */
.rx-references h2 { font-size: 24px; }
.rx-ref-n { color: var(--muted); font-weight: 400; font-size: 17px; }
.rx-article p.rx-ref-note { font-size: 15px; color: var(--muted); }
.rx-refs-toggle { font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: border-color .15s, color .15s; }
.rx-refs-toggle:hover { border-color: var(--link); color: var(--link); }
.rx-references:not(.open) .rx-refs { display: none; }
.rx-refs { margin: 22px 0 0; padding-left: 0; list-style: none; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.rx-refs li { display: grid; grid-template-columns: 34px 1fr; margin-bottom: 8px; scroll-margin-top: 90px; }
.rx-refs li:target { background: var(--bg-soft); border-radius: 4px; }
.rx-ref-num { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.rx-refs b { font-weight: 600; color: var(--ink-soft); }
.rx-ref-title { color: var(--ink-soft); }
.rx-article .rx-refs a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; margin-right: 6px; font-family: var(--font-ui); font-size: 12.5px; }
.rx-article .rx-refs a:hover { color: var(--link); }
.rx-back a { text-decoration: none !important; }

/* ── Contents: pinned in the right margin on wide screens ───── */
.rx-toc { position: fixed; top: 104px; left: calc(50% + var(--rx-wide) / 2 + 26px); width: 186px; max-height: calc(100vh - 150px); overflow-y: auto; font-family: var(--font-ui); font-size: 13.5px; scrollbar-width: thin; }
.rx-toc-h { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; gap: 8px; }
.rx-toc-h span { text-transform: none; letter-spacing: 0; }
.rx-toc a, .rx-drawer a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); line-height: 1.35; transition: color .15s, border-color .15s; }
.rx-toc a.sub { display: none; padding-left: 24px; font-size: 12.5px; }
.rx-toc a.sub.show { display: block; }
.rx-drawer a.sub { padding-left: 24px; font-size: 13px; }
.rx-toc a:hover, .rx-drawer a:hover { color: var(--ink); }
.rx-toc a.active, .rx-drawer a.active { color: var(--link); border-left-color: var(--link); }
.rx-toc a.rx-toc-top { margin-top: 12px; border-left-color: transparent; font-size: 12.5px; }

/* ── Margin note: key numbers for the subsection being read; absent everywhere else ── */
.rx-note { position: fixed; top: 104px; right: calc(50% + var(--rx-wide) / 2 + 26px); width: 186px; max-height: calc(100vh - 150px); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
.rx-note.on { visibility: visible; opacity: 1; }
.rx-note-h { font-family: var(--font-ui); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1.4; margin-bottom: 14px; }
.rx-note-stat { margin-bottom: 14px; }
.rx-note-stat b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); }
.rx-note-stat span { display: block; font-family: var(--font-ui); font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.rx-note-see { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-ui); font-size: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.rx-note-see a { color: var(--muted); text-decoration: none; }
.rx-note-see a:hover { color: var(--link); }

/* Contents drawer for screens without a margin */
.rx-drawer-btn { display: none; position: fixed; right: 18px; bottom: 80px; z-index: 1050; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.rx-drawer { display: none; position: fixed; right: 18px; bottom: 136px; z-index: 1050; width: min(320px, calc(100vw - 36px)); max-height: 60vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 14px 14px 12px; font-family: var(--font-ui); font-size: 14px; }
.rx-drawer.open { display: block; }
.rx-drawer .rx-toc-h { margin-left: 2px; }

/* ── Lightbox ───────────────────────────────────────────────── */
.rx-lightbox { width: min(96vw, 1500px); max-height: 94vh; padding: 0; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.rx-lightbox::backdrop { background: rgba(10,10,12,.78); }
.rx-lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-ui); font-size: 13px; position: sticky; top: 0; background: var(--bg); }
.rx-lb-count { color: var(--muted); margin-right: auto; }
.rx-lb-open, .rx-lb-gif { color: var(--link); text-decoration: none; }
.rx-lb-gif[hidden] { display: none; }
.rx-lb-bar button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; width: 34px; height: 30px; font-size: 16px; line-height: 1; cursor: pointer; }
.rx-lightbox img { display: block; width: 100%; height: auto; max-height: calc(94vh - 130px); object-fit: contain; background: #fff; padding: 12px; }
.rx-lb-cap { padding: 10px 18px 16px; font-size: 15px; color: var(--muted); line-height: 1.5; text-align: center; }

/* ── Skim mode: summaries, key findings, figures, and demos ─── */
.rx-tldr { display: none; }
body.rx-skim .rx-tldr { display: block; margin: 0 0 1.4em; }
.rx-article .rx-tldr p { font-size: 19px; line-height: 1.6; margin-bottom: .8em; }
.rx-tldr-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: .8em; }
.rx-tldr-stats div { max-width: 210px; }
.rx-tldr-stats b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); }
.rx-tldr-stats span { font-family: var(--font-ui); font-size: 13px; line-height: 1.35; color: var(--muted); display: block; }
.rx-tldr-see { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--font-ui); font-size: 13.5px; }
.rx-tldr-see a { text-decoration: none; }
body.rx-skim .rx-article section > p:not(.rx-lead):not(.rx-ref-note),
body.rx-skim .rx-article .detail,
body.rx-skim .rx-article .rx-example,
body.rx-skim .rx-references { display: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1247px) {
  .rx-toc, .rx-note { display: none; }
  .rx-drawer-btn { display: grid; place-items: center; }
}
@media (max-width: 760px) {
  .rx-wrap { padding: 24px 20px; }
  .rx-page { --rx-wide-w: 100%; }
  .rx-article { font-size: 18px; line-height: 1.62; }
  .rx-article p.rx-lead { font-size: 20px; }
  .rx-article h3 { font-size: 22px; }
  .rx-finding { font-size: 17.5px; padding-left: 16px; }
  .rx-example, .rx-callout { font-size: 16.5px; padding-left: 16px; }
  .rx-fig figcaption { font-size: 14.5px; }
  .rx-phil-steps { grid-template-columns: 1fr 1fr; }
  .rx-stats { gap: 10px; }
  .rx-stats .rx-num { font-size: 26px; }
  .rx-metrics { grid-template-columns: 1fr; }
  .rx-article > section + section::before { margin-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-card, .rx-note, .rx-tour-stage > img, .rx-phil > img, .rx-tour-win, .rx-phil-win { transition: none; }
}

/* Dark mode: the theme recolors every link and paragraph; restore the article's hierarchy */
html.dark .rx-article p, html.dark .rx-finding { color: var(--ink); }
html.dark .rx-article .rx-callout p { color: var(--ink-soft); }
html.dark .rx-article a:not(.cx), html.dark .rx-card-links a,
html.dark .rx-demo-body a, html.dark .rx-lb-open, html.dark .rx-lb-gif, html.dark .rx-tldr-see a { color: var(--link); }
html.dark .rx-bar-links a, html.dark .rx-toc a, html.dark .rx-drawer a, html.dark .rx-article .rx-refs a,
html.dark .rx-page a.cx, html.dark .rx-note-see a { color: var(--muted); }
html.dark .rx-page a.cx:hover { color: var(--link); }
html.dark .rx-toc a.active, html.dark .rx-drawer a.active { color: var(--link); }
html.dark .rx-article .rx-community a.rx-comm, html.dark .rx-phil-step { color: var(--muted); }
html.dark .rx-comm b, html.dark .rx-phil-step b { color: var(--ink); }
html.dark .rx-card-ref { color: var(--muted) !important; }
