:root {
	--bg: #ffffff;
	--bg-soft: #f6f7fb;
	--ink: #0f172a;
	--ink-2: #475569;
	--line: #e5e7ef;
	--brand: #4f46e5;
	--brand-2: #7c3aed;
	--brand-3: #06b6d4;
	--ok: #059669;
	--danger: #dc2626;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
	--grad: linear-gradient(120deg, var(--brand-2), var(--brand) 55%, var(--brand-3));
	--checker: repeating-conic-gradient(#e7e9ef 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
	color-scheme: light;
}
* { box-sizing: border-box; }
/* .btn sets display, which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
code { background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 6px; }
pre { background: #0b1020; color: #e2e8f0; padding: 18px 20px; border-radius: 12px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow-wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 500; }
.nav a.btn { color: #fff; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
	background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.big { padding: 14px 26px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Tangerine promo strip */
.promo { display: block; background: linear-gradient(90deg, #ff6a00, #ff8a00 50%, #ffa31a); color: #fff; font-weight: 700; text-align: center; padding: 12px 16px; font-size: 15px; letter-spacing: 0.01em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08); }
.promo:hover { text-decoration: none; filter: brightness(1.05); }
.promo .go { display: inline-block; margin-left: 10px; background: #fff; color: #e65c00; padding: 3px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.promo-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding: 20px 24px; border-radius: var(--radius); background: linear-gradient(110deg, #ff6a00, #ff9500); color: #fff; box-shadow: 0 10px 30px rgba(255, 106, 0, 0.3); }
.promo-card:hover { text-decoration: none; filter: brightness(1.04); }
.promo-card b { font-size: 19px; display: block; }
.promo-card span { opacity: 0.95; }
.promo-card .btn { background: #fff; color: #e65c00; border-color: transparent; }

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 70% -10%, #eef0ff 0%, transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #eef0ff; color: var(--brand); font-weight: 600; font-size: 14px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); margin: 16px 0; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.hero small { color: var(--ink-2); }
.demo { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--checker); }
.demo .half { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.demo .before { background: linear-gradient(160deg, #fde68a, #f59e0b 60%, #b45309); clip-path: inset(0 50% 0 0); }
.demo .subject { width: 46%; aspect-ratio: 1; margin-bottom: 8%; border-radius: 28px; background: var(--grad); box-shadow: 0 20px 40px rgba(79, 70, 229, 0.35); transform: rotate(-6deg); }
.demo .labels { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.demo .labels span { background: rgba(15, 23, 42, 0.75); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.demo .divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; }

/* Sections */
section.block { padding: 72px 0; }
section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 12px; }
.section-head p { color: var(--ink-2); font-size: 18px; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--ink-2); }
.card.danger { border-color: var(--danger); background: #fff5f5; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: #eef0ff; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; }

/* Pricing */
.toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 0 auto 28px; }
.toggle button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.toggle button.on { background: var(--ink); color: #fff; }
.center { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border: 2px solid var(--brand); position: relative; }
.plan.best::after { content: 'Best value'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .credits { font-weight: 700; font-size: 18px; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.plan .per { color: var(--ink-2); font-size: 14px; }
.plan .btn { margin-top: 12px; }
.note { color: var(--ink-2); font-size: 14px; text-align: center; margin-top: 18px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 17px; }
details p { color: var(--ink-2); margin: 10px 0 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--ink-2); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: var(--ink-2); }

/* Dashboard */
.dash { padding: 36px 0 64px; }
.dash h1 { margin: 0 0 4px; }
.muted { color: var(--ink-2); }
.balance { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; }
.kv { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.keybox { display: flex; gap: 8px; align-items: center; background: var(--bg-soft); border: 1px dashed var(--line); padding: 12px 14px; border-radius: 12px; font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.alert { padding: 12px 16px; border-radius: 12px; background: #ecfdf5; color: #065f46; margin: 12px 0; }
.alert.warn { background: #fffbeb; color: #92400e; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bars div { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.85; }
input[type='email'], input[type='text'], input[type='number'], input:not([type]), textarea {
	font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); width: 100%; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--brand); }
.center-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg-soft); padding: 16px; }
.narrow { max-width: 420px; width: 100%; text-align: center; display: grid; gap: 14px; justify-items: center; }
.narrow h1 { font-size: 24px; margin: 0; }

/* Docs */
.doc { padding: 40px 0 72px; }
.doc h2 { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Admin */
.admin main { padding: 24px 20px 80px; }
.admin table { margin-bottom: 24px; }
.admin form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.admin form.inline input { width: auto; }
.admin .setting { display: grid; gap: 6px; margin: 16px 0; }
.admin textarea { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

@media (max-width: 860px) {
	.hero .wrap, .grid2 { grid-template-columns: 1fr; }
	.grid3 { grid-template-columns: 1fr; }
	.nav a:not(.btn) { display: none; }
	.hero { padding-top: 40px; }
}
