/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Dark theme (default) ───────────────────────────── */
:root, [data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --card: #334155;
    --accent: #38bdf8;
    --accent2: #818cf8;
    --accent3: #f472b6;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #475569;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,.35);
    --header-bg: rgba(15,23,42,.85);
    --hero-glow: rgba(56,189,248,.12);
    --chart-grid: rgba(71,85,105,.2);
    --chart-text: #94a3b8;
    --chart-label: #cbd5e1;
    --chart-datalabel: #e2e8f0;
    --tooltip-bg: rgba(15,23,42,.92);
    --tooltip-title: #f1f5f9;
    --tooltip-body: #94a3b8;
    --tooltip-border: #475569;
    --gauge-track: #334155;
    --btn-primary-text: #0f172a;
}

/* ── Light theme ───────────────────────────────────── */
[data-theme="light"] {
    --bg: #eef1f6;
    --surface: #f7f8fb;
    --card: #dfe3ec;
    --accent: #0369a1;
    --accent2: #4f46e5;
    --accent3: #db2777;
    --text: #1e293b;
    --muted: #556475;
    --border: #c7cdd8;
    --shadow: 0 2px 12px rgba(30,41,59,.07), 0 4px 24px rgba(30,41,59,.05);
    --header-bg: rgba(238,241,246,.92);
    --hero-glow: rgba(3,105,161,.06);
    --chart-grid: rgba(199,205,216,.55);
    --chart-text: #556475;
    --chart-label: #334155;
    --chart-datalabel: #2d3a4a;
    --tooltip-bg: rgba(247,248,251,.97);
    --tooltip-title: #1e293b;
    --tooltip-body: #475569;
    --tooltip-border: #c7cdd8;
    --gauge-track: #dfe3ec;
    --btn-primary-text: #ffffff;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background .3s, color .3s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ───────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 64px;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background .3s;
}
.logo {
    font-size: 1.35rem; font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
nav a { margin-left: 1.5rem; color: var(--muted); font-size: .9rem; transition: color .2s; }
nav a:hover { color: var(--text); text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 3.5rem;
    background: radial-gradient(ellipse at 50% 0%, var(--hero-glow) 0%, transparent 60%);
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .75rem; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.75rem; border-radius: 9999px;
    font-weight: 600; font-size: .95rem; border: none; cursor: pointer;
    transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--btn-primary-text); box-shadow: 0 4px 20px rgba(56,189,248,.35); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ── Section common ───────────────────────────────────── */
section { padding: 3.5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.section-title {
    text-align: center; font-size: 1.6rem; margin-bottom: .5rem;
}
.section-sub {
    text-align: center; color: var(--muted); margin-bottom: 2.5rem; font-size: .95rem;
}

/* ── KPI Cards ────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    opacity: 0;
    transform: translateY(24px);
    overflow: hidden;
    min-width: 0;
}
.kpi-card.visible {
    animation: kpiFadeIn .6s ease forwards;
}
@keyframes kpiFadeIn {
    to { opacity: 1; transform: translateY(0); }
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.kpi-icon { font-size: 2rem; margin-bottom: .5rem; }
.kpi-value {
    font-size: clamp(1.25rem, 2.5vw, 1.9rem); font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kpi-label { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

/* ── Chart containers ─────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
    gap: 1.5rem;
}
.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.chart-card h3 {
    font-size: 1.05rem; margin-bottom: 1rem; color: var(--muted);
}
.chart-card canvas { width: 100% !important; }
.chart-card.full-width { grid-column: 1 / -1; }

/* ── Gauge ────────────────────────────────────────────── */
.gauge-row {
    display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; align-items: center;
}
.gauge-stat {
    text-align: center; min-width: 140px;
}
.gauge-stat .big { font-size: 2.4rem; font-weight: 700; color: var(--accent); }
.gauge-stat .label { color: var(--muted); font-size: .85rem; }
.progress-ring-wrap { position: relative; width: 180px; height: 180px; }
.progress-ring-wrap .center-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 700; color: var(--accent);
}

/* ── Features ─────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.feature-card h4 { margin-bottom: .35rem; }
.feature-card p { color: var(--muted); font-size: .9rem; }

/* ── Pricing ──────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem; max-width: 900px; margin: 0 auto;
}
.price-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.popular { border-color: var(--accent); }
.price-card .plan { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.price-card .amount { font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.price-card .period { color: var(--muted); font-size: .85rem; }
.price-card ul { list-style: none; margin: 1.25rem 0; text-align: left; }
.price-card ul li { padding: .3rem 0; color: var(--muted); font-size: .9rem; }
.price-card ul li::before { content: '✓ '; color: var(--accent); font-weight: 700; }

/* ── Footer ───────────────────────────────────────────── */
footer {
    text-align: center; padding: 2rem 1rem;
    border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem;
}

/* ── Responsive ───────────────────────────────────────── */

/* --- Burger button (hidden on desktop) --- */
.burger {
    display: none;
    background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px;
    padding: 6px; margin-left: .75rem;
    z-index: 110;
}
.burger span {
    display: block; width: 24px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Tablet ≤ 900px --- */
@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-card.full-width { grid-column: auto; }

    .pricing-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
    }
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    section { padding: 3rem 1.25rem; }
}

