/* Ridgun — the site's stylesheet (Solstice ADR-0017). Served at /assets/css/app.css; `stable assets` writes a
   digested copy. The idea is the language's own: things line up. A column grid runs behind the hero, labels are
   set in the code face, and code sits on a dark card in both colour schemes. Light and dark follow the system. */

/* ── Fonts ──────────────────────────────────────────────── */
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/mono-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/mono-medium.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --paper: #f6f5f1;
  --paper-2: #eeece6;
  --card: #ffffff;
  --ink: #121417;
  --ink-2: #3a3e45;
  --ink-3: #6a6f78;
  --line: #e2dfd7;
  --line-2: #cfcbc1;
  --accent: #e0452a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe3dc;
  --night: #0f1216;
  --night-2: #171b21;
  --night-line: #262b33;
  --night-ink: #e6e3dc;
  --night-ink-3: #8b919c;
  --good: #2f7a52;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;

  /* The shared look every addon reads before its own (Solstice ADR-0024). They follow the tokens above, light or dark. */
  --sx-paper: transparent;
  --sx-card: var(--card);
  --sx-soft: var(--paper-2);
  --sx-ink: var(--ink);
  --sx-muted: var(--ink-3);
  --sx-line: var(--line);
  --sx-accent: var(--accent);
  --sx-accent-ink: var(--accent-ink);
  --sx-good: var(--good);
  --sx-code-bg: var(--night);
  --sx-code-ink: var(--night-ink);
  --sx-radius: 12px;
  --sx-sans: var(--sans);
  --sx-heading: var(--sans);
  --sx-mono: var(--mono);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0f13;
    --paper-2: #14171c;
    --card: #15181d;
    --ink: #ebe8e1;
    --ink-2: #c3c0b9;
    --ink-3: #8b8f98;
    --line: #23272e;
    --line-2: #343942;
    --accent: #ff6a4a;
    --accent-ink: #120d0b;
    --accent-soft: #3a1e17;
    --night: #090b0e;
    --night-2: #12151a;
    --night-line: #22262d;
    --good: #7cc79c;
  }
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd, samp, pre { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.r-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.r-skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: .6rem 1rem; border-radius: 8px; background: var(--ink); color: var(--paper); text-decoration: none; transition: top .2s var(--ease); }
.r-skip:focus { top: 1rem; }
.r-muted { color: var(--ink-3); }

/* Labels: the code face, small and tracked, with a short accent rule before them. */
.r-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 1.25rem;
  font: 500 .75rem/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.r-kicker::before { content: ""; width: 1.5rem; height: 2px; background: var(--accent); }
.r-kicker a { color: var(--ink); text-decoration: none; }
.r-kicker a:hover { color: var(--accent); }
.r-kicker span { color: var(--ink-3); }

.r-display { margin: 0; font: 600 clamp(2.6rem, 7vw, 5.25rem)/.98 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.r-display em { font-style: normal; color: var(--accent); }
.r-lede { max-width: 38rem; margin: 1.5rem 0 0; font-size: clamp(1.075rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.r-lede code { font-size: .88em; }
.r-section-title { margin: 0 0 2rem; font: 600 clamp(1.6rem, 3.4vw, 2.4rem)/1.05 var(--sans); letter-spacing: -.035em; }

.r-pagehead { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); }

/* Buttons: ink pills; the primary one takes the accent. */
.r-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.r-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.35rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 .9375rem/1 var(--sans);
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.r-button:hover { border-color: var(--ink); transform: translateY(-1px); }
.r-button-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.r-button-primary:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.r-button-quiet { border-color: transparent; }
.r-button-quiet:hover { border-color: var(--line-2); }

/* ── Header ─────────────────────────────────────────────── */
.r-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.r-header-row { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); min-height: 4rem; }
.r-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.r-mark { width: 1.6rem; height: 1.6rem; flex: none; }
.r-mark-a { fill: var(--ink-3); }
.r-mark-b { fill: var(--accent); }
.r-mark-c { fill: var(--ink); }
.r-mark rect { transition: transform .3s var(--ease); }
.r-brand:hover .r-mark-b { transform: translateY(-2px); }
.r-wordmark { font: 600 1.15rem/1 var(--sans); letter-spacing: -.03em; }
.r-nav { display: flex; gap: .25rem; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.r-nav::-webkit-scrollbar { display: none; }
.r-nav a, .r-account a {
  position: relative;
  padding: .5rem .7rem;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.r-nav a:hover, .r-account a:hover { color: var(--ink); background: var(--paper-2); }
.r-nav a[aria-current="page"], .r-account a[aria-current="page"] { color: var(--ink); }
.r-nav a[aria-current="page"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: -.55rem; height: 2px; background: var(--accent); }
.r-account a { display: inline-block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--line-2); border-radius: 999px; padding-inline: 1rem; }

/* ── Home: the hero ─────────────────────────────────────── */
.r-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  /* The column grid: the language's alignment, as a backdrop. */
  background:
    radial-gradient(60rem 30rem at 85% 10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12));
}
.r-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(4rem, 10vw, 8rem) clamp(4rem, 9vw, 7rem);
}
.r-hero-text .r-kicker a { font-weight: 500; }

