/* ReadyStack theme v3 — the SitePilot cockpit's design language on readystack.dev.
 *
 * The rules this sheet encodes (UIDesignPlaybook.md has the long form):
 *   - panels on a canvas, 1px hairlines, 8px radius, no shadows except dialogs and menus;
 *   - sentence case; monospace only for code, commands, digests and file names;
 *   - every status is a coloured dot plus a word, never colour alone;
 *   - teal is the accent, orange is the "Ready" in the wordmark and nothing else;
 *   - white text never sits on #14b8a6 (2.5:1) — text on an accent fill is --on-accent.
 *
 * Light is the default. <html data-theme="dark"> switches to dark; a tiny script in each
 * page's <head> sets the attribute before first paint from localStorage.rs_theme.
 * New components carry an rs- prefix so they never collide with a page's own classes.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --canvas: #f4f5f7; --panel: #ffffff; --sunk: #f8f9fa; --line: #e3e6ea; --line-2: #eef0f3;
  --ink: #1d2025; --ink-2: #5d6470; --ink-3: #6b7280;
  --accent: #0f766e; --on-accent: #ffffff; --accent-ink: #0f766e; --accent-wash: #e6f6f4;
  --brand: #c2410c;
  --good: #0ca30c; --good-ink: #006300; --good-wash: #e7f6e7;
  --warn: #fab219; --warn-ink: #8a5a00; --warn-wash: #fff5dc;
  --crit: #d03b3b; --crit-ink: #b42828; --crit-wash: #fdecec;
  --shadow: 0 8px 28px rgba(16,24,40,.14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --top-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #121315; --panel: #1b1d20; --sunk: #17191b; --line: #2b2e33; --line-2: #24272b;
  --ink: #e8eaed; --ink-2: #a8adb5; --ink-3: #868c95;
  --accent: #14b8a6; --on-accent: #04221e; --accent-ink: #2dd4bf; --accent-wash: #10302c;
  --brand: #f97316;
  --good: #1fb81f; --good-ink: #3ec43e; --good-wash: #132a14;
  --warn: #fab219; --warn-ink: #fab219; --warn-wash: #2d2410;
  --crit: #d03b3b; --crit-ink: #ee7a7a; --crit-wash: #331a1a;
  --shadow: 0 8px 28px rgba(0,0,0,.5);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--canvas); color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main, body > .rs-main { flex: 1 0 auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
code, kbd, samp, pre { font-family: var(--mono); font-size: 12px; }
:not(pre) > code {
  background: var(--sunk); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 1px 5px; color: var(--ink); overflow-wrap: anywhere;
}
b, strong { font-weight: 600; }
::selection { background: var(--accent-wash); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Top bar (drawn by components.js) ───────────────────────────────────── */
body > nav:empty { display: block; height: var(--top-h); background: var(--panel); border-bottom: 1px solid var(--line); }
.rs-top { position: sticky; top: 0; z-index: 50; background: var(--panel); border-bottom: 1px solid var(--line); }
.rs-top-in { max-width: 1200px; margin: 0 auto; height: var(--top-h); padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.rs-mark { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; white-space: nowrap; }
.rs-mark:hover { text-decoration: none; }
.rs-mark svg { width: 24px; height: 24px; flex: none; }
.rs-mark b { color: var(--brand); font-weight: 700; }
.rs-nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.rs-nav a { color: var(--ink-2); padding: 6px 10px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.rs-nav a:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.rs-nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.rs-top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rs-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700;
}
.rs-top .rs-menu-btn { display: none; }
.rs-menu { border-top: 1px solid var(--line-2); background: var(--panel); padding: 8px 16px 12px; }
.rs-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 6px; color: var(--ink); font-weight: 500; }
.rs-menu a:hover { background: var(--sunk); text-decoration: none; }
.rs-menu a[aria-current="page"] { background: var(--sunk); }
.rs-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }

