/*!
 * MonetVault design system
 * Built for the MonetVault pay-per-download platform.
 * Palette : indigo primary, cyan accent, amber for earnings, deep navy surfaces.
 * Type    : Space Grotesk (display) + DM Sans (text), self-hosted variable woff2.
 */

/* ==========================================================================
   1. Fonts
   ========================================================================== */

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/space-grotesk-var.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/dm-sans-var.woff2') format('woff2');
}

/* ==========================================================================
   2. Design tokens
   ========================================================================== */

:root {
    --mv-primary: #4338ca;
    --mv-primary-600: #4f46e5;
    --mv-primary-700: #3730a3;
    --mv-primary-050: #eef2ff;
    --mv-accent: #0891b2;
    --mv-accent-600: #06b6d4;
    --mv-accent-050: #ecfeff;
    --mv-amber: #d97706;
    --mv-amber-050: #fffbeb;
    --mv-success: #15803d;
    --mv-success-050: #f0fdf4;
    --mv-danger: #b91c1c;
    --mv-danger-050: #fef2f2;
    --mv-warning: #b45309;

    --mv-bg: #f6f7fb;
    --mv-surface: #ffffff;
    --mv-surface-2: #f1f3f9;
    --mv-ink: #111827;
    --mv-ink-2: #374151;
    --mv-muted: #6b7280;
    --mv-faint: #9ca3af;
    --mv-line: #e5e7eb;
    --mv-line-strong: #d1d5db;
    --mv-dark: #0b1120;
    --mv-dark-2: #131b31;

    --mv-radius-sm: 8px;
    --mv-radius: 14px;
    --mv-radius-lg: 22px;
    --mv-radius-xl: 30px;

    --mv-shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
    --mv-shadow-sm: 0 2px 8px rgba(16, 24, 40, .06);
    --mv-shadow: 0 10px 30px rgba(16, 24, 40, .08);
    --mv-shadow-lg: 0 24px 60px rgba(16, 24, 40, .12);

    --mv-gradient: linear-gradient(135deg, #4338ca 0%, #6366f1 45%, #06b6d4 100%);
    --mv-gradient-warm: linear-gradient(135deg, #4338ca 0%, #7c3aed 55%, #0891b2 100%);

    --mv-font: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mv-display: 'Space Grotesk', var(--mv-font);

    --mv-z-base: 10;
    --mv-z-dropdown: 20;
    --mv-z-modal: 30;
    --mv-z-toast: 50;

    --mv-header-h: 72px;
    --mv-ease: cubic-bezier(.4, 0, .2, 1);
}

/* ==========================================================================
   3. Reset & base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--mv-font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--mv-ink);
    background: var(--mv-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--mv-display);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -.02em;
    color: var(--mv-ink);
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.5vw, 3.15rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--mv-primary-600);
    text-decoration: none;
    transition: color .18s var(--mv-ease);
}

a:hover { color: var(--mv-primary-700); }

img, svg, video { max-width: 100%; height: auto; display: block; }

/* Every inline icon keeps a sane size, the context rules refine it. */
.icon { width: 18px; height: 18px; flex: none; }

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }

hr { border: 0; border-top: 1px solid var(--mv-line); margin: 1.5rem 0; }

code, pre, .mono {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: .92em;
}

:focus-visible {
    outline: 2px solid var(--mv-primary-600);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection {
    background: var(--mv-primary-600);
    color: #fff;
}

/* ==========================================================================
   4. Layout primitives
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 20px;
}

.container-narrow { max-width: 820px; }
.container-wide { max-width: 1400px; }

.section { padding: clamp(48px, 6vw, 88px) 0; }
.section-sm { padding: clamp(32px, 4vw, 56px) 0; }
.section-tight { padding: 24px 0; }

.section-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 52px); text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head p { color: var(--mv-muted); font-size: 1.05rem; margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mv-primary-600);
    background: var(--mv-primary-050);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 16px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--mv-muted); }
.text-sm { font-size: .9rem; }
.text-xs { font-size: .8rem; }
.text-lg { font-size: 1.12rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    --btn-bg: var(--mv-primary-600);
    --btn-fg: #fff;
    --btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 22px;
    font-family: var(--mv-font);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: background-color .18s var(--mv-ease), color .18s var(--mv-ease), border-color .18s var(--mv-ease), box-shadow .18s var(--mv-ease);
}

.btn:hover { color: var(--btn-fg); box-shadow: var(--mv-shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn--primary { --btn-bg: var(--mv-primary-600); }
.btn--primary:hover { --btn-bg: var(--mv-primary-700); }

.btn--accent { --btn-bg: var(--mv-accent-600); }
.btn--accent:hover { --btn-bg: var(--mv-accent); }

.btn--dark { --btn-bg: var(--mv-dark); }
.btn--dark:hover { --btn-bg: #000; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--mv-ink-2); --btn-border: var(--mv-line-strong); }
.btn--ghost:hover { --btn-bg: var(--mv-surface-2); --btn-fg: var(--mv-ink); }

.btn--soft { --btn-bg: var(--mv-primary-050); --btn-fg: var(--mv-primary-700); }
.btn--soft:hover { --btn-bg: #e0e7ff; }

.btn--danger { --btn-bg: var(--mv-danger); }
.btn--danger:hover { --btn-bg: #991b1b; }

.btn--success { --btn-bg: var(--mv-success); }
.btn--success:hover { --btn-bg: #166534; }

.btn--sm { min-height: 36px; padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn--lg { min-height: 54px; padding: 15px 30px; font-size: 1.03rem; border-radius: 12px; }
.btn--block { width: 100%; }

.btn--grad {
    --btn-bg: transparent;
    background: var(--mv-gradient);
    color: #fff;
}
.btn--grad:hover { color: #fff; box-shadow: 0 10px 26px rgba(67, 56, 202, .3); }

.btn .icon { width: 18px; height: 18px; flex: none; }

/* ==========================================================================
   6. Cards & surfaces
   ========================================================================== */

.card {
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    border-radius: var(--mv-radius);
    box-shadow: var(--mv-shadow-xs);
}

.card--pad { padding: 24px; }
.card--hover { transition: border-color .2s var(--mv-ease), box-shadow .2s var(--mv-ease); }
.card--hover:hover { border-color: #c7d2fe; box-shadow: var(--mv-shadow); }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--mv-line);
    font-weight: 600;
}

.card-body { padding: 22px; }
.card-foot {
    padding: 16px 22px;
    border-top: 1px solid var(--mv-line);
    background: var(--mv-surface-2);
    border-radius: 0 0 var(--mv-radius) var(--mv-radius);
}

.panel {
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    border-radius: var(--mv-radius);
    overflow: hidden;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: 999px;
    background: var(--mv-surface-2);
    color: var(--mv-ink-2);
    border: 1px solid var(--mv-line);
}

.badge--success { background: var(--mv-success-050); color: var(--mv-success); border-color: #bbf7d0; }
.badge--danger { background: var(--mv-danger-050); color: var(--mv-danger); border-color: #fecaca; }
.badge--warning { background: var(--mv-amber-050); color: var(--mv-warning); border-color: #fde68a; }
.badge--info { background: var(--mv-primary-050); color: var(--mv-primary-700); border-color: #c7d2fe; }
.badge--accent { background: var(--mv-accent-050); color: var(--mv-accent); border-color: #a5f3fc; }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--mv-surface-2);
    flex: none;
}

.avatar--lg { width: 64px; height: 64px; }
.avatar--sm { width: 32px; height: 32px; }

/* ==========================================================================
   7. Forms
   ========================================================================== */

.field { margin-bottom: 18px; }

.label {
    display: block;
    margin-bottom: 7px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--mv-ink-2);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    font-family: var(--mv-font);
    font-size: .95rem;
    color: var(--mv-ink);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line-strong);
    border-radius: 10px;
    transition: border-color .18s var(--mv-ease), box-shadow .18s var(--mv-ease);
}

.input::placeholder, .textarea::placeholder { color: var(--mv-faint); }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--mv-primary-600);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}

.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.input--error, .select--error, .textarea--error { border-color: var(--mv-danger); }

.help { margin-top: 6px; font-size: .82rem; color: var(--mv-muted); }

.error-text {
    display: block;
    margin-top: 6px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--mv-danger);
}

.checkbox, .radio {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .92rem;
    line-height: 1.5;
}

.checkbox input, .radio input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--mv-primary-600);
    cursor: pointer;
    flex: none;
}

