/* Отдельные страницы сайта: /releases/, /plus/buy/, /account/. Токены и шапка - из styles.css. */
.page { padding: 64px 0 96px; }
.page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; margin: 10px 0 14px; }
/* Как на главной: первая часть заголовка обычным цветом, акцентная - последняя, с тем же переливом. */
.page h1 span { color: var(--ink); }
.page h1 span:last-child:not(:first-child) { display: block; width: fit-content; background: var(--accent-gradient); background-size: 200% 200%; color: transparent;
  -webkit-background-clip: text; background-clip: text; animation: accent-flow 12s ease-in-out infinite alternate; }
.page-intro { color: var(--muted); font-size: 1.125rem; max-width: 640px; margin: 0; }
.page-back { margin-top: 48px; }
.page-back .text-link { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 600; gap: 14px; padding: 8px 0; letter-spacing: -.02em; }
.page-back .text-link svg { transform: rotate(180deg); width: 26px; height: 26px; }
.page-back .text-link:hover svg { transform: rotate(180deg) translateX(3px); }

/* список версий (релизы и кабинет) */
.release-tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 36px 0 8px; border-radius: 999px; background: var(--pill-track); }
.release-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 18px; background: transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.release-tabs button svg { width: 18px; height: 18px; }
.release-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pill); }
.release-list { list-style: none; padding: 0; margin: 18px 0 0; }
.release-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); }
.release-row:last-child { border-bottom: 1px solid var(--line); }
.release-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; }
.release-badge { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.release-meta { color: var(--muted); font-size: .9375rem; margin-top: 4px; }
.release-notes { grid-column: 1 / -1; margin: 4px 0 0; color: var(--ink); font-size: .9375rem; line-height: 1.6; white-space: pre-line; }
.release-row .button { white-space: nowrap; }
.release-row .button svg { width: 18px; height: 18px; }
.page-state { padding: 28px 0; color: var(--muted); }

/* карточки и формы (покупка, кабинет) */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: start; margin-top: 8px; }
.card { padding: 30px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-card); }
.card h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; text-transform: none; }
.card > p { color: var(--muted); font-size: .9375rem; line-height: 1.6; margin: 0; }
.card.warm { background: var(--tint-warm); box-shadow: none; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 2px; }
.price b { font-size: 3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.price .price-usd { color: var(--muted); font-size: 1.0625rem; }
.price-note { color: var(--muted); font-size: .9375rem; }
.field { display: grid; gap: 7px; margin-top: 20px; font-size: .875rem; font-weight: 500; color: var(--ink-soft); }
/* Поля без рамки: заливка чуть глубже карточки. */
.field input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.0625rem; font-weight: 400; color: var(--ink); padding: 15px 18px; border-radius: 14px; border: 0; background: var(--surface-sunken); caret-color: var(--accent); transition: background 150ms, box-shadow 150ms; }
.field input::placeholder { color: var(--muted-2); }
.field input:hover { background: linear-gradient(var(--pill-track), var(--pill-track)) var(--surface-sunken); }
/* Фокус без обводки: поле чуть светлее/темнее, видно курсор. */
.field input:focus { outline: none; box-shadow: none; background: linear-gradient(var(--track), var(--track)) var(--surface-sunken); }
/* автозаполнение Chrome красит поле в свой цвет - возвращаем наш */
.field input:-webkit-autofill, .field input:-webkit-autofill:hover, .field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--surface-sunken) inset; transition: background-color 9999s; }