/* ── Footer (drawn by components.js) ────────────────────────────────────── */
.rs-foot { border-top: 1px solid var(--line); margin-top: 32px; }
.rs-foot-in { max-width: 1200px; margin: 0 auto; padding: 20px 24px 32px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 12px; color: var(--ink-3); }
.rs-foot a { color: var(--ink-2); }
.rs-foot .rs-copy { margin-right: 8px; }
.rs-foot .rs-foot-end { margin-left: auto; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.rs-main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; align-content: start; }
.rs-main.rs-narrow { max-width: 820px; }
.rs-grid { display: grid; gap: 16px; min-width: 0; }
.rs-grid > * { min-width: 0; }
.rs-cols-2 { grid-template-columns: 1fr 1fr; }
.rs-cols-3-2 { grid-template-columns: 3fr 2fr; }
.rs-cols-1-2 { grid-template-columns: 1fr 2fr; }
.rs-page-head { padding: 8px 0 0; }
.rs-page-head h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.rs-page-head p { color: var(--ink-2); font-size: 15px; margin-top: 6px; max-width: 720px; }

/* ── Panel ──────────────────────────────────────────────────────────────── */
.rs-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; display: flex; flex-direction: column; }
.rs-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.rs-panel > header h2, .rs-panel > header h3 { font-size: 14px; font-weight: 600; line-height: 1.4; }
.rs-panel > header .rs-hint { margin-left: auto; }
.rs-body { padding: 16px; }
.rs-body > * + * { margin-top: 12px; }
.rs-body.rs-grid > * { margin-top: 0; }
.rs-panel > .rs-foot-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.rs-hint { color: var(--ink-3); font-size: 12px; }
.rs-lede { color: var(--ink-2); }
.rs-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }

/* ── Hero (home page) ───────────────────────────────────────────────────── */
.rs-hero { display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: center; gap: 24px; padding: 40px 40px 32px; }
.rs-hero h1, .rs-hero h2 { font-size: 40px; line-height: 1.15; letter-spacing: -.01em; font-weight: 700; margin-bottom: 12px; }
.rs-hero h1 span, .rs-hero h2 span { color: var(--accent-ink); }
.rs-hero p { color: var(--ink-2); font-size: 16px; max-width: 580px; margin-bottom: 20px; }
.rs-hero img { width: 100%; max-width: 280px; height: auto; justify-self: end; }
.rs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-kicker { display: inline-flex; align-items: center; font-size: 12px; color: var(--ink-2); margin-bottom: 14px; }

