/* Earnwick research: the hub, the article pages and their charts.
   Built on earnwick.css (tokens, cards, buttons, nav). Cards for the home page live there too (.rcard).
   Chart colors are a validated set (adjacent CVD ΔE ≥ 12 on white); every chart also has direct labels and a table. */

.research-page {
  /* chart palette */
  --c0: #D8CAB6;  /* context: everything that isn't the story */
  --c1: #2F7CF0;  /* blue */
  --c1-dark: #1B4FB0;
  --c2: #E8584A;  /* coral */
  --c3: #1C93B0;  /* teal */
  --c4: #B98000;  /* amber */
  --c5: #7E5FE8;  /* violet */
  --grid: #EEE5D8;
  --track: #F7F1E8;
  --seg: #D9CDBD;
}
.is-c0 { --mc: var(--c0); }
.is-c1 { --mc: var(--c1); }
.is-c1-dark { --mc: var(--c1-dark); }
.is-c2 { --mc: var(--c2); }
.is-c3 { --mc: var(--c3); }
.is-c4 { --mc: var(--c4); }
.is-c5 { --mc: var(--c5); }
.is-ink { --mc: var(--ink-soft); }

/* ---------- Header extras: reading progress ---------- */

.read-progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; pointer-events: none; }
.read-progress span {
  display: block; height: 100%;
  background: var(--cta);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.nav { position: sticky; }

/* ---------- Shared bits ---------- */

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.875rem; font-weight: 800; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--sand-dark); font-weight: 900; }
.crumbs a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--sand-dark); }
.crumbs a:hover { border-bottom-color: var(--ink); }


/* ---------- Blog page ---------- */

.rhub-hero { padding: clamp(44px, 6vw, 96px) 0 clamp(32px, 4vw, 56px); text-align: center; }
.rhub-hero__text { display: grid; justify-items: center; }
.rhub-hero h1 { max-width: 16ch; margin-inline: auto; font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }
.rhub-hero .lead { max-width: 52ch; margin: 18px auto 0; }

.rhub-list { padding-bottom: clamp(32px, 5vw, 64px); }
.rhub-list .rcards { gap: clamp(28px, 3.2vw, 44px); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (min-width: 760px) {
  .rhub-list .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Article hero ---------- */

.ra-hero {
  padding: clamp(4px, calc(4vw - 24px), 32px) 0 clamp(28px, 4vw, 48px);
  background: linear-gradient(var(--tint), rgba(255, 248, 236, 0));
}
/* The post's header sits under a see-through nav; the nav gets its background back once the page scrolls. */
.page-post .ra-hero {
  margin-top: calc(-1 * (var(--nav-h) + 2px));
  padding-top: calc(var(--nav-h) + 2px + clamp(8px, calc(4vw - 24px), 32px));
}
.page-post .nav { transition: background-color 0.25s ease, border-color 0.25s ease; }
.page-post .nav:not(.is-scrolled) { background-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ra-hero .crumbs ol { margin-bottom: 42px; }
.ra-hero__grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.ra-hero h1 { font-size: clamp(2.125rem, 1.45rem + 2.6vw, 3.5rem); line-height: 1.05; max-width: 22ch; }
.ra-hero .kicker { color: var(--accent); }
.ra-hero .lead { margin-top: 18px; max-width: 58ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.ra-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.ra-meta li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--paper);
  font-size: 0.875rem; color: var(--ink-soft);
}
.ra-meta svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.ra-cover { margin: 0; }
.ra-cover picture, .ra-cover img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  border-radius: 28px; background: var(--tint-2);
}
.ra-cover img { border: 1.5px solid var(--edge); box-shadow: 0 6px 0 var(--base); }
@media (min-width: 1024px) {
  .ra-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

/* ---------- At a glance ---------- */

.ra-glance { margin-top: 8px; }
.ra-glance__title { margin-bottom: 14px; font: 900 0.8125rem/1.3 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }
.ra-stats { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ra-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .ra-stats { gap: 10px; }
  .ra-stat { padding: 14px 14px 12px; border-radius: 18px; }
  .ra-stat__label { font-size: 0.8125rem; }
}
.ra-stat {
  display: grid; align-content: start; gap: 6px;
  padding: 18px 18px 16px; border: 1.5px solid var(--edge); border-radius: 20px; background: var(--paper);
  box-shadow: 0 4px 0 var(--base);
}
.ra-stat__value { font: 900 clamp(1.875rem, 1.6rem + 1vw, 2.375rem)/1 var(--text); color: var(--ink); letter-spacing: -0.01em; }
.ra-stat__label { font-size: 0.9375rem; line-height: 1.4; color: var(--ink-soft); }
.ra-stat__src { justify-self: start; margin-top: 4px; font-size: 0.75rem; font-weight: 900; color: var(--ink-soft); text-decoration: none; border-bottom: 1.5px solid var(--sand-dark); }
.ra-stat__src:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Layout: contents + text ---------- */

.ra-layout { display: grid; gap: 24px; margin-top: clamp(32px, 4vw, 56px); }
.ra-body { min-width: 0; }
@media (min-width: 1080px) {
  .ra-layout { grid-template-columns: 230px minmax(0, 780px); gap: 56px; justify-content: center; }
}

.ra-toc { min-width: 0; }
.ra-toc__box {
  border: 1.5px solid var(--edge); border-radius: 20px; background: var(--paper);
  box-shadow: 0 4px 0 var(--base);
}
.ra-toc summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; cursor: pointer; list-style: none;
  font: 400 1.25rem/1 var(--display);
}
.ra-toc summary::-webkit-details-marker { display: none; }
.ra-toc summary::after { content: "+"; font: 900 1.25rem/1 var(--text); color: var(--ink-soft); transition: transform 0.25s var(--pop); }
.ra-toc details[open] summary::after { transform: rotate(45deg); }
.ra-toc ol { margin: 0; padding: 0 10px 12px; list-style: none; counter-reset: toc; }
.ra-toc li { counter-increment: toc; }
.ra-toc a {
  position: relative; display: block; padding: 7px 10px 7px 34px; border-radius: 12px;
  color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.35; text-decoration: none;
}
.ra-toc a::before { content: counter(toc); position: absolute; left: 10px; top: 7px; font-size: 0.8125rem; font-weight: 900; color: var(--sand-dark); }
.ra-toc a:hover { background: var(--sand); color: var(--ink); }
.ra-toc a.is-active { background: var(--gold-light); color: var(--ink); }
.ra-toc a.is-active::before { color: var(--kicker); }
@media (min-width: 1080px) {
  .ra-toc__box { position: sticky; top: calc(var(--nav-h) + 24px); background: transparent; border: 0; box-shadow: none; }
  .ra-toc summary { cursor: default; padding: 4px 10px 12px; font-size: 1rem; font-family: var(--text); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }
  .ra-toc summary::after { display: none; }
  .ra-toc ol { padding: 0; }
}

/* ---------- Article text ---------- */

.ra-intro > p, .ra-section > p, .ra-section > ul > li { font-size: 1.125rem; line-height: 1.7; }
.ra-body > * + *, .ra-section > * + *, .ra-intro > * + * { margin-top: 20px; }
.ra-intro > p:first-child { font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); line-height: 1.6; color: var(--ink); }
.ra-intro > p:first-child::first-letter { float: left; margin: 6px 10px 0 0; font: 400 3.6em/0.8 var(--display); color: var(--accent); }
.ra-section { margin-top: clamp(48px, 5vw, 72px); scroll-margin-top: calc(var(--nav-h) + 20px); }
.ra-section h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.375rem); max-width: 24ch; }
.ra-body a:not(.cite):not(.rfig__btn) { color: var(--save-dark); }
.ra-body strong { color: var(--ink); }

