/* RSSVpn — site.css: layout for the public pages only (shared components live in ui.css). */

/* skeleton sizes */
.sk-w40 { width: 40%; }
.sk-w60 { width: 60%; }
.sk-w80 { width: 80%; }
.sk-lg { height: 28px; }

/* hero */
.hero { padding-top: 40px; }
.hero-grid { display: grid; gap: 32px; }
.hero-text h1 { text-wrap: balance; }
.narrow { max-width: 720px; }
@media (max-width: 479px) { .nav-extra { display: none; } }
.hero-text .lead { margin-top: 16px; max-width: 34em; }
.hero-actions { margin-top: 24px; }
.hero-actions .btn { flex: 1 1 auto; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.facts li { background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.fact-title { font-weight: 650; }
.fact-text { font-size: 14px; line-height: 20px; color: var(--muted); }
@media (min-width: 560px) { .hero-actions .btn { flex: 0 0 auto; } }
@media (min-width: 900px) {
  .hero { padding-top: 72px; padding-bottom: 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 56px; }
  .facts li { padding: 24px; }
}

/* plans: rows on phones, cards from 720px */
.plans { display: grid; gap: 8px; }
.plan {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px;
  padding: 16px; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .12s ease;
}
button.plan:hover { border-color: var(--accent); }
.plan-title { font-weight: 650; font-size: 17px; }
.plan-meta { grid-column: 1; font-size: 14px; line-height: 20px; color: var(--muted); }
.plan-price { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.plan-price b { display: block; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: 13px; color: var(--muted); }
.plan-cta { display: none; }
.plan-skeleton { cursor: default; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 720px) {
  .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .plan { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 24px; min-height: 236px; }
  .plan-price { text-align: left; margin-top: 8px; }
  .plan-price b { font-size: 30px; line-height: 36px; }
  .plan-meta { margin-top: auto; }
  .plan-cta { display: flex; margin-top: 16px; pointer-events: none; }
  button.plan:hover .plan-cta { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
}
.plans .alert { grid-column: 1 / -1; }

.bot-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.bot-note-text { flex: 1 1 280px; }
.bot-note p { margin-top: 4px; }

/* how it works */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.how li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.how h3 { align-self: center; }
.how p { margin: 0; grid-column: 2; }
@media (min-width: 768px) { .how li { display: block; padding: 24px; } .how h3 { margin: 16px 0 8px; } }
.how-num { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 650; color: var(--accent); background: var(--accent-weak); }
@media (min-width: 768px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.support-card { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.support-card p { margin-top: 8px; }
@media (min-width: 640px) { .support-card { flex-direction: row; align-items: center; justify-content: space-between; } }

/* checkout dialog */
.checkout-plan { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.checkout-price { font-size: 22px; font-weight: 700; white-space: nowrap; }
.promo-toggle { margin-left: -12px; color: var(--accent); }
.promo-toggle[aria-expanded="true"] { display: none; }

/* order page */
.order-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.order-head h1 { font-size: 26px; line-height: 32px; }
.order-head p { margin-top: 4px; }
@media (min-width: 768px) { .order-head h1 { font-size: 32px; line-height: 40px; } }
.pay-box { margin-top: 24px; }
.pay-box .hint { margin-top: 12px; }
.status-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.status-line .status-text { flex: 1 1 200px; display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 15px; }
.order-id { font-family: var(--mono); font-size: 14px; }
.after-card { margin-top: 16px; }

.key-card { display: grid; gap: 24px; }
.key-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.key-actions .btn { flex: 1 1 100%; }
.key-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 24px; border-top: 1px solid var(--border); }
@media (min-width: 560px) { .key-actions .btn { flex: 0 0 auto; } }
@media (min-width: 768px) {
  .key-card { grid-template-columns: 232px minmax(0, 1fr); gap: 32px; align-items: start; }
  .key-qr { order: -1; padding-top: 0; border-top: 0; }
}
.key-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--text-2); }
.key-facts b { color: var(--text); font-weight: 600; }

/* «для чайников» guide: tabs, 3 big numbered steps with a picture, «Не работает?» */
.guide-card > h2 { margin-bottom: 16px; }
.guide-ask { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.guide-tabs { margin-bottom: 8px; }
.guide-tabs .tab { min-height: 44px; font-size: 16px; }
.guide-tabs .tab[aria-selected="true"] { border-color: var(--accent); color: var(--accent); font-weight: 650; }
/* the static guide of /help (no JS): one section per device, reached by #android etc. under the sticky header */
.guide-static-platform { scroll-margin-top: 128px; }
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gstep { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.gstep-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gstep-head { display: flex; align-items: flex-start; gap: 12px; }
.gstep-head .gstep-text { padding-top: 5px; min-width: 0; overflow-wrap: anywhere; }
.gstep-text a { overflow-wrap: anywhere; }
.gstep-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--accent-text); background: var(--accent);
}
.gstep-text { font-size: 19px; line-height: 28px; margin: 0; color: var(--text); }
.gstep-note { font-size: 16px; line-height: 24px; margin: 0; color: var(--text-2); }
.gstep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gstep-actions .btn { flex: 1 1 auto; }
.gpic { display: flex; justify-content: center; }
.gpic img { width: 100%; max-width: 320px; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.gpic .gpic-dark { display: none; }
:root[data-theme="dark"] .gpic .gpic-dark { display: block; }
:root[data-theme="dark"] .gpic .gpic-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gpic .gpic-dark { display: block; }
  :root:not([data-theme="light"]) .gpic .gpic-light { display: none; }
}
@media (min-width: 560px) { .gstep-actions .btn { flex: 0 0 auto; } }
@media (min-width: 720px) {
  .gstep { grid-template-columns: minmax(0, 1fr) 240px; align-items: center; padding: 24px; gap: 24px; }
  .guide-compact .gstep { grid-template-columns: minmax(0, 1fr) 180px; }
}
/* compact (order / my page): smaller pictures on phones so the 3 steps stay short */
@media (max-width: 719px) { .guide-compact .gpic img { max-width: 200px; } }

.trouble { margin-top: 24px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.trouble-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.trouble-head .gpic img { max-width: 128px; }
.trouble-title { font-size: 22px; line-height: 28px; }
.trouble-list a { overflow-wrap: anywhere; }
.trouble-list { margin: 12px 0 0; padding-left: 28px; display: grid; gap: 12px; font-size: 18px; line-height: 27px; }
.trouble-list li::marker { font-weight: 700; color: var(--accent); }
.refresh-sign { display: inline-block; min-width: 28px; padding: 0 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border-strong); text-align: center; font-weight: 700; }
@media (min-width: 720px) { .trouble { padding: 24px; } .trouble-head .gpic img { max-width: 160px; } }

/* my page */
.saved { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.saved .btn { font-family: var(--mono); font-size: 13px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.renew-plans { display: grid; gap: 8px; }
.renew-plan { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.renew-plan:hover { border-color: var(--border-strong); }
.renew-plan input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.renew-plan .rp-title { flex: 1 1 auto; font-weight: 550; }
.renew-plan .rp-price { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.renew-plan:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }
@media (min-width: 640px) { .renew-plans { grid-template-columns: 1fr 1fr; } }

/* connect page */
@media (max-width: 479px) {
  .guide-tabs { flex-wrap: wrap; }
  .guide-tabs .tab { flex: 1 1 calc(50% - 4px); }
}

/* ---------- RSSVpn: footer with columns ---------- */
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; min-width: 0; }
.footer-col a { color: var(--text-2); }
.footer-h { font-weight: 650; color: var(--text); }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; max-width: 320px; }
}

/* phones: the 4 header links fit in one line at 360-420 px */
@media (max-width: 419px) { .nav a { padding: 6px 6px; font-size: 14px; } }

/* ---------- breadcrumbs, text pages ---------- */
.crumbs { margin-bottom: 16px; font-size: 14px; line-height: 20px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--border-strong); }
.crumbs a { color: var(--text-2); }
.page-head { margin-bottom: 32px; }
.page-head h1 { text-wrap: balance; }
.page-head .lead { margin-top: 12px; max-width: 40em; }
.page-block + .page-block { margin-top: 48px; }
.page-block > h2 { margin-bottom: 16px; }
.prose { max-width: 720px; }
.prose > h2 { margin: 40px 0 12px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: var(--text-2); }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .steps { margin-bottom: 16px; }
.prose .steps > li { color: var(--text-2); }
.note { padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.cta-row { margin-top: 24px; }
.updated { margin-top: 32px; }
.choice { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.choice li { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.choice b { display: block; margin-bottom: 4px; color: var(--text); }
@media (min-width: 768px) { .choice { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.err-code { font-size: 64px; line-height: 72px; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }

/* ---------- apps block (apps.js): Luma VPN → Happ → Aura VPN ---------- */
.apps-tabs { margin-bottom: 0; }
.apps-tabs .tab { min-height: 44px; font-size: 16px; }
.apps-tabs .tab[aria-selected="true"] { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.apps-note { margin: 12px 0 0; }
.tabpanel > .apps-note { margin: 0 0 16px; }
.app-list { display: grid; gap: 16px; }
.app-list + .apps-note { margin-top: 16px; }
@media (min-width: 900px) {
  .app-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-list.is-single { grid-template-columns: minmax(0, 1fr); }
}
.app-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.app-card.is-rec { border-color: var(--accent); }
@media (min-width: 768px) { .app-card { padding: 24px; } }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; }
.app-name { flex: 1 1 auto; min-width: 0; }
.app-title { font-size: 18px; line-height: 24px; }
.app-by { font-size: 13px; line-height: 18px; color: var(--muted); }
.app-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.app-badge { flex: none; }
.badge-bonus { background: var(--ok-weak); color: var(--ok); border-color: transparent; }
.app-tagline { margin: 0; color: var(--text-2); }
.app-bonus-note { margin: 0; padding: 8px 12px; font-size: 14px; line-height: 20px; color: var(--text-2); background: var(--ok-weak); border-radius: var(--radius-sm); }
.app-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.app-actions .btn { white-space: normal; text-align: center; }
.app-meta { font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.app-soon { padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--muted); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.app-more { font-size: 14px; line-height: 20px; }
.app-sum summary { cursor: pointer; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.app-sum code { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--text-2); overflow-wrap: anywhere; word-break: break-all; }
.app-rows { display: grid; }
.app-row { display: grid; gap: 8px; padding: 16px 0 0; margin-top: 4px; border-top: 1px solid var(--border); }
.app-row-name { font-weight: 650; }
@media (min-width: 640px) {
  .app-row { grid-template-columns: 160px minmax(0, 1fr); align-items: start; }
  .app-row .app-actions { max-width: 360px; }
  .app-row .app-meta, .app-row .app-sum summary { text-align: left; }
  .app-row-name { padding-top: 8px; }
}
.apps-static .app-actions { margin-top: 0; }
.key-apps > p { margin-top: 4px; }
.key-apps .apps { margin-top: 16px; }
