:root {
    --bg: #0b1220;
    --bg-soft: #121a2b;
    --panel: rgba(15, 23, 42, 0.92);
    --panel-2: rgba(20, 30, 52, 0.9);
    --text: #e5ecff;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --primary: #4f46e5;
    --primary-soft: rgba(79, 70, 229, 0.18);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(2, 8, 23, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 22%),
        var(--bg);
    color: var(--text);
    font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-bottom: 40px;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    width: min(720px, calc(100% - 32px));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(8, 13, 24, 0.72);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand strong {
    display: block;
    letter-spacing: 0.01em;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.brand-badge {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.topnav a {
    color: var(--muted);
    font-size: 14px;
}

.topnav a:hover {
    color: var(--text);
}

.section,
.hero {
    padding: 44px 0;
}

.hero {
    padding-top: 64px;
}

.hero-grid,
.section-grid,
.grid-two {
    display: grid;
    gap: 20px;
}

.hero-grid {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
}

.section-grid {
    grid-template-columns: repeat(3, 1fr);
}

.grid-two {
    grid-template-columns: repeat(2, 1fr);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head.compact {
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.16);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1, h2, h3 {
    line-height: 1.1;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.1rem; }

.lead {
    color: #cad7f4;
    font-size: 1.05rem;
    max-width: 68ch;
}

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(12, 19, 33, 0.95));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.code-panel pre {
    margin: 0;
    white-space: pre-wrap;
    color: #dbe4ff;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.28);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--line);
    color: var(--text);
}

.button-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.24);
}

.button-small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.hero-actions,
.form-actions,
.table-actions,
.mock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions { margin-top: 22px; }

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.mini-stats.three {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    padding: 18px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    border: 1px solid var(--line);
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.notice {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.notice-success {
    background: rgba(34, 197, 94, 0.12);
    color: #dcfce7;
    border-color: rgba(34, 197, 94, 0.24);
}

.notice-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.24);
}

.notice-preview {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding: 14px 0;
    margin-top: 0;
    border-radius: 0;
}

.form-grid {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
}

label > span {
    font-weight: 600;
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(5, 11, 22, 0.74);
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

small,
.muted,
.small {
    color: var(--muted);
}

small code {
    color: #dbe4ff;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}

.table thead th {
    color: #cbd5e1;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.badge-success {
    color: #dcfce7;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.22);
}

.badge-muted {
    color: #cbd5e1;
}

.inline-form {
    display: inline;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 12px;
}

.mock-panel {
    min-height: 280px;
}

.mock-tool-head {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.mock-tool-head span {
    color: var(--muted);
    font-size: 14px;
}

.mock-dropzone {
    display: grid;
    place-items: center;
    min-height: 140px;
    border-radius: 16px;
    border: 1px dashed rgba(129, 140, 248, 0.32);
    background: rgba(79, 70, 229, 0.08);
    color: #c7d2fe;
    margin-bottom: 16px;
}

.checklist ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.checklist li {
    color: #dce6ff;
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer {
    border-top: 1px solid var(--line);
    margin-top: 40px;
    background: rgba(5, 11, 22, 0.55);
}

.footer-inner {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 960px) {
    .hero-grid,
    .section-grid,
    .grid-two,
    .cta-panel,
    .footer-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .section-head,
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .mini-stats,
    .mini-stats.three {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 760px;
    }
}

@media (max-width: 640px) {
    .container,
    .narrow {
        width: min(100% - 24px, 1120px);
    }

    .hero,
    .section {
        padding: 28px 0;
    }

    .panel {
        padding: 18px;
    }
}
