/* Refave website: light, clean, blue → teal accents. Video areas stay dark. */
:root {
    --bg: #f6f8fc;
    --bg2: #ffffff;
    --surface: #ffffff;
    --surface2: #f1f4f9;
    --border: #e4e8f0;
    --border2: #d4dae6;
    --text: #0f172a;
    --text2: #334155;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-soft: #eaf1ff;
    --accent2: #0ea5a4;
    --green: #059669;
    --red: #dc2626;
    --yellow: #b45309;
    --grad: linear-gradient(135deg, #2563eb 0%, #0ea5a4 100%);
    --ink: #0b1220;            /* dark video stages */
    --radius: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .16);
    --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, .35);
    --head: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
body::before {   /* a faint wash of colour at the top of every page */
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 620px;
    background:
        radial-gradient(50% 60% at 15% 0%, rgba(37, 99, 235, .09), transparent 70%),
        radial-gradient(40% 50% at 90% 10%, rgba(14, 165, 164, .08), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
.btn:hover, nav a:hover, .brand:hover, .chip:hover, .studio-credits:hover { text-decoration: none; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.025em; line-height: 1.18; color: var(--text); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.12rem; margin: 0 0 6px; font-weight: 700; }
::selection { background: #cfe0ff; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-size: .84rem; font-weight: 600; color: var(--text2); margin-bottom: 20px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .16); }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.06rem; }

/* ---------- top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 1.22rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.logo {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: var(--grad); color: #fff; font-size: 1rem; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .6);
}
nav { display: flex; gap: 4px; align-items: center; }
nav a { color: var(--text2); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .94rem; transition: color .15s, background .15s; }
nav a:hover { color: var(--text); background: var(--surface2); }
nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; padding: 8px; border-radius: 10px; color: var(--text); }
.nav-burger span { display: block; width: 20px; height: 2px; background: currentColor; margin: 4px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff !important;
    font-weight: 600; font-size: .98rem;
    border: 1px solid transparent; cursor: pointer; font-family: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 6px 16px -6px rgba(37, 99, 235, .55);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 10px 22px -8px rgba(37, 99, 235, .6); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 1.04rem; border-radius: 14px; }
.btn-ghost { background: var(--surface); color: var(--text) !important; border-color: var(--border2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface2); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--red); box-shadow: none; }
.btn-danger:hover { background: #b91c1c; }
.btn[disabled] { opacity: .45; pointer-events: none; }
button.btn { font: inherit; font-weight: 600; }

/* ---------- hero ---------- */
.hero { padding: 76px 0 44px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.06; margin: 0 0 20px; letter-spacing: -.04em; }
.lead { color: var(--text2); font-size: 1.15rem; margin: 0 0 30px; max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; color: var(--muted); font-size: .9rem; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* call-window mock-up */
.mock {
    position: relative; border-radius: 22px; padding: 10px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 4px 8px 10px; font-size: .78rem; color: var(--muted); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.mock-bar i:nth-child(1) { background: #ff5f57; } .mock-bar i:nth-child(2) { background: #febc2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar b { margin-left: auto; font-weight: 500; }
.mock-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #dbe7fb 0%, #c7d7f2 100%); }
.mock-screen svg.person { position: absolute; left: 50%; bottom: 0; width: 72%; transform: translateX(-50%); }
.mock-scan { position: absolute; left: 30%; right: 30%; top: 14%; height: 52%; border-radius: 40%; overflow: hidden; }
.mock-scan::after {
    content: ""; position: absolute; left: 0; right: 0; height: 30%;
    background: linear-gradient(180deg, transparent, rgba(14, 165, 164, .35), transparent);
    animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
.corner { position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--accent); opacity: .9; }
.corner.tl { left: 28%; top: 12%; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner.tr { right: 28%; top: 12%; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner.bl { left: 28%; top: 62%; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner.br { right: 28%; top: 62%; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.pill {
    position: absolute; display: inline-flex; align-items: center; gap: 6px; color: #fff;
    padding: 5px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
    background: rgba(15, 23, 42, .62); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .14);
}
.pill.live { top: 12px; left: 12px; }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.pill.fps { top: 12px; right: 12px; color: #6ee7b7; }
.pill.ai { bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--accent); border-color: transparent; }
.pip {
    position: absolute; right: 12px; bottom: 12px; width: 26%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
    background: linear-gradient(160deg, #f5e6d3, #e8d2b8); border: 2px solid #fff; box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .4);
}
.pip svg { position: absolute; left: 50%; bottom: 0; width: 80%; transform: translateX(-50%); }
.pip small { position: absolute; left: 6px; top: 4px; font-size: .62rem; font-weight: 700; color: var(--text); opacity: .8; }
.float-card {
    position: absolute; left: -28px; bottom: -22px; display: flex; align-items: center; gap: 10px;
    padding: 10px 16px 10px 10px; border-radius: 14px; font-size: .82rem;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    animation: bob 5s ease-in-out infinite;
}
.float-card .thumb { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.1rem; }
.float-card b { display: block; font-size: .85rem; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* "works with" strip */
.works { padding: 30px 0 8px; text-align: center; }
.works p { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 14px; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text2); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-sm); }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.alt .card, .section.alt .steps li, .section.alt .faq details { background: var(--bg); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; counter-reset: s; }
.steps li {
    position: relative; padding: 28px 24px 24px; border-radius: var(--radius); counter-increment: s;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.steps li::before {
    content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px;
    border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--head); font-weight: 800;
}
.steps p { margin: 0; color: var(--muted); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }
.feature:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.icon {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px;
    background: var(--accent-soft); border: 1px solid #d6e4ff;
}

/* face-test promo band */
.promo {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
    padding: 44px; border-radius: 26px; border: 1px solid #d6e4ff;
    background: linear-gradient(135deg, #eef4ff 0%, #ecfbf8 100%);
}
.promo ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 8px; color: var(--text2); }
.promo li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 10px; }
.promo-visual { display: grid; gap: 10px; }
.check-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border); font-weight: 500; box-shadow: var(--shadow-sm);
}
.check-row .st { margin-left: auto; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st.pass { background: #dcfce7; color: #047857; }
.st.warn { background: #fef3c7; color: #b45309; }
.st.fail { background: #fee2e2; color: #b91c1c; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq details[open] { border-color: var(--border2); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 16px; }

.prose { max-width: 760px; }
.prose li { margin-bottom: 6px; }
.prose h2 { font-size: 1.35rem; margin-top: 32px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0; font-size: .9rem; margin-top: 48px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer p { margin: 4px 0; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer .links a { color: var(--text2); }
.footer .links a:hover { color: var(--accent); }
.footer .disclaimer { flex-basis: 100%; color: var(--muted); font-size: .82rem; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- forms / auth ---------- */
.narrow { max-width: 520px; }
.auth { padding: 64px 0; }
.auth .panel { max-width: 440px; margin: 0 auto; padding: 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth h1 { font-size: 1.8rem; text-align: center; }
.auth .sub { text-align: center; color: var(--muted); margin: -4px 0 20px; }
.auth .switch { text-align: center; margin: 18px 0 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.form { display: grid; gap: 16px; margin: 18px 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--text2); }
.form label.check { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; color: var(--muted); }
.form label.check input { margin-top: 5px; accent-color: var(--accent); }
.form input:not([type=checkbox]), .form select, .form textarea, .inline-form input, .cam-test select {
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface);
    color: var(--text); font: inherit; font-weight: 400; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus, .inline-form input:focus, .cam-test select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.form button { justify-self: start; }
.auth .form button { justify-self: stretch; }

.alert { padding: 14px 18px; border-radius: 14px; margin: 18px 0; border: 1px solid; }
.alert-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---------- pricing ---------- */
.pricing { margin: 28px 0; text-align: left; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 28px; }
.price-card h3 { font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.price-card .btn { margin-top: auto; }
.price-card.featured { border: 2px solid var(--accent); box-shadow: 0 24px 50px -24px rgba(37, 99, 235, .45); }
.price-card.featured::before {
    content: "Most popular"; position: absolute; top: -13px; right: 20px; padding: 3px 12px; border-radius: 999px;
    background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700;
}
.price-card:not(.featured) .btn { background: var(--surface); color: var(--text) !important; border-color: var(--border2); box-shadow: var(--shadow-sm); }
.price-card:not(.featured) .btn:hover { background: var(--surface2); }
.price { font-family: var(--head); font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.price-card p.muted { margin: 0 0 22px; }

/* ---------- dashboard ---------- */
.plan-card { margin: 20px 0 40px; padding: 30px; background: linear-gradient(135deg, #eef4ff 0%, #ffffff 60%); border-color: #d6e4ff; }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.install-help { margin: 12px 0 0; color: var(--muted); }
.install-help summary { cursor: pointer; color: var(--text); font-weight: 600; }
.install-help li { margin: 6px 0; }
.pay-steps li { margin-bottom: 8px; }
code { background: var(--surface2); border: 1px solid var(--border); color: #0f3b8c; padding: 1px 7px; border-radius: 6px; font-size: .88em; }
.section h2 { margin-top: 8px; }
.dash h2 { margin-top: 40px; font-size: 1.35rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfd; }
.table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; background: var(--surface2); }
.badge { padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-approved { background: #dcfce7; color: #047857; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { padding: 8px 10px; width: 150px; border-radius: 10px; }
.stats { margin: 16px 0 28px; }
.stat { font-family: var(--head); font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }

.credit-chip { padding: 6px 12px !important; border-radius: 999px !important; background: var(--accent-soft) !important; color: var(--accent) !important; font-weight: 600; font-size: .88rem; }
.balance { font-family: var(--head); font-size: 3.4rem; font-weight: 800; line-height: 1.05; margin: 6px 0; letter-spacing: -.03em; }
.balance small, .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.delta-plus { color: var(--green); font-weight: 700; }
.delta-minus { color: var(--red); font-weight: 700; }

/* ---------- camera test ---------- */
.cam-test { display: flex; gap: 10px; margin: 16px 0 8px; }
.cam-test select { flex: 1; }
#video { width: 100%; max-width: 720px; border-radius: var(--radius); background: var(--ink); margin-top: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- crypto ---------- */
.pay-box { margin: 18px 0 26px; }
.network-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.pay-amount { font-family: var(--head); font-size: 2.2rem; font-weight: 800; letter-spacing: -.01em; color: var(--accent); }
.pay-address { font-size: .95rem; word-break: break-all; padding: 8px 12px; border-radius: 10px; }
.pay-notes { color: var(--muted); font-size: .92rem; padding-left: 18px; }

/* ---------- face test ---------- */
.ft-head { text-align: center; max-width: 700px; margin: 0 auto 32px; }
.ft-head p { color: var(--muted); font-size: 1.05rem; }
.ft-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.drop {
    position: relative; display: grid; place-items: center; text-align: center; min-height: 420px; padding: 32px;
    border-radius: 22px; border: 2px dashed var(--border2); background: var(--surface); cursor: pointer;
    transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: #f5f9ff; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .big { font-size: 2.4rem; width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--accent-soft); border: 1px solid #d6e4ff; }
.drop h3 { font-size: 1.3rem; }
.drop p { color: var(--muted); margin: 4px 0; }
.stage { position: relative; border-radius: 22px; overflow: hidden; background: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow); color: #fff; }
.stage { display: flex; justify-content: center; }
.stage canvas { display: block; max-width: 100%; max-height: 560px; width: auto; height: auto; }
.stage .scanline { position: absolute; inset: 0; pointer-events: none; display: none; }
.stage.busy .scanline { display: block; }
.stage .scanline::after { content: ""; position: absolute; left: 0; right: 0; height: 25%; background: linear-gradient(180deg, transparent, rgba(45, 212, 191, .35), transparent); animation: scan 1.6s linear infinite; }
.stage-bar { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.privacy { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .88rem; margin-top: 14px; justify-content: center; }

.result { padding: 26px; }
.verdict { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring { --p: 0; --c: var(--green); width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface2) 0); }
.ring span { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--head); font-size: 1.6rem; font-weight: 800; }
.verdict h3 { font-size: 1.35rem; margin: 0; }
.verdict p { margin: 2px 0 0; color: var(--muted); }
.checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checks li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.checks .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; margin-top: 1px; }
.checks .pass .ic { background: #dcfce7; color: #047857; }
.checks .warn .ic { background: #fef3c7; color: #b45309; }
.checks .fail .ic { background: #fee2e2; color: #b91c1c; }
.checks b { display: block; font-size: .95rem; }
.checks small { color: var(--muted); display: block; line-height: 1.45; margin-top: 2px; }
.checks .val { color: var(--text2); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 2px; }
.crop-row { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.crop-row canvas { width: 88px; height: 88px; border-radius: 50%; border: 3px solid transparent; background: var(--grad) border-box; flex: none; }
.crop-row p { margin: 0; color: var(--muted); font-size: .9rem; }
.tips { margin-top: 28px; }
.tips .grid4 .card { padding: 20px; }
.tips .card h3 { font-size: 1rem; }
.loading-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); margin-right: 8px; animation: blink 1s infinite; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hero-grid, .promo, .ft-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 48px; }
    .float-card { left: 10px; bottom: -18px; }
    .promo { padding: 28px; }
}
@media (max-width: 760px) {
    .nav-burger { display: block; }
    nav {
        position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
        padding: 12px 16px 18px; background: rgba(255, 255, 255, .98); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow); display: none;
    }
    .nav-toggle:checked ~ nav { display: flex; }
    nav a { padding: 12px; }
    nav .btn { margin-top: 6px; }
    .section { padding: 56px 0; }
    .auth .panel { padding: 26px 20px; }
}

/* ---------- live preview ---------- */
.live-card { margin-top: 28px; padding: 30px; border-color: var(--border);
    background: linear-gradient(135deg, #ffffff 40%, #ecfbf8 100%); }
.live-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: end; }
.live-head h2 { margin-bottom: 6px; }
.live-head p { margin: 0; }
.live-controls { display: grid; gap: 12px; }
.live-controls .check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .92rem; cursor: pointer; }
.live-controls .check input { margin-top: 4px; accent-color: var(--accent); }
.live-controls .btn { justify-self: start; }
#live-status { margin: 0; color: var(--muted); min-height: 1em; }
#live-status.error { color: var(--red); }
#live-stage { margin-top: 24px; }
.live-view { position: relative; border-radius: 18px; overflow: hidden; background: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow); max-width: 960px; margin: 0 auto; color: #fff; }
.live-view video { display: none; }
.live-view canvas { display: block; width: 100%; height: auto; transform: scaleX(-1); }
.live-noface { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; background: rgba(11, 18, 32, .45); color: #fff; }
.live-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 960px; margin: 12px auto; }
.live-bar label { display: flex; align-items: center; gap: 10px; }
.live-bar input[type=range] { accent-color: var(--accent); width: 160px; }
#live-stage > p { max-width: 960px; margin: 0 auto; }
@media (max-width: 900px) { .live-head { grid-template-columns: 1fr; } .live-card { padding: 22px; } }

/* ---------- web studio ---------- */
.studio { padding: 36px 0 24px; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.st-head h1 { font-size: 2.1rem; margin: 0 0 4px; }
.st-head p { margin: 0; max-width: 620px; }
.st-credits { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.st-credits:hover { color: var(--text); text-decoration: none; border-color: #bcd0f7; box-shadow: var(--shadow); }
.st-credits-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff7e6; font-size: 1.1rem; }
.st-credits b { font-family: var(--head); font-size: 1.3rem; }
.st-credits small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.st-credits-buy { margin-left: 6px; padding: 7px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .88rem; }

/* progress: steps tick themselves off from the page state */
.st-steps { list-style: none; display: flex; gap: 8px; padding: 6px; margin: 24px 0 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); counter-reset: none; }
.st-steps li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; transition: background .2s, color .2s; }
.st-steps i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface2); border: 1px solid var(--border2); }
.st-steps li.on, .studio:not(:has(#thumb:not([hidden]))) .s1, .studio:has(#thumb:not([hidden])):not(:has(#placeholder[hidden])):not(:has(#how:not([hidden]))) .s2,
.studio:has(#placeholder[hidden]):not(:has(#how:not([hidden]))) .s3 { background: var(--accent-soft); color: var(--accent); }
.studio:has(#thumb:not([hidden])) .s1 i, .studio:has(#placeholder[hidden]) .s2 i, .studio:has(#how:not([hidden])) .s2 i, .studio:has(#how:not([hidden])) .s3 i { background: var(--green); border-color: var(--green); color: #fff; font-size: 0; }
.studio:has(#thumb:not([hidden])) .s1 i::before, .studio:has(#placeholder[hidden]) .s2 i::before, .studio:has(#how:not([hidden])) .s2 i::before, .studio:has(#how:not([hidden])) .s3 i::before { content: "✓"; font-size: .8rem; }

.st-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.st-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); }
.st-side { display: grid; gap: 20px; }
.st-panel h2 { font-size: 1.05rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.st-no { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; background: var(--accent-soft); color: var(--accent); }
.st-stage-panel { padding: 12px; }
.st-stage { aspect-ratio: 16 / 9; max-width: none; border-radius: 14px; border: 0; box-shadow: none; }
.st-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.studio-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 24px; text-align: center; color: #94a3b8;
    background: radial-gradient(60% 70% at 50% 40%, rgba(37, 99, 235, .18), transparent 70%); }
.studio-placeholder b { color: #e2e8f0; font-size: 1.1rem; }
.studio-placeholder span { font-size: .9rem; max-width: 360px; }
.st-ph-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.8rem !important; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); margin-bottom: 6px; }
.st-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 6px 4px; }
.st-field { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; font-weight: 500; }
.st-mix { margin-left: auto; }
.st-mix input { accent-color: var(--accent); width: 130px; }
.st-cam select { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; max-width: 240px; }
.st-msg { margin: 6px 8px 0; min-height: 0; }
.st-msg:empty { display: none; }
.st-stage-panel .phone-box { margin: 12px 6px 6px; }
.st-drop { min-height: 190px; padding: 16px; margin: 0 0 10px; border-radius: 16px; }
.st-drop .big { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 16px; margin-bottom: 10px; }
.st-drop p { margin: 2px 0 0; }
#thumb { width: 100%; max-width: 200px; aspect-ratio: 1; border-radius: 16px; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .86rem; margin-top: 12px; cursor: pointer; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.consent input { margin-top: 4px; accent-color: var(--accent); }
.studio:has(#consent:checked) .consent { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.small.ok { color: var(--green); }
.small.warn { color: var(--yellow); }
.small.error { color: var(--red); }
#photo-status { margin: 0; }
.ext-steps { padding-left: 18px; color: var(--text2); margin: 10px 0 14px; }
.ext-steps li { margin: 6px 0; }
.ext-ok { color: var(--green); font-weight: 600; margin-top: 0; }
.st-wide { width: 100%; }
.st-app { margin: 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #eef4ff, #ecfbf8); border: 1px solid #d6e4ff; }
.st-stage:has(#placeholder:not([hidden])) canvas { visibility: hidden; }   /* no stale frame behind the placeholder */
.studio-placeholder { background-color: var(--ink); }
@media (max-width: 980px) {
    .st-grid { display: flex; flex-direction: column; }
    .st-side { display: contents; }            /* mobile order: face, preview, calls */
    .st-face { order: 1; } .st-main { order: 2; } .st-calls { order: 3; } .st-app { order: 4; }
    .st-mix { margin-left: 0; }
}
@media (max-width: 600px) {
    .st-stage { aspect-ratio: 4 / 3; }
    .studio-placeholder span:not(.st-ph-ic) { display: none; }
    .st-tools .btn { flex: 1; }
    .st-field { width: 100%; }
    .st-mix input { flex: 1; width: auto; }
    .st-cam select { flex: 1; }
}
@media (max-width: 600px) { .st-steps span { display: none; } .st-head h1 { font-size: 1.7rem; } .st-cam select { max-width: 100%; } }
.cam-pick { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cam-pick select, .live-bar select { flex: 1; min-width: 0; max-width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font: inherit; }

/* phone camera */
.phone-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.qr-frame { width: 168px; height: 168px; flex: none; display: grid; place-items: center; text-align: center; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border2); }
.qr-frame:has(img:not([hidden])) { padding: 0; border: 1px solid var(--border); background: #fff; }
.phone-box img { width: 166px; height: 166px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.phone-box ol { padding-left: 18px; margin: 6px 0; color: var(--text2); }
.phone-box p { margin: 6px 0 0; }
.phone-page main { flex: 1; }
.phone-wrap { max-width: 520px; margin: 0 auto; padding: 18px 16px 28px; display: grid; gap: 14px; }
.phone-wrap .brand { font-size: 1.1rem; }
.phone-view { position: relative; border-radius: 20px; overflow: hidden; background: var(--ink); aspect-ratio: 3 / 4; border: 1px solid var(--border); box-shadow: var(--shadow); }
.phone-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; font-size: 2.4rem; color: #94a3b8; }
.phone-idle span { font-size: .95rem; }
.phone-view .pill.live::before { background: #34d399; }
.phone-status { margin: 0; text-align: center; color: var(--text2); }
.phone-status.ok { color: var(--green); }
.phone-status.error { color: var(--red); }
.phone-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.phone-tip { text-align: center; margin: 0; }
@media (max-width: 520px) { .phone-box { flex-direction: column; align-items: center; } }

/* ---------- spacing fixes ---------- */
.section .wrap > h2:not(:first-child) { margin-top: 44px; font-size: 1.4rem; }
.section .wrap > h1 + .grid3 { margin-bottom: 8px; }
.tips { margin-top: 56px; }
.phone-view video, .phone-view #video { margin: 0; border: 0; border-radius: 0; max-width: none; box-shadow: none; }
