/* RS Mobile — blog posts (approved EnPost design), blog lists, category
   archives, the about pages (/o-autorze/, /en/about/) and 404.
   Loaded after site.css on the single, prose, blog, archive and 404 templates.
   Every selector uses a class of these templates only (rsm-post*, rsm-prose,
   rsm-pcard*, rsm-listhead*, rsm-about*, rsm-404*, rsm-toc*, …). */

.rsm-main { --rsm-text: #1B1E23; --rsm-hair: #E4E2DC; --rsm-sticky-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--rsm-header-h) + 24px); }
.rsm-wrap--text { max-width: calc(760px + 2 * var(--rsm-gutter)); }

/* ---- Post header ---------------------------------------------------------- */
.rsm-post__head { padding-top: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 20px; }
.rsm-post__head + .rsm-post__band { margin-top: clamp(32px, 4vw, 48px); }
.rsm-crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--rsm-f-mono); font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--rsm-muted); }
/* 44 px tap area around the short crumb links, without moving the line. */
.rsm .rsm-crumbs a { display: inline-block; padding: 13px 8px; margin: -13px -8px; color: var(--rsm-blue-text); text-decoration: none; }
.rsm .rsm-crumbs a:hover { color: var(--rsm-blue-hover); text-decoration: underline; }
.rsm-crumbs [aria-current], .rsm-crumbs__here { color: var(--rsm-ink); }
.rsm .rsm-post__title { max-width: 1000px; font-family: var(--rsm-f-display); font-weight: 800; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -0.025em; color: var(--rsm-ink); text-wrap: balance; overflow-wrap: break-word; }
.rsm-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; line-height: 1.5; color: var(--rsm-muted); }
.rsm-post__meta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.rsm .rsm-post__meta a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--rsm-ink); font-weight: 600; text-decoration: none; }
.rsm .rsm-post__meta a:hover { text-decoration: underline; }

/* ---- Hero figure ------------------------------------------------------------ */
.rsm-post__hero { padding-top: clamp(24px, 3vw, 40px); padding-bottom: clamp(40px, 5vw, 56px); }
.rsm-post__figure, .rsm-post__hero--html > figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rsm-post__media { overflow: hidden; background: var(--rsm-surface); border: 1px solid var(--rsm-line); border-radius: 12px; }
.rsm-post__media img { display: block; width: 100%; height: auto; }
a.rsm-post__media { display: block; cursor: zoom-in; }
.rsm-post__figure figcaption, .rsm-post__hero--html figcaption { font-size: 14px; line-height: 1.5; font-style: italic; color: var(--rsm-muted); }

/* ---- Article band: text column + sidebar ------------------------------------- */
.rsm-post__band { background: var(--rsm-surface); border-top: 1px solid var(--rsm-hair); }
.rsm-post__grid { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(56px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 720px) minmax(280px, 320px); justify-content: space-between; column-gap: 64px; row-gap: 48px; align-items: start; }
.rsm-post__main { min-width: 0; }
.rsm-post__aside { align-self: stretch; min-width: 0; }
.rsm-post__sticky { position: sticky; top: var(--rsm-sticky-top); display: flex; flex-direction: column; gap: 20px; }

