/* IronVPN — redesign (Claude)
   Premium dark theme. Plain modern CSS, no framework.
   All interactive hooks (data-* attributes, .is-selected, #checkout-form)
   are preserved so assets/app.js keeps working untouched. */

/* ------------------------------------------------------------------- fonts */
/* Manrope — modern geometric sans with full Cyrillic. Self-hosted (variable,
   one file per subset) so the site never depends on Google Fonts, which is
   unreliable from RU networks. font-display: swap avoids invisible text. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20BD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark; /* native controls, scrollbars, form widgets render dark */
  --bg: #070b0d;
  --bg-2: #0b1216;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --ink: #f2f7f6;
  --ink-soft: #aebcc0;
  --ink-faint: #7c8a8f;

  --accent: #19c08a;
  --accent-2: #0fa577;
  --accent-ink: #04130d;
  --accent-glow: rgba(25, 192, 138, 0.45);

  --gold: #f5b942;
  --danger: #ff6b6b;

  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 13px;

  --shadow-card: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 14px 36px -20px rgba(0, 0, 0, 0.8);

  --maxw: 1120px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------- light theme */
/* Toggled by [data-theme="light"] on <html> (set inline in <head>, switched
   by the header button). Most colors are token-driven, so we mainly redefine
   the tokens, then patch the few elements that used hardcoded dark values. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3f6;
  --bg-2: #ffffff;
  --surface: rgba(13, 45, 54, 0.04);
  --surface-2: #ffffff;
  --surface-strong: #ffffff;
  --border: rgba(11, 42, 51, 0.12);
  --border-strong: rgba(11, 42, 51, 0.20);
  --ink: #0a1c20;
  --ink-soft: #45585e;
  --ink-faint: #6c7e84;
  --accent: #07835c;
  --accent-2: #0a6f4f;
  --accent-ink: #ffffff;
  --accent-glow: rgba(7, 131, 92, 0.26);
  --danger: #d23a3a;
  --shadow-card: 0 22px 48px -30px rgba(26, 58, 68, 0.35);
  --shadow-soft: 0 14px 30px -22px rgba(26, 58, 68, 0.30);
}

/* light: patch elements that hardcoded dark/pale values */
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .plan-badge,
:root[data-theme="light"] .routing-tag {
  color: var(--accent);
  background: rgba(7, 131, 92, 0.10);
  border-color: rgba(7, 131, 92, 0.24);
}
:root[data-theme="light"] .plan-badge-save {
  color: #9a6a00;
  background: rgba(245, 185, 66, 0.18);
  border-color: rgba(184, 134, 11, 0.32);
}
:root[data-theme="light"] .plan.is-selected .plan-price { color: var(--accent); }
:root[data-theme="light"] .field input,
:root[data-theme="light"] .recover-form input,
:root[data-theme="light"] .routing-output {
  background: #f4f8f9;
  color: var(--ink);
}
:root[data-theme="light"] .field input:focus-visible,
:root[data-theme="light"] .recover-form input:focus-visible { background: #ffffff; }
:root[data-theme="light"] .sticky { background: rgba(255, 255, 255, 0.88); }

/* ---------------------------------------------------------- theme toggle */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 78px;
  height: 44px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.theme-toggle:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  border-radius: inherit;
  color: var(--ink-faint);
}
.theme-toggle-track svg { position: relative; z-index: 1; }
.theme-toggle-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}
:root[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(34px);
  background: #ffffff;
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.lead, p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

/* remove the 300ms tap delay and tame the mobile tap flash on controls */
a, button, summary, .plan, input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(25, 192, 138, 0.18);
}

/* heading anchors used by in-page links / skip-link / sticky CTA */
#buy-title, #flow-title, #apps-title { scroll-margin-top: 90px; }

/* visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------------- background */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.bg-decor::before,
.bg-decor::after { content: ""; position: absolute; inset: 0; transition: opacity 0.6s ease; }
.bg-decor::before {
  opacity: 1;
  background:
    radial-gradient(60% 50% at 78% -8%, rgba(25, 192, 138, 0.20), transparent 70%),
    radial-gradient(48% 42% at 8% 6%, rgba(56, 132, 255, 0.16), transparent 72%),
    radial-gradient(70% 60% at 50% 120%, rgba(25, 192, 138, 0.10), transparent 70%);
}
.bg-decor::after {
  opacity: 0;
  background:
    radial-gradient(60% 50% at 78% -8%, rgba(247, 134, 11, 0.22), transparent 70%),
    radial-gradient(48% 42% at 8% 6%, rgba(255, 86, 24, 0.15), transparent 72%),
    radial-gradient(70% 60% at 50% 120%, rgba(247, 134, 11, 0.12), transparent 70%);
}
:root[data-product="amneziawg"] .bg-decor::before { opacity: 0; }
:root[data-product="amneziawg"] .bg-decor::after { opacity: 1; }


/* ------------------------------------------------------------- skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  transition: transform 0.2s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ shell */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(16px, 4vw, 40px) calc(120px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 72px);
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  border-radius: 14px;
}

.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 22px -8px var(--accent-glow);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.brand-text span { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }

.bot-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.bot-link svg { color: var(--accent); }
.bot-link:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateY(-1px); }

/* ------------------------------------------------------------------ cards */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid;
  /* banner column (1fr) is the larger share, like the live site — ~62% width */
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
  /* bottom-align the two columns so the banner's bottom edge lines up exactly
     with the bottom of the CTA buttons */
  align-items: end;
  column-gap: clamp(24px, 3vw, 34px);
  row-gap: 22px;
}
.hero-copy { min-width: 0; } /* grid item must shrink to its column, not overflow */
.hero-trust { grid-column: 1 / -1; } /* full-width row below, under the CTA */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: rgba(25, 192, 138, 0.12);
  border: 1px solid rgba(25, 192, 138, 0.28);
  color: #7ff0c6;
  font-size: 13px;
  font-weight: 700;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(25, 192, 138, 0.25);
}

.hero-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.1px;
  overflow-wrap: break-word; /* never let a long word spill onto the banner */
  hyphens: none;
}
.hero-copy .lead {
  margin-top: 16px;
  max-width: 30em;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--ink-soft);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-trust {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-trust svg { color: var(--accent); flex: none; }

/* ------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 16px 34px -14px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 20px 42px -12px var(--accent-glow); transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateY(-1px); }

/* ------------------------------------------------------------ hero media */
.hero-media { position: relative; }

.hero-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--surface);
}
.hero-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.hero-track > [data-hero-slide] {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9; /* matches the 1672×941 banners — no cropping, text stays readable */
  object-fit: cover;
  user-select: none;
}

/* Arrows are hidden visually but kept functional: they act as invisible
   full-height click zones on the banner sides, and reveal on keyboard focus
   so they stay accessible. Swipe + dots remain the primary controls. */