/* Основная кнопка форм в тёмной теме - белая, без градиента. */
:root[data-theme="dark"] .card .button-dark { background: #f2f2f0; color: #121212; animation: none; }
:root[data-theme="dark"] .card .button-dark:hover { background: #fff; }
.field-hint { font-size: .8125rem; font-weight: 400; color: var(--muted); line-height: 1.5; }
.form-actions { display: grid; gap: 12px; margin-top: 22px; }
.form-actions .button { width: 100%; justify-content: center; }
.form-error { min-height: 1.4em; margin: 10px 0 0; color: var(--accent-red); font-size: .9375rem; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; font-size: .9375rem; }
.form-links a, .link-button { color: var(--accent-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-underline); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.form-links a:hover, .link-button:hover { text-decoration-color: currentColor; }
.button[disabled] { opacity: .6; cursor: progress; }
#buy-submit[disabled] { opacity: .45; cursor: not-allowed; }
.buy-soon { margin: 10px 0 0; color: var(--muted); font-size: .9375rem; font-weight: 600; text-align: center; }
.buy-soon[hidden] { display: none; }
.fine { color: var(--muted); font-size: .8125rem; line-height: 1.55; margin-top: 16px; }

.check-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; font-size: 1.0625rem; line-height: 1.5; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); flex-shrink: 0; }
.check-list b { font-weight: 600; }
.check-list span { color: var(--muted); }

/* статус заказа */
.status-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; margin-bottom: 18px; background: var(--tint-warm); color: var(--accent-red); }
.status-icon svg { width: 28px; height: 28px; }
.status-icon.ok { background: rgba(45, 138, 95, .14); color: #2d8a5f; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: rg-spin .9s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }

/* кабинет: слева карточка Plus, выход и помощь, справа покупка и скачивание.
   Карточка Plus инверсная, как баннер на странице покупки (общие стили - у .plus-hero ниже). */
.acc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.acc-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.acc-left { position: sticky; top: 24px; display: grid; gap: 18px; }
.acc-right { display: grid; gap: 18px; min-width: 0; }
.acc-pass { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 300px; padding: 30px; border-radius: 30px; }
.acc-pass.off { filter: grayscale(1); opacity: .8; }
.acc-pass-plan { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--ph-muted); }
.acc-pass-big { margin: 0; font-size: 2.75rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; color: var(--ph-ink); }
.acc-pass-foot { display: grid; gap: 18px; }
.acc-pass-rows { margin: 0; display: grid; gap: 14px; }
.acc-pass-row { padding-top: 14px; border-top: 1px solid var(--ph-line); }
.acc-pass-row dt { margin: 0 0 2px; color: var(--ph-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.acc-pass-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* Выход - внутри карточки Plus и в её цветах (плашка из --ph-tile, текст --ph-ink). */
.acc-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; border: 0; border-radius: 16px; background: var(--ph-tile); color: var(--ph-ink); font: inherit; font-weight: 500; text-align: left; transition: background .15s; }
.acc-out svg { width: 20px; height: 20px; }
.acc-out:hover { background: var(--ph-line); }

/* Покупка: плоская плашка в цвете акцента, без градиентов, свечения и теней. */
.acc-buy { padding: 24px 28px; border-radius: 26px; background: var(--accent-tint-1); border: 1px solid var(--accent-tint-3); }
.acc-buy-label { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.acc-orders { list-style: none; margin: 14px 0 0; padding: 0; }
.acc-order { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--accent-tint-3); }
.acc-order:first-child { border-top: 0; padding-top: 0; }
.acc-order:last-child { padding-bottom: 0; }
.acc-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--accent); color: #fff; }
.acc-mark svg { width: 22px; height: 22px; }
.acc-order.refunded .acc-mark { background: var(--pill-track); color: var(--muted); }
.acc-order b { display: block; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.acc-order > div:first-child span { color: var(--muted); font-size: .9375rem; }
.acc-order-r { display: grid; justify-items: end; gap: 6px; }
.acc-sum { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.acc-status { padding: 3px 11px; border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.acc-status.paid { background: var(--accent-tint-3); color: var(--accent-strong); }
.acc-status.refunded { background: var(--pill-track); color: var(--muted); }

/* Скачивание: Windows (сборка Plus, с прошлыми версиями) и телефон (приложение для Android). */
.acc-dl { padding: 30px; }
.acc-dl > h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.acc-plats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.acc-plat.wide { grid-column: 1 / -1; }
.acc-plat.wide .acc-actions { max-width: 320px; }
.acc-plat { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 22px; background: var(--surface-sunken); }
.acc-plat-head { display: flex; align-items: center; gap: 14px; }
.acc-tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--tint-warm); color: var(--accent-red); flex-shrink: 0; }
.acc-tile svg { width: 24px; height: 24px; }
.acc-plat-head h3 { margin: 0; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; text-transform: none; }
.acc-plat-head p { margin: 2px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.acc-ver { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.acc-meta { margin-top: -8px; color: var(--muted); font-size: .9375rem; }
.acc-notes-t { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acc-notes { margin: 4px 0 0; font-size: .9375rem; line-height: 1.6; white-space: pre-line; }
.acc-empty { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.acc-empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.acc-actions { display: grid; gap: 10px; margin-top: auto; }
.acc-actions .button { width: 100%; }
.acc-old { margin-top: 16px; }
.acc-old > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-radius: 16px; background: var(--surface-sunken); color: var(--ink); font-size: 1rem; font-weight: 600; list-style: none; }
.acc-old > summary:hover { background: var(--pill-track); }
.acc-old > summary::-webkit-details-marker { display: none; }
.acc-old > summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
/* селектор усилен: в styles.css общее правило details[open] > summary svg крутит значок FAQ на 45° */
.acc-old[open] > summary:not([aria-expanded=false]) svg { transform: rotate(180deg); }
.acc-old .release-list { margin-top: 6px; padding: 0 4px; }
.acc-old .release-row { padding: 14px 0; }
.acc-old .release-name { font-size: 1rem; }
.acc-how { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .acc-grid { grid-template-columns: 320px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 860px) {
  .page-grid { grid-template-columns: 1fr; gap: 28px; }
  /* Телефон: за карточкой Plus сразу покупка и скачивание, помощь - после них. */
  .acc-grid { grid-template-columns: 1fr; gap: 18px; }
  .acc-left { display: contents; }
  .acc-pass { order: 1; }
  .acc-right { order: 2; }
  .acc-help { order: 3; }
}
@media (max-width: 560px) {
  .page { padding: 40px 0 64px; }
  .card { padding: 22px; border-radius: 22px; }
  .price b { font-size: 2.5rem; }
  .release-row { grid-template-columns: 1fr; }
  .release-row .button { justify-self: start; }
  .acc-pass { min-height: 0; gap: 22px; padding: 24px; border-radius: 26px; }
  .acc-pass-big { font-size: 2.25rem; }
  .acc-buy { padding: 20px 22px; }
  .acc-sum { font-size: 1.5rem; }
  .acc-order { grid-template-columns: auto minmax(0, 1fr); }
  .acc-order-r { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .acc-dl { padding: 22px; }
  .acc-plat { padding: 18px; }
}

/* Баннер RuGrab Plus на странице покупки: инверсный, как на главной - чёрный в светлой теме,
   белый в тёмной. Сверху что это и цена, ниже шесть плиток «что даёт». */
.plus-hero, .acc-pass { --ph-bg: #141414; --ph-ink: #f5f5f3; --ph-muted: rgba(245, 245, 243, .66); --ph-line: rgba(245, 245, 243, .14); --ph-tile: rgba(245, 245, 243, .06);
  position: relative; overflow: hidden; background: var(--ph-bg); color: var(--ph-ink);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .5); }
.plus-hero { margin: 0 0 56px; padding: 40px; border-radius: 32px; }
/* На странице покупки баннер Plus идёт под формой оплаты, а не над ней. */
.page-grid + .plus-hero { margin: 56px 0 0; }
:root[data-theme="dark"] .plus-hero, :root[data-theme="dark"] .acc-pass { --ph-bg: #f5f5f3; --ph-ink: #141414; --ph-muted: rgba(20, 20, 20, .64); --ph-line: rgba(20, 20, 20, .12); --ph-tile: rgba(20, 20, 20, .045); }
.plus-hero::before, .acc-pass::before { content: ""; position: absolute; top: -160px; right: -120px; width: 460px; height: 460px; border-radius: 50%; background: var(--accent-gradient); opacity: .25; filter: blur(80px); pointer-events: none; }
:root[data-theme="dark"] .plus-hero::before, :root[data-theme="dark"] .acc-pass::before { opacity: .18; }
.plus-hero > *, .acc-pass > * { position: relative; }
.plus-hero-head { max-width: 760px; }
.plus-hero-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px; background: var(--ph-tile);
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; }
.plus-hero-title { margin: 0 0 12px; font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; text-transform: none; }
.plus-hero-text { max-width: 620px; margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--ph-muted); }
/* Таблица сравнения внутри .plus-hero — общие стили в styles.css (как у блока на главной). */

/* Как это работает: три шага вместо повторения списка возможностей. */
.buy-steps-title { margin: 22px 0 16px; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; text-transform: none; }
.buy-steps { list-style: none; counter-reset: step; display: grid; gap: 14px; margin: 0; padding: 0; }
.buy-steps li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.buy-steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--tint-warm); color: var(--accent-red); font-weight: 700; }
.buy-steps b { font-size: 1.0625rem; font-weight: 600; }
.buy-steps span { color: var(--muted); font-size: .9375rem; line-height: 1.5; }

@media (max-width: 720px) {
  .plus-hero { padding: 26px 20px; border-radius: 26px; }
  .page-grid + .plus-hero { margin-top: 40px; }
  .plus-hero .cmp th:nth-child(2), .plus-hero .cmp td:nth-child(2), .plus-hero .cmp th:nth-child(3), .plus-hero .cmp td:nth-child(3) { width: auto; }
}

/* Ссылки на документы: согласие под кнопкой оплаты и строка внизу кабинета. */
.legal-note { margin: 12px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.55; text-align: center; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 36px 0 0; font-size: .8125rem; color: var(--muted); }
.legal-note a, .legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-underline); }
.legal-note a:hover, .legal-links a:hover { color: var(--accent-red); text-decoration-color: currentColor; }