/* Citations: small pills that open the source itself */
.cites { white-space: normal; }
.cite {
  display: inline; margin: 0; padding: 1px 8px 2px;
  border-radius: 999px; background: var(--sand);
  color: var(--ink-soft) !important; font-size: 0.75em; font-weight: 900; line-height: 1.9;
  text-decoration: none; vertical-align: 1px; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.cite:hover { background: var(--gold-light); color: var(--ink) !important; }
.cite:focus-visible { border-radius: 999px; }

.ra-note {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start;
  padding: 20px 22px; border: 1.5px solid #DCD0FA; border-radius: 22px; background: var(--work-tint);
}
.ra-note > svg { width: 26px; height: 26px; color: var(--work-dark); margin-top: 2px; }
.ra-note p { font-size: 1rem; line-height: 1.6; }
.ra-takeaway span { line-height: 1.55; }
.ra-note__title { margin-bottom: 4px; font: 400 1.25rem/1.2 var(--display); color: var(--ink); }

/* Advice: numbered tips */
.ra-advice__intro { padding-left: 14px; border-left: 4px solid var(--gold); color: var(--ink-soft); font-size: 1rem !important; }
.ra-tips { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: tip; }
.ra-tip {
  counter-increment: tip; position: relative;
  padding: 20px 22px 20px 74px; border: 1.5px solid var(--edge); border-radius: 22px; background: var(--paper);
  box-shadow: 0 4px 0 var(--base);
}
.ra-tip::before {
  content: counter(tip); position: absolute; left: 20px; top: 18px;
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 3px 0 var(--cta-base); font: 400 1.25rem/1 var(--display);
}
.ra-tip h3 { font-size: 1.3125rem; line-height: 1.2; }
.ra-tip p { margin-top: 8px; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }
.ra-takeaway {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 22px; border-radius: 22px; background: var(--gold-light); font-size: 1.125rem;
}
.ra-takeaway svg { width: 26px; height: 26px; flex: none; color: var(--kicker); margin-top: 3px; }

/* About this research and the sources */
.ra-section--about { padding: 24px 26px; border-radius: 24px; background: var(--sand); }
.ra-section--about h2 { font-size: 1.5rem; }
.ra-section--about p { font-size: 1rem; color: var(--ink-soft); }
.ra-sources h2 { font-size: 1.5rem; }
.ra-sources__lead { font-size: 1rem !important; color: var(--ink-soft); }
.ra-sources ol { display: grid; gap: 8px; margin: 16px 0 0; padding-left: 1.6em; }
.ra-sources li { font-size: 0.9375rem; line-height: 1.5; padding-left: 4px; }
.ra-sources li::marker { color: var(--kicker); font-weight: 900; }
.ra-sources a { color: var(--ink) !important; text-decoration-color: var(--sand-dark); }
.ra-sources a:hover { text-decoration-color: var(--ink); }
.ra-sources__domain { margin-left: 4px; color: var(--ink-soft); font-size: 0.8125rem; white-space: nowrap; }

/* More research and the Earnwick box */
.ra-more { margin-top: clamp(56px, 6vw, 96px); padding: clamp(40px, 5vw, 72px) 0; background: linear-gradient(rgba(255, 255, 255, 0), #FFFDF8 30%, #FFFDF8); border-top: 1px solid rgba(51, 38, 31, 0.06); }
.ra-more .section__head { margin-bottom: 24px; }
.ra-more h2 { font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); }
.rcards--row { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.ra-plug, .rhub-hub-plug { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 88px); }
.ra-plug__card {
  display: grid; gap: 18px; justify-items: start; align-items: center;
  padding: clamp(22px, 3vw, 32px); background: linear-gradient(110deg, #FFF6E2, #FFFFFF 60%);
}
.ra-plug__art { width: 120px; height: 120px; }
.ra-plug__text h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); max-width: 22ch; }
.ra-plug__text p:not(.kicker) { margin-top: 10px; color: var(--ink-soft); max-width: 60ch; }
@media (min-width: 900px) {
  .ra-plug__card { grid-template-columns: auto 1fr auto; gap: 28px; }
  /* Desktop: the sign-up block sits on the same plain off-white as "More from the research" and the footer, not on
     the cream dot grid; phones keep the cream. */
  .ra-plug { background: #FFFDF8; }
  /* On the blog page it follows the cream card grid, so it opens the same way "More from the research" does. */
  .page-hub .ra-plug { margin-top: clamp(24px, 3vw, 48px); background: linear-gradient(rgba(255, 253, 248, 0), #FFFDF8 30%, #FFFDF8); }
}

/* ---------- Figures ---------- */

.rfig {
  container-type: inline-size;
  margin: 36px 0 40px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1.5px solid var(--edge); border-radius: 26px; background: var(--paper);
  box-shadow: 0 5px 0 var(--base);
}
.rfig__kicker { margin-bottom: 6px; font: 900 0.75rem/1.3 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--kicker); }
.rfig__title { font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem); line-height: 1.12; }
.rfig__sub { margin-top: 8px; color: var(--ink-soft); font-size: 1rem !important; line-height: 1.5 !important; max-width: 62ch; }
.rfig__asked {
  display: inline-flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  padding: 7px 12px; border-radius: 14px; background: var(--track);
  font-size: 0.8125rem !important; line-height: 1.4 !important; color: var(--ink-soft);
}
.rfig__asked svg { width: 18px; height: 18px; flex: none; color: var(--ink-soft); }
.rfig__asked-label { margin-right: 4px; color: var(--ink); font-weight: 900; }
.rfig__asked-label::after { content: ":"; }

.rfig__plot { margin-top: 20px; }
.rfig__plot:empty { display: none; }
.rfig__viewnote { margin: 10px 0 0; font-size: 0.8125rem !important; line-height: 1.45 !important; color: var(--ink-soft); }
.rplot { position: relative; margin-top: 16px; }
.rplot > * + * { margin-top: 14px; }
.rplot__aside { font-size: 0.8125rem !important; line-height: 1.45 !important; color: var(--ink-soft); }

/* The data table: always in the page; a drawn chart tucks it behind "Show the numbers" */
.rfig__table { margin-top: 18px; }
.rfig.is-charted .rfig__table:not(.is-open) {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.rfig__scroll { overflow-x: auto; border: 1.5px solid var(--edge); border-radius: 16px; }
.rfig table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.4; }
.rfig th, .rfig td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--grid); }
.rfig thead th { position: sticky; top: 0; background: var(--track); font-weight: 900; white-space: nowrap; }
.rfig tbody th { font-weight: 800; }
.rfig td { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rfig tbody tr:last-child > * { border-bottom: 0; }

.rfig__foot { margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--grid); }
.rfig__foot p { font-size: 0.8125rem !important; line-height: 1.5 !important; color: var(--ink-soft); }
.rfig__foot > * + * { margin-top: 8px; }
.rfig__note { color: var(--ink) !important; }
.rfig__source span:first-child { font-weight: 900; color: var(--ink); }
.rfig__source a { color: var(--ink-soft) !important; text-decoration-color: var(--sand-dark); text-decoration-thickness: 1.5px; }
.rfig__source a:hover { color: var(--ink) !important; }
.rfig__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.rfig__btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px;
  border: 1.5px solid var(--edge); border-radius: 12px; background: var(--paper); box-shadow: 0 3px 0 var(--base);
  color: var(--ink) !important; font: 900 0.8125rem/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.rfig__btn svg { width: 16px; height: 16px; flex: none; }