/* ── Row of headline numbers ───────────────────────────────────────────── */
.rs-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line-2); }
.rs-panel > .rs-stats:first-child { border-top: 0; }
.rs-stat { padding: 14px 16px; border-left: 1px solid var(--line-2); min-width: 0; }
.rs-stat:first-child { border-left: 0; }
.rs-stat .k { color: var(--ink-2); font-size: 12px; }
.rs-stat .v { font-size: 24px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.rs-stat .n { color: var(--ink-3); font-size: 12px; }
.rs-meter { height: 4px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.rs-meter > i { display: block; height: 100%; width: 0; background: var(--good); transition: width .3s; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.rs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, filter .12s;
}
.rs-btn:hover { background: var(--sunk); text-decoration: none; }
.rs-btn.rs-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.rs-btn.rs-primary:hover { filter: brightness(1.08); }
.rs-btn.rs-lg { height: 40px; padding: 0 16px; font-size: 14px; }
.rs-btn.rs-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.rs-btn.rs-icon { width: 32px; padding: 0; }
.rs-btn.rs-icon.rs-sm { width: 26px; }
.rs-btn[disabled], .rs-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; }
.rs-btn svg { width: 16px; height: 16px; flex: none; }

/* ── Tags and status ────────────────────────────────────────────────────── */
.rs-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 18px; padding: 0 8px; border-radius: 10px; background: var(--sunk); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.rs-tag.acc { background: var(--accent-wash); color: var(--accent-ink); border-color: transparent; }
.rs-tag.good { background: var(--good-wash); color: var(--good-ink); border-color: transparent; }
.rs-tag.warn { background: var(--warn-wash); color: var(--warn-ink); border-color: transparent; }
.rs-tag.crit { background: var(--crit-wash); color: var(--crit-ink); border-color: transparent; }
.rs-dot { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rs-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.rs-dot.good::before { background: var(--good); }
.rs-dot.warn::before { background: var(--warn); }
.rs-dot.crit::before { background: var(--crit); }
.rs-dot.acc::before { background: var(--accent); }

/* ── Lists ──────────────────────────────────────────────────────────────── */
.rs-checks { list-style: none; }
.rs-checks li { padding: 5px 0 5px 22px; position: relative; }
.rs-checks li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 5px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.rs-facts { list-style: none; }
.rs-facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.rs-facts li:last-child { border-bottom: 0; }
.rs-facts li > :first-child { color: var(--ink-2); }
.rs-facts li > :last-child { text-align: right; }
.rs-rows { list-style: none; border: 1px solid var(--line-2); border-radius: 6px; }
.rs-rows > li { padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.rs-rows > li:last-child { border-bottom: 0; }

/* ── Steps (a row of numbered cells) and tiles ─────────────────────────── */
.rs-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.rs-steps > * { padding: 16px; border-left: 1px solid var(--line-2); min-width: 0; }
.rs-steps > :first-child { border-left: 0; }
.rs-steps .no { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); }
.rs-steps b { display: block; margin: 2px 0 4px; font-weight: 600; }
.rs-steps p { color: var(--ink-2); font-size: 13px; }
.rs-tiles { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
.rs-tile { padding: 16px; border-left: 1px solid var(--line-2); min-width: 0; text-align: left; background: none; border-top: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; cursor: pointer; }
.rs-tile:first-child { border-left: 0; }
.rs-tile:hover { background: var(--sunk); }
.rs-tile svg { width: 20px; height: 20px; stroke: var(--ink-2); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rs-tile b { display: block; margin: 8px 0 2px; font-weight: 600; }
.rs-tile span { color: var(--ink-2); font-size: 13px; }

.rs-steps.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.rs-steps.two > :nth-child(odd) { border-left: 0; }
.rs-steps.two > :nth-child(n+3) { border-top: 1px solid var(--line-2); }
.rs-steps.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.rs-steps.six { grid-template-columns: repeat(6, minmax(0,1fr)); }
.rs-defs dt { font-weight: 600; }
.rs-defs dd { color: var(--ink-2); margin: 2px 0 12px; }
.rs-defs dd:last-child { margin-bottom: 0; }
.rs-numbered { list-style: none; counter-reset: rs-n; }
.rs-numbered > li { counter-increment: rs-n; position: relative; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--line-2); }
.rs-numbered > li:last-child { border-bottom: 0; }
.rs-numbered > li::before { content: counter(rs-n); position: absolute; left: 0; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.rs-numbered b { display: block; font-weight: 600; margin-bottom: 2px; }
.rs-numbered p { color: var(--ink-2); }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.rs-table-wrap { overflow-x: auto; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rs-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--sunk); padding: 8px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.rs-table tr:last-child td { border-bottom: 0; }
.rs-table tbody tr:hover td { background: var(--sunk); }
.rs-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rs-table th.sortable { cursor: pointer; user-select: none; }
.rs-table th.sortable:hover { color: var(--ink); }
.rs-table th[aria-sort="ascending"]::after { content: " ↑"; }
.rs-table th[aria-sort="descending"]::after { content: " ↓"; }
.rs-table tr.rs-target td { background: var(--accent-wash); }

/* ── Code ───────────────────────────────────────────────────────────────── */
.rs-code { position: relative; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 14px; overflow-x: auto; color: var(--ink-2); line-height: 1.7; font-size: 12px; white-space: pre; }
.rs-code .p { color: var(--ink-3); }
.rs-code .h { color: var(--ink); }
.rs-code .ok { color: var(--good-ink); }
.rs-code .cm { color: var(--ink-3); }
.rs-cmd { display: flex; align-items: center; gap: 8px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 4px 4px 10px; min-width: 0; }
.rs-cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 4px 0; color: var(--ink); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.rs-field { display: block; }
.rs-field + .rs-field { margin-top: 12px; }
.rs-input, .rs-select, .rs-textarea {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px;
}
.rs-textarea { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; }
.rs-input:focus, .rs-select:focus, .rs-textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.rs-input::placeholder, .rs-textarea::placeholder { color: var(--ink-3); }
.rs-error { color: var(--crit-ink); font-size: 12px; margin-top: 6px; }
.rs-ok { color: var(--good-ink); font-size: 12px; margin-top: 6px; }
.rs-form-row { display: flex; gap: 8px; align-items: stretch; }
.rs-form-row .rs-input { flex: 1; min-width: 0; }

/* ── Callouts and empty states ──────────────────────────────────────────── */
.rs-callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 6px; padding: 12px 14px; color: var(--ink); }
.rs-callout.warn { border-left-color: var(--warn); background: var(--warn-wash); }
.rs-callout.crit { border-left-color: var(--crit); background: var(--crit-wash); }
.rs-callout.good { border-left-color: var(--good); background: var(--good-wash); }
.rs-callout b:first-child { display: block; margin-bottom: 2px; }
.rs-empty { text-align: center; padding: 32px 16px; color: var(--ink-2); }
.rs-empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.rs-empty .rs-actions { justify-content: center; margin-top: 14px; }

/* ── Segmented control ──────────────────────────────────────────────────── */
.rs-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); max-width: 100%; overflow-x: auto; }
.rs-seg button { height: 30px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.rs-seg button:first-child { border-left: 0; }
.rs-seg button[aria-selected="true"], .rs-seg button.on { background: var(--sunk); color: var(--ink); }

/* ── Dialog ─────────────────────────────────────────────────────────────── */
.rs-dialog { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); margin: auto; }
.rs-dialog::backdrop { background: rgba(0,0,0,.55); }
.rs-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); }
.rs-dialog > header h2 { font-size: 14px; font-weight: 600; }
.rs-dialog .rs-body { overflow: auto; }