/* --- Mobile ≤ 768px --- */
@media (max-width: 768px) {
    .burger { display: flex; }

    .nav-group {
        flex-direction: row; align-items: center;
    }
    #mainNav {
        position: fixed; top: 64px; left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: flex; flex-direction: column;
        padding: 1rem 1.5rem;
        transform: translateY(-120%);
        opacity: 0;
        transition: transform .35s ease, opacity .3s ease;
        z-index: 105;
        box-shadow: var(--shadow);
    }
    #mainNav.open {
        transform: translateY(0);
        opacity: 1;
    }
    #mainNav a {
        margin: 0; padding: .75rem 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }
    #mainNav a:last-child { border-bottom: none; }

    .hero { padding: 3.5rem 1.25rem 2.5rem; }
    .hero h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 320px; justify-content: center; }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    .kpi-card { padding: 1.25rem 1rem; }
    .kpi-value { font-size: clamp(1.15rem, 3vw, 1.6rem); }
    .kpi-icon { font-size: 1.6rem; }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px; margin: 0 auto;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }

    .gauge-row { gap: 1.25rem; }
    .gauge-stat .big { font-size: 1.8rem; }
    .gauge-stat { min-width: 100px; }
    .progress-ring-wrap { width: 150px; height: 150px; }
    .progress-ring-wrap svg { width: 150px; height: 150px; }
    .progress-ring-wrap .center-text { font-size: 1.3rem; }

    .section-title { font-size: 1.35rem; }
    .section-sub { font-size: .9rem; margin-bottom: 2rem; }

    section { padding: 2.5rem 1rem; }
    header { padding: 0 1rem; }
    footer { font-size: .8rem; padding: 1.5rem 1rem; }
}

/* --- Small mobile ≤ 420px --- */
@media (max-width: 420px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }
    .kpi-card { padding: 1rem .75rem; }
    .kpi-value { font-size: clamp(1rem, 4vw, 1.35rem); }
    .kpi-label { font-size: .78rem; }

    .hero { padding: 2.5rem 1rem 2rem; }
    .hero h1 { font-size: 1.35rem; }
    .hero p { font-size: .9rem; margin-bottom: 1.5rem; }

    .chart-card { padding: 1rem; }
    .chart-card h3 { font-size: .95rem; }

    .gauge-row { flex-direction: column; gap: 1rem; }
    .gauge-stat { min-width: auto; }
    .gauge-stat .big { font-size: 1.5rem; }

    .price-card { padding: 1.5rem; }
    .price-card .amount { font-size: 1.8rem; }

    .feature-card { padding: 1.25rem; }
    .feature-card .icon { font-size: 1.5rem; }

    header { height: 56px; }
    #mainNav { top: 56px; }

    .logo { font-size: 1.15rem; }
    .theme-toggle { width: 30px; height: 30px; font-size: .85rem; }
    .btn { padding: .65rem 1.25rem; font-size: .9rem; }
}
/* ── Theme toggle ──────────────────────────────────── */
.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background .3s, border-color .3s, transform .2s;
    margin-left: 1rem;
    flex-shrink: 0;
}
.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: opacity .3s, transform .3s; position: absolute; }
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(0); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0); }