/* Юридические документы (/privacy/, /terms/): длинный текст с оглавлением, строка ~70 знаков. */
.legal-doc { max-width: 72ch; }
.legal-doc h1 { font-size: clamp(1.625rem, 4.4vw + .6rem, 3rem); overflow-wrap: break-word; }
.legal-edition { margin: 0; color: var(--muted); font-size: .9375rem; }
.legal-lang-note { margin: 22px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--tint-warm); color: var(--ink); font-size: .9375rem; line-height: 1.55; }
.legal-lang-note[hidden] { display: none; }
.legal-lead { margin: 28px 0 0; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); }
.legal-toc { margin: 32px 0 0; padding: 22px 26px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.legal-toc-title { margin: 0 0 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.legal-toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: .9375rem; line-height: 1.5; }
.legal-toc li::marker { color: var(--muted); }
.legal-doc a:not(.text-link) { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-underline); }
.legal-doc a:not(.text-link):hover { text-decoration-color: currentColor; }
.legal-doc section { scroll-margin-top: 24px; }
.legal-doc h2 { margin: 48px 0 14px; font-size: 1.5rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; text-transform: none; }
.legal-doc h3 { margin: 26px 0 8px; font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; text-transform: none; }
.legal-doc section p, .legal-doc section li { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.legal-doc section p { margin: 0 0 12px; }
.legal-doc section ul { margin: 0 0 14px; padding-left: 1.3em; display: grid; gap: 6px; }
.legal-doc section li::marker { color: var(--accent); }
.legal-doc b { font-weight: 600; }
/* Поля, которые владелец ещё должен заполнить. */
.legal-fill { padding: 1px 6px; border-radius: 6px; background: var(--accent-tint-2); color: var(--accent-strong); font-weight: 500; white-space: nowrap; }
.legal-card { margin: 8px 0 14px; padding: 18px 22px; border-radius: 18px; border: 1px solid var(--line); }
.legal-card p { margin: 0 0 6px !important; }
.legal-card p:last-child { margin-bottom: 0 !important; }
.legal-see { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
@media (max-width: 560px) {
  .legal-toc { padding: 18px 18px; border-radius: 18px; }
  .legal-doc h2 { margin-top: 40px; font-size: 1.3125rem; }
  .legal-doc section p, .legal-doc section li { font-size: 1rem; }
  .legal-fill { white-space: normal; }
}