.hero-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16%;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.hero-arrow svg {
  width: 26px;
  height: 26px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(7, 11, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-arrow:focus-visible { opacity: 1; }
.hero-arrow-prev { left: 0; justify-content: flex-start; padding-left: 12px; }
.hero-arrow-next { right: 0; justify-content: flex-end; padding-right: 12px; }

.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(7, 11, 13, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.hero-dots button[aria-current="true"] {
  width: 22px;
  border-radius: 999px;
  background: var(--accent);
}

/* ------------------------------------------------------------ buy panel */
.buy-panel {
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  scroll-margin-top: 24px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-stats span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.quick-stats b { font-size: clamp(18px, 2.4vw, 23px); font-weight: 800; letter-spacing: -0.5px; }
.quick-stats small { color: var(--ink-faint); font-size: 13px; font-weight: 600; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.label {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
}
.section-head h2 { margin-top: 6px; font-size: clamp(21px, 2.6vw, 27px); font-weight: 800; letter-spacing: -0.5px; }
.price-tag {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--accent);
  white-space: nowrap;
}

/* steady price/number widths so digits don't jiggle on update */
.price-tag, .plan-price, .quick-stats b, .sticky-info strong {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ plans */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 104px;
  padding: 16px 16px 15px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.plan:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.plan .plan-name { margin-top: auto; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.plan .plan-price { font-size: 21px; font-weight: 900; letter-spacing: -0.6px; }

.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(25, 192, 138, 0.16);
  color: #7ff0c6;
  border: 1px solid rgba(25, 192, 138, 0.3);
}
.plan-badge-save { background: rgba(245, 185, 66, 0.16); color: #ffd587; border-color: rgba(245, 185, 66, 0.32); }

.plan.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(25, 192, 138, 0.14), rgba(25, 192, 138, 0.05));
  box-shadow: 0 0 0 1px var(--accent), 0 18px 40px -22px var(--accent-glow);
}
.plan.is-selected .plan-price { color: #8af3cc; }

/* ------------------------------------------------------------- checkout */
.checkout { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.field input,
.recover-form input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px; /* >=16px avoids iOS zoom on focus */
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder,
.recover-form input::placeholder { color: var(--ink-faint); }
.field input:focus-visible,
.recover-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 0 0 4px rgba(25, 192, 138, 0.18);
}

.pay { width: 100%; min-height: 56px; font-size: 16px; margin-top: 2px; }

.form-note { color: var(--ink-faint); font-size: 13px; }
.form-error {
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.10);
  border: 1px solid rgba(255, 107, 107, 0.28);
}

body.is-busy { cursor: progress; }
body.is-busy .pay { opacity: 0.7; }

/* ------------------------------------------------------------ account */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.account-card {
  padding: clamp(20px, 2.6vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.account-card h2 { margin-top: 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.account-card p { color: var(--ink-soft); font-size: 14.5px; }
.account-card .btn { align-self: flex-start; }

.recover-form { display: flex; gap: 10px; flex-wrap: wrap; }
.recover-form input { flex: 1 1 200px; height: 48px; }
.recover-form .btn { flex: none; }
.form-note.is-error { color: var(--danger); font-weight: 700; }

/* ------------------------------------------------------------------ flow */
.flow-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: none;
}
.flow-step { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.flow-num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: rgba(25, 192, 138, 0.12);
  border: 1px solid rgba(25, 192, 138, 0.28);
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
}
.flow-step h3 { font-size: 17px; font-weight: 800; }
.flow-step p { color: var(--ink-soft); font-size: 14.5px; }

/* ------------------------------------------------------------------ apps */
.apps-box { overflow: hidden; }
.apps-box summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(18px, 2.4vw, 26px);
  font-weight: 800;
  font-size: 16px;
}
.apps-box summary::-webkit-details-marker { display: none; }
.apps-summary-text span { color: var(--ink-faint); font-weight: 600; font-size: 14px; margin-left: 6px; }
.apps-chevron { color: var(--ink-soft); transition: transform 0.25s ease; flex: none; }
.apps-box[open] .apps-chevron { transform: rotate(180deg); }

.app-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 clamp(18px, 2.4vw, 26px) clamp(18px, 2.4vw, 26px);
}
.app-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.app-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-faint);
  font-weight: 800;
}
.app-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14.5px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.app-group a::after { content: "→"; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity 0.16s ease, transform 0.16s ease; }
.app-group a:hover { background: var(--surface-strong); border-color: var(--border-strong); transform: translateX(2px); }
.app-group a:hover::after { opacity: 1; transform: translateX(0); }

/* --------------------------------------------------------- routing (RU direct) */
.routing {
  padding: 0;
  scroll-margin-top: 90px;
}
.routing-summary {
  align-items: center;
  padding: 20px clamp(18px, 2.4vw, 26px);
}
.routing-summary-title {
  display: grid;
  gap: 4px;
}
.routing-summary-title h2 {
  font-size: clamp(20px, 2.4vw, 26px);
}
.routing-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.routing-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 clamp(18px, 2.4vw, 26px) clamp(22px, 3vw, 34px);
}
.routing-tag {
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(25, 192, 138, 0.14);
  border: 1px solid rgba(25, 192, 138, 0.3);
  color: #7ff0c6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.routing-lead { color: var(--ink-soft); font-size: 15px; max-width: 64ch; }

.routing-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rstep;
  display: grid;
  gap: 10px;
}
.routing-steps li {
  counter-increment: rstep;
  position: relative;
  padding: 13px 16px 13px 52px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14.5px;
}
.routing-steps li::before {
  content: counter(rstep);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(25, 192, 138, 0.14);
  border: 1px solid rgba(25, 192, 138, 0.28);
  color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}

.routing-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.routing-actions .btn { flex: 1 1 200px; }

.routing-output {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink-soft);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
}
.routing-output:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(25, 192, 138, 0.18);
}

