/* =====================================================================
   ViVPN — Vault Premium Design System
   Tokens: colors · spacing · radius · type · shadows · motion
   ===================================================================== */
:root {
  color-scheme: dark;

  /* Core surfaces */
  --bg:        #06090b;
  --bg-soft:   #080d10;
  --bg-elev:   #0b1216;
  --panel:     rgba(13, 20, 23, .78);
  --panel-2:   rgba(18, 27, 30, .92);
  --panel-hi:  rgba(22, 33, 36, .94);

  /* Lines */
  --line:        rgba(255, 255, 255, .07);
  --line-soft:   rgba(255, 255, 255, .04);
  --line-strong: rgba(60, 224, 182, .28);

  /* Text */
  --text:  #ecf3f1;
  --soft:  #c5d2cf;
  --muted: #8fa19d;
  --dim:   #6b7c79;

  /* Brand */
  --accent:     #3ce0b6;          /* signature mint */
  --accent-2:   #2cb38f;          /* deeper accent for gradients */
  --cyan:       #7ec7ff;          /* secondary accent */
  --on-accent:  #00130f;          /* text color on accent surfaces */

  /* Status */
  --ok:      #5fe0a0;
  --warn:    #f5c46b;
  --danger:  #ff7a8e;

  /* Spacing scale (4-pt) */
  --s-1:  4px;  --s-2:  8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-7: 32px; --s-8: 40px;
  --s-9: 56px;  --s-10: 72px; --s-11: 96px;

  /* Radii */
  --r-1: 6px; --r-2: 10px; --r-3: 14px; --r-4: 20px; --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 14px rgba(0,0,0,.28);
  --shadow-md: 0 12px 36px rgba(0,0,0,.34);
  --shadow-lg: 0 28px 80px rgba(0,0,0,.42);
  --shadow-glow: 0 18px 60px rgba(60, 224, 182, .12);
  --shadow: var(--shadow-lg);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-1: .16s;
  --dur-2: .26s;
  --dur-3: .42s;
}

* { box-sizing: border-box; }
*::selection { background: rgba(60,224,182,.32); color: var(--text); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 50% at 78% -10%, rgba(60, 224, 182, .10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 8% 36%, rgba(126, 199, 255, .055), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%);
}
/* Subtle mesh grid for tech atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black, transparent 90%);
  z-index: 0;
}

/* ============ Typography ============ */
h1, h2, h3, h4, p { margin: 0; }
h1 {
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: .98;
  letter-spacing: -.022em;
  font-weight: 800;
  margin-bottom: var(--s-5);
  max-width: 18ch;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.018em;
  font-weight: 750;
  margin-bottom: var(--s-3);
  max-width: 22ch;
  text-wrap: balance;
}
h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.005em;
  margin-bottom: var(--s-2);
  color: var(--text);
}
h4 { font-size: 15px; font-weight: 700; margin-bottom: var(--s-3); color: var(--text); }
p { color: var(--soft); line-height: 1.62; font-size: 15px; }
.muted, .muted-text { color: var(--muted); }
.accent-text { color: var(--accent); font-weight: 600; }
.notice { color: var(--ok); }
.error { color: var(--danger); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
}
.mono { font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Consolas, monospace; }

/* ============ Buttons ============ */
button, input { font: inherit; font-family: inherit; }
button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: var(--r-2);
  min-height: 46px;
  padding: 0 var(--s-5);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.005em;
  background: transparent;
  color: var(--text);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; pointer-events: none; }
