/* RestioX blog: the guides (/blog/<slug>), the hub (/blogs) and the author page (November 2026).
   assets/redesign/rx.css and pages/*.css are a built set and are not edited: what the blog needs on top of them lives here,
   loaded after them through $page_rx_css. Light purple only, no dark fills, 44 px targets, RTL-safe (logical properties),
   no motion beyond the cards' own hover (off with reduced motion). Every class starts with rxb-. */

/* ── Guide header ────────────────────────────────────────────────────────────────────────────────────────────────── */
.rxb-head { padding-bottom: 40px; }
.rxb-head .rx-hero__inner { max-width: 900px; gap: 18px; }
.rxb-crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 22px; color: var(--rx-ink-500); }
.rxb-crumbs li + li::before { content: "›"; margin-inline-end: 8px; color: var(--rx-ink-400); }
[dir="rtl"] main:not([dir="ltr"]) .rxb-crumbs li + li::before { content: "‹"; }
.rxb-crumbs a { display: inline-flex; align-items: center; min-height: 24px; color: var(--rx-violet-650); text-decoration: underline; text-underline-offset: 2px; }
.rxb-crumbs a:hover { color: var(--rx-violet-700); }
.rxb-standfirst { max-width: 720px; color: var(--rx-ink-500); }
.rxb-byline { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; text-align: start; }
.rxb-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--rx-violet-100); border: 1px solid var(--rx-violet-200); color: var(--rx-violet-700); font-size: 15px; line-height: 1; font-weight: 500; letter-spacing: .02em; }
.rxb-avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.rxb-byline__text { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 15px; line-height: 22px; color: var(--rx-ink-500); }
.rxb-byline__who { color: var(--rx-ink-700); }
.rxb-byline__who a { color: var(--rx-ink-900); font-weight: 500; text-decoration: underline; text-decoration-color: var(--rx-violet-300); text-underline-offset: 3px; }
.rxb-byline__who a:hover { color: var(--rx-violet-700); }
.rxb-byline__when { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; }

/* ── The cover and the two columns ───────────────────────────────────────────────────────────────────────────────── */
.rxb-post { padding-top: 8px; }
.rxb-cover { max-width: 1040px; margin: 0 auto 56px; border-radius: 24px; overflow: hidden; border: 1px solid var(--rx-line); background: var(--rx-violet-50); aspect-ratio: 16 / 9; }
.rxb-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .rxb-cover { margin-bottom: 32px; border-radius: 16px; } }
.rxb-article { width: 100%; max-width: 760px; font-size: 18px; }
@media (max-width: 767px) { .rxb-article { font-size: 17px; } }
.rxb-article > h2 { scroll-margin-top: calc(var(--rx-header-h) + 24px); }
.rxb-article > h2:first-of-type { margin-top: 1.4em; }

/* the contents list above the text, below 1024 px (the rail takes over from there) */
.rxb-toc-m { margin: 0 0 28px; border: 1px solid var(--rx-line); border-radius: 16px; background: var(--rx-white); }
.rxb-toc-m > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px; cursor: pointer; list-style: none; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--rx-ink-900); border-radius: 16px; }
.rxb-toc-m > summary::-webkit-details-marker { display: none; }
.rxb-toc-m > summary > .rx-icon { width: 18px; height: 18px; color: var(--rx-violet-600); }
.rxb-toc-m > summary > span { flex: 1; }
.rxb-toc-m__caret { transition: transform .2s; }
.rxb-toc-m[open] .rxb-toc-m__caret { transform: rotate(180deg); }
.rx-prose .rxb-toc-m ol { list-style: none; margin: 0; padding: 0 10px 12px; }
.rx-prose .rxb-toc-m li { margin: 0; padding: 0; }
.rx-prose .rxb-toc-m a { display: flex; align-items: center; min-height: 44px; padding: 6px 10px; border-radius: 10px; color: var(--rx-ink-700); font-size: 16px; line-height: 24px; text-decoration: none; }
.rx-prose .rxb-toc-m a:hover { background: var(--rx-violet-50); color: var(--rx-violet-700); }
@media (min-width: 1024px) { .rxb-toc-m { display: none; } }
@media (prefers-reduced-motion: reduce) { .rxb-toc-m__caret { transition: none; } }