.form-grid { display: grid; gap: 0 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .field--full { grid-column: 1 / -1; }

/* ==========================================================================
   8. Alerts
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--mv-radius-sm);
    border: 1px solid;
    font-size: .93rem;
    margin-bottom: 20px;
}

.alert .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: var(--mv-success-050); border-color: #bbf7d0; color: #14532d; }
.alert--error { background: var(--mv-danger-050); border-color: #fecaca; color: #7f1d1d; }
.alert--warning { background: var(--mv-amber-050); border-color: #fde68a; color: #78350f; }
.alert--info { background: var(--mv-primary-050); border-color: #c7d2fe; color: #312e81; }

/* ==========================================================================
   9. Tables
   ========================================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--mv-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    background: var(--mv-surface);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mv-muted);
    background: var(--mv-surface-2);
    border-bottom: 1px solid var(--mv-line);
    white-space: nowrap;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--mv-line);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   10. Site header & footer
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--mv-z-dropdown);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--mv-line);
}

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--mv-header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mv-display);
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--mv-ink);
}

.brand:hover { color: var(--mv-ink); }
.brand__mark { width: 34px; height: 34px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav__link {
    padding: 9px 14px;
    border-radius: 9px;
    font-size: .93rem;
    font-weight: 500;
    color: var(--mv-ink-2);
    cursor: pointer;
}

.nav__link:hover { background: var(--mv-surface-2); color: var(--mv-ink); }
.nav__link.is-active { color: var(--mv-primary-700); background: var(--mv-primary-050); }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--mv-line-strong);
    border-radius: 10px;
    cursor: pointer;
    color: var(--mv-ink);
    margin-left: auto;
}

.nav-toggle .icon { width: 22px; height: 22px; }

.site-footer {
    background: var(--mv-dark);
    color: #cbd5e1;
    padding: clamp(40px, 5vw, 68px) 0 28px;
    margin-top: clamp(40px, 6vw, 80px);
}

.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; font-size: .92rem; }
.site-footer__bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .87rem;
    color: #94a3b8;
}

.social-row { display: flex; gap: 10px; }

.social-row a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    color: #e2e8f0;
    transition: background-color .18s var(--mv-ease), color .18s var(--mv-ease);
}

.social-row a:hover { background: var(--mv-primary-600); color: #fff; }
.social-row .icon { width: 18px; height: 18px; }

/* ==========================================================================
   11. Hero & marketing sections
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--mv-dark);
    color: #fff;
    padding: clamp(56px, 8vw, 104px) 0 clamp(52px, 7vw, 92px);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 55% at 78% 12%, rgba(6, 182, 212, .30) 0%, transparent 62%),
        radial-gradient(52% 48% at 12% 8%, rgba(99, 102, 241, .38) 0%, transparent 60%),
        radial-gradient(48% 52% at 50% 100%, rgba(67, 56, 202, .30) 0%, transparent 65%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 .grad {
    background: linear-gradient(100deg, #a5b4fc 0%, #67e8f9 55%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lead {
    font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem);
    color: #cbd5e1;
    max-width: 56ch;
    margin-bottom: 30px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-size: .88rem;
    color: #94a3b8;
}

.hero__trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust .icon { width: 16px; height: 16px; color: #34d399; }

.hero__panel {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--mv-radius-lg);
    padding: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--mv-shadow-lg);
}

.hero__panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 16px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mini-stat:last-child { border-bottom: 0; }
.mini-stat__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, .22);
    color: #c7d2fe;
    flex: none;
}

.mini-stat__icon .icon { width: 19px; height: 19px; }
.mini-stat__label { font-size: .82rem; color: #94a3b8; }
.mini-stat__value { font-family: var(--mv-display); font-size: 1.05rem; font-weight: 600; color: #fff; }

.bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.bento__item {
    grid-column: span 2;
    padding: 26px;
    border-radius: var(--mv-radius-lg);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    box-shadow: var(--mv-shadow-xs);
    transition: border-color .2s var(--mv-ease), box-shadow .2s var(--mv-ease);
}

.bento__item:hover { border-color: #c7d2fe; box-shadow: var(--mv-shadow); }
.bento__item--wide { grid-column: span 3; }
.bento__item--tall { grid-column: span 3; grid-row: span 2; }
.bento__item--half { grid-column: span 3; }
.bento__icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--mv-primary-050);
    color: var(--mv-primary-600);
    margin-bottom: 16px;
}

.bento__icon .icon { width: 22px; height: 22px; }
.bento__item h3 { font-size: 1.12rem; margin-bottom: 8px; }
.bento__item p { color: var(--mv-muted); font-size: .93rem; margin: 0; }

.bento__item--accent .bento__icon { background: var(--mv-accent-050); color: var(--mv-accent); }
.bento__item--amber .bento__icon { background: var(--mv-amber-050); color: var(--mv-amber); }
.bento__item--dark { background: var(--mv-dark); border-color: var(--mv-dark); }
.bento__item--dark h3, .bento__item--dark p { color: #fff; }
.bento__item--dark p { color: #94a3b8; }
.bento__item--dark .bento__icon { background: rgba(255, 255, 255, .1); color: #a5b4fc; }

.step {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 24px;
    border-radius: var(--mv-radius-lg);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    position: relative;
}

.step__num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-family: var(--mv-display);
    font-weight: 700;
    color: #fff;
    background: var(--mv-gradient);
}

.step h3 { font-size: 1.06rem; margin: 0; }
.step p { color: var(--mv-muted); font-size: .92rem; margin: 0; }

.counter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.counter {
    text-align: center;
    padding: 26px 18px;
    border-radius: var(--mv-radius-lg);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
}

.counter__value {
    font-family: var(--mv-display);
    font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
    font-weight: 700;
    background: var(--mv-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.counter__label { font-size: .9rem; color: var(--mv-muted); margin-top: 4px; }

.cta-band {
    border-radius: var(--mv-radius-xl);
    background: var(--mv-dark);
    color: #fff;
    padding: clamp(34px, 5vw, 62px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(46% 70% at 50% 0%, rgba(99, 102, 241, .45) 0%, transparent 70%);
}

.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cbd5e1; max-width: 60ch; margin-inline: auto; }

.testimonial {
    padding: 26px;
    border-radius: var(--mv-radius-lg);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
}

.testimonial__stars { display: flex; gap: 3px; color: #f59e0b; margin-bottom: 12px; }
.testimonial__stars .icon { width: 17px; height: 17px; }
.testimonial p { font-size: .96rem; color: var(--mv-ink-2); }
.testimonial__who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial__name { font-weight: 600; font-size: .92rem; }
.testimonial__role { font-size: .82rem; color: var(--mv-muted); }

/* ==========================================================================
   12. Pricing
   ========================================================================== */

.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    border-radius: var(--mv-radius-lg);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    transition: border-color .2s var(--mv-ease), box-shadow .2s var(--mv-ease);
}