.primary {
  color: var(--on-accent);
  background: linear-gradient(180deg, #4ee9c1 0%, var(--accent) 56%, var(--accent-2) 100%);
  border-color: rgba(60,224,182,.5);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 10px 28px rgba(60,224,182,.18);
}
.primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 14px 36px rgba(60,224,182,.30); }
.primary:active { transform: translateY(1px); }
.ghost {
  color: var(--text);
  background: rgba(255,255,255,.025);
  border-color: var(--line);
}
.ghost:hover { background: rgba(255,255,255,.05); border-color: rgba(60,224,182,.32); }
.big { min-height: 56px; padding: 0 var(--s-7); font-size: 15px; border-radius: var(--r-3); }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: 13px; border-radius: var(--r-1); }
.link-btn {
  background: transparent; border: 0; color: var(--accent);
  padding: 0; min-height: auto; text-align: left; font-weight: 600;
}
.link-btn:hover { color: #5fe9c5; }
.top-actions, .hero-actions, .actions, .config-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
  padding: 0 clamp(18px, 5vw, 64px);
  background: rgba(6, 9, 11, .72);
  backdrop-filter: blur(22px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 19px; letter-spacing: -.01em;
}
.brand::before {
  content: ""; width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 6px 16px rgba(60,224,182,.28);
}
nav { display: flex; gap: var(--s-7); }
nav a {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color var(--dur-1) var(--ease);
}
nav a:hover { color: var(--text); }

/* ============ Hero ============ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, .94fr);
  align-items: center;
  gap: var(--s-9);
  padding: clamp(56px, 8vw, 110px) clamp(20px, 5vw, 76px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 90% 70% at 28% 42%, rgba(6,9,11,.32), rgba(6,9,11,.78) 58%, var(--bg) 100%),
    url("/static/portal/lend.png");
  background-position: center center, center top;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  filter: saturate(1.04) contrast(1.04);
}
.hero::after {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 60%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(60,224,182,.08), transparent 70%);
}
.hero-copy { max-width: 660px; }
.hero-copy p { font-size: 18px; max-width: 56ch; color: var(--soft); }
.hero-actions { margin-top: var(--s-7); }
.platforms {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  align-items: center;
}
.platforms::before {
  content: "Совместимо с";
  color: var(--dim);
  font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  margin-right: var(--s-2);
}
.platforms span, .plan-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: var(--r-1);
  padding: 6px var(--s-3);
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
}

/* ============ Hero signal panel (premium status mock) ============ */
.signal-panel {
  position: relative;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: var(--s-7);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(60,224,182,.12), transparent 70%),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, var(--shadow-lg);
  overflow: hidden;
  display: grid; align-content: end; gap: var(--s-3);
}
.signal-panel::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 38%, black, transparent 70%);
  pointer-events: none;
}
.signal-panel::after {
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from 220deg, transparent, rgba(60,224,182,.18), transparent 30%);
  animation: spin 22s linear infinite;
  opacity: .55;
  z-index: 0;
}
.pulse-ring, .glass-orbit {
  position: absolute; inset: 64px 46px 168px;
  border-radius: 50%;
  border: 1px solid rgba(60,224,182,.22);
  z-index: 1;
}
.pulse-ring { animation: pulse 4.4s var(--ease) infinite; }
.glass-orbit {
  inset: 96px 96px 220px;
  background: radial-gradient(circle, rgba(126,199,255,.10), transparent 60%);
  border-color: rgba(126,199,255,.18);
}
.mini-card {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-4);
  border: 1px solid var(--line);
  background: rgba(8, 12, 14, .7);
  border-radius: var(--r-2);
  backdrop-filter: blur(14px);
}
.mini-card span { color: var(--muted); font-size: 13px; }
.mini-card b { font-weight: 600; }
.mini-card.active {
  border-color: rgba(60,224,182,.42);
  background: linear-gradient(180deg, rgba(60,224,182,.06), rgba(8,12,14,.7));
}

/* ============ Sections ============ */
.band, .split, .pricing-band, .faq, .auth-shell, .dashboard {
  position: relative; z-index: 1;
  padding: clamp(64px, 9vw, 112px) clamp(20px, 5vw, 76px);
}
.section-head { max-width: 720px; margin-bottom: var(--s-8); }
.section-head p { font-size: 17px; color: var(--soft); }