/* The code card: a terminal-like frame, the program, and what it prints. */
.r-code-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  background: var(--night);
  color: var(--night-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 30px 60px -30px rgb(10 12 16 / .55), 0 12px 24px -16px rgb(10 12 16 / .35);
}
.r-code-card figcaption {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--night-line);
  font: 400 .75rem/1 var(--mono);
  color: var(--night-ink-3);
}
.r-dots { display: inline-flex; gap: .35rem; }
.r-dots i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--night-line); }
.r-dots i:first-child { background: var(--accent); }
.r-code-body pre { margin: 0; padding: 1.1rem 1.25rem; border: 0; border-radius: 0; background: transparent; font-size: clamp(.68rem, .92vw, .78rem); line-height: 1.7; }
.r-code-out { margin: 0; padding: .9rem 1.25rem 1.1rem; border-top: 1px dashed var(--night-line); font: 400 .8125rem/1.6 var(--mono); color: var(--night-ink-3); }
.r-code-out samp { color: var(--night-ink); }

/* ── Ridgun code (Solstice's Markdown colours it with ridgun-libs' fmt classes, ADR-0019) ── */
pre {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: var(--night);
  color: var(--night-ink);
  font: 400 .8125rem/1.65 var(--mono);
  font-variant-ligatures: none;
  tab-size: 4;
  scrollbar-color: var(--night-line) transparent;
}
pre code { font: inherit; color: inherit; background: none; padding: 0; }
/* The addons set their own code font; ligatures would turn => into an arrow everywhere. */
:is(pre, code, kbd, samp), pre * { font-variant-ligatures: none !important; }
pre :is(.rg-kw, .rg-logic) { color: #ff8a6b; }
pre .rg-type { color: #8fb6ff; }
pre .rg-fn { color: #f4f1ea; }
pre .rg-str { color: #b9d98c; }
pre .rg-interp { color: #ffd27a; }
pre :is(.rg-num, .rg-bool) { color: #f2ad6b; }
pre .rg-op { color: #8d94a1; }
pre .rg-pragma { color: #c6a8ff; }
pre .rg-cmt { color: #626a77; font-style: italic; }

/* Code that types itself (FR-PAGE-003, assets/js/typing.js): each line is a box uncovered by a clip, the caret
   moves with it and blinks at the end. Reduced motion never arms it (the script checks). */
.r-typing-line { position: relative; display: inline-block; vertical-align: top; min-height: 1lh; }
.r-typing-text { display: inline-block; vertical-align: top; }
.r-typing-caret { position: absolute; top: .12em; bottom: .12em; width: .6ch; background: var(--accent); pointer-events: none; }
.r-typing-blink { animation: r-caret-blink 1.06s steps(1) infinite; }
@keyframes r-caret-blink { 50% { opacity: 0; } }

/* ── Home: sections ─────────────────────────────────────── */
.r-features { padding-block: clamp(4rem, 9vw, 7rem); }
.r-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.r-feature-grid li { padding: 1.75rem 1.75rem 2rem 0; border-bottom: 1px solid var(--line); }
.r-feature-grid li:not(:nth-child(3n + 1)) { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.r-feature-grid h3 { margin: 0 0 .65rem; font: 600 1.125rem/1.25 var(--sans); letter-spacing: -.015em; }
.r-feature-grid h3::before { content: counter(list-item, decimal-leading-zero); display: block; margin-bottom: 1.1rem; font: 500 .75rem/1 var(--mono); color: var(--accent); }
.r-feature-grid p { margin: 0; color: var(--ink-2); font-size: .975rem; }
.r-feature-grid code, .r-prose :not(pre) > code, .r-lede code, .r-download :not(pre) > code:not(.r-hash), .r-empty code {
  padding: .1em .35em;
  border-radius: 5px;
  background: var(--paper-2);
  font-size: .86em;
}

.r-book-band { background: var(--night); color: var(--night-ink); }
.r-book-band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 2rem 4rem; padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.r-book-band .r-section-title { margin-bottom: 1rem; color: #fff; }
.r-book-band p { margin: 0; max-width: 30rem; color: var(--night-ink-3); }
.r-edition-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.r-edition-chips a {
  display: inline-block;
  padding: .7rem 1.1rem;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  color: var(--night-ink);
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.r-edition-chips a:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

.r-news { padding-block: clamp(4rem, 9vw, 6.5rem) 0; }
.r-news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.r-news-head a, .r-community a:not(.r-button) { color: var(--ink-2); font-weight: 500; text-decoration-color: var(--accent); text-underline-offset: .25em; }
.r-news-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.r-news-list a {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding .25s var(--ease);
}
.r-news-list time { font: 400 .8125rem/1 var(--mono); color: var(--ink-3); }
.r-news-list span { font: 600 clamp(1.1rem, 2vw, 1.35rem)/1.25 var(--sans); letter-spacing: -.02em; }
.r-news-list a:hover { padding-left: .5rem; }
.r-news-list a:hover span { color: var(--accent); }

.r-community { padding-block: clamp(4rem, 9vw, 6.5rem); }
.r-community p { max-width: 36rem; margin: -1rem 0 2rem; color: var(--ink-2); }

/* ── Footer ─────────────────────────────────────────────── */
.r-footer { margin-top: clamp(3rem, 8vw, 6rem); border-top: 1px solid var(--line); background: var(--paper-2); }
.r-footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; padding-block: clamp(3rem, 7vw, 4.5rem) 2.5rem; }
.r-footer-brand p { max-width: 22rem; margin: 1rem 0 0; color: var(--ink-3); font-size: .9375rem; }
.r-footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.r-footer-nav h2 { margin: 0 0 .5rem; font: 500 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-footer-nav a { width: fit-content; color: var(--ink-2); font-size: .9375rem; text-decoration: none; }
.r-footer-nav a:hover { color: var(--accent); }
.r-colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem 2rem; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3); }
.r-colophon p { margin: 0; }

/* ── Messages (404) ─────────────────────────────────────── */
.r-message { padding-block: clamp(5rem, 14vw, 10rem); }
.r-message .r-button { margin-top: 2rem; }

/* ── Learn: the steps ───────────────────────────────────── */
.r-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--ink); }
.r-steps li { counter-increment: step; border-bottom: 1px solid var(--line); }
.r-steps a {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.6rem 0;
  text-decoration: none;
  transition: padding .25s var(--ease);
}
.r-steps a::before { content: counter(step, decimal-leading-zero); font: 500 .8125rem/1 var(--mono); color: var(--accent); }
.r-step-title { font: 600 clamp(1.25rem, 2.4vw, 1.6rem)/1.15 var(--sans); letter-spacing: -.025em; }
.r-step-summary { color: var(--ink-3); }
.r-steps a:hover { padding-left: .5rem; }
.r-steps a:hover .r-step-title { color: var(--accent); }

/* ── Documents: learn pages, chapters, the reference ────── */
.r-doc { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.r-doc-side {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  padding-right: .5rem;
  font-size: .9rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.r-doc-side-title { margin: 0 0 .75rem; font: 500 .72rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-doc-side-title a { color: var(--ink); text-decoration: none; }
.r-doc-side ol, .r-doc-side ul { margin: 0 0 2rem; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.r-doc-side li a {
  display: block;
  margin-left: -1px;
  padding: .38rem 0 .38rem .9rem;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  line-height: 1.35;
  text-decoration: none;
}
.r-doc-side li a:hover { color: var(--ink); border-left-color: var(--line-2); }
.r-doc-side li a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.r-doc-side code { font-size: .86em; }
.r-chapter-no { font: 500 .78em/1 var(--mono); color: var(--accent); }
.r-other-editions li a { padding-block: .28rem; }

.r-doc-page { min-width: 0; max-width: 46rem; padding-bottom: 2rem; }
.r-doc-page > .r-kicker { margin-bottom: 1rem; }
.r-doc-page > h1 { margin: 0; font: 600 clamp(2.1rem, 4.6vw, 3.25rem)/1.04 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.r-doc-page > .r-lede { margin-top: 1rem; }
.r-doc-page > .r-lede:empty { display: none; }

/* Prose: the Markdown of learn pages, chapters and the reference. */
.r-prose { margin-top: 2.25rem; font-size: 1.0625rem; line-height: 1.72; color: var(--ink-2); }
.r-prose > :first-child { margin-top: 0; }
.r-prose :is(h1, h2, h3, h4) { color: var(--ink); text-wrap: balance; scroll-margin-top: 5.5rem; }
.r-prose h1 { margin: 3rem 0 1rem; font: 600 1.9rem/1.15 var(--sans); letter-spacing: -.03em; }
.r-prose h2 { margin: 3.25rem 0 1rem; padding-top: 1.75rem; border-top: 1px solid var(--line); font: 600 1.55rem/1.2 var(--sans); letter-spacing: -.028em; }
.r-prose h3 { margin: 2.25rem 0 .75rem; font: 600 1.2rem/1.3 var(--sans); letter-spacing: -.015em; }
.r-prose h4 { margin: 1.75rem 0 .5rem; font: 600 1rem/1.4 var(--sans); }
.r-prose p, .r-prose ul, .r-prose ol, .r-prose blockquote, .r-prose table { margin: 0 0 1.15rem; }
.r-prose ul, .r-prose ol { padding-left: 1.4rem; }
.r-prose li { margin: .3rem 0; }
.r-prose li::marker { color: var(--ink-3); }
.r-prose strong { color: var(--ink); font-weight: 600; }
.r-prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.r-prose a:hover { color: var(--accent); }
.r-prose blockquote { margin-inline: 0; padding: .9rem 1.25rem; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--paper-2); color: var(--ink-2); }
.r-prose blockquote > :last-child { margin-bottom: 0; }
.r-prose hr { height: 1px; margin: 2.5rem 0; border: 0; background: var(--line); }
/* The book puts a rule before most sections; the heading's own rule is enough. */
.r-prose hr:has(+ h2) { display: none; }
.r-prose img { height: auto; border-radius: 10px; }
.r-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9375rem; }
.r-prose th, .r-prose td { padding: .6rem .9rem .6rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.r-prose th { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); white-space: nowrap; }
.r-prose td code { white-space: nowrap; }

.r-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.r-pager a { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; line-height: 1.3; text-decoration: none; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.r-pager a span { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-pager a:hover { border-color: var(--accent); transform: translateY(-1px); }
.r-pager-next { grid-column: 2; text-align: right; align-items: flex-end; }

/* ── The book ───────────────────────────────────────────── */
.r-editions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.r-editions li { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color .2s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.r-editions li:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 18px 40px -28px rgb(10 12 16 / .35); }
.r-editions li > a:first-child { display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem 1.5rem 1rem; text-decoration: none; }
.r-edition-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
/* Each flag keeps its own proportions at the same height; the hairline keeps white flags visible on the card. */
.r-flag { display: block; width: auto; height: 2rem; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); }
.r-edition-name { font: 600 1.5rem/1.1 var(--sans); letter-spacing: -.02em; }
.r-edition-title { color: var(--ink-2); }
.r-edition-start { margin: 0 1.5rem 1.4rem; padding-top: .9rem; border-top: 1px dashed var(--line-2); color: var(--ink-2); font-size: .875rem; font-weight: 500; text-decoration: none; }
.r-edition-start::after { content: " \2192"; }
.r-edition-start:hover { color: var(--accent); }

.r-chapter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.r-chapter-list a { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: baseline; padding: 1.2rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .25s var(--ease); }
.r-chapter-list .r-chapter-no { font-size: .875rem; }
.r-chapter-name { font: 600 clamp(1.1rem, 2.2vw, 1.4rem)/1.25 var(--sans); letter-spacing: -.02em; }
.r-chapter-list a:hover { padding-left: .5rem; }
.r-chapter-list a:hover .r-chapter-name { color: var(--accent); }

/* ── The reference: a long table of contents ────────────── */
.r-toc li a { font-size: .85rem; }
.r-toc code { padding: 0; background: none; }

/* ── Download ───────────────────────────────────────────── */
.r-release { margin-bottom: 3rem; }
.r-release h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin: 0 0 1rem; font: 600 1.6rem/1.2 var(--sans); letter-spacing: -.03em; }
.r-release h2 time { font: 400 .875rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0; }
.r-files { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.r-files th { padding: .6rem 1rem .6rem 0; border-bottom: 1px solid var(--ink); font: 500 .72rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: left; }
.r-files td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.r-files td:first-child { white-space: nowrap; font-weight: 500; }
.r-files a { color: var(--ink); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: .2em; word-break: break-all; }
.r-files a:hover { color: var(--accent); }
.r-hash { display: block; max-width: 34rem; font-size: .75rem; color: var(--ink-3); word-break: break-all; user-select: all; }
.r-empty { padding: 1.5rem 1.75rem; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.r-empty a, .r-verify p a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.r-key { max-width: 64rem; margin-bottom: 3.5rem; padding: 1.5rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.r-key h2 { margin: 0 0 .5rem; font: 600 1.25rem/1.2 var(--sans); letter-spacing: -.02em; }
.r-key p { margin: 0; color: var(--ink-2); }
.r-key p a, .r-signed a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.r-key-text { margin: 1rem 0 .6rem; }
.r-key-text code { user-select: all; word-break: break-all; white-space: pre-wrap; }
.r-key-file { font-size: .875rem; }
.r-quick { max-width: 64rem; margin-bottom: 3rem; padding: 1.5rem 1.75rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.r-quick h2 { margin: 0 0 .5rem; font: 600 1.4rem/1.2 var(--sans); letter-spacing: -.025em; }
.r-quick p { margin: 0; color: var(--ink-2); }
.r-quick-system { margin: 1.25rem 0 0; font: 600 .95rem/1.3 var(--sans); color: var(--ink); }
.r-quick-command { margin: .4rem 0 .75rem; }
.r-quick-note + .r-quick-note { margin-top: .5rem; }
.r-quick-command code { user-select: all; word-break: break-all; white-space: pre-wrap; }
.r-quick-note { font-size: .9rem; }
.r-quick-note a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.r-signed { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem 0 0; font-size: .9rem; color: var(--ink-2); }
.r-badge { padding: .2rem .6rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .75rem/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.r-badge-ok { border-color: color-mix(in srgb, var(--good) 45%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); }
.r-verify { max-width: 64rem; margin-top: 4rem; }
.r-verify h2 { margin: 0 0 .75rem; font: 600 1.4rem/1.2 var(--sans); letter-spacing: -.025em; }
.r-verify p { color: var(--ink-2); }

/* ── Why Ridgun: the comparison ─────────────────────────── */
.r-compare-scroll { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); scrollbar-width: thin; }
.r-compare-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.r-compare { width: 100%; min-width: 64rem; border-collapse: collapse; font-size: .9rem; line-height: 1.45; }
.r-compare caption { padding: 1rem 1.25rem .25rem; text-align: left; font: 500 .72rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-compare th, .r-compare td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.r-compare tbody tr:last-child th, .r-compare tbody tr:last-child td { border-bottom: 0; }
.r-compare thead th { font: 600 .95rem/1.2 var(--sans); letter-spacing: -.01em; white-space: nowrap; border-bottom-color: var(--ink); }
.r-compare tbody th { width: 9rem; font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.r-compare td { color: var(--ink-2); }
.r-compare code { padding: .05em .3em; border-radius: 4px; background: var(--paper-2); font-size: .85em; }
.r-compare .r-compare-ridgun { width: 20%; background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--ink); }
.r-compare thead .r-compare-ridgun { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.r-compare-ahead { min-width: 48rem; }
.r-ahead { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.r-ahead .r-section-title { margin-bottom: .75rem; }
.r-ahead-lede { max-width: 40rem; margin: 0 0 1.5rem; color: var(--ink-2); }
.r-why-next { margin-top: 2.5rem; }
.r-why-next p { max-width: 40rem; color: var(--ink-2); font-size: 1.05rem; }
.r-why-next a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }

/* The package area (FR-PKG-001) */
.r-package-list { display: grid; gap: 1.25rem; max-width: 64rem; margin: 0; padding: 0; list-style: none; }
.r-package { padding: 1.5rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.r-package-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.r-package-head h2 { margin: 0; font: 600 1.4rem/1.2 var(--sans); letter-spacing: -.025em; }
.r-package-head h2 a { color: var(--ink); text-decoration: none; }
.r-package-head h2 a:hover { color: var(--accent); }
.r-package-release { margin: 0; font: 400 .875rem/1.3 var(--mono); color: var(--ink-3); }
.r-package-text { margin: .5rem 0 1rem; color: var(--ink-2); }
.r-package-install { margin: 0; }
.r-package-install code, .r-package-modules td code { user-select: all; word-break: break-all; white-space: pre-wrap; }
.r-package-download { margin: .75rem 0 0; font-size: .9rem; color: var(--ink-2); }
.r-package-sha { margin: .25rem 0 0; font-size: .75rem; color: var(--ink-3); overflow-wrap: anywhere; }
.r-package-sha span { font: 500 .7rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.r-package-sha code { font-size: .75rem; }
.r-package-modules { margin-top: 1rem; }
.r-package-modules summary { cursor: pointer; font: 500 .8rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.r-package-modules summary:hover { color: var(--ink); }
.r-package-modules .r-files { margin-top: .75rem; font-size: .875rem; }
.r-package-more { max-width: 64rem; margin-top: 3rem; }
.r-package-more h2 { margin: 0 0 .5rem; font: 600 1.25rem/1.2 var(--sans); letter-spacing: -.02em; }
.r-package-more p { color: var(--ink-2); }
.r-package-more a, .r-packages .r-lede a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }

/* ── Sign-in, registration, account ─────────────────────── */
:is(.r-page-login, .r-page-account) .r-main { max-width: 30rem; margin-inline: auto; padding: clamp(3rem, 9vw, 6rem) var(--gutter) 0; }
:is(.r-page-login, .r-page-account) .r-main > h1 { margin: 0 0 2rem; font: 600 clamp(2.2rem, 6vw, 3rem)/1 var(--sans); letter-spacing: -.04em; }
:is(.r-page-login, .r-page-account) .r-main > p { color: var(--ink-2); }
:is(.r-page-login, .r-page-account) .r-main > p a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
:is(.r-page-login, .r-page-account) .r-main form { display: grid; gap: .5rem; margin: 0 0 1.75rem; }
:is(.r-page-login, .r-page-account) .r-main label { margin-top: .75rem; font-size: .875rem; font-weight: 500; }
:is(.r-page-login, .r-page-account) .r-main input:not([type="hidden"]) {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
:is(.r-page-login, .r-page-account) .r-main input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
:is(.r-page-login, .r-page-account) .r-main form p { font-size: .8125rem; color: var(--ink-3); }
:is(.r-page-login, .r-page-account) .r-main button {
  min-height: 3rem;
  margin-top: 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 .9375rem/1 var(--sans);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
:is(.r-page-login, .r-page-account) .r-main button:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.r-page-account .r-main form[action="/logout"] button { margin-top: 0; background: transparent; color: var(--ink); border-color: var(--line-2); }
.r-main [role="alert"] { margin: 0 0 1.5rem; padding: .9rem 1.1rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: .9375rem; }
.r-main ul[role="alert"] { padding-left: 2.1rem; }
.r-main [role="status"] { margin-bottom: 1rem; padding: .9rem 1.1rem; border-radius: 10px; background: var(--paper-2); }

/* ── The blog (blogbox, paper theme) ────────────────────── */
.r-main .blogbox {
  --blogbox-mark: var(--accent-soft);
  --blogbox-code-bg: var(--night);
  --blogbox-shadow: none;
  max-width: calc(48rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
  border-radius: 0;
}
.r-main .blogbox h1 { font-weight: 600; letter-spacing: -.04em; }
.r-main .blogbox :is(h2, h3) { font-weight: 600; letter-spacing: -.025em; }
.r-main .blogbox > h1::after { display: none; }
.r-main .blogbox-index > h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1; }
.r-main .blogbox-body { line-height: 1.72; }
.r-main .blogbox-body pre { border-radius: 12px; }
.r-main :is(.blogbox-manage, .blogbox-edit, .blogbox-images) { max-width: calc(62rem + 2 * var(--gutter)); }

/* ── The forum (opinionhub) ─────────────────────────────── */
.r-main .opinionhub {
  --opinionhub-code-bg: var(--night);
  --opinionhub-wrap: calc(60rem + 2 * var(--gutter));
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}
.r-main .opinionhub h1 { font-weight: 600; letter-spacing: -.04em; }
.r-main .opinionhub-home .opinionhub-head h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1; }
.r-main .opinionhub-categories { border-top: 1px solid var(--ink); }
.r-main .opinionhub-topics { border-top: 1px solid var(--ink); }
.r-main .opinionhub-category h2, .r-main .opinionhub-topic-title { font-weight: 600; letter-spacing: -.02em; }
.r-main .opinionhub-topic-last, .r-main .opinionhub-post-head time, .r-main .opinionhub-category-meta { font-family: var(--mono); font-size: .75rem; }
.r-main .opinionhub-button { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.r-main .opinionhub a.opinionhub-button { color: var(--paper); }
.r-main .opinionhub-button:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); filter: none; }
.r-main .opinionhub-button-quiet, .r-main .opinionhub a.opinionhub-button-quiet { border-color: var(--line-2); background: transparent; color: var(--ink); }
.r-main .opinionhub-body pre { border-radius: 12px; }
.r-main .opinionhub :is(textarea, input[type="text"], select) { background: var(--card); border-color: var(--line-2); }

/* ── The code (codehub) ─────────────────────────────────── */
/* Its tokens take the site's palette; code, diffs and commands sit on the night card like every other code here. */
.r-main .codehub {
  --codehub-code-bg: var(--night);
  --codehub-added: #7cc79c;
  --codehub-added-bg: rgb(124 199 156 / .1);
  --codehub-removed: #ff8a7a;
  --codehub-removed-bg: rgb(255 138 122 / .1);
  --codehub-hunk-bg: rgb(143 182 255 / .1);
  --codehub-mark: rgb(255 210 122 / .16);
  --codehub-wrap: calc(var(--wrap) + 2 * var(--gutter));
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}
.r-main .codehub h1 { font-weight: 600; letter-spacing: -.04em; }
.r-main .codehub-index-head h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1; }
.r-main .codehub-repo-title { color: var(--ink); }
.r-main .codehub-repo-title:hover { color: var(--accent); }
.r-main .codehub pre { margin: 0; border: 0; }
.r-main :is(.codehub-code, .codehub-diff, .codehub-command) { border-color: var(--night-line); color: var(--night-ink); }
.r-main .codehub-ln { background: var(--night); }
.r-main .codehub-ln a { color: var(--night-ink-3); }
.r-main .codehub-d-file { background: var(--night-2); color: var(--night-ink); }
.r-main .codehub-d-meta { color: var(--night-ink-3); }
.r-main .codehub-d-hunk { color: #8fb6ff; }
.r-main .codehub-lc :is(.rg-kw, .rg-logic) { color: #ff8a6b; }
.r-main .codehub-lc .rg-type { color: #8fb6ff; }
.r-main .codehub-lc .rg-fn { color: #f4f1ea; }
.r-main .codehub-lc .rg-str { color: #b9d98c; }
.r-main .codehub-lc .rg-interp { color: #ffd27a; }
.r-main .codehub-lc :is(.rg-num, .rg-bool) { color: #f2ad6b; }
.r-main .codehub-lc .rg-op { color: #8d94a1; }
.r-main .codehub-lc .rg-pragma { color: #c6a8ff; }
.r-main .codehub-lc .rg-cmt { color: #626a77; }
.r-main .codehub-readme pre { background: var(--night); color: var(--night-ink); }
.r-main .codehub-files .codehub-added { color: var(--good); }
.r-main .codehub-files .codehub-removed { color: var(--accent); }

/* ── The statistics (telemetry) ─────────────────────────── */
.r-main .telemetry {
  --telemetry-wrap: calc(var(--wrap) + 2 * var(--gutter));
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}
.r-main .telemetry-head h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1; letter-spacing: -.045em; }
.r-main .telemetry-card-label, .r-main .telemetry-chart figcaption, .r-main .telemetry-table th { font-family: var(--mono); font-weight: 500; letter-spacing: .08em; }

/* ── Narrow screens ─────────────────────────────────────── */
/* With a language switcher the header needs more room: the menu takes its own row sooner. */
@media (max-width: 72rem) {
  .r-header-row:has(.r-locales a) { flex-wrap: wrap; gap: 0 1rem; padding-block: .6rem 0; }
  .r-header-row:has(.r-locales a) .r-nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: .35rem var(--gutter) .5rem; }
  .r-header-row:has(.r-locales a) .r-locales { margin-left: auto; }
  .r-header-row:has(.r-locales a) .r-account { margin-left: 0; }
}

@media (max-width: 64rem) {
  .r-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .r-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-feature-grid li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .r-feature-grid li:nth-child(2n) { padding-left: 1.75rem; border-left: 1px solid var(--line); }
  .r-book-band-grid { grid-template-columns: minmax(0, 1fr); }
  .r-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 52rem) {
  .r-header-row { flex-wrap: wrap; gap: 0 1rem; padding-block: .6rem 0; }
  .r-nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: .35rem var(--gutter) .5rem; }
  .r-account { margin-left: auto; }
  .r-nav a[aria-current="page"]::after { bottom: 0; }
  .r-doc { grid-template-columns: minmax(0, 1fr); }
  .r-doc-side { position: static; max-height: none; padding: 1rem 1.1rem 0; border: 1px solid var(--line); border-radius: 12px; }
  .r-doc-side-long .r-toc { max-height: 16rem; overflow-y: auto; }
  .r-steps a { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .r-step-summary { grid-column: 2; }
}
@media (max-width: 40rem) {
  .r-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .r-feature-grid li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .r-feature-grid li { padding-right: 0; }
  .r-news-list a { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .r-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-pager { grid-template-columns: minmax(0, 1fr); }
  .r-pager-next { grid-column: 1; }
  .r-files thead { display: none; }
  .r-files tr { display: grid; gap: .25rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .r-files td { padding: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Language switcher: a menu with no script; hidden where the site has one language. */
.r-locales { position: relative; font-size: .875rem; }
.r-locales:not(:has(a)) { display: none; }
.r-locales summary { padding: .5rem .7rem; border-radius: 8px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.r-locales summary:hover, .r-locales[open] summary { color: var(--ink); background: var(--paper-2); }
.r-locales-menu { position: absolute; right: 0; top: calc(100% + .25rem); z-index: 40; display: flex; flex-direction: column; min-width: 9rem; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.r-locales-menu a { padding: .4rem .6rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.r-locales-menu a:hover { color: var(--ink); background: var(--paper-2); }
.r-locales-menu a[aria-current="true"] { color: var(--ink); font-weight: 500; }
@media (max-width: 40rem) {
  .r-header-row:has(.r-locales a) { gap: 0 .5rem; }
  .r-header-row:has(.r-locales a) .r-brand { margin-right: auto; }
  .r-header-row:has(.r-locales a) .r-locales { margin-left: 0; }
}

/* ── Ridgun, the mascot ──────────────────────────────────── */
/* The drawing is one ink on the page's paper, and it always stands on a line: its chest is cut straight. */
.r-mascot { display: block; width: 100%; height: auto; }
.r-closing { border-top: 1px solid var(--line); overflow: hidden; }
.r-closing-grid { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 24rem); justify-content: center; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.r-closing-text { align-self: center; padding-block: clamp(3rem, 8vw, 6rem); }
.r-closing-text p { margin: 0 0 2rem; max-width: 30rem; color: var(--ink-2); }
.r-closing-art { padding-top: clamp(2rem, 5vw, 4rem); }
.r-closing-art .r-mascot { max-height: 30rem; object-fit: cover; object-position: top; }
.r-book-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(2rem, 6vw, 5rem); align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line-2); }
.r-book-cover .r-pagehead { align-self: center; margin-bottom: 0; padding-bottom: 2rem; border-bottom: 0; }
.r-book-art .r-mascot { max-height: 26rem; object-fit: cover; object-position: top; }
@media (max-width: 760px) {
  .r-closing-grid, .r-book-cover { grid-template-columns: minmax(0, 1fr); }
  .r-closing-text { padding-bottom: 0; }
  .r-closing-art { width: min(78%, 20rem); margin-inline: auto; }
  .r-book-art { width: min(52%, 13rem); margin-inline: auto; }
  .r-closing-art .r-mascot { max-height: 24rem; }
  .r-book-art .r-mascot { max-height: 13rem; }
}
/* The closing section stands on the footer: no gap between the drawing's straight edge and the line. */
main:has(> .r-closing:last-child) + .r-footer { margin-top: 0; }