.plan:hover { border-color: #c7d2fe; box-shadow: var(--mv-shadow); }

.plan--popular {
    border-color: var(--mv-primary-600);
    box-shadow: 0 18px 44px rgba(67, 56, 202, .16);
    transform: translateY(-6px);
}

.plan__flag {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mv-gradient);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.plan__name { font-family: var(--mv-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.plan__desc { font-size: .89rem; color: var(--mv-muted); min-height: 42px; margin-bottom: 16px; }

.plan__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--mv-display);
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 4px;
}

.plan__period { font-size: .88rem; font-weight: 500; color: var(--mv-muted); letter-spacing: 0; }
.plan__credits { font-size: .9rem; color: var(--mv-accent); font-weight: 600; margin-bottom: 18px; }

.plan__features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan__features li { display: flex; align-items: flex-start; gap: 9px; font-size: .91rem; margin-bottom: 10px; color: var(--mv-ink-2); }
.plan__features .icon { width: 17px; height: 17px; color: var(--mv-success); flex: none; margin-top: 3px; }

/* ==========================================================================
   13. File cards & marketplace
   ========================================================================== */

.file-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--mv-radius);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    overflow: hidden;
    transition: border-color .2s var(--mv-ease), box-shadow .2s var(--mv-ease);
    height: 100%;
}