/* ── Docker Scout output dialog (scout-popup.js) ────────────────────────── */
.rs-scout-btn { margin-left: 6px; vertical-align: middle; }
.rs-scout > header .rs-scout-title { min-width: 0; }
.rs-scout > header .rs-hint { display: block; font-family: var(--mono); overflow-wrap: anywhere; }
.rs-scout-panel h3 { font-size: 13px; font-weight: 600; margin: 18px 0 6px; }
.rs-scout-panel > * + * { margin-top: 8px; }
.rs-scout-panel .rs-table code { overflow-wrap: normal; }
@media (min-width: 701px) { .rs-scout-panel .rs-table code { white-space: nowrap; } }
.rs-scout-grade { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-scout-raw { max-height: 360px; overflow: auto; }

/* ── Release history dialog (release-history.js) ────────────────────────── */
.rs-history { width: min(980px, calc(100vw - 32px)); }
.rs-history > header .rs-history-title { min-width: 0; }
.rs-history > header .rs-hint { display: block; font-family: var(--mono); overflow-wrap: anywhere; }
.rs-history-table td { vertical-align: top; }
.rs-history-table .rs-lead .rs-dot { margin-left: 8px; font-weight: 500; }
.rs-history-tag { display: block; margin-top: 2px; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-3); overflow-wrap: anywhere; }
.rs-history-note { display: block; margin-top: 2px; font-weight: 400; }
.rs-history-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rs-history-date { white-space: nowrap; }
@media (max-width: 700px) { .rs-history-acts { justify-content: flex-start; } }