.routing-chips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.routing-chips li {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 14px;
}
.site-footer a { color: var(--ink-soft); font-weight: 700; }
.site-footer a:hover { color: var(--accent); }

/* ------------------------------------------------------------- sticky CTA */
.sticky {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: min(560px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 12px 12px 20px;
  border-radius: 18px;
  background: rgba(11, 18, 22, 0.82);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: sticky-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.sticky[hidden] { display: none; }
.sticky-info { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-info span { color: var(--ink-faint); font-size: 13px; font-weight: 600; }
.sticky-info strong { font-size: 19px; font-weight: 900; letter-spacing: -0.5px; }
.sticky .btn { min-height: 44px; padding: 0 26px; }

@keyframes sticky-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

@media (max-width: 680px) {
  .shell { padding-bottom: 110px; }
  .bot-link span:not(svg) { /* keep label */ }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .flow-list { grid-template-columns: 1fr; }
  .app-groups { grid-template-columns: 1fr; }
  .quick-stats { grid-template-columns: 1fr; }
  .quick-stats span { flex-direction: row; align-items: baseline; gap: 8px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 420px) {
  .topbar-actions { gap: 6px; }
  .theme-toggle { width: 70px; }
  :root[data-theme="light"] .theme-toggle-thumb { transform: translateX(26px); }
  .account-link { padding: 9px 10px; font-size: 11px; }
  .telegram-link { padding: 9px 11px; font-size: 0; gap: 0; }
  .telegram-link svg { font-size: initial; }
  .routing-summary-actions { gap: 7px; }
  .routing-tag { padding-inline: 9px; }
}

/* === AWG product theme + sliding selector (added for site+cabinet) === */
[hidden] { display: none !important; }

/* ------------------------------------------------ AmneziaWG product (orange) */
/* When AmneziaWG is selected, JS sets data-product="amneziawg" on <html>.
   We just swap the accent tokens → every green element recolors to orange,
   in both light and dark themes. Tints derive from --accent via color-mix. */
:root[data-product="amneziawg"] {
  --accent: #f7860b;
  --accent-2: #e06c00;
  --accent-ink: #1a0c00;
  --accent-glow: rgba(247, 134, 11, 0.45);
}
:root[data-theme="light"][data-product="amneziawg"] {
  --accent: #c2620a;
  --accent-2: #a8530a;
  --accent-ink: #ffffff;
  --accent-glow: rgba(194, 98, 10, 0.26);
}
/* recolor elements that hardcoded the green rgba → derive from accent instead */
:root[data-product="amneziawg"] .eyebrow,
:root[data-product="amneziawg"] .plan-badge:not(.plan-badge-save),
:root[data-product="amneziawg"] .routing-tag,
:root[data-product="amneziawg"] .status-pill {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
:root[data-product="amneziawg"] .eyebrow .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
:root[data-product="amneziawg"] .plan.is-selected {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
}
:root[data-product="amneziawg"] .plan.is-selected .plan-price,
:root[data-product="amneziawg"] .hero-trust svg { color: var(--accent); }
:root[data-product="amneziawg"] .flow-num,
:root[data-product="amneziawg"] .routing-steps li::before {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
/* smooth the green↔orange transition on the most visible accent surfaces */
.eyebrow, .plan, .price-tag, .label, .btn-primary, .mark, .flow-num, .status-pill {
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ------------------------------------------- VPN type chooser (two panels) */
/* Two big panels, 50/50 by default. Once the user picks (JS sets
   data-product-chosen on <html>), the selected side slides wider and the
   whole site recolors via the accent + bg crossfade. */
.type-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transition: grid-template-columns 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
:root[data-product-chosen][data-product="vless"] .type-choice { grid-template-columns: 1.75fr 1fr; }
:root[data-product-chosen][data-product="amneziawg"] .type-choice { grid-template-columns: 1fr 1.75fr; }

.type-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 138px;
  display: flex;
  padding: 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.type-card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.type-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  min-width: 0;
  width: 100%;
}
.type-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 6px;
  flex: none;
}
.type-icon svg { width: 22px; height: 22px; }
.type-name { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; white-space: nowrap; }
.type-desc {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
  max-width: 24ch;
  transition: opacity 0.35s ease;
}
.type-from {
  margin-top: auto;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
  transition: opacity 0.35s ease;
}
.type-from small { font-size: 12px; font-weight: 700; color: var(--ink-faint); margin-left: 2px; }

.type-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
  box-shadow: 0 0 0 1px var(--accent), 0 18px 44px -24px var(--accent-glow);
}
.type-check {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.type-check svg { width: 15px; height: 15px; }
.type-card.is-active .type-check { opacity: 1; transform: scale(1); }

/* when a panel is the shrunk (unselected) one, fade its secondary text out */
:root[data-product-chosen] .type-card:not(.is-active) .type-desc,
:root[data-product-chosen] .type-card:not(.is-active) .type-from { opacity: 0; }

@media (max-width: 560px) {
  .type-card { min-height: 116px; }
  .type-card-inner { padding: 15px 16px; }
  .type-name { font-size: 16px; }
  .type-desc { display: none; }
  :root[data-product-chosen][data-product="vless"] .type-choice { grid-template-columns: 1.5fr 1fr; }
  :root[data-product-chosen][data-product="amneziawg"] .type-choice { grid-template-columns: 1fr 1.5fr; }
}

/* ----------------------------------------------------- AWG advantages */
.awg-advantages {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.awg-advantages[hidden] { display: none; }
.awg-advantages h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.awg-advantages ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.awg-advantages li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.4;
}
.awg-advantages li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}


/* cabinet product switch (.account-products) — same slide + expand */
.account-products { transition: grid-template-columns 0.5s cubic-bezier(0.65,0,0.35,1); }
:root[data-product-chosen][data-product="vless"] .account-products { grid-template-columns: 1.6fr 1fr; }
:root[data-product-chosen][data-product="amneziawg"] .account-products { grid-template-columns: 1fr 1.6fr; }
.account-product { transition: border-color .3s ease, background .3s ease, box-shadow .3s ease, transform .2s ease; overflow: hidden; min-width: 0; }
:root[data-product-chosen] .account-product:not(.is-active) > span { opacity: 0; transition: opacity .3s ease; }

/* AWG advantages sit in a RIGHT column of the AmneziaWG card — revealed sideways
   on expand, so the card grows in width (via the slider), not in height. */
.type-choice { align-items: stretch; }
.type-card-inner.has-adv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0fr;
  gap: 0;
  align-items: stretch;
  transition: grid-template-columns 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.type-card-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.type-advantages {
  display: grid;
  gap: 9px;
  align-content: center;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  padding-left: 0;
  border-left: 0 solid transparent;
  transition: opacity 0.35s ease 0.1s, padding-left 0.4s ease;
}
.type-advantages > span {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.25;
  white-space: nowrap;
}
.type-advantages > span::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
:root[data-product-chosen][data-product="amneziawg"] .type-card.is-active .type-card-inner.has-adv {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}
:root[data-product-chosen][data-product="amneziawg"] .type-card.is-active .type-advantages {
  opacity: 1;
  padding-left: 22px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

/* netineta brand mark: NI monogram on a solid black tile (matches app icon) */
.brand .mark-ni,
:root[data-product] .brand .mark-ni {
  background: #000;
  padding: 0;
}
.mark-ni img {
  display: block;
  width: 30px;
  height: 30px;
}

/* AmneziaWG config QR (restored): shown next to the config after AWG purchase */
.config-qr {
  display: grid;
  grid-template-columns: minmax(180px, 248px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.config-qr-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
}
.config-qr-image:empty { display: none; }
.config-qr-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
}
.config-qr-content { display: grid; gap: 8px; }
.config-qr-content strong { color: var(--ink); font-size: 18px; font-weight: 900; }
.config-qr-content p { max-width: 42ch; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.config-qr.is-error { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .config-qr { grid-template-columns: 1fr; }
  .config-qr-image { width: min(100%, 280px); justify-self: center; }
  .config-qr-content { text-align: center; }
  .config-qr-content p { margin-inline: auto; }
}

/* ------------------------------------------------ mobile layout hardening */
@media (max-width: 680px) {
  .shell {
    width: 100%;
    padding: 14px 16px calc(106px + env(safe-area-inset-bottom));
    gap: 38px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 2px 0;
  }

  .brand {
    min-width: 0;
    flex: 1 1 180px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text strong,
  .brand-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .theme-toggle {
    width: 70px;
    height: 44px;
  }

  :root[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(26px);
  }

  .bot-link {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 9px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .telegram-link {
    width: 48px;
    padding: 0;
    font-size: 0;
  }

  .telegram-link svg {
    width: 20px;
    height: 20px;
  }

  .hero {
    row-gap: 20px;
  }

  .hero-copy h1 {
    margin-top: 14px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .hero-copy .lead {
    margin-top: 13px;
    max-width: none;
    font-size: 15px;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .hero-cta .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    text-align: center;
  }

  .hero-trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 0;
  }

  .hero-trust li {
    min-width: 0;
    font-size: 13px;
  }

  .hero-viewport {
    border-radius: 18px;
  }

  .hero-dots {
    bottom: 8px;
    gap: 6px;
    padding: 5px 8px;
  }

  .buy-panel {
    padding: 18px;
    gap: 18px;
    border-radius: 20px;
  }

  .type-choice,
  :root[data-product-chosen][data-product="vless"] .type-choice,
  :root[data-product-chosen][data-product="amneziawg"] .type-choice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .type-card {
    min-height: 132px;
  }

  .type-card-inner,
  .type-card-inner.has-adv {
    display: flex;
    padding: 14px;
  }

  .type-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 3px;
  }

  .type-name {
    max-width: 100%;
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .type-desc,
  .type-advantages {
    display: none;
  }

  .type-from {
    padding-top: 5px;
    font-size: 16px;
    white-space: normal;
  }

  :root[data-product-chosen] .type-card:not(.is-active) .type-from {
    opacity: 1;
  }

  .type-check {
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
  }

  .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-stats span {
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 10px;
  }

  .quick-stats b {
    font-size: 17px;
  }

  .quick-stats small {
    font-size: 10.5px;
    line-height: 1.25;
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
  }

  .section-head > div {
    min-width: 0;
  }

  .section-head h2 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .price-tag {
    flex: none;
    font-size: 23px;
  }

  .plans {
    gap: 9px;
  }

  .plan {
    min-height: 94px;
    padding: 13px;
  }

  .plan-badge {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 7px;
    font-size: 9.5px;
  }

  .field input,
  .recover-form input {
    max-width: 100%;
  }

  .sticky {
    width: calc(100% - 24px);
    gap: 8px;
    padding: 10px 10px 10px 14px;
  }

  .sticky-info {
    min-width: 0;
  }

  .sticky-info span,
  .sticky-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sticky-info span {
    font-size: 11px;
  }

  .sticky-info strong {
    font-size: 17px;
  }

  .sticky .btn {
    flex: none;
    min-height: 42px;
    padding-inline: 18px;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-inline: 12px;
  }

  .mark {
    width: 42px;
    height: 42px;
  }

  .brand-text span {
    display: none;
  }

  .hero-cta {
    grid-template-columns: 1fr;
  }

  .type-card-inner,
  .type-card-inner.has-adv {
    padding: 12px;
  }

  .type-name {
    font-size: 14px;
  }

  .type-from {
    font-size: 15px;
  }

  .buy-panel {
    padding: 14px;
  }
}