.nav-group {
    display: flex; align-items: center;
}

/* ── Documentation page ───────────────────────────────── */
.doc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.doc-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: .5rem;
}
.doc-card h4 {
    font-size: .95rem;
    margin: 1.25rem 0 .5rem;
    color: var(--muted);
}
.doc-card p {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: .75rem;
    line-height: 1.7;
}
.doc-card pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: .85rem;
    line-height: 1.6;
    margin: .5rem 0 .75rem;
}
.doc-card pre code {
    color: var(--accent);
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}
.doc-card code {
    background: var(--bg);
    padding: .15rem .45rem;
    border-radius: 6px;
    font-size: .85rem;
    color: var(--accent);
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

/* Endpoint header */
.endpoint-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.endpoint-url {
    font-size: 1rem !important;
    padding: .35rem .75rem !important;
    background: var(--bg) !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    word-break: break-all;
}

/* Method badge */
.method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .85rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .5px;
    white-space: nowrap;
}
.method-badge.get {
    background: rgba(56, 189, 248, .15);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, .3);
}
.method-badge.post {
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, .3);
}
.method-badge.small {
    padding: .2rem .55rem;
    font-size: .72rem;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .78rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}
.status-200 {
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, .3);
}
.status-400 {
    background: rgba(251, 191, 36, .15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, .3);
}
.status-404 {
    background: rgba(251, 146, 60, .15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, .3);
}
.status-500 {
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, .3);
}
.status-401 {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .25);
}
.status-422 {
    background: rgba(168, 85, 247, .15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, .3);
}

/* Doc table */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: .75rem 0;
    font-size: .9rem;
}
.doc-table th {
    text-align: left;
    padding: .65rem .75rem;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.doc-table td {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.doc-table tbody tr:hover {
    background: rgba(56, 189, 248, .04);
}
.table-responsive {
    overflow-x: auto;
}

/* Info box */
.info-box {
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 .5rem;
    font-size: .9rem;
    color: var(--text);
}
.info-box code {
    background: rgba(56, 189, 248, .12);
}
.info-note {
    background: rgba(251, 191, 36, .08);
    border-color: rgba(251, 191, 36, .2);
}

/* Hierarchy chain */
.hierarchy-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.hierarchy-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: .5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
}
.hierarchy-arrow {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
}

/* TOC grid */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}
.toc-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: .92rem;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.toc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    text-decoration: none;
}
.toc-icon {
    font-size: 1.3rem;
}

/* Documentation responsive */
@media (max-width: 768px) {
    .doc-card { padding: 1.25rem; }
    .doc-card pre { padding: 1rem; font-size: .8rem; }
    .hierarchy-chain { gap: .35rem; padding: 1rem; }
    .hierarchy-item { padding: .35rem .75rem; font-size: .8rem; }
    .hierarchy-arrow { font-size: 1rem; }
    .toc-grid { grid-template-columns: repeat(2, 1fr); }
    .endpoint-header { gap: .5rem; }
    .doc-table { font-size: .82rem; }
    .doc-table th, .doc-table td { padding: .5rem; }
}
@media (max-width: 420px) {
    .toc-grid { grid-template-columns: 1fr; }
    .hierarchy-chain { flex-direction: column; }
    .hierarchy-arrow { transform: rotate(90deg); }
}

/* ══════════════════════════════════════════════════════════════
   Registration Page
   ══════════════════════════════════════════════════════════════ */

/* Nav register button */
.nav-register {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

/* Registration section */
.register-section {
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
}
.register-header {
    text-align: center;
    margin-bottom: 2rem;
}
.register-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: .5rem;
}
.register-sub {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Card */
.register-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Fields */
.reg-field {
    margin-bottom: 1.25rem;
}
.reg-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--text);
}
.reg-icon {
    margin-right: .25rem;
}
.reg-input {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}
.reg-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
}
.reg-input.input-validation-error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, .05);
}
.reg-hint {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-top: .25rem;
}
.reg-error, .field-validation-error {
    display: block;
    color: #EF4444;
    font-size: .82rem;
    margin-top: .2rem;
    min-height: 1.1em;
}
.reg-error-summary {
    color: #EF4444;
    font-size: .88rem;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, .06);
    border: 1px solid rgba(239, 68, 68, .15);
}
.reg-error-summary:empty {
    display: none;
}
.reg-error-summary ul { margin: 0; padding-left: 1.25rem; }