/* Read by screen readers, not shown. */
.rs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Article pages ──────────────────────────────────────────────────────── */
.rs-article { font-size: 15px; line-height: 1.65; }
.rs-article h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.rs-article h2 { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 28px 0 8px; }
.rs-article h3 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.rs-article p, .rs-article ul, .rs-article ol { margin: 0 0 12px; }
.rs-article ul, .rs-article ol { padding-left: 22px; }
.rs-article li { margin: 4px 0; }
.rs-article .rs-meta { color: var(--ink-3); font-size: 13px; margin-bottom: 20px; }
.rs-article > :first-child { margin-top: 0; }
.rs-toc { position: sticky; top: calc(var(--top-h) + 16px); align-self: start; }
.rs-toc a { display: block; padding: 5px 0; color: var(--ink-2); font-size: 13px; }
.rs-toc a:hover { color: var(--ink); }
.rs-with-toc { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }

/* ── Phones ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rs-top-in { padding: 0 16px; gap: 12px; }
  .rs-nav, .rs-top-right .rs-signin, .rs-top-right #nav-auth { display: none; }
  .rs-top .rs-menu-btn { display: inline-flex; }
  .rs-main { padding: 16px; }
  .rs-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .rs-hero img { display: none; }
  .rs-hero h1, .rs-hero h2 { font-size: 28px; }
  .rs-hero p { font-size: 15px; }
  .rs-btn.rs-lg { width: 100%; }
  .rs-actions .rs-btn.rs-lg { width: auto; flex: 1 1 auto; }
  .rs-stats { grid-template-columns: 1fr 1fr; }
  .rs-stat:nth-child(odd) { border-left: 0; }
  .rs-stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .rs-cols-2, .rs-cols-3-2, .rs-cols-1-2, .rs-with-toc { grid-template-columns: 1fr; }
  .rs-toc { position: static; }
  .rs-steps { grid-template-columns: 1fr 1fr; }
  .rs-steps > :nth-child(odd) { border-left: 0; }
  .rs-steps > :nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .rs-steps.two, .rs-steps.three { grid-template-columns: 1fr; }
  .rs-steps.two > *, .rs-steps.three > * { border-left: 0; border-top: 1px solid var(--line-2); }
  .rs-steps.two > :first-child, .rs-steps.three > :first-child { border-top: 0; }
  .rs-steps.six { grid-template-columns: 1fr 1fr; }
  .rs-steps.six > :nth-child(odd) { border-left: 0; }
  .rs-tiles { grid-template-columns: 1fr; }
  .rs-tile { border-left: 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; }
  .rs-tile:first-child { border-top: 0; }
  .rs-tile svg { grid-row: span 2; margin-top: 2px; }
  .rs-tile b { margin: 0; }
  .rs-input, .rs-select { height: 40px; }
  .rs-btn { min-height: 36px; }
  .rs-foot-in { padding: 16px 16px 28px; }
  .rs-foot .rs-foot-end { margin-left: 0; width: 100%; }
}
/* Tables become stacked cards; every cell needs a data-label. */
@media (max-width: 700px) {
  .rs-table.rs-stack thead { display: none; }
  .rs-table.rs-stack, .rs-table.rs-stack tbody, .rs-table.rs-stack tr, .rs-table.rs-stack td { display: block; width: 100%; }
  .rs-table.rs-stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  .rs-table.rs-stack tr:last-child { border-bottom: 0; }
  .rs-table.rs-stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .rs-table.rs-stack td::before { content: attr(data-label); color: var(--ink-2); font-size: 12px; text-align: left; flex: none; }
  .rs-table.rs-stack td.rs-lead { display: block; text-align: left; font-weight: 600; font-size: 14px; padding-bottom: 4px; }
  .rs-table.rs-stack td.rs-lead::before { content: none; }
  .rs-table.rs-stack td.rs-acts { justify-content: flex-start; padding-top: 8px; }
  .rs-table.rs-stack td.rs-acts::before { content: none; }
  .rs-table.rs-stack tbody tr:hover td { background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