.rfig__btn:hover { background: var(--track); }
.rfig__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--base); }
.rfig__btn[aria-expanded="true"] { background: var(--gold-light); }
.has-js .rfig:not(.is-charted) .rfig__actions [data-table-toggle] { display: none; }
html:not(.has-js) [data-table-toggle] { display: none; }

/* Tabs */
.rtabs {
  display: inline-flex; max-width: 100%; gap: 4px; padding: 4px; overflow-x: auto;
  border-radius: 14px; background: var(--track); scrollbar-width: none;
}
.rtabs::-webkit-scrollbar { display: none; }
.rtabs__tab {
  flex: none; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-soft); font: 900 0.875rem/1.2 var(--text); white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.rtabs__tab:hover { color: var(--ink); }
.rtabs__tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 2px 0 var(--base), 0 0 0 1.5px var(--edge); }

/* Legend */
.rlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.rlegend__item { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 800; color: var(--ink-soft); }
.rlegend__swatch { flex: none; width: 14px; height: 10px; border-radius: 3px; background: var(--mc, var(--c1)); }
.rlegend__swatch--dot, .rlegend__swatch--tile { width: 11px; height: 11px; border-radius: 50%; }
.rlegend__swatch--hollow { width: 11px; height: 11px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--mc, var(--ink-soft)); }
.rlegend__swatch--line { width: 18px; height: 3px; border-radius: 2px; }
.rlegend__swatch--ref { width: 2px; height: 16px; border-radius: 1px; background: var(--ink); opacity: 0.6; }
.rlegend__swatch--weak { background: var(--paper); box-shadow: inset 0 0 0 2px var(--mc); }
.rlegend__swatch--approx { background: color-mix(in srgb, var(--mc) 80%, #fff); }
.rlegend__swatch--carried { opacity: 0.3; }
.rlegend__swatch--whisker { position: relative; width: 20px; height: 2px; border-radius: 0; background: var(--ink-soft); }
.rlegend__swatch--whisker::before, .rlegend__swatch--whisker::after { content: ""; position: absolute; top: -4px; width: 2px; height: 10px; background: var(--ink-soft); }
.rlegend__swatch--whisker::before { left: 0; }
.rlegend__swatch--whisker::after { right: 0; }
.rlegend__swatch--emph { background: var(--c1); }

/* Callout number above a chart */
.rcallout { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 14px; border-radius: 14px; background: var(--gold-light); }
.rcallout__value { font: 900 1.5rem/1 var(--text); }
.rcallout__label { font-size: 0.875rem; font-weight: 800; color: var(--ink); }

/* Marks: hover and keyboard focus */
.rmark { cursor: default; outline: none; }
.rmark:focus-visible { outline: 3px solid var(--save-dark); outline-offset: 2px; border-radius: 10px; }
g.rmark:focus-visible { outline: none; }
g.rmark:focus-visible .rp__dot, g.rmark:focus-visible .rl__dot { stroke: var(--ink); stroke-width: 3; }

/* Tooltip */
.rtip {
  position: fixed; left: 0; top: 0; z-index: 70;
  max-width: min(280px, calc(100vw - 16px)); padding: 10px 13px 11px;
  border-radius: 14px; background: var(--ink); color: #fff;
  box-shadow: 0 10px 30px rgba(51, 38, 31, 0.25);
  pointer-events: none; opacity: 0;
  transform: translate(var(--x, 0), var(--y, 0)) scale(0.96);
  transition: opacity 0.12s, transform 0.12s;
}
.rtip.is-on { opacity: 1; transform: translate(var(--x, 0), var(--y, 0)); }
.rtip p { margin: 0; }
.rtip__label { display: flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 800; color: #F1E6D6; }
.rtip__label.has-key::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px rgba(255, 255, 255, 0.6); }
.rtip__value { margin-top: 2px !important; font: 900 1.375rem/1.15 var(--text); }
.rtip__note { margin-top: 4px !important; font-size: 0.75rem; line-height: 1.4; color: #E2D2BC; }

/* Axis and gridlines shared by row charts */
.raxis { display: grid; grid-template-columns: var(--label-col, minmax(0, 36%)) minmax(0, 1fr); gap: 16px; margin-top: 4px !important; }
.raxis__area { position: relative; height: 22px; margin-right: var(--val-room, 4.4em); }
.raxis--gap .raxis__area { margin-right: calc(var(--val-room, 4.4em) + 3.6em); }
.raxis__tick { position: absolute; left: var(--x); top: 0; display: grid; justify-items: center; transform: translateX(-50%); white-space: nowrap; }
.raxis__num { font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.raxis__note { font-size: 0.6875rem; font-weight: 800; color: var(--kicker); }
.rgrid { position: absolute; inset: -7px 0; pointer-events: none; }
.rgrid__line { position: absolute; left: var(--x); top: 0; bottom: 0; width: 1px; background: var(--grid); }
.rgrid__line.is-zero { background: #CDBFAC; }

/* ---------- Bars ---------- */

.rb { --label-col: minmax(0, 36%); }
.rb__group { margin: 18px 0 6px; font: 900 0.75rem/1.3 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }
.rb__group:first-child { margin-top: 0; }
.rb__row {
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 6px 8px; margin: 0 -8px; border-radius: 12px;
  transition: background-color 0.12s;
}
.rb__row:hover, .rb__row:focus-visible { background: var(--track); }
.rb__label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.9375rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.has-emph .rb__row:not(.is-emph) .rb__label { color: var(--ink-soft); }
.rb__row.is-emph .rb__label { font-weight: 900; }
.rb__tag { padding: 1px 8px; border-radius: 999px; background: var(--track); font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); }
.rb__area { position: relative; height: 24px; margin-right: var(--val-room, 4.4em); }
.rb__bar {
  position: absolute; left: 0; top: 2px; height: 20px; width: var(--w);
  border-radius: 0 5px 5px 0; background: var(--mc);
  transition: width 0.7s var(--settle);
}
.rb__bar--inner { top: 2px; height: 20px; }
.rb__row.is-weak .rb__bar { background: var(--paper); box-shadow: inset 0 0 0 2px var(--mc); }
.rb__val {
  position: absolute; left: var(--x); top: 50%; padding-left: 8px; transform: translateY(-50%);
  font-size: 0.875rem; font-weight: 900; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: left 0.7s var(--settle);
}
.rb__ref { position: absolute; left: var(--x); top: -7px; bottom: -7px; width: 2px; margin-left: -1px; background: var(--ink); opacity: 0.55; border-radius: 1px; }
.rb--dot .rb__dot {
  position: absolute; left: var(--x); top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--mc); box-shadow: 0 0 0 2px var(--paper);
  transform: translate(-50%, -50%); transition: left 0.7s var(--settle);
}
.rb--dot .rb__val { padding-left: 14px; }
.rb--dot .rb__val.is-left { padding: 0 14px 0 0; transform: translate(-100%, -50%); }
.rb + .raxis { --label-col: minmax(0, 36%); }
.rfig.is-waiting .rb__bar { width: 0; }
.rfig.is-waiting .rb__val { left: 0; opacity: 0; }

/* ---------- Dumbbells ---------- */

.rd__row {
  display: grid; grid-template-columns: var(--label-col, minmax(0, 36%)) minmax(0, 1fr) 3.6em; gap: 16px; align-items: center;
  padding: 7px 8px; margin: 0 -8px; border-radius: 12px;
}
.rd__row.is-emph { background: var(--track); }
.rd__label { display: grid; gap: 1px; }
.rd__name { font-size: 0.9375rem; font-weight: 900; line-height: 1.3; }
.rd__sub { font-size: 0.8125rem; font-weight: 700; line-height: 1.35; color: var(--ink-soft); }
.rd__area { position: relative; height: 30px; margin-right: 1.2em; }
.rd__seg { position: absolute; left: var(--l); right: var(--r); top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--seg); transition: left 0.7s var(--settle), right 0.7s var(--settle); }
.rd__hit { position: absolute; left: var(--x); top: 50%; display: grid; place-items: center; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; transition: left 0.7s var(--settle); }
.rd__dot { width: 15px; height: 15px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 0 2.5px var(--paper); }
.rd__hit:hover .rd__dot, .rd__hit:focus-visible .rd__dot { transform: scale(1.2); }
.rd__val {
  position: absolute; left: var(--x); top: 50%; font-size: 0.8125rem; font-weight: 900; white-space: nowrap; color: var(--ink);
  transform: translate(12px, -50%); font-variant-numeric: tabular-nums;
}
.rd__val.is-left { transform: translate(calc(-100% - 12px), -50%); }
.rd__gap { justify-self: end; font-size: 0.75rem; font-weight: 900; color: var(--ink-soft); white-space: nowrap; }
.rd + .raxis { grid-template-columns: var(--label-col, minmax(0, 36%)) minmax(0, 1fr) 3.6em; }
.rd + .raxis .raxis__area { margin-right: 1.2em; }
.rfig.is-waiting .rd__seg { left: 0; right: 100%; }
.rfig.is-waiting .rd__hit { left: 0; }
.rfig.is-waiting .rd__val { opacity: 0; }

/* ---------- 100% stacks ---------- */

.rs { display: grid; gap: 18px; }
.rs__label { margin-bottom: 8px; font-size: 0.9375rem; font-weight: 900; }
.rs__bar { display: flex; gap: 2px; height: 34px; }
.rs__seg {
  position: relative; display: grid; place-items: center; flex: 0 1 var(--w); min-width: 4px;
  background: var(--mc); transition: flex-basis 0.8s var(--settle);
}
.rs__seg:first-child { border-radius: 8px 0 0 8px; }
.rs__seg:last-child { border-radius: 0 8px 8px 0; }
.rs__seg:only-child { border-radius: 8px; }
.rs__seg:hover, .rs__seg:focus-visible { filter: brightness(1.06); }
.rs__in { font-size: 0.875rem; font-weight: 900; color: #fff; white-space: nowrap; }
.rs__seg.is-c0 .rs__in, .rs__seg.is-c4 .rs__in { color: var(--ink); }
.rs__small, .rs__note { margin-top: 6px !important; font-size: 0.8125rem !important; line-height: 1.4 !important; color: var(--ink-soft); }
.rs__small { font-weight: 900; color: var(--ink); }
.rfig.is-waiting .rs__seg { flex-basis: 0; }

/* ---------- Tiles ---------- */

.rt { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.rt__tile {
  display: grid; align-content: start; gap: 6px;
  padding: 14px 14px 12px; border: 1.5px solid var(--edge); border-radius: 18px; background: var(--paper);
}
.rt__tile p { margin: 0; }
.rt__place { font-size: 0.75rem !important; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.3 !important; }
.rt__head { display: flex; align-items: center; gap: 10px; }
.rt__ring { width: 46px; height: 46px; flex: none; }
.rt__track { fill: none; stroke: var(--track); stroke-width: 8; }
.rt__arc { fill: none; stroke: var(--mc); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray 0.9s var(--settle); }
.rt__num { font: 900 2rem/1 var(--text) !important; color: var(--ink); }
.rt__of { font-size: 0.8125rem !important; line-height: 1.35 !important; color: var(--ink-soft); }
.rt__what { font-size: 0.875rem !important; font-weight: 900; line-height: 1.35 !important; }
.rt__foot { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px !important; font-size: 0.75rem !important; line-height: 1.3 !important; }
.rt__who { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--track); font-weight: 900; }
.rt__who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mc); }
.rt__src { color: var(--ink-soft); font-weight: 800; }
.rt__meta { font-size: 0.75rem !important; line-height: 1.4 !important; color: var(--ink-soft); }

/* ---------- Diverging ---------- */

.rv__row { display: grid; grid-template-columns: var(--label-col, minmax(0, 40%)) minmax(0, 1fr); gap: 16px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 12px; }
.rv__row:hover, .rv__row:focus-visible { background: var(--track); }
.rv__label { display: grid; gap: 2px; }
.rv__name { font-size: 0.9375rem; font-weight: 900; line-height: 1.3; }
.rv__sub { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-soft); }
.rv__area { position: relative; height: 26px; margin: 0 3.6em 0 3.6em; }
.rv__bar { position: absolute; left: var(--l); top: 3px; height: 20px; width: var(--w); background: var(--mc); transition: width 0.7s var(--settle), left 0.7s var(--settle); }
.is-pos .rv__bar { border-radius: 0 5px 5px 0; }
.is-neg .rv__bar { border-radius: 5px 0 0 5px; }
.rv__val { position: absolute; left: var(--x); top: 50%; transform: translate(8px, -50%); font-size: 0.875rem; font-weight: 900; white-space: nowrap; }
.is-neg .rv__val { transform: translate(calc(-100% - 8px), -50%); }
.rv + .raxis { --label-col: minmax(0, 40%); }
.rv + .raxis .raxis__area { margin: 0 3.6em; }
.rfig.is-waiting .rv__bar { width: 0 !important; }

