:root {
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --soft: #f5f7fb;
    --ok: #15803d;
    --warn: #b45309;
    --bad: #b91c1c;
    --info: #1d4ed8;
    --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 'Inter', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.mid { max-width: 860px; }
.pad { padding-top: 40px; padding-bottom: 60px; }
.section { padding-top: 72px; padding-bottom: 72px; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.big { font-size: 1.4rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; word-break: break-all; }
.text-bad { color: var(--bad); font-weight: 600; }
.inline { display: inline; margin: 0; }
.hide-sm { }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 2px solid var(--brand); padding: 11px 20px; border-radius: 10px; font: 600 1rem/1.2 inherit; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: #eef2ff; color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: #eef2ff; border-color: #eef2ff; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }
button.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }

/* Header & footer */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav nav { display: flex; align-items: center; gap: 18px; font-weight: 500; }
.nav nav a:not(.btn) { color: var(--text); text-decoration: none; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { color: var(--brand); }
.footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }

/* Flash */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; font-size: .95rem; border: 1px solid; }
.flash-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% -10%, #e0e7ff, transparent 60%), radial-gradient(800px 400px at -10% 110%, #fae8ff, transparent 60%); padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; }
.hl { background: linear-gradient(90deg, #4f46e5, #c026d3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: #334155; max-width: 52ch; }
.pill { display: inline-block; background: #eef2ff; color: var(--brand); font-weight: 600; font-size: .85rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hero .ticks { display: flex; flex-wrap: wrap; gap: 8px 20px; color: #334155; font-size: .95rem; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 8px; }
.phone-wrap { display: flex; justify-content: center; }
.phone { width: 300px; height: 600px; border: 12px solid #0f172a; border-radius: 44px; overflow: hidden; background: #000; box-shadow: 0 40px 80px -30px rgba(15,23,42,.5); }
.phone iframe { width: 375px; height: 750px; border: 0; transform: scale(.737); transform-origin: 0 0; pointer-events: none; }
@media (max-width: 899px) { .phone-wrap { display: none; } }

/* Sections */
.band { background: var(--soft); }
.grid-2, .grid-3 { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.section .grid-3 { margin-top: 36px; gap: 24px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step p, .feature p { color: var(--muted); margin: 6px 0 0; }
.feature { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.tpl-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.tpl-thumb { height: 340px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; transition: transform .2s, box-shadow .2s; }
.tpl-card:hover .tpl-thumb { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(15,23,42,.35); }
.tpl-thumb iframe { width: 1280px; height: 1360px; border: 0; transform: scale(.28); transform-origin: 0 0; pointer-events: none; }
@media (max-width: 699px) { .tpl-thumb iframe { transform: scale(.32); } }

/* Pricing */
.pricing { display: grid; gap: 24px; max-width: 760px; margin: 36px auto 0; }
@media (min-width: 700px) { .pricing { grid-template-columns: 1fr 1fr; } }
.price-card { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 30px 60px -30px rgba(79,70,229,.45); }
.price-card h3 { margin: 0; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-card .ticks { flex: 1; }
.badge { position: absolute; top: -13px; right: 20px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }
.cta-box { background: linear-gradient(135deg, #4f46e5, #9333ea); color: #fff; border-radius: 24px; padding: 56px 24px; }
.cta-box p { opacity: .9; }

/* Cards & forms */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
@media (max-width: 500px) { .card { padding: 18px; } }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--brand); }
textarea { resize: vertical; }
.brief-form h2 { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1.2rem; }
.brief-form h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.color-row { display: flex !important; align-items: center; gap: 12px; }
input[type=color] { width: 56px; height: 40px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 2px; background: #fff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.subdomain-input { display: flex; align-items: stretch; }
.subdomain-input input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.subdomain-input span { display: flex; align-items: center; padding: 0 12px; background: var(--soft); border: 1px solid #cbd5e1; border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tpl-pick { display: grid; gap: 10px; }
@media (min-width: 700px) { .tpl-pick { grid-template-columns: repeat(3, 1fr); } }
.tpl-option { display: block !important; cursor: pointer; }
.tpl-option input { position: absolute; opacity: 0; }
.tpl-option span { display: grid; gap: 4px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; height: 100%; }
.tpl-option small { color: var(--muted); font-weight: 400; }
.tpl-option a { font-size: .85rem; font-weight: 500; }
.tpl-option input:checked + span { border-color: var(--brand); background: #eef2ff; }
.tpl-option input:focus-visible + span { outline: 2px solid #c7d2fe; }
.admin-box { border: 2px dashed #c7d2fe; border-radius: 12px; padding: 16px; background: #f8faff; }
.admin-box legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
.summary { background: var(--soft); border-radius: 12px; padding: 18px; margin: 18px 0 20px; }

/* Dashboard */
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.site-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.request { border: 0; padding: 12px 0 0; }
.request .form { margin-top: 12px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.tag-ok { background: #dcfce7; color: var(--ok); }
.tag-warn { background: #fef3c7; color: var(--warn); }
.tag-bad { background: #fee2e2; color: var(--bad); }
.tag-info { background: #dbeafe; color: var(--info); }
.req-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.req-row:last-child { border-bottom: 0; }
.req-row > span:nth-child(2) { flex: 1; }
.req-row form { margin: 0; }
.dns { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
.dns th, .dns td { text-align: left; padding: 10px; border: 1px solid var(--line); }
.dns th { background: var(--soft); }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: #334155; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.admin-nav a { padding: 8px 14px; border-radius: 8px; background: var(--soft); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.admin-nav a:hover { background: #eef2ff; color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--text); }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters select { width: auto; }
.filters input { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 720px; }
.table th { text-align: left; background: var(--soft); padding: 10px 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #fafbff; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.tpl-thumb { position: relative; }
.tpl-thumb iframe { position: absolute; top: 0; left: 0; }
