
/* ── Ераст Голд · дизайн-токены из референса (Tailwind v4: 12/13/15/17/28/36/52px, radius 1rem/999px, black+white opacity-слои, emerald/indigo) ── */
*,*::before,*::after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;margin:0;padding:0}
html{scroll-behavior:smooth;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-size:16px}
@media(min-width:1024px){html{font-size:17px}}
@media(min-width:1280px){html{font-size:17.5px}}
:root{
  --bg:#fff;--fg:#000;
  --t60:rgba(0,0,0,.6);--t50:rgba(0,0,0,.5);--t40:rgba(0,0,0,.4);--t30:rgba(0,0,0,.3);--t25:rgba(0,0,0,.25);
  --line:rgba(0,0,0,.06);--line8:rgba(0,0,0,.08);--line10:rgba(0,0,0,.1);--line15:rgba(0,0,0,.15);
  --surface:rgba(0,0,0,.03);--icon-bg:rgba(0,0,0,.04);
  --hover:rgba(0,0,0,.06);--hover4:rgba(0,0,0,.04);
  --ghost-bg:#fff;--ghost-hover:rgba(0,0,0,.03);
  --pill-bg:rgba(255,255,255,.75);--pill-shadow:0 2px 20px rgba(0,0,0,.08);
  --btn-bg:#000;--btn-fg:#fff;--hero-base:#fafbff;
}
.dark{
  --bg:#0d0d0d;--fg:#fff;
  --t60:rgba(255,255,255,.6);--t50:rgba(255,255,255,.5);--t40:rgba(255,255,255,.4);--t30:rgba(255,255,255,.3);--t25:rgba(255,255,255,.25);
  --line:rgba(255,255,255,.06);--line8:rgba(255,255,255,.08);--line10:rgba(255,255,255,.1);--line15:rgba(255,255,255,.15);
  --surface:rgba(255,255,255,.04);--icon-bg:rgba(255,255,255,.06);
  --hover:rgba(255,255,255,.08);--hover4:rgba(255,255,255,.06);
  --ghost-bg:rgba(255,255,255,.04);--ghost-hover:rgba(255,255,255,.07);
  --pill-bg:rgba(17,17,17,.8);--pill-shadow:0 2px 20px rgba(0,0,0,.4);
  --btn-bg:#fff;--btn-fg:#000;--hero-base:#0d0d0d;
}
body{background:var(--bg);color:var(--fg);font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji';min-height:100vh;display:flex;flex-direction:column}
body.theme-anim{transition:background-color .3s ease,color .3s ease}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
svg{display:block}
::selection{background:#000;color:#fff}
.dark ::selection{background:#fff;color:#000}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18);border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.32)}
.dark ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.15)}
.dark ::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.28)}