.file-card:hover { border-color: #c7d2fe; box-shadow: var(--mv-shadow); }

.file-card__thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #eef2ff, #ecfeff);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.file-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-card__ext {
    font-family: var(--mv-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mv-primary-600);
    opacity: .85;
}

.file-card__price {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(11, 17, 32, .86);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.file-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.file-card__title { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.file-card__title a { color: var(--mv-ink); }
.file-card__title a:hover { color: var(--mv-primary-600); }
.file-card__meta { font-size: .82rem; color: var(--mv-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.file-card__foot { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--mv-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--mv-surface-2);
    border: 1px solid var(--mv-line);
    font-size: .84rem;
    color: var(--mv-ink-2);
    cursor: pointer;
    transition: background-color .18s var(--mv-ease), border-color .18s var(--mv-ease), color .18s var(--mv-ease);
}

.chip:hover { border-color: #c7d2fe; color: var(--mv-primary-700); background: var(--mv-primary-050); }
.chip.is-active { background: var(--mv-primary-600); border-color: var(--mv-primary-600); color: #fff; }

/* ==========================================================================
   14. FAQ accordion
   ========================================================================== */

.faq-item { border-bottom: 1px solid var(--mv-line); }
.faq-item:last-child { border-bottom: 0; }

.faq-item__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0;
    background: none;
    border: 0;
    font-family: var(--mv-display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--mv-ink);
    text-align: left;
    cursor: pointer;
}

.faq-item__q .icon { width: 20px; height: 20px; flex: none; color: var(--mv-primary-600); transition: transform .22s var(--mv-ease); }
.faq-item__a { display: none; padding: 0 0 20px; color: var(--mv-muted); font-size: .96rem; }
.faq-item.is-open .faq-item__a { display: block; }
.faq-item.is-open .faq-item__q .icon { transform: rotate(180deg); }

/* ==========================================================================
   15. Member area
   ========================================================================== */

.app-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }

.side {
    background: var(--mv-dark);
    color: #cbd5e1;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.side__brand { padding: 0 10px 20px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 16px; }
.side__brand .brand { color: #fff; }
.side__group { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #64748b; margin: 20px 10px 8px; }

.side__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: .92rem;
    color: #cbd5e1;
    margin-bottom: 2px;
    transition: background-color .16s var(--mv-ease), color .16s var(--mv-ease);
}

.side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side__link.is-active { background: var(--mv-primary-600); color: #fff; font-weight: 600; }
.side__link .icon { width: 18px; height: 18px; flex: none; opacity: .9; }
.side__badge {
    margin-left: auto;
    background: var(--mv-danger);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.app-main { min-width: 0; display: flex; flex-direction: column; }

.app-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 26px;
    background: var(--mv-surface);
    border-bottom: 1px solid var(--mv-line);
    position: sticky;
    top: 0;
    z-index: var(--mv-z-base);
}

.app-top h1 { font-size: 1.32rem; margin: 0; }
.app-body { padding: 26px; flex: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.stat {
    padding: 20px;
    border-radius: var(--mv-radius);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
}

.stat__label { font-size: .82rem; color: var(--mv-muted); display: flex; align-items: center; gap: 8px; }
.stat__value { font-family: var(--mv-display); font-size: 1.75rem; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat__foot { font-size: .8rem; color: var(--mv-faint); margin-top: 3px; }
.stat__icon { width: 18px; height: 18px; color: var(--mv-primary-600); }
/* The icon of a statistic keeps a fixed size, whatever the label says. */
.stat__label .icon { width: 18px; height: 18px; flex: none; color: var(--mv-primary-600); }

.wallet-card {
    border-radius: var(--mv-radius-lg);
    background: var(--mv-dark);
    color: #fff;
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 80% at 100% 0%, rgba(6, 182, 212, .35) 0%, transparent 60%);
}

.wallet-card > * { position: relative; }
.wallet-card__label { font-size: .84rem; color: #94a3b8; }
.wallet-card__amount { font-family: var(--mv-display); font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; }

/* ==========================================================================
   16. Admin
   ========================================================================== */

.admin-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: var(--mv-surface);
    border-bottom: 1px solid var(--mv-line);
    position: sticky;
    top: 0;
    z-index: var(--mv-z-base);
}

.admin-bar h1 { font-size: 1.22rem; margin: 0; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 16px 18px;
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    border-radius: var(--mv-radius);
    margin-bottom: 20px;
}

.filter-bar .field { margin: 0; min-width: 180px; }
.filter-bar .input, .filter-bar .select { min-height: 42px; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--mv-line);
    background: var(--mv-surface);
    font-size: .89rem;
    color: var(--mv-ink-2);
}

.pagination a:hover { border-color: var(--mv-primary-600); color: var(--mv-primary-700); }
.pagination .is-current { background: var(--mv-primary-600); border-color: var(--mv-primary-600); color: #fff; font-weight: 600; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar-chart__bar { width: 100%; max-width: 26px; background: var(--mv-gradient); border-radius: 5px 5px 0 0; min-height: 3px; }
.bar-chart__label { font-size: .68rem; color: var(--mv-faint); }

/* ==========================================================================
   17. Cookie banner
   ========================================================================== */

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: var(--mv-z-toast);
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: var(--mv-radius);
    background: var(--mv-surface);
    border: 1px solid var(--mv-line);
    box-shadow: var(--mv-shadow-lg);
}

.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: .9rem; color: var(--mv-ink-2); }

/* ==========================================================================
   18. Toast
   ========================================================================== */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--mv-z-toast);
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: var(--mv-radius-sm);
    background: var(--mv-dark);
    color: #fff;
    box-shadow: var(--mv-shadow-lg);
    font-size: .92rem;
}

.toast--success { background: #14532d; }
.toast--error { background: #7f1d1d; }
.toast .icon { width: 19px; height: 19px; flex: none; }

/* ==========================================================================
   19. Utilities & responsive
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: var(--mv-z-toast);
    background: var(--mv-primary-600);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 9px 9px;
    transition: top .18s var(--mv-ease);
}

.skip-link:focus { top: 0; color: #fff; }

.divider { height: 1px; background: var(--mv-line); margin: 24px 0; }

.price-tag { font-family: var(--mv-display); font-weight: 700; color: var(--mv-primary-700); }

@media (max-width: 1100px) {
    .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bento__item, .bento__item--wide, .bento__item--tall, .bento__item--half { grid-column: span 3; grid-row: auto; }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: minmax(0, 1fr); }
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .side { position: static; height: auto; }
    .side:not(.is-open) { display: none; }
    .side.is-open { display: block; }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    /* Comfortable touch targets on a phone. */
    .btn, .btn--sm, .btn--lg { min-height: 44px; }
    .btn--sm { padding: 10px 14px; }
    .nav {
        display: none;
        position: absolute;
        top: var(--mv-header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px;
        background: var(--mv-surface);
        border-bottom: 1px solid var(--mv-line);
        box-shadow: var(--mv-shadow);
        margin-left: 0;
    }
    .nav.is-open { display: flex; }
    .nav__link { padding: 12px 14px; }
    .site-header__bar { position: relative; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .bento__item, .bento__item--wide, .bento__item--tall, .bento__item--half { grid-column: span 6; }
    .pricing-grid { grid-template-columns: minmax(0, 1fr); }
    .plan--popular { transform: none; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-body, .app-top { padding-inline: 16px; }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: minmax(0, 1fr); }
    .counter-grid { grid-template-columns: minmax(0, 1fr); }
    .btn { width: 100%; }
    .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header, .site-footer, .side, .app-top, .btn { display: none !important; }
    body { background: #fff; }
}