/* ---------- Forest plot ---------- */

.rf__row { display: grid; grid-template-columns: var(--label-col, minmax(0, 36%)) minmax(0, 1fr); gap: 16px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 12px; }
.rf__row:hover, .rf__row:focus-visible { background: var(--track); }
.rf__label { display: grid; gap: 2px; }
.rf__name { font-size: 0.9375rem; font-weight: 900; line-height: 1.3; }
.rf__sub { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-soft); }
.rf__row.is-muted .rf__name { color: var(--ink-soft); }
.rf__area { position: relative; height: 30px; margin-right: var(--val-room, 4.4em); }
.rf__ci { position: absolute; left: var(--l); right: var(--r); top: 50%; height: 2.5px; margin-top: -1px; background: var(--mc); }
.rf__ci::before, .rf__ci::after { content: ""; position: absolute; top: -6px; width: 2.5px; height: 14px; border-radius: 1px; background: var(--mc); }
.rf__ci::before { left: -1px; }
.rf__ci::after { right: -1px; }
.rf__dot { position: absolute; left: var(--x); top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 0 2.5px var(--paper); transform: translate(-50%, -50%); }
.rf__dot.is-hollow { background: var(--paper); box-shadow: inset 0 0 0 3px var(--mc), 0 0 0 2px var(--paper); }
.rf__val { position: absolute; left: var(--x); top: 50%; transform: translate(14px, -50%); font-size: 0.875rem; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rf + .raxis { --label-col: minmax(0, 36%); }
.rf + .raxis .raxis__area { height: 34px; }
.rfig.is-waiting .rf__ci { transform: scaleX(0); }
.rf__ci { transition: transform 0.7s var(--settle); transform-origin: left; }

/* ---------- Panels (SVG) ---------- */

.rp { display: grid; gap: 20px; }
.rp__panel { min-width: 0; padding: 14px 14px 6px; border-radius: 18px; background: var(--track); }
.rp__title { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 900; }
.rp__key { width: 12px; height: 12px; border-radius: 50%; background: var(--mc); }
.rp__stage { margin-top: 6px; }
.rp__svg, .rl__svg { display: block; overflow: visible; }
.rp__grid, .rl__grid { stroke: #E8DCCB; stroke-width: 1; }
.rp__grid.is-zero, .rl__grid.is-zero { stroke: #CDBFAC; }
.rp__tick, .rl__tick { fill: var(--ink-soft); font: 800 11px var(--text); font-variant-numeric: tabular-nums; }
.rp__xlabel { fill: var(--ink-soft); font: 800 11px var(--text); }
.rp__line { fill: none; stroke: var(--mc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rp__dot { fill: var(--mc); stroke: var(--track); stroke-width: 2.5; }
.rp__dot.is-hollow { fill: var(--paper); stroke: var(--mc); stroke-width: 2.5; }
.rp__hit, .rl__hit { fill: transparent; }
.rp__val { fill: var(--ink); font: 900 13px var(--text); }
@container (min-width: 600px) { .rp { grid-template-columns: 1fr 1fr; } }

/* ---------- Columns ---------- */

.rc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.rc__y { position: relative; width: 3em; height: var(--rc-h, 220px); }
.rc__ytick { position: absolute; right: 0; bottom: var(--y); transform: translateY(50%); font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc__area { position: relative; height: var(--rc-h, 220px); margin: 0 0 30px; }
.rc__grid { position: absolute; left: 0; right: 0; bottom: var(--y); height: 1px; background: var(--grid); }
.rc__grid.is-zero { background: #CDBFAC; }
.rc__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, 1cqw, 10px); }
.rc__col { position: relative; height: 100%; border-radius: 8px; }
.rc__col:hover, .rc__col:focus-visible { background: rgba(51, 38, 31, 0.04); }
.rc__bar {
  position: absolute; left: 50%; bottom: 0; width: min(30px, 78%); height: var(--h);
  border-radius: 5px 5px 0 0; background: var(--mc); transform: translateX(-50%);
  transition: height 0.7s var(--settle);
}
.rc__col.is-approx .rc__bar { background: color-mix(in srgb, var(--mc) 80%, #fff); }
.rc__col.is-carried .rc__bar { opacity: 0.3; }
.rc__val { position: absolute; left: 50%; bottom: calc(var(--h) + 5px); transform: translateX(-50%); font-size: 0.75rem; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; transition: bottom 0.7s var(--settle); }
.rc__x { position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%); font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.rc__x.is-quiet { color: transparent; }
.rfig.is-waiting .rc__bar { height: 0; }
.rfig.is-waiting .rc__val { bottom: 5px; opacity: 0; }
@container (max-width: 520px) {
  .rc__cols { gap: 2px; }
  .rc__x { font-size: 0.6875rem; }
  .rc__cols:has(> :nth-child(12)) .rc__x:not(:first-child) { font-size: 0.625rem; }
  .rc__cols:has(> :nth-child(15)) .rc__col:nth-child(even) .rc__x { color: transparent; }
  .rc__cols:has(> :nth-child(10)) .rc__val { font-size: 0.6875rem; }
  .rc__cols:has(> :nth-child(11)) .rc__col:nth-child(even):not(:last-child) .rc__val { display: none; }
}
.rc-multi { display: grid; gap: 18px 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.rc-multi__cell { --rc-h: 150px; min-width: 0; padding: 14px 14px 4px; border-radius: 18px; background: var(--track); }
.rc-multi__title { margin-bottom: 18px !important; font-size: 0.9375rem; font-weight: 900; line-height: 1.3; min-height: 2.6em; }
.rc-multi__note { margin: -6px 0 10px !important; font-size: 0.75rem !important; line-height: 1.4 !important; color: var(--ink-soft); }
.rc-multi .rc__grid { background: #E8DCCB; }

/* ---------- Lines (SVG) ---------- */

.rl-multi { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.rl-multi__cell { min-width: 0; padding: 12px 12px 4px; border-radius: 18px; background: var(--track); }
.rl-multi__title { display: grid; gap: 1px; min-height: 3.2em; }
.rl-multi__name { font-size: 0.9375rem; font-weight: 900; }
.rl-multi__measure { font-size: 0.75rem; font-weight: 700; line-height: 1.35; color: var(--ink-soft); }
.rl-multi__stage { margin-top: 6px; }
.rl-multi .rl__grid { stroke: #E8DCCB; }
.rl-multi .rl__dot { stroke: var(--track); }

.rl { min-height: 300px; }
.rl__line { fill: none; stroke: var(--mc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rl__dot { fill: var(--mc); stroke: var(--paper); stroke-width: 2; }
.rl__dot.is-hollow { fill: var(--paper); stroke: var(--mc); stroke-width: 2.2; }
.rl__leader { fill: none; stroke: var(--mc); stroke-width: 1.5; }
.rl__end { font: 800 13px var(--text); fill: var(--ink); }
.rl__end-val { font-weight: 900; }
.rl__series .rl__pt:hover .rl__dot { r: 6; }
.rfig.is-waiting .rl__svg, .rfig.is-waiting .rp__svg { opacity: 0; }
.rl__svg, .rp__svg { transition: opacity 0.6s ease; }

/* ---------- The bundle gap (calculator) ---------- */

.rk { display: grid; gap: 14px; }
.rk__top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; }
.rk__side { display: grid; align-content: start; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--track); }
.rk__side--pay { background: #FFEDEA; }
.rk__label { font: 900 0.75rem/1.3 var(--text) !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.rk__label--meter { margin-top: 4px; }
.rk__name { font-size: 0.875rem !important; line-height: 1.4 !important; color: var(--ink-soft); }
.rk__big { margin-top: 2px !important; font: 900 clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem)/1.1 var(--text) !important; color: var(--ink); }
.rk__big--out { color: var(--out-text); }
.rk__arrow { align-self: center; font: 900 1.75rem/1 var(--text); color: var(--ink-soft); }
.rk__meter { display: flex; gap: 2px; height: 30px; }
.rk__used, .rk__left { flex: 0 1 var(--w); min-width: 6px; background: var(--mc); transition: flex-basis 0.6s var(--settle); }
.rk__used { border-radius: 8px 0 0 8px; }
.rk__left { border-radius: 0 8px 8px 0; }
.rk__keys { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8125rem !important; font-weight: 800; color: var(--ink-soft); }
.rk__key { display: inline-flex; align-items: center; gap: 7px; }
.rk__key::before { content: ""; width: 12px; height: 10px; border-radius: 3px; background: var(--mc); }
.rk__facts { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.rk__fact { display: grid; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--edge); border-radius: 16px; font-size: 0.875rem; line-height: 1.4; color: var(--ink-soft); }
.rk__fact-num { font: 900 1.5rem/1.1 var(--text); color: var(--ink); }
@container (max-width: 520px) {
  .rk__top { grid-template-columns: minmax(0, 1fr); }
  .rk__arrow { justify-self: center; transform: rotate(90deg); }
}
.rfig--calculator .rtabs { flex-wrap: wrap; overflow: visible; }

/* ---------- Timeline ---------- */

.rtl-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.rtl-filter__btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  border: 1.5px solid var(--edge); border-radius: 999px; background: var(--paper);
  font: 900 0.8125rem/1.2 var(--text); color: var(--ink-soft);
}
.rtl-filter__btn.is-c1::before, .rtl-filter__btn.is-c2::before, .rtl-filter__btn.is-c3::before, .rtl-filter__btn.is-c4::before, .rtl-filter__btn.is-c5::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mc);
}
.rtl-filter__btn:hover { color: var(--ink); background: var(--track); }
.rtl-filter__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rtl { position: relative; margin: 6px 0 0; padding: 0 0 0 30px; list-style: none; }
.rtl::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--grid); }
.rtl__year { position: relative; margin: 18px 0 8px -30px; padding-left: 30px; font: 400 1.375rem/1 var(--display); color: var(--ink); }
.rtl__year:first-child { margin-top: 4px; }
.rtl__ev { position: relative; padding: 12px 16px 14px; margin-bottom: 10px; border: 1.5px solid var(--edge); border-radius: 16px; background: var(--paper); }
.rtl__dot { position: absolute; left: -27px; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 0 3px var(--paper); }
.rtl__ev.is-secondary .rtl__dot { background: var(--paper); box-shadow: inset 0 0 0 3px var(--mc), 0 0 0 3px var(--paper); }
.rtl__ev p { margin: 0; }
.rtl__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 0.75rem !important; line-height: 1.3 !important; color: var(--ink-soft); }
.rtl__place { padding: 2px 8px; border-radius: 999px; background: var(--track); color: var(--ink); font-weight: 900; }
.rtl__place::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--mc); }
.rtl__date { font-weight: 800; }
.rtl__sec { font-style: italic; }
.rtl__h { margin-top: 6px !important; font-size: 0.9375rem !important; font-weight: 900; line-height: 1.35 !important; }
.rtl__b { margin-top: 4px !important; font-size: 0.875rem !important; line-height: 1.5 !important; color: var(--ink-soft); }

/* ---------- Receipt (worked example) ---------- */

.rreceipt {
  max-width: 460px; margin: 18px auto 0; padding: 18px 20px 0;
  border-radius: 16px 16px 0 0; background: #FFFDF8; border: 1.5px solid var(--edge); border-bottom: 0;
  position: relative;
}
.rreceipt::after {
  content: ""; position: absolute; left: -1.5px; right: -1.5px; bottom: -12px; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, #FFFDF8 0) 0 0 / 16px 12px repeat-x,
              linear-gradient(45deg, transparent 8px, #FFFDF8 0) 0 0 / 16px 12px repeat-x;
}
.rreceipt__lines { display: grid; gap: 0; margin: 0; }
.rreceipt__line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1.5px dashed var(--grid); }
.rreceipt__line dt { font-size: 0.9375rem; font-weight: 800; }
.rreceipt__line dd { margin: 0; font-size: 0.9375rem; font-weight: 900; white-space: nowrap; }
.rreceipt__line.is-muted dt, .rreceipt__line.is-muted dd { color: var(--ink-soft); }
.rreceipt__line.is-out dd { color: var(--out-text); }
.rreceipt__line.is-keep dd { color: var(--keep-dark); }
.rreceipt__total { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 12px -6px 0 !important; padding: 14px 16px 22px; border-radius: 14px 14px 0 0; background: #FFEDEA; }
.rreceipt__total span { font-size: 0.9375rem !important; font-weight: 900; color: var(--out-text); }
.rreceipt__total strong { font: 900 1.75rem/1 var(--text); color: var(--out-text); }
.rfig--receipt .rfig__foot { margin-top: 30px; }

/* ---------- Small figures: labels above their bars ---------- */

@container (max-width: 560px) {
  .rb__row, .rv__row, .rf__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rd__row { grid-template-columns: minmax(0, 1fr) 3em; gap: 4px 10px; }
  .rd__label { grid-column: 1 / -1; }
  .rd__area { margin-right: 0.6em; }
  .raxis { grid-template-columns: minmax(0, 1fr) !important; }
  .raxis__spacer { display: none; }
  .rd + .raxis { grid-template-columns: minmax(0, 1fr) 3em !important; }
  .rd + .raxis .raxis__spacer { display: none; }
  .rv__area { margin: 0 3.4em; }
  .rv + .raxis .raxis__area { margin: 0 3.4em; }
}

@media (prefers-reduced-motion: reduce) {
  .rfig.is-waiting .rb__bar { width: var(--w); }
}
@media print {
  .nav, .ra-toc, .ra-more, .ra-plug, .rfig__actions, .read-progress { display: none !important; }
  .rfig { break-inside: avoid; box-shadow: none; }
  .rfig.is-charted .rfig__table:not(.is-open) { position: static; width: auto; height: auto; margin: 18px 0 0; overflow: visible; clip: auto; white-space: normal; }
  .cite { background: none; padding: 0; }
}
