  :root{
    --bg:#0b0f17; --card:#111827; --card2:#0f172a;
    --text:#e5e7eb; --muted:#9ca3af;
    --line:#1f2937; --link:#60a5fa;
    --acc:#22c55e; --warn:#f59e0b; --bad:#ef4444;
  }
  *{box-sizing:border-box}
  html,body{height:100%}
  body{
    margin:0;
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,sans-serif;
    background:linear-gradient(180deg,#070a10,#0b0f17 35%,#070a10);
    color:var(--text);
  }
  a{color:var(--link);text-decoration:none}
  a:hover{text-decoration:underline}
  .wrap{max-width:1100px;margin:0 auto;padding:24px}

  /* ---------- Header ---------- */
  header{
    position:sticky;top:0;z-index:10;
    background:rgba(11,15,23,.88);
    backdrop-filter: blur(10px);
    border-bottom:1px solid var(--line);
  }

  /* FIX: allow header to wrap without overlap */
  .nav{
    max-width:1100px;margin:0 auto;padding:12px 24px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    min-width:0;
    flex-wrap:wrap;
  }

  .brand{
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
    flex:1 1 260px;
  }
  .pill{
    display:inline-flex;align-items:center;
    padding:6px 10px;border:1px solid var(--line);border-radius:999px;
    background:rgba(17,24,39,.55);
    font-weight:800;font-size:12px;white-space:nowrap;
  }
  .sub{
    color:var(--muted);font-size:12px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    max-width:560px;
  }

  /* FIX: actions can wrap without collision */
  .right{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    min-width:0;
    flex:0 1 auto;
    flex-wrap:wrap;
  }

  /* FIX: navlinks becomes 2nd row when space is tight */
  .navlinks{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
    flex-wrap:wrap;
    row-gap:8px;
    order:10;
    flex:1 1 100%;
    padding-top:6px;
  }
  .navlinks a{color:var(--text);opacity:.9;font-size:14px;white-space:nowrap}
  .navlinks a:hover{opacity:1}

  .btn{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    border-radius:10px;border:1px solid var(--line);
    padding:10px 14px;background:var(--card);
    color:var(--text);cursor:pointer;text-decoration:none;
  }
  .btn:hover{border-color:#334155;text-decoration:none}
  .btn.acc{background:linear-gradient(180deg,#16a34a,#0f2f1a);border-color:#1b7a3f}
  .btn.primary{background:linear-gradient(180deg,#1f2937,#0b1220);border-color:#2b3647}
  .btn.ghost{background:transparent}

  .menu-btn{
    display:none;
    border:1px solid var(--line);
    background:rgba(17,24,39,.55);
    color:var(--text);
    border-radius:10px;
    padding:10px 12px;
    cursor:pointer;
    white-space:nowrap;
  }
  .mobile-links{
    display:none;
    border-top:1px solid var(--line);
    padding:10px 24px 14px;
    max-width:1100px;margin:0 auto;
  }
  .mobile-links a{
    display:inline-block;margin:6px 10px 0 0;
    color:var(--text);opacity:.9;
    white-space:nowrap;
  }
  .mobile-links.open{display:block}

  @media (max-width: 1020px){ .sub{display:none;} }
  @media (max-width: 920px){ .navlinks{display:none;} .menu-btn{display:inline-flex;} }

  .lang{
    display:inline-flex;gap:6px;align-items:center;
    border:1px solid var(--line);
    border-radius:10px;
    padding:6px;
    background:rgba(17,24,39,.35);
  }
  .lang button{
    border:1px solid transparent;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    padding:6px 10px;
    border-radius:8px;
    font-weight:600;
    white-space:nowrap;
  }
  .lang button.active{
    color:var(--text);
    border-color:#334155;
    background:rgba(17,24,39,.55);
  }

  /* Keep language + CTAs on the first row; navlinks can go to second row */
  .right .lang{order:1}
  .right > a.btn.primary{order:2}
  #payFormTop{order:3}
  #menuBtn{order:4}

  /* On wide screens keep everything in one row */
  @media (min-width: 1180px){
    .nav{flex-wrap:nowrap;align-items:center;}
    .navlinks{
      order:0;
      flex:0 1 auto;
      padding-top:0;
      flex-wrap:nowrap;
    }
  }

  /* ---------- Page ---------- */
  .hero{padding:32px 0 16px}
  .grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px}
  @media (max-width:900px){.grid{grid-template-columns:1fr}}

  .card{
    background:linear-gradient(180deg,var(--card), #0b1220);
    border:1px solid var(--line);
    border-radius:16px;
    padding:18px;
    min-width:0;
  }
  h1{margin:0 0 10px;font-size:34px;line-height:1.15;overflow-wrap:anywhere}
  h2{margin:0 0 10px;font-size:20px;overflow-wrap:anywhere}
  p{margin:0 0 10px;color:var(--muted);line-height:1.55}

  .kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
  @media (max-width:700px){.kpi{grid-template-columns:1fr}}
  .k{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(17,24,39,.45);min-width:0}
  .k b{display:block;color:var(--text);font-size:14px;margin-bottom:4px}
  .k span{color:var(--muted);font-size:12px}

  .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:14px}
  .hr{height:1px;background:var(--line);margin:14px 0}

  .alert{border-left:4px solid var(--warn);background:rgba(245,158,11,.08);padding:12px;border-radius:12px}
  .alert strong{color:#fde68a}
  .danger{border-left:4px solid var(--bad);background:rgba(239,68,68,.10);padding:12px;border-radius:12px}
  .danger strong{color:#fecaca}

  .section{padding:18px 0}
  .cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}
  @media (max-width:900px){.cols{grid-template-columns:1fr}}

  ul{margin:0;padding-left:18px;color:var(--muted);line-height:1.55}
  ol{margin:0;padding-left:18px;color:var(--muted);line-height:1.6}
  code{background:rgba(148,163,184,.15);border:1px solid rgba(148,163,184,.25);padding:2px 6px;border-radius:8px;color:#e2e8f0}
  .small{font-size:12px;color:var(--muted)}
  .mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}

  details{border:1px solid var(--line);border-radius:14px;background:rgba(17,24,39,.45);padding:12px}
  summary{cursor:pointer;font-weight:700;color:var(--text)}
  details p, details ul{margin-top:10px}

  .download-box{
    display:grid;
    grid-template-columns: 1fr;
    gap:10px;
    border:1px dashed #334155;
    border-radius:16px;
    padding:14px;
    background:rgba(17,24,39,.25);
  }

  footer{padding:30px 0 50px;color:var(--muted);font-size:12px}

  /* Anchor spacing under sticky header (header can be 2-row now) */
  section{scroll-margin-top:120px}

  pre.mono{
    white-space:pre-wrap;
    word-break:break-word;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(17,24,39,.35);
    color:var(--text);
    line-height:1.45;
    overflow:auto;
  }

  /* “steps” helpers */
  .steps h3{margin:14px 0 8px;font-size:16px}
  .steps .hint{margin-top:6px}
  .steps .badge{
    display:inline-flex;
    align-items:center;
    padding:4px 8px;
    border:1px solid var(--line);
    border-radius:999px;
    background:rgba(17,24,39,.45);
    font-size:12px;
    color:var(--muted);
    white-space:nowrap;
  }
body{ color:#e5e7eb !important; }
.infographic-card{
  margin: 16px 0 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.infographic-card img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.infographic-card figcaption{
  margin-top: 10px;
  font-size: 14px;
  opacity: .85;
  line-height: 1.35;
}
/* Compact hero infographic */
.infographic-card--hero{
  margin: 0 0 12px;
  padding: 10px;
}

.infographic-card--hero a{
  display: block;
}

.infographic-card--hero img{
  max-height: 260px;
  object-fit: contain;
}
.accent-note{
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 80, 80, .35);
  background: rgba(255, 80, 80, .08);
  color: rgba(255,255,255,.92);
  font-weight: 700;
  line-height: 1.35;
}

.accent-note b{
  color: #ff5a5a;
}
/* Compact infographic inside "Getting started" */
.infographic-card--mini{
  margin: 12px 0 14px;
  padding: 10px;
}

.infographic-card--mini img{
  max-height: 220px;
  object-fit: contain;
}
/* Getting started intro block (infographic + short checklist) */
.gs-intro{
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.gs-intro__img{
  flex: 0 0 320px;
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.gs-intro__img img{
  width: 100%;
  height: auto;
  display: block;
}

.gs-intro__text{
  flex: 1;
  min-width: 0;
}

.gs-intro__title{
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .2px;
  margin-bottom: 8px;
  opacity: .95;
}

.gs-intro__list{
  margin: 0;
  padding-left: 18px;
  line-height: 1.35;
  opacity: .92;
}

.gs-intro__list li{
  margin: 6px 0;
}

.gs-intro__note{
  margin-top: 8px;
  font-size: 13px;
  opacity: .85;
}

/* Mobile: stack */
@media (max-width: 820px){
  .gs-intro{
    flex-direction: column;
    align-items: stretch;
  }
  .gs-intro__img{
    flex: none;
    width: 100%;
  }
}
/* Accent button: "Getting started" (subtle red outline) */
.btn.btn-start{
  border: 1px solid rgba(255, 90, 90, .60);
  background: rgba(255, 90, 90, .10);
  font-weight: 800;
}

/* hover / focus — аккуратно, без “кислоты” */
.btn.btn-start:hover{
  background: rgba(255, 90, 90, .16);
  border-color: rgba(255, 90, 90, .85);
  transform: translateY(-1px);
}

.btn.btn-start:focus{
  outline: 2px solid rgba(255, 90, 90, .55);
  outline-offset: 2px;
}
.btn{ transition: background .15s ease, border-color .15s ease, transform .15s ease; }
