:root{
  /* Brand */
  --brand1:#4f46e5;
  --brand2:#06b6d4;

  /* Light theme */
  --bg0:#f8fafc;
  --bg1:#eef2ff;
  --card:rgba(255,255,255,.86);
  --text:#0f172a;
  --muted:#475569;
  --border:#e5e7eb;
  --shadow: 0 18px 40px rgba(2,6,23,.08);
  --shadow2: 0 10px 22px rgba(2,6,23,.06);
  --radius:18px;
  --radius2:14px;
  --pad:22px;

  --ring: rgba(99,102,241,.18);
  --inputbg: rgba(255,255,255,.9);
  --pillbg: rgba(255,255,255,.7);
  --featurebg: rgba(255,255,255,.75);
}

/* Dark theme */
[data-theme="dark"]{
  --bg0:#05060a;
  --bg1:#0b1220;
  --card: rgba(15,23,42,.65);
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border: rgba(148,163,184,.18);
  --shadow: 0 18px 40px rgba(0,0,0,.45);
  --shadow2: 0 10px 22px rgba(0,0,0,.35);

  --ring: rgba(6,182,212,.18);
  --inputbg: rgba(2,6,23,.35);
  --pillbg: rgba(2,6,23,.35);
  --featurebg: rgba(2,6,23,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(79,70,229,.20) 0%, transparent 60%),
    radial-gradient(1000px 700px at 90% 10%, rgba(6,182,212,.18) 0%, transparent 55%),
    linear-gradient(180deg,var(--bg0),var(--bg1));
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{ max-width:1100px; margin:0 auto; padding:28px; }

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:900; letter-spacing:-.6px; font-size:20px;
}
.logo{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg,#111827,var(--brand1));
  box-shadow: var(--shadow2);
  overflow:hidden;
}
.logo img{ width:100%; height:100%; display:block; }

.nav{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}

.pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 12px; border:1px solid var(--border);
  background: var(--pillbg);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(2,6,23,.05);
}
.pill small{ color:var(--muted); }

.hero{
  margin-top:64px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 900px){
  .hero{ grid-template-columns:1fr; margin-top:44px; }
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card .inner{ padding: var(--pad); }

.h1{
  font-size:54px; line-height:1.02;
  margin:0 0 14px;
  letter-spacing:-1.2px;
}
@media (max-width: 560px){
  .h1{ font-size:40px; }
}

.lead{
  margin:0;
  color:var(--muted);
  font-size:18px;
  line-height:1.55;
  max-width: 62ch;
}

.kbd{
  display:inline-flex; align-items:center; gap:8px;
  margin-top:14px;
  padding:8px 10px;
  border:1px dashed rgba(165,180,252,.7);
  color:var(--text);
  background: rgba(79,70,229,.08);
  border-radius:12px;
  font-weight:700;
  font-size:13px;
}

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

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 16px;
  border-radius: 14px;
  border:1px solid var(--border);
  font-weight:800;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

.btn-primary{
  border:none;
  color:#fff;
  background: linear-gradient(135deg,#111827,var(--brand1));
  box-shadow: 0 16px 28px rgba(79,70,229,.25);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 22px 40px rgba(79,70,229,.28); text-decoration:none; }

.btn-cyan{
  border:none;
  color:#001018;
  background: linear-gradient(135deg, #67e8f9, var(--brand2));
  box-shadow: 0 16px 28px rgba(6,182,212,.22);
}
.btn-cyan:hover{ transform: translateY(-2px); text-decoration:none; }

.btn-ghost{
  background: var(--pillbg);
}
.btn-ghost:hover{ transform: translateY(-2px); text-decoration:none; }

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}
.col-8{ grid-column: span 8; }
.col-6{ grid-column: span 6; }
.col-4{ grid-column: span 4; }
@media (max-width: 900px){
  .col-8,.col-6,.col-4{ grid-column: span 12; }
}

.feature{
  padding:18px;
  border-radius: var(--radius2);
  border:1px solid var(--border);
  background: var(--featurebg);
  box-shadow: 0 10px 22px rgba(2,6,23,.05);
  transition: transform .15s ease;
}
.feature:hover{ transform: translateY(-3px); }
.feature h3{ margin:0 0 8px; font-size:16px; letter-spacing:-.3px; }
.feature p{ margin:0; color:var(--muted); line-height:1.5; }

.form{ display:grid; gap:12px; }
.label{ font-weight:900; font-size:13px; letter-spacing:.2px; }
.input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: var(--inputbg);
  color: var(--text);
  outline:none;
  font-size:15px;
}
.input:focus{
  border-color: rgba(165,180,252,.85);
  box-shadow: 0 0 0 4px var(--ring);
}
.help{ color:var(--muted); font-size:13px; line-height:1.45; margin:0; }

.alert{
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid rgba(248,113,113,.35);
  background: rgba(248,113,113,.12);
  color: #fb7185;
  font-weight:800;
}

.badge{
  display:inline-flex; align-items:center;
  padding:8px 10px;
  border-radius:999px;
  background: rgba(6,182,212,.10);
  border:1px solid rgba(6,182,212,.25);
  color: var(--text);
  font-weight:900;
  font-size:12px;
}

.divider{ height:1px; background: var(--border); margin:16px 0; }

.footer{
  margin:60px 0 18px;
  color: var(--muted);
  font-size: 13px;
  text-align:center;
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius2);
  border:1px solid var(--border);
  background: var(--card);
}
.table th,.table td{
  text-align:left;
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  vertical-align: top;
}
.table th{
  font-size:12px; letter-spacing:.2px; text-transform:uppercase; color:var(--muted);
}
.table tr:last-child td{ border-bottom:none; }

.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.small{ font-size:13px; color:var(--muted); }
.right{ text-align:right; }

/* Toggle */
.theme-toggle{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--pillbg);
  font-weight:900;
}
.theme-toggle:hover{ transform: translateY(-1px); }
.dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg,var(--brand1),var(--brand2));
}
.progress{
  height:10px;
  width:100%;
  background: rgba(148,163,184,.20);
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--border);
}
.progress > div{
  height:100%;
  width:0%;
  background: linear-gradient(135deg,var(--brand1),var(--brand2));
  transition: width .15s ease;
}
.spinner{
  width:16px; height:16px;
  border-radius:999px;
  border:2px solid rgba(148,163,184,.35);
  border-top-color: var(--brand2);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