/* Tariff section */
.reg-tariff {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.reg-tariff-title {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .75rem;
    color: var(--text);
}
.reg-tariff-active {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem;
    background: rgba(16, 185, 129, .08);
    border: 1px solid rgba(16, 185, 129, .25);
    border-radius: 8px;
    margin-bottom: .5rem;
}
.reg-tariff-check { font-size: 1.1rem; }
.reg-tariff-active strong {
    font-size: 1rem;
    color: var(--text);
}
.reg-tariff-features {
    list-style: none;
    padding: 0;
    margin: .25rem 0 0;
    font-size: .82rem;
    color: var(--muted);
}
.reg-tariff-features li::before {
    content: "• ";
    color: #10B981;
}
.reg-tariff-locked {
    padding: .5rem .75rem;
    font-size: .85rem;
    color: var(--muted);
    opacity: .6;
}
.reg-badge {
    font-size: .7rem;
    background: var(--border);
    color: var(--text);
    padding: .1rem .4rem;
    border-radius: 4px;
    margin-left: .25rem;
}

/* Checkbox */
.reg-checkbox-field {
    margin-bottom: 1.5rem;
}
.reg-checkbox-label {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    font-size: .88rem;
    color: var(--text);
    cursor: pointer;
}
.reg-checkbox {
    margin-top: .2rem;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Submit button */
.reg-submit {
    width: 100%;
    padding: .85rem;
    font-size: 1rem;
    justify-content: center;
    position: relative;
}
.reg-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.reg-submit.loading {
    color: transparent;
}
.reg-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--btn-primary-text);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer link */
.reg-footer-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: .88rem;
    color: var(--muted);
}

/* ── Benefits section ──── */
.register-benefits {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.benefit-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .2s, box-shadow .2s;
}
.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.benefit-icon {
    font-size: 1.75rem;
    margin-bottom: .5rem;
}
.benefit-card h4 {
    margin-bottom: .25rem;
    font-size: .95rem;
}
.benefit-card p {
    font-size: .82rem;
    color: var(--muted);
}

/* ── Quick Start section ──── */
.register-quickstart {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    text-align: center;
}
.quickstart-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.quickstart-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: .9rem;
}
.step-number {
    width: 28px; height: 28px;
    background: var(--accent);
    color: var(--btn-primary-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.quickstart-arrow {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
}
.quickstart-code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-align: left;
    overflow-x: auto;
}
.quickstart-code code {
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: .85rem;
    color: var(--accent);
    white-space: pre;
}

/* ══════════════════════════════════════════════════════════════
   Registration Success Page
   ══════════════════════════════════════════════════════════════ */
.success-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.success-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
}
.success-card h1 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: .5rem;
}
.success-greeting {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* API Key block */
.apikey-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.apikey-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.apikey-value {
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.apikey-value code {
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: .95rem;
    color: #10B981;
    background: rgba(16, 185, 129, .08);
    padding: .35rem .75rem;
    border-radius: 6px;
    word-break: break-all;
}
.apikey-copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s;
}
.apikey-copy-btn:hover {
    background: var(--card);
}
.apikey-copied {
    font-size: .82rem;
    color: #10B981;
    margin-top: .35rem;
    opacity: 0;
    transition: opacity .3s;
}
.apikey-copied.show {
    opacity: 1;
}

/* Warning */
.apikey-warning {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    text-align: left;
    padding: 1rem;
    background: rgba(251, 191, 36, .08);
    border: 1px solid rgba(251, 191, 36, .2);
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: .88rem;
}
.apikey-warning span {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Info rows */
.apikey-info {
    text-align: left;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
}
.apikey-info-row {
    padding: .35rem 0;
    font-size: .9rem;
    color: var(--muted);
}
.apikey-info-row strong {
    color: var(--text);
}

/* Usage */
.apikey-usage {
    text-align: left;
    margin-bottom: 1.5rem;
}
.apikey-usage-title {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .5rem;
}

/* Action buttons */
.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Email verification states ──── */
.email-highlight {
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
    word-break: break-all;
    margin: 0.5rem 0;
}

.email-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

/* ── Contact page ─────────────────────────────────────── */
.contact-hero {
    text-align: center;
    padding: 4rem 1.5rem 2.5rem;
    background: radial-gradient(ellipse at 50% 0%, var(--hero-glow) 0%, transparent 60%);
}
.contact-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: .75rem; }
.contact-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.contact-channels-section { padding: 2rem 1.5rem 0; max-width: 1200px; margin: 0 auto; }
.contact-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.contact-channel-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.contact-channel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-channel-card .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.contact-channel-card h4 { margin-bottom: .35rem; }
.contact-channel-card p, .contact-channel-card a { color: var(--muted); font-size: .9rem; }

.contact-form-section { padding: 2.5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}
.contact-form-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.contact-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.contact-sidebar-block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
}
.contact-sidebar-block .icon { font-size: 1.4rem; margin-bottom: .35rem; }
.contact-sidebar-block h4 { margin-bottom: .25rem; font-size: .95rem; }
.contact-sidebar-block p { color: var(--muted); font-size: .85rem; }

