/* Стили лендинга StashReady (классы rk-*): светлая палитра в :root, темная в prefers-color-scheme, пары цвет/фон не ниже 4,5:1 (расчет - docs/LANDING.md, раздел 9).
   Без JavaScript и внешних ресурсов (проверяет scripts/check-landing.sh); верстка начинается с 375 px. Общие стили держат и privacy, terms, 404. */

/* ---------------------------------------------------------------- токены */
:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0a5fb4;
  --on-accent: #ffffff;
  --line: rgba(29, 29, 31, .12);
  --line-soft: rgba(29, 29, 31, .07);
  --glass: rgba(251, 251, 253, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -18px rgba(0, 0, 0, .18);
  /* Экран внутри мокапа iPhone: системные цвета iOS из docs/BRAND.md. */
  --ph-bg: #f2f2f7;
  --ph-card: #ffffff;
  --ph-ink: #000000;
  --ph-muted: #5c5c63;
  --ph-fill: #e9e9ee;
  --ph-line: rgba(60, 60, 67, .2);
  --ph-bar: rgba(249, 249, 251, .99);
  --ph-frame: #1d1d1f;
  --ph-rim: #3a3a3c;
  --top-h: 64px;
  --dock-h: 76px;
  /* Пружина: затухающий осциллятор, коэффициент 0,55, 2,2 Гц, окно 0,9 с (расчет - docs/LANDING.md, раздел 10). */
  --spring: linear(0, 0.095 3.8%, 0.3092 7.7%, 0.5564 11.5%, 0.7799 15.4%, 0.9504 19.2%, 1.0598 23.1%, 1.1139 26.9%, 1.1261 30.8%, 1.1112 34.6%, 1.083 38.5%, 1.0518 42.3%, 1.0244 46.2%, 1.0039 50%, 0.9911 53.8%, 0.9851 57.7%, 0.9842 61.5%, 0.9864 65.4%, 0.9901 69.2%, 0.994 73.1%, 0.9973 76.9%, 0.9998 80.8%, 1.0013 84.6%, 1.0019 88.5%, 1.002 92.3%, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #1d1d1f;
    --surface: #2c2c2e;
    --ink: #fbfbfd;
    --muted: #a1a1a8;
    --accent: #5aaeff;
    --on-accent: #00172e;
    --line: rgba(251, 251, 253, .18);
    --line-soft: rgba(251, 251, 253, .09);
    --glass: rgba(0, 0, 0, .66);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .8);
    --ph-bg: #000000;
    --ph-card: #1c1c1e;
    --ph-ink: #ffffff;
    --ph-muted: #a1a1a8;
    --ph-fill: #2c2c2e;
    --ph-line: rgba(84, 84, 88, .6);
    --ph-bar: rgba(29, 29, 31, .99);
    --ph-frame: #2c2c2e;
    --ph-rim: #636366;
  }
}

/* ---------------------------------------------------------------- основа */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--top-h) + 16px); }
body {
  margin: 0;
  padding-top: var(--top-h);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif; margin: 0 0 12px; line-height: 1.1; }