/* ── Плавающая pill-шапка (backdrop-blur 40px, прячется при скролле вниз) ── */
.nav-wrap{position:fixed;left:0;right:0;z-index:50;display:flex;justify-content:center;padding:0 1rem;pointer-events:none;top:max(1rem,env(safe-area-inset-top));transition:transform .35s ease,opacity .3s ease;will-change:transform}
.nav-wrap.hidden-nav{transform:translateY(-200%);opacity:0}
.nav-pill{pointer-events:auto;display:flex;align-items:center;gap:.25rem;background:var(--pill-bg);-webkit-backdrop-filter:blur(40px);backdrop-filter:blur(40px);border:1px solid var(--line8);border-radius:999px;padding:.375rem .5rem;box-shadow:var(--pill-shadow);transition:background .3s ease,border-color .3s ease,box-shadow .3s ease}
.nav-brand{font-size:13px;font-weight:600;padding:.25rem .75rem;border-radius:999px;transition:background .2s ease}
.nav-brand:hover{background:var(--hover)}
.nav-sep{width:1px;height:1rem;background:var(--line10);margin:0 .125rem}
.nav-link{display:none;font-size:13px;color:var(--t50);padding:.25rem .75rem;border-radius:999px;transition:color .2s ease,background .2s ease}
@media(min-width:640px){.nav-link{display:block}}
.nav-link:hover{color:var(--fg);background:var(--hover4)}
.nav-cta{font-size:13px;font-weight:600;background:var(--btn-bg);color:var(--btn-fg);padding:.375rem 1rem;border-radius:999px;transition:opacity .2s ease,transform .2s ease,background .3s ease,color .3s ease}
.nav-cta:hover{opacity:.8}
.nav-cta:active{transform:scale(.97)}
.theme-btn{width:2.25rem;height:2.25rem;border-radius:999px;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.05);border:1px solid rgba(0,0,0,.07);color:var(--t50);cursor:pointer;transition:background .2s ease,border-color .2s ease,color .2s ease,transform .15s ease}
.theme-btn:hover{background:rgba(0,0,0,.09);color:#000}
.theme-btn:active{transform:scale(.9)}
.dark .theme-btn{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.1)}
.dark .theme-btn:hover{background:rgba(255,255,255,.14);color:#fff}
.theme-btn svg{width:14px;height:14px;transition:transform .35s ease}
.theme-btn:active svg{transform:rotate(25deg)}
.moon{display:block}.sun{display:none}
.dark .moon{display:none}.dark .sun{display:block}
.nav-spacer{height:calc(3.5rem + env(safe-area-inset-top))}
main{flex:1}
.container{max-width:980px;margin:0 auto;padding:0 1.25rem}
@media(min-width:640px){.container{padding:0 2rem}}

/* ── Hero: два фоновых слоя (light/dark) с кроссфейдом 500ms ── */
.hero{position:relative;overflow:hidden;margin-top:-3.5rem}
.hero-bg{position:absolute;inset:0;pointer-events:none;transition:opacity .5s ease}
.hero-bg-light{opacity:1}.dark .hero-bg-light{opacity:0}
.hero-bg-dark{opacity:0}.dark .hero-bg-dark{opacity:1}
.hero-base{position:absolute;inset:0;background:#fafbff}
.glow{position:absolute;border-radius:50%}
.glow-violet{top:-120px;left:50%;transform:translateX(-50%);width:800px;height:500px;background:radial-gradient(ellipse,rgba(139,92,246,.12) 0%,rgba(99,102,241,.08) 40%,transparent 70%)}
.glow-blue{top:-40px;right:-80px;width:520px;height:520px;background:radial-gradient(circle,rgba(59,130,246,.1) 0%,transparent 65%)}
.glow-emerald{top:80px;left:-60px;width:400px;height:400px;background:radial-gradient(circle,rgba(16,185,129,.08) 0%,transparent 65%)}
.hero-hairline{position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(to right,transparent,rgba(99,102,241,.15),transparent)}
.hero-fade-light{position:absolute;bottom:0;left:0;right:0;height:8rem;background:linear-gradient(to top,#fafbff,transparent)}
.glow-indigo-d{top:-8rem;right:-2.5rem;width:650px;height:650px;background:#6366f1;filter:blur(120px);opacity:.2}
.glow-emerald-d{top:2.5rem;left:-2.5rem;width:450px;height:500px;background:#10b981;filter:blur(110px);opacity:.1}
.hero-fade-dark{position:absolute;bottom:0;left:0;right:0;height:10rem;background:linear-gradient(to top,#0d0d0d,transparent)}
.hero-inner{position:relative;max-width:980px;margin:0 auto;padding:6rem 1.25rem 4rem;min-height:540px;display:flex;align-items:center}
@media(min-width:640px){.hero-inner{padding:8rem 2rem 6rem}}
/* Свечение-аура справа вместо мокапа телефона (desktop) */
.hero-halo{display:none}
@media(min-width:1024px){
.hero-halo{display:block;position:absolute;right:-80px;top:50%;transform:translateY(-50%);width:500px;height:600px;border-radius:50%;pointer-events:none;z-index:1;background:radial-gradient(ellipse at 55% 50%,rgba(139,92,246,.18) 0%,rgba(99,102,241,.12) 30%,rgba(59,130,246,.06) 55%,transparent 72%);animation:haloBreath 7s ease-in-out infinite}
.dark .hero-halo{background:radial-gradient(ellipse at 55% 50%,rgba(139,92,246,.32) 0%,rgba(99,102,241,.2) 30%,rgba(59,130,246,.08) 55%,transparent 72%)}
}
@keyframes haloBreath{0%,100%{transform:translateY(-50%) scale(1);opacity:.85}50%{transform:translateY(-52%) scale(1.05);opacity:1}}
.hero-text{position:relative;max-width:500px;z-index:2}
.badge{display:inline-flex;align-items:center;gap:.5rem;margin-bottom:2rem}
.dot{position:relative;display:inline-flex;width:.75rem;height:.75rem}
.dot-ping{position:absolute;inset:0;border-radius:999px;background:#34d399;opacity:.6;animation:ping 1s cubic-bezier(0,0,.2,1) infinite}
.dot-core{position:relative;display:inline-flex;width:.75rem;height:.75rem;border-radius:999px;background:#10b981}
@keyframes ping{75%,100%{transform:scale(2);opacity:0}}
.badge-label{font-size:12px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--t40)}
.hero-title{font-size:36px;font-weight:700;letter-spacing:-.025em;line-height:1.1;margin-bottom:1.75rem}
@media(min-width:640px){.hero-title{font-size:52px}}
.grad{display:inline-block;background-image:linear-gradient(135deg,#6366f1,#8b5cf6);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-sub{font-size:15px;color:var(--t50);line-height:1.625;font-weight:300;margin-bottom:3rem}
@media(min-width:640px){.hero-sub{font-size:17px}}
.sm-br{display:none}
@media(min-width:640px){.sm-br{display:inline}}

/* ── Кнопки ── */
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;background:var(--btn-bg);color:var(--btn-fg);font-size:15px;font-weight:600;padding:.875rem 1.75rem;border-radius:999px;border:0;cursor:pointer;transition:opacity .2s ease,transform .2s ease,background .3s ease,color .3s ease}
.btn-primary:hover{opacity:.8}
.btn-primary:active{transform:scale(.98)}
.btn-primary svg{width:1rem;height:1rem}
.btn-block{width:100%}
.btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;width:100%;border:1px solid var(--line10);background:var(--ghost-bg);color:var(--fg);font-size:15px;font-weight:500;padding:.875rem 1.5rem;border-radius:999px;cursor:pointer;transition:background .2s ease,transform .2s ease,border-color .3s ease}
.btn-ghost:hover{background:var(--ghost-hover)}
.btn-ghost:active{transform:scale(.98)}
.btn-ghost svg{width:1.25rem;height:1.25rem;flex-shrink:0}

/* ── Divider + карточки преимуществ ── */
.divider{border-top:1px solid var(--line)}
.features{padding:5rem 0}
@media(min-width:640px){.features{padding:7rem 0}}
.features-grid{display:grid;gap:3rem}
@media(min-width:640px){.features-grid{grid-template-columns:repeat(2,1fr);gap:2rem}}
@media(min-width:1024px){.features-grid{grid-template-columns:repeat(4,1fr)}}
.card-appear{opacity:0;animation:fadeInUp .45s ease forwards}
@keyframes fadeInUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
.feat-icon{margin-bottom:.75rem;color:var(--t30)}
.feat-icon svg{width:1.25rem;height:1.25rem}
.feat h3{font-size:15px;font-weight:600;margin-bottom:.375rem}
.feat p{font-size:13px;color:var(--t50);line-height:1.625}

/* ── Footer ── */
.site-footer{border-top:1px solid var(--line);margin-top:auto}
.footer-inner{max-width:980px;margin:0 auto;padding:1.25rem;padding-bottom:calc(1.25rem + env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem}
@media(min-width:640px){.footer-inner{padding-left:2rem;padding-right:2rem}}
.footer-inner p{font-size:12px;color:var(--t30)}
.footer-links{display:flex;flex-wrap:wrap;column-gap:1.25rem;row-gap:.5rem}
.footer-links a{font-size:12px;color:var(--t30);transition:color .2s ease}
.footer-links a:hover{color:var(--fg)}

/* ── Auth ── */
.center-wrap{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 10rem);padding:4rem 1.25rem}
.auth-box{width:100%;max-width:400px}
.auth-head{margin-bottom:2.5rem}
.auth-icon{width:3rem;height:3rem;border-radius:1rem;background:var(--icon-bg);display:flex;align-items:center;justify-content:center;margin-bottom:1.5rem}
.auth-icon svg{width:1.25rem;height:1.25rem;color:var(--t60)}
.auth-box h1{font-size:28px;font-weight:700;letter-spacing:-.025em;margin-bottom:.5rem}
.auth-sub{font-size:15px;color:var(--t50)}
.auth-head+.btn-primary{margin-top:0}
.tg-wrap{display:flex;justify-content:center;align-items:center;min-height:48px}
.tg-skeleton{width:220px;height:44px;border-radius:12px;background:linear-gradient(90deg,rgba(0,0,0,.06) 25%,rgba(0,0,0,.11) 50%,rgba(0,0,0,.06) 75%);background-size:800px 100%;animation:shimmer 1.4s infinite linear}
.dark .tg-skeleton{background:linear-gradient(90deg,rgba(255,255,255,.06) 25%,rgba(255,255,255,.11) 50%,rgba(255,255,255,.06) 75%);background-size:800px 100%}
@keyframes shimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}
.auth-note{text-align:center;font-size:11px;color:var(--t25);margin-top:.75rem}
.or-sep{display:flex;align-items:center;gap:.75rem;margin:1.5rem 0}
.or-sep i{flex:1;height:1px;background:var(--line8)}
.or-sep span{font-size:12px;color:var(--t30);flex-shrink:0}

/* ── Кабинет ── */
.cab-wrap{width:100%;max-width:560px;margin:0 auto;padding:6rem 1.25rem 4rem}
.cab-wrap h1{font-size:28px;font-weight:700;letter-spacing:-.025em;margin-bottom:.5rem}
.cab-sub{font-size:15px;color:var(--t50);margin-bottom:2rem}
.panel{background:var(--surface);border:1px solid var(--line8);border-radius:1rem;padding:1.25rem;margin-bottom:.75rem;transition:background .3s ease,border-color .3s ease}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.panel h2{font-size:15px;font-weight:600}
.muted{font-size:13px;color:var(--t50);line-height:1.625}
.status-pill{font-size:12px;font-weight:600;padding:.25rem .75rem;border-radius:999px;white-space:nowrap}
.st-ok{background:rgba(16,185,129,.12);color:#059669}.dark .st-ok{background:rgba(16,185,129,.15);color:#34d399}
.st-warn{background:rgba(245,158,11,.14);color:#b45309}.dark .st-warn{background:rgba(245,158,11,.15);color:#fbbf24}
.st-bad{background:rgba(239,68,68,.12);color:#dc2626}.dark .st-bad{background:rgba(239,68,68,.15);color:#f87171}
.traffic-track{height:6px;border-radius:999px;background:var(--hover);overflow:hidden;margin-top:.875rem}
.traffic-fill{height:100%;border-radius:999px}
.traffic-bar-green{background:linear-gradient(to right,#10b981,#059669)}
.traffic-bar-yellow{background:linear-gradient(to right,#f59e0b,#d97706)}
.traffic-bar-red{background:linear-gradient(to right,#ef4444,#dc2626)}
.dev-list{margin-top:1rem}
.dev-row{display:flex;align-items:center;gap:.75rem;padding:.75rem 0;border-top:1px solid var(--line)}
.dev-info{min-width:0;flex:1}
.dev-name{font-size:14px;font-weight:500;margin-bottom:.125rem}
.dev-link{font-size:11.5px;color:var(--t30);word-break:break-all;line-height:1.5}
.copy-btn{flex-shrink:0;font-size:12px;font-weight:600;background:var(--hover);border:1px solid var(--line);color:var(--fg);border-radius:999px;padding:.375rem .875rem;cursor:pointer;transition:background .2s ease,transform .15s ease}
.copy-btn:hover{background:var(--line10)}
.copy-btn:active{transform:scale(.95)}
.cab-actions{display:flex;flex-direction:column;gap:.75rem;margin-top:1.5rem}
.logout{display:block;text-align:center;font-size:13px;color:var(--t30);margin-top:1.5rem;transition:color .2s ease}
.logout:hover{color:var(--fg)}

/* ── Инструкция (/setup): вертикальный таймлайн 1-2-3, как у референса ── */
.setup-wrap{max-width:680px;margin:0 auto;padding:5rem 1.25rem}
@media(min-width:640px){.setup-wrap{padding:7rem 2rem}}
.setup-head{margin-bottom:4rem}
.setup-head h1{font-size:40px;font-weight:700;letter-spacing:-.025em;line-height:1.2;margin-bottom:1rem}
@media(min-width:640px){.setup-head h1{font-size:52px}}
.setup-head p{font-size:17px;color:var(--t50)}
.step{display:flex;gap:1.5rem}
@media(min-width:640px){.step{gap:2rem}}
.step-rail{display:flex;flex-direction:column;align-items:center}
.step-num{width:2rem;height:2rem;border-radius:999px;border:1px solid var(--line15);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px;font-weight:600;color:var(--t40)}
.step-line{width:1px;flex:1;background:var(--line);margin-top:.75rem}
.step-body{flex:1;min-width:0;padding-bottom:4rem}
.step:last-child .step-body{padding-bottom:0}
.step-body h2{font-size:19px;font-weight:600;margin-bottom:.5rem}
.step-text{font-size:15px;color:var(--t50);line-height:1.625}
.step-text+.chips,.step-text+.step-actions{margin-top:1.25rem}
.step-text .inline-link{color:var(--fg);text-decoration:underline;text-underline-offset:2px;transition:opacity .2s ease}
.step-text .inline-link:hover{opacity:.6}
.chips{display:flex;flex-wrap:wrap;gap:.5rem}
.chip{display:inline-flex;align-items:center;gap:.5rem;font-size:13px;font-weight:500;border:1px solid var(--line10);padding:.5rem 1rem;border-radius:999px;transition:background .2s ease,border-color .2s ease}
.chip:hover{background:var(--hover4);border-color:var(--line15)}
.chip svg{width:1rem;height:1rem;color:var(--t60);flex-shrink:0}
.step-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.btn-sm{font-size:14px;padding:.625rem 1.25rem;gap:.5rem}
.btn-sm svg{width:.875rem;height:.875rem}
.btn-auto{width:auto}

/* ── Toast ── */
#toast-container{position:fixed;bottom:max(1.5rem,calc(1rem + env(safe-area-inset-bottom)));left:50%;transform:translateX(-50%);z-index:9999;display:flex;flex-direction:column;align-items:center;gap:.5rem;pointer-events:none}
.toast{display:inline-flex;align-items:center;gap:.5rem;background:#111;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:.5rem 1rem;font-size:13px;font-weight:500;box-shadow:0 8px 24px rgba(0,0,0,.3);opacity:0;transform:translateY(12px);transition:opacity .24s ease,transform .24s ease;white-space:nowrap}
.toast.show{opacity:1;transform:translateY(0)}
.dark .toast{background:#1c1c1e;border-color:rgba(255,255,255,.1)}
