:root {
    --bg: #f3f5f9;
    --surface: #fff;
    --text: #1b2430;
    --muted: #667085;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e6eaf2;
    --ok: #15803d;
    --err: #be123c;
    --pin: #fff;
    --total: #1e3a5f;
    --hdr: #eef3fb;
    --shadow: 0 8px 24px rgba(28, 41, 61, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: 0 1.5rem;
    min-height: 58px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand {
    display: flex;
    gap: .6rem;
    align-items: center;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}
nav {
    display: flex;
    gap: .25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
nav a {
    color: var(--muted);
    text-decoration: none;
    padding: .4rem .7rem;
    border-radius: 9px;
    font-size: .92rem;
}
nav a.on, nav a:hover { color: var(--text); background: var(--bg); }
nav a.btn { color: #fff; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; flex: 1; }
.wrap-wide { width: min(1400px, calc(100% - 2rem)); }
.foot {
    padding: 1rem 1.5rem;
    color: var(--muted);
    font-size: .85rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    background: #fff;
}
h1 { font-size: clamp(1.45rem, 2.4vw, 2.05rem); letter-spacing: -.03em; margin: 0 0 .7rem; line-height: 1.2; }
h2 { font-size: 1.12rem; margin: 1.1rem 0 .5rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; line-height: 1.55; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--accent); font-weight: 700; margin: 0 0 .6rem; }
.hero { margin: 1.4rem 0 1.8rem; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.2rem; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: .72rem 1.15rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #e8eefc; color: var(--text); }
.btn-ghost:hover { background: #d9e4fb; }
.btn-sm { padding: .4rem .8rem; font-size: .9rem; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}
.card-accent { border-color: #bfdbfe; box-shadow: 0 10px 28px rgba(37, 99, 235, .1); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .85rem;
    margin: 0 0 1.4rem;
}
.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}
.stat span, .stat small { color: var(--muted); display: block; font-size: .82rem; }
.stat strong { font-size: 1.28rem; letter-spacing: -.02em; display: block; margin: .25rem 0 .15rem; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.err { color: var(--err); }
.price { font-size: 1.8rem; font-weight: 700; }
.price small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.code {
    font-family: ui-monospace, monospace;
    font-size: 1.3rem;
    background: #eef2ff;
    padding: .6rem .8rem;
    border-radius: 8px;
    display: inline-block;
}
label { display: block; margin: .7rem 0; font-weight: 600; }
input, select {
    width: 100%;
    margin-top: .3rem;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #f8fafc;
}
.radio { font-weight: 500; }
.radio input { width: auto; margin-right: .4rem; }
.plain { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.plain th, .plain td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.plain th { background: var(--hdr); color: #1e3a5f; font-weight: 600; position: sticky; top: 0; }
.plain tr:last-child td { border-bottom: 0; }
.table-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.sku-wrap { max-height: 75vh; }
.sku-grid { border-collapse: separate; border-spacing: 3px 4px; min-width: 1800px; font-size: 12.5px; }
.demo-table .sku-grid { min-width: 720px; }
.sku-grid th, .sku-grid td {
    padding: 7px 9px;
    white-space: nowrap;
    background: #fff;
    border-radius: 8px;
}
.sku-grid .hdr th {
    background: var(--hdr);
    color: #1e4b8c;
    position: sticky;
    top: 40px;
    z-index: 4;
    font-weight: 600;
}
.sku-grid .totals th {
    background: var(--total);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
    border-radius: 8px;
}
.sku-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.sku-grid .pin { position: sticky; z-index: 3; }
.sku-grid .pin-0 { left: 0; min-width: 72px; }
.sku-grid .pin-1 { left: 72px; min-width: 84px; }
.sku-grid .pin-2 { left: 156px; min-width: 180px; }
.sku-grid .hi { font-weight: 650; }
.sku-grid td.hm { font-variant-numeric: tabular-nums; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .35rem; margin: .6rem 0; }
.pick-grid label { font-weight: 400; }
.steps, .howto ol, .rules { line-height: 1.7; }
.howto p { color: var(--muted); line-height: 1.6; }
.rules { margin: 0; padding-left: 1.1rem; }
.login-card { max-width: 36rem; }
.dev-form { margin-top: 1rem; }
fieldset { border: 1px solid var(--border); border-radius: 12px; margin: 0 0 1rem; }
.bank { margin: .8rem 0; }
.demo-wrap { margin: 2rem 0; }
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
    .top { flex-wrap: wrap; height: auto; padding: .7rem 1rem; }
    nav { width: 100%; }
}