h1 { font-size: clamp(34px, 4.7vw, 60px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; }
h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h4 { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }
h5 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 2px; }
p { margin: 0 0 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.rk-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.rk-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.rk-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.rk-lead { color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.42; letter-spacing: -0.012em; max-width: 640px; text-wrap: pretty; }
.rk-sec { padding: 64px 0; }
.rk-sec--alt { background: var(--bg-alt); }

/* ---------------------------------------------------------------- шапка: фиксированная, матовое стекло */
.rk-top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--top-h); background: var(--glass); border-bottom: 1px solid var(--line-soft); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .rk-top { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.rk-nav { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rk-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.rk-brand:hover { text-decoration: none; }
.rk-brand img { width: 28px; height: 28px; border-radius: 7px; }
.rk-navlinks { display: flex; align-items: center; gap: 4px 24px; font-size: 14px; }
.rk-navlinks a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.rk-navlinks a:hover { color: var(--ink); text-decoration: none; }
.rk-navlinks--anchors { margin-left: auto; margin-right: 16px; }

/* ---------------------------------------------------------------- бейдж App Store: официальный файл как есть, без фона, рамки, поворота и анимации
   Правила Apple: высота не меньше 40 px, свободное поле не меньше четверти высоты, один бейдж на раскладку (поэтому он только в hero и в финальном блоке). */
.rk-store { display: inline-flex; align-items: center; padding: 2px 0; line-height: 0; }
.rk-store img { display: block; width: auto; height: 54px; }
.rk-store:hover { text-decoration: none; }
.rk-store:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 10px; }

/* Текстовая кнопка шапки и нижней панели: акцентная заливка, без логотипа Apple. */
.rk-dl { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; transition: transform .6s var(--spring); }
.rk-dl:hover { text-decoration: none; }
.rk-dl--dock { width: 100%; min-height: 52px; border-radius: 14px; font-size: 17px; }

/* ---------------------------------------------------------------- hero */
.rk-hero { position: relative; padding: 40px 0 72px; overflow: hidden; }
.rk-hero::before { content: ""; position: absolute; inset: 0; background: url("/assets/pattern-shields.svg") center / 128px; opacity: .4; -webkit-mask-image: linear-gradient(270deg, #000, transparent 45%); mask-image: linear-gradient(270deg, #000, transparent 45%); pointer-events: none; }
.rk-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.rk-hero-copy { min-width: 0; }
.rk-hero-id { margin-bottom: 24px; }
.rk-appicon { display: block; width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow); }
.rk-hero h1 { text-wrap: balance; max-width: 13em; margin-bottom: 20px; }
.rk-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 28px 0 14px; }
.rk-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 17px; }
.rk-subnote { color: var(--muted); font-size: 14px; margin: 0; }
.rk-hero-art { position: relative; display: flex; justify-content: flex-end; min-width: 0; }
.rk-mascot { position: absolute; left: -26px; bottom: 6px; width: clamp(100px, 11.5vw, 150px); height: auto; pointer-events: none; }

/* ---------------------------------------------------------------- мокап iPhone: экран 393 x 852 pt, масштаб --s */
.rk-phone { --s: .78; position: relative; flex: none; width: calc(393px * var(--s) + 16px); padding: 8px; border-radius: calc(55px * var(--s) + 8px); background: var(--ph-frame); box-shadow: inset 0 0 0 1.5px var(--ph-rim), 0 0 0 1px var(--line), 0 40px 70px -28px rgba(0, 0, 0, .45); transition: transform .8s var(--spring); }
.rk-phone::before, .rk-phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: var(--ph-rim); }
.rk-phone::before { left: -3px; top: 20%; height: 9%; box-shadow: 0 calc(.1 * 852px * var(--s)) 0 var(--ph-rim); }
.rk-phone::after { right: -3px; top: 27%; height: 13%; }
.rk-phone--show { --s: .8; }
.rk-screen { position: relative; width: calc(393px * var(--s)); height: calc(852px * var(--s)); border-radius: calc(55px * var(--s)); overflow: hidden; background: var(--ph-bg); }
.rk-screen-in { position: absolute; top: 0; left: 0; width: 393px; height: 852px; transform: scale(var(--s)); transform-origin: 0 0; }
@media (hover: hover) {
  .rk-phone:hover { transform: translateY(-8px) scale(1.018); }
}