/* ---- Article typography (posts and prose pages) ------------------------------- */
.rsm .rsm-prose { font-size: 18px; line-height: 1.7; color: var(--rsm-text); overflow-wrap: break-word; }
/* Block flow: 20 px between blocks (also inside WPBakery wrappers of multi-row bodies). */
.rsm .rsm-prose > *, .rsm .rsm-prose :where(.wpb-content-wrapper, .wpb_wrapper) > * { margin-top: 0; margin-bottom: 0; }
.rsm .rsm-prose > * + *, .rsm .rsm-prose :where(.wpb-content-wrapper, .wpb_wrapper) > * + * { margin-top: 20px; }
.rsm-prose .vc_row, .rsm-prose .wpb_column, .rsm-prose .vc_column-inner, .rsm-prose .wpb_wrapper, .rsm-prose .wpb_text_column, .rsm-prose .wpb-content-wrapper { display: block; margin: 0; padding: 0; width: auto; float: none; }
.rsm .rsm-prose h3 + * { margin-top: 14px; }
.rsm .rsm-prose .rsm-lead-p { font-size: clamp(19px, 1.45vw, 21px); line-height: 1.6; font-weight: 500; color: var(--rsm-ink); }
.rsm .rsm-prose h2 { margin-top: 48px; font-family: var(--rsm-f-display); font-weight: 700; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -0.02em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-prose h3 { margin-top: 32px; font-family: var(--rsm-f-display); font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-prose h4 { margin-top: 28px; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--rsm-ink); }
.rsm .rsm-prose > :is(h2, h3):first-child, .rsm .rsm-prose :where(.wpb-content-wrapper, .wpb_wrapper) > :is(h2, h3):first-child { margin-top: 0; }
.rsm .rsm-prose strong, .rsm .rsm-prose b { font-weight: 700; color: var(--rsm-ink); }
.rsm .rsm-prose a { color: var(--rsm-blue-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rsm .rsm-prose a:hover { color: var(--rsm-blue-hover); }
.rsm .rsm-prose a :is(strong, b) { color: inherit; }
.rsm .rsm-main a[href^="tel:"] { white-space: nowrap; }
.rsm .rsm-prose img { max-width: 100%; height: auto; }

/* Numbered sections (01, 02 …) in posts, as in the approved design. */
.rsm .rsm-post__body { counter-reset: rsm-h2; }
.rsm .rsm-post__body h2 { counter-increment: rsm-h2; }
.rsm .rsm-post__body h2::before { content: counter(rsm-h2, decimal-leading-zero); content: counter(rsm-h2, decimal-leading-zero) / ""; display: block; margin-bottom: 8px; font-family: var(--rsm-f-mono); font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0; color: var(--rsm-muted); }

/* Lists: blue square bullets; numbered steps with mono numbers. */
.rsm .rsm-prose ul:not(.rsm-toc__list) { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rsm .rsm-prose ul:not(.rsm-toc__list) > li { position: relative; padding-left: 22px; }
.rsm .rsm-prose ul:not(.rsm-toc__list) > li::before { content: ""; position: absolute; left: 0; top: calc(0.85em - 4px); width: 8px; height: 8px; border-radius: 2px; background: var(--rsm-blue); }
.rsm .rsm-prose ol:not(.rsm-toc__list) { list-style: none; padding: 0; counter-reset: rsm-ol; display: flex; flex-direction: column; gap: 12px; }
.rsm .rsm-prose ol:not(.rsm-toc__list) > li { counter-increment: rsm-ol; position: relative; padding: 12px 0 0 42px; border-top: 1px solid var(--rsm-hair); }
.rsm .rsm-prose ol:not(.rsm-toc__list) > li::before { content: counter(rsm-ol, decimal-leading-zero); position: absolute; left: 0; top: 12px; font-family: var(--rsm-f-mono); font-size: 14px; font-weight: 500; line-height: 30px; color: var(--rsm-blue-text); }
.rsm .rsm-prose li > :is(ul, ol) { margin-top: 12px; }

/* Figures and captions. */
.rsm .rsm-prose figure { display: flex; flex-direction: column; gap: 10px; }
.rsm .rsm-prose .rsm-fig--narrow { width: 100%; margin-left: auto; margin-right: auto; }
.rsm .rsm-prose .rsm-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rsm-line); border-radius: 12px; background: var(--rsm-surface); }
.rsm .rsm-prose figcaption { font-size: 14px; line-height: 1.5; font-style: italic; color: var(--rsm-muted); }

/* Tables: dark header row, hairline grid; wide tables scroll in their own box
   (edge shadows show there is more to scroll; the caption stays above the box). */
.rsm .rsm-prose .rsm-tablewrap { display: flex; flex-direction: column; gap: 10px; }
.rsm .rsm-prose .rsm-table__cap { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--rsm-ink); }
.rsm .rsm-prose .rsm-table { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  background: linear-gradient(to right, #FFFFFF 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
              linear-gradient(to left, #FFFFFF 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(16, 18, 21, 0.18), rgba(16, 18, 21, 0)) left center / 14px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(16, 18, 21, 0.18), rgba(16, 18, 21, 0)) right center / 14px 100% no-repeat scroll; }
.rsm .rsm-prose .rsm-table:focus-visible { outline: 3px solid var(--rsm-blue); outline-offset: 2px; }
.rsm .rsm-prose table { width: 100%; margin: 0 !important; border-collapse: collapse; font-size: 14px !important; line-height: 1.45; color: var(--rsm-ink); }
.rsm .rsm-prose .rsm-table--mid table { min-width: 560px; }
.rsm .rsm-prose .rsm-table--wide table { min-width: 640px; }
.rsm .rsm-prose caption { caption-side: top; text-align: left; padding: 0 0 10px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--rsm-ink); }
.rsm .rsm-prose th, .rsm .rsm-prose td { padding: 10px; text-align: left; vertical-align: top; border: 1px solid #D5DADD; }
.rsm .rsm-prose thead th { background: #1D1D1B; color: #FFFFFF; font-weight: 600; vertical-align: bottom; }
.rsm .rsm-prose tbody th { font-weight: 600; }

/* FAQ answers written as "<p><strong>Question?</strong> Answer</p>". */
.rsm .rsm-prose .rsm-qa { padding-top: 20px; border-top: 1px solid var(--rsm-hair); }
.rsm .rsm-prose .rsm-qa > strong:first-child { display: block; padding-bottom: 6px; font-family: var(--rsm-f-display); font-weight: 700; font-size: 20px; line-height: 1.3; letter-spacing: -0.005em; color: var(--rsm-ink); }
.rsm .rsm-prose details:not(.rsm-toc) { border-top: 1px solid var(--rsm-hair); padding-top: 14px; }
.rsm .rsm-prose details:not(.rsm-toc) > summary { cursor: pointer; font-weight: 600; color: var(--rsm-ink); }

.rsm .rsm-prose blockquote { padding: 2px 0 2px 20px; border-left: 3px solid var(--rsm-blue); color: var(--rsm-ink); }
.rsm .rsm-prose code { font-family: var(--rsm-f-mono); font-size: .86em; background: #ECEAE4; padding: 1px 5px; border-radius: 4px; }
.rsm .rsm-prose pre { overflow-x: auto; padding: 16px; border-radius: 10px; background: #F3F1EC; font-size: 14px; line-height: 1.55; }
.rsm .rsm-prose pre code { background: none; padding: 0; }
.rsm .rsm-prose hr { border: 0; border-top: 1px solid var(--rsm-line); }
.rsm .rsm-prose small { font-size: 14px; color: var(--rsm-muted); }
.rsm .rsm-prose p:has(> small:only-child) { font-size: 14px; line-height: 1.6; }

/* ---- Contents list ------------------------------------------------------------- */
.rsm-toc__title { margin: 0; font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsm-muted); }
.rsm-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rsm .rsm-toc a { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--rsm-ink-2); text-decoration: none; }
.rsm .rsm-toc a:hover { color: var(--rsm-ink); text-decoration: underline; text-underline-offset: 3px; }
.rsm-toc__n { flex: none; min-width: 20px; font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; color: var(--rsm-muted); }
.rsm .rsm-toc a[aria-current] { font-weight: 600; color: var(--rsm-ink); }
.rsm .rsm-toc a[aria-current] .rsm-toc__n, .rsm .rsm-toc--inline li:first-child .rsm-toc__n { color: var(--rsm-blue-text); }
.rsm-toc--side { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 14px; background: var(--rsm-bg); border: 1px solid var(--rsm-hair); border-radius: 12px; }
/* A list taller than its box scrolls; edge shadows (as on wide tables) show there is more. */
.rsm-toc--side .rsm-toc__list { max-height: max(220px, calc(100vh - var(--rsm-header-h) - 400px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: linear-gradient(var(--rsm-bg) 40%, rgba(246, 245, 242, 0)) center top / 100% 40px no-repeat local,
              linear-gradient(rgba(246, 245, 242, 0), var(--rsm-bg) 60%) center bottom / 100% 40px no-repeat local,
              radial-gradient(farthest-side at 50% 0, rgba(16, 18, 21, 0.16), rgba(16, 18, 21, 0)) center top / 100% 14px no-repeat scroll,
              radial-gradient(farthest-side at 50% 100%, rgba(16, 18, 21, 0.16), rgba(16, 18, 21, 0)) center bottom / 100% 14px no-repeat scroll; }
/* post.js sizes the sticky column to the window (data-fit): "full" = contents + card,
   "compact" = the card without its paragraph, "toc" = contents only (the header and the
   band at the end of the post carry the same call to action). The whole list then shows. */
@media (min-width: 984px) {
  .rsm-post__sticky[data-fit] .rsm-toc__list { max-height: none; }
  .rsm-post__sticky[data-fit="compact"] .rsm-ctacard { gap: 12px; padding: 20px 22px 22px; }
  .rsm-post__sticky[data-fit="compact"] .rsm-ctacard__text { display: none; }
  .rsm-post__sticky[data-fit="toc"] .rsm-ctacard { display: none; }
  .rsm-post__sticky[data-fit="toc"] .rsm-toc__list { max-height: max(200px, calc(100vh - var(--rsm-sticky-top) - 80px)); }
  .rsm .rsm-post__sticky[data-fit="toc"] .rsm-toc a { padding: 5px 0; }
}
.rsm .rsm-prose .rsm-toc--inline { margin-top: 28px; border: 1px solid var(--rsm-hair); border-radius: 12px; background: var(--rsm-bg); }
.rsm-toc--inline > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 18px; cursor: pointer; list-style: none; }
.rsm-toc--inline > summary::-webkit-details-marker { display: none; }
.rsm-toc--inline > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 1.75px solid var(--rsm-ink); border-bottom: 1.75px solid var(--rsm-ink); transform: rotate(45deg); transition: transform .2s ease; }
.rsm-toc--inline[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.rsm-toc--inline nav { padding: 0 18px 12px; }
.rsm .rsm-toc--inline a { padding: 12px 0; }

/* ---- Sidebar card: send me a brief -------------------------------------------------- */
.rsm-ctacard { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--rsm-dark); color: #FFFFFF; border-radius: 12px; }
.rsm .rsm-ctacard__label { font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsm-on-dark-muted); }
.rsm .rsm-ctacard__title { font-family: var(--rsm-f-display); font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; color: #FFFFFF; }
.rsm .rsm-ctacard__text { font-size: 15px; line-height: 1.55; color: var(--rsm-on-dark-muted); }
.rsm .rsm-ctacard__btn { min-height: 48px; padding: 0 18px; font-size: 15px; gap: 8px; }
.rsm-ctacard :focus-visible { outline-color: #FFFFFF; }

/* ---- Author box ---------------------------------------------------------------------- */
.rsm-authorbox { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 24px; padding: 24px; background: var(--rsm-bg); border: 1px solid var(--rsm-hair); border-radius: 12px; }
.rsm-authorbox__photo { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: #E9E7E2; }
.rsm .rsm-authorbox__photo img { position: absolute; left: -38%; top: -12%; width: 165%; max-width: none; height: 165%; object-fit: cover; }
.rsm-authorbox__text { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rsm .rsm-authorbox__label { font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsm-muted); }
.rsm .rsm-authorbox__name { font-size: 18px; line-height: 1.4; color: var(--rsm-ink-2); }
.rsm-authorbox__name span { font-family: var(--rsm-f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--rsm-ink); }
.rsm .rsm-authorbox__bio { font-size: 16px; line-height: 1.6; color: var(--rsm-ink-2); }
.rsm .rsm-authorbox__links { display: flex; flex-wrap: wrap; column-gap: 24px; }
.rsm .rsm-authorbox__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--rsm-blue-text); text-decoration: none; }
.rsm .rsm-authorbox__links a:hover { color: var(--rsm-blue-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Post cards (related posts, blog lists, archives, 404) --------------------------- */
.rsm-pcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--rsm-surface); border: 1px solid var(--rsm-hair); border-radius: 12px; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.rsm-pcard:hover { border-color: var(--rsm-line-strong); box-shadow: 0 1px 2px rgba(16, 18, 21, 0.04), 0 14px 30px -20px rgba(16, 18, 21, 0.4); }
.rsm-pcard:has(.rsm-pcard__title a:focus-visible) { outline: 3px solid var(--rsm-blue); outline-offset: 2px; }
.rsm-pcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: #E9E6DF; border-bottom: 1px solid var(--rsm-hair); }
.rsm .rsm-pcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .3s ease; }
.rsm-pcard:hover .rsm-pcard__media img { transform: scale(1.02); }
.rsm-pcard__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.rsm .rsm-pcard__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-family: var(--rsm-f-mono); font-size: 12px; line-height: 1.4; color: var(--rsm-muted); }
.rsm .rsm-pcard__kicker { font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsm-muted); }
.rsm .rsm-pcard__title { font-family: var(--rsm-f-display); font-weight: 700; font-size: 20px; line-height: 1.22; letter-spacing: -0.01em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-pcard__title a { color: inherit; text-decoration: none; }
.rsm .rsm-pcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rsm .rsm-pcard__title a:focus-visible { outline: none; }
.rsm .rsm-pcard:hover .rsm-pcard__title { color: var(--rsm-blue-text); }
.rsm .rsm-pcard__excerpt { flex: 1; font-size: 15px; line-height: 1.55; color: var(--rsm-muted); text-wrap: pretty; }
.rsm-pcard__more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--rsm-blue-text); }
.rsm-pcard__more svg { transition: transform .15s ease; }
.rsm-pcard:hover .rsm-pcard__more svg { transform: translateX(3px); }

.rsm-pcard--feature.rsm-pcard--img { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
/* Featured images are infographics with text up to their edges: show the whole
   image (never cropped), framed on a mat beside the text. */
.rsm-pcard--feature .rsm-pcard__media { aspect-ratio: auto; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 2vw, 28px); background: var(--rsm-bg); border-bottom: 0; border-right: 1px solid var(--rsm-hair); }
.rsm .rsm-pcard--feature .rsm-pcard__media img { height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 18, 21, 0.08), 0 10px 24px -16px rgba(16, 18, 21, 0.45); }
.rsm-pcard--feature .rsm-pcard__body { justify-content: center; gap: 16px; padding: clamp(24px, 3vw, 40px); }
.rsm .rsm-pcard--feature .rsm-pcard__title { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -0.02em; }
.rsm .rsm-pcard--feature .rsm-pcard__excerpt { flex: 0 1 auto; font-size: 17px; line-height: 1.6; color: var(--rsm-ink-2); }
.rsm-pcard--feature .rsm-pcard__more { font-size: 15px; }

/* ---- Related posts + next-step band (end of posts and lists) ------------------------ */
.rsm-related { border-top: 1px solid var(--rsm-hair); }
.rsm-related__in { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); display: flex; flex-direction: column; gap: 28px; }
.rsm-related__head { display: flex; flex-direction: column; gap: 10px; }
.rsm .rsm-related__title { font-family: var(--rsm-f-display); font-weight: 700; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.022em; color: var(--rsm-ink); }
.rsm-related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; }