/* ── Building blocks of a body ───────────────────────────────────────────────────────────────────────────────────── */
/* "In short" */
.rxb-short { margin: 0 0 2em; padding: 22px 24px 20px; background: var(--rx-violet-50); border: 1px solid var(--rx-violet-200); border-radius: 18px; }
.rx-prose .rxb-short__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; line-height: 24px; color: var(--rx-ink-900); }
.rxb-short__title .rx-icon { width: 18px; height: 18px; color: var(--rx-violet-600); }
.rx-prose .rxb-short ul { margin: 0; padding-inline-start: 1.2em; }
.rx-prose .rxb-short li { margin: 0 0 .45em; font-size: 17px; line-height: 1.6; }
.rx-prose .rxb-short li:last-child { margin-bottom: 0; }

/* the label over a worked example */
.rx-prose .rxb-sample { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 1.2em; padding: 12px 16px; background: var(--rx-white); border: 1px dashed var(--rx-violet-300); border-radius: 12px; font-size: 15px; line-height: 23px; color: var(--rx-ink-500); }
.rxb-sample .rx-icon { width: 18px; height: 18px; margin-top: 2px; color: var(--rx-violet-600); }

/* a formula on its own line */
.rx-prose .rxb-formula { margin: 0 0 1.2em; padding: 14px 18px; background: var(--rx-violet-50); border-radius: 12px; font-family: var(--rx-mono); font-size: 15px; line-height: 24px; color: var(--rx-ink-900); overflow-wrap: anywhere; }
.rxb-formula b, .rxb-formula strong { font-weight: 500; }

/* tables: the site's table in the column; it scrolls sideways in its own frame when it needs more room */
.rxb-table { margin: 0 0 1.6em; }
.rxb-table .rx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rxb-table .rx-table { min-width: 480px; font-size: 15px; line-height: 22px; }
.rxb-table--wide .rx-table { min-width: 700px; }
.rxb-table .rx-table thead th { position: static; white-space: normal; }
.rxb-table .rx-table__caption { padding: 16px 16px 12px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--rx-ink-900); }
.rxb-table .rxb-num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rxb-table td.rxb-total, .rxb-table tbody th.rxb-total { background: var(--rx-violet-50); border-top: 1px solid var(--rx-violet-200); font-weight: 500; color: var(--rx-ink-900); }
.rx-prose .rxb-table__note { margin: 10px 4px 0; font-size: 14px; line-height: 22px; color: var(--rx-ink-500); }
@media (max-width: 767px) {
  .rxb-table .rx-table { font-size: 14px; line-height: 20px; }
  .rxb-table .rx-table td, .rxb-table .rx-table tbody th, .rxb-table .rx-table thead th { padding-inline: 12px; }
  .rxb-table .rx-table tbody th[scope="row"] { max-width: 150px; }
}

/* notes */
.rx-prose .rxb-note { margin: 0 0 1.5em; font-size: 16px; line-height: 26px; }
.rx-prose .rxb-note p { margin: 0; }
.rx-prose .rxb-note p + p { margin-top: 8px; }

/* checklist */
.rx-prose .rxb-check { list-style: none; margin: 0 0 1.4em; padding: 0; }
.rx-prose .rxb-check li { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 .6em; padding: 0; }
.rxb-check .rx-icon { width: 22px; height: 22px; margin-top: 4px; color: var(--rx-violet-600); }

/* numbered steps: the number in a soft violet disc */
.rx-prose .rxb-steps { list-style: none; counter-reset: rxbstep; margin: 0 0 1.4em; padding: 0; }
.rx-prose .rxb-steps > li { position: relative; counter-increment: rxbstep; margin: 0 0 .8em; padding: 3px 0; padding-inline-start: 48px; min-height: 34px; }
.rxb-steps > li::before { content: counter(rxbstep); position: absolute; inset-inline-start: 0; top: 2px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--rx-violet-100); color: var(--rx-violet-700); font-size: 15px; line-height: 1; font-weight: 500; }

