/* v5 (2026-11-05): 3 tariffs, livelier cards, 4 payment methods with «скоро», language switcher, install dialog, RTL. */
:root { --v5-tq: #3ff2e5; --v5-tq2: #00c2e0; --v5-gold: #ffd479; --v5-violet: #9b8cff; }

/* ---- header: language + install chips ---- */
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.lang-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding-inline: 10px 6px; cursor: pointer; }
.lang-chip select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; padding: 0 16px 0 0; cursor: pointer; outline: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 6px center, right 2px center; background-size: 4px 4px; background-repeat: no-repeat; }
[dir="rtl"] .lang-chip select { padding: 0 0 0 16px; background-position: left 2px center, left 6px center; }
.lang-chip select option { background: #0b1214; color: #eef2f4; }
.lang-chip:focus-within { box-shadow: 0 0 0 2px #3ff2e566; }
.chip-install { background: linear-gradient(135deg, #3ff2e522, #00c2e014); border-color: #3ff2e555 !important; }
.chip-install .ic { color: var(--v5-tq); }

/* ---- tariffs grid: exactly 3 ---- */
html .pricing-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 16px !important; max-width: 1040px; margin: 0 auto !important; padding: 18px 0 4px !important; overflow: visible !important; align-items: stretch; }
@media (max-width: 860px) { html .pricing-grid { grid-template-columns: 1fr !important; max-width: 520px; } }
.pricing-card { position: relative; display: flex !important; flex-direction: column; border-radius: 24px !important; isolation: isolate;
  background: radial-gradient(120% 80% at 0% 0%, #17343a66, transparent 60%), linear-gradient(180deg, #0f1719f2, #0a0f11f2) !important;
  border: 1px solid #ffffff17 !important; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s !important; }
.pricing-card:hover { transform: translateY(-4px); border-color: #3ff2e54d !important; box-shadow: 0 18px 40px -18px #000, 0 0 0 1px #3ff2e522; }
.pricing-card .plan-features { flex: 1; }
.pricing-card .plan-buy { margin-top: auto; width: 100%; min-height: 48px; border-radius: 14px; font-weight: 700; letter-spacing: .01em; transition: transform .15s, box-shadow .2s, filter .2s; }
.pricing-card .plan-buy:not(:disabled):active { transform: scale(.98); }
.pricing-card .plan-price { font-size: clamp(30px, 4.2vw, 40px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pricing-card .plan-meta span { border-radius: 999px; padding: 3px 10px; background: #ffffff0d; border: 1px solid #ffffff14; font-size: 12.5px; }
.pricing-card .plan-crown { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #3ff2e51a; color: var(--v5-tq); box-shadow: inset 0 0 0 1px #3ff2e533; }
.pricing-card .plan-top { display: flex; align-items: center; gap: 12px; }
.pricing-card .plan-top h2 { margin: 0; font-size: 22px; }
.pricing-card .plan-features li .ic { color: var(--v5-tq); }

/* trial: calm, gift accent */
.trial-card .plan-crown { background: #ffd4791a !important; color: var(--v5-gold) !important; box-shadow: inset 0 0 0 1px #ffd47933 !important; }
.trial-card .plan-buy { background: transparent; border: 1px solid #ffd47966; color: #ffe7b0; }
.trial-card .plan-buy:not(:disabled):hover { background: #ffd4791a; }

/* «Свобода»: the hero — animated gradient border + glow */
.plan-freedom { border-color: transparent !important; box-shadow: 0 24px 60px -24px #00c2e099, 0 0 0 1px #3ff2e540; }
.plan-freedom::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--v5-a, 0deg), #3ff2e5, #00c2e0, #9b8cff, #3ff2e5);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: v5spin 6s linear infinite; }
@property --v5-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes v5spin { to { --v5-a: 360deg; } }
.plan-freedom .plan-price { background: linear-gradient(135deg, #fff, #8ffcf3 60%, #00c2e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-freedom .plan-buy:not(:disabled) { background: linear-gradient(135deg, #3ff2e5, #00c2e0); color: #022126; border: 0; box-shadow: 0 10px 28px -10px #00c2e0cc; }
.plan-freedom .plan-buy:not(:disabled):hover { filter: brightness(1.08); }
.plan-freedom .pop-badge { position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #022126; background: linear-gradient(135deg, #ffe7a3, #ffd479); box-shadow: 0 6px 18px -6px #ffd479aa; }
[dir="rtl"] .plan-freedom .pop-badge { transform: translateX(50%); }
@media (min-width: 861px) { .plan-freedom { transform: translateY(-8px) scale(1.02); } .plan-freedom:hover { transform: translateY(-12px) scale(1.02); } }

/* «Свой путь»: violet accent, links to the constructor */
.plan-own .plan-crown { background: #9b8cff1f !important; color: var(--v5-violet) !important; box-shadow: inset 0 0 0 1px #9b8cff40 !important; }
.plan-own .plan-features li .ic { color: var(--v5-violet); }
.plan-own .plan-buy { background: #9b8cff1f; border: 1px solid #9b8cff66; color: #e4e0ff; }
.plan-own .plan-buy:hover { background: #9b8cff33; }
.plan-own .plan-price { color: #e4e0ff; }

.sell-note { max-width: 760px; margin-inline: auto; }

/* ---- payment methods: 4 pills, «скоро» tag ---- */
.pricing-providers { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .pricing-providers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.provider-choice { position: relative; display: flex !important; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px !important; border-radius: 14px; border: 1px solid #ffffff1a; background: #ffffff08; cursor: pointer; transition: border-color .2s, background .2s; }
.provider-choice input { position: absolute; opacity: 0; pointer-events: none; }
.provider-choice:has(input:checked) { border-color: #3ff2e5; background: #3ff2e514; box-shadow: 0 0 0 1px #3ff2e555 inset; }
.provider-choice small { opacity: .7; font-size: 12px; }
.provider-choice.is-soon { opacity: .62; }
.provider-choice .soon-tag { position: absolute; top: 8px; inset-inline-end: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: #ffd4791f; color: #ffd479; }
.payment-message.is-soon { color: #ffd479; animation: v5pulse .6s ease 2; }
@keyframes v5pulse { 50% { transform: translateX(3px); } }

/* ---- constructor ---- */
.presets { display: flex !important; flex-wrap: wrap; gap: 8px; }
.presets .preset { min-width: 52px; justify-content: center; text-align: center; }
.presets .preset b { font-size: 18px; }
.sum-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: #3ff2e512; border: 1px dashed #3ff2e555; font-size: 14px; }
.sum-hint[hidden] { display: none; }
.sum-hint .ic { color: var(--v5-tq); flex: none; }
.sum-hint span { flex: 1; min-width: 180px; }

/* ---- install dialog ---- */
.install-os { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #ffffff14; background: #ffffff06; }
.install-os h3 { margin: 0 0 6px; font-size: 15px; }
.install-os ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.install-os.is-mine { border-color: #3ff2e566; background: #3ff2e50f; order: -1; }
#installDialog { display: none; }
#installDialog[open] { display: flex; flex-direction: column; }
#installDialog > .dlg-x, #installDialog > h2, #installDialog > p.muted { order: -2; }

/* ---- RTL ---- */
[dir="rtl"] body { font-family: Vazirmatn, Tahoma, "Segoe UI", system-ui, sans-serif; }
[dir="rtl"] .safety-cta-go { transform: scaleX(-1); }
[dir="rtl"] .sub-url, [dir="rtl"] #subUrl, [dir="rtl"] input[type="url"], [dir="rtl"] .code { direction: ltr; text-align: left; }
@media (prefers-reduced-motion: reduce) { .plan-freedom::before { animation: none; } .pricing-card { transition: none !important; } }

/* v5 fix: neutralise the v4 "layout a" trial strip + subgrid so the 3 tariffs are equal cards: trial · Свобода · Свой путь */
html[data-layout] #plansGrid > .pricing-card, html #plansGrid > .pricing-card { grid-column: auto !important; grid-row: auto !important; order: 0 !important; display: flex !important; flex-direction: column !important; margin-top: 0 !important; padding: 22px 20px 20px !important; grid-template-rows: none !important; }
html #plansGrid > .trial-card { order: -1 !important; }
html #plansGrid > .pricing-card > * { grid-area: auto !important; }
html #plansGrid .trial-card .plan-price, html #plansGrid .trial-card .plan-price-caption, html #plansGrid .is-popular .plan-price { text-align: left !important; align-self: auto !important; }
html #plansGrid .trial-card .plan-price-caption { display: block !important; white-space: normal !important; }
html #plansGrid .trial-card .plan-features { display: grid !important; }
html #plansGrid .pricing-card .plan-meta { flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; margin: 10px 0 !important; }
html #plansGrid .pricing-card .plan-meta span + span::before { content: none !important; }
html #plansGrid .pricing-card .plan-buy { margin-top: auto !important; }
html #plansGrid .pricing-card .plan-features { margin-bottom: 18px; }
.trial-card .plan-buy:not(:disabled), .trial-card:hover .trial-btn:not(:disabled) { background: linear-gradient(105deg, #ffe27a, #ffa83a) !important; border: 0 !important; color: #2a1700 !important; -webkit-text-fill-color: #2a1700 !important; }
.trial-card .plan-buy:disabled { background: #ffd4790f !important; color: #d9cdb0 !important; -webkit-text-fill-color: #d9cdb0 !important; }
/* v5 RTL fix: off-screen helpers (left:-9999px honeypot / skip links) widened the page to ~10 000 px in RTL → mobile zoomed out to a blank screen */
html[dir="rtl"] .hp, html[dir="rtl"] .honeypot, html[dir="rtl"] [class*="visually-hidden"], html[dir="rtl"] .sr-only { left: auto !important; right: -9999px !important; }
html[dir="rtl"], html[dir="rtl"] body { overflow-x: clip; }
/* provider pill: keep the «скоро» tag from overlapping long names */
.provider-choice .soon-tag { top: -9px !important; inset-inline-end: 6px !important; }