.contact-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.25rem; }
.contact-label { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.contact-input {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    border-radius: 10px; padding: .7rem 1rem; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s; width: 100%;
}
.contact-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}
.contact-select { appearance: none; cursor: pointer; }
.contact-textarea { resize: vertical; min-height: 120px; }
.contact-error { color: #f87171; font-size: .82rem; }
.contact-hint { color: var(--muted); font-size: .8rem; }
.contact-error-summary { color: #f87171; margin-bottom: 1rem; font-size: .9rem; }
.contact-checkbox-field { margin-bottom: 1.25rem; }
.contact-checkbox-label {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .9rem; cursor: pointer; color: var(--muted);
}
.contact-checkbox { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.contact-submit { width: 100%; justify-content: center; margin-top: .5rem; }

.contact-success {
    text-align: center; padding: 3rem 1.5rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    max-width: 560px; margin: 0 auto;
}
.contact-success .success-icon { font-size: 3rem; margin-bottom: 1rem; }
.contact-success h2 { margin-bottom: .5rem; }
.contact-success p { color: var(--muted); margin-bottom: 1.5rem; }

.contact-sidebar-links {
    list-style-type: none;
}

.faq-section-wrap {
    padding: 3rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.faq-section { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color .2s;
}
.faq-item:hover { border-color: var(--accent); }
.faq-item summary {
    padding: 1rem 1.25rem; font-weight: 600; cursor: pointer;
    list-style: none; display: flex; justify-content: space-between;
    align-items: center;
}
.faq-item summary::after { content: '▸'; transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(90deg); }
.faq-item p { padding: 0 1.25rem 1rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .contact-hero { padding: 3rem 1.25rem 2rem; }
    .contact-channels { grid-template-columns: 1fr; }
    .contact-form-section { padding: 2rem 1rem; }
}

.email-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.email-step:hover {
    border-color: var(--accent);
}

.email-step .step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.email-step .step-text {
    padding-top: 0.4rem;
    line-height: 1.5;
}

.email-step .step-text strong {
    color: var(--heading);
}

.error-state .success-icon {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.error-state .success-title {
    color: #dc3545;
}

.error-state .success-subtitle {
    color: var(--muted);
    max-width: 440px;
    margin: 0 auto;
}

/* ── Registration responsive ──── */
@media (max-width: 768px) {
    .register-section { padding: 2rem 1rem 1.5rem; }
    .register-card { padding: 1.5rem 1.25rem; }
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .quickstart-steps { flex-direction: column; }
    .quickstart-arrow { transform: rotate(90deg); }
    .success-card { padding: 2rem 1.25rem; }
    .email-step { padding: 0.85rem 1rem; }
    .email-highlight { font-size: 1rem; padding: 0.85rem 1rem; }
}
@media (max-width: 420px) {
    .benefits-grid { grid-template-columns: 1fr; }
    .success-actions { flex-direction: column; }
    .success-actions .btn { width: 100%; justify-content: center; }
}