:root {
  --brand: #6c4cf1;
  --brand-2: #9b7bff;
  --brand-ink: #3a22b8;
  --ink: #0c1023;
  --muted: #5c6480;
  --line: #e7e8f2;
  --bg: #ffffff;
  --soft: #f7f7fd;
  --ok: #0f9d58;
  --warn: #b26a00;
  --bad: #d93025;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 20, 45, .04), 0 12px 32px -18px rgba(16, 20, 45, .25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.wrap.narrow { width: min(820px, calc(100% - 40px)); }
.wrap.wide { width: min(1240px, calc(100% - 40px)); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 14px -4px rgba(108,76,241,.7);
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.is-active { color: var(--ink); font-weight: 600; }
.nav-sep { width: 1px; height: 22px; background: var(--line); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 22px; cursor: pointer; }
.wallet-chip { font-weight: 700; font-size: 13px; color: var(--brand-ink); background: #f1edff; padding: 6px 11px; border-radius: 999px; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(108,76,241,.9); }
.btn.primary:hover { background: #5a3ce0; transform: translateY(-1px); }
.btn.primary.soft { background: #eeeaff; color: var(--brand-ink); box-shadow: none; }
.btn.primary.soft:hover { background: #e2dcff; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #c9cbe0; }
.btn.ghost.danger { color: var(--bad); border-color: #f3c9c5; }
.btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: 8px; }
.btn.lg { padding: 14px 26px; font-size: 16.5px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(108,76,241,.16), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, rgba(34,211,238,.14), transparent 55%),
    linear-gradient(180deg, #fbfaff, #ffffff 70%);
  padding: 76px 0 60px;
  border-bottom: 1px solid var(--line);
}
.hero-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); margin: 0 0 18px; }
.hero-title { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 800; }
.grad { background: linear-gradient(92deg, var(--brand), #22d3ee 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 640px; font-size: 18px; color: var(--muted); margin: 0 0 30px; }
.search-box {
  display: flex; align-items: center; gap: 6px; max-width: 640px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow);
}
.search-box input { flex: 1; min-width: 80px; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 10px 4px; }
.search-prefix { color: var(--muted); font-weight: 500; }
.search-suffix { color: var(--ink); font-weight: 600; white-space: nowrap; }
.search-btn { padding: 10px 20px; }
.search-result { min-height: 24px; margin: 12px 0 0; font-size: 14.5px; font-weight: 500; }
.search-result.ok { color: var(--ok); }
.search-result.bad { color: var(--bad); }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; color: var(--muted); font-size: 14px; }

.band { border-bottom: 1px solid var(--line); background: #fff; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 26px 0; }
.band-grid div { display: flex; flex-direction: column; }
.band-grid strong { font-size: 22px; letter-spacing: -.02em; }
.band-grid span { color: var(--muted); font-size: 13.5px; }

/* ---------- sections ---------- */
.section { padding: 78px 0; }
.section.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); margin: 0 0 10px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; margin: 0 0 12px; font-weight: 800; }
.section-sub { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 38px; }
.section-h { font-size: 18px; margin: 34px 0 12px; letter-spacing: -.01em; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.plan-card.featured { border-color: #cfc0ff; box-shadow: 0 20px 50px -28px rgba(108,76,241,.55); }
.plan-flag {
  position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.plan-name { margin: 0 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.plan-price { margin: 0 0 18px; display: flex; align-items: baseline; gap: 6px; }
.plan-price .amount { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.plan-price .per { color: var(--muted); font-size: 14px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 14.5px; color: #363c55; }
.plan-list li::before { content: '✓'; color: var(--ok); font-weight: 700; margin-right: 8px; }
.plan-card .btn { margin-top: auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feature-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #f1edff; font-size: 19px; flex: none; }
.feature h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.step { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.step h3 { margin: 2px 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.cta { background: linear-gradient(120deg, #1a1140, #3a22b8 60%, #6c4cf1); color: #fff; padding: 66px 0; }
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 10px; letter-spacing: -.03em; }
.cta p { color: #cfc8ff; margin: 0 0 26px; font-size: 17px; }
.cta .btn.primary { background: #fff; color: var(--brand-ink); box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }

/* ---------- footer ---------- */
.site-foot { background: #0b0d1a; color: #b9bdd2; padding: 54px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand { color: #fff; margin-bottom: 12px; }
.foot-note { font-size: 14px; color: #8f95b2; max-width: 320px; }
.site-foot h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.site-foot a { display: block; color: #b9bdd2; font-size: 14.5px; padding: 4px 0; }
.site-foot a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #1d2136; margin-top: 34px; padding-top: 20px; font-size: 13px; color: #7c82a1; }

/* ---------- forms & auth ---------- */
.auth { display: grid; place-items: center; padding: 60px 20px; min-height: 62vh; }
.auth-card { width: min(420px, 100%); padding: 32px; }
.auth-card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.auth-alt { margin: 18px 0 0; font-size: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; font-size: 16.5px; }
.stack { display: grid; gap: 8px; }
.stack label, .form-card label { font-size: 13.5px; font-weight: 600; color: #343b57; margin-top: 8px; }
input, textarea, select {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid #d9dbe9; border-radius: 9px; padding: 10px 12px; width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,76,241,.14); }
textarea { resize: vertical; }
.mini-input { width: 86px; padding: 6px 8px; font-size: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.label-like { font-size: 13.5px; font-weight: 600; color: #343b57; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.addr-field { display: flex; align-items: center; gap: 8px; }
.addr-field input { flex: 1; }
.addr-field .suffix { color: var(--muted); font-weight: 600; white-space: nowrap; }
.check-result { font-size: 13px; min-height: 18px; }
.radio-col { display: grid; gap: 8px; }
.radio-plan { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.radio-plan:has(input:checked) { border-color: var(--brand); background: #faf8ff; }
.radio-plan input { width: auto; margin-top: 4px; }
.radio-body { display: grid; gap: 2px; font-size: 14.5px; }
.row { display: flex; align-items: center; gap: 12px; }

/* ---------- alerts, pills, tables ---------- */
.alert { border-radius: 10px; padding: 11px 14px; font-size: 14.5px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--soft); }
.alert.ok { background: #eefaf2; border-color: #bfe8cf; color: #0a6b3d; }
.alert.bad { background: #fdf0ef; border-color: #f6cfcb; color: #9f2318; }
.alert.warn { background: #fff8e8; border-color: #f3e0b5; color: #7a4c00; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.pill.ok { background: #e8f8ee; color: #0a6b3d; }
.pill.warn { background: #fff3d6; color: #7a4c00; }
.pill.bad { background: #fdeceb; color: #9f2318; }
.pill.muted { background: #eef0f7; color: #4c5470; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfbfe; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid #f0f1f7; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.files td { vertical-align: middle; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- app shell ---------- */
body.app main { padding: 34px 0 70px; }
body.app main > :first-child { margin-top: 0; }
h1 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 6px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 8px 0 24px; }
.panel-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.crumb { display: inline-block; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat-num { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.stat span:last-child { font-size: 13px; color: var(--muted); }
.stat-cta { justify-content: center; align-items: flex-start; }
.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.site-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); box-shadow: var(--shadow); transition: border-color .12s ease, transform .12s ease; }
.site-card:hover { text-decoration: none; border-color: #c9bfff; transform: translateY(-1px); }
.site-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.site-name { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.domain-dim { color: var(--muted); font-weight: 500; }
.site-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.site-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.empty { text-align: center; padding: 44px 20px; }
.empty h2 { margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 0 18px; }
.order-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.kv { margin: 0 0 14px; display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.balance-big { font-size: 32px; font-weight: 800; margin: 6px 0 8px; letter-spacing: -.03em; }
.amount-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: #3d4360; cursor: pointer; }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:hover { text-decoration: none; border-color: #c9cbe0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.meter { height: 8px; background: #eef0f7; border-radius: 99px; overflow: hidden; margin: 0 0 18px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.pay-box { border: 1px dashed #cfc0ff; background: #faf8ff; border-radius: 12px; padding: 16px 18px; margin: 12px 0 16px; }
.pay-box h4 { margin: 0 0 8px; font-size: 15px; }
.pay-box p { margin: 4px 0; font-size: 14.5px; }
.how-list { margin: 0 0 12px; padding-left: 20px; color: #3a405c; font-size: 14.5px; }
.how-list li { margin-bottom: 6px; }
.crumbs { font-size: 14px; margin-bottom: 12px; }
.crumbs .sep { color: #c3c6d8; margin: 0 2px; }
.file-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.upload-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fname a { font-weight: 600; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.6; background: #0f1220; color: #e6e8f5; border-color: #1d2136; }
.prose { max-width: 760px; color: #363c55; }
.prose h2 { font-size: 18px; margin: 26px 0 6px; }
.prose p { margin: 0 0 10px; }
.reveal { cursor: pointer; }
.page-head { padding-top: 54px; }

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: 1fr; max-width: 460px; }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .order-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav { position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 14px 20px 18px; gap: 10px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-sep { display: none; }
  .search-box { flex-wrap: wrap; padding: 10px; }
  .search-prefix { display: none; }
  .search-btn { width: 100%; }
  .hero { padding: 52px 0 44px; }
  .section { padding: 54px 0; }
  .site-grid, .stat-grid, .feature-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .foot-bottom { flex-direction: column; }
  .panel-head { flex-direction: column; }
  .row-actions { justify-content: flex-start; }
}