.rsm-nextstep { background: var(--rsm-blue-text); color: #FFFFFF; }
.rsm-nextstep__in { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.rsm-nextstep__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rsm .rsm-nextstep__label { font-family: var(--rsm-f-mono); font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.04em; color: #FFFFFF; }
.rsm .rsm-nextstep__title { max-width: 18ch; font-family: var(--rsm-f-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.04; letter-spacing: -0.025em; color: #FFFFFF; text-wrap: balance; }
.rsm .rsm-nextstep__lead { max-width: 560px; font-size: 18px; line-height: 1.6; color: #FFFFFF; }
.rsm-nextstep__actions { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 12px; }
.rsm .rsm-nextstep__actions .rsm-btn { padding: 0 22px; }
.rsm .rsm-nextstep__ghost { border-color: #FFFFFF; }
.rsm .rsm-nextstep__ghost:hover { background: rgba(255, 255, 255, 0.1); }
.rsm-nextstep :focus-visible { outline-color: #FFFFFF; }

/* ---- Blog lists and archives ------------------------------------------------------------ */
.rsm-listhead { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.rsm .rsm-listhead .rsm-label a { display: inline-block; padding: 13px 0; margin: -13px 0; color: inherit; text-decoration: none; }
.rsm .rsm-listhead .rsm-label a:hover { color: var(--rsm-ink); text-decoration: underline; }
.rsm .rsm-listhead__title { max-width: 920px; font-family: var(--rsm-f-display); font-weight: 800; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.03; letter-spacing: -0.025em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-listhead__intro { max-width: 720px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: var(--rsm-ink-2); text-wrap: pretty; }
.rsm-listhead__intro > * + * { margin-top: 12px !important; }
.rsm-listbody { padding-bottom: clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: 24px; }
.rsm-cardgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rsm-cardgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rsm .rsm-listbody__empty { max-width: 720px; padding: 28px; background: var(--rsm-surface); border: 1px solid var(--rsm-hair); border-radius: 12px; font-size: 17px; line-height: 1.6; color: var(--rsm-ink-2); }

.rsm-pagination { margin-top: 16px; }
.rsm-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.rsm .rsm-pagination a, .rsm .rsm-pagination span { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--rsm-line-strong); border-radius: var(--rsm-radius); background: var(--rsm-surface); color: var(--rsm-ink); font-weight: 600; text-decoration: none; }
.rsm .rsm-pagination .current { background: var(--rsm-ink); color: #FFFFFF; border-color: var(--rsm-ink); }
.rsm .rsm-pagination .dots { border-color: transparent; background: none; }

/* ---- About pages (/o-autorze/, /en/about/) ---------------------------------------------- */
.rsm-about__head-in { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 40px 72px; align-items: center; }
.rsm-about__intro { min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.rsm .rsm-about__title { font-family: var(--rsm-f-display); font-weight: 800; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.025em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-about__lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.6; font-weight: 500; color: var(--rsm-ink); text-wrap: pretty; }
.rsm .rsm-about__lead a { color: var(--rsm-blue-text); }
.rsm-about__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
.rsm .rsm-about__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.rsm .rsm-about__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.rsm-about__photo { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rsm .rsm-about__photo img { display: block; width: 100%; height: auto; aspect-ratio: 7 / 8; object-fit: cover; object-position: 55% 30%; border: 1px solid var(--rsm-line); border-radius: 14px; background: #E9E7E2; }
.rsm .rsm-about__photo figcaption { font-family: var(--rsm-f-mono); font-size: 12px; line-height: 1.5; color: var(--rsm-muted); }
.rsm-about__band { background: var(--rsm-surface); border-top: 1px solid var(--rsm-hair); }
.rsm-about__grid { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(56px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 720px) minmax(280px, 340px); justify-content: space-between; gap: 48px 64px; align-items: start; }
.rsm-about__body { min-width: 0; }
.rsm-about__aside { min-width: 0; position: sticky; top: var(--rsm-sticky-top); display: flex; flex-direction: column; gap: 20px; }
.rsm-about__facts { padding: 20px 20px 8px; background: var(--rsm-bg); border: 1px solid var(--rsm-hair); border-radius: 12px; }
.rsm .rsm-about__facts-title { margin-bottom: 8px; font-family: var(--rsm-f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsm-muted); }
.rsm-facts { margin: 0; display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); }
.rsm-facts dt { padding: 11px 16px 11px 0; border-top: 1px solid var(--rsm-line); font-family: var(--rsm-f-mono); font-size: 12.5px; line-height: 1.6; color: var(--rsm-muted); }
.rsm-facts dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--rsm-line); font-size: 15px; line-height: 1.55; color: var(--rsm-ink); }
.rsm-facts > :nth-child(-n+2) { border-top: 0; }
.rsm .rsm-facts a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--rsm-blue-text); text-decoration: none; }
.rsm .rsm-facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 404 ------------------------------------------------------------------------------------- */
.rsm-404__in { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(48px, 6vw, 80px); display: flex; flex-direction: column; gap: 20px; }
.rsm .rsm-404__title { max-width: 860px; font-family: var(--rsm-f-display); font-weight: 800; font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: -0.03em; color: var(--rsm-ink); text-wrap: balance; }
.rsm .rsm-404__lead { max-width: 640px; }
.rsm-404__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.rsm-404__latest { border-top: 1px solid var(--rsm-hair); }

/* ---- Narrower screens ------------------------------------------------------------------------ */
@media (min-width: 984px) {
  .rsm .rsm-prose .rsm-toc--inline { display: none; }
}
@media (max-width: 983px) {
  .rsm-post__grid, .rsm-about__grid { grid-template-columns: minmax(0, 720px); justify-content: start; }
  .rsm-post__aside, .rsm-about__aside { position: static; max-width: 720px; }
  .rsm-post__sticky { position: static; }
  .rsm-toc--side { display: none; }
  .rsm-about__aside .rsm-ctacard, .rsm-post--solo .rsm-post__aside { display: none; }
  .rsm-about__head-in { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); column-gap: 40px; }
}
@media (max-width: 999px) {
  .rsm-cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .rsm-cardgrid, .rsm-cardgrid--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .rsm-pcard--feature.rsm-pcard--img { grid-template-columns: minmax(0, 1fr); }
  /* Stacked: the image spans the card at its own ratio (still uncropped). */
  .rsm-pcard--feature .rsm-pcard__media { padding: 0; border-right: 0; border-bottom: 1px solid var(--rsm-hair); }
  .rsm .rsm-pcard--feature .rsm-pcard__media img { border-radius: 0; box-shadow: none; }
}
@media (max-width: 760px) {
  .rsm-about__head-in { grid-template-columns: minmax(0, 1fr); }
  .rsm-about__photo { order: -1; max-width: 300px; }
}
@media (max-width: 639px) {
  .rsm-related__grid > .rsm-pcard:nth-child(n+4) { display: none; }
}
@media (max-width: 600px) {
  .rsm-post__meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rsm-post__meta-split { display: none; }
  .rsm .rsm-prose { font-size: 17px; }
  .rsm .rsm-prose .rsm-lead-p { font-size: 18px; }
  .rsm .rsm-prose h2 { margin-top: 40px; }
  .rsm-authorbox { padding: 20px; }
  .rsm-authorbox__photo { width: 72px; height: 72px; }
  .rsm-pcard__body { padding: 20px; }
  .rsm .rsm-nextstep__actions .rsm-btn { flex: 1 1 100%; }
  .rsm-about__photo { max-width: 220px; }
}
