:root {
  --bg: #f7f7fb; --surface: #ffffff; --text: #16162a; --muted: #6b6b80; --line: #e4e4ee;
  --accent: #4f46e5; --accent-2: #7c3aed; --ok: #059669; --warn: #d97706; --err: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0e18; --surface: #171726; --text: #ececf4; --muted: #9a9ab0; --line: #2a2a3d; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
footer { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; gap: 8px; }
.nav nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav nav a { color: var(--text); }
.brand { font-weight: 800; font-size: 20px; color: var(--text) !important; display: flex; align-items: center; gap: 8px; }
.logo { color: var(--accent); }
.langs a { font-size: 12px; color: var(--muted) !important; margin-left: 6px; }
.langs a.on { color: var(--accent) !important; font-weight: 700; }
.demo { background: #fef3c7; color: #78350f; text-align: center; padding: 6px; font-size: 14px; }

.btn { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff !important; border: 0; border-radius: 10px; padding: 12px 22px; font-weight: 600; font-size: 16px; cursor: pointer; }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--muted) !important; border: 1px solid var(--line); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; }
form.inline { display: inline; }

.hero { text-align: center; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.1; margin: 0 0 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 20px; color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.center { text-align: center; }
.muted { color: var(--muted); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.card, .kind, .panel, .plan, .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card h3, .kind h3 { margin: 0 0 6px; font-size: 17px; }
.card p, .kind p { margin: 0; color: var(--muted); font-size: 15px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0 32px; }
.kind.link { color: var(--text); transition: border-color .15s, transform .15s; }
.kind.link:hover { border-color: var(--accent); transform: translateY(-2px); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan.featured { border: 2px solid var(--accent); }
.price { font-size: 36px; font-weight: 800; margin: 8px 0; }
.price span { font-size: 15px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: 15px; }
.plan li { padding: 4px 0; }

.panel { max-width: 640px; margin: 0 auto; }
.panel.narrow { max-width: 400px; }
label { display: block; margin: 14px 0; font-weight: 600; font-size: 14px; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.flash { background: #fee2e2; color: #7f1d1d; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { font-size: 22px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
table.list td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.status { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--line); }
.status.done { background: #d1fae5; color: #065f46; }
.status.running, .status.queued { background: #fef3c7; color: #92400e; }
.status.error { background: #fee2e2; color: #991b1b; }
.tag { font-size: 12px; color: var(--accent); margin-left: 6px; }

.report { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; overflow-x: auto; }
.report table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.report th, .report td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.report th { background: var(--bg); }
.report h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 32px; }

.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 10px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { margin-top: 0; }
.legal h2 { font-size: 19px; }