/* drawings and screens */
.rxb-figure { margin: 0 0 1.6em; }
.rxb-figure > svg { display: block; width: 100%; height: auto; border: 1px solid var(--rx-line); border-radius: 16px; background: var(--rx-white); }
.rxb-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 22px; color: var(--rx-ink-500); text-align: center; }
/* a chart with small labels keeps a readable width and scrolls sideways in its frame on a phone */
.rxb-figure--scroll .rxb-figure__frame { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rx-line); border-radius: 16px; background: var(--rx-white); }
.rxb-figure--scroll .rxb-figure__frame > svg { min-width: 640px; border: 0; border-radius: 0; }
.rx-prose .rxb-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rx-line); border-radius: 16px; box-shadow: var(--rx-shadow-card); }
/* the drawings' own parts (inline SVG): real text, the site's colours */
.rxb-svg-text { font-family: var(--rx-font); font-size: 14px; fill: var(--rx-ink-700); }
.rxb-svg-strong { font-family: var(--rx-font); font-size: 15px; font-weight: 500; fill: var(--rx-ink-900); }
.rxb-svg-small { font-family: var(--rx-font); font-size: 12px; fill: var(--rx-ink-500); }
.rxb-svg-box { fill: var(--rx-white); stroke: var(--rx-violet-200); stroke-width: 1.5; }
.rxb-svg-box--on { fill: var(--rx-violet-100); stroke: var(--rx-violet-400); }
.rxb-svg-tint { fill: var(--rx-violet-50); }
.rxb-svg-line { fill: none; stroke: var(--rx-violet-400); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rxb-svg-line--strong { stroke: var(--rx-violet-650); stroke-width: 2.5; }
.rxb-svg-line--dash { stroke-dasharray: 5 6; }
.rxb-svg-axis { stroke: var(--rx-line); stroke-width: 1.5; }
.rxb-svg-fill { fill: var(--rx-violet-600); }
.rxb-svg-fill--soft { fill: var(--rx-violet-300); }
.rxb-svg-dot { fill: var(--rx-violet-650); stroke: var(--rx-white); stroke-width: 2; }

/* the line that opens the section about RestioX */
.rx-prose .rxb-disclosure { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 1.2em; font-size: 15px; line-height: 23px; color: var(--rx-ink-500); }
.rxb-disclosure .rx-icon { width: 18px; height: 18px; margin-top: 2px; color: var(--rx-ink-400); }

/* sources */
.rx-prose .rxb-sources { margin: 0 0 1em; padding-inline-start: 1.4em; font-size: 16px; line-height: 26px; }
.rx-prose .rxb-sources li { margin: 0 0 .7em; }
.rxb-sources a { overflow-wrap: anywhere; }
.rxb-sources__note { display: block; font-size: 14px; line-height: 22px; color: var(--rx-ink-500); }
.rx-prose .rxb-sources__when { font-size: 14px; line-height: 22px; color: var(--rx-ink-500); }

/* about the author, at the foot of the column */
.rxb-author { display: flex; align-items: flex-start; gap: 18px; margin-top: 56px; padding: 24px; background: var(--rx-white); border: 1px solid var(--rx-line); border-radius: 20px; box-shadow: var(--rx-shadow-card); }
.rxb-author__body { min-width: 0; }
.rx-prose .rxb-author p { margin: 0 0 8px; font-size: 15px; line-height: 24px; color: var(--rx-ink-500); }
.rx-prose .rxb-author p:last-child { margin-bottom: 0; }
.rx-prose .rxb-author__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 17px; line-height: 26px; }
.rx-prose .rxb-author__name a { color: var(--rx-ink-900); font-weight: 500; text-decoration-color: var(--rx-violet-300); }
.rxb-author__name span { font-size: 14px; color: var(--rx-ink-500); }
@media (max-width: 480px) { .rxb-author { flex-direction: column; gap: 12px; padding: 20px; } }

/* ── After the guide: related guides and the band ────────────────────────────────────────────────────────────────── */
.rxb-after { padding-block: calc(var(--rx-section) * .6); }
.rxb-after__title { margin: 0 0 28px; }
.rxb-after__all { margin: 28px 0 0; }
.rxb-after .rxb-cta { margin-top: 56px; }

/* ── Cards of a guide (the hub, related guides, the author page) ─────────────────────────────────────────────────── */
.rxb-card .rx-blog-card__media { aspect-ratio: 16 / 9; }
.rxb-card .rx-blog-card__media img { width: 100%; height: 100%; object-fit: cover; }
.rxb-card .rx-blog-card__title { font-size: 19px; line-height: 27px; }
.rxb-card .rx-blog-card__text { font-size: 15px; line-height: 24px; }
.rxb-card .rx-blog-meta .rx-icon { width: 15px; height: 15px; }
/* the whole card is the link's target: the title's link stretches over it (the "Read the guide" line is decoration) */
.rxb-card .rx-blog-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.rxb-card .rx-blog-card__title a:focus { outline: none; }
.rxb-card:focus-within { outline: 3px solid var(--rx-focus); outline-offset: 3px; }
.rxb-card .rx-link-arrow { pointer-events: none; }
.rxb-card:hover .rx-link-arrow .rx-icon { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .rxb-card:hover .rx-link-arrow .rx-icon { transform: none; } }