/* ============ Cards ============ */
.feature-grid, .plans, .dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
}
article, .card, .auth-card, details, .plan-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r-3);
  padding: var(--s-6);
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset, var(--shadow-md);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
article:hover, .plan-card:hover, .card:hover {
  border-color: rgba(60,224,182,.22);
  background: var(--panel-hi);
}
article h3 { margin-top: var(--s-3); }
.icon {
  display: inline-flex;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: var(--s-9);
  align-items: start;
}
.flow-band { background: radial-gradient(ellipse 50% 35% at 50% 0%, rgba(126,199,255,.045), transparent 70%); }
.flow-band .section-head { max-width: 760px; margin-bottom: var(--s-9); }
.steps {
  margin: 0; padding: 0; list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  counter-reset: step;
}
.steps li {
  position: relative;
  display: grid;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-6) var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, rgba(255,255,255,.024), rgba(255,255,255,.008));
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, var(--shadow-md);
  counter-increment: step;
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.steps li::before {
  content: "ШАГ " counter(step, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  letter-spacing: .22em;
}
.steps li::after {
  content: "";
  position: absolute; inset: auto -40% -60% auto;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(60,224,182,.10), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
  pointer-events: none;
}
.steps li:hover {
  border-color: rgba(60,224,182,.28);
  background: linear-gradient(180deg, rgba(60,224,182,.04), rgba(255,255,255,.012));
  transform: translateY(-2px);
}
.steps li:hover::after { opacity: 1; }
.steps li > b {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 19px;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.steps li > span {
  color: var(--soft);
  font-size: 14.5px;
  line-height: 1.62;
  max-width: 44ch;
}

/* ============ Pricing ============ */
.pricing-band {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(60,224,182,.05), transparent 70%);
}
.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  overflow: hidden;
  padding: var(--s-7) var(--s-6);
}
.plan-card::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(60,224,182,.10), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.plan-card > * { position: relative; z-index: 1; }
.plan-card:hover::before, .plan-card.featured::before { opacity: 1; }
.plan-card.featured {
  border-color: rgba(60,224,182,.45);
  background: linear-gradient(180deg, rgba(20,38,36,.92), rgba(10,16,17,.94));
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, var(--shadow-lg);
}
.plan-card.featured::after {
  content: "Популярный";
  position: absolute; top: var(--s-4); right: var(--s-4); z-index: 2;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 10px;
  border-radius: var(--r-pill);
}
.plan-label {
  min-height: 18px;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.plan-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.plan-card > p { color: var(--muted); font-size: 14px; margin-top: var(--s-2); }
.plan-price {
  font-size: 40px; font-weight: 800;
  letter-spacing: -.025em;
  margin: var(--s-5) 0 var(--s-1);
  color: var(--text);
}
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan-list {
  display: grid; gap: var(--s-2);
  margin: var(--s-4) 0 var(--s-5);
  color: var(--soft);
  font-size: 14px;
}
.plan-list span { display: flex; align-items: center; gap: var(--s-2); }
.plan-list span::before {
  content: "";
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.4), transparent 50%),
    var(--accent);
  box-shadow: 0 0 0 3px rgba(60,224,182,.12);
}
.plan-card button { margin-top: auto; width: 100%; }

/* ============ FAQ ============ */
.faq { max-width: 980px; margin: auto; }
details {
  margin-bottom: var(--s-3);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-3);
  transition: background var(--dur-2) var(--ease);
}
details[open] { background: var(--panel-hi); }
summary {
  cursor: pointer;
  font-weight: 600; font-size: 16px;
  letter-spacing: -.005em;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px; font-weight: 300;
  transition: transform var(--dur-2) var(--ease);
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: var(--s-3); }

/* ============ Auth pages ============ */
.auth-shell {
  min-height: calc(100vh - 68px);
  display: grid; place-items: center;
}
.auth-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, var(--panel-hi), rgba(10,15,17,.96));
  padding: var(--s-7);
}
.auth-card h2 { font-size: 26px; }
.auth-card > p { margin-top: var(--s-2); margin-bottom: var(--s-5); color: var(--muted); }
.form { display: grid; gap: var(--s-3); }
input {
  width: 100%;
  min-height: 50px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.32);
  color: var(--text);
  padding: 0 var(--s-4);
  outline: none;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
input::placeholder { color: var(--dim); }
input:hover { border-color: rgba(255,255,255,.14); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(60,224,182,.10); background: rgba(0,0,0,.42); }

