:root{
  --border:#dfe7ff;
  --text:#111827;
  --muted:#6b7280;
  --blue:#2563eb;
  --red:#ef4444;
  --bg:#ffffff;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:#f6f8ff;
}
a{color:inherit;text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:24px}
.nav{
  background:var(--bg);
  border-bottom:1px solid var(--border);
}
.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{font-weight:800;font-size:20px;letter-spacing:.2px}
.nav-links{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.nav-links a{color:#0f172a;padding:10px 10px;border-radius:10px}
.nav-links a:hover{background:#eef2ff}
.hero{
  padding:18px 0 6px;
}
.hero h1{margin:0 0 8px;font-size:34px}
.hero p{margin:0;color:var(--muted);max-width:70ch}
.grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  margin-top:18px;
}
@media (max-width: 900px){
  .grid{grid-template-columns:repeat(2, minmax(0,1fr));}
}
@media (max-width: 600px){
  .grid{grid-template-columns:1fr;}
}
.card{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:10px;
  padding:22px;
  min-height:270px;
  display:flex;
  flex-direction:column;
}
.card h3{margin:0 0 12px;font-size:24px;text-align:center}
.card .desc{color:#111827;line-height:1.5;margin:0 0 18px;white-space:pre-line}
.card .price{
  margin-top:auto;
  text-align:center;
  color:#9aa4b2;
  font-size:18px;
  letter-spacing:.2px;
}
.card .price b{color:#111827;font-size:24px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  padding:12px 14px;
  border-radius:6px;
  border:1px solid var(--blue);
  color:var(--blue);
  font-weight:700;
  letter-spacing:.3px;
  margin-top:16px;
  background:transparent;
  cursor:pointer;
}
.btn:hover{filter:brightness(.96)}
.btn-red{
  border-color:var(--red);
  background:var(--red);
  color:#fff;
}
.btn-red:hover{filter:brightness(.95)}
.footer{
  margin-top:28px;
  color:var(--muted);
  font-size:14px;
}
.form{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:10px;
  padding:18px;
}
.form h2{margin:0 0 12px}
label{display:block;font-weight:700;margin:10px 0 6px}
input, textarea, select{
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #d1d5db;
  outline:none;
  background:#fff;
}
textarea{min-height:120px;resize:vertical}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 700px){.row{grid-template-columns:1fr}}
.table{
  width:100%;
  border-collapse:collapse;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
  font-size:14px;
}
.table th{background:#f3f6ff;font-weight:800}
.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:#fff;
}
.flash{
  background:#ecfeff;
  border:1px solid #a5f3fc;
  color:#155e75;
  padding:10px 12px;
  border-radius:10px;
  margin:14px 0;
}
.flash.err{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#9f1239;
}
.small{color:var(--muted);font-size:14px}
.muted{color:var(--muted);font-size:14px}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.actions .btn{max-width:220px}


.hint{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
}

.info-wrap{margin-top:18px;display:grid;gap:18px}
.info-block{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:10px;
  padding:18px;
}
.info-block h2{margin:0 0 12px}
.info-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 900px){
  .info-grid{grid-template-columns:1fr;}
}
.info-card{
  border:1px solid var(--border);
  background:#f8faff;
  border-radius:12px;
  padding:14px;
}
.info-title{font-weight:900;margin-bottom:6px}
.info-text{color:#111827;line-height:1.5}

.steps{display:grid;gap:10px}
.step{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:12px;
  padding:12px 14px;
}
.step-num{
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  font-weight:900;
  flex:0 0 auto;
  background:#eef2ff;
}

.list{margin:8px 0 0 18px}
.list li{margin:4px 0}


/* Prose / long text blocks */
.prose h2{margin:0 0 10px}
.prose h3{margin:18px 0 8px;font-size:18px}
.prose h4{margin:14px 0 8px;font-size:16px}
.prose p{margin:10px 0;line-height:1.55}
.prose ul{margin:10px 0 10px 18px;padding:0}
.prose li{margin:6px 0;line-height:1.5}
.channels{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:12px;margin:12px 0}
.channel{background:#fff;border:1px solid var(--border);border-radius:14px;padding:12px}
@media (max-width:760px){
  .channels{grid-template-columns:1fr}
}

/* Back to top button */
.to-top{
  position:fixed;
  /*
    Place button to the RIGHT of the main centered container (1100px),
    but never closer than 18px to the viewport edge.
  */
  right:18px; /* fallback */
  right:max(18px, calc((100vw - 1100px)/2 - 8px));
  bottom:24px;
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.10);
  background:rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#111827;
  box-shadow:0 10px 25px rgba(0,0,0,.10);
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.to-top__icon{display:block;width:20px;height:20px}
.to-top.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.to-top:hover{
  background:var(--red);
  border-color:rgba(225,29,72,.35);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(0,0,0,.16);
}
.to-top:active{
  transform:translateY(0);
  box-shadow:0 10px 25px rgba(0,0,0,.12);
}
.to-top:focus{outline:none}
.to-top:focus-visible{
  box-shadow:0 0 0 4px rgba(225,29,72,.20), 0 14px 32px rgba(0,0,0,.16);
}
/* Center auth pages */
.auth-page{
  min-height: calc(100vh - 160px); /* если не идеально по центру — поставь 100vh */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card{
  width: 50%;
  max-width: 520px;
  background: #fff;
  border: 1px solid #e6eefc;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.08);
  padding: 22px;
}