/* ── The hub (/blogs) ────────────────────────────────────────────────────────────────────────────────────────────── */
.rxb-hub-hero { padding-bottom: 40px; }
.rxb-hub-nav { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rxb-hub-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: var(--rx-r-pill); background: var(--rx-white); border: 1px solid var(--rx-violet-200); color: var(--rx-violet-700); font-size: 15px; line-height: 22px; font-weight: 500; text-decoration: none; }
.rxb-hub-nav a:hover { background: var(--rx-violet-50); border-color: var(--rx-violet-300); }
.rxb-hub-nav .rx-icon { width: 16px; height: 16px; }
.rxb-hub-nav span { color: var(--rx-ink-400); font-weight: 400; }
.rxb-hub { padding-top: 24px; }
.rxb-cat { scroll-margin-top: calc(var(--rx-header-h) + 16px); }
.rxb-cat + .rxb-cat { margin-top: 72px; }
.rxb-cat__head { display: flex; align-items: center; gap: 16px; margin: 0 0 28px; }
.rxb-cat__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--rx-violet-100); color: var(--rx-violet-600); }
.rxb-cat__icon .rx-icon { width: 26px; height: 26px; }
.rxb-cat__title { margin: 0; font-size: var(--rx-fs-h2s); line-height: var(--rx-lh-h2s); font-weight: 500; color: var(--rx-ink-900); }
.rxb-cat__text { margin: 2px 0 0; font-size: 16px; line-height: 26px; color: var(--rx-ink-500); }
@media (max-width: 767px) { .rxb-cat + .rxb-cat { margin-top: 56px; } .rxb-cat__head { align-items: flex-start; } }
/* four guides in a category: two by two from 768 px, so no card is left alone on a row */
@media (min-width: 768px) { .rxb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rxb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the first guide of the hub: a wide card, picture beside the text from 900 px */
.rxb-lead { margin-bottom: 72px; }
@media (min-width: 900px) {
  .rxb-lead .rxb-card { flex-direction: row; align-items: stretch; }
  .rxb-lead .rxb-card .rx-blog-card__media { flex: 0 0 56%; aspect-ratio: auto; border-bottom: 0; border-inline-end: 1px solid var(--rx-line); }
  .rxb-lead .rxb-card .rx-blog-card__body { justify-content: center; gap: 16px; padding: 36px 40px; }
  .rxb-lead .rxb-card .rx-blog-card__title { font-size: 28px; line-height: 36px; }
  .rxb-lead .rxb-card .rx-blog-card__text { font-size: 17px; line-height: 28px; }
  .rxb-lead .rxb-card .rx-link-arrow { margin-top: 0; }
}

/* the earlier posts: a plain list of links under the guides */
.rxb-earlier { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .rxb-earlier { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; } }
.rxb-earlier a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; padding: 14px 20px; background: var(--rx-white); border: 1px solid var(--rx-line); border-radius: 16px; color: var(--rx-ink-900); font-size: 17px; line-height: 26px; font-weight: 500; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.rxb-earlier a:hover { border-color: var(--rx-violet-200); box-shadow: var(--rx-shadow-card); color: var(--rx-violet-700); }
.rxb-earlier .rx-icon { flex: none; width: 18px; height: 18px; color: var(--rx-violet-600); }
.rxb-earlier small { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--rx-ink-500); }
@media (prefers-reduced-motion: reduce) { .rxb-earlier a { transition: none; } }

/* ── The author page ─────────────────────────────────────────────────────────────────────────────────────────────── */
.rxb-profile { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rxb-profile .rxb-avatar { width: 88px; height: 88px; font-size: 28px; }
.rxb-profile__role { margin: 0; font-size: 16px; line-height: 24px; color: var(--rx-violet-700); font-weight: 500; }
.rxb-profile__bio { max-width: 680px; }
.rxb-profile__bio p + p { margin-top: 12px; }

/* print: the text, without the rail, the cards and the band */
@media print {
  .rxb-toc, .rxb-toc-m, .rxb-after, .rxb-cover { display: none !important; }
}

/* the category chip above a guide's title */
.rxb-head .rxb-cat-chip { text-decoration: none; }