/* ============ Dashboard ============ */
.dashboard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 68px);
  padding-top: var(--s-7);
  padding-bottom: var(--s-10);
}
.dashboard::before { content: none; }
.dashboard::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 30% at 90% 8%, rgba(126,199,255,.06), transparent 70%),
    radial-gradient(ellipse 40% 28% at 8% 4%, rgba(60,224,182,.05), transparent 70%);
}
.dash-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
.dash-top h2 { font-size: 28px; margin-bottom: var(--s-2); }
.account-pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: var(--r-pill);
  padding: 6px var(--s-3);
  color: var(--soft);
  font-size: 13px;
}
.account-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.dash-grid { grid-template-columns: repeat(12, 1fr); gap: var(--s-4); }
.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.metric {
  font-size: 30px; font-weight: 700;
  letter-spacing: -.022em;
  color: var(--text);
  margin: 0 0 var(--s-1);
}
.card > p { color: var(--muted); font-size: 13px; }
.progress {
  height: 6px;
  background: rgba(255,255,255,.05);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: var(--s-3);
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: inherit;
}
.donut {
  width: 156px; height: 156px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--value), rgba(255,255,255,.06) 0);
  display: grid; place-items: center;
  margin: var(--s-3) auto;
  box-shadow: 0 8px 28px rgba(60,224,182,.10);
}
.donut::after {
  content: attr(data-label);
  width: 112px; height: 112px;
  border-radius: 50%;
  background: var(--bg-elev);
  display: grid; place-items: center;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
}
.timeline { display: grid; gap: 2px; }
.timeline > div {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  border-bottom: 1px solid var(--line);
  padding: var(--s-3) 0;
  color: var(--soft);
  font-size: 14px;
}
.timeline > div:last-child { border-bottom: 0; }
.timeline > div b { font-weight: 500; color: var(--muted); }
.timeline > div span { color: var(--text); font-weight: 500; }
.wallet-addr { font-size: 13px; word-break: break-all; }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: var(--s-5);
  background: rgba(2, 4, 5, .72);
  backdrop-filter: blur(14px);
  animation: fadeIn .2s ease;
}
.modal {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: linear-gradient(180deg, var(--panel-hi), var(--bg-elev));
  padding: var(--s-7);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, var(--shadow-lg);
  animation: modalIn .25s var(--ease);
}
.modal h2 { font-size: 24px; margin-bottom: var(--s-2); }
.modal > p { margin-bottom: var(--s-5); color: var(--muted); }
.modal-actions { display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap; }
.modal-actions button { flex: 1 1 180px; }
.modal-wide { width: min(640px, 100%); }