/* Содержимое экранов: размеры в pt приложения (docs/BRAND.md, Typography). */
.rk-scr { position: absolute; inset: 0; width: 393px; height: 852px; }
.rk-screen-in { color: var(--ph-ink); font-size: 17px; line-height: 1.3; letter-spacing: 0; text-align: left; }
.rk-p-status { position: absolute; top: 0; left: 0; right: 0; height: 54px; padding: 8px 34px 0 52px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 17px; z-index: 4; }
.rk-p-sys { display: flex; align-items: center; gap: 7px; }
.rk-p-sig { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.rk-p-sig i { display: block; width: 3.5px; border-radius: 1px; background: var(--ph-ink); }
.rk-p-sig i:nth-child(1) { height: 4px; } .rk-p-sig i:nth-child(2) { height: 6.5px; } .rk-p-sig i:nth-child(3) { height: 9px; } .rk-p-sig i:nth-child(4) { height: 12px; }
.rk-p-batt { position: relative; width: 26px; height: 13px; border-radius: 4px; border: 1px solid var(--ph-muted); }
.rk-p-batt::before { content: ""; position: absolute; inset: 1.5px; border-radius: 2px; background: var(--ph-ink); }
.rk-p-island { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; z-index: 5; }
.rk-p-body { position: absolute; top: 54px; left: 0; right: 0; bottom: 0; padding: 4px 20px 0; overflow: hidden; }
.rk-p-bar { display: flex; justify-content: space-between; height: 44px; align-items: center; color: var(--accent); }
.rk-p-bar-i { width: 24px; height: 24px; display: inline-flex; }
.rk-p-navrow { height: 44px; display: flex; align-items: center; color: var(--accent); }
.rk-p-back { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; }
.rk-p-back .rk-i { transform: scaleX(-1); }
.rk-p-large { font-size: 34px; font-weight: 700; letter-spacing: .01em; margin: 2px 0 14px; }
.rk-p-title { font-size: 28px; font-weight: 700; line-height: 1.15; margin-bottom: 6px; }
.rk-p-hint { font-size: 13px; color: var(--ph-muted); margin: 8px 0 14px; }
.rk-p-head { font-size: 17px; font-weight: 600; line-height: 1.25; }
.rk-p-sub { font-size: 15px; color: var(--ph-muted); line-height: 1.3; }
.rk-p-sub--lead { margin-bottom: 14px; }
.rk-p-sub--body { font-size: 17px; margin-top: 6px; }
.rk-p-sub--ink { color: var(--ph-ink); font-weight: 600; }
.rk-p-qty { font-size: 15px; font-weight: 600; margin-top: 3px; }
.rk-p-foot13 { font-size: 13px; color: var(--ph-muted); margin-top: 3px; line-height: 1.3; }
.rk-p-card { background: var(--ph-card); border-radius: 14px; padding: 16px; }
.rk-p-stack { display: grid; gap: 10px; }
.rk-p-row { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.rk-p-box { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.rk-p-box--on { background: var(--accent); color: var(--on-accent); }
.rk-p-box .rk-i { width: 18px; height: 18px; stroke-width: 3; }
.rk-p-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ph-muted); margin-bottom: 8px; }
.rk-p-note .rk-i { flex: none; width: 17px; height: 17px; }
.rk-p-group { font-size: 20px; font-weight: 700; margin: 14px 0 8px; }
.rk-p-item { margin-bottom: 4px; }
.rk-p-item--tight { margin-bottom: 14px; }
.rk-p-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rk-p-line > .rk-i { flex: none; width: 15px; height: 15px; margin-top: 4px; color: var(--ph-muted); }
.rk-p-actions { display: flex; gap: 8px; margin-top: 12px; }
.rk-p-end { display: flex; align-items: center; gap: 6px; flex: none; margin-top: 2px; }
.rk-p-end .rk-i { width: 15px; height: 15px; color: var(--ph-muted); }
.rk-p-end .rk-p-done .rk-i { width: 20px; height: 20px; color: var(--accent); }
.rk-p-bought13 { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 6px; }
.rk-p-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 12px; border-radius: 14px; font-size: 17px; font-weight: 600; text-align: center; }
.rk-p-btn .rk-i { width: 17px; height: 17px; }
.rk-p-btn--primary { background: var(--accent); color: var(--on-accent); }
.rk-p-btn--outline { border: 1.5px solid var(--accent); color: var(--accent); }
.rk-p-btn--sm { flex: 1; font-size: 15px; min-height: 46px; padding: 0 6px; }
.rk-p-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 20px 34px; display: grid; gap: 8px; background: var(--ph-bg); }
.rk-p-bought { margin: 0 0 12px 2px; }
.rk-p-body-text { font-size: 17px; }
.rk-p-pill { flex: none; background: var(--ph-fill); border-radius: 8px; padding: 5px 12px; font-size: 17px; }
.rk-p-item .rk-p-btn { margin-top: 12px; }
.rk-p-item .rk-p-sub--ink { margin-top: 12px; }
.rk-p-toggle { align-items: center; margin-top: 14px; }
.rk-p-switch { flex: none; position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--ph-fill); }
.rk-p-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.rk-p-exprow { align-items: center; min-height: 64px; margin-bottom: 10px; }
.rk-p-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 83px; display: flex; justify-content: space-around; padding-top: 8px; background: var(--ph-bar); border-top: 1px solid var(--ph-line); z-index: 3; }
.rk-p-tab { width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--ph-muted); }
.rk-p-tab .rk-i { width: 28px; height: 28px; }
.rk-p-tab--on { color: var(--accent); }
.rk-p-home { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--ph-ink); z-index: 6; }
.rk-i { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- шаги */
.rk-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: rk-step; }
.rk-steps li { position: relative; counter-increment: rk-step; padding: 24px 22px 26px; border-radius: 22px; background: var(--bg-alt); }
.rk-steps li::before { content: counter(rk-step); display: block; margin-bottom: 18px; font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--accent); }
.rk-steps h3 { font-size: 19px; margin-bottom: 8px; }
.rk-steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* ---------------------------------------------------------------- витрина экранов: вкладки на radio, без JavaScript */
.rk-tab-list { display: grid; gap: 10px; min-width: 0; margin: 0 0 28px; padding: 0; border: 0; }
.rk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rk-show-head { margin-bottom: 40px; }
.rk-show-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center; }
.rk-show-copy { min-width: 0; max-width: 460px; }
/* Radio лежит поверх своей метки и невидим: фокус и прокрутка к нему попадают на саму метку. */
.rk-tab { position: relative; }
.rk-tab-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rk-tab-label { display: flex; align-items: center; min-height: 56px; padding: 0 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); transition: background-color .25s, color .25s, transform .5s var(--spring); }
.rk-tab:hover .rk-tab-label { transform: translateX(4px); }
.rk-tab-input:checked + .rk-tab-label { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rk-tab-input:focus-visible + .rk-tab-label { outline: 3px solid var(--ink); outline-offset: 3px; }
.rk-tab-panels { display: grid; }
.rk-tab-panel h3 { font-size: 26px; letter-spacing: -0.03em; margin-bottom: 10px; }
.rk-tab-panel p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.45; }
.rk-tab-panel, .rk-scr { opacity: 0; visibility: hidden; transition: opacity .3s, transform .5s var(--spring), visibility 0s .3s; }
.rk-tab-panel { grid-area: 1 / 1; transform: translateY(8px); }
.rk-scr { transform: scale(.985); }
/* Без поддержки :has первая вкладка остается показанной, переключение недоступно. */
.rk-scr--setup, .rk-tab-panel--setup { opacity: 1; visibility: visible; transform: none; }
@supports selector(:has(*)) {
  .rk-scr--setup { opacity: 0; visibility: hidden; transform: scale(.985); }
  .rk-tab-panel--setup { opacity: 0; visibility: hidden; transform: translateY(8px); }
  .rk-show:has(#rk-tab-setup:checked) .rk-scr--setup, .rk-show:has(#rk-tab-setup:checked) .rk-tab-panel--setup,
  .rk-show:has(#rk-tab-list:checked) .rk-scr--list, .rk-show:has(#rk-tab-list:checked) .rk-tab-panel--list,
  .rk-show:has(#rk-tab-card:checked) .rk-scr--card, .rk-show:has(#rk-tab-card:checked) .rk-tab-panel--card,
  .rk-show:has(#rk-tab-soon:checked) .rk-scr--soon, .rk-show:has(#rk-tab-soon:checked) .rk-tab-panel--soon { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .5s var(--spring), visibility 0s; }
}
.rk-show-device { display: flex; justify-content: center; }
.rk-scr { opacity: 0; visibility: hidden; transform: scale(.985); transition: opacity .3s, transform .5s var(--spring), visibility 0s .3s; }
#rk-tab-setup:checked ~ .rk-wrap .rk-scr--setup,
#rk-tab-list:checked ~ .rk-wrap .rk-scr--list,
#rk-tab-card:checked ~ .rk-wrap .rk-scr--card,
#rk-tab-soon:checked ~ .rk-wrap .rk-scr--soon { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .5s var(--spring), visibility 0s; }

/* ---------------------------------------------------------------- преимущества */
.rk-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.rk-benefit { position: relative; min-width: 0; padding: 32px 32px 34px; border-radius: 28px; background: var(--bg-alt); }
.rk-benefit h3 { font-size: 24px; letter-spacing: -0.03em; margin-bottom: 10px; }
.rk-benefit p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45; }
.rk-benefit--mascot { display: flex; align-items: center; gap: 16px; }
.rk-benefit-text { min-width: 0; flex: 1; }
.rk-benefit-art { flex: none; width: 128px; height: 128px; }

/* ---------------------------------------------------------------- пример чек-листа: сгруппированный список в духе iOS */
.rk-example { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); grid-template-areas: "ans list" "src list"; grid-template-rows: auto 1fr; gap: 24px 40px; margin-top: 40px; align-items: start; }
.rk-block { min-width: 0; }
.rk-block:nth-child(1) { grid-area: ans; padding: 24px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.rk-block:nth-child(2) { grid-area: list; }
.rk-block--last { grid-area: src; }
.rk-block h3 { font-size: 24px; letter-spacing: -0.03em; }
.rk-kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 12px 0 14px; }
.rk-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.rk-kv dt { font-size: 15px; color: var(--muted); }
.rk-kv dd { margin: 0; font-weight: 600; text-align: right; }
.rk-note { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0; }
.rk-count { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.rk-group { margin: 28px 0 0; }
.rk-block h3 + .rk-disclaimer + .rk-group { margin-top: 18px; }
.rk-group h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px 4px; font-size: 20px; }
.rk-gnote { font-size: 14px; color: var(--muted); margin: 0 0 10px 4px; }
.rk-list { list-style: none; margin: 0; padding: 0; overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.rk-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 14px 18px; min-height: 60px; }
.rk-item + .rk-item { border-top: 1px solid var(--line-soft); }
.rk-item-main { min-width: 0; }
.rk-qty { margin: 0; font-size: 14px; color: var(--muted); }
.rk-qty .rk-num { color: var(--ink); margin-right: 6px; }
.rk-disclaimer { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.rk-block h3 + .rk-disclaimer { margin: 0 0 4px 4px; }

/* кнопки: высота не меньше 44 px (цель касания) */
.rk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1.5px solid transparent; text-align: center; transition: transform .6s var(--spring), background-color .2s; }
.rk-btn:hover { text-decoration: none; }
.rk-btn--solid { background: var(--accent); color: var(--on-accent); }
.rk-btn--outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.rk-btn--outline:hover { background: var(--bg-alt); }
@media (hover: hover) {
  .rk-btn:hover, .rk-dl:hover { transform: scale(1.045); }
}
.rk-btn:active, .rk-dl:active { transform: scale(.97); }

/* ---------------------------------------------------------------- финальный призыв */
.rk-final-sec { padding-top: 24px; }
.rk-final { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; overflow: hidden; padding: 56px 56px 56px 64px; border-radius: 36px; background: var(--bg-alt); border: 1px solid var(--line-soft); }
.rk-final::before { content: ""; position: absolute; inset: 0; background: url("/assets/pattern-shields.svg") center / 128px; opacity: .5; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.rk-final-text { position: relative; min-width: 0; max-width: 520px; }
.rk-final-text .rk-store { margin-top: 16px; }
.rk-final-art { position: relative; flex: none; width: clamp(160px, 22vw, 260px); height: auto; }

/* ---------------------------------------------------------------- страницы privacy, terms, 404
   Длинный текст: колонка .rk-prose не шире 34em (около 72 знаков в строке при 17 px, замер - docs/LANDING.md, раздел 9), оглавление слева и липкое от 960 px, ниже - карточка над текстом. */
.rk-doc { padding: 40px 0 72px; }
.rk-doc h1 { font-size: clamp(32px, 6vw, 48px); }
.rk-doc-head { max-width: 1120px; }
.rk-doc .rk-meta { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.rk-doc-intro { color: var(--muted); font-size: 18px; line-height: 1.5; max-width: 34em; margin: 0; }
.rk-doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 32px; }
.rk-toc { padding: 18px 20px 14px; border-radius: 22px; background: var(--bg-alt); border: 1px solid var(--line-soft); }
.rk-toc-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rk-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.rk-toc li { margin: 0; }
.rk-toc a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; font-size: 15px; line-height: 1.25; color: var(--ink); }
.rk-toc a:hover { color: var(--accent); }
.rk-prose { min-width: 0; max-width: 34em; line-height: 1.6; }
.rk-prose h2 { font-size: 28px; letter-spacing: -0.03em; margin: 56px 0 14px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.rk-prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rk-prose h3 { font-size: 20px; margin: 30px 0 8px; }
.rk-prose ul, .rk-prose ol { padding-left: 22px; margin: 0 0 16px; }
.rk-prose li { margin-bottom: 8px; }
.rk-prose p { margin: 0 0 16px; }
.rk-callout { margin: 0 0 16px; padding: 20px 22px 8px; border-radius: 20px; background: var(--bg-alt); border: 1px solid var(--line-soft); }
.rk-callout ul { margin-bottom: 8px; }
.rk-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.rk-notfound { text-align: center; padding: 56px 0 88px; min-height: calc(100svh - var(--top-h) - 250px); }
.rk-notfound-art { display: block; width: 200px; height: auto; margin: 0 auto 12px; }
.rk-notfound h1 { margin-bottom: 14px; }
.rk-notfound .rk-lead { margin: 0 auto 28px; }
@media (min-width: 960px) {
  .rk-doc-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 72px; align-items: start; }
  .rk-toc { position: sticky; top: calc(var(--top-h) + 24px); }
  .rk-toc ol { grid-template-columns: minmax(0, 1fr); }
  .rk-toc a { min-height: 0; padding: 8px 0; }
}
@media (max-width: 540px) {
  .rk-toc { padding: 16px 16px 10px; }
  .rk-toc ol { gap: 0 12px; }
  .rk-prose h2 { font-size: 25px; margin-top: 44px; padding-top: 26px; }
}

/* ---------------------------------------------------------------- подвал */
.rk-footer { border-top: 1px solid var(--line-soft); background: var(--bg-alt); padding: 32px 0 44px; color: var(--muted); font-size: 14px; }
.rk-footer p { margin: 0 0 8px; }
.rk-foot-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-bottom: 14px; }
.rk-foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------------------------------------------------------------- нижняя панель с кнопкой для большого пальца (только узкие экраны) */
.rk-dock { display: none; }

/* ---------------------------------------------------------------- планшет: колонки складываются */
@media (max-width: 960px) {
  .rk-sec { padding: 56px 0; }
  .rk-hero { padding: 24px 0 56px; }
  .rk-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .rk-hero::before { -webkit-mask-image: linear-gradient(180deg, #000, transparent 160px); mask-image: linear-gradient(180deg, #000, transparent 160px); }
  .rk-hero-id { min-height: 96px; }
  .rk-hero-art { position: static; justify-content: center; }
  .rk-hero > .rk-wrap { position: relative; }
  .rk-mascot { top: 8px; right: 20px; left: auto; bottom: auto; width: 104px; }
  .rk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-show-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; justify-items: center; }
  .rk-show-copy { max-width: 560px; width: 100%; }
  .rk-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-tab-label { justify-content: center; padding: 0 12px; }
  .rk-tab:hover .rk-tab-label { transform: none; }
  .rk-example { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ans" "list" "src"; grid-template-rows: none; gap: 24px; }
}
@media (max-width: 760px) {
  .rk-navlinks--anchors { display: none; }
  .rk-final::before { -webkit-mask-image: linear-gradient(180deg, #000, transparent 40%); mask-image: linear-gradient(180deg, #000, transparent 40%); }
  .rk-nav { padding: 0 16px; }
  .rk-benefits { grid-template-columns: minmax(0, 1fr); }
  .rk-final { flex-direction: column-reverse; align-items: flex-start; padding: 36px 24px 32px; border-radius: 28px; }
  .rk-final-art { width: 140px; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .rk-wrap, .rk-narrow { padding: 0 16px; }
  .rk-sec { padding: 48px 0; }
  .rk-hero { padding: 16px 0 44px; }
  .rk-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 28px; }
  .rk-steps li { padding: 20px 20px 22px; }
  .rk-steps li::before { font-size: 32px; margin-bottom: 12px; }
  .rk-benefit { padding: 26px 22px 28px; border-radius: 24px; }
  .rk-benefit--mascot { flex-direction: column-reverse; align-items: flex-start; }
  .rk-benefit-art { width: 96px; height: 96px; align-self: flex-end; margin-bottom: -6px; }
  .rk-benefits { margin-top: 28px; }
  .rk-show-head { margin-bottom: 28px; }
  .rk-example { margin-top: 28px; }
  .rk-block:nth-child(1) { padding: 20px; }
  .rk-item { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .rk-item .rk-btn { width: 100%; }
  .rk-phone { --s: .76; }
  .rk-phone--show { --s: .76; }
  .rk-final { padding: 32px 22px 28px; }
  /* Панель стоит над краем экрана; подвал получает отступ по ее высоте, чтобы не оказаться под ней. */
  .rk-dock { display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--glass); border-top: 1px solid var(--line-soft); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .rk-dock { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  }
  .rk-home .rk-footer { padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 400px) {
  .rk-nav { gap: 10px; }
  .rk-brand { gap: 8px; font-size: 16px; }
  .rk-dl--header { padding: 0 12px; font-size: 13px; }
}
@media (max-width: 380px) {
  .rk-phone, .rk-phone--show { --s: .72; }
}

/* ---------------------------------------------------------------- появление при прокрутке: только где поддержан animation-timeline, иначе все видно сразу */
@keyframes rk-reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rk-dock-in { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rk-reveal { animation: rk-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .rk-dock { animation: rk-dock-in linear both; animation-timeline: scroll(root block); animation-range: 280px 520px; }
  }
}

/* ---------------------------------------------------------------- без движения: ни анимаций, ни переходов, ни плавной прокрутки */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