/* Plan picker (modal list) */
.plan-picker-list {
  display: grid; gap: var(--s-2);
  margin: var(--s-5) 0 var(--s-2);
  max-height: 440px;
  overflow-y: auto;
  padding-right: var(--s-1);
}
.plan-picker-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: rgba(255,255,255,.02);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.plan-picker-item:hover { border-color: rgba(60,224,182,.32); background: rgba(60,224,182,.04); }
.plan-picker-featured { border-color: rgba(60,224,182,.36); background: rgba(60,224,182,.05); }
.plan-picker-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.plan-picker-badge {
  font-size: 10px; font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--r-1);
  padding: 2px 7px;
  margin-left: var(--s-2);
  vertical-align: middle;
  letter-spacing: .04em; text-transform: uppercase;
}
.plan-picker-details { font-size: 13px; color: var(--muted); }
.plan-picker-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); white-space: nowrap; }
.plan-picker-price { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.plan-picker-btn { min-height: 36px; padding: 0 var(--s-4); font-size: 13px; }

/* WireGuard / QR */
.wg-profile-block { display: grid; gap: var(--s-4); }
.qr-container { display: flex; justify-content: center; padding: var(--s-5) 0; }
.config-details {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-4);
  background: rgba(0,0,0,.22);
}
.config-details summary {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.config-details summary::after { font-size: 18px; }
.config-pre {
  font-size: 12px;
  line-height: 1.6;
  color: var(--soft);
  background: rgba(0,0,0,.34);
  padding: var(--s-4);
  border-radius: var(--r-1);
  overflow-x: auto;
  margin: var(--s-3) 0 0;
  white-space: pre-wrap; word-break: break-all;
}
.config-meta-row {
  display: flex; gap: var(--s-5); flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.config-meta-row span strong { color: var(--soft); font-weight: 500; }

/* Platform tabs */
.platform-tabs {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  margin: var(--s-4) 0;
}
.platform-tab {
  display: flex; align-items: center; gap: var(--s-2);
  min-height: 42px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.platform-tab:hover { border-color: rgba(60,224,182,.28); background: rgba(60,224,182,.04); color: var(--text); }
.platform-tab.active {
  border-color: rgba(60,224,182,.42);
  background: rgba(60,224,182,.08);
  color: var(--text);
}
.platform-tab span { font-size: 13px; }
.platform-panel { padding: var(--s-5) 0 0; }
.platform-panel h4 { font-size: 16px; margin-bottom: var(--s-4); }
.guide-steps { padding-left: var(--s-6); display: grid; gap: var(--s-2); }
.guide-steps li { color: var(--soft); line-height: 1.7; font-size: 14px; }
.guide-steps a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(60,224,182,.4); }
.guide-steps a:hover { border-bottom-color: var(--accent); }
.guide-steps code {
  background: rgba(60,224,182,.08);
  border: 1px solid rgba(60,224,182,.18);
  padding: 1px 6px;
  border-radius: var(--r-1);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Status colors */
.status-pending { color: var(--cyan); font-weight: 600; }
.status-awaiting_blockchain_confirmation { color: var(--warn); font-weight: 600; }
.status-paid, .status-manually_confirmed, .status-confirmed { color: var(--ok); font-weight: 600; }
.status-failed { color: var(--danger); font-weight: 600; }
.status-expired { color: var(--muted); font-weight: 600; }

/* Polling banner */
.poll-status {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-2) 0 var(--s-4);
  border: 1px solid rgba(60,224,182,.22);
  border-radius: var(--r-2);
  background: rgba(60,224,182,.05);
  color: var(--accent);
  font-size: 14px; font-weight: 500;
  animation: fadeIn .4s ease;
}
.poll-status small { color: var(--muted); font-weight: 400; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(60,224,182,.7);
  animation: pulseDot 1.6s var(--ease) infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(60,224,182,.55); transform: scale(1); }
  70%  { box-shadow: 0 0 0 10px rgba(60,224,182,0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(60,224,182,0); transform: scale(1); }
}
/* ============ Trust strip ============ */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  padding: var(--s-7) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-9);
}
.trust-strip > div {
  display: grid; gap: var(--s-1);
  padding: 0 var(--s-3);
}
.trust-strip strong {
  display: block;
  font-size: 22px; font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
.trust-strip span {
  color: var(--muted);
  font-size: 13px;
}

/* ============ Footer ============ */
.site-footer {
  padding: var(--s-9) clamp(20px, 5vw, 76px) var(--s-7);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-9);
  color: var(--muted);
}
.site-footer h4 {
  font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.site-footer a { color: var(--soft); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { font-size: 18px; }
.footer-meta {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding-top: var(--s-6);
  margin-top: var(--s-2);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

/* ============ Reveal animations ============ */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: .06s; }
.reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(.94); opacity:.55; } 50% { transform: scale(1.04); opacity:.95; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .feature-grid, .plans { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  nav { display: none; }
  .topbar { min-height: 60px; padding: 0 var(--s-5); }
  .top-actions .ghost { display: none; }
  .hero, .split { grid-template-columns: 1fr; gap: var(--s-7); }
  .steps { grid-template-columns: 1fr; gap: var(--s-3); }
  .hero { min-height: auto; padding: var(--s-9) var(--s-5) var(--s-10); }
  .hero-copy p { font-size: 16px; }
  .signal-panel { min-height: 360px; padding: var(--s-5); }
  .feature-grid, .plans { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-5, .span-7, .span-8, .span-12 { grid-column: auto; }
  .steps li { padding: var(--s-5) var(--s-5) var(--s-5); }
  .steps li > b { font-size: 17px; }
  .dash-top { align-items: flex-start; flex-direction: column; }
  .dash-top .top-actions { width: 100%; }
  .dash-top .top-actions button { flex: 1; }
  .plan-picker-item { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .plan-picker-right { flex-direction: row; align-items: center; justify-content: space-between; }
  .modal-wide { width: 100%; }
  .modal { padding: var(--s-5); }
  .modal-actions button { flex: 1 1 100%; }
  .platform-tabs { gap: var(--s-2); }
  .platform-tab { padding: 0 var(--s-3); min-height: 38px; font-size: 12px; }
  .config-actions { gap: var(--s-2); }
  .config-actions button { flex: 1 1 calc(50% - 4px); }
  .trust-strip { grid-template-columns: 1fr 1fr; padding: var(--s-5) 0; }
  .site-footer { grid-template-columns: 1fr; gap: var(--s-6); padding: var(--s-7) var(--s-5); }
  h1 { font-size: clamp(36px, 9vw, 52px); }
  h2 { font-size: clamp(26px, 5vw, 36px); }
  .band, .pricing-band, .faq, .auth-shell { padding: var(--s-9) var(--s-5); }
  .dashboard { padding: var(--s-6) var(--s-4) var(--s-9); }
  .auth-card { padding: var(--s-6); }
  .platforms { gap: 6px; }
  .platforms span { padding: 5px var(--s-2); font-size: 12px; }
}
@media (max-width: 420px) {
  .topbar { padding: 0 var(--s-4); }
  .brand { font-size: 17px; }
  .hero { padding: var(--s-7) var(--s-4) var(--s-8); }
  .hero-actions button { flex: 1 1 100%; }
}
